diff --git a/.babelrc.js b/.babelrc.js deleted file mode 100644 index b00deb2d4c20..000000000000 --- a/.babelrc.js +++ /dev/null @@ -1,161 +0,0 @@ -const withTests = { - presets: [ - [ - '@babel/preset-env', - { shippedProposals: true, useBuiltIns: 'usage', corejs: '3', targets: { node: 'current' } }, - ], - ], - plugins: [ - '@storybook/babel-plugin-require-context-hook', - 'babel-plugin-dynamic-import-node', - '@babel/plugin-transform-runtime', - ], -}; - -// type BabelMode = 'cjs' | 'esm' | 'modern'; - -const modules = process.env.BABEL_MODE === 'cjs' ? 'auto' : false; - -// FIXME: optional chaining introduced in chrome 80, not supported by wepback4 -// https://github.com/webpack/webpack/issues/10227#issuecomment-642734920 -const targets = process.env.BABEL_MODE === 'modern' ? { chrome: '79' } : 'defaults'; - -module.exports = { - ignore: [ - './lib/codemod/src/transforms/__testfixtures__', - './lib/postinstall/src/__testfixtures__', - '**/typings.d.ts', - ], - presets: [ - [ - '@babel/preset-env', - { - shippedProposals: true, - useBuiltIns: 'usage', - corejs: '3', - targets, - modules, - }, - ], - '@babel/preset-typescript', - '@babel/preset-react', - '@babel/preset-flow', - ], - plugins: [ - [ - '@babel/plugin-proposal-decorators', - { - legacy: true, - }, - ], - ['@babel/plugin-proposal-class-properties', { loose: true }], - ['@babel/plugin-proposal-private-methods', { loose: true }], - ['@babel/plugin-proposal-private-property-in-object', { loose: true }], - '@babel/plugin-proposal-export-default-from', - '@babel/plugin-syntax-dynamic-import', - ['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }], - 'babel-plugin-macros', - ['@emotion', { sourceMap: true, autoLabel: 'always' }], - ], - env: { - test: withTests, - }, - overrides: [ - { - test: './examples/vue-kitchen-sink', - presets: ['@vue/babel-preset-jsx'], - env: { - test: withTests, - }, - }, - { - test: './lib', - presets: [ - [ - '@babel/preset-env', - { - shippedProposals: true, - useBuiltIns: 'usage', - corejs: '3', - modules, - targets, - }, - ], - '@babel/preset-react', - ], - plugins: [ - ['@babel/plugin-proposal-object-rest-spread', { loose: true, useBuiltIns: true }], - '@babel/plugin-proposal-export-default-from', - '@babel/plugin-syntax-dynamic-import', - ['@babel/plugin-proposal-private-property-in-object', { loose: true }], - ['@babel/plugin-proposal-class-properties', { loose: true }], - 'babel-plugin-macros', - ['@emotion', { sourceMap: true, autoLabel: 'always' }], - 'babel-plugin-add-react-displayname', - ], - env: { - test: withTests, - }, - }, - { - test: [ - './lib/node-logger', - './lib/core', - './lib/core-common', - './lib/core-server', - './lib/builder-webpack4', - './lib/builder-webpack5', - './lib/codemod', - './addons/storyshots', - '**/src/server/**', - '**/src/bin/**', - ], - presets: [ - [ - '@babel/preset-env', - { - shippedProposals: true, - useBuiltIns: 'usage', - targets: { - node: '10', - }, - modules, - corejs: '3', - }, - ], - ], - plugins: [ - '@emotion', - 'babel-plugin-macros', - '@babel/plugin-transform-arrow-functions', - '@babel/plugin-transform-shorthand-properties', - '@babel/plugin-transform-block-scoping', - '@babel/plugin-transform-destructuring', - ['@babel/plugin-proposal-private-property-in-object', { loose: true }], - ['@babel/plugin-proposal-class-properties', { loose: true }], - '@babel/plugin-proposal-object-rest-spread', - '@babel/plugin-proposal-export-default-from', - ], - env: { - test: withTests, - }, - }, - { - test: ['**/virtualModuleEntry.template.js'], - presets: [ - [ - '@babel/preset-env', - { - shippedProposals: true, - useBuiltIns: 'usage', - targets: { - node: '10', - }, - corejs: '3', - modules: false, - }, - ], - ], - }, - ], -}; diff --git a/.ci/danger/dangerfile.ts b/.ci/danger/dangerfile.ts index e7d267591d89..a25402f84e4d 100644 --- a/.ci/danger/dangerfile.ts +++ b/.ci/danger/dangerfile.ts @@ -3,11 +3,11 @@ import { execSync } from 'child_process'; execSync('npm install lodash'); -const flatten = require('lodash/flatten'); -const intersection = require('lodash/intersection'); -const isEmpty = require('lodash/isEmpty'); +const flatten = require('lodash/flatten.js'); +const intersection = require('lodash/intersection.js'); +const isEmpty = require('lodash/isEmpty.js'); -const pkg = require('../../package.json'); // eslint-disable-line import/newline-after-import +const pkg = require('../../code/package.json'); // eslint-disable-line import/newline-after-import const prLogConfig = pkg['pr-log']; const Versions = { diff --git a/.circleci/config.yml b/.circleci/config.yml index 6dcb72899d0d..04f5390f0cda 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,196 +1,199 @@ version: 2.1 +parameters: + workflow: + description: Which workflow to run + type: enum + enum: ['ci', 'pr', 'merged', 'daily'] + default: 'ci' + executors: - sb_node_14_classic: + sb_node_16_classic: parameters: class: description: The Resource class type: enum enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'medium' + default: 'small' working_directory: /tmp/storybook docker: - - image: circleci/node:14 + - image: cimg/node:16.17.1 environment: - NODE_OPTIONS: --max_old_space_size=3076 + NODE_OPTIONS: --max_old_space_size=6144 resource_class: <> - sb_node_14_browsers: + sb_node_16_browsers: parameters: class: description: The Resource class type: enum enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'medium' + default: 'small' working_directory: /tmp/storybook docker: - - image: circleci/node:14-browsers + - image: cimg/node:16.17.1-browsers environment: - NODE_OPTIONS: --max_old_space_size=3076 + NODE_OPTIONS: --max_old_space_size=6144 resource_class: <> - sb_cypress_8_node_14: + sb_playwright: parameters: class: description: The Resource class type: enum enum: ['small', 'medium', 'medium+', 'large', 'xlarge'] - default: 'medium' + default: 'small' working_directory: /tmp/storybook docker: - # ⚠️ The Cypress docker image is based on Node.js one so be careful when updating it because it can also - # cause an upgrade of Node.js version too. Cypress 8.5 image is based on Node.js 14 - - image: cypress/included:8.7.0 + - image: mcr.microsoft.com/playwright:v1.29.1-focal environment: - NODE_OPTIONS: --max_old_space_size=3076 + NODE_OPTIONS: --max_old_space_size=6144 resource_class: <> orbs: - git-shallow-clone: guitarrapc/git-shallow-clone@2.0.3 + git-shallow-clone: guitarrapc/git-shallow-clone@2.4.1 + browser-tools: circleci/browser-tools@1.4.0 + discord: antonioned/discord@0.1.0 commands: - ensure-pr-is-labeled-with: - description: 'A command looking for the labels set on the PR associated to this workflow and checking it contains the label given as parameter' + cancel-workflow-on-failure: + description: 'Cancels the entire workflow in case the previous step has failed' + steps: + - run: + name: Cancel current workflow + when: on_fail + command: | + echo "Canceling workflow as previous step resulted in failure." + echo "To execute all checks locally, please run yarn ci-tests" + curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}" + report-workflow-on-failure: + description: 'Reports failures to discord' parameters: - label: + template: + description: | + Which template to report in discord. Applicable for parallel sandbox jobs type: string + default: 'none' steps: - run: - name: Check if PR is labeled with "<< parameters.label >>" - command: | - apt-get -y install jq - - PR_NUMBER=$(echo "$CIRCLE_PULL_REQUEST" | sed "s/.*\/pull\///") - echo "PR_NUMBER: $PR_NUMBER" - - API_GITHUB="https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME" - PR_REQUEST_URL="$API_GITHUB/pulls/$PR_NUMBER" - PR_RESPONSE=$(curl -H "Authorization: token $GITHUB_TOKEN_STORYBOOK_BOT_READ_REPO" "$PR_REQUEST_URL") - - - if [ $(echo $PR_RESPONSE | jq '.labels | map(select(.name == "<< parameters.label >>")) | length') -ge 1 ] || - ( [ $(echo $PR_RESPONSE | jq '.labels | length') -ge 1 ] && [ "<< parameters.label >>" == "*" ]) - then - echo "🚀 The PR is labelled with '<< parameters.label >>', job will continue!" - else - echo "🏁 The PR isn't labelled with '<< parameters.label >>' so this job will end at the current step." - circleci-agent step halt - fi - + when: on_fail + command: git fetch --unshallow + - discord/status: + only_for_branches: main,next,next-release,latest-release + fail_only: true + failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>) jobs: - build: + pretty-docs: executor: - class: xlarge - name: sb_node_14_classic + class: small + name: sb_node_16_classic steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - restore_cache: name: Restore Yarn cache keys: - - build-yarn-2-cache-v3--{{ checksum "yarn.lock" }} - - run: - name: Install dependencies - command: yarn install --immutable + - prettydocs-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - run: - name: Bootstrap - command: yarn bootstrap --build --manager + name: Install + command: | + cd scripts + yarn install - save_cache: name: Save Yarn cache - key: build-yarn-2-cache-v3--{{ checksum "yarn.lock" }} + key: prettydocs-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} paths: - ~/.yarn/berry/cache - - persist_to_workspace: - root: . - paths: - - examples - - node_modules - - addons - - app - - lib - chromatic: - executor: sb_node_14_browsers - parallelism: 4 - steps: - # Keep using default checkout because Chromatic needs some git history to work properly - - checkout - - attach_workspace: - at: . - run: - name: examples + name: Prettier command: | - yarn run-chromatics - examples: + cd scripts + yarn docs:prettier:check + build: executor: - class: medium+ - name: sb_node_14_browsers - parallelism: 17 + class: large + name: sb_node_16_classic steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - - attach_workspace: - at: . + - restore_cache: + name: Restore Yarn cache + keys: + - build-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} - run: - name: examples + name: Compile command: | - yarn build-storybooks --all - - persist_to_workspace: - root: . - paths: - - built-storybooks - publish: - executor: - class: medium - name: sb_node_14_classic - steps: - - git-shallow-clone/checkout_advanced: - clone_options: '--depth 1 --verbose' - - attach_workspace: - at: . + yarn task --task compile --start-from=auto --no-link --debug + git diff --exit-code - run: - name: running local registry - command: yarn local-registry --publish + name: Publish to Verdaccio + command: | + cd code + yarn local-registry --publish + - report-workflow-on-failure + - save_cache: + name: Save Yarn cache + key: build-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }} + paths: + - ~/.yarn/berry/cache - persist_to_workspace: root: . paths: + - code/node_modules + - scripts/node_modules + - code/examples + - code/node_modules + - code/addons + - code/frameworks + - code/lib + - code/ui + - code/renderers + - code/presets - .verdaccio-cache - e2e-tests-extended: + cra-bench: executor: class: medium - name: sb_cypress_8_node_14 - parallelism: 4 + name: sb_playwright + working_directory: /tmp/storybook steps: - - when: - condition: - and: - - not: - equal: [main, << pipeline.git.branch >>] - - not: - equal: [next, << pipeline.git.branch >>] - steps: - - ensure-pr-is-labeled-with: - label: 'run e2e extended test suite' - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: running local registry - command: yarn local-registry --port 6000 --open + name: Running local registry + command: | + cd code + yarn local-registry --open background: true - run: name: Wait for registry - command: yarn wait-on http://localhost:6000 + command: | + cd code + yarn wait-on http://localhost:6001 + - run: + name: set up cra repro, skip tests + command: | + cd code + SANDBOX_ROOT=../bench yarn task --task sandbox --template cra/default-ts --skip-template-stories --start-from=never --no-link + - run: + name: Run @storybook/bench on repro + command: | + cd bench/cra-default-ts + rm -rf node_modules + mkdir node_modules + npx -p @storybook/bench@next sb-bench 'yarn install' --label cra + - report-workflow-on-failure - run: - name: Run E2E (extended) tests - command: yarn test:e2e-framework --clean --all --skip angular11 --skip angular --skip angular12 --skip vue3 --skip web_components_typescript --skip cra --skip react - no_output_timeout: 5m + name: prep artifacts + when: always + command: tar cvzf /tmp/cra-default-ts-bench.tar.gz bench/cra-default-ts - store_artifacts: - path: /tmp/cypress-record - destination: cypress - e2e-tests-core: + path: /tmp/cra-default-ts-bench.tar.gz + destination: cra-default-ts-bench.tar.gz + react-vite-bench: executor: class: large - name: sb_cypress_8_node_14 - parallelism: 8 + name: sb_playwright + working_directory: /tmp/storybook steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' @@ -198,259 +201,448 @@ jobs: at: . - run: name: Running local registry - command: yarn local-registry --port 6000 --open + command: | + cd code + yarn local-registry --open background: true - run: name: Wait for registry - command: yarn wait-on http://localhost:6000 + command: | + cd code + yarn wait-on http://localhost:6001 + - run: + name: set up react-vite repro, skip tests + command: | + cd code + SANDBOX_ROOT=../bench yarn task --task sandbox --template react-vite/default-ts --skip-template-stories --start-from=never --no-link - run: - name: Run E2E (core) tests - # Do not test CRA here because it's done in PnP part - # TODO: Remove `web_components_typescript` as soon as Lit 2 stable is released - command: yarn test:e2e-framework vue3 angular130 angular13 angular12 angular11 web_components_typescript web_components_lit2 react react_legacy_root_api vite_react - no_output_timeout: 5m + name: Run @storybook/bench on repro + command: | + cd bench/react-vite-default-ts + rm -rf node_modules + mkdir node_modules + npx -p @storybook/bench@next sb-bench 'yarn install' --label react-vite + - report-workflow-on-failure + - run: + name: prep artifacts + when: always + command: tar cvzf /tmp/react-vite-default-ts-bench.tar.gz bench/react-vite-default-ts - store_artifacts: - path: /tmp/cypress-record - destination: cypress - e2e-tests-sb-docs: + path: /tmp/react-vite-default-ts-bench.tar.gz + destination: react-vite-default-ts-bench.tar.gz + lint: executor: class: large - name: sb_cypress_8_node_14 - parallelism: 2 + name: sb_node_16_classic steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: Running local registry - command: yarn local-registry --port 6000 --open - background: true - - run: - name: Wait for registry - command: yarn wait-on http://localhost:6000 - - run: - name: Run smoke tests - command: yarn test:e2e-framework angular_modern_inline_rendering --test-runner --docs-mode - no_output_timeout: 5m - cra-bench: + name: Lint + command: | + cd code + yarn lint + - report-workflow-on-failure + - cancel-workflow-on-failure + check: executor: - class: medium - name: sb_cypress_8_node_14 - working_directory: /tmp/storybook + class: xlarge + name: sb_node_16_classic steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: Running local registry - command: yarn local-registry --port 6000 --open - background: true - - run: - name: Wait for registry - command: yarn wait-on http://localhost:6000 + name: Check + command: | + yarn task --task check --start-from=auto --no-link --debug + git diff --exit-code + - report-workflow-on-failure + - cancel-workflow-on-failure + script-unit-tests: + executor: sb_node_16_browsers + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --verbose' + - attach_workspace: + at: . - run: - name: Run @storybook/bench on a CRA project + name: Test command: | - cd .. - npx create-react-app cra-bench - cd cra-bench - npx @storybook/bench@latest 'npx sb init' --label cra --extra-flags "--modern" - e2e-tests-pnp: + cd scripts + yarn test --coverage --ci + - store_test_results: + path: scripts/junit.xml + - report-workflow-on-failure + - cancel-workflow-on-failure + unit-tests: executor: - class: medium - name: sb_cypress_8_node_14 - working_directory: /tmp/storybook + class: xlarge + name: sb_node_16_browsers steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: Running local registry - command: yarn local-registry --port 6000 --open - background: true - - run: - name: Wait for registry - command: yarn wait-on http://localhost:6000 - - run: - name: run e2e tests cra - command: yarn test:e2e-framework --pnp cra - # - run: - # name: run e2e tests vue - # command: yarn test:e2e-framework --pnp sfcVue - - run: - name: prep artifacts - when: always - command: zip -r /tmp/storybook-e2e-testing-out.zip /tmp/storybook-e2e-testing - - store_artifacts: - path: /tmp/cypress-record - destination: cypress - - store_artifacts: - path: /tmp/storybook-e2e-testing-out.zip - destination: e2e - e2e-tests-examples: + name: Test + command: | + cd code + yarn test --coverage --ci --maxWorkers=6 + - store_test_results: + path: code/junit.xml + - persist_to_workspace: + root: . + paths: + - code/coverage + - report-workflow-on-failure + - cancel-workflow-on-failure + coverage: executor: class: small - name: sb_cypress_8_node_14 + name: sb_node_16_browsers steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: running example - command: yarn serve-storybooks - background: true - - run: - name: await running examples - command: yarn await-serve-storybooks + name: Upload coverage + command: | + cd code + yarn coverage + - report-workflow-on-failure + chromatic-internal-storybooks: + executor: + class: medium+ + name: sb_node_16_browsers + environment: + NODE_OPTIONS: --max_old_space_size=6144 + steps: + # switched this to the CircleCI helper to get the full git history for TurboSnap + - checkout + - attach_workspace: + at: . - run: - name: cypress run - command: yarn test:e2e-examples - - store_artifacts: - path: /tmp/cypress-record - destination: cypress - smoke-tests: + name: Running Chromatic + command: | + cd code + yarn storybook:ui:chromatic + yarn storybook:blocks:chromatic + - report-workflow-on-failure + - store_test_results: + path: test-results + ## new workflow + create-sandboxes: + parameters: + parallelism: + type: integer + default: 2 executor: class: medium - name: sb_node_14_browsers - environment: - # Disable ESLint when running smoke tests to improve perf + As of CRA 4.0.3, CRA kitchen sinks are throwing - # because of some ESLint warnings, related to: https://github.com/facebook/create-react-app/pull/10590 - DISABLE_ESLINT_PLUGIN: 'true' + name: sb_node_16_browsers + parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: Run react kitchen-sink (smoke test) - command: | - cd examples/cra-kitchen-sink - yarn storybook --smoke-test --quiet - - run: - name: Run react typescript kitchen-sink (smoke test) - command: | - cd examples/cra-ts-kitchen-sink - yarn storybook --smoke-test --quiet - - run: - name: Run vue kitchen-sink (smoke test) - command: | - cd examples/vue-kitchen-sink - yarn storybook --smoke-test --quiet - - run: - name: Run svelte kitchen-sink (smoke test) - command: | - cd examples/svelte-kitchen-sink - yarn storybook --smoke-test --quiet - - run: - name: Run angular-cli (smoke test) - command: | - cd examples/angular-cli - yarn storybook --smoke-test --quiet - - run: - name: Run ember-cli (smoke test) - command: | - cd examples/ember-cli - yarn storybook --smoke-test --quiet - - run: - name: Run official-storybook (smoke test) - command: | - cd examples/official-storybook - yarn storybook --smoke-test --quiet - - run: - name: Run preact kitchen-sink (smoke test) - command: | - cd examples/preact-kitchen-sink - yarn storybook --smoke-test --quiet - - run: - name: Run cra react15 (smoke test) - command: | - cd examples/cra-react15 - yarn storybook --smoke-test --quiet - lint: + name: Creating Sandboxes + command: yarn task --task sandbox --template $(yarn get-template << pipeline.parameters.workflow >> sandbox) --no-link --start-from=never --junit + - report-workflow-on-failure: + template: $(yarn get-template << pipeline.parameters.workflow >> sandbox) + - persist_to_workspace: + root: . + paths: + - sandbox + - store_test_results: + path: test-results + smoke-test-sandboxes: + parameters: + parallelism: + type: integer + default: 2 executor: - class: small - name: sb_node_14_classic + class: medium + name: sb_node_16_browsers + parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: Lint - command: yarn lint - unit-tests: - executor: sb_node_14_browsers + name: Smoke Testing Sandboxes + command: yarn task --task smoke-test --template $(yarn get-template << pipeline.parameters.workflow >> smoke-test) --no-link --start-from=never --junit + - report-workflow-on-failure: + template: $(yarn get-template << pipeline.parameters.workflow >> smoke-test) + - store_test_results: + path: test-results + build-sandboxes: + parameters: + parallelism: + type: integer + default: 2 + executor: + class: medium+ + name: sb_node_16_browsers + parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: Test - command: yarn test --coverage --runInBand --ci + name: Starting Event Collector + command: yarn ts-node ./event-log-collector.ts + working_directory: scripts + background: true + - run: + name: Building Sandboxes + command: yarn task --task build --template $(yarn get-template << pipeline.parameters.workflow >> build) --no-link --start-from=never --junit + - run: + name: Verifying Telemetry + command: yarn ts-node ./event-log-checker build $(yarn get-template << pipeline.parameters.workflow >> build) + working_directory: scripts + - report-workflow-on-failure: + template: $(yarn get-template << pipeline.parameters.workflow >> build) - store_test_results: - path: junit.xml + path: test-results - persist_to_workspace: root: . paths: - - coverage - coverage: + - sandbox/*/storybook-static + test-runner-sandboxes: + parameters: + parallelism: + type: integer + default: 2 executor: - class: small - name: sb_node_14_browsers + class: medium + name: sb_playwright + parallelism: << parameters.parallelism >> steps: - git-shallow-clone/checkout_advanced: clone_options: '--depth 1 --verbose' - attach_workspace: at: . - run: - name: Upload coverage - command: yarn coverage + name: Running Test Runner + command: yarn task --task test-runner --template $(yarn get-template << pipeline.parameters.workflow >> test-runner) --no-link --start-from=never --junit + - report-workflow-on-failure: + template: $(yarn get-template << pipeline.parameters.workflow >> test-runner) + - store_test_results: + path: test-results + chromatic-sandboxes: + parameters: + parallelism: + type: integer + default: 2 + executor: + class: medium + name: sb_node_16_browsers + parallelism: << parameters.parallelism >> + steps: + - checkout + - attach_workspace: + at: . + - run: + name: Running Chromatic + command: yarn task --task chromatic --template $(yarn get-template << pipeline.parameters.workflow >> chromatic) --no-link --start-from=never --junit + - report-workflow-on-failure: + template: $(yarn get-template << pipeline.parameters.workflow >> chromatic) + - store_test_results: + path: test-results + e2e-sandboxes: + parameters: + parallelism: + type: integer + default: 2 + executor: + class: medium + name: sb_playwright + parallelism: << parameters.parallelism >> + steps: + - git-shallow-clone/checkout_advanced: + clone_options: '--depth 1 --verbose' + - attach_workspace: + at: . + - run: + name: Running E2E Tests + command: yarn task --task e2e-tests --template $(yarn get-template << pipeline.parameters.workflow >> e2e-tests) --no-link --start-from=never --junit + - report-workflow-on-failure: + template: $(yarn get-template << pipeline.parameters.workflow >> e2e-tests) + - store_test_results: + path: test-results + - store_artifacts: # this is where playwright puts more complex stuff + path: code/playwright-results/ + destination: playwright workflows: - test: + ci: + when: + and: + - equal: [api, << pipeline.trigger_source >>] + - equal: [ci, << pipeline.parameters.workflow >>] jobs: + - pretty-docs - build - lint: requires: - build - - examples: + - check: + requires: + - build + - unit-tests: + requires: + - build + - script-unit-tests: requires: - build - - e2e-tests-examples: + - create-sandboxes: + requires: + - build + - build-sandboxes: + requires: + - create-sandboxes + - test-runner-sandboxes: + requires: + - build-sandboxes + - chromatic-sandboxes: + requires: + - build-sandboxes + - e2e-sandboxes: + requires: + - build-sandboxes + pr: + when: + equal: [pr, << pipeline.parameters.workflow >>] + jobs: + - pretty-docs + - build + - lint: requires: - - examples - - smoke-tests: + - build + - check: requires: - build - unit-tests: requires: - build + - script-unit-tests: + requires: + - build + - chromatic-internal-storybooks: + requires: + - build - coverage: requires: - unit-tests - - chromatic: + - cra-bench: + requires: + - build + - react-vite-bench: + requires: + - build + - create-sandboxes: + parallelism: 9 + requires: + - build + - build-sandboxes: + parallelism: 9 + requires: + - create-sandboxes + - test-runner-sandboxes: + parallelism: 9 requires: - - examples - - publish: + - build-sandboxes + - chromatic-sandboxes: + parallelism: 9 + requires: + - build-sandboxes + - e2e-sandboxes: + parallelism: 9 + requires: + - build-sandboxes + merged: + when: + equal: [merged, << pipeline.parameters.workflow >>] + jobs: + - pretty-docs + - build + - lint: requires: - build - - e2e-tests-extended: + - check: requires: - - publish - - e2e-tests-core: + - build + - unit-tests: requires: - - publish - - e2e-tests-sb-docs: + - build + - script-unit-tests: requires: - - publish - - e2e-tests-pnp: + - build + - chromatic-internal-storybooks: + requires: + - build + - coverage: requires: - - publish + - unit-tests - cra-bench: requires: - - publish + - build + - react-vite-bench: + requires: + - build + - create-sandboxes: + parallelism: 16 + requires: + - build + - build-sandboxes: + parallelism: 16 + requires: + - create-sandboxes + - test-runner-sandboxes: + parallelism: 16 + requires: + - build-sandboxes + - chromatic-sandboxes: + parallelism: 16 + requires: + - build-sandboxes + - e2e-sandboxes: + parallelism: 16 + requires: + - build-sandboxes + daily: + when: + equal: [daily, << pipeline.parameters.workflow >>] + jobs: + - build + - create-sandboxes: + parallelism: 28 + requires: + - build + # - smoke-test-sandboxes: # disabled for now + # requires: + # - create-sandboxes + - build-sandboxes: + parallelism: 28 + requires: + - create-sandboxes + - test-runner-sandboxes: + parallelism: 28 + requires: + - build-sandboxes + - chromatic-sandboxes: + parallelism: 28 + requires: + - build-sandboxes + - e2e-sandboxes: + parallelism: 28 + requires: + - build-sandboxes diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 262232534b26..000000000000 --- a/.eslintignore +++ /dev/null @@ -1,33 +0,0 @@ -dist -lib/**/dll -build -coverage -node_modules -docs/public -storybook-static -built-storybooks -lib/cli/test -lib/manager-webpack4/prebuilt -lib/manager-webpack5/prebuilt -lib/core-server/prebuilt -lib/codemod/src/transforms/__testfixtures__ -scripts/storage -scripts/repros-generator -*.bundle.js -*.js.map -*.d.ts -examples/ember-cli/.storybook/preview-head.html -examples/official-storybook/tests/addon-jest.test.js -examples/cra-ts-kitchen-sink/*.json -examples/cra-ts-kitchen-sink/public/* -examples/cra-ts-essentials/*.json -examples/cra-ts-essentials/public/* -ember-output -.yarn -!.remarkrc.js -!.babelrc.js -!.eslintrc.js -!.eslintrc-markdown.js -!.jest.config.js -!.storybook - diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5ee707ce6e5d..000000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,95 +0,0 @@ -module.exports = { - root: true, - extends: ['@storybook/eslint-config-storybook', 'plugin:storybook/recommended'], - rules: { - '@typescript-eslint/ban-ts-comment': 'warn', - 'jest/no-standalone-expect': [ - 'error', - { additionalTestBlockFunctions: ['it.skipWindows', 'it.onWindows'] }, - ], - }, - overrides: [ - { - // this package depends on a lot of peerDependencies we don't want to specify, because npm would install them - files: ['**/addons/docs/**/*'], - rules: { - 'import/no-extraneous-dependencies': 'off', - }, - }, - { - // this package uses pre-bundling, dependencies will be bundled, and will be in devDepenencies - files: [ - '**/lib/theming/**/*', - '**/lib/router/**/*', - '**/lib/ui/**/*', - '**/lib/components/**/*', - ], - rules: { - 'import/no-extraneous-dependencies': ['error', { bundledDependencies: false }], - }, - }, - { - files: [ - '**/__tests__/**', - 'scripts/**', - '**/__testfixtures__/**', - '**/*.test.*', - '**/*.stories.*', - '**/storyshots/**/stories/**', - ], - rules: { - '@typescript-eslint/no-empty-function': 'off', - 'import/no-extraneous-dependencies': 'off', - }, - }, - { - files: ['**/__testfixtures__/**'], - rules: { - 'react/forbid-prop-types': 'off', - 'react/no-unused-prop-types': 'off', - 'react/require-default-props': 'off', - }, - }, - { files: '**/.storybook/config.js', rules: { 'global-require': 'off' } }, - { files: 'cypress/**', rules: { 'jest/expect-expect': 'off' } }, - { - files: ['**/*.stories.*'], - rules: { - 'no-console': 'off', - }, - }, - { - files: ['**/*.tsx', '**/*.ts'], - rules: { - 'react/require-default-props': 'off', - 'react/prop-types': 'off', // we should use types - 'react/forbid-prop-types': 'off', // we should use types - 'no-dupe-class-members': 'off', // this is called overloads in typescript - 'react/no-unused-prop-types': 'off', // we should use types - 'react/default-props-match-prop-types': 'off', // we should use types - 'import/no-named-as-default': 'warn', - 'import/no-named-as-default-member': 'warn', - 'react/destructuring-assignment': 'warn', - - // This warns about importing interfaces and types in a normal import, it's arguably better to import with the `type` prefix separate from the runtime imports, - // I leave this as a warning right now because we haven't really decided yet, and the codebase is riddled with errors if I set to 'error'. - // It IS set to 'error' for JS files. - 'import/named': 'warn', - }, - }, - { - files: ['**/*.d.ts'], - rules: { - 'vars-on-top': 'off', - 'no-var': 'off', // this is how typescript works - 'spaced-comment': 'off', - }, - }, - { - files: ['**/mithril/**/*'], - rules: { - 'react/no-unknown-property': 'off', // Need to deactivate otherwise eslint replaces some unknown properties with React ones - }, - }, - ], -}; diff --git a/.gitattributes b/.gitattributes index fb467cb53219..5b3c7a66024e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -/.yarn/** linguist-generated +/**/.yarn/** linguist-generated diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 3381dd30e860..000000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Bug report 🐞 -about: Something is broken and you have a reliable reproduction? Let us know here. For questions, please use "Question" below. -labels: needs triage, bug ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Please create a reproduction by running `npx sb@next repro` and following the instructions. Read our [documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce) to learn more about creating reproductions. -Paste your repository and deployed reproduction here. We prioritize issues with reproductions over those without. - -**System** -Please paste the results of `npx sb@next info` here. - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000000..a9deca3b5f4f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,40 @@ +name: Bug report 🐞 +description: >- + Something is broken and you have a reliable reproduction? Let us know here. + For questions, please use "Question" below. +title: '[Bug]: ' +labels: + - needs triage + - bug +body: + - type: textarea + id: description + attributes: + label: Describe the bug + description: A clear and concise description of what the bug is + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: To Reproduce + description: >- + Please create a reproduction by running `npx sb@next repro` and + following the instructions. Read our + [documentation](https://storybook.js.org/docs/react/contribute/how-to-reproduce) + to learn more about creating reproductions. + placeholder: >- + Paste your repository and deployed reproduction here. We prioritize + issues with reproductions over those without. + render: shell + - type: textarea + id: system + attributes: + label: System + description: Please paste the results of `npx sb@next info` here. + render: shell + - type: textarea + id: context + attributes: + label: Additional context + description: Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 90c0ecccd1b2..000000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request 💡 -about: Suggest an idea for this project -labels: needs triage, feature request ---- - -**Is your feature request related to a problem? Please describe** -A clear and concise description of the problem. E.g. I'm always frustrated when [...] - -**Describe the solution you'd like** -What would you like to see added to Storybook to solve problem? - -**Describe alternatives you've considered** -Any alternative solutions or features you've considered. - -**Are you able to assist to bring the feature to reality?** -no | yes, I can... - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000000..206ddf06f62a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,40 @@ +name: Feature request 💡 +description: Suggest an idea for this project +title: '[Feature Request]:' +labels: + - needs triage + - feature request +body: + - type: textarea + id: problem + attributes: + label: Is your feature request related to a problem? Please describe + description: >- + A clear and concise description of the problem. E.g. I'm always + frustrated when [...] + - type: textarea + id: describe + attributes: + label: Describe the solution you'd like + description: What would you like to see added to Storybook to solve problem? + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: Any alternative solutions or features you've considered. + - type: dropdown + id: help + attributes: + label: Are you able to assist to bring the feature to reality? + options: + - 'no' + - yes, I can + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. diff --git a/.github/autolabeler.yml b/.github/autolabeler.yml deleted file mode 100644 index 79cae78e118e..000000000000 --- a/.github/autolabeler.yml +++ /dev/null @@ -1,25 +0,0 @@ -'addon: a11y': ["addons/a11y/**"] -'addon: actions': ["addons/actions/**"] -'addon: backgrounds': ["addons/backgrounds/**"] -'addon: events ': ["addons/events/**"] -'addon: graphql ': ["addons/graphql/**"] -'addon: info': ["addons/info/**"] -'addon: jest': ["addons/jest/**"] -'addon: knobs': ["addons/knobs/**"] -'addon: links': ["addons/links/**"] -'addon: notes': ["addons/notes/**"] -'addon: options': ["addons/options/**"] -'addon: storyshots': ["addons/storyshots/**"] -'addon: viewport': ["addons/viewport/**"] -'app: angular': ["app/angular/**"] -'app: preact': ["app/preact/**"] -'app: rax': ["app/rax/**"] -'app: react': ["app/react/**"] -'app: vue': ["app/vue/**"] -'app: svelte': ["app/svelte/**"] -'app: mithril': ["app/mithril/**"] -'babel / webpack': ["webpack", "babel"] -'cli': ["lib/cli/**"] -'compatibility with other tools': [] -'documentation': ["docs", "*.md"] -'ui': ["lib/ui"] diff --git a/.github/workflows/cron-weekly.yml b/.github/workflows/cron-weekly.yml index 7b056c6148fc..8dafd4e99c27 100644 --- a/.github/workflows/cron-weekly.yml +++ b/.github/workflows/cron-weekly.yml @@ -2,13 +2,13 @@ name: Markdown Links Check # runs every monday at 9 am on: schedule: - - cron: "0 9 * * 1" + - cron: '0 9 * * 1' jobs: check-links: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: gaurav-nelson/github-action-markdown-link-check@v1 # checks all markdown files from important folders including all subfolders with: diff --git a/.github/workflows/danger-js.yml b/.github/workflows/danger-js.yml index ad24e2a15920..8d9701af1980 100644 --- a/.github/workflows/danger-js.yml +++ b/.github/workflows/danger-js.yml @@ -8,10 +8,10 @@ jobs: name: Danger JS runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: - node-version: '14' - - uses: actions/checkout@master + node-version: '16' + - uses: actions/checkout@v3 - name: Danger JS uses: danger/danger-js@10.9.0 env: diff --git a/.github/workflows/generate-repros-next.yml b/.github/workflows/generate-repros-next.yml new file mode 100644 index 000000000000..8d84278b2eeb --- /dev/null +++ b/.github/workflows/generate-repros-next.yml @@ -0,0 +1,42 @@ +name: Generate and push repros to the next branch + +on: + schedule: + - cron: '2 2 */1 * *' + workflow_dispatch: + # To remove when the branch will be merged + push: + branches: + - vite-frameworks-xyz + +jobs: + generate: + runs-on: ubuntu-latest + env: + YARN_ENABLE_IMMUTABLE_INSTALLS: false + CLEANUP_REPRO_NODE_MODULES: true + steps: + - uses: actions/setup-node@v3 + with: + node-version: 16 + - uses: actions/checkout@v3 + - name: Setup git user + run: | + git config --global user.name "Storybook Bot" + git config --global user.email "bot@storybook.js.org" + - name: Install dependencies + run: node ./scripts/check-dependencies.js + - name: Compile Storybook libraries + run: yarn task --task publish --start-from=auto --no-link + - name: Running local registry + run: yarn local-registry --open & + working-directory: ./code + - name: Wait for registry + run: yarn wait-on http://localhost:6001 + working-directory: ./code + - name: Generate repros + run: yarn generate-repros-next --local-registry + working-directory: ./code + - name: Publish repros to GitHub + run: yarn publish-repros --remote=https://storybook-bot:${{ secrets.PAT_STORYBOOK_BOT}}@github.com/storybookjs/repro-templates-temp.git --push + working-directory: ./code diff --git a/.github/workflows/generate-repros.yml b/.github/workflows/generate-repros.yml index eec4352b8287..4981d8e76da1 100644 --- a/.github/workflows/generate-repros.yml +++ b/.github/workflows/generate-repros.yml @@ -4,7 +4,7 @@ on: schedule: - cron: '2 2 */1 * *' workflow_dispatch: -# To remove when the branch will be merged + # To remove when the branch will be merged push: branches: - generate-repros @@ -15,11 +15,16 @@ jobs: env: YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - - uses: actions/checkout@v2 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - uses: actions/checkout@v3 - name: Setup git user run: | git config --global user.name "Storybook Bot" git config --global user.email "bot@storybook.js.org" + - name: Change directory + run: cd code - name: Install dependencies run: yarn install - name: Generate repros with Latest Storybook CLI diff --git a/.github/workflows/handle-release-branches.yml b/.github/workflows/handle-release-branches.yml index 069b3390d2f6..e1eb20e97adb 100644 --- a/.github/workflows/handle-release-branches.yml +++ b/.github/workflows/handle-release-branches.yml @@ -23,7 +23,7 @@ jobs: if: ${{ needs.branch-checks.outputs.is-latest-branch == 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - run: curl -X POST "https://api.netlify.com/build_hooks/${{ secrets.FRONTPAGE_HOOK }}" @@ -32,7 +32,7 @@ jobs: if: ${{ needs.branch-checks.outputs.is-next-branch == 'true' || needs.branch-checks.outputs.is-release-branch == 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: ref: next path: next @@ -40,7 +40,7 @@ jobs: - id: next-version uses: notiz-dev/github-action-json-property@release with: - path: ${{ github.workspace }}/next/package.json + path: ${{ github.workspace }}/next/code/package.json prop_path: version - run: | @@ -54,7 +54,7 @@ jobs: if: ${{ needs.branch-checks.outputs.is-next-branch == 'true' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/.github/workflows/linear-export.yml b/.github/workflows/linear-export.yml index 27402724a7ea..a5739657941f 100644 --- a/.github/workflows/linear-export.yml +++ b/.github/workflows/linear-export.yml @@ -8,7 +8,7 @@ on: jobs: trigger: - if: github.event.label.name == 'linear' + if: github.event.label.name == 'linear-ghaction' name: Export to linear runs-on: ubuntu-latest steps: diff --git a/.github/workflows/markdown-link-check-config.json b/.github/workflows/markdown-link-check-config.json index 8ae064afbbe4..6cdc0a785121 100644 --- a/.github/workflows/markdown-link-check-config.json +++ b/.github/workflows/markdown-link-check-config.json @@ -35,4 +35,4 @@ } ], "aliveStatusCodes": [429, 200] -} \ No newline at end of file +} diff --git a/.github/workflows/tests-unit.yml b/.github/workflows/tests-unit.yml index 07d9a0f98847..038f0bc08730 100644 --- a/.github/workflows/tests-unit.yml +++ b/.github/workflows/tests-unit.yml @@ -5,17 +5,16 @@ on: branches: - next pull_request: - types: [opened, reopened, labeled, synchronize] + types: [opened, synchronize, reopened] jobs: build: name: Core Unit Tests node-${{ matrix.node_version }}, ${{ matrix.os }} - if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'ci:matrix') strategy: fail-fast: false matrix: os: [ubuntu-latest] - node_version: [12, 14, 16] + node_version: [16] include: - os: macos-latest node_version: 16 @@ -23,16 +22,12 @@ jobs: node_version: 16 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set node version to ${{ matrix.node_version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node_version }} - cache: yarn - - name: install, bootstrap - run: | - yarn install --immutable - yarn bootstrap --core + - name: install and compile + run: yarn task --task compile --start-from=auto --no-link - name: test - run: | - yarn test --runInBand --ci + run: yarn test --runInBand --ci diff --git a/.github/workflows/trigger-circle-ci-workflow.yml b/.github/workflows/trigger-circle-ci-workflow.yml index 0470478d33fe..3157beb452d4 100644 --- a/.github/workflows/trigger-circle-ci-workflow.yml +++ b/.github/workflows/trigger-circle-ci-workflow.yml @@ -1,21 +1,109 @@ name: Trigger CircleCI workflow on: - pull_request: - types: [labeled] + # Use pull_request_target, as we don't need to check out the actual code of the fork in this script. + # And this is the only way to trigger the Circle CI API on forks as well. + pull_request_target: + types: [opened, synchronize, labeled, unlabeled, reopened, converted_to_draft, ready_for_review] + push: + branches: + - next jobs: - trigger: - if: github.event.label.name == 'run e2e extended test suite' && github.event.pull_request.head.repo.fork == false - name: Run workflow with all e2e tests + get-branch: runs-on: ubuntu-latest steps: - - name: Make request to CircleCI + - id: get-branch + env: + # Stored as environment variable to prevent script injection + REF_NAME: ${{ github.ref_name }} + PR_REF_NAME: ${{ github.event.pull_request.head.ref }} + run: | + if [ "${{ github.event.pull_request.head.repo.fork }}" = "true" ]; then + export BRANCH=pull/${{ github.event.pull_request.number }}/head + elif [ "${{ github.event_name }}" = "push" ]; then + export BRANCH="$REF_NAME" + else + export BRANCH="$PR_REF_NAME" + fi + echo "$BRANCH" + echo "branch=$BRANCH" >> $GITHUB_ENV + outputs: + branch: ${{ env.branch }} + + trigger-ci-tests: + runs-on: ubuntu-latest + needs: get-branch + if: github.event_name == 'pull_request_target' && github.event.pull_request.draft == true && !contains(github.event.pull_request.labels.*.name, 'ci:pr') && !contains(github.event.pull_request.labels.*.name, 'ci:merged') && !contains(github.event.pull_request.labels.*.name, 'ci:daily') + steps: + - name: Trigger draft PR tests + run: > + curl -X POST --location "https://circleci.com/api/v2/project/gh/storybookjs/storybook/pipeline" \ + -H "Content-Type: application/json" \ + -H "Circle-Token: $CIRCLE_CI_TOKEN" \ + -d '{ + "branch": "'"$BRANCH"'", + "parameters": { + "workflow": "ci" + } + }' + env: + CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }} + BRANCH: ${{ needs.get-branch.outputs.branch }} + trigger-pr-tests: + runs-on: ubuntu-latest + needs: get-branch + if: github.event_name == 'pull_request_target' && ((github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ci:pr')) && !contains(github.event.pull_request.labels.*.name, 'ci:merged') && !contains(github.event.pull_request.labels.*.name, 'ci:daily')) + steps: + - name: Trigger PR tests + run: > + curl -X POST --location "https://circleci.com/api/v2/project/gh/storybookjs/storybook/pipeline" \ + -H "Content-Type: application/json" \ + -H "Circle-Token: $CIRCLE_CI_TOKEN" \ + -d '{ + "branch": "'"$BRANCH"'", + "parameters": { + "workflow": "pr" + } + }' + env: + CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }} + BRANCH: ${{ needs.get-branch.outputs.branch }} + trigger-merged-tests: + runs-on: ubuntu-latest + needs: get-branch + if: github.event_name == 'push' || (contains(github.event.pull_request.labels.*.name, 'ci:merged') && !contains(github.event.pull_request.labels.*.name, 'ci:daily')) + steps: + - name: Trigger merged tests + run: > + curl -X POST --location "https://circleci.com/api/v2/project/gh/storybookjs/storybook/pipeline" \ + -H "Content-Type: application/json" \ + -H "Circle-Token: $CIRCLE_CI_TOKEN" \ + -d '{ + "branch": "'"$BRANCH"'", + "parameters": { + "workflow": "merged" + } + }' + env: + CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }} + BRANCH: ${{ needs.get-branch.outputs.branch }} + trigger-daily-tests: + runs-on: ubuntu-latest + needs: get-branch + if: github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:daily') + steps: + - name: Trigger the daily tests run: > - curl --request POST - --url https://circleci.com/api/v2/project/gh/storybookjs/storybook/pipeline - --header 'Circle-Token: '"$CIRCLE_CI_TOKEN"' ' - --header 'content-type: application/json' - --data '{"branch":"${{ github.event.pull_request.head.ref }}"}' + curl -X POST --location "https://circleci.com/api/v2/project/gh/storybookjs/storybook/pipeline" \ + -H "Content-Type: application/json" \ + -H "Circle-Token: $CIRCLE_CI_TOKEN" \ + -d '{ + "branch": "'"$BRANCH"'", + "parameters": { + "workflow": "daily" + } + }' env: CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }} + BRANCH: ${{ needs.get-branch.outputs.branch }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index c0b4b25e9d31..e36944229f1c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,39 +3,17 @@ node_modules .idea *.iml *.sw* -npm-shrinkwrap.json +!.swcrc dist -.tern-port *.DS_Store .cache -.parcel-cache -coverage/ -*.lerna_backup -build -packages/examples/automated-* -/**/LICENSE -docs/public -packs/*.tgz -package-lock.json -.nvmrc -storybook-static -integration/__image_snapshots__/__diff_output__ -.jest-test-results.json -/examples/cra-kitchen-sink/src/__image_snapshots__/__diff_output__/ -lib/*.jar -lib/**/dll -/false -/addons/docs/common/config-* -built-storybooks -cypress/videos -cypress/screenshots -examples/ember-cli/ember-output -.verdaccio-cache -tsconfig.tsbuildinfo -lib/manager-webpack4/prebuilt -lib/manager-webpack5/prebuilt -examples/angular-cli/addon-jest.testresults.json junit.xml +test-results +/repros +/sandbox +/bench +.verdaccio-cache +.next # Yarn stuff /**/.yarn/* @@ -44,3 +22,8 @@ junit.xml !/**/.yarn/sdks !/**/.yarn/versions /**/.pnp.* +!/node_modules + +# test-storybooks +test-storybooks/ember-cli/ember-output +test-storybooks/angular-cli/addon-jest.testresults.json diff --git a/.gitpod.yml b/.gitpod.yml index ed8c18611b4a..46120fd36e10 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -3,7 +3,6 @@ # and commit this file to your remote git repository to share the goodness with others. tasks: - - init: yarn - command: yarn bootstrap --core - + - name: Bootstrap + init: ./bootstrap.sh --core diff --git a/.ignore b/.ignore new file mode 100644 index 000000000000..df5f841665ca --- /dev/null +++ b/.ignore @@ -0,0 +1 @@ +!/sandbox \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index d033feea7ad5..000000000000 --- a/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "printWidth": 100, - "tabWidth": 2, - "bracketSpacing": true, - "trailingComma": "es5", - "singleQuote": true, - "arrowParens": "always" -} diff --git a/.remarkrc.js b/.remarkrc.js deleted file mode 100644 index f8250d11d53a..000000000000 --- a/.remarkrc.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -module.exports = require('@storybook/linter-config/remark.config'); diff --git a/.teamcity/patches/buildTypes/TestWorkflow.kts b/.teamcity/patches/buildTypes/TestWorkflow.kts deleted file mode 100644 index 90e30e6c0d0b..000000000000 --- a/.teamcity/patches/buildTypes/TestWorkflow.kts +++ /dev/null @@ -1,31 +0,0 @@ -package patches.buildTypes - -import jetbrains.buildServer.configs.kotlin.v2019_2.* -import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.VcsTrigger -import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs -import jetbrains.buildServer.configs.kotlin.v2019_2.ui.* - -/* -This patch script was generated by TeamCity on settings change in UI. -To apply the patch, change the buildType with id = 'TestWorkflow' -accordingly, and delete the patch script. -*/ -changeBuildType(RelativeId("TestWorkflow")) { - triggers { - val trigger1 = find { - vcs { - quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_DEFAULT - triggerRules = "-:.teamcity/**" - branchFilter = """ - +: - +:next - +:main - +:pull/* - """.trimIndent() - } - } - trigger1.apply { - quietPeriodMode = VcsTrigger.QuietPeriodMode.DO_NOT_USE - } - } -} diff --git a/.teamcity/pom.xml b/.teamcity/pom.xml deleted file mode 100644 index b98e212b6d2d..000000000000 --- a/.teamcity/pom.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - 4.0.0 - Hosted_Root Config DSL Script - Hosted_Root - Hosted_Root_dsl - 1.0-SNAPSHOT - - - org.jetbrains.teamcity - configs-dsl-kotlin-parent - 1.0-SNAPSHOT - - - - - jetbrains-all - https://download.jetbrains.com/teamcity-repository - - true - - - - teamcity-server - https://storybook.beta.teamcity.com/app/dsl-plugins-repository - - true - - - - - - - JetBrains - https://download.jetbrains.com/teamcity-repository - - - - - ${basedir} - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - - - compile - process-sources - - compile - - - - test-compile - process-test-sources - - test-compile - - - - - - org.jetbrains.teamcity - teamcity-configs-maven-plugin - ${teamcity.dsl.version} - - kotlin - target/generated-configs - - - - - - - - org.jetbrains.teamcity - configs-dsl-kotlin - ${teamcity.dsl.version} - compile - - - org.jetbrains.teamcity - configs-dsl-kotlin-plugins - 1.0-SNAPSHOT - pom - compile - - - org.jetbrains.kotlin - kotlin-stdlib-jdk8 - ${kotlin.version} - compile - - - org.jetbrains.kotlin - kotlin-script-runtime - ${kotlin.version} - compile - - - - 2019.2.2-SNAPSHOT - - \ No newline at end of file diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts deleted file mode 100644 index f99734ae1ce8..000000000000 --- a/.teamcity/settings.kts +++ /dev/null @@ -1,496 +0,0 @@ -import jetbrains.buildServer.configs.kotlin.v2019_2.* -import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.PullRequests -import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.commitStatusPublisher -import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.pullRequests -import jetbrains.buildServer.configs.kotlin.v2019_2.buildFeatures.swabra -import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.ScriptBuildStep -import jetbrains.buildServer.configs.kotlin.v2019_2.buildSteps.script -import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.BuildFailureOnMetric -import jetbrains.buildServer.configs.kotlin.v2019_2.failureConditions.failOnMetricChange -import jetbrains.buildServer.configs.kotlin.v2019_2.projectFeatures.buildReportTab -import jetbrains.buildServer.configs.kotlin.v2019_2.projectFeatures.githubConnection -import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.VcsTrigger -import jetbrains.buildServer.configs.kotlin.v2019_2.triggers.vcs - -/* -The settings script is an entry point for defining a TeamCity -project hierarchy. The script should contain a single call to the -project() function with a Project instance or an init function as -an argument. - -VcsRoots, BuildTypes, Templates, and subprojects can be -registered inside the project using the vcsRoot(), buildType(), -template(), and subProject() methods respectively. - -To debug settings scripts in command-line, run the - - mvnDebug org.jetbrains.teamcity:teamcity-configs-maven-plugin:generate - -command and attach your debugger to the port 8000. - -To debug in IntelliJ Idea, open the 'Maven Projects' tool window (View --> Tool Windows -> Maven Projects), find the generate task node -(Plugins -> teamcity-configs -> teamcity-configs:generate), the -'Debug' option is available in the context menu for the task. -*/ - -version = "2019.2" - -project { - template(Common) - defaultTemplate = Common - - buildType(TestWorkflow) - - buildType(Build) - buildType(E2E) - buildType(SmokeTests) - buildType(Test) - buildType(Coverage) - - subProject(ExamplesProject) - - buildTypesOrderIds = arrayListOf( - RelativeId("TestWorkflow"), - RelativeId("Build"), - RelativeId("E2E"), - RelativeId("SmokeTests"), - RelativeId("Test"), - RelativeId("Coverage") - ) - - - features { - githubConnection { - id = "PROJECT_EXT_6" - displayName = "GitHub.com" - clientId = "800d730c725f771d6d2a" - clientSecret = "credentialsJSON:d1a5af15-1200-46c6-b0f1-f35bd466d909" - } - buildReportTab { - id = "PROJECT_EXT_8" - title = "Official" - startPage = "built-storybooks.tar.gz!official-storybook/index.html" - } - } -} - -object Common: Template({ - name = "Common" - - vcs { - root(DslContext.settingsRoot) - checkoutMode = CheckoutMode.ON_AGENT - checkoutDir = "storybook/%teamcity.build.branch%" - } - - features { - commitStatusPublisher { - id = "Commit status publisher" - publisher = github { - githubUrl = "https://api.github.com" - authType = personalToken { - token = "credentialsJSON:5273320e-14be-4317-951e-a54c4dcca35d" - } - } - param("github_oauth_user", "Hypnosphi") - } - swabra { - id = "swabra" - verbose = true - paths = """ - -:.cache - -:node_modules - -:**/node_modules - """.trimIndent() - } - pullRequests { - id = "Pull requests" - provider = github { - authType = vcsRoot() - filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY - } - } - } -}) - -object Build : BuildType({ - name = "Build" - - steps { - script { - scriptContent = """ - #!/bin/bash - set -e -x - - yarn install --immutable - yarn bootstrap --core - """.trimIndent() - dockerImage = "node:12" - dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux - } - } - - artifactRules = """ - +:**/dist/** => dist.tar.gz - +:**/dll/** => dist.tar.gz - -:**/node_modules/** => dist.tar.gz - """.trimIndent() -}) - -object ExamplesProject : Project({ - name = "Examples" - - template(ExamplesTemplate) - - buildType(Examples1) - buildType(Examples2) - buildType(Examples3) - buildType(Examples4) - buildType(Examples5) - buildType(AggregateExamples) -}) - -object ExamplesTemplate : Template({ - name = "Examples Template" - - dependencies { - dependency(Build) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "dist.tar.gz!** => ." - } - } - } - - steps { - script { - scriptContent = """ - #!/bin/bash - set -e -x - - yarn install - rm -rf built-storybooks - mkdir -p built-storybooks - - yarn build-storybooks --all - """.trimIndent() - dockerImage = "buildkite/puppeteer" - dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux - } - } - - artifactRules = "built-storybooks => built-storybooks.tar.gz" - - params { - param("env.CIRCLE_NODE_TOTAL", "5") - } -}) - -object Examples1 : BuildType({ - name = "Examples 1" - templates = listOf(ExamplesTemplate) - - params { - param("env.CIRCLE_NODE_INDEX", "0") - } - - disableSettings("Commit status publisher") -}) - -object Examples2 : BuildType({ - name = "Examples 2" - templates = listOf(ExamplesTemplate) - - params { - param("env.CIRCLE_NODE_INDEX", "1") - } - - disableSettings("Commit status publisher") -}) - -object Examples3 : BuildType({ - name = "Examples 3" - templates = listOf(ExamplesTemplate) - - params { - param("env.CIRCLE_NODE_INDEX", "2") - } - - disableSettings("Commit status publisher") -}) - -object Examples4 : BuildType({ - name = "Examples 4" - templates = listOf(ExamplesTemplate) - - params { - param("env.CIRCLE_NODE_INDEX", "3") - } - - disableSettings("Commit status publisher") -}) - -object Examples5 : BuildType({ - name = "Examples 5" - templates = listOf(ExamplesTemplate) - - params { - param("env.CIRCLE_NODE_INDEX", "4") - } - - disableSettings("Commit status publisher") -}) - -object AggregateExamples : BuildType({ - name = "Aggregate Examples" - - dependencies { - dependency(Examples1) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "built-storybooks.tar.gz!** => built-storybooks" - } - } - dependency(Examples2) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "built-storybooks.tar.gz!** => built-storybooks" - } - } - dependency(Examples3) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "built-storybooks.tar.gz!** => built-storybooks" - } - } - dependency(Examples4) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "built-storybooks.tar.gz!** => built-storybooks" - } - } - dependency(Examples5) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "built-storybooks.tar.gz!** => built-storybooks" - } - } - } - - artifactRules = "built-storybooks => built-storybooks.tar.gz" -}) - -object E2E : BuildType({ - name = "E2E" - - dependencies { - dependency(AggregateExamples) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "built-storybooks.tar.gz!** => built-storybooks" - } - } - } - - steps { - script { - scriptContent = """ - #!/bin/bash - set -e -x - - yarn install --immutable - yarn cypress install - yarn serve-storybooks & - yarn await-serve-storybooks - yarn cypress run --reporter teamcity || : - yarn ts-node --transpile-only cypress/report-teamcity-metadata.ts || : - """.trimIndent() - dockerImage = "cypress/base:12.19.0" - dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux - } - } - - artifactRules = """ - cypress/screenshots => screenshots.tar.gz - cypress/videos => videos.tar.gz - """.trimIndent() - - failureConditions { - failOnMetricChange { - metric = BuildFailureOnMetric.MetricType.TEST_COUNT - units = BuildFailureOnMetric.MetricUnit.DEFAULT_UNIT - comparison = BuildFailureOnMetric.MetricComparison.LESS - compareTo = value() - } - } -}) - -object SmokeTests : BuildType({ - name = "Smoke Tests" - - dependencies { - dependency(Build) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "dist.tar.gz!** => ." - } - } - } - - params { - // Disable ESLint when running smoke tests to improve perf and as of CRA 4.0.3, CRA kitchen sinks are throwing - // because of some ESLint warnings, related to: https://github.com/facebook/create-react-app/pull/10590 - param("env.DISABLE_ESLINT_PLUGIN", "true") - } - - steps { - script { - scriptContent = """ - #!/bin/bash - set -e -x - - yarn install --immutable - - cd examples/cra-kitchen-sink - yarn storybook --smoke-test --quiet - - cd ../cra-ts-kitchen-sink - yarn storybook --smoke-test --quiet - - cd ../vue-kitchen-sink - yarn storybook --smoke-test --quiet - - cd ../svelte-kitchen-sink - yarn storybook --smoke-test --quiet - - cd ../angular-cli - yarn storybook --smoke-test --quiet - - cd ../ember-cli - yarn storybook --smoke-test --quiet - - cd ../official-storybook - yarn storybook --smoke-test --quiet - - cd ../preact-kitchen-sink - yarn storybook --smoke-test --quiet - - cd ../cra-react15 - yarn storybook --smoke-test --quiet - """.trimIndent() - dockerImage = "node:12" - dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux - } - } -}) - -object Test : BuildType({ - name = "Test" - - dependencies { - dependency(Build) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "dist.tar.gz!** => ." - } - } - } - - steps { - script { - scriptContent = """ - #!/bin/bash - set -e -x - - yarn install - - # TODO remove after merging - mkdir temp-jest-teamcity - cd temp-jest-teamcity - yarn init -y - touch yarn.lock - yarn add -D jest-teamcity - cd .. - - yarn jest --coverage -w 2 --reporters=${'$'}PWD/temp-jest-teamcity/node_modules/jest-teamcity - """.trimIndent() - dockerImage = "node:12" - dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux - } - } - - artifactRules = "coverage => coverage.tar.gz" -}) - -object Coverage : BuildType({ - name = "Coverage" - - dependencies { - dependency(Test) { - snapshot { - onDependencyFailure = FailureAction.CANCEL - } - artifacts { - artifactRules = "coverage.tar.gz!** => coverage" - } - } - } - - steps { - script { - scriptContent = """ - #!/bin/bash - set -e -x - - yarn install - yarn coverage - """.trimIndent() - dockerImage = "node:12" - dockerImagePlatform = ScriptBuildStep.ImagePlatform.Linux - } - } -}) - -object TestWorkflow : BuildType({ - name = "Test Workflow" - type = Type.COMPOSITE - maxRunningBuilds = 2 - - dependencies { - snapshot(E2E) {} - snapshot(SmokeTests) {} - snapshot(Coverage) {} - } - - triggers { - vcs { - quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_DEFAULT - triggerRules = "-:.teamcity/**" - branchFilter = """ - +: - +:next - +:main - +:pull/* - """.trimIndent() - } - } -}) diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000000..0ff975ec7f5b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "unifiedjs.vscode-mdx", + "yzhang.markdown-all-in-one" + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index daa7997bc064..3b2c18a27cd6 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,36 +3,23 @@ // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", - "configurations": [{ - "type": "node", - "request": "launch", - "name": "official-storybook", - "runtimeExecutable": "npm", - "cwd": "${workspaceFolder}/examples/official-storybook", - "runtimeArgs": [ - "run-script", - "debug" - ], - "port": 9229, - "skipFiles": [ - "/**" - ] - }, { - "type": "node", - "request": "launch", - "name": "cli html", - "cwd": "${workspaceFolder}/lib/cli/stories", - "runtimeArgs": [ - "--inspect-brk", - "${workspaceFolder}/lib/cli/bin/index.js", - "init", - "--type", - "html" - ], - "port": 9229, - "skipFiles": [ - "/**" - ] - } + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "cli html", + "cwd": "${workspaceFolder}/code/lib/cli/stories", + "runtimeArgs": [ + "--inspect-brk", + "${workspaceFolder}/code/lib/cli/bin/index.js", + "init", + "--type", + "html" + ], + "port": 9229, + "skipFiles": [ + "/**" + ] + } ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 66d2c072fcdb..b600f07551c2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,55 @@ { - "deepscan.enable": true + "[javascript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.formatOnSave": true + }, + "[javascriptreact]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.formatOnSave": true + }, + "[typescript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.formatOnSave": true + }, + "[typescriptreact]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.formatOnSave": true + }, + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "editor.tabSize": 2, + "editor.formatOnSave": true, + "eslint.format.enable": true, + "eslint.options": { + "cache": true, + "cacheLocation": ".cache/eslint", + "extensions": [ + ".js", + ".jsx", + ".mjs", + ".json", + ".ts", + ".tsx" + ] + }, + "eslint.packageManager": "yarn", + "eslint.useESLintClass": true, + "eslint.validate": [ + "json", + "javascript", + "javascriptreact", + "html", + "typescript", + "typescriptreact" + ], + "eslint.workingDirectories": [ + "./code", + "./scripts" + ], + "files.associations": { + "*.js": "javascriptreact" + }, + "prettier.ignorePath": "./code/.prettierignore", + "typescript.tsdk": "./code/node_modules/typescript/lib" } \ No newline at end of file diff --git a/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs new file mode 100644 index 000000000000..911cd235e83c --- /dev/null +++ b/.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs @@ -0,0 +1,28 @@ +/* eslint-disable */ +//prettier-ignore +module.exports = { +name: "@yarnpkg/plugin-workspace-tools", +factory: function (require) { +var plugin=(()=>{var wr=Object.create,me=Object.defineProperty,Sr=Object.defineProperties,vr=Object.getOwnPropertyDescriptor,Hr=Object.getOwnPropertyDescriptors,$r=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols,kr=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable;var rt=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))tt.call(t,r)&&rt(e,r,t[r]);if(et)for(var r of et(t))Tr.call(t,r)&&rt(e,r,t[r]);return e},Q=(e,t)=>Sr(e,Hr(t)),Lr=e=>me(e,"__esModule",{value:!0});var K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Or=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})},Nr=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $r(t))!tt.call(e,n)&&n!=="default"&&me(e,n,{get:()=>t[n],enumerable:!(r=vr(t,n))||r.enumerable});return e},X=e=>Nr(Lr(me(e!=null?wr(kr(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var $e=K(te=>{"use strict";te.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;te.find=(e,t)=>e.nodes.find(r=>r.type===t);te.exceedsLimit=(e,t,r=1,n)=>n===!1||!te.isInteger(e)||!te.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;te.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];!n||(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};te.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0==0?(e.invalid=!0,!0):!1;te.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0==0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;te.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;te.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);te.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s{"use strict";var it=$e();at.exports=(e,t={})=>{let r=(n,s={})=>{let a=t.escapeInvalid&&it.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o="";if(n.value)return(a||i)&&it.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let h of n.nodes)o+=r(h);return o};return r(e)}});var ct=K((os,ot)=>{"use strict";ot.exports=function(e){return typeof e=="number"?e-e==0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var At=K((cs,ut)=>{"use strict";var lt=ct(),pe=(e,t,r)=>{if(lt(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(lt(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n=B({relaxZeros:!0},r);typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),a=String(n.shorthand),i=String(n.capture),o=String(n.wrap),h=e+":"+t+"="+s+a+i+o;if(pe.cache.hasOwnProperty(h))return pe.cache[h].result;let g=Math.min(e,t),f=Math.max(e,t);if(Math.abs(g-f)===1){let R=e+"|"+t;return n.capture?`(${R})`:n.wrap===!1?R:`(?:${R})`}let A=ft(e)||ft(t),p={min:e,max:t,a:g,b:f},k=[],y=[];if(A&&(p.isPadded=A,p.maxLen=String(p.max).length),g<0){let R=f<0?Math.abs(f):1;y=pt(R,Math.abs(g),p,n),g=p.a=0}return f>=0&&(k=pt(g,f,p,n)),p.negatives=y,p.positives=k,p.result=Ir(y,k,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&k.length+y.length>1&&(p.result=`(?:${p.result})`),pe.cache[h]=p,p.result};function Ir(e,t,r){let n=Pe(e,t,"-",!1,r)||[],s=Pe(t,e,"",!1,r)||[],a=Pe(e,t,"-?",!0,r)||[];return n.concat(a).concat(s).join("|")}function Mr(e,t){let r=1,n=1,s=ht(e,r),a=new Set([t]);for(;e<=s&&s<=t;)a.add(s),r+=1,s=ht(e,r);for(s=dt(t+1,n)-1;e1&&o.count.pop(),o.count.push(f.count[0]),o.string=o.pattern+gt(o.count),i=g+1;continue}r.isPadded&&(A=Gr(g,r,n)),f.string=A+f.pattern+gt(f.count),a.push(f),i=g+1,o=f}return a}function Pe(e,t,r,n,s){let a=[];for(let i of e){let{string:o}=i;!n&&!mt(t,"string",o)&&a.push(r+o),n&&mt(t,"string",o)&&a.push(r+o)}return a}function Pr(e,t){let r=[];for(let n=0;nt?1:t>e?-1:0}function mt(e,t,r){return e.some(n=>n[t]===r)}function ht(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function dt(e,t){return e-e%Math.pow(10,t)}function gt(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Dr(e,t,r){return`[${e}${t-e==1?"":"-"}${t}]`}function ft(e){return/^-?(0+)\d/.test(e)}function Gr(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}pe.cache={};pe.clearCache=()=>pe.cache={};ut.exports=pe});var Ge=K((us,Rt)=>{"use strict";var qr=require("util"),yt=At(),bt=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Kr=e=>t=>e===!0?Number(t):String(t),De=e=>typeof e=="number"||typeof e=="string"&&e!=="",Re=e=>Number.isInteger(+e),Ue=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Wr=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,jr=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},_t=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length{e.negatives.sort((i,o)=>io?1:0),e.positives.sort((i,o)=>io?1:0);let r=t.capture?"":"?:",n="",s="",a;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(s=`-(${r}${e.negatives.join("|")})`),n&&s?a=`${n}|${s}`:a=n||s,t.wrap?`(${r}${a})`:a},Et=(e,t,r,n)=>{if(r)return yt(e,t,B({wrap:!1},n));let s=String.fromCharCode(e);if(e===t)return s;let a=String.fromCharCode(t);return`[${s}-${a}]`},xt=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,s=r.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return yt(e,t,r)},Ct=(...e)=>new RangeError("Invalid range arguments: "+qr.inspect(...e)),wt=(e,t,r)=>{if(r.strictRanges===!0)throw Ct([e,t]);return[]},Qr=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},Xr=(e,t,r=1,n={})=>{let s=Number(e),a=Number(t);if(!Number.isInteger(s)||!Number.isInteger(a)){if(n.strictRanges===!0)throw Ct([e,t]);return[]}s===0&&(s=0),a===0&&(a=0);let i=s>a,o=String(e),h=String(t),g=String(r);r=Math.max(Math.abs(r),1);let f=Ue(o)||Ue(h)||Ue(g),A=f?Math.max(o.length,h.length,g.length):0,p=f===!1&&Wr(e,t,n)===!1,k=n.transform||Kr(p);if(n.toRegex&&r===1)return Et(_t(e,A),_t(t,A),!0,n);let y={negatives:[],positives:[]},R=T=>y[T<0?"negatives":"positives"].push(Math.abs(T)),_=[],x=0;for(;i?s>=a:s<=a;)n.toRegex===!0&&r>1?R(s):_.push(jr(k(s,x),A,p)),s=i?s-r:s+r,x++;return n.toRegex===!0?r>1?Fr(y,n):xt(_,null,B({wrap:!1},n)):_},Zr=(e,t,r=1,n={})=>{if(!Re(e)&&e.length>1||!Re(t)&&t.length>1)return wt(e,t,n);let s=n.transform||(p=>String.fromCharCode(p)),a=`${e}`.charCodeAt(0),i=`${t}`.charCodeAt(0),o=a>i,h=Math.min(a,i),g=Math.max(a,i);if(n.toRegex&&r===1)return Et(h,g,!1,n);let f=[],A=0;for(;o?a>=i:a<=i;)f.push(s(a,A)),a=o?a-r:a+r,A++;return n.toRegex===!0?xt(f,null,{wrap:!1,options:n}):f},Te=(e,t,r,n={})=>{if(t==null&&De(e))return[e];if(!De(e)||!De(t))return wt(e,t,n);if(typeof r=="function")return Te(e,t,1,{transform:r});if(bt(r))return Te(e,t,0,r);let s=B({},n);return s.capture===!0&&(s.wrap=!0),r=r||s.step||1,Re(r)?Re(e)&&Re(t)?Xr(e,t,r,s):Zr(e,t,Math.max(Math.abs(r),1),s):r!=null&&!bt(r)?Qr(r,s):Te(e,t,1,r)};Rt.exports=Te});var Ht=K((ls,St)=>{"use strict";var Yr=Ge(),vt=$e(),zr=(e,t={})=>{let r=(n,s={})=>{let a=vt.isInvalidBrace(s),i=n.invalid===!0&&t.escapeInvalid===!0,o=a===!0||i===!0,h=t.escapeInvalid===!0?"\\":"",g="";if(n.isOpen===!0||n.isClose===!0)return h+n.value;if(n.type==="open")return o?h+n.value:"(";if(n.type==="close")return o?h+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":o?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let f=vt.reduce(n.nodes),A=Yr(...f,Q(B({},t),{wrap:!1,toRegex:!0}));if(A.length!==0)return f.length>1&&A.length>1?`(${A})`:A}if(n.nodes)for(let f of n.nodes)g+=r(f,n);return g};return r(e)};St.exports=zr});var Tt=K((ps,$t)=>{"use strict";var Vr=Ge(),kt=ke(),he=$e(),fe=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?he.flatten(t).map(s=>`{${s}}`):t;for(let s of e)if(Array.isArray(s))for(let a of s)n.push(fe(a,t,r));else for(let a of t)r===!0&&typeof a=="string"&&(a=`{${a}}`),n.push(Array.isArray(a)?fe(s,a,r):s+a);return he.flatten(n)},Jr=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(s,a={})=>{s.queue=[];let i=a,o=a.queue;for(;i.type!=="brace"&&i.type!=="root"&&i.parent;)i=i.parent,o=i.queue;if(s.invalid||s.dollar){o.push(fe(o.pop(),kt(s,t)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){o.push(fe(o.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let A=he.reduce(s.nodes);if(he.exceedsLimit(...A,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=Vr(...A,t);p.length===0&&(p=kt(s,t)),o.push(fe(o.pop(),p)),s.nodes=[];return}let h=he.encloseBrace(s),g=s.queue,f=s;for(;f.type!=="brace"&&f.type!=="root"&&f.parent;)f=f.parent,g=f.queue;for(let A=0;A{"use strict";Lt.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:` +`,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:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var Pt=K((hs,Nt)=>{"use strict";var en=ke(),{MAX_LENGTH:It,CHAR_BACKSLASH:qe,CHAR_BACKTICK:tn,CHAR_COMMA:rn,CHAR_DOT:nn,CHAR_LEFT_PARENTHESES:sn,CHAR_RIGHT_PARENTHESES:an,CHAR_LEFT_CURLY_BRACE:on,CHAR_RIGHT_CURLY_BRACE:cn,CHAR_LEFT_SQUARE_BRACKET:Bt,CHAR_RIGHT_SQUARE_BRACKET:Mt,CHAR_DOUBLE_QUOTE:un,CHAR_SINGLE_QUOTE:ln,CHAR_NO_BREAK_SPACE:pn,CHAR_ZERO_WIDTH_NOBREAK_SPACE:fn}=Ot(),hn=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(It,r.maxLength):It;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},a=[s],i=s,o=s,h=0,g=e.length,f=0,A=0,p,k={},y=()=>e[f++],R=_=>{if(_.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&_.type==="text"){o.value+=_.value;return}return i.nodes.push(_),_.parent=i,_.prev=o,o=_,_};for(R({type:"bos"});f0){if(i.ranges>0){i.ranges=0;let _=i.nodes.shift();i.nodes=[_,{type:"text",value:en(i)}]}R({type:"comma",value:p}),i.commas++;continue}if(p===nn&&A>0&&i.commas===0){let _=i.nodes;if(A===0||_.length===0){R({type:"text",value:p});continue}if(o.type==="dot"){if(i.range=[],o.value+=p,o.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,o.type="text";continue}i.ranges++,i.args=[];continue}if(o.type==="range"){_.pop();let x=_[_.length-1];x.value+=o.value+p,o=x,i.ranges--;continue}R({type:"dot",value:p});continue}R({type:"text",value:p})}do if(i=a.pop(),i.type!=="root"){i.nodes.forEach(T=>{T.nodes||(T.type==="open"&&(T.isOpen=!0),T.type==="close"&&(T.isClose=!0),T.nodes||(T.type="text"),T.invalid=!0)});let _=a[a.length-1],x=_.nodes.indexOf(i);_.nodes.splice(x,1,...i.nodes)}while(a.length>0);return R({type:"eos"}),s};Nt.exports=hn});var Gt=K((ds,Dt)=>{"use strict";var Ut=ke(),dn=Ht(),gn=Tt(),mn=Pt(),V=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let s=V.create(n,t);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(V.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};V.parse=(e,t={})=>mn(e,t);V.stringify=(e,t={})=>typeof e=="string"?Ut(V.parse(e,t),t):Ut(e,t);V.compile=(e,t={})=>(typeof e=="string"&&(e=V.parse(e,t)),dn(e,t));V.expand=(e,t={})=>{typeof e=="string"&&(e=V.parse(e,t));let r=gn(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};V.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?V.compile(e,t):V.expand(e,t);Dt.exports=V});var ye=K((gs,qt)=>{"use strict";var An=require("path"),ie="\\\\/",Kt=`[^${ie}]`,ce="\\.",Rn="\\+",yn="\\?",Le="\\/",bn="(?=.)",Wt="[^/]",Ke=`(?:${Le}|$)`,jt=`(?:^|${Le})`,We=`${ce}{1,2}${Ke}`,_n=`(?!${ce})`,En=`(?!${jt}${We})`,xn=`(?!${ce}{0,1}${Ke})`,Cn=`(?!${We})`,wn=`[^.${Le}]`,Sn=`${Wt}*?`,Ft={DOT_LITERAL:ce,PLUS_LITERAL:Rn,QMARK_LITERAL:yn,SLASH_LITERAL:Le,ONE_CHAR:bn,QMARK:Wt,END_ANCHOR:Ke,DOTS_SLASH:We,NO_DOT:_n,NO_DOTS:En,NO_DOT_SLASH:xn,NO_DOTS_SLASH:Cn,QMARK_NO_DOT:wn,STAR:Sn,START_ANCHOR:jt},vn=Q(B({},Ft),{SLASH_LITERAL:`[${ie}]`,QMARK:Kt,STAR:`${Kt}*?`,DOTS_SLASH:`${ce}{1,2}(?:[${ie}]|$)`,NO_DOT:`(?!${ce})`,NO_DOTS:`(?!(?:^|[${ie}])${ce}{1,2}(?:[${ie}]|$))`,NO_DOT_SLASH:`(?!${ce}{0,1}(?:[${ie}]|$))`,NO_DOTS_SLASH:`(?!${ce}{1,2}(?:[${ie}]|$))`,QMARK_NO_DOT:`[^.${ie}]`,START_ANCHOR:`(?:^|[${ie}])`,END_ANCHOR:`(?:[${ie}]|$)`}),Hn={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"};qt.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Hn,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:An.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?vn:Ft}}});var be=K(Z=>{"use strict";var $n=require("path"),kn=process.platform==="win32",{REGEX_BACKSLASH:Tn,REGEX_REMOVE_BACKSLASH:Ln,REGEX_SPECIAL_CHARS:On,REGEX_SPECIAL_CHARS_GLOBAL:Nn}=ye();Z.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Z.hasRegexChars=e=>On.test(e);Z.isRegexChar=e=>e.length===1&&Z.hasRegexChars(e);Z.escapeRegex=e=>e.replace(Nn,"\\$1");Z.toPosixSlashes=e=>e.replace(Tn,"/");Z.removeBackslashes=e=>e.replace(Ln,t=>t==="\\"?"":t);Z.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Z.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:kn===!0||$n.sep==="\\";Z.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Z.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Z.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Z.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",a=`${n}(?:${e})${s}`;return t.negated===!0&&(a=`(?:^(?!${a}).*$)`),a}});var er=K((As,Qt)=>{"use strict";var Xt=be(),{CHAR_ASTERISK:je,CHAR_AT:In,CHAR_BACKWARD_SLASH:_e,CHAR_COMMA:Bn,CHAR_DOT:Fe,CHAR_EXCLAMATION_MARK:Qe,CHAR_FORWARD_SLASH:Zt,CHAR_LEFT_CURLY_BRACE:Xe,CHAR_LEFT_PARENTHESES:Ze,CHAR_LEFT_SQUARE_BRACKET:Mn,CHAR_PLUS:Pn,CHAR_QUESTION_MARK:Yt,CHAR_RIGHT_CURLY_BRACE:Dn,CHAR_RIGHT_PARENTHESES:zt,CHAR_RIGHT_SQUARE_BRACKET:Un}=ye(),Vt=e=>e===Zt||e===_e,Jt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?Infinity:1)},Gn=(e,t)=>{let r=t||{},n=e.length-1,s=r.parts===!0||r.scanToEnd===!0,a=[],i=[],o=[],h=e,g=-1,f=0,A=0,p=!1,k=!1,y=!1,R=!1,_=!1,x=!1,T=!1,O=!1,W=!1,G=!1,ne=0,E,b,C={value:"",depth:0,isGlob:!1},M=()=>g>=n,l=()=>h.charCodeAt(g+1),H=()=>(E=b,h.charCodeAt(++g));for(;g0&&(j=h.slice(0,f),h=h.slice(f),A-=f),w&&y===!0&&A>0?(w=h.slice(0,A),c=h.slice(A)):y===!0?(w="",c=h):w=h,w&&w!==""&&w!=="/"&&w!==h&&Vt(w.charCodeAt(w.length-1))&&(w=w.slice(0,-1)),r.unescape===!0&&(c&&(c=Xt.removeBackslashes(c)),w&&T===!0&&(w=Xt.removeBackslashes(w)));let u={prefix:j,input:e,start:f,base:w,glob:c,isBrace:p,isBracket:k,isGlob:y,isExtglob:R,isGlobstar:_,negated:O,negatedExtglob:W};if(r.tokens===!0&&(u.maxDepth=0,Vt(b)||i.push(C),u.tokens=i),r.parts===!0||r.tokens===!0){let I;for(let $=0;${"use strict";var Oe=ye(),J=be(),{MAX_LENGTH:Ne,POSIX_REGEX_SOURCE:qn,REGEX_NON_SPECIAL_CHARS:Kn,REGEX_SPECIAL_CHARS_BACKREF:Wn,REPLACEMENTS:rr}=Oe,jn=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch(n){return e.map(s=>J.escapeRegex(s)).join("..")}return r},de=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,nr=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=rr[e]||e;let r=B({},t),n=typeof r.maxLength=="number"?Math.min(Ne,r.maxLength):Ne,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let a={type:"bos",value:"",output:r.prepend||""},i=[a],o=r.capture?"":"?:",h=J.isWindows(t),g=Oe.globChars(h),f=Oe.extglobChars(g),{DOT_LITERAL:A,PLUS_LITERAL:p,SLASH_LITERAL:k,ONE_CHAR:y,DOTS_SLASH:R,NO_DOT:_,NO_DOT_SLASH:x,NO_DOTS_SLASH:T,QMARK:O,QMARK_NO_DOT:W,STAR:G,START_ANCHOR:ne}=g,E=m=>`(${o}(?:(?!${ne}${m.dot?R:A}).)*?)`,b=r.dot?"":_,C=r.dot?O:W,M=r.bash===!0?E(r):G;r.capture&&(M=`(${M})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let l={input:e,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:i};e=J.removePrefix(e,l),s=e.length;let H=[],w=[],j=[],c=a,u,I=()=>l.index===s-1,$=l.peek=(m=1)=>e[l.index+m],ee=l.advance=()=>e[++l.index]||"",se=()=>e.slice(l.index+1),z=(m="",L=0)=>{l.consumed+=m,l.index+=L},Ce=m=>{l.output+=m.output!=null?m.output:m.value,z(m.value)},xr=()=>{let m=1;for(;$()==="!"&&($(2)!=="("||$(3)==="?");)ee(),l.start++,m++;return m%2==0?!1:(l.negated=!0,l.start++,!0)},we=m=>{l[m]++,j.push(m)},ue=m=>{l[m]--,j.pop()},v=m=>{if(c.type==="globstar"){let L=l.braces>0&&(m.type==="comma"||m.type==="brace"),d=m.extglob===!0||H.length&&(m.type==="pipe"||m.type==="paren");m.type!=="slash"&&m.type!=="paren"&&!L&&!d&&(l.output=l.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=M,l.output+=c.output)}if(H.length&&m.type!=="paren"&&(H[H.length-1].inner+=m.value),(m.value||m.output)&&Ce(m),c&&c.type==="text"&&m.type==="text"){c.value+=m.value,c.output=(c.output||"")+m.value;return}m.prev=c,i.push(m),c=m},Se=(m,L)=>{let d=Q(B({},f[L]),{conditions:1,inner:""});d.prev=c,d.parens=l.parens,d.output=l.output;let S=(r.capture?"(":"")+d.open;we("parens"),v({type:m,value:L,output:l.output?"":y}),v({type:"paren",extglob:!0,value:ee(),output:S}),H.push(d)},Cr=m=>{let L=m.close+(r.capture?")":""),d;if(m.type==="negate"){let S=M;m.inner&&m.inner.length>1&&m.inner.includes("/")&&(S=E(r)),(S!==M||I()||/^\)+$/.test(se()))&&(L=m.close=`)$))${S}`),m.inner.includes("*")&&(d=se())&&/^\.[^\\/.]+$/.test(d)&&(L=m.close=`)${d})${S})`),m.prev.type==="bos"&&(l.negatedExtglob=!0)}v({type:"paren",extglob:!0,value:u,output:L}),ue("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let m=!1,L=e.replace(Wn,(d,S,P,F,q,Me)=>F==="\\"?(m=!0,d):F==="?"?S?S+F+(q?O.repeat(q.length):""):Me===0?C+(q?O.repeat(q.length):""):O.repeat(P.length):F==="."?A.repeat(P.length):F==="*"?S?S+F+(q?M:""):M:S?d:`\\${d}`);return m===!0&&(r.unescape===!0?L=L.replace(/\\/g,""):L=L.replace(/\\+/g,d=>d.length%2==0?"\\\\":d?"\\":"")),L===e&&r.contains===!0?(l.output=e,l):(l.output=J.wrapOutput(L,l,t),l)}for(;!I();){if(u=ee(),u==="\0")continue;if(u==="\\"){let d=$();if(d==="/"&&r.bash!==!0||d==="."||d===";")continue;if(!d){u+="\\",v({type:"text",value:u});continue}let S=/^\\+/.exec(se()),P=0;if(S&&S[0].length>2&&(P=S[0].length,l.index+=P,P%2!=0&&(u+="\\")),r.unescape===!0?u=ee():u+=ee(),l.brackets===0){v({type:"text",value:u});continue}}if(l.brackets>0&&(u!=="]"||c.value==="["||c.value==="[^")){if(r.posix!==!1&&u===":"){let d=c.value.slice(1);if(d.includes("[")&&(c.posix=!0,d.includes(":"))){let S=c.value.lastIndexOf("["),P=c.value.slice(0,S),F=c.value.slice(S+2),q=qn[F];if(q){c.value=P+q,l.backtrack=!0,ee(),!a.output&&i.indexOf(c)===1&&(a.output=y);continue}}}(u==="["&&$()!==":"||u==="-"&&$()==="]")&&(u=`\\${u}`),u==="]"&&(c.value==="["||c.value==="[^")&&(u=`\\${u}`),r.posix===!0&&u==="!"&&c.value==="["&&(u="^"),c.value+=u,Ce({value:u});continue}if(l.quotes===1&&u!=='"'){u=J.escapeRegex(u),c.value+=u,Ce({value:u});continue}if(u==='"'){l.quotes=l.quotes===1?0:1,r.keepQuotes===!0&&v({type:"text",value:u});continue}if(u==="("){we("parens"),v({type:"paren",value:u});continue}if(u===")"){if(l.parens===0&&r.strictBrackets===!0)throw new SyntaxError(de("opening","("));let d=H[H.length-1];if(d&&l.parens===d.parens+1){Cr(H.pop());continue}v({type:"paren",value:u,output:l.parens?")":"\\)"}),ue("parens");continue}if(u==="["){if(r.nobracket===!0||!se().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(de("closing","]"));u=`\\${u}`}else we("brackets");v({type:"bracket",value:u});continue}if(u==="]"){if(r.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){v({type:"text",value:u,output:`\\${u}`});continue}if(l.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(de("opening","["));v({type:"text",value:u,output:`\\${u}`});continue}ue("brackets");let d=c.value.slice(1);if(c.posix!==!0&&d[0]==="^"&&!d.includes("/")&&(u=`/${u}`),c.value+=u,Ce({value:u}),r.literalBrackets===!1||J.hasRegexChars(d))continue;let S=J.escapeRegex(c.value);if(l.output=l.output.slice(0,-c.value.length),r.literalBrackets===!0){l.output+=S,c.value=S;continue}c.value=`(${o}${S}|${c.value})`,l.output+=c.value;continue}if(u==="{"&&r.nobrace!==!0){we("braces");let d={type:"brace",value:u,output:"(",outputIndex:l.output.length,tokensIndex:l.tokens.length};w.push(d),v(d);continue}if(u==="}"){let d=w[w.length-1];if(r.nobrace===!0||!d){v({type:"text",value:u,output:u});continue}let S=")";if(d.dots===!0){let P=i.slice(),F=[];for(let q=P.length-1;q>=0&&(i.pop(),P[q].type!=="brace");q--)P[q].type!=="dots"&&F.unshift(P[q].value);S=jn(F,r),l.backtrack=!0}if(d.comma!==!0&&d.dots!==!0){let P=l.output.slice(0,d.outputIndex),F=l.tokens.slice(d.tokensIndex);d.value=d.output="\\{",u=S="\\}",l.output=P;for(let q of F)l.output+=q.output||q.value}v({type:"brace",value:u,output:S}),ue("braces"),w.pop();continue}if(u==="|"){H.length>0&&H[H.length-1].conditions++,v({type:"text",value:u});continue}if(u===","){let d=u,S=w[w.length-1];S&&j[j.length-1]==="braces"&&(S.comma=!0,d="|"),v({type:"comma",value:u,output:d});continue}if(u==="/"){if(c.type==="dot"&&l.index===l.start+1){l.start=l.index+1,l.consumed="",l.output="",i.pop(),c=a;continue}v({type:"slash",value:u,output:k});continue}if(u==="."){if(l.braces>0&&c.type==="dot"){c.value==="."&&(c.output=A);let d=w[w.length-1];c.type="dots",c.output+=u,c.value+=u,d.dots=!0;continue}if(l.braces+l.parens===0&&c.type!=="bos"&&c.type!=="slash"){v({type:"text",value:u,output:A});continue}v({type:"dot",value:u,output:A});continue}if(u==="?"){if(!(c&&c.value==="(")&&r.noextglob!==!0&&$()==="("&&$(2)!=="?"){Se("qmark",u);continue}if(c&&c.type==="paren"){let S=$(),P=u;if(S==="<"&&!J.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(c.value==="("&&!/[!=<:]/.test(S)||S==="<"&&!/<([!=]|\w+>)/.test(se()))&&(P=`\\${u}`),v({type:"text",value:u,output:P});continue}if(r.dot!==!0&&(c.type==="slash"||c.type==="bos")){v({type:"qmark",value:u,output:W});continue}v({type:"qmark",value:u,output:O});continue}if(u==="!"){if(r.noextglob!==!0&&$()==="("&&($(2)!=="?"||!/[!=<:]/.test($(3)))){Se("negate",u);continue}if(r.nonegate!==!0&&l.index===0){xr();continue}}if(u==="+"){if(r.noextglob!==!0&&$()==="("&&$(2)!=="?"){Se("plus",u);continue}if(c&&c.value==="("||r.regex===!1){v({type:"plus",value:u,output:p});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||l.parens>0){v({type:"plus",value:u});continue}v({type:"plus",value:p});continue}if(u==="@"){if(r.noextglob!==!0&&$()==="("&&$(2)!=="?"){v({type:"at",extglob:!0,value:u,output:""});continue}v({type:"text",value:u});continue}if(u!=="*"){(u==="$"||u==="^")&&(u=`\\${u}`);let d=Kn.exec(se());d&&(u+=d[0],l.index+=d[0].length),v({type:"text",value:u});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=u,c.output=M,l.backtrack=!0,l.globstar=!0,z(u);continue}let m=se();if(r.noextglob!==!0&&/^\([^?]/.test(m)){Se("star",u);continue}if(c.type==="star"){if(r.noglobstar===!0){z(u);continue}let d=c.prev,S=d.prev,P=d.type==="slash"||d.type==="bos",F=S&&(S.type==="star"||S.type==="globstar");if(r.bash===!0&&(!P||m[0]&&m[0]!=="/")){v({type:"star",value:u,output:""});continue}let q=l.braces>0&&(d.type==="comma"||d.type==="brace"),Me=H.length&&(d.type==="pipe"||d.type==="paren");if(!P&&d.type!=="paren"&&!q&&!Me){v({type:"star",value:u,output:""});continue}for(;m.slice(0,3)==="/**";){let ve=e[l.index+4];if(ve&&ve!=="/")break;m=m.slice(3),z("/**",3)}if(d.type==="bos"&&I()){c.type="globstar",c.value+=u,c.output=E(r),l.output=c.output,l.globstar=!0,z(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&!F&&I()){l.output=l.output.slice(0,-(d.output+c.output).length),d.output=`(?:${d.output}`,c.type="globstar",c.output=E(r)+(r.strictSlashes?")":"|$)"),c.value+=u,l.globstar=!0,l.output+=d.output+c.output,z(u);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&m[0]==="/"){let ve=m[1]!==void 0?"|$":"";l.output=l.output.slice(0,-(d.output+c.output).length),d.output=`(?:${d.output}`,c.type="globstar",c.output=`${E(r)}${k}|${k}${ve})`,c.value+=u,l.output+=d.output+c.output,l.globstar=!0,z(u+ee()),v({type:"slash",value:"/",output:""});continue}if(d.type==="bos"&&m[0]==="/"){c.type="globstar",c.value+=u,c.output=`(?:^|${k}|${E(r)}${k})`,l.output=c.output,l.globstar=!0,z(u+ee()),v({type:"slash",value:"/",output:""});continue}l.output=l.output.slice(0,-c.output.length),c.type="globstar",c.output=E(r),c.value+=u,l.output+=c.output,l.globstar=!0,z(u);continue}let L={type:"star",value:u,output:M};if(r.bash===!0){L.output=".*?",(c.type==="bos"||c.type==="slash")&&(L.output=b+L.output),v(L);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&r.regex===!0){L.output=u,v(L);continue}(l.index===l.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(l.output+=x,c.output+=x):r.dot===!0?(l.output+=T,c.output+=T):(l.output+=b,c.output+=b),$()!=="*"&&(l.output+=y,c.output+=y)),v(L)}for(;l.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing","]"));l.output=J.escapeLast(l.output,"["),ue("brackets")}for(;l.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing",")"));l.output=J.escapeLast(l.output,"("),ue("parens")}for(;l.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(de("closing","}"));l.output=J.escapeLast(l.output,"{"),ue("braces")}if(r.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&v({type:"maybe_slash",value:"",output:`${k}?`}),l.backtrack===!0){l.output="";for(let m of l.tokens)l.output+=m.output!=null?m.output:m.value,m.suffix&&(l.output+=m.suffix)}return l};nr.fastpaths=(e,t)=>{let r=B({},t),n=typeof r.maxLength=="number"?Math.min(Ne,r.maxLength):Ne,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=rr[e]||e;let a=J.isWindows(t),{DOT_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:h,DOTS_SLASH:g,NO_DOT:f,NO_DOTS:A,NO_DOTS_SLASH:p,STAR:k,START_ANCHOR:y}=Oe.globChars(a),R=r.dot?A:f,_=r.dot?p:f,x=r.capture?"":"?:",T={negated:!1,prefix:""},O=r.bash===!0?".*?":k;r.capture&&(O=`(${O})`);let W=b=>b.noglobstar===!0?O:`(${x}(?:(?!${y}${b.dot?g:i}).)*?)`,G=b=>{switch(b){case"*":return`${R}${h}${O}`;case".*":return`${i}${h}${O}`;case"*.*":return`${R}${O}${i}${h}${O}`;case"*/*":return`${R}${O}${o}${h}${_}${O}`;case"**":return R+W(r);case"**/*":return`(?:${R}${W(r)}${o})?${_}${h}${O}`;case"**/*.*":return`(?:${R}${W(r)}${o})?${_}${O}${i}${h}${O}`;case"**/.*":return`(?:${R}${W(r)}${o})?${i}${h}${O}`;default:{let C=/^(.*?)\.(\w+)$/.exec(b);if(!C)return;let M=G(C[1]);return M?M+i+C[2]:void 0}}},ne=J.removePrefix(e,T),E=G(ne);return E&&r.strictSlashes!==!0&&(E+=`${o}?`),E};tr.exports=nr});var ir=K((ys,ar)=>{"use strict";var Fn=require("path"),Qn=er(),Ye=sr(),ze=be(),Xn=ye(),Zn=e=>e&&typeof e=="object"&&!Array.isArray(e),D=(e,t,r=!1)=>{if(Array.isArray(e)){let f=e.map(p=>D(p,t,r));return p=>{for(let k of f){let y=k(p);if(y)return y}return!1}}let n=Zn(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},a=ze.isWindows(t),i=n?D.compileRe(e,t):D.makeRe(e,t,!1,!0),o=i.state;delete i.state;let h=()=>!1;if(s.ignore){let f=Q(B({},t),{ignore:null,onMatch:null,onResult:null});h=D(s.ignore,f,r)}let g=(f,A=!1)=>{let{isMatch:p,match:k,output:y}=D.test(f,i,t,{glob:e,posix:a}),R={glob:e,state:o,regex:i,posix:a,input:f,output:y,match:k,isMatch:p};return typeof s.onResult=="function"&&s.onResult(R),p===!1?(R.isMatch=!1,A?R:!1):h(f)?(typeof s.onIgnore=="function"&&s.onIgnore(R),R.isMatch=!1,A?R:!1):(typeof s.onMatch=="function"&&s.onMatch(R),A?R:!0)};return r&&(g.state=o),g};D.test=(e,t,r,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let a=r||{},i=a.format||(s?ze.toPosixSlashes:null),o=e===n,h=o&&i?i(e):e;return o===!1&&(h=i?i(e):e,o=h===n),(o===!1||a.capture===!0)&&(a.matchBase===!0||a.basename===!0?o=D.matchBase(e,t,r,s):o=t.exec(h)),{isMatch:Boolean(o),match:o,output:h}};D.matchBase=(e,t,r,n=ze.isWindows(r))=>(t instanceof RegExp?t:D.makeRe(t,r)).test(Fn.basename(e));D.isMatch=(e,t,r)=>D(t,r)(e);D.parse=(e,t)=>Array.isArray(e)?e.map(r=>D.parse(r,t)):Ye(e,Q(B({},t),{fastpaths:!1}));D.scan=(e,t)=>Qn(e,t);D.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let s=t||{},a=s.contains?"":"^",i=s.contains?"":"$",o=`${a}(?:${e.output})${i}`;e&&e.negated===!0&&(o=`^(?!${o}).*$`);let h=D.toRegex(o,t);return n===!0&&(h.state=e),h};D.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Ye.fastpaths(e,t)),s.output||(s=Ye(e,t)),D.compileRe(s,t,r,n)};D.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};D.constants=Xn;ar.exports=D});var cr=K((bs,or)=>{"use strict";or.exports=ir()});var hr=K((_s,ur)=>{"use strict";var lr=require("util"),pr=Gt(),oe=cr(),Ve=be(),fr=e=>e===""||e==="./",N=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,s=new Set,a=new Set,i=0,o=f=>{a.add(f.output),r&&r.onResult&&r.onResult(f)};for(let f=0;f!n.has(f));if(r&&g.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(f=>f.replace(/\\/g,"")):t}return g};N.match=N;N.matcher=(e,t)=>oe(e,t);N.isMatch=(e,t,r)=>oe(t,r)(e);N.any=N.isMatch;N.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,s=[],a=o=>{r.onResult&&r.onResult(o),s.push(o.output)},i=N(e,t,Q(B({},r),{onResult:a}));for(let o of s)i.includes(o)||n.add(o);return[...n]};N.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lr.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>N.contains(e,n,r));if(typeof t=="string"){if(fr(e)||fr(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return N.isMatch(e,t,Q(B({},r),{contains:!0}))};N.matchKeys=(e,t,r)=>{if(!Ve.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=N(Object.keys(e),t,r),s={};for(let a of n)s[a]=e[a];return s};N.some=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let a=oe(String(s),r);if(n.some(i=>a(i)))return!0}return!1};N.every=(e,t,r)=>{let n=[].concat(e);for(let s of[].concat(t)){let a=oe(String(s),r);if(!n.every(i=>a(i)))return!1}return!0};N.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${lr.inspect(e)}"`);return[].concat(t).every(n=>oe(n,r)(e))};N.capture=(e,t,r)=>{let n=Ve.isWindows(r),a=oe.makeRe(String(e),Q(B({},r),{capture:!0})).exec(n?Ve.toPosixSlashes(t):t);if(a)return a.slice(1).map(i=>i===void 0?"":i)};N.makeRe=(...e)=>oe.makeRe(...e);N.scan=(...e)=>oe.scan(...e);N.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let s of pr(String(n),t))r.push(oe.parse(s,t));return r};N.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:pr(e,t)};N.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return N.braces(e,Q(B({},t),{expand:!0}))};ur.exports=N});var gr=K((Es,dr)=>{"use strict";dr.exports=(e,...t)=>new Promise(r=>{r(e(...t))})});var Ar=K((xs,Je)=>{"use strict";var Yn=gr(),mr=e=>{if(e<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let t=[],r=0,n=()=>{r--,t.length>0&&t.shift()()},s=(o,h,...g)=>{r++;let f=Yn(o,...g);h(f),f.then(n,n)},a=(o,h,...g)=>{rnew Promise(g=>a(o,g,...h));return Object.defineProperties(i,{activeCount:{get:()=>r},pendingCount:{get:()=>t.length}}),i};Je.exports=mr;Je.exports.default=mr});var Vn={};Or(Vn,{default:()=>es});var He=X(require("@yarnpkg/cli")),ae=X(require("@yarnpkg/core")),nt=X(require("@yarnpkg/core")),le=X(require("clipanion")),Ae=class extends He.BaseCommand{constructor(){super(...arguments);this.json=le.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=le.Option.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=le.Option.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=le.Option.Rest()}async execute(){let t=await ae.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:n}=await ae.Project.find(t,this.context.cwd),s=await ae.Cache.find(t);await r.restoreInstallState({restoreResolutions:!1});let a;if(this.all)a=new Set(r.workspaces);else if(this.workspaces.length===0){if(!n)throw new He.WorkspaceRequiredError(r.cwd,this.context.cwd);a=new Set([n])}else a=new Set(this.workspaces.map(o=>r.getWorkspaceByIdent(nt.structUtils.parseIdent(o))));for(let o of a)for(let h of this.production?["dependencies"]:ae.Manifest.hardDependencies)for(let g of o.manifest.getForScope(h).values()){let f=r.tryWorkspaceByDescriptor(g);f!==null&&a.add(f)}for(let o of r.workspaces)a.has(o)?this.production&&o.manifest.devDependencies.clear():(o.manifest.installConfig=o.manifest.installConfig||{},o.manifest.installConfig.selfReferences=!1,o.manifest.dependencies.clear(),o.manifest.devDependencies.clear(),o.manifest.peerDependencies.clear(),o.manifest.scripts.clear());return(await ae.StreamReport.start({configuration:t,json:this.json,stdout:this.context.stdout,includeLogs:!0},async o=>{await r.install({cache:s,report:o,persistProject:!1})})).exitCode()}};Ae.paths=[["workspaces","focus"]],Ae.usage=le.Command.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 "});var st=Ae;var Ie=X(require("@yarnpkg/cli")),ge=X(require("@yarnpkg/core")),Ee=X(require("@yarnpkg/core")),Y=X(require("@yarnpkg/core")),Rr=X(require("@yarnpkg/plugin-git")),U=X(require("clipanion")),Be=X(hr()),yr=X(require("os")),br=X(Ar()),re=X(require("typanion")),xe=class extends Ie.BaseCommand{constructor(){super(...arguments);this.recursive=U.Option.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.from=U.Option.Array("--from",[],{description:"An array of glob pattern idents from which to base any recursion"});this.all=U.Option.Boolean("-A,--all",!1,{description:"Run the command on all workspaces of a project"});this.verbose=U.Option.Boolean("-v,--verbose",!1,{description:"Prefix each output line with the name of the originating workspace"});this.parallel=U.Option.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=U.Option.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=U.Option.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:re.isOneOf([re.isEnum(["unlimited"]),re.applyCascade(re.isNumber(),[re.isInteger(),re.isAtLeast(1)])])});this.topological=U.Option.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=U.Option.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=U.Option.Array("--include",[],{description:"An array of glob pattern idents; only matching workspaces will be traversed"});this.exclude=U.Option.Array("--exclude",[],{description:"An array of glob pattern idents; matching workspaces won't be traversed"});this.publicOnly=U.Option.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=U.Option.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.commandName=U.Option.String();this.args=U.Option.Proxy()}async execute(){let t=await ge.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:n}=await ge.Project.find(t,this.context.cwd);if(!this.all&&!n)throw new Ie.WorkspaceRequiredError(r.cwd,this.context.cwd);await r.restoreInstallState();let s=this.cli.process([this.commandName,...this.args]),a=s.path.length===1&&s.path[0]==="run"&&typeof s.scriptName!="undefined"?s.scriptName:null;if(s.path.length===0)throw new U.UsageError("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let i=this.all?r.topLevelWorkspace:n,o=this.since?Array.from(await Rr.gitUtils.fetchChangedWorkspaces({ref:this.since,project:r})):[i,...this.from.length>0?i.getRecursiveWorkspaceChildren():[]],h=E=>Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.from),g=this.from.length>0?o.filter(h):o,f=new Set([...g,...g.map(E=>[...this.recursive?this.since?E.getRecursiveWorkspaceDependents():E.getRecursiveWorkspaceDependencies():E.getRecursiveWorkspaceChildren()]).flat()]),A=[],p=!1;if(a==null?void 0:a.includes(":")){for(let E of r.workspaces)if(E.manifest.scripts.has(a)&&(p=!p,p===!1))break}for(let E of f)a&&!E.manifest.scripts.has(a)&&!p&&!(await ge.scriptUtils.getWorkspaceAccessibleBinaries(E)).has(a)||a===process.env.npm_lifecycle_event&&E.cwd===n.cwd||this.include.length>0&&!Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.include)||this.exclude.length>0&&Be.default.isMatch(Y.structUtils.stringifyIdent(E.locator),this.exclude)||this.publicOnly&&E.manifest.private===!0||A.push(E);let k=this.parallel?this.jobs==="unlimited"?Infinity:Number(this.jobs)||Math.max(1,(0,yr.cpus)().length/2):1,y=k===1?!1:this.parallel,R=y?this.interlaced:!0,_=(0,br.default)(k),x=new Map,T=new Set,O=0,W=null,G=!1,ne=await Ee.StreamReport.start({configuration:t,stdout:this.context.stdout},async E=>{let b=async(C,{commandIndex:M})=>{if(G)return-1;!y&&this.verbose&&M>1&&E.reportSeparator();let l=zn(C,{configuration:t,verbose:this.verbose,commandIndex:M}),[H,w]=_r(E,{prefix:l,interlaced:R}),[j,c]=_r(E,{prefix:l,interlaced:R});try{this.verbose&&E.reportInfo(null,`${l} Process started`);let u=Date.now(),I=await this.cli.run([this.commandName,...this.args],{cwd:C.cwd,stdout:H,stderr:j})||0;H.end(),j.end(),await w,await c;let $=Date.now();if(this.verbose){let ee=t.get("enableTimers")?`, completed in ${Y.formatUtils.pretty(t,$-u,Y.formatUtils.Type.DURATION)}`:"";E.reportInfo(null,`${l} Process exited (exit code ${I})${ee}`)}return I===130&&(G=!0,W=I),I}catch(u){throw H.end(),j.end(),await w,await c,u}};for(let C of A)x.set(C.anchoredLocator.locatorHash,C);for(;x.size>0&&!E.hasErrors();){let C=[];for(let[H,w]of x){if(T.has(w.anchoredDescriptor.descriptorHash))continue;let j=!0;if(this.topological||this.topologicalDev){let c=this.topologicalDev?new Map([...w.manifest.dependencies,...w.manifest.devDependencies]):w.manifest.dependencies;for(let u of c.values()){let I=r.tryWorkspaceByDescriptor(u);if(j=I===null||!x.has(I.anchoredLocator.locatorHash),!j)break}}if(!!j&&(T.add(w.anchoredDescriptor.descriptorHash),C.push(_(async()=>{let c=await b(w,{commandIndex:++O});return x.delete(H),T.delete(w.anchoredDescriptor.descriptorHash),c})),!y))break}if(C.length===0){let H=Array.from(x.values()).map(w=>Y.structUtils.prettyLocator(t,w.anchoredLocator)).join(", ");E.reportError(Ee.MessageName.CYCLIC_DEPENDENCIES,`Dependency cycle detected (${H})`);return}let l=(await Promise.all(C)).find(H=>H!==0);W===null&&(W=typeof l!="undefined"?1:W),(this.topological||this.topologicalDev)&&typeof l!="undefined"&&E.reportError(Ee.MessageName.UNNAMED,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return W!==null?W:ne.exitCode()}};xe.paths=[["workspaces","foreach"]],xe.usage=U.Command.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. By default yarn runs the command only on current and all its descendant workspaces.\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 `--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 - 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.\n\n Adding the `-v,--verbose` flag will cause Yarn to print more information; in particular the name of the workspace that generated the output will be printed at the front of each line.\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 current and all descendant packages","yarn workspaces foreach npm publish --tolerate-republish"],["Run build script on current and all descendant packages","yarn workspaces foreach run build"],["Run build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -pt run build"],["Run build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -ptR --from '{workspace-a,workspace-b}' run build"]]});var Er=xe;function _r(e,{prefix:t,interlaced:r}){let n=e.createStreamReporter(t),s=new Y.miscUtils.DefaultStream;s.pipe(n,{end:!1}),s.on("finish",()=>{n.end()});let a=new Promise(o=>{n.on("finish",()=>{o(s.active)})});if(r)return[s,a];let i=new Y.miscUtils.BufferStream;return i.pipe(s,{end:!1}),i.on("finish",()=>{s.end()}),[i,a]}function zn(e,{configuration:t,commandIndex:r,verbose:n}){if(!n)return null;let s=Y.structUtils.convertToIdent(e.locator),i=`[${Y.structUtils.stringifyIdent(s)}]:`,o=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],h=o[r%o.length];return Y.formatUtils.pretty(t,i,h)}var Jn={commands:[st,Er]},es=Jn;return Vn;})(); +/*! + * fill-range + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Licensed under the MIT License. + */ +/*! + * is-number + * + * Copyright (c) 2014-present, Jon Schlinkert. + * Released under the MIT License. + */ +/*! + * to-regex-range + * + * Copyright (c) 2015-present, Jon Schlinkert. + * Released under the MIT License. + */ +return plugin; +} +}; diff --git a/.yarn/releases/yarn-3.1.1.cjs b/.yarn/releases/yarn-3.1.1.cjs deleted file mode 100755 index f5f2adca83b2..000000000000 --- a/.yarn/releases/yarn-3.1.1.cjs +++ /dev/null @@ -1,768 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable */ -//prettier-ignore -(()=>{var Mfe=Object.create,Vf=Object.defineProperty,Ofe=Object.defineProperties,Kfe=Object.getOwnPropertyDescriptor,Ufe=Object.getOwnPropertyDescriptors,Hfe=Object.getOwnPropertyNames,hE=Object.getOwnPropertySymbols,Gfe=Object.getPrototypeOf,eb=Object.prototype.hasOwnProperty,lO=Object.prototype.propertyIsEnumerable;var cO=(t,e,r)=>e in t?Vf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,P=(t,e)=>{for(var r in e||(e={}))eb.call(e,r)&&cO(t,r,e[r]);if(hE)for(var r of hE(e))lO.call(e,r)&&cO(t,r,e[r]);return t},_=(t,e)=>Ofe(t,Ufe(e)),jfe=t=>Vf(t,"__esModule",{value:!0});var qr=(t,e)=>{var r={};for(var i in t)eb.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&hE)for(var i of hE(t))e.indexOf(i)<0&&lO.call(t,i)&&(r[i]=t[i]);return r},Yfe=(t,e)=>()=>(t&&(e=t(t=0)),e),E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),it=(t,e)=>{for(var r in e)Vf(t,r,{get:e[r],enumerable:!0})},qfe=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Hfe(e))!eb.call(t,i)&&i!=="default"&&Vf(t,i,{get:()=>e[i],enumerable:!(r=Kfe(e,i))||r.enumerable});return t},ie=t=>qfe(jfe(Vf(t!=null?Mfe(Gfe(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var MO=E((i$e,FO)=>{FO.exports=NO;NO.sync=Ahe;var LO=require("fs");function lhe(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 i=0;i{OO.exports=KO;KO.sync=che;var UO=require("fs");function KO(t,e,r){UO.stat(t,function(i,n){r(i,i?!1:HO(n,e))})}function che(t,e){return HO(UO.statSync(t),e)}function HO(t,e){return t.isFile()&&uhe(t,e)}function uhe(t,e){var r=t.mode,i=t.uid,n=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=r&c||r&l&&n===o||r&a&&i===s||r&u&&s===0;return g}});var YO=E((o$e,jO)=>{var s$e=require("fs"),xE;process.platform==="win32"||global.TESTING_WINDOWS?xE=MO():xE=GO();jO.exports=db;db.sync=ghe;function db(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(i,n){db(t,e||{},function(s,o){s?n(s):i(o)})})}xE(t,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function ghe(t,e){try{return xE.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var XO=E((a$e,qO)=>{var eu=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",JO=require("path"),fhe=eu?";":":",WO=YO(),zO=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),VO=(t,e)=>{let r=e.colon||fhe,i=t.match(/\//)||eu&&t.match(/\\/)?[""]:[...eu?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],n=eu?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=eu?n.split(r):[""];return eu&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},_O=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=VO(t,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(zO(t));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=JO.join(h,t),d=!h&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;u(l(d,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];WO(c+p,{pathExt:s},(d,m)=>{if(!d&&m)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},hhe=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=VO(t,e),s=[];for(let o=0;o{"use strict";var ZO=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Cb.exports=ZO;Cb.exports.default=ZO});var iK=E((l$e,eK)=>{"use strict";var tK=require("path"),phe=XO(),dhe=$O();function rK(t,e){let r=t.options.env||process.env,i=process.cwd(),n=t.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(t.options.cwd)}catch(a){}let o;try{o=phe.sync(t.command,{path:r[dhe({env:r})],pathExt:e?tK.delimiter:void 0})}catch(a){}finally{s&&process.chdir(i)}return o&&(o=tK.resolve(n?t.options.cwd:"",o)),o}function Che(t){return rK(t)||rK(t,!0)}eK.exports=Che});var nK=E((c$e,mb)=>{"use strict";var Eb=/([()\][%!^"`<>&|;, *?])/g;function mhe(t){return t=t.replace(Eb,"^$1"),t}function Ehe(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(Eb,"^$1"),e&&(t=t.replace(Eb,"^$1")),t}mb.exports.command=mhe;mb.exports.argument=Ehe});var oK=E((u$e,sK)=>{"use strict";sK.exports=/^#!(.*)/});var AK=E((g$e,aK)=>{"use strict";var Ihe=oK();aK.exports=(t="")=>{let e=t.match(Ihe);if(!e)return null;let[r,i]=e[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var cK=E((f$e,lK)=>{"use strict";var Ib=require("fs"),yhe=AK();function whe(t){let e=150,r=Buffer.alloc(e),i;try{i=Ib.openSync(t,"r"),Ib.readSync(i,r,0,e,0),Ib.closeSync(i)}catch(n){}return yhe(r.toString())}lK.exports=whe});var hK=E((h$e,uK)=>{"use strict";var Bhe=require("path"),gK=iK(),fK=nK(),Qhe=cK(),bhe=process.platform==="win32",vhe=/\.(?:com|exe)$/i,She=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function xhe(t){t.file=gK(t);let e=t.file&&Qhe(t.file);return e?(t.args.unshift(t.file),t.command=e,gK(t)):t.file}function khe(t){if(!bhe)return t;let e=xhe(t),r=!vhe.test(e);if(t.options.forceShell||r){let i=She.test(e);t.command=Bhe.normalize(t.command),t.command=fK.command(t.command),t.args=t.args.map(s=>fK.argument(s,i));let n=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${n}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function Phe(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let i={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?i:khe(i)}uK.exports=Phe});var CK=E((p$e,pK)=>{"use strict";var yb=process.platform==="win32";function wb(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 Dhe(t,e){if(!yb)return;let r=t.emit;t.emit=function(i,n){if(i==="exit"){let s=dK(n,e,"spawn");if(s)return r.call(t,"error",s)}return r.apply(t,arguments)}}function dK(t,e){return yb&&t===1&&!e.file?wb(e.original,"spawn"):null}function Rhe(t,e){return yb&&t===1&&!e.file?wb(e.original,"spawnSync"):null}pK.exports={hookChildProcess:Dhe,verifyENOENT:dK,verifyENOENTSync:Rhe,notFoundError:wb}});var bb=E((d$e,tu)=>{"use strict";var mK=require("child_process"),Bb=hK(),Qb=CK();function EK(t,e,r){let i=Bb(t,e,r),n=mK.spawn(i.command,i.args,i.options);return Qb.hookChildProcess(n,i),n}function Fhe(t,e,r){let i=Bb(t,e,r),n=mK.spawnSync(i.command,i.args,i.options);return n.error=n.error||Qb.verifyENOENTSync(n.status,i),n}tu.exports=EK;tu.exports.spawn=EK;tu.exports.sync=Fhe;tu.exports._parse=Bb;tu.exports._enoent=Qb});var yK=E((y$e,IK)=>{"use strict";IK.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 Nb=E((w$e,wK)=>{var gh=yK(),BK={};for(let t of Object.keys(gh))BK[gh[t]]=t;var Xe={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"]}};wK.exports=Xe;for(let t of Object.keys(Xe)){if(!("channels"in Xe[t]))throw new Error("missing channels property: "+t);if(!("labels"in Xe[t]))throw new Error("missing channel labels property: "+t);if(Xe[t].labels.length!==Xe[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=Xe[t];delete Xe[t].channels,delete Xe[t].labels,Object.defineProperty(Xe[t],"channels",{value:e}),Object.defineProperty(Xe[t],"labels",{value:r})}Xe.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(e,r,i),s=Math.max(e,r,i),o=s-n,a,l;s===n?a=0:e===s?a=(r-i)/o:r===s?a=2+(i-e)/o:i===s&&(a=4+(e-r)/o),a=Math.min(a*60,360),a<0&&(a+=360);let c=(n+s)/2;return s===n?l=0:c<=.5?l=o/(s+n):l=o/(2-s-n),[a,l*100,c*100]};Xe.rgb.hsv=function(t){let e,r,i,n,s,o=t[0]/255,a=t[1]/255,l=t[2]/255,c=Math.max(o,a,l),u=c-Math.min(o,a,l),g=function(f){return(c-f)/6/u+1/2};return u===0?(n=0,s=0):(s=u/c,e=g(o),r=g(a),i=g(l),o===c?n=i-r:a===c?n=1/3+e-i:l===c&&(n=2/3+r-e),n<0?n+=1:n>1&&(n-=1)),[n*360,s*100,c*100]};Xe.rgb.hwb=function(t){let e=t[0],r=t[1],i=t[2],n=Xe.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(r,i));return i=1-1/255*Math.max(e,Math.max(r,i)),[n,s*100,i*100]};Xe.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.min(1-e,1-r,1-i),s=(1-e-n)/(1-n)||0,o=(1-r-n)/(1-n)||0,a=(1-i-n)/(1-n)||0;return[s*100,o*100,a*100,n*100]};function The(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}Xe.rgb.keyword=function(t){let e=BK[t];if(e)return e;let r=Infinity,i;for(let n of Object.keys(gh)){let s=gh[n],o=The(t,s);o.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let n=e*.4124+r*.3576+i*.1805,s=e*.2126+r*.7152+i*.0722,o=e*.0193+r*.1192+i*.9505;return[n*100,s*100,o*100]};Xe.rgb.lab=function(t){let e=Xe.rgb.xyz(t),r=e[0],i=e[1],n=e[2];r/=95.047,i/=100,n/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let s=116*i-16,o=500*(r-i),a=200*(i-n);return[s,o,a]};Xe.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n,s,o;if(r===0)return o=i*255,[o,o,o];i<.5?n=i*(1+r):n=i+r-i*r;let a=2*i-n,l=[0,0,0];for(let c=0;c<3;c++)s=e+1/3*-(c-1),s<0&&s++,s>1&&s--,6*s<1?o=a+(n-a)*6*s:2*s<1?o=n:3*s<2?o=a+(n-a)*(2/3-s)*6:o=a,l[c]=o*255;return l};Xe.hsl.hsv=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=r,s=Math.max(i,.01);i*=2,r*=i<=1?i:2-i,n*=s<=1?s:2-s;let o=(i+r)/2,a=i===0?2*n/(s+n):2*r/(i+r);return[e,a*100,o*100]};Xe.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,i=t[2]/100,n=Math.floor(e)%6,s=e-Math.floor(e),o=255*i*(1-r),a=255*i*(1-r*s),l=255*i*(1-r*(1-s));switch(i*=255,n){case 0:return[i,l,o];case 1:return[a,i,o];case 2:return[o,i,l];case 3:return[o,a,i];case 4:return[l,o,i];case 5:return[i,o,a]}};Xe.hsv.hsl=function(t){let e=t[0],r=t[1]/100,i=t[2]/100,n=Math.max(i,.01),s,o;o=(2-r)*i;let a=(2-r)*n;return s=r*n,s/=a<=1?a:2-a,s=s||0,o/=2,[e,s*100,o*100]};Xe.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100,n=r+i,s;n>1&&(r/=n,i/=n);let o=Math.floor(6*e),a=1-i;s=6*e-o,(o&1)!=0&&(s=1-s);let l=r+s*(a-r),c,u,g;switch(o){default:case 6:case 0:c=a,u=l,g=r;break;case 1:c=l,u=a,g=r;break;case 2:c=r,u=a,g=l;break;case 3:c=r,u=l,g=a;break;case 4:c=l,u=r,g=a;break;case 5:c=a,u=r,g=l;break}return[c*255,u*255,g*255]};Xe.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n=t[3]/100,s=1-Math.min(1,e*(1-n)+n),o=1-Math.min(1,r*(1-n)+n),a=1-Math.min(1,i*(1-n)+n);return[s*255,o*255,a*255]};Xe.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,i=t[2]/100,n,s,o;return n=e*3.2406+r*-1.5372+i*-.4986,s=e*-.9689+r*1.8758+i*.0415,o=e*.0557+r*-.204+i*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),o=Math.min(Math.max(0,o),1),[n*255,s*255,o*255]};Xe.xyz.lab=function(t){let e=t[0],r=t[1],i=t[2];e/=95.047,r/=100,i/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let n=116*r-16,s=500*(e-r),o=200*(r-i);return[n,s,o]};Xe.lab.xyz=function(t){let e=t[0],r=t[1],i=t[2],n,s,o;s=(e+16)/116,n=r/500+s,o=s-i/200;let a=s**3,l=n**3,c=o**3;return s=a>.008856?a:(s-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,n*=95.047,s*=100,o*=108.883,[n,s,o]};Xe.lab.lch=function(t){let e=t[0],r=t[1],i=t[2],n;n=Math.atan2(i,r)*360/2/Math.PI,n<0&&(n+=360);let o=Math.sqrt(r*r+i*i);return[e,o,n]};Xe.lch.lab=function(t){let e=t[0],r=t[1],n=t[2]/360*2*Math.PI,s=r*Math.cos(n),o=r*Math.sin(n);return[e,s,o]};Xe.rgb.ansi16=function(t,e=null){let[r,i,n]=t,s=e===null?Xe.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let o=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return s===2&&(o+=60),o};Xe.hsv.ansi16=function(t){return Xe.rgb.ansi16(Xe.hsv.rgb(t),t[2])};Xe.rgb.ansi256=function(t){let e=t[0],r=t[1],i=t[2];return e===r&&r===i?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(i/255*5)};Xe.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,i=(e&1)*r*255,n=(e>>1&1)*r*255,s=(e>>2&1)*r*255;return[i,n,s]};Xe.ansi256.rgb=function(t){if(t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,r=Math.floor(t/36)/5*255,i=Math.floor((e=t%36)/6)/5*255,n=e%6/5*255;return[r,i,n]};Xe.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};Xe.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(a=>a+a).join(""));let i=parseInt(r,16),n=i>>16&255,s=i>>8&255,o=i&255;return[n,s,o]};Xe.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,i=t[2]/255,n=Math.max(Math.max(e,r),i),s=Math.min(Math.min(e,r),i),o=n-s,a,l;return o<1?a=s/(1-o):a=0,o<=0?l=0:n===e?l=(r-i)/o%6:n===r?l=2+(i-e)/o:l=4+(e-r)/o,l/=6,l%=1,[l*360,o*100,a*100]};Xe.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=r<.5?2*e*r:2*e*(1-r),n=0;return i<1&&(n=(r-.5*i)/(1-i)),[t[0],i*100,n*100]};Xe.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=e*r,n=0;return i<1&&(n=(r-i)/(1-i)),[t[0],i*100,n*100]};Xe.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,i=t[2]/100;if(r===0)return[i*255,i*255,i*255];let n=[0,0,0],s=e%1*6,o=s%1,a=1-o,l=0;switch(Math.floor(s)){case 0:n[0]=1,n[1]=o,n[2]=0;break;case 1:n[0]=a,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=o;break;case 3:n[0]=0,n[1]=a,n[2]=1;break;case 4:n[0]=o,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=a}return l=(1-r)*i,[(r*n[0]+l)*255,(r*n[1]+l)*255,(r*n[2]+l)*255]};Xe.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e),n=0;return i>0&&(n=e/i),[t[0],n*100,i*100]};Xe.hcg.hsl=function(t){let e=t[1]/100,i=t[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],n*100,i*100]};Xe.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,i=e+r*(1-e);return[t[0],(i-e)*100,(1-i)*100]};Xe.hwb.hcg=function(t){let e=t[1]/100,r=t[2]/100,i=1-r,n=i-e,s=0;return n<1&&(s=(i-n)/(1-n)),[t[0],n*100,s*100]};Xe.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};Xe.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};Xe.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};Xe.gray.hsl=function(t){return[0,0,t[0]]};Xe.gray.hsv=Xe.gray.hsl;Xe.gray.hwb=function(t){return[0,100,t[0]]};Xe.gray.cmyk=function(t){return[0,0,0,t[0]]};Xe.gray.lab=function(t){return[t[0],0,0]};Xe.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i};Xe.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var bK=E((B$e,QK)=>{var kE=Nb();function Mhe(){let t={},e=Object.keys(kE);for(let r=e.length,i=0;i{var Lb=Nb(),Hhe=bK(),ru={},Ghe=Object.keys(Lb);function jhe(t){let e=function(...r){let i=r[0];return i==null?i:(i.length>1&&(r=i),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function Yhe(t){let e=function(...r){let i=r[0];if(i==null)return i;i.length>1&&(r=i);let n=t(r);if(typeof n=="object")for(let s=n.length,o=0;o{ru[t]={},Object.defineProperty(ru[t],"channels",{value:Lb[t].channels}),Object.defineProperty(ru[t],"labels",{value:Lb[t].labels});let e=Hhe(t);Object.keys(e).forEach(i=>{let n=e[i];ru[t][i]=Yhe(n),ru[t][i].raw=jhe(n)})});vK.exports=ru});var FK=E((b$e,xK)=>{"use strict";var kK=(t,e)=>(...r)=>`[${t(...r)+e}m`,PK=(t,e)=>(...r)=>{let i=t(...r);return`[${38+e};5;${i}m`},DK=(t,e)=>(...r)=>{let i=t(...r);return`[${38+e};2;${i[0]};${i[1]};${i[2]}m`},PE=t=>t,RK=(t,e,r)=>[t,e,r],iu=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let i=r();return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0}),i},enumerable:!0,configurable:!0})},Tb,nu=(t,e,r,i)=>{Tb===void 0&&(Tb=SK());let n=i?10:0,s={};for(let[o,a]of Object.entries(Tb)){let l=o==="ansi16"?"ansi":o;o===e?s[l]=t(r,n):typeof a=="object"&&(s[l]=t(a[e],n))}return s};function qhe(){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,i]of Object.entries(e)){for(let[n,s]of Object.entries(i))e[n]={open:`[${s[0]}m`,close:`[${s[1]}m`},i[n]=e[n],t.set(s[0],s[1]);Object.defineProperty(e,r,{value:i,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="",e.bgColor.close="",iu(e.color,"ansi",()=>nu(kK,"ansi16",PE,!1)),iu(e.color,"ansi256",()=>nu(PK,"ansi256",PE,!1)),iu(e.color,"ansi16m",()=>nu(DK,"rgb",RK,!1)),iu(e.bgColor,"ansi",()=>nu(kK,"ansi16",PE,!0)),iu(e.bgColor,"ansi256",()=>nu(PK,"ansi256",PE,!0)),iu(e.bgColor,"ansi16m",()=>nu(DK,"rgb",RK,!0)),e}Object.defineProperty(xK,"exports",{enumerable:!0,get:qhe})});var LK=E((v$e,NK)=>{"use strict";NK.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",i=e.indexOf(r+t),n=e.indexOf("--");return i!==-1&&(n===-1||i{"use strict";var Jhe=require("os"),MK=require("tty"),Wn=LK(),{env:Wr}=process,tA;Wn("no-color")||Wn("no-colors")||Wn("color=false")||Wn("color=never")?tA=0:(Wn("color")||Wn("colors")||Wn("color=true")||Wn("color=always"))&&(tA=1);"FORCE_COLOR"in Wr&&(Wr.FORCE_COLOR==="true"?tA=1:Wr.FORCE_COLOR==="false"?tA=0:tA=Wr.FORCE_COLOR.length===0?1:Math.min(parseInt(Wr.FORCE_COLOR,10),3));function Mb(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Ob(t,e){if(tA===0)return 0;if(Wn("color=16m")||Wn("color=full")||Wn("color=truecolor"))return 3;if(Wn("color=256"))return 2;if(t&&!e&&tA===void 0)return 0;let r=tA||0;if(Wr.TERM==="dumb")return r;if(process.platform==="win32"){let i=Jhe.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in Wr)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(i=>i in Wr)||Wr.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Wr)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Wr.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in Wr)return 1;if(Wr.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Wr){let i=parseInt((Wr.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Wr.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Wr.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Wr.TERM)||"COLORTERM"in Wr?1:r}function Whe(t){let e=Ob(t,t&&t.isTTY);return Mb(e)}TK.exports={supportsColor:Whe,stdout:Mb(Ob(!0,MK.isatty(1))),stderr:Mb(Ob(!0,MK.isatty(2)))}});var UK=E((x$e,KK)=>{"use strict";var zhe=(t,e,r)=>{let i=t.indexOf(e);if(i===-1)return t;let n=e.length,s=0,o="";do o+=t.substr(s,i-s)+e+r,s=i+n,i=t.indexOf(e,s);while(i!==-1);return o+=t.substr(s),o},Vhe=(t,e,r,i)=>{let n=0,s="";do{let o=t[i-1]==="\r";s+=t.substr(n,(o?i-1:i)-n)+e+(o?`\r -`:` -`)+r,n=i+1,i=t.indexOf(` -`,n)}while(i!==-1);return s+=t.substr(n),s};KK.exports={stringReplaceAll:zhe,stringEncaseCRLFWithFirstIndex:Vhe}});var qK=E((k$e,HK)=>{"use strict";var _he=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,GK=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Xhe=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Zhe=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,$he=new Map([["n",` -`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function jK(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)):$he.get(t)||t}function epe(t,e){let r=[],i=e.trim().split(/\s*,\s*/g),n;for(let s of i){let o=Number(s);if(!Number.isNaN(o))r.push(o);else if(n=s.match(Xhe))r.push(n[2].replace(Zhe,(a,l,c)=>l?jK(l):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`)}return r}function tpe(t){GK.lastIndex=0;let e=[],r;for(;(r=GK.exec(t))!==null;){let i=r[1];if(r[2]){let n=epe(i,r[2]);e.push([i].concat(n))}else e.push([i])}return e}function YK(t,e){let r={};for(let n of e)for(let s of n.styles)r[s[0]]=n.inverse?null:s.slice(1);let i=t;for(let[n,s]of Object.entries(r))if(!!Array.isArray(s)){if(!(n in i))throw new Error(`Unknown Chalk style: ${n}`);i=s.length>0?i[n](...s):i[n]}return i}HK.exports=(t,e)=>{let r=[],i=[],n=[];if(e.replace(_he,(s,o,a,l,c,u)=>{if(o)n.push(jK(o));else if(l){let g=n.join("");n=[],i.push(r.length===0?g:YK(t,r)(g)),r.push({inverse:a,styles:tpe(l)})}else if(c){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(YK(t,r)(n.join(""))),n=[],r.pop()}else n.push(u)}),i.push(n.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return i.join("")}});var jb=E((P$e,JK)=>{"use strict";var fh=FK(),{stdout:Kb,stderr:Ub}=OK(),{stringReplaceAll:rpe,stringEncaseCRLFWithFirstIndex:ipe}=UK(),WK=["ansi","ansi","ansi256","ansi16m"],su=Object.create(null),npe=(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=Kb?Kb.level:0;t.level=e.level===void 0?r:e.level},zK=class{constructor(e){return VK(e)}},VK=t=>{let e={};return npe(e,t),e.template=(...r)=>spe(e.template,...r),Object.setPrototypeOf(e,DE.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=zK,e.template};function DE(t){return VK(t)}for(let[t,e]of Object.entries(fh))su[t]={get(){let r=RE(this,Hb(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};su.visible={get(){let t=RE(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var _K=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of _K)su[t]={get(){let{level:e}=this;return function(...r){let i=Hb(fh.color[WK[e]][t](...r),fh.color.close,this._styler);return RE(this,i,this._isEmpty)}}};for(let t of _K){let e="bg"+t[0].toUpperCase()+t.slice(1);su[e]={get(){let{level:r}=this;return function(...i){let n=Hb(fh.bgColor[WK[r]][t](...i),fh.bgColor.close,this._styler);return RE(this,n,this._isEmpty)}}}}var ope=Object.defineProperties(()=>{},_(P({},su),{level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}})),Hb=(t,e,r)=>{let i,n;return r===void 0?(i=t,n=e):(i=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:n,parent:r}},RE=(t,e,r)=>{let i=(...n)=>ape(i,n.length===1?""+n[0]:n.join(" "));return i.__proto__=ope,i._generator=t,i._styler=e,i._isEmpty=r,i},ape=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:i,closeAll:n}=r;if(e.indexOf("")!==-1)for(;r!==void 0;)e=rpe(e,r.close,r.open),r=r.parent;let s=e.indexOf(` -`);return s!==-1&&(e=ipe(e,n,i,s)),i+e+n},Gb,spe=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let i=e.slice(1),n=[r.raw[0]];for(let s=1;s{XK.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:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{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:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{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:"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:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{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",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{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"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var ml=E(Dn=>{"use strict";var $K=ZK(),ro=process.env;Object.defineProperty(Dn,"_vendors",{value:$K.map(function(t){return t.constant})});Dn.name=null;Dn.isPR=null;$K.forEach(function(t){let r=(Array.isArray(t.env)?t.env:[t.env]).every(function(i){return e1(i)});if(Dn[t.constant]=r,r)switch(Dn.name=t.name,typeof t.pr){case"string":Dn.isPR=!!ro[t.pr];break;case"object":"env"in t.pr?Dn.isPR=t.pr.env in ro&&ro[t.pr.env]!==t.pr.ne:"any"in t.pr?Dn.isPR=t.pr.any.some(function(i){return!!ro[i]}):Dn.isPR=e1(t.pr);break;default:Dn.isPR=null}});Dn.isCI=!!(ro.CI||ro.CONTINUOUS_INTEGRATION||ro.BUILD_NUMBER||ro.RUN_ID||Dn.name);function e1(t){return typeof t=="string"?!!ro[t]:Object.keys(t).every(function(e){return ro[e]===t[e]})}});var FE=E(zn=>{"use strict";zn.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;zn.find=(t,e)=>t.nodes.find(r=>r.type===e);zn.exceedsLimit=(t,e,r=1,i)=>i===!1||!zn.isInteger(t)||!zn.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=i;zn.escapeNode=(t,e=0,r)=>{let i=t.nodes[e];!i||(r&&i.type===r||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};zn.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0==0?(t.invalid=!0,!0):!1;zn.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0==0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;zn.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;zn.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);zn.flatten=(...t)=>{let e=[],r=i=>{for(let n=0;n{"use strict";var r1=FE();t1.exports=(t,e={})=>{let r=(i,n={})=>{let s=e.escapeInvalid&&r1.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a="";if(i.value)return(s||o)&&r1.isOpenOrClose(i)?"\\"+i.value:i.value;if(i.value)return i.value;if(i.nodes)for(let l of i.nodes)a+=r(l);return a};return r(t)}});var n1=E((L$e,i1)=>{"use strict";i1.exports=function(t){return typeof t=="number"?t-t==0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var f1=E((T$e,s1)=>{"use strict";var o1=n1(),El=(t,e,r)=>{if(o1(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(o1(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let i=P({relaxZeros:!0},r);typeof i.strictZeros=="boolean"&&(i.relaxZeros=i.strictZeros===!1);let n=String(i.relaxZeros),s=String(i.shorthand),o=String(i.capture),a=String(i.wrap),l=t+":"+e+"="+n+s+o+a;if(El.cache.hasOwnProperty(l))return El.cache[l].result;let c=Math.min(t,e),u=Math.max(t,e);if(Math.abs(c-u)===1){let d=t+"|"+e;return i.capture?`(${d})`:i.wrap===!1?d:`(?:${d})`}let g=A1(t)||A1(e),f={min:t,max:e,a:c,b:u},h=[],p=[];if(g&&(f.isPadded=g,f.maxLen=String(f.max).length),c<0){let d=u<0?Math.abs(u):1;p=a1(d,Math.abs(c),f,i),c=f.a=0}return u>=0&&(h=a1(c,u,f,i)),f.negatives=p,f.positives=h,f.result=Ape(p,h,i),i.capture===!0?f.result=`(${f.result})`:i.wrap!==!1&&h.length+p.length>1&&(f.result=`(?:${f.result})`),El.cache[l]=f,f.result};function Ape(t,e,r){let i=Yb(t,e,"-",!1,r)||[],n=Yb(e,t,"",!1,r)||[],s=Yb(t,e,"-?",!0,r)||[];return i.concat(s).concat(n).join("|")}function cpe(t,e){let r=1,i=1,n=l1(t,r),s=new Set([e]);for(;t<=n&&n<=e;)s.add(n),r+=1,n=l1(t,r);for(n=c1(e+1,i)-1;t1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+u1(a.count),o=c+1;continue}r.isPadded&&(g=hpe(c,r,i)),u.string=g+u.pattern+u1(u.count),s.push(u),o=c+1,a=u}return s}function Yb(t,e,r,i,n){let s=[];for(let o of t){let{string:a}=o;!i&&!g1(e,"string",a)&&s.push(r+a),i&&g1(e,"string",a)&&s.push(r+a)}return s}function upe(t,e){let r=[];for(let i=0;ie?1:e>t?-1:0}function g1(t,e,r){return t.some(i=>i[e]===r)}function l1(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function c1(t,e){return t-t%Math.pow(10,e)}function u1(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function gpe(t,e,r){return`[${t}${e-t==1?"":"-"}${e}]`}function A1(t){return/^-?(0+)\d/.test(t)}function hpe(t,e,r){if(!e.isPadded)return t;let i=Math.abs(e.maxLen-String(t).length),n=r.relaxZeros!==!1;switch(i){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:return n?`0{0,${i}}`:`0{${i}}`}}El.cache={};El.clearCache=()=>El.cache={};s1.exports=El});var Wb=E((M$e,h1)=>{"use strict";var ppe=require("util"),p1=f1(),d1=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),dpe=t=>e=>t===!0?Number(e):String(e),qb=t=>typeof t=="number"||typeof t=="string"&&t!=="",ph=t=>Number.isInteger(+t),Jb=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Cpe=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,mpe=(t,e,r)=>{if(e>0){let i=t[0]==="-"?"-":"";i&&(t=t.slice(1)),t=i+t.padStart(i?e-1:e,"0")}return r===!1?String(t):t},C1=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length{t.negatives.sort((o,a)=>oa?1:0),t.positives.sort((o,a)=>oa?1:0);let r=e.capture?"":"?:",i="",n="",s;return t.positives.length&&(i=t.positives.join("|")),t.negatives.length&&(n=`-(${r}${t.negatives.join("|")})`),i&&n?s=`${i}|${n}`:s=i||n,e.wrap?`(${r}${s})`:s},m1=(t,e,r,i)=>{if(r)return p1(t,e,P({wrap:!1},i));let n=String.fromCharCode(t);if(t===e)return n;let s=String.fromCharCode(e);return`[${n}-${s}]`},E1=(t,e,r)=>{if(Array.isArray(t)){let i=r.wrap===!0,n=r.capture?"":"?:";return i?`(${n}${t.join("|")})`:t.join("|")}return p1(t,e,r)},I1=(...t)=>new RangeError("Invalid range arguments: "+ppe.inspect(...t)),y1=(t,e,r)=>{if(r.strictRanges===!0)throw I1([t,e]);return[]},Ipe=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},ype=(t,e,r=1,i={})=>{let n=Number(t),s=Number(e);if(!Number.isInteger(n)||!Number.isInteger(s)){if(i.strictRanges===!0)throw I1([t,e]);return[]}n===0&&(n=0),s===0&&(s=0);let o=n>s,a=String(t),l=String(e),c=String(r);r=Math.max(Math.abs(r),1);let u=Jb(a)||Jb(l)||Jb(c),g=u?Math.max(a.length,l.length,c.length):0,f=u===!1&&Cpe(t,e,i)===!1,h=i.transform||dpe(f);if(i.toRegex&&r===1)return m1(C1(t,g),C1(e,g),!0,i);let p={negatives:[],positives:[]},d=B=>p[B<0?"negatives":"positives"].push(Math.abs(B)),m=[],I=0;for(;o?n>=s:n<=s;)i.toRegex===!0&&r>1?d(n):m.push(mpe(h(n,I),g,f)),n=o?n-r:n+r,I++;return i.toRegex===!0?r>1?Epe(p,i):E1(m,null,P({wrap:!1},i)):m},wpe=(t,e,r=1,i={})=>{if(!ph(t)&&t.length>1||!ph(e)&&e.length>1)return y1(t,e,i);let n=i.transform||(f=>String.fromCharCode(f)),s=`${t}`.charCodeAt(0),o=`${e}`.charCodeAt(0),a=s>o,l=Math.min(s,o),c=Math.max(s,o);if(i.toRegex&&r===1)return m1(l,c,!1,i);let u=[],g=0;for(;a?s>=o:s<=o;)u.push(n(s,g)),s=a?s-r:s+r,g++;return i.toRegex===!0?E1(u,null,{wrap:!1,options:i}):u},LE=(t,e,r,i={})=>{if(e==null&&qb(t))return[t];if(!qb(t)||!qb(e))return y1(t,e,i);if(typeof r=="function")return LE(t,e,1,{transform:r});if(d1(r))return LE(t,e,0,r);let n=P({},i);return n.capture===!0&&(n.wrap=!0),r=r||n.step||1,ph(r)?ph(t)&&ph(e)?ype(t,e,r,n):wpe(t,e,Math.max(Math.abs(r),1),n):r!=null&&!d1(r)?Ipe(r,n):LE(t,e,1,r)};h1.exports=LE});var Q1=E((O$e,w1)=>{"use strict";var Bpe=Wb(),B1=FE(),Qpe=(t,e={})=>{let r=(i,n={})=>{let s=B1.isInvalidBrace(n),o=i.invalid===!0&&e.escapeInvalid===!0,a=s===!0||o===!0,l=e.escapeInvalid===!0?"\\":"",c="";if(i.isOpen===!0||i.isClose===!0)return l+i.value;if(i.type==="open")return a?l+i.value:"(";if(i.type==="close")return a?l+i.value:")";if(i.type==="comma")return i.prev.type==="comma"?"":a?i.value:"|";if(i.value)return i.value;if(i.nodes&&i.ranges>0){let u=B1.reduce(i.nodes),g=Bpe(...u,_(P({},e),{wrap:!1,toRegex:!0}));if(g.length!==0)return u.length>1&&g.length>1?`(${g})`:g}if(i.nodes)for(let u of i.nodes)c+=r(u,i);return c};return r(t)};w1.exports=Qpe});var S1=E((K$e,b1)=>{"use strict";var bpe=Wb(),v1=NE(),ou=FE(),Il=(t="",e="",r=!1)=>{let i=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?ou.flatten(e).map(n=>`{${n}}`):e;for(let n of t)if(Array.isArray(n))for(let s of n)i.push(Il(s,e,r));else for(let s of e)r===!0&&typeof s=="string"&&(s=`{${s}}`),i.push(Array.isArray(s)?Il(n,s,r):n+s);return ou.flatten(i)},vpe=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,i=(n,s={})=>{n.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(n.invalid||n.dollar){a.push(Il(a.pop(),v1(n,e)));return}if(n.type==="brace"&&n.invalid!==!0&&n.nodes.length===2){a.push(Il(a.pop(),["{}"]));return}if(n.nodes&&n.ranges>0){let g=ou.reduce(n.nodes);if(ou.exceedsLimit(...g,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=bpe(...g,e);f.length===0&&(f=v1(n,e)),a.push(Il(a.pop(),f)),n.nodes=[];return}let l=ou.encloseBrace(n),c=n.queue,u=n;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,c=u.queue;for(let g=0;g{"use strict";x1.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:` -`,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:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var N1=E((H$e,P1)=>{"use strict";var Spe=NE(),{MAX_LENGTH:D1,CHAR_BACKSLASH:zb,CHAR_BACKTICK:xpe,CHAR_COMMA:kpe,CHAR_DOT:Ppe,CHAR_LEFT_PARENTHESES:Dpe,CHAR_RIGHT_PARENTHESES:Rpe,CHAR_LEFT_CURLY_BRACE:Fpe,CHAR_RIGHT_CURLY_BRACE:Npe,CHAR_LEFT_SQUARE_BRACKET:R1,CHAR_RIGHT_SQUARE_BRACKET:F1,CHAR_DOUBLE_QUOTE:Lpe,CHAR_SINGLE_QUOTE:Tpe,CHAR_NO_BREAK_SPACE:Mpe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Ope}=k1(),Kpe=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(D1,r.maxLength):D1;if(t.length>i)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);let n={type:"root",input:t,nodes:[]},s=[n],o=n,a=n,l=0,c=t.length,u=0,g=0,f,h={},p=()=>t[u++],d=m=>{if(m.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&m.type==="text"){a.value+=m.value;return}return o.nodes.push(m),m.parent=o,m.prev=a,a=m,m};for(d({type:"bos"});u0){if(o.ranges>0){o.ranges=0;let m=o.nodes.shift();o.nodes=[m,{type:"text",value:Spe(o)}]}d({type:"comma",value:f}),o.commas++;continue}if(f===Ppe&&g>0&&o.commas===0){let m=o.nodes;if(g===0||m.length===0){d({type:"text",value:f});continue}if(a.type==="dot"){if(o.range=[],a.value+=f,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){m.pop();let I=m[m.length-1];I.value+=a.value+f,a=I,o.ranges--;continue}d({type:"dot",value:f});continue}d({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(B=>{B.nodes||(B.type==="open"&&(B.isOpen=!0),B.type==="close"&&(B.isClose=!0),B.nodes||(B.type="text"),B.invalid=!0)});let m=s[s.length-1],I=m.nodes.indexOf(o);m.nodes.splice(I,1,...o.nodes)}while(s.length>0);return d({type:"eos"}),n};P1.exports=Kpe});var M1=E((G$e,L1)=>{"use strict";var T1=NE(),Upe=Q1(),Hpe=S1(),Gpe=N1(),Rn=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=Rn.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(Rn.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Rn.parse=(t,e={})=>Gpe(t,e);Rn.stringify=(t,e={})=>typeof t=="string"?T1(Rn.parse(t,e),e):T1(t,e);Rn.compile=(t,e={})=>(typeof t=="string"&&(t=Rn.parse(t,e)),Upe(t,e));Rn.expand=(t,e={})=>{typeof t=="string"&&(t=Rn.parse(t,e));let r=Hpe(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Rn.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Rn.compile(t,e):Rn.expand(t,e);L1.exports=Rn});var dh=E((j$e,O1)=>{"use strict";var jpe=require("path"),io="\\\\/",K1=`[^${io}]`,ea="\\.",Ype="\\+",qpe="\\?",TE="\\/",Jpe="(?=.)",U1="[^/]",Vb=`(?:${TE}|$)`,H1=`(?:^|${TE})`,_b=`${ea}{1,2}${Vb}`,Wpe=`(?!${ea})`,zpe=`(?!${H1}${_b})`,Vpe=`(?!${ea}{0,1}${Vb})`,_pe=`(?!${_b})`,Xpe=`[^.${TE}]`,Zpe=`${U1}*?`,G1={DOT_LITERAL:ea,PLUS_LITERAL:Ype,QMARK_LITERAL:qpe,SLASH_LITERAL:TE,ONE_CHAR:Jpe,QMARK:U1,END_ANCHOR:Vb,DOTS_SLASH:_b,NO_DOT:Wpe,NO_DOTS:zpe,NO_DOT_SLASH:Vpe,NO_DOTS_SLASH:_pe,QMARK_NO_DOT:Xpe,STAR:Zpe,START_ANCHOR:H1},$pe=_(P({},G1),{SLASH_LITERAL:`[${io}]`,QMARK:K1,STAR:`${K1}*?`,DOTS_SLASH:`${ea}{1,2}(?:[${io}]|$)`,NO_DOT:`(?!${ea})`,NO_DOTS:`(?!(?:^|[${io}])${ea}{1,2}(?:[${io}]|$))`,NO_DOT_SLASH:`(?!${ea}{0,1}(?:[${io}]|$))`,NO_DOTS_SLASH:`(?!${ea}{1,2}(?:[${io}]|$))`,QMARK_NO_DOT:`[^.${io}]`,START_ANCHOR:`(?:^|[${io}])`,END_ANCHOR:`(?:[${io}]|$)`}),ede={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"};O1.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:ede,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:jpe.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?$pe:G1}}});var Ch=E(cn=>{"use strict";var tde=require("path"),rde=process.platform==="win32",{REGEX_BACKSLASH:ide,REGEX_REMOVE_BACKSLASH:nde,REGEX_SPECIAL_CHARS:sde,REGEX_SPECIAL_CHARS_GLOBAL:ode}=dh();cn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);cn.hasRegexChars=t=>sde.test(t);cn.isRegexChar=t=>t.length===1&&cn.hasRegexChars(t);cn.escapeRegex=t=>t.replace(ode,"\\$1");cn.toPosixSlashes=t=>t.replace(ide,"/");cn.removeBackslashes=t=>t.replace(nde,e=>e==="\\"?"":e);cn.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};cn.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:rde===!0||tde.sep==="\\";cn.escapeLast=(t,e,r)=>{let i=t.lastIndexOf(e,r);return i===-1?t:t[i-1]==="\\"?cn.escapeLast(t,e,i-1):`${t.slice(0,i)}\\${t.slice(i)}`};cn.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};cn.wrapOutput=(t,e={},r={})=>{let i=r.contains?"":"^",n=r.contains?"":"$",s=`${i}(?:${t})${n}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var X1=E((q$e,j1)=>{"use strict";var Y1=Ch(),{CHAR_ASTERISK:Xb,CHAR_AT:ade,CHAR_BACKWARD_SLASH:mh,CHAR_COMMA:Ade,CHAR_DOT:Zb,CHAR_EXCLAMATION_MARK:q1,CHAR_FORWARD_SLASH:J1,CHAR_LEFT_CURLY_BRACE:$b,CHAR_LEFT_PARENTHESES:ev,CHAR_LEFT_SQUARE_BRACKET:lde,CHAR_PLUS:cde,CHAR_QUESTION_MARK:W1,CHAR_RIGHT_CURLY_BRACE:ude,CHAR_RIGHT_PARENTHESES:z1,CHAR_RIGHT_SQUARE_BRACKET:gde}=dh(),V1=t=>t===J1||t===mh,_1=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?Infinity:1)},fde=(t,e)=>{let r=e||{},i=t.length-1,n=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],l=t,c=-1,u=0,g=0,f=!1,h=!1,p=!1,d=!1,m=!1,I=!1,B=!1,b=!1,R=!1,H=0,L,K,J={value:"",depth:0,isGlob:!1},ne=()=>c>=i,q=()=>l.charCodeAt(c+1),A=()=>(L=K,l.charCodeAt(++c));for(;c0&&(W=l.slice(0,u),l=l.slice(u),g-=u),V&&p===!0&&g>0?(V=l.slice(0,g),X=l.slice(g)):p===!0?(V="",X=l):V=l,V&&V!==""&&V!=="/"&&V!==l&&V1(V.charCodeAt(V.length-1))&&(V=V.slice(0,-1)),r.unescape===!0&&(X&&(X=Y1.removeBackslashes(X)),V&&B===!0&&(V=Y1.removeBackslashes(V)));let F={prefix:W,input:t,start:u,base:V,glob:X,isBrace:f,isBracket:h,isGlob:p,isExtglob:d,isGlobstar:m,negated:b};if(r.tokens===!0&&(F.maxDepth=0,V1(K)||o.push(J),F.tokens=o),r.parts===!0||r.tokens===!0){let D;for(let he=0;he{"use strict";var ME=dh(),Fn=Ch(),{MAX_LENGTH:OE,POSIX_REGEX_SOURCE:hde,REGEX_NON_SPECIAL_CHARS:pde,REGEX_SPECIAL_CHARS_BACKREF:dde,REPLACEMENTS:$1}=ME,Cde=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch(i){return t.map(n=>Fn.escapeRegex(n)).join("..")}return r},au=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,eU=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=$1[t]||t;let r=P({},e),i=typeof r.maxLength=="number"?Math.min(OE,r.maxLength):OE,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",l=Fn.isWindows(e),c=ME.globChars(l),u=ME.extglobChars(c),{DOT_LITERAL:g,PLUS_LITERAL:f,SLASH_LITERAL:h,ONE_CHAR:p,DOTS_SLASH:d,NO_DOT:m,NO_DOT_SLASH:I,NO_DOTS_SLASH:B,QMARK:b,QMARK_NO_DOT:R,STAR:H,START_ANCHOR:L}=c,K=G=>`(${a}(?:(?!${L}${G.dot?d:g}).)*?)`,J=r.dot?"":m,ne=r.dot?b:R,q=r.bash===!0?K(r):H;r.capture&&(q=`(${q})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let A={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:o};t=Fn.removePrefix(t,A),n=t.length;let V=[],W=[],X=[],F=s,D,he=()=>A.index===n-1,pe=A.peek=(G=1)=>t[A.index+G],Ne=A.advance=()=>t[++A.index],Pe=()=>t.slice(A.index+1),qe=(G="",Ce=0)=>{A.consumed+=G,A.index+=Ce},re=G=>{A.output+=G.output!=null?G.output:G.value,qe(G.value)},se=()=>{let G=1;for(;pe()==="!"&&(pe(2)!=="("||pe(3)==="?");)Ne(),A.start++,G++;return G%2==0?!1:(A.negated=!0,A.start++,!0)},be=G=>{A[G]++,X.push(G)},ae=G=>{A[G]--,X.pop()},Ae=G=>{if(F.type==="globstar"){let Ce=A.braces>0&&(G.type==="comma"||G.type==="brace"),ee=G.extglob===!0||V.length&&(G.type==="pipe"||G.type==="paren");G.type!=="slash"&&G.type!=="paren"&&!Ce&&!ee&&(A.output=A.output.slice(0,-F.output.length),F.type="star",F.value="*",F.output=q,A.output+=F.output)}if(V.length&&G.type!=="paren"&&!u[G.value]&&(V[V.length-1].inner+=G.value),(G.value||G.output)&&re(G),F&&F.type==="text"&&G.type==="text"){F.value+=G.value,F.output=(F.output||"")+G.value;return}G.prev=F,o.push(G),F=G},De=(G,Ce)=>{let ee=_(P({},u[Ce]),{conditions:1,inner:""});ee.prev=F,ee.parens=A.parens,ee.output=A.output;let Ue=(r.capture?"(":"")+ee.open;be("parens"),Ae({type:G,value:Ce,output:A.output?"":p}),Ae({type:"paren",extglob:!0,value:Ne(),output:Ue}),V.push(ee)},$=G=>{let Ce=G.close+(r.capture?")":"");if(G.type==="negate"){let ee=q;G.inner&&G.inner.length>1&&G.inner.includes("/")&&(ee=K(r)),(ee!==q||he()||/^\)+$/.test(Pe()))&&(Ce=G.close=`)$))${ee}`),G.prev.type==="bos"&&(A.negatedExtglob=!0)}Ae({type:"paren",extglob:!0,value:D,output:Ce}),ae("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let G=!1,Ce=t.replace(dde,(ee,Ue,Oe,vt,dt,ri)=>vt==="\\"?(G=!0,ee):vt==="?"?Ue?Ue+vt+(dt?b.repeat(dt.length):""):ri===0?ne+(dt?b.repeat(dt.length):""):b.repeat(Oe.length):vt==="."?g.repeat(Oe.length):vt==="*"?Ue?Ue+vt+(dt?q:""):q:Ue?ee:`\\${ee}`);return G===!0&&(r.unescape===!0?Ce=Ce.replace(/\\/g,""):Ce=Ce.replace(/\\+/g,ee=>ee.length%2==0?"\\\\":ee?"\\":"")),Ce===t&&r.contains===!0?(A.output=t,A):(A.output=Fn.wrapOutput(Ce,A,e),A)}for(;!he();){if(D=Ne(),D==="\0")continue;if(D==="\\"){let ee=pe();if(ee==="/"&&r.bash!==!0||ee==="."||ee===";")continue;if(!ee){D+="\\",Ae({type:"text",value:D});continue}let Ue=/^\\+/.exec(Pe()),Oe=0;if(Ue&&Ue[0].length>2&&(Oe=Ue[0].length,A.index+=Oe,Oe%2!=0&&(D+="\\")),r.unescape===!0?D=Ne()||"":D+=Ne()||"",A.brackets===0){Ae({type:"text",value:D});continue}}if(A.brackets>0&&(D!=="]"||F.value==="["||F.value==="[^")){if(r.posix!==!1&&D===":"){let ee=F.value.slice(1);if(ee.includes("[")&&(F.posix=!0,ee.includes(":"))){let Ue=F.value.lastIndexOf("["),Oe=F.value.slice(0,Ue),vt=F.value.slice(Ue+2),dt=hde[vt];if(dt){F.value=Oe+dt,A.backtrack=!0,Ne(),!s.output&&o.indexOf(F)===1&&(s.output=p);continue}}}(D==="["&&pe()!==":"||D==="-"&&pe()==="]")&&(D=`\\${D}`),D==="]"&&(F.value==="["||F.value==="[^")&&(D=`\\${D}`),r.posix===!0&&D==="!"&&F.value==="["&&(D="^"),F.value+=D,re({value:D});continue}if(A.quotes===1&&D!=='"'){D=Fn.escapeRegex(D),F.value+=D,re({value:D});continue}if(D==='"'){A.quotes=A.quotes===1?0:1,r.keepQuotes===!0&&Ae({type:"text",value:D});continue}if(D==="("){be("parens"),Ae({type:"paren",value:D});continue}if(D===")"){if(A.parens===0&&r.strictBrackets===!0)throw new SyntaxError(au("opening","("));let ee=V[V.length-1];if(ee&&A.parens===ee.parens+1){$(V.pop());continue}Ae({type:"paren",value:D,output:A.parens?")":"\\)"}),ae("parens");continue}if(D==="["){if(r.nobracket===!0||!Pe().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(au("closing","]"));D=`\\${D}`}else be("brackets");Ae({type:"bracket",value:D});continue}if(D==="]"){if(r.nobracket===!0||F&&F.type==="bracket"&&F.value.length===1){Ae({type:"text",value:D,output:`\\${D}`});continue}if(A.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(au("opening","["));Ae({type:"text",value:D,output:`\\${D}`});continue}ae("brackets");let ee=F.value.slice(1);if(F.posix!==!0&&ee[0]==="^"&&!ee.includes("/")&&(D=`/${D}`),F.value+=D,re({value:D}),r.literalBrackets===!1||Fn.hasRegexChars(ee))continue;let Ue=Fn.escapeRegex(F.value);if(A.output=A.output.slice(0,-F.value.length),r.literalBrackets===!0){A.output+=Ue,F.value=Ue;continue}F.value=`(${a}${Ue}|${F.value})`,A.output+=F.value;continue}if(D==="{"&&r.nobrace!==!0){be("braces");let ee={type:"brace",value:D,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};W.push(ee),Ae(ee);continue}if(D==="}"){let ee=W[W.length-1];if(r.nobrace===!0||!ee){Ae({type:"text",value:D,output:D});continue}let Ue=")";if(ee.dots===!0){let Oe=o.slice(),vt=[];for(let dt=Oe.length-1;dt>=0&&(o.pop(),Oe[dt].type!=="brace");dt--)Oe[dt].type!=="dots"&&vt.unshift(Oe[dt].value);Ue=Cde(vt,r),A.backtrack=!0}if(ee.comma!==!0&&ee.dots!==!0){let Oe=A.output.slice(0,ee.outputIndex),vt=A.tokens.slice(ee.tokensIndex);ee.value=ee.output="\\{",D=Ue="\\}",A.output=Oe;for(let dt of vt)A.output+=dt.output||dt.value}Ae({type:"brace",value:D,output:Ue}),ae("braces"),W.pop();continue}if(D==="|"){V.length>0&&V[V.length-1].conditions++,Ae({type:"text",value:D});continue}if(D===","){let ee=D,Ue=W[W.length-1];Ue&&X[X.length-1]==="braces"&&(Ue.comma=!0,ee="|"),Ae({type:"comma",value:D,output:ee});continue}if(D==="/"){if(F.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",o.pop(),F=s;continue}Ae({type:"slash",value:D,output:h});continue}if(D==="."){if(A.braces>0&&F.type==="dot"){F.value==="."&&(F.output=g);let ee=W[W.length-1];F.type="dots",F.output+=D,F.value+=D,ee.dots=!0;continue}if(A.braces+A.parens===0&&F.type!=="bos"&&F.type!=="slash"){Ae({type:"text",value:D,output:g});continue}Ae({type:"dot",value:D,output:g});continue}if(D==="?"){if(!(F&&F.value==="(")&&r.noextglob!==!0&&pe()==="("&&pe(2)!=="?"){De("qmark",D);continue}if(F&&F.type==="paren"){let Ue=pe(),Oe=D;if(Ue==="<"&&!Fn.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(F.value==="("&&!/[!=<:]/.test(Ue)||Ue==="<"&&!/<([!=]|\w+>)/.test(Pe()))&&(Oe=`\\${D}`),Ae({type:"text",value:D,output:Oe});continue}if(r.dot!==!0&&(F.type==="slash"||F.type==="bos")){Ae({type:"qmark",value:D,output:R});continue}Ae({type:"qmark",value:D,output:b});continue}if(D==="!"){if(r.noextglob!==!0&&pe()==="("&&(pe(2)!=="?"||!/[!=<:]/.test(pe(3)))){De("negate",D);continue}if(r.nonegate!==!0&&A.index===0){se();continue}}if(D==="+"){if(r.noextglob!==!0&&pe()==="("&&pe(2)!=="?"){De("plus",D);continue}if(F&&F.value==="("||r.regex===!1){Ae({type:"plus",value:D,output:f});continue}if(F&&(F.type==="bracket"||F.type==="paren"||F.type==="brace")||A.parens>0){Ae({type:"plus",value:D});continue}Ae({type:"plus",value:f});continue}if(D==="@"){if(r.noextglob!==!0&&pe()==="("&&pe(2)!=="?"){Ae({type:"at",extglob:!0,value:D,output:""});continue}Ae({type:"text",value:D});continue}if(D!=="*"){(D==="$"||D==="^")&&(D=`\\${D}`);let ee=pde.exec(Pe());ee&&(D+=ee[0],A.index+=ee[0].length),Ae({type:"text",value:D});continue}if(F&&(F.type==="globstar"||F.star===!0)){F.type="star",F.star=!0,F.value+=D,F.output=q,A.backtrack=!0,A.globstar=!0,qe(D);continue}let G=Pe();if(r.noextglob!==!0&&/^\([^?]/.test(G)){De("star",D);continue}if(F.type==="star"){if(r.noglobstar===!0){qe(D);continue}let ee=F.prev,Ue=ee.prev,Oe=ee.type==="slash"||ee.type==="bos",vt=Ue&&(Ue.type==="star"||Ue.type==="globstar");if(r.bash===!0&&(!Oe||G[0]&&G[0]!=="/")){Ae({type:"star",value:D,output:""});continue}let dt=A.braces>0&&(ee.type==="comma"||ee.type==="brace"),ri=V.length&&(ee.type==="pipe"||ee.type==="paren");if(!Oe&&ee.type!=="paren"&&!dt&&!ri){Ae({type:"star",value:D,output:""});continue}for(;G.slice(0,3)==="/**";){let ii=t[A.index+4];if(ii&&ii!=="/")break;G=G.slice(3),qe("/**",3)}if(ee.type==="bos"&&he()){F.type="globstar",F.value+=D,F.output=K(r),A.output=F.output,A.globstar=!0,qe(D);continue}if(ee.type==="slash"&&ee.prev.type!=="bos"&&!vt&&he()){A.output=A.output.slice(0,-(ee.output+F.output).length),ee.output=`(?:${ee.output}`,F.type="globstar",F.output=K(r)+(r.strictSlashes?")":"|$)"),F.value+=D,A.globstar=!0,A.output+=ee.output+F.output,qe(D);continue}if(ee.type==="slash"&&ee.prev.type!=="bos"&&G[0]==="/"){let ii=G[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(ee.output+F.output).length),ee.output=`(?:${ee.output}`,F.type="globstar",F.output=`${K(r)}${h}|${h}${ii})`,F.value+=D,A.output+=ee.output+F.output,A.globstar=!0,qe(D+Ne()),Ae({type:"slash",value:"/",output:""});continue}if(ee.type==="bos"&&G[0]==="/"){F.type="globstar",F.value+=D,F.output=`(?:^|${h}|${K(r)}${h})`,A.output=F.output,A.globstar=!0,qe(D+Ne()),Ae({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-F.output.length),F.type="globstar",F.output=K(r),F.value+=D,A.output+=F.output,A.globstar=!0,qe(D);continue}let Ce={type:"star",value:D,output:q};if(r.bash===!0){Ce.output=".*?",(F.type==="bos"||F.type==="slash")&&(Ce.output=J+Ce.output),Ae(Ce);continue}if(F&&(F.type==="bracket"||F.type==="paren")&&r.regex===!0){Ce.output=D,Ae(Ce);continue}(A.index===A.start||F.type==="slash"||F.type==="dot")&&(F.type==="dot"?(A.output+=I,F.output+=I):r.dot===!0?(A.output+=B,F.output+=B):(A.output+=J,F.output+=J),pe()!=="*"&&(A.output+=p,F.output+=p)),Ae(Ce)}for(;A.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(au("closing","]"));A.output=Fn.escapeLast(A.output,"["),ae("brackets")}for(;A.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(au("closing",")"));A.output=Fn.escapeLast(A.output,"("),ae("parens")}for(;A.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(au("closing","}"));A.output=Fn.escapeLast(A.output,"{"),ae("braces")}if(r.strictSlashes!==!0&&(F.type==="star"||F.type==="bracket")&&Ae({type:"maybe_slash",value:"",output:`${h}?`}),A.backtrack===!0){A.output="";for(let G of A.tokens)A.output+=G.output!=null?G.output:G.value,G.suffix&&(A.output+=G.suffix)}return A};eU.fastpaths=(t,e)=>{let r=P({},e),i=typeof r.maxLength=="number"?Math.min(OE,r.maxLength):OE,n=t.length;if(n>i)throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${i}`);t=$1[t]||t;let s=Fn.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:l,DOTS_SLASH:c,NO_DOT:u,NO_DOTS:g,NO_DOTS_SLASH:f,STAR:h,START_ANCHOR:p}=ME.globChars(s),d=r.dot?g:u,m=r.dot?f:u,I=r.capture?"":"?:",B={negated:!1,prefix:""},b=r.bash===!0?".*?":h;r.capture&&(b=`(${b})`);let R=J=>J.noglobstar===!0?b:`(${I}(?:(?!${p}${J.dot?c:o}).)*?)`,H=J=>{switch(J){case"*":return`${d}${l}${b}`;case".*":return`${o}${l}${b}`;case"*.*":return`${d}${b}${o}${l}${b}`;case"*/*":return`${d}${b}${a}${l}${m}${b}`;case"**":return d+R(r);case"**/*":return`(?:${d}${R(r)}${a})?${m}${l}${b}`;case"**/*.*":return`(?:${d}${R(r)}${a})?${m}${b}${o}${l}${b}`;case"**/.*":return`(?:${d}${R(r)}${a})?${o}${l}${b}`;default:{let ne=/^(.*?)\.(\w+)$/.exec(J);if(!ne)return;let q=H(ne[1]);return q?q+o+ne[2]:void 0}}},L=Fn.removePrefix(t,B),K=H(L);return K&&r.strictSlashes!==!0&&(K+=`${a}?`),K};Z1.exports=eU});var iU=E((W$e,rU)=>{"use strict";var mde=require("path"),Ede=X1(),tv=tU(),rv=Ch(),Ide=dh(),yde=t=>t&&typeof t=="object"&&!Array.isArray(t),Dr=(t,e,r=!1)=>{if(Array.isArray(t)){let u=t.map(f=>Dr(f,e,r));return f=>{for(let h of u){let p=h(f);if(p)return p}return!1}}let i=yde(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!i)throw new TypeError("Expected pattern to be a non-empty string");let n=e||{},s=rv.isWindows(e),o=i?Dr.compileRe(t,e):Dr.makeRe(t,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(n.ignore){let u=_(P({},e),{ignore:null,onMatch:null,onResult:null});l=Dr(n.ignore,u,r)}let c=(u,g=!1)=>{let{isMatch:f,match:h,output:p}=Dr.test(u,o,e,{glob:t,posix:s}),d={glob:t,state:a,regex:o,posix:s,input:u,output:p,match:h,isMatch:f};return typeof n.onResult=="function"&&n.onResult(d),f===!1?(d.isMatch=!1,g?d:!1):l(u)?(typeof n.onIgnore=="function"&&n.onIgnore(d),d.isMatch=!1,g?d:!1):(typeof n.onMatch=="function"&&n.onMatch(d),g?d:!0)};return r&&(c.state=a),c};Dr.test=(t,e,r,{glob:i,posix:n}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(n?rv.toPosixSlashes:null),a=t===i,l=a&&o?o(t):t;return a===!1&&(l=o?o(t):t,a=l===i),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Dr.matchBase(t,e,r,n):a=e.exec(l)),{isMatch:Boolean(a),match:a,output:l}};Dr.matchBase=(t,e,r,i=rv.isWindows(r))=>(e instanceof RegExp?e:Dr.makeRe(e,r)).test(mde.basename(t));Dr.isMatch=(t,e,r)=>Dr(e,r)(t);Dr.parse=(t,e)=>Array.isArray(t)?t.map(r=>Dr.parse(r,e)):tv(t,_(P({},e),{fastpaths:!1}));Dr.scan=(t,e)=>Ede(t,e);Dr.compileRe=(t,e,r=!1,i=!1)=>{if(r===!0)return t.output;let n=e||{},s=n.contains?"":"^",o=n.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let l=Dr.toRegex(a,e);return i===!0&&(l.state=t),l};Dr.makeRe=(t,e,r=!1,i=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let n=e||{},s={negated:!1,fastpaths:!0},o="",a;return t.startsWith("./")&&(t=t.slice(2),o=s.prefix="./"),n.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(a=tv.fastpaths(t,e)),a===void 0?(s=tv(t,e),s.prefix=o+(s.prefix||"")):s.output=a,Dr.compileRe(s,e,r,i)};Dr.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/$^/}};Dr.constants=Ide;rU.exports=Dr});var iv=E((z$e,nU)=>{"use strict";nU.exports=iU()});var Nn=E((V$e,sU)=>{"use strict";var oU=require("util"),aU=M1(),no=iv(),nv=Ch(),AU=t=>typeof t=="string"&&(t===""||t==="./"),pr=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let i=new Set,n=new Set,s=new Set,o=0,a=u=>{s.add(u.output),r&&r.onResult&&r.onResult(u)};for(let u=0;u!i.has(u));if(r&&c.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(u=>u.replace(/\\/g,"")):e}return c};pr.match=pr;pr.matcher=(t,e)=>no(t,e);pr.isMatch=(t,e,r)=>no(e,r)(t);pr.any=pr.isMatch;pr.not=(t,e,r={})=>{e=[].concat(e).map(String);let i=new Set,n=[],s=a=>{r.onResult&&r.onResult(a),n.push(a.output)},o=pr(t,e,_(P({},r),{onResult:s}));for(let a of n)o.includes(a)||i.add(a);return[...i]};pr.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${oU.inspect(t)}"`);if(Array.isArray(e))return e.some(i=>pr.contains(t,i,r));if(typeof e=="string"){if(AU(t)||AU(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return pr.isMatch(t,e,_(P({},r),{contains:!0}))};pr.matchKeys=(t,e,r)=>{if(!nv.isObject(t))throw new TypeError("Expected the first argument to be an object");let i=pr(Object.keys(t),e,r),n={};for(let s of i)n[s]=t[s];return n};pr.some=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=no(String(n),r);if(i.some(o=>s(o)))return!0}return!1};pr.every=(t,e,r)=>{let i=[].concat(t);for(let n of[].concat(e)){let s=no(String(n),r);if(!i.every(o=>s(o)))return!1}return!0};pr.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${oU.inspect(t)}"`);return[].concat(e).every(i=>no(i,r)(t))};pr.capture=(t,e,r)=>{let i=nv.isWindows(r),s=no.makeRe(String(t),_(P({},r),{capture:!0})).exec(i?nv.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};pr.makeRe=(...t)=>no.makeRe(...t);pr.scan=(...t)=>no.scan(...t);pr.parse=(t,e)=>{let r=[];for(let i of[].concat(t||[]))for(let n of aU(String(i),e))r.push(no.parse(n,e));return r};pr.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:aU(t,e)};pr.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return pr.braces(t,_(P({},e),{expand:!0}))};sU.exports=pr});var cU=E((_$e,lU)=>{"use strict";lU.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[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 gU=E((X$e,uU)=>{"use strict";var wde=cU();uU.exports=t=>typeof t=="string"?t.replace(wde(),""):t});var lu={};it(lu,{KeyRelationship:()=>Bl,applyCascade:()=>fv,base64RegExp:()=>CU,colorStringAlphaRegExp:()=>dU,colorStringRegExp:()=>pU,computeKey:()=>rA,getPrintable:()=>Mr,hasExactLength:()=>wU,hasForbiddenKeys:()=>eCe,hasKeyRelationship:()=>pv,hasMaxLength:()=>Mde,hasMinLength:()=>Tde,hasMutuallyExclusiveKeys:()=>tCe,hasRequiredKeys:()=>$de,hasUniqueItems:()=>Ode,isArray:()=>xde,isAtLeast:()=>Hde,isAtMost:()=>Gde,isBase64:()=>Xde,isBoolean:()=>bde,isDate:()=>Sde,isDict:()=>Pde,isEnum:()=>Yi,isHexColor:()=>_de,isISO8601:()=>Vde,isInExclusiveRange:()=>Yde,isInInclusiveRange:()=>jde,isInstanceOf:()=>Rde,isInteger:()=>qde,isJSON:()=>Zde,isLiteral:()=>Bde,isLowerCase:()=>Jde,isNegative:()=>Kde,isNullable:()=>Lde,isNumber:()=>vde,isObject:()=>Dde,isOneOf:()=>Fde,isOptional:()=>Nde,isPositive:()=>Ude,isString:()=>gv,isTuple:()=>kde,isUUID4:()=>zde,isUnknown:()=>yU,isUpperCase:()=>Wde,iso8601RegExp:()=>uv,makeCoercionFn:()=>wl,makeSetter:()=>IU,makeTrait:()=>EU,makeValidator:()=>Ct,matchesRegExp:()=>hv,plural:()=>GE,pushError:()=>at,simpleKeyRegExp:()=>hU,uuid4RegExp:()=>mU});function Ct({test:t}){return EU(t)()}function Mr(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":JSON.stringify(t)}function rA(t,e){var r,i,n;return typeof e=="number"?`${(r=t==null?void 0:t.p)!==null&&r!==void 0?r:"."}[${e}]`:hU.test(e)?`${(i=t==null?void 0:t.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=t==null?void 0:t.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function wl(t,e){return r=>{let i=t[e];return t[e]=r,wl(t,e).bind(null,i)}}function IU(t,e){return r=>{t[e]=r}}function GE(t,e,r){return t===1?e:r}function at({errors:t,p:e}={},r){return t==null||t.push(`${e!=null?e:"."}: ${r}`),!1}function Bde(t){return Ct({test:(e,r)=>e!==t?at(r,`Expected a literal (got ${Mr(t)})`):!0})}function Yi(t){let e=Array.isArray(t)?t:Object.values(t),r=new Set(e);return Ct({test:(i,n)=>r.has(i)?!0:at(n,`Expected a valid enumeration value (got ${Mr(i)})`)})}var hU,pU,dU,CU,mU,uv,EU,yU,gv,Qde,bde,vde,Sde,xde,kde,Pde,Dde,Rde,Fde,fv,Nde,Lde,Tde,Mde,wU,Ode,Kde,Ude,Hde,Gde,jde,Yde,qde,hv,Jde,Wde,zde,Vde,_de,Xde,Zde,$de,eCe,tCe,Bl,rCe,pv,Ss=Yfe(()=>{hU=/^[a-zA-Z_][a-zA-Z0-9_]*$/,pU=/^#[0-9a-f]{6}$/i,dU=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,CU=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,mU=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,uv=/^(?:[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)?)$/,EU=t=>()=>t;yU=()=>Ct({test:(t,e)=>!0});gv=()=>Ct({test:(t,e)=>typeof t!="string"?at(e,`Expected a string (got ${Mr(t)})`):!0});Qde=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),bde=()=>Ct({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return at(e,"Unbound coercion result");let i=Qde.get(t);if(typeof i!="undefined")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,i)]),!0}return at(e,`Expected a boolean (got ${Mr(t)})`)}return!0}}),vde=()=>Ct({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return at(e,"Unbound coercion result");let i;if(typeof t=="string"){let n;try{n=JSON.parse(t)}catch(s){}if(typeof n=="number")if(JSON.stringify(n)===t)i=n;else return at(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof i!="undefined")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,i)]),!0}return at(e,`Expected a number (got ${Mr(t)})`)}return!0}}),Sde=()=>Ct({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof(e==null?void 0:e.coercions)!="undefined"){if(typeof(e==null?void 0:e.coercion)=="undefined")return at(e,"Unbound coercion result");let i;if(typeof t=="string"&&uv.test(t))i=new Date(t);else{let n;if(typeof t=="string"){let s;try{s=JSON.parse(t)}catch(o){}typeof s=="number"&&(n=s)}else typeof t=="number"&&(n=t);if(typeof n!="undefined")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return at(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof i!="undefined")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,i)]),!0}return at(e,`Expected a date (got ${Mr(t)})`)}return!0}}),xde=(t,{delimiter:e}={})=>Ct({test:(r,i)=>{var n;if(typeof r=="string"&&typeof e!="undefined"&&typeof(i==null?void 0:i.coercions)!="undefined"){if(typeof(i==null?void 0:i.coercion)=="undefined")return at(i,"Unbound coercion result");r=r.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,r)])}if(!Array.isArray(r))return at(i,`Expected an array (got ${Mr(r)})`);let s=!0;for(let o=0,a=r.length;o{let r=wU(t.length);return Ct({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e!="undefined"&&typeof(n==null?void 0:n.coercions)!="undefined"){if(typeof(n==null?void 0:n.coercion)=="undefined")return at(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return at(n,`Expected a tuple (got ${Mr(i)})`);let o=r(i,Object.assign({},n));for(let a=0,l=i.length;aCt({test:(r,i)=>{if(typeof r!="object"||r===null)return at(i,`Expected an object (got ${Mr(r)})`);let n=Object.keys(r),s=!0;for(let o=0,a=n.length;o{let r=Object.keys(t);return Ct({test:(i,n)=>{if(typeof i!="object"||i===null)return at(n,`Expected an object (got ${Mr(i)})`);let s=new Set([...r,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=at(Object.assign(Object.assign({},n),{p:rA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(t,l)?t[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c!="undefined"?a=c(u,Object.assign(Object.assign({},n),{p:rA(n,l),coercion:wl(i,l)}))&&a:e===null?a=at(Object.assign(Object.assign({},n),{p:rA(n,l)}),`Extraneous property (got ${Mr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:IU(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},Rde=t=>Ct({test:(e,r)=>e instanceof t?!0:at(r,`Expected an instance of ${t.name} (got ${Mr(e)})`)}),Fde=(t,{exclusive:e=!1}={})=>Ct({test:(r,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)!="undefined"?[]:void 0;for(let c=0,u=t.length;c1?at(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),fv=(t,e)=>Ct({test:(r,i)=>{var n,s;let o={value:r},a=typeof(i==null?void 0:i.coercions)!="undefined"?wl(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)!="undefined"?[]:void 0;if(!t(r,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l!="undefined")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)!="undefined"){if(o.value!==r){if(typeof(i==null?void 0:i.coercion)=="undefined")return at(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),Nde=t=>Ct({test:(e,r)=>typeof e=="undefined"?!0:t(e,r)}),Lde=t=>Ct({test:(e,r)=>e===null?!0:t(e,r)}),Tde=t=>Ct({test:(e,r)=>e.length>=t?!0:at(r,`Expected to have a length of at least ${t} elements (got ${e.length})`)}),Mde=t=>Ct({test:(e,r)=>e.length<=t?!0:at(r,`Expected to have a length of at most ${t} elements (got ${e.length})`)}),wU=t=>Ct({test:(e,r)=>e.length!==t?at(r,`Expected to have a length of exactly ${t} elements (got ${e.length})`):!0}),Ode=({map:t}={})=>Ct({test:(e,r)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sCt({test:(t,e)=>t<=0?!0:at(e,`Expected to be negative (got ${t})`)}),Ude=()=>Ct({test:(t,e)=>t>=0?!0:at(e,`Expected to be positive (got ${t})`)}),Hde=t=>Ct({test:(e,r)=>e>=t?!0:at(r,`Expected to be at least ${t} (got ${e})`)}),Gde=t=>Ct({test:(e,r)=>e<=t?!0:at(r,`Expected to be at most ${t} (got ${e})`)}),jde=(t,e)=>Ct({test:(r,i)=>r>=t&&r<=e?!0:at(i,`Expected to be in the [${t}; ${e}] range (got ${r})`)}),Yde=(t,e)=>Ct({test:(r,i)=>r>=t&&rCt({test:(e,r)=>e!==Math.round(e)?at(r,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:at(r,`Expected to be a safe integer (got ${e})`)}),hv=t=>Ct({test:(e,r)=>t.test(e)?!0:at(r,`Expected to match the pattern ${t.toString()} (got ${Mr(e)})`)}),Jde=()=>Ct({test:(t,e)=>t!==t.toLowerCase()?at(e,`Expected to be all-lowercase (got ${t})`):!0}),Wde=()=>Ct({test:(t,e)=>t!==t.toUpperCase()?at(e,`Expected to be all-uppercase (got ${t})`):!0}),zde=()=>Ct({test:(t,e)=>mU.test(t)?!0:at(e,`Expected to be a valid UUID v4 (got ${Mr(t)})`)}),Vde=()=>Ct({test:(t,e)=>uv.test(t)?!1:at(e,`Expected to be a valid ISO 8601 date string (got ${Mr(t)})`)}),_de=({alpha:t=!1})=>Ct({test:(e,r)=>(t?pU.test(e):dU.test(e))?!0:at(r,`Expected to be a valid hexadecimal color string (got ${Mr(e)})`)}),Xde=()=>Ct({test:(t,e)=>CU.test(t)?!0:at(e,`Expected to be a valid base 64 string (got ${Mr(t)})`)}),Zde=(t=yU())=>Ct({test:(e,r)=>{let i;try{i=JSON.parse(e)}catch(n){return at(r,`Expected to be a valid JSON string (got ${Mr(e)})`)}return t(i,r)}}),$de=t=>{let e=new Set(t);return Ct({test:(r,i)=>{let n=new Set(Object.keys(r)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?at(i,`Missing required ${GE(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},eCe=t=>{let e=new Set(t);return Ct({test:(r,i)=>{let n=new Set(Object.keys(r)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?at(i,`Forbidden ${GE(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},tCe=t=>{let e=new Set(t);return Ct({test:(r,i)=>{let n=new Set(Object.keys(r)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?at(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(Bl||(Bl={}));rCe={[Bl.Forbids]:{expect:!1,message:"forbids using"},[Bl.Requires]:{expect:!0,message:"requires using"}},pv=(t,e,r,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(r),o=rCe[e];return Ct({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(t)||n.has(a[t]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?at(l,`Property "${t}" ${o.message} ${GE(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})}});var Sh=E(($et,OU)=>{var mCe="2.0.0",ECe=256,ICe=Number.MAX_SAFE_INTEGER||9007199254740991,yCe=16;OU.exports={SEMVER_SPEC_VERSION:mCe,MAX_LENGTH:ECe,MAX_SAFE_INTEGER:ICe,MAX_SAFE_COMPONENT_LENGTH:yCe}});var xh=E((ett,KU)=>{var wCe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};KU.exports=wCe});var Ql=E((iA,UU)=>{var{MAX_SAFE_COMPONENT_LENGTH:yv}=Sh(),BCe=xh();iA=UU.exports={};var QCe=iA.re=[],Je=iA.src=[],We=iA.t={},bCe=0,mt=(t,e,r)=>{let i=bCe++;BCe(i,e),We[t]=i,Je[i]=e,QCe[i]=new RegExp(e,r?"g":void 0)};mt("NUMERICIDENTIFIER","0|[1-9]\\d*");mt("NUMERICIDENTIFIERLOOSE","[0-9]+");mt("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");mt("MAINVERSION",`(${Je[We.NUMERICIDENTIFIER]})\\.(${Je[We.NUMERICIDENTIFIER]})\\.(${Je[We.NUMERICIDENTIFIER]})`);mt("MAINVERSIONLOOSE",`(${Je[We.NUMERICIDENTIFIERLOOSE]})\\.(${Je[We.NUMERICIDENTIFIERLOOSE]})\\.(${Je[We.NUMERICIDENTIFIERLOOSE]})`);mt("PRERELEASEIDENTIFIER",`(?:${Je[We.NUMERICIDENTIFIER]}|${Je[We.NONNUMERICIDENTIFIER]})`);mt("PRERELEASEIDENTIFIERLOOSE",`(?:${Je[We.NUMERICIDENTIFIERLOOSE]}|${Je[We.NONNUMERICIDENTIFIER]})`);mt("PRERELEASE",`(?:-(${Je[We.PRERELEASEIDENTIFIER]}(?:\\.${Je[We.PRERELEASEIDENTIFIER]})*))`);mt("PRERELEASELOOSE",`(?:-?(${Je[We.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Je[We.PRERELEASEIDENTIFIERLOOSE]})*))`);mt("BUILDIDENTIFIER","[0-9A-Za-z-]+");mt("BUILD",`(?:\\+(${Je[We.BUILDIDENTIFIER]}(?:\\.${Je[We.BUILDIDENTIFIER]})*))`);mt("FULLPLAIN",`v?${Je[We.MAINVERSION]}${Je[We.PRERELEASE]}?${Je[We.BUILD]}?`);mt("FULL",`^${Je[We.FULLPLAIN]}$`);mt("LOOSEPLAIN",`[v=\\s]*${Je[We.MAINVERSIONLOOSE]}${Je[We.PRERELEASELOOSE]}?${Je[We.BUILD]}?`);mt("LOOSE",`^${Je[We.LOOSEPLAIN]}$`);mt("GTLT","((?:<|>)?=?)");mt("XRANGEIDENTIFIERLOOSE",`${Je[We.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);mt("XRANGEIDENTIFIER",`${Je[We.NUMERICIDENTIFIER]}|x|X|\\*`);mt("XRANGEPLAIN",`[v=\\s]*(${Je[We.XRANGEIDENTIFIER]})(?:\\.(${Je[We.XRANGEIDENTIFIER]})(?:\\.(${Je[We.XRANGEIDENTIFIER]})(?:${Je[We.PRERELEASE]})?${Je[We.BUILD]}?)?)?`);mt("XRANGEPLAINLOOSE",`[v=\\s]*(${Je[We.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Je[We.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Je[We.XRANGEIDENTIFIERLOOSE]})(?:${Je[We.PRERELEASELOOSE]})?${Je[We.BUILD]}?)?)?`);mt("XRANGE",`^${Je[We.GTLT]}\\s*${Je[We.XRANGEPLAIN]}$`);mt("XRANGELOOSE",`^${Je[We.GTLT]}\\s*${Je[We.XRANGEPLAINLOOSE]}$`);mt("COERCE",`(^|[^\\d])(\\d{1,${yv}})(?:\\.(\\d{1,${yv}}))?(?:\\.(\\d{1,${yv}}))?(?:$|[^\\d])`);mt("COERCERTL",Je[We.COERCE],!0);mt("LONETILDE","(?:~>?)");mt("TILDETRIM",`(\\s*)${Je[We.LONETILDE]}\\s+`,!0);iA.tildeTrimReplace="$1~";mt("TILDE",`^${Je[We.LONETILDE]}${Je[We.XRANGEPLAIN]}$`);mt("TILDELOOSE",`^${Je[We.LONETILDE]}${Je[We.XRANGEPLAINLOOSE]}$`);mt("LONECARET","(?:\\^)");mt("CARETTRIM",`(\\s*)${Je[We.LONECARET]}\\s+`,!0);iA.caretTrimReplace="$1^";mt("CARET",`^${Je[We.LONECARET]}${Je[We.XRANGEPLAIN]}$`);mt("CARETLOOSE",`^${Je[We.LONECARET]}${Je[We.XRANGEPLAINLOOSE]}$`);mt("COMPARATORLOOSE",`^${Je[We.GTLT]}\\s*(${Je[We.LOOSEPLAIN]})$|^$`);mt("COMPARATOR",`^${Je[We.GTLT]}\\s*(${Je[We.FULLPLAIN]})$|^$`);mt("COMPARATORTRIM",`(\\s*)${Je[We.GTLT]}\\s*(${Je[We.LOOSEPLAIN]}|${Je[We.XRANGEPLAIN]})`,!0);iA.comparatorTrimReplace="$1$2$3";mt("HYPHENRANGE",`^\\s*(${Je[We.XRANGEPLAIN]})\\s+-\\s+(${Je[We.XRANGEPLAIN]})\\s*$`);mt("HYPHENRANGELOOSE",`^\\s*(${Je[We.XRANGEPLAINLOOSE]})\\s+-\\s+(${Je[We.XRANGEPLAINLOOSE]})\\s*$`);mt("STAR","(<|>)?=?\\s*\\*");mt("GTE0","^\\s*>=\\s*0.0.0\\s*$");mt("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var kh=E((ttt,HU)=>{var vCe=["includePrerelease","loose","rtl"],SCe=t=>t?typeof t!="object"?{loose:!0}:vCe.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};HU.exports=SCe});var zE=E((rtt,GU)=>{var jU=/^[0-9]+$/,YU=(t,e)=>{let r=jU.test(t),i=jU.test(e);return r&&i&&(t=+t,e=+e),t===e?0:r&&!i?-1:i&&!r?1:tYU(e,t);GU.exports={compareIdentifiers:YU,rcompareIdentifiers:xCe}});var bi=E((itt,qU)=>{var VE=xh(),{MAX_LENGTH:JU,MAX_SAFE_INTEGER:_E}=Sh(),{re:WU,t:zU}=Ql(),kCe=kh(),{compareIdentifiers:Ph}=zE(),_n=class{constructor(e,r){if(r=kCe(r),e instanceof _n){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>JU)throw new TypeError(`version is longer than ${JU} characters`);VE("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let i=e.trim().match(r.loose?WU[zU.LOOSE]:WU[zU.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>_E||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_E||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_E||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s<_E)return s}return n}):this.prerelease=[],this.build=i[5]?i[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(VE("SemVer.compare",this.version,this.options,e),!(e instanceof _n)){if(typeof e=="string"&&e===this.version)return 0;e=new _n(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof _n||(e=new _n(e,this.options)),Ph(this.major,e.major)||Ph(this.minor,e.minor)||Ph(this.patch,e.patch)}comparePre(e){if(e instanceof _n||(e=new _n(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 i=this.prerelease[r],n=e.prerelease[r];if(VE("prerelease compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return Ph(i,n)}while(++r)}compareBuild(e){e instanceof _n||(e=new _n(e,this.options));let r=0;do{let i=this.build[r],n=e.build[r];if(VE("prerelease compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return Ph(i,n)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);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":if(this.prerelease.length===0)this.prerelease=[0];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}r&&(this.prerelease[0]===r?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};qU.exports=_n});var bl=E((ntt,VU)=>{var{MAX_LENGTH:PCe}=Sh(),{re:_U,t:XU}=Ql(),ZU=bi(),DCe=kh(),RCe=(t,e)=>{if(e=DCe(e),t instanceof ZU)return t;if(typeof t!="string"||t.length>PCe||!(e.loose?_U[XU.LOOSE]:_U[XU.FULL]).test(t))return null;try{return new ZU(t,e)}catch(i){return null}};VU.exports=RCe});var e2=E((stt,$U)=>{var FCe=bl(),NCe=(t,e)=>{let r=FCe(t,e);return r?r.version:null};$U.exports=NCe});var r2=E((ott,t2)=>{var LCe=bl(),TCe=(t,e)=>{let r=LCe(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};t2.exports=TCe});var n2=E((att,i2)=>{var MCe=bi(),OCe=(t,e,r,i)=>{typeof r=="string"&&(i=r,r=void 0);try{return new MCe(t,r).inc(e,i).version}catch(n){return null}};i2.exports=OCe});var Xn=E((Att,s2)=>{var o2=bi(),KCe=(t,e,r)=>new o2(t,r).compare(new o2(e,r));s2.exports=KCe});var XE=E((ltt,a2)=>{var UCe=Xn(),HCe=(t,e,r)=>UCe(t,e,r)===0;a2.exports=HCe});var c2=E((ctt,A2)=>{var l2=bl(),GCe=XE(),jCe=(t,e)=>{if(GCe(t,e))return null;{let r=l2(t),i=l2(e),n=r.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in r)if((a==="major"||a==="minor"||a==="patch")&&r[a]!==i[a])return s+a;return o}};A2.exports=jCe});var g2=E((utt,u2)=>{var YCe=bi(),qCe=(t,e)=>new YCe(t,e).major;u2.exports=qCe});var h2=E((gtt,f2)=>{var JCe=bi(),WCe=(t,e)=>new JCe(t,e).minor;f2.exports=WCe});var d2=E((ftt,p2)=>{var zCe=bi(),VCe=(t,e)=>new zCe(t,e).patch;p2.exports=VCe});var m2=E((htt,C2)=>{var _Ce=bl(),XCe=(t,e)=>{let r=_Ce(t,e);return r&&r.prerelease.length?r.prerelease:null};C2.exports=XCe});var I2=E((ptt,E2)=>{var ZCe=Xn(),$Ce=(t,e,r)=>ZCe(e,t,r);E2.exports=$Ce});var w2=E((dtt,y2)=>{var eme=Xn(),tme=(t,e)=>eme(t,e,!0);y2.exports=tme});var ZE=E((Ctt,B2)=>{var Q2=bi(),rme=(t,e,r)=>{let i=new Q2(t,r),n=new Q2(e,r);return i.compare(n)||i.compareBuild(n)};B2.exports=rme});var v2=E((mtt,b2)=>{var ime=ZE(),nme=(t,e)=>t.sort((r,i)=>ime(r,i,e));b2.exports=nme});var x2=E((Ett,S2)=>{var sme=ZE(),ome=(t,e)=>t.sort((r,i)=>sme(i,r,e));S2.exports=ome});var Dh=E((Itt,k2)=>{var ame=Xn(),Ame=(t,e,r)=>ame(t,e,r)>0;k2.exports=Ame});var $E=E((ytt,P2)=>{var lme=Xn(),cme=(t,e,r)=>lme(t,e,r)<0;P2.exports=cme});var wv=E((wtt,D2)=>{var ume=Xn(),gme=(t,e,r)=>ume(t,e,r)!==0;D2.exports=gme});var eI=E((Btt,R2)=>{var fme=Xn(),hme=(t,e,r)=>fme(t,e,r)>=0;R2.exports=hme});var tI=E((Qtt,F2)=>{var pme=Xn(),dme=(t,e,r)=>pme(t,e,r)<=0;F2.exports=dme});var Bv=E((btt,N2)=>{var Cme=XE(),mme=wv(),Eme=Dh(),Ime=eI(),yme=$E(),wme=tI(),Bme=(t,e,r,i)=>{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 Cme(t,r,i);case"!=":return mme(t,r,i);case">":return Eme(t,r,i);case">=":return Ime(t,r,i);case"<":return yme(t,r,i);case"<=":return wme(t,r,i);default:throw new TypeError(`Invalid operator: ${e}`)}};N2.exports=Bme});var T2=E((vtt,L2)=>{var Qme=bi(),bme=bl(),{re:rI,t:iI}=Ql(),vme=(t,e)=>{if(t instanceof Qme)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(rI[iI.COERCE]);else{let i;for(;(i=rI[iI.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||i.index+i[0].length!==r.index+r[0].length)&&(r=i),rI[iI.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;rI[iI.COERCERTL].lastIndex=-1}return r===null?null:bme(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};L2.exports=vme});var O2=E((Stt,M2)=>{"use strict";M2.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Rh=E((xtt,K2)=>{"use strict";K2.exports=Pt;Pt.Node=vl;Pt.create=Pt;function Pt(t){var e=this;if(e instanceof Pt||(e=new Pt),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)r=t(r,i.value,n),i=i.next;return r};Pt.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)r=t(r,i.value,n),i=i.prev;return r};Pt.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};Pt.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};Pt.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 Pt;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>t;i--,n=n.prev)r.push(n.value);return r};Pt.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,n=this.head;n!==null&&i{"use strict";var Pme=Rh(),Sl=Symbol("max"),ra=Symbol("length"),uu=Symbol("lengthCalculator"),Fh=Symbol("allowStale"),xl=Symbol("maxAge"),ia=Symbol("dispose"),H2=Symbol("noDisposeOnSet"),si=Symbol("lruList"),ks=Symbol("cache"),G2=Symbol("updateAgeOnGet"),Qv=()=>1,j2=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[Sl]=e.max||Infinity,i=e.length||Qv;if(this[uu]=typeof i!="function"?Qv:i,this[Fh]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[xl]=e.maxAge||0,this[ia]=e.dispose,this[H2]=e.noDisposeOnSet||!1,this[G2]=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[Sl]=e||Infinity,Nh(this)}get max(){return this[Sl]}set allowStale(e){this[Fh]=!!e}get allowStale(){return this[Fh]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[xl]=e,Nh(this)}get maxAge(){return this[xl]}set lengthCalculator(e){typeof e!="function"&&(e=Qv),e!==this[uu]&&(this[uu]=e,this[ra]=0,this[si].forEach(r=>{r.length=this[uu](r.value,r.key),this[ra]+=r.length})),Nh(this)}get lengthCalculator(){return this[uu]}get length(){return this[ra]}get itemCount(){return this[si].length}rforEach(e,r){r=r||this;for(let i=this[si].tail;i!==null;){let n=i.prev;q2(this,e,i,r),i=n}}forEach(e,r){r=r||this;for(let i=this[si].head;i!==null;){let n=i.next;q2(this,e,i,r),i=n}}keys(){return this[si].toArray().map(e=>e.key)}values(){return this[si].toArray().map(e=>e.value)}reset(){this[ia]&&this[si]&&this[si].length&&this[si].forEach(e=>this[ia](e.key,e.value)),this[ks]=new Map,this[si]=new Pme,this[ra]=0}dump(){return this[si].map(e=>nI(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[si]}set(e,r,i){if(i=i||this[xl],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[uu](r,e);if(this[ks].has(e)){if(s>this[Sl])return gu(this,this[ks].get(e)),!1;let l=this[ks].get(e).value;return this[ia]&&(this[H2]||this[ia](e,l.value)),l.now=n,l.maxAge=i,l.value=r,this[ra]+=s-l.length,l.length=s,this.get(e),Nh(this),!0}let o=new Y2(e,r,s,n,i);return o.length>this[Sl]?(this[ia]&&this[ia](e,r),!1):(this[ra]+=o.length,this[si].unshift(o),this[ks].set(e,this[si].head),Nh(this),!0)}has(e){if(!this[ks].has(e))return!1;let r=this[ks].get(e).value;return!nI(this,r)}get(e){return bv(this,e,!0)}peek(e){return bv(this,e,!1)}pop(){let e=this[si].tail;return e?(gu(this,e),e.value):null}del(e){gu(this,this[ks].get(e))}load(e){this.reset();let r=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-r;o>0&&this.set(n.k,n.v,o)}}}prune(){this[ks].forEach((e,r)=>bv(this,r,!1))}},bv=(t,e,r)=>{let i=t[ks].get(e);if(i){let n=i.value;if(nI(t,n)){if(gu(t,i),!t[Fh])return}else r&&(t[G2]&&(i.value.now=Date.now()),t[si].unshiftNode(i));return n.value}},nI=(t,e)=>{if(!e||!e.maxAge&&!t[xl])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[xl]&&r>t[xl]},Nh=t=>{if(t[ra]>t[Sl])for(let e=t[si].tail;t[ra]>t[Sl]&&e!==null;){let r=e.prev;gu(t,e),e=r}},gu=(t,e)=>{if(e){let r=e.value;t[ia]&&t[ia](r.key,r.value),t[ra]-=r.length,t[ks].delete(r.key),t[si].removeNode(e)}},Y2=class{constructor(e,r,i,n,s){this.key=e,this.value=r,this.length=i,this.now=n,this.maxAge=s||0}},q2=(t,e,r,i)=>{let n=r.value;nI(t,n)&&(gu(t,r),t[Fh]||(n=void 0)),n&&e.call(i,n.value,n.key,t)};U2.exports=j2});var Zn=E((Ptt,W2)=>{var fu=class{constructor(e,r){if(r=Dme(r),e instanceof fu)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new fu(e.raw,r);if(e instanceof vv)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,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!V2(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&Tme(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=z2.get(i);if(n)return n;let s=this.options.loose,o=s?vi[di.HYPHENRANGELOOSE]:vi[di.HYPHENRANGE];e=e.replace(o,Kme(this.options.includePrerelease)),Rr("hyphen replace",e),e=e.replace(vi[di.COMPARATORTRIM],Fme),Rr("comparator trim",e,vi[di.COMPARATORTRIM]),e=e.replace(vi[di.TILDETRIM],Nme),e=e.replace(vi[di.CARETTRIM],Lme),e=e.split(/\s+/).join(" ");let a=s?vi[di.COMPARATORLOOSE]:vi[di.COMPARATOR],l=e.split(" ").map(f=>Mme(f,this.options)).join(" ").split(/\s+/).map(f=>Ome(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new vv(f,this.options)),c=l.length,u=new Map;for(let f of l){if(V2(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return z2.set(i,g),g}intersects(e,r){if(!(e instanceof fu))throw new TypeError("a Range is required");return this.set.some(i=>_2(i,r)&&e.set.some(n=>_2(n,r)&&i.every(s=>n.every(o=>s.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Rme(e,this.options)}catch(r){return!1}for(let r=0;rt.value==="<0.0.0-0",Tme=t=>t.value==="",_2=(t,e)=>{let r=!0,i=t.slice(),n=i.pop();for(;r&&i.length;)r=i.every(s=>n.intersects(s,e)),n=i.pop();return r},Mme=(t,e)=>(Rr("comp",t,e),t=jme(t,e),Rr("caret",t),t=Gme(t,e),Rr("tildes",t),t=Yme(t,e),Rr("xrange",t),t=qme(t,e),Rr("stars",t),t),Ji=t=>!t||t.toLowerCase()==="x"||t==="*",Gme=(t,e)=>t.trim().split(/\s+/).map(r=>Jme(r,e)).join(" "),Jme=(t,e)=>{let r=e.loose?vi[di.TILDELOOSE]:vi[di.TILDE];return t.replace(r,(i,n,s,o,a)=>{Rr("tilde",t,i,n,s,o,a);let l;return Ji(n)?l="":Ji(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Ji(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(Rr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,Rr("tilde return",l),l})},jme=(t,e)=>t.trim().split(/\s+/).map(r=>Wme(r,e)).join(" "),Wme=(t,e)=>{Rr("caret",t,e);let r=e.loose?vi[di.CARETLOOSE]:vi[di.CARET],i=e.includePrerelease?"-0":"";return t.replace(r,(n,s,o,a,l)=>{Rr("caret",t,n,s,o,a,l);let c;return Ji(s)?c="":Ji(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Ji(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(Rr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(Rr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),Rr("caret return",c),c})},Yme=(t,e)=>(Rr("replaceXRanges",t,e),t.split(/\s+/).map(r=>zme(r,e)).join(" ")),zme=(t,e)=>{t=t.trim();let r=e.loose?vi[di.XRANGELOOSE]:vi[di.XRANGE];return t.replace(r,(i,n,s,o,a,l)=>{Rr("xRange",t,i,n,s,o,a,l);let c=Ji(s),u=c||Ji(o),g=u||Ji(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),Rr("xRange return",i),i})},qme=(t,e)=>(Rr("replaceStars",t,e),t.trim().replace(vi[di.STAR],"")),Ome=(t,e)=>(Rr("replaceGTE0",t,e),t.trim().replace(vi[e.includePrerelease?di.GTE0PRE:di.GTE0],"")),Kme=t=>(e,r,i,n,s,o,a,l,c,u,g,f,h)=>(Ji(i)?r="":Ji(n)?r=`>=${i}.0.0${t?"-0":""}`:Ji(s)?r=`>=${i}.${n}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Ji(c)?l="":Ji(u)?l=`<${+c+1}.0.0-0`:Ji(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:t?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),Ume=(t,e,r)=>{for(let i=0;i0){let n=t[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Lh=E((Dtt,X2)=>{var Th=Symbol("SemVer ANY"),Mh=class{static get ANY(){return Th}constructor(e,r){if(r=Vme(r),e instanceof Mh){if(e.loose===!!r.loose)return e;e=e.value}xv("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Th?this.value="":this.value=this.operator+this.semver.version,xv("comp",this)}parse(e){let r=this.options.loose?Z2[$2.COMPARATORLOOSE]:Z2[$2.COMPARATOR],i=e.match(r);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new eH(i[2],this.options.loose):this.semver=Th}toString(){return this.value}test(e){if(xv("Comparator.test",e,this.options.loose),this.semver===Th||e===Th)return!0;if(typeof e=="string")try{e=new eH(e,this.options)}catch(r){return!1}return Sv(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof Mh))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new tH(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new tH(this.value,r).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=Sv(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=Sv(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};X2.exports=Mh;var Vme=kh(),{re:Z2,t:$2}=Ql(),Sv=Bv(),xv=xh(),eH=bi(),tH=Zn()});var Oh=E((Rtt,rH)=>{var _me=Zn(),Xme=(t,e,r)=>{try{e=new _me(e,r)}catch(i){return!1}return e.test(t)};rH.exports=Xme});var nH=E((Ftt,iH)=>{var Zme=Zn(),$me=(t,e)=>new Zme(t,e).set.map(r=>r.map(i=>i.value).join(" ").trim().split(" "));iH.exports=$me});var oH=E((Ntt,sH)=>{var eEe=bi(),tEe=Zn(),rEe=(t,e,r)=>{let i=null,n=null,s=null;try{s=new tEe(e,r)}catch(o){return null}return t.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new eEe(i,r))}),i};sH.exports=rEe});var AH=E((Ltt,aH)=>{var iEe=bi(),nEe=Zn(),sEe=(t,e,r)=>{let i=null,n=null,s=null;try{s=new nEe(e,r)}catch(o){return null}return t.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new iEe(i,r))}),i};aH.exports=sEe});var uH=E((Ttt,lH)=>{var kv=bi(),oEe=Zn(),cH=Dh(),aEe=(t,e)=>{t=new oEe(t,e);let r=new kv("0.0.0");if(t.test(r)||(r=new kv("0.0.0-0"),t.test(r)))return r;r=null;for(let i=0;i{let a=new kv(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||cH(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!r||cH(r,s))&&(r=s)}return r&&t.test(r)?r:null};lH.exports=aEe});var fH=E((Mtt,gH)=>{var AEe=Zn(),lEe=(t,e)=>{try{return new AEe(t,e).range||"*"}catch(r){return null}};gH.exports=lEe});var sI=E((Ott,hH)=>{var cEe=bi(),pH=Lh(),{ANY:uEe}=pH,gEe=Zn(),fEe=Oh(),dH=Dh(),CH=$E(),hEe=tI(),pEe=eI(),dEe=(t,e,r,i)=>{t=new cEe(t,i),e=new gEe(e,i);let n,s,o,a,l;switch(r){case">":n=dH,s=hEe,o=CH,a=">",l=">=";break;case"<":n=CH,s=pEe,o=dH,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(fEe(t,e,i))return!1;for(let c=0;c{h.semver===uEe&&(h=new pH(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(t,f.semver))return!1;if(f.operator===l&&o(t,f.semver))return!1}return!0};hH.exports=dEe});var EH=E((Ktt,mH)=>{var CEe=sI(),mEe=(t,e,r)=>CEe(t,e,">",r);mH.exports=mEe});var yH=E((Utt,IH)=>{var EEe=sI(),IEe=(t,e,r)=>EEe(t,e,"<",r);IH.exports=IEe});var QH=E((Htt,wH)=>{var BH=Zn(),yEe=(t,e,r)=>(t=new BH(t,r),e=new BH(e,r),t.intersects(e));wH.exports=yEe});var vH=E((Gtt,bH)=>{var wEe=Oh(),BEe=Xn();bH.exports=(t,e,r)=>{let i=[],n=null,s=null,o=t.sort((u,g)=>BEe(u,g,r));for(let u of o)wEe(u,e,r)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var xH=Zn(),oI=Lh(),{ANY:Pv}=oI,Kh=Oh(),Dv=Xn(),bEe=(t,e,r={})=>{if(t===e)return!0;t=new xH(t,r),e=new xH(e,r);let i=!1;e:for(let n of t.set){for(let s of e.set){let o=QEe(n,s,r);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},QEe=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Pv){if(e.length===1&&e[0].semver===Pv)return!0;r.includePrerelease?t=[new oI(">=0.0.0-0")]:t=[new oI(">=0.0.0")]}if(e.length===1&&e[0].semver===Pv){if(r.includePrerelease)return!0;e=[new oI(">=0.0.0")]}let i=new Set,n,s;for(let h of t)h.operator===">"||h.operator===">="?n=kH(n,h,r):h.operator==="<"||h.operator==="<="?s=PH(s,h,r):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=Dv(n.semver,s.semver,r),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!Kh(h,String(n),r)||s&&!Kh(h,String(s),r))return null;for(let p of e)if(!Kh(h,String(p),r))return!1;return!0}let a,l,c,u,g=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=kH(n,h,r),a===h&&a!==n)return!1}else if(n.operator===">="&&!Kh(n.semver,String(h),r))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=PH(s,h,r),l===h&&l!==s)return!1}else if(s.operator==="<="&&!Kh(s.semver,String(h),r))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},kH=(t,e,r)=>{if(!t)return e;let i=Dv(t.semver,e.semver,r);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},PH=(t,e,r)=>{if(!t)return e;let i=Dv(t.semver,e.semver,r);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};SH.exports=bEe});var Or=E((Ytt,RH)=>{var Rv=Ql();RH.exports={re:Rv.re,src:Rv.src,tokens:Rv.t,SEMVER_SPEC_VERSION:Sh().SEMVER_SPEC_VERSION,SemVer:bi(),compareIdentifiers:zE().compareIdentifiers,rcompareIdentifiers:zE().rcompareIdentifiers,parse:bl(),valid:e2(),clean:r2(),inc:n2(),diff:c2(),major:g2(),minor:h2(),patch:d2(),prerelease:m2(),compare:Xn(),rcompare:I2(),compareLoose:w2(),compareBuild:ZE(),sort:v2(),rsort:x2(),gt:Dh(),lt:$E(),eq:XE(),neq:wv(),gte:eI(),lte:tI(),cmp:Bv(),coerce:T2(),Comparator:Lh(),Range:Zn(),satisfies:Oh(),toComparators:nH(),maxSatisfying:oH(),minSatisfying:AH(),minVersion:uH(),validRange:fH(),outside:sI(),gtr:EH(),ltr:yH(),intersects:QH(),simplifyRange:vH(),subset:DH()}});var Uv=E(AI=>{"use strict";Object.defineProperty(AI,"__esModule",{value:!0});AI.VERSION=void 0;AI.VERSION="9.1.0"});var Dt=E((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(t,e,r){if(r||arguments.length===2)for(var i=0,n=e.length,s;i{(function(t,e){typeof define=="function"&&define.amd?define([],e):typeof lI=="object"&&lI.exports?lI.exports=e():t.regexpToAst=e()})(typeof self!="undefined"?self:YH,function(){function t(){}t.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},t.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},t.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var d=this.disjunction();this.consumeChar("/");for(var m={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(m,"global");break;case"i":o(m,"ignoreCase");break;case"m":o(m,"multiLine");break;case"u":o(m,"unicode");break;case"y":o(m,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:m,value:d,loc:this.loc(0)}},t.prototype.disjunction=function(){var p=[],d=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(d)}},t.prototype.alternative=function(){for(var p=[],d=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(d)}},t.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},t.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var d;switch(this.popChar()){case"=":d="Lookahead";break;case"!":d="NegativeLookahead";break}a(d);var m=this.disjunction();return this.consumeChar(")"),{type:d,value:m,loc:this.loc(p)}}l()},t.prototype.quantifier=function(p){var d,m=this.idx;switch(this.popChar()){case"*":d={atLeast:0,atMost:Infinity};break;case"+":d={atLeast:1,atMost:Infinity};break;case"?":d={atLeast:0,atMost:1};break;case"{":var I=this.integerIncludingZero();switch(this.popChar()){case"}":d={atLeast:I,atMost:I};break;case",":var B;this.isDigit()?(B=this.integerIncludingZero(),d={atLeast:I,atMost:B}):d={atLeast:I,atMost:Infinity},this.consumeChar("}");break}if(p===!0&&d===void 0)return;a(d);break}if(!(p===!0&&d===void 0))return a(d),this.peekChar(0)==="?"?(this.consumeChar("?"),d.greedy=!1):d.greedy=!0,d.type="Quantifier",d.loc=this.loc(m),d},t.prototype.atom=function(){var p,d=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(d),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},t.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` -`),n("\r"),n("\u2028"),n("\u2029")]}},t.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},t.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},t.prototype.characterClassEscape=function(){var p,d=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,d=!0;break;case"s":p=f;break;case"S":p=f,d=!0;break;case"w":p=g;break;case"W":p=g,d=!0;break}return a(p),{type:"Set",value:p,complement:d}},t.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` -`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},t.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var d=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:d}},t.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},t.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},t.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},t.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},t.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},t.prototype.characterClass=function(){var p=[],d=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),d=!0);this.isClassAtom();){var m=this.classAtom(),I=m.type==="Character";if(I&&this.isRangeDash()){this.consumeChar("-");var B=this.classAtom(),b=B.type==="Character";if(b){if(B.value=this.input.length)throw Error("Unexpected end of input");this.idx++},t.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,d){p.length!==void 0?p.forEach(function(m){d.push(m)}):d.push(p)}function o(p,d){if(p[d]===!0)throw"duplicate flag "+d;p[d]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` -`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var d in p){var m=p[d];p.hasOwnProperty(d)&&(m.type!==void 0?this.visit(m):Array.isArray(m)&&m.forEach(function(I){this.visit(I)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:t,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var gI=E(Eu=>{"use strict";Object.defineProperty(Eu,"__esModule",{value:!0});Eu.clearRegExpParserCache=Eu.getRegExpAst=void 0;var FEe=cI(),uI={},NEe=new FEe.RegExpParser;function LEe(t){var e=t.toString();if(uI.hasOwnProperty(e))return uI[e];var r=NEe.pattern(e);return uI[e]=r,r}Eu.getRegExpAst=LEe;function TEe(){uI={}}Eu.clearRegExpParserCache=TEe});var VH=E(fn=>{"use strict";var MEe=fn&&fn.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(fn,"__esModule",{value:!0});fn.canMatchCharCode=fn.firstCharOptimizedIndices=fn.getOptimizedStartCodesIndices=fn.failedOptimizationPrefixMsg=void 0;var qH=cI(),$n=Dt(),JH=gI(),sa=Hv(),WH="Complement Sets are not supported for first char optimization";fn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: -`;function OEe(t,e){e===void 0&&(e=!1);try{var r=(0,JH.getRegExpAst)(t),i=fI(r.value,{},r.flags.ignoreCase);return i}catch(s){if(s.message===WH)e&&(0,$n.PRINT_WARNING)(""+fn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+t.toString()+` > -`)+` Complement Sets cannot be automatically optimized. - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,$n.PRINT_ERROR)(fn.failedOptimizationPrefixMsg+` -`+(" Failed parsing: < "+t.toString()+` > -`)+(" Using the regexp-to-ast library version: "+qH.VERSION+` -`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}fn.getOptimizedStartCodesIndices=OEe;function fI(t,e,r){switch(t.type){case"Disjunction":for(var i=0;i=sa.minOptimizationVal)for(var f=u.from>=sa.minOptimizationVal?u.from:sa.minOptimizationVal,h=u.to,p=(0,sa.charCodeToOptimizedIndex)(f),d=(0,sa.charCodeToOptimizedIndex)(h),m=p;m<=d;m++)e[m]=m}}});break;case"Group":fI(o.value,e,r);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&Gv(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,$n.values)(e)}fn.firstCharOptimizedIndices=fI;function hI(t,e,r){var i=(0,sa.charCodeToOptimizedIndex)(t);e[i]=i,r===!0&&KEe(t,e)}function KEe(t,e){var r=String.fromCharCode(t),i=r.toUpperCase();if(i!==r){var n=(0,sa.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=r.toLowerCase();if(s!==r){var n=(0,sa.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function zH(t,e){return(0,$n.find)(t.value,function(r){if(typeof r=="number")return(0,$n.contains)(e,r);var i=r;return(0,$n.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function Gv(t){return t.quantifier&&t.quantifier.atLeast===0?!0:t.value?(0,$n.isArray)(t.value)?(0,$n.every)(t.value,Gv):Gv(t.value):!1}var UEe=function(t){MEe(e,t);function e(r){var i=t.call(this)||this;return i.targetCharCodes=r,i.found=!1,i}return e.prototype.visitChildren=function(r){if(this.found!==!0){switch(r.type){case"Lookahead":this.visitLookahead(r);return;case"NegativeLookahead":this.visitNegativeLookahead(r);return}t.prototype.visitChildren.call(this,r)}},e.prototype.visitCharacter=function(r){(0,$n.contains)(this.targetCharCodes,r.value)&&(this.found=!0)},e.prototype.visitSet=function(r){r.complement?zH(r,this.targetCharCodes)===void 0&&(this.found=!0):zH(r,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(qH.BaseRegExpVisitor);function HEe(t,e){if(e instanceof RegExp){var r=(0,JH.getRegExpAst)(e),i=new UEe(t);return i.visit(r),i.found}else return(0,$n.find)(e,function(n){return(0,$n.contains)(t,n.charCodeAt(0))})!==void 0}fn.canMatchCharCode=HEe});var Hv=E(je=>{"use strict";var _H=je&&je.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(je,"__esModule",{value:!0});je.charCodeToOptimizedIndex=je.minOptimizationVal=je.buildLineBreakIssueMessage=je.LineTerminatorOptimizedTester=je.isShortPattern=je.isCustomPattern=je.cloneEmptyGroups=je.performWarningRuntimeChecks=je.performRuntimeChecks=je.addStickyFlag=je.addStartOfInput=je.findUnreachablePatterns=je.findModesThatDoNotExist=je.findInvalidGroupType=je.findDuplicatePatterns=je.findUnsupportedFlags=je.findStartOfInputAnchor=je.findEmptyMatchRegExps=je.findEndOfInputAnchor=je.findInvalidPatterns=je.findMissingPatterns=je.validatePatterns=je.analyzeTokenTypes=je.enableSticky=je.disableSticky=je.SUPPORT_STICKY=je.MODES=je.DEFAULT_MODE=void 0;var XH=cI(),zt=Gh(),Ie=Dt(),Iu=VH(),ZH=gI(),ao="PATTERN";je.DEFAULT_MODE="defaultMode";je.MODES="modes";je.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function GEe(){je.SUPPORT_STICKY=!1}je.disableSticky=GEe;function jEe(){je.SUPPORT_STICKY=!0}je.enableSticky=jEe;function qEe(t,e){e=(0,Ie.defaults)(e,{useSticky:je.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:function(B,b){return b()}});var r=e.tracer;r("initCharCodeToOptimizedIndexMap",function(){YEe()});var i;r("Reject Lexer.NA",function(){i=(0,Ie.reject)(t,function(B){return B[ao]===zt.Lexer.NA})});var n=!1,s;r("Transform Patterns",function(){n=!1,s=(0,Ie.map)(i,function(B){var b=B[ao];if((0,Ie.isRegExp)(b)){var R=b.source;return R.length===1&&R!=="^"&&R!=="$"&&R!=="."&&!b.ignoreCase?R:R.length===2&&R[0]==="\\"&&!(0,Ie.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],R[1])?R[1]:e.useSticky?Yv(b):jv(b)}else{if((0,Ie.isFunction)(b))return n=!0,{exec:b};if((0,Ie.has)(b,"exec"))return n=!0,b;if(typeof b=="string"){if(b.length===1)return b;var H=b.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),L=new RegExp(H);return e.useSticky?Yv(L):jv(L)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;r("misc mapping",function(){o=(0,Ie.map)(i,function(B){return B.tokenTypeIdx}),a=(0,Ie.map)(i,function(B){var b=B.GROUP;if(b!==zt.Lexer.SKIPPED){if((0,Ie.isString)(b))return b;if((0,Ie.isUndefined)(b))return!1;throw Error("non exhaustive match")}}),l=(0,Ie.map)(i,function(B){var b=B.LONGER_ALT;if(b){var R=(0,Ie.isArray)(b)?(0,Ie.map)(b,function(H){return(0,Ie.indexOf)(i,H)}):[(0,Ie.indexOf)(i,b)];return R}}),c=(0,Ie.map)(i,function(B){return B.PUSH_MODE}),u=(0,Ie.map)(i,function(B){return(0,Ie.has)(B,"POP_MODE")})});var g;r("Line Terminator Handling",function(){var B=tG(e.lineTerminatorCharacters);g=(0,Ie.map)(i,function(b){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,Ie.map)(i,function(b){if((0,Ie.has)(b,"LINE_BREAKS"))return b.LINE_BREAKS;if(eG(b,B)===!1)return(0,Iu.canMatchCharCode)(B,b.PATTERN)}))});var f,h,p,d;r("Misc Mapping #2",function(){f=(0,Ie.map)(i,qv),h=(0,Ie.map)(s,$H),p=(0,Ie.reduce)(i,function(B,b){var R=b.GROUP;return(0,Ie.isString)(R)&&R!==zt.Lexer.SKIPPED&&(B[R]=[]),B},{}),d=(0,Ie.map)(s,function(B,b){return{pattern:s[b],longerAlt:l[b],canLineTerminator:g[b],isCustom:f[b],short:h[b],group:a[b],push:c[b],pop:u[b],tokenTypeIdx:o[b],tokenType:i[b]}})});var m=!0,I=[];return e.safeMode||r("First Char Optimization",function(){I=(0,Ie.reduce)(i,function(B,b,R){if(typeof b.PATTERN=="string"){var H=b.PATTERN.charCodeAt(0),L=Wv(H);Jv(B,L,d[R])}else if((0,Ie.isArray)(b.START_CHARS_HINT)){var K;(0,Ie.forEach)(b.START_CHARS_HINT,function(ne){var q=typeof ne=="string"?ne.charCodeAt(0):ne,A=Wv(q);K!==A&&(K=A,Jv(B,A,d[R]))})}else if((0,Ie.isRegExp)(b.PATTERN))if(b.PATTERN.unicode)m=!1,e.ensureOptimizations&&(0,Ie.PRINT_ERROR)(""+Iu.failedOptimizationPrefixMsg+(" Unable to analyze < "+b.PATTERN.toString()+` > pattern. -`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. - This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var J=(0,Iu.getOptimizedStartCodesIndices)(b.PATTERN,e.ensureOptimizations);(0,Ie.isEmpty)(J)&&(m=!1),(0,Ie.forEach)(J,function(ne){Jv(B,ne,d[R])})}else e.ensureOptimizations&&(0,Ie.PRINT_ERROR)(""+Iu.failedOptimizationPrefixMsg+(" TokenType: <"+b.name+`> is using a custom token pattern without providing parameter. -`)+` This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1;return B},[])}),r("ArrayPacking",function(){I=(0,Ie.packArray)(I)}),{emptyGroups:p,patternIdxToConfig:d,charCodeToPatternIdxToConfig:I,hasCustom:n,canBeOptimized:m}}je.analyzeTokenTypes=qEe;function WEe(t,e){var r=[],i=rG(t);r=r.concat(i.errors);var n=iG(i.valid),s=n.valid;return r=r.concat(n.errors),r=r.concat(JEe(s)),r=r.concat(nG(s)),r=r.concat(sG(s,e)),r=r.concat(oG(s)),r}je.validatePatterns=WEe;function JEe(t){var e=[],r=(0,Ie.filter)(t,function(i){return(0,Ie.isRegExp)(i[ao])});return e=e.concat(aG(r)),e=e.concat(lG(r)),e=e.concat(cG(r)),e=e.concat(uG(r)),e=e.concat(AG(r)),e}function rG(t){var e=(0,Ie.filter)(t,function(n){return!(0,Ie.has)(n,ao)}),r=(0,Ie.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:zt.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,Ie.difference)(t,e);return{errors:r,valid:i}}je.findMissingPatterns=rG;function iG(t){var e=(0,Ie.filter)(t,function(n){var s=n[ao];return!(0,Ie.isRegExp)(s)&&!(0,Ie.isFunction)(s)&&!(0,Ie.has)(s,"exec")&&!(0,Ie.isString)(s)}),r=(0,Ie.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:zt.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,Ie.difference)(t,e);return{errors:r,valid:i}}je.findInvalidPatterns=iG;var zEe=/[^\\][\$]/;function aG(t){var e=function(n){_H(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(XH.BaseRegExpVisitor),r=(0,Ie.filter)(t,function(n){var s=n[ao];try{var o=(0,ZH.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch(l){return zEe.test(s.source)}}),i=(0,Ie.map)(r,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:zt.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}je.findEndOfInputAnchor=aG;function AG(t){var e=(0,Ie.filter)(t,function(i){var n=i[ao];return n.test("")}),r=(0,Ie.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:zt.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return r}je.findEmptyMatchRegExps=AG;var VEe=/[^\\[][\^]|^\^/;function lG(t){var e=function(n){_H(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(XH.BaseRegExpVisitor),r=(0,Ie.filter)(t,function(n){var s=n[ao];try{var o=(0,ZH.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch(l){return VEe.test(s.source)}}),i=(0,Ie.map)(r,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:zt.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}je.findStartOfInputAnchor=lG;function cG(t){var e=(0,Ie.filter)(t,function(i){var n=i[ao];return n instanceof RegExp&&(n.multiline||n.global)}),r=(0,Ie.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:zt.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return r}je.findUnsupportedFlags=cG;function uG(t){var e=[],r=(0,Ie.map)(t,function(s){return(0,Ie.reduce)(t,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,Ie.contains)(e,a)&&a.PATTERN!==zt.Lexer.NA&&(e.push(a),o.push(a)),o},[])});r=(0,Ie.compact)(r);var i=(0,Ie.filter)(r,function(s){return s.length>1}),n=(0,Ie.map)(i,function(s){var o=(0,Ie.map)(s,function(l){return l.name}),a=(0,Ie.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:zt.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}je.findDuplicatePatterns=uG;function nG(t){var e=(0,Ie.filter)(t,function(i){if(!(0,Ie.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==zt.Lexer.SKIPPED&&n!==zt.Lexer.NA&&!(0,Ie.isString)(n)}),r=(0,Ie.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:zt.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return r}je.findInvalidGroupType=nG;function sG(t,e){var r=(0,Ie.filter)(t,function(n){return n.PUSH_MODE!==void 0&&!(0,Ie.contains)(e,n.PUSH_MODE)}),i=(0,Ie.map)(r,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:zt.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}je.findModesThatDoNotExist=sG;function oG(t){var e=[],r=(0,Ie.reduce)(t,function(i,n,s){var o=n.PATTERN;return o===zt.Lexer.NA||((0,Ie.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,Ie.isRegExp)(o)&&XEe(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,Ie.forEach)(t,function(i,n){(0,Ie.forEach)(r,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:zt.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}je.findUnreachablePatterns=oG;function _Ee(t,e){if((0,Ie.isRegExp)(e)){var r=e.exec(t);return r!==null&&r.index===0}else{if((0,Ie.isFunction)(e))return e(t,0,[],{});if((0,Ie.has)(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function XEe(t){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,Ie.find)(e,function(r){return t.source.indexOf(r)!==-1})===void 0}function jv(t){var e=t.ignoreCase?"i":"";return new RegExp("^(?:"+t.source+")",e)}je.addStartOfInput=jv;function Yv(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}je.addStickyFlag=Yv;function ZEe(t,e,r){var i=[];return(0,Ie.has)(t,je.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+je.DEFAULT_MODE+`> property in its definition -`,type:zt.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Ie.has)(t,je.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+je.MODES+`> property in its definition -`,type:zt.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Ie.has)(t,je.MODES)&&(0,Ie.has)(t,je.DEFAULT_MODE)&&!(0,Ie.has)(t.modes,t.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+je.DEFAULT_MODE+": <"+t.defaultMode+`>which does not exist -`,type:zt.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Ie.has)(t,je.MODES)&&(0,Ie.forEach)(t.modes,function(n,s){(0,Ie.forEach)(n,function(o,a){(0,Ie.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> -`),type:zt.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}je.performRuntimeChecks=ZEe;function $Ee(t,e,r){var i=[],n=!1,s=(0,Ie.compact)((0,Ie.flatten)((0,Ie.mapValues)(t.modes,function(l){return l}))),o=(0,Ie.reject)(s,function(l){return l[ao]===zt.Lexer.NA}),a=tG(r);return e&&(0,Ie.forEach)(o,function(l){var c=eG(l,a);if(c!==!1){var u=gG(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,Ie.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,Iu.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. - This Lexer has been defined to track line and column information, - But none of the Token Types can be identified as matching a line terminator. - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:zt.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}je.performWarningRuntimeChecks=$Ee;function eIe(t){var e={},r=(0,Ie.keys)(t);return(0,Ie.forEach)(r,function(i){var n=t[i];if((0,Ie.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}je.cloneEmptyGroups=eIe;function qv(t){var e=t.PATTERN;if((0,Ie.isRegExp)(e))return!1;if((0,Ie.isFunction)(e))return!0;if((0,Ie.has)(e,"exec"))return!0;if((0,Ie.isString)(e))return!1;throw Error("non exhaustive match")}je.isCustomPattern=qv;function $H(t){return(0,Ie.isString)(t)&&t.length===1?t.charCodeAt(0):!1}je.isShortPattern=$H;je.LineTerminatorOptimizedTester={test:function(t){for(var e=t.length,r=this.lastIndex;r Token Type -`)+(" Root cause: "+e.errMsg+`. -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===zt.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. -`+(" The problem is in the <"+t.name+`> Token Type -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}je.buildLineBreakIssueMessage=gG;function tG(t){var e=(0,Ie.map)(t,function(r){return(0,Ie.isString)(r)&&r.length>0?r.charCodeAt(0):r});return e}function Jv(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}je.minOptimizationVal=256;var pI=[];function Wv(t){return t255?255+~~(t/255):t}}});var yu=E(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.isTokenType=Bt.hasExtendingTokensTypesMapProperty=Bt.hasExtendingTokensTypesProperty=Bt.hasCategoriesProperty=Bt.hasShortKeyProperty=Bt.singleAssignCategoriesToksMap=Bt.assignCategoriesMapProp=Bt.assignCategoriesTokensProp=Bt.assignTokenDefaultProps=Bt.expandCategories=Bt.augmentTokenTypes=Bt.tokenIdxToClass=Bt.tokenShortNameIdx=Bt.tokenStructuredMatcherNoCategories=Bt.tokenStructuredMatcher=void 0;var Kr=Dt();function tIe(t,e){var r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}Bt.tokenStructuredMatcher=tIe;function rIe(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}Bt.tokenStructuredMatcherNoCategories=rIe;Bt.tokenShortNameIdx=1;Bt.tokenIdxToClass={};function iIe(t){var e=fG(t);hG(e),dG(e),pG(e),(0,Kr.forEach)(e,function(r){r.isParent=r.categoryMatches.length>0})}Bt.augmentTokenTypes=iIe;function fG(t){for(var e=(0,Kr.cloneArr)(t),r=t,i=!0;i;){r=(0,Kr.compact)((0,Kr.flatten)((0,Kr.map)(r,function(s){return s.CATEGORIES})));var n=(0,Kr.difference)(r,e);e=e.concat(n),(0,Kr.isEmpty)(n)?i=!1:r=n}return e}Bt.expandCategories=fG;function hG(t){(0,Kr.forEach)(t,function(e){CG(e)||(Bt.tokenIdxToClass[Bt.tokenShortNameIdx]=e,e.tokenTypeIdx=Bt.tokenShortNameIdx++),zv(e)&&!(0,Kr.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),zv(e)||(e.CATEGORIES=[]),mG(e)||(e.categoryMatches=[]),EG(e)||(e.categoryMatchesMap={})})}Bt.assignTokenDefaultProps=hG;function pG(t){(0,Kr.forEach)(t,function(e){e.categoryMatches=[],(0,Kr.forEach)(e.categoryMatchesMap,function(r,i){e.categoryMatches.push(Bt.tokenIdxToClass[i].tokenTypeIdx)})})}Bt.assignCategoriesTokensProp=pG;function dG(t){(0,Kr.forEach)(t,function(e){Vv([],e)})}Bt.assignCategoriesMapProp=dG;function Vv(t,e){(0,Kr.forEach)(t,function(r){e.categoryMatchesMap[r.tokenTypeIdx]=!0}),(0,Kr.forEach)(e.CATEGORIES,function(r){var i=t.concat(e);(0,Kr.contains)(i,r)||Vv(i,r)})}Bt.singleAssignCategoriesToksMap=Vv;function CG(t){return(0,Kr.has)(t,"tokenTypeIdx")}Bt.hasShortKeyProperty=CG;function zv(t){return(0,Kr.has)(t,"CATEGORIES")}Bt.hasCategoriesProperty=zv;function mG(t){return(0,Kr.has)(t,"categoryMatches")}Bt.hasExtendingTokensTypesProperty=mG;function EG(t){return(0,Kr.has)(t,"categoryMatchesMap")}Bt.hasExtendingTokensTypesMapProperty=EG;function nIe(t){return(0,Kr.has)(t,"tokenTypeIdx")}Bt.isTokenType=nIe});var _v=E(dI=>{"use strict";Object.defineProperty(dI,"__esModule",{value:!0});dI.defaultLexerErrorProvider=void 0;dI.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(t){return"Unable to pop Lexer Mode after encountering Token ->"+t.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(t,e,r,i,n){return"unexpected character: ->"+t.charAt(e)+"<- at offset: "+e+","+(" skipped "+r+" characters.")}}});var Gh=E(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.Lexer=Rl.LexerDefinitionErrorType=void 0;var Ps=Hv(),Vt=Dt(),sIe=yu(),oIe=_v(),aIe=gI(),AIe;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(AIe=Rl.LexerDefinitionErrorType||(Rl.LexerDefinitionErrorType={}));var jh={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:oIe.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(jh);var lIe=function(){function t(e,r){var i=this;if(r===void 0&&(r=jh),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=(0,Vt.merge)(jh,r);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=Infinity,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===jh.lineTerminatorsPattern)i.config.lineTerminatorsPattern=Ps.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===jh.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,Vt.isArray)(e)?(s={modes:{}},s.modes[Ps.DEFAULT_MODE]=(0,Vt.cloneArr)(e),s[Ps.DEFAULT_MODE]=Ps.DEFAULT_MODE):(o=!1,s=(0,Vt.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Ps.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,Ps.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,Vt.forEach)(s.modes,function(u,g){s.modes[g]=(0,Vt.reject)(u,function(f){return(0,Vt.isUndefined)(f)})});var a=(0,Vt.keys)(s.modes);if((0,Vt.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Ps.validatePatterns)(u,a))}),(0,Vt.isEmpty)(i.lexerDefinitionErrors)){(0,sIe.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,Ps.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,Vt.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,Vt.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,Vt.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- -`);throw new Error(`Errors detected in definition of Lexer: -`+c)}(0,Vt.forEach)(i.lexerDefinitionWarning,function(u){(0,Vt.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(Ps.SUPPORT_STICKY?(i.chopInput=Vt.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=Vt.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=Vt.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=Vt.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=Vt.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,Vt.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(r.ensureOptimizations&&!(0,Vt.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. - Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,aIe.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,Vt.toFastProperties)(i)})})}return t.prototype.tokenize=function(e,r){if(r===void 0&&(r=this.defaultMode),!(0,Vt.isEmpty)(this.lexerDefinitionErrors)){var i=(0,Vt.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- -`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+n)}var s=this.tokenizeInternal(e,r);return s},t.prototype.tokenizeInternal=function(e,r){var i=this,n,s,o,a,l,c,u,g,f,h,p,d,m,I,B,b,R=e,H=R.length,L=0,K=0,J=this.hasCustom?0:Math.floor(e.length/10),ne=new Array(J),q=[],A=this.trackStartLines?1:void 0,V=this.trackStartLines?1:void 0,W=(0,Ps.cloneEmptyGroups)(this.emptyGroups),X=this.trackStartLines,F=this.config.lineTerminatorsPattern,D=0,he=[],pe=[],Ne=[],Pe=[];Object.freeze(Pe);var qe=void 0;function re(){return he}function se(wr){var Ui=(0,Ps.charCodeToOptimizedIndex)(wr),ws=pe[Ui];return ws===void 0?Pe:ws}var be=function(wr){if(Ne.length===1&&wr.tokenType.PUSH_MODE===void 0){var Ui=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(wr);q.push({offset:wr.startOffset,line:wr.startLine!==void 0?wr.startLine:void 0,column:wr.startColumn!==void 0?wr.startColumn:void 0,length:wr.image.length,message:Ui})}else{Ne.pop();var ws=(0,Vt.last)(Ne);he=i.patternIdxToConfig[ws],pe=i.charCodeToPatternIdxToConfig[ws],D=he.length;var Tf=i.canModeBeOptimized[ws]&&i.config.safeMode===!1;pe&&Tf?qe=se:qe=re}};function ae(wr){Ne.push(wr),pe=this.charCodeToPatternIdxToConfig[wr],he=this.patternIdxToConfig[wr],D=he.length,D=he.length;var Ui=this.canModeBeOptimized[wr]&&this.config.safeMode===!1;pe&&Ui?qe=se:qe=re}ae.call(this,r);for(var Ae;Lc.length){c=a,u=g,Ae=Oe;break}}}break}}if(c!==null){if(f=c.length,h=Ae.group,h!==void 0&&(p=Ae.tokenTypeIdx,d=this.createTokenInstance(c,L,p,Ae.tokenType,A,V,f),this.handlePayload(d,u),h===!1?K=this.addToken(ne,K,d):W[h].push(d)),e=this.chopInput(e,f),L=L+f,V=this.computeNewColumn(V,f),X===!0&&Ae.canLineTerminator===!0){var dt=0,ri=void 0,ii=void 0;F.lastIndex=0;do ri=F.test(c),ri===!0&&(ii=F.lastIndex-1,dt++);while(ri===!0);dt!==0&&(A=A+dt,V=f-ii,this.updateTokenEndLineColumnLocation(d,h,ii,dt,A,V,f))}this.handleModes(Ae,be,ae,d)}else{for(var an=L,yr=A,Ki=V,Qi=!1;!Qi&&L <"+e+">");var n=(0,Vt.timer)(r),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return r()},t.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",t.NA=/NOT_APPLICABLE/,t}();Rl.Lexer=lIe});var nA=E(Ci=>{"use strict";Object.defineProperty(Ci,"__esModule",{value:!0});Ci.tokenMatcher=Ci.createTokenInstance=Ci.EOF=Ci.createToken=Ci.hasTokenLabel=Ci.tokenName=Ci.tokenLabel=void 0;var Ds=Dt(),cIe=Gh(),Xv=yu();function uIe(t){return IG(t)?t.LABEL:t.name}Ci.tokenLabel=uIe;function gIe(t){return t.name}Ci.tokenName=gIe;function IG(t){return(0,Ds.isString)(t.LABEL)&&t.LABEL!==""}Ci.hasTokenLabel=IG;var fIe="parent",yG="categories",wG="label",BG="group",QG="push_mode",bG="pop_mode",vG="longer_alt",SG="line_breaks",xG="start_chars_hint";function kG(t){return hIe(t)}Ci.createToken=kG;function hIe(t){var e=t.pattern,r={};if(r.name=t.name,(0,Ds.isUndefined)(e)||(r.PATTERN=e),(0,Ds.has)(t,fIe))throw`The parent property is no longer supported. -See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Ds.has)(t,yG)&&(r.CATEGORIES=t[yG]),(0,Xv.augmentTokenTypes)([r]),(0,Ds.has)(t,wG)&&(r.LABEL=t[wG]),(0,Ds.has)(t,BG)&&(r.GROUP=t[BG]),(0,Ds.has)(t,bG)&&(r.POP_MODE=t[bG]),(0,Ds.has)(t,QG)&&(r.PUSH_MODE=t[QG]),(0,Ds.has)(t,vG)&&(r.LONGER_ALT=t[vG]),(0,Ds.has)(t,SG)&&(r.LINE_BREAKS=t[SG]),(0,Ds.has)(t,xG)&&(r.START_CHARS_HINT=t[xG]),r}Ci.EOF=kG({name:"EOF",pattern:cIe.Lexer.NA});(0,Xv.augmentTokenTypes)([Ci.EOF]);function pIe(t,e,r,i,n,s,o,a){return{image:e,startOffset:r,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}Ci.createTokenInstance=pIe;function dIe(t,e){return(0,Xv.tokenStructuredMatcher)(t,e)}Ci.tokenMatcher=dIe});var hn=E(Tt=>{"use strict";var oa=Tt&&Tt.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(Tt,"__esModule",{value:!0});Tt.serializeProduction=Tt.serializeGrammar=Tt.Terminal=Tt.Alternation=Tt.RepetitionWithSeparator=Tt.Repetition=Tt.RepetitionMandatoryWithSeparator=Tt.RepetitionMandatory=Tt.Option=Tt.Alternative=Tt.Rule=Tt.NonTerminal=Tt.AbstractProduction=void 0;var $t=Dt(),CIe=nA(),Ao=function(){function t(e){this._definition=e}return Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),t.prototype.accept=function(e){e.visit(this),(0,$t.forEach)(this.definition,function(r){r.accept(e)})},t}();Tt.AbstractProduction=Ao;var PG=function(t){oa(e,t);function e(r){var i=t.call(this,[])||this;return i.idx=1,(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(r){},enumerable:!1,configurable:!0}),e.prototype.accept=function(r){r.visit(this)},e}(Ao);Tt.NonTerminal=PG;var DG=function(t){oa(e,t);function e(r){var i=t.call(this,r.definition)||this;return i.orgText="",(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return e}(Ao);Tt.Rule=DG;var RG=function(t){oa(e,t);function e(r){var i=t.call(this,r.definition)||this;return i.ignoreAmbiguities=!1,(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return e}(Ao);Tt.Alternative=RG;var FG=function(t){oa(e,t);function e(r){var i=t.call(this,r.definition)||this;return i.idx=1,(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return e}(Ao);Tt.Option=FG;var NG=function(t){oa(e,t);function e(r){var i=t.call(this,r.definition)||this;return i.idx=1,(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return e}(Ao);Tt.RepetitionMandatory=NG;var LG=function(t){oa(e,t);function e(r){var i=t.call(this,r.definition)||this;return i.idx=1,(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return e}(Ao);Tt.RepetitionMandatoryWithSeparator=LG;var TG=function(t){oa(e,t);function e(r){var i=t.call(this,r.definition)||this;return i.idx=1,(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return e}(Ao);Tt.Repetition=TG;var MG=function(t){oa(e,t);function e(r){var i=t.call(this,r.definition)||this;return i.idx=1,(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return e}(Ao);Tt.RepetitionWithSeparator=MG;var OG=function(t){oa(e,t);function e(r){var i=t.call(this,r.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,$t.assign)(i,(0,$t.pick)(r,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(r){this._definition=r},enumerable:!1,configurable:!0}),e}(Ao);Tt.Alternation=OG;var CI=function(){function t(e){this.idx=1,(0,$t.assign)(this,(0,$t.pick)(e,function(r){return r!==void 0}))}return t.prototype.accept=function(e){e.visit(this)},t}();Tt.Terminal=CI;function mIe(t){return(0,$t.map)(t,Yh)}Tt.serializeGrammar=mIe;function Yh(t){function e(s){return(0,$t.map)(s,Yh)}if(t instanceof PG){var r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return(0,$t.isString)(t.label)&&(r.label=t.label),r}else{if(t instanceof RG)return{type:"Alternative",definition:e(t.definition)};if(t instanceof FG)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof NG)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof LG)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Yh(new CI({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof MG)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Yh(new CI({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof TG)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof OG)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof CI){var i={type:"Terminal",name:t.terminalType.name,label:(0,CIe.tokenLabel)(t.terminalType),idx:t.idx};(0,$t.isString)(t.label)&&(i.terminalLabel=t.label);var n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(i.pattern=(0,$t.isRegExp)(n)?n.source:n),i}else{if(t instanceof DG)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}Tt.serializeProduction=Yh});var EI=E(mI=>{"use strict";Object.defineProperty(mI,"__esModule",{value:!0});mI.RestWalker=void 0;var Zv=Dt(),pn=hn(),EIe=function(){function t(){}return t.prototype.walk=function(e,r){var i=this;r===void 0&&(r=[]),(0,Zv.forEach)(e.definition,function(n,s){var o=(0,Zv.drop)(e.definition,s+1);if(n instanceof pn.NonTerminal)i.walkProdRef(n,o,r);else if(n instanceof pn.Terminal)i.walkTerminal(n,o,r);else if(n instanceof pn.Alternative)i.walkFlat(n,o,r);else if(n instanceof pn.Option)i.walkOption(n,o,r);else if(n instanceof pn.RepetitionMandatory)i.walkAtLeastOne(n,o,r);else if(n instanceof pn.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,r);else if(n instanceof pn.RepetitionWithSeparator)i.walkManySep(n,o,r);else if(n instanceof pn.Repetition)i.walkMany(n,o,r);else if(n instanceof pn.Alternation)i.walkOr(n,o,r);else throw Error("non exhaustive match")})},t.prototype.walkTerminal=function(e,r,i){},t.prototype.walkProdRef=function(e,r,i){},t.prototype.walkFlat=function(e,r,i){var n=r.concat(i);this.walk(e,n)},t.prototype.walkOption=function(e,r,i){var n=r.concat(i);this.walk(e,n)},t.prototype.walkAtLeastOne=function(e,r,i){var n=[new pn.Option({definition:e.definition})].concat(r,i);this.walk(e,n)},t.prototype.walkAtLeastOneSep=function(e,r,i){var n=KG(e,r,i);this.walk(e,n)},t.prototype.walkMany=function(e,r,i){var n=[new pn.Option({definition:e.definition})].concat(r,i);this.walk(e,n)},t.prototype.walkManySep=function(e,r,i){var n=KG(e,r,i);this.walk(e,n)},t.prototype.walkOr=function(e,r,i){var n=this,s=r.concat(i);(0,Zv.forEach)(e.definition,function(o){var a=new pn.Alternative({definition:[o]});n.walk(a,s)})},t}();mI.RestWalker=EIe;function KG(t,e,r){var i=[new pn.Option({definition:[new pn.Terminal({terminalType:t.separator})].concat(t.definition)})],n=i.concat(e,r);return n}});var wu=E(II=>{"use strict";Object.defineProperty(II,"__esModule",{value:!0});II.GAstVisitor=void 0;var lo=hn(),IIe=function(){function t(){}return t.prototype.visit=function(e){var r=e;switch(r.constructor){case lo.NonTerminal:return this.visitNonTerminal(r);case lo.Alternative:return this.visitAlternative(r);case lo.Option:return this.visitOption(r);case lo.RepetitionMandatory:return this.visitRepetitionMandatory(r);case lo.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(r);case lo.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(r);case lo.Repetition:return this.visitRepetition(r);case lo.Alternation:return this.visitAlternation(r);case lo.Terminal:return this.visitTerminal(r);case lo.Rule:return this.visitRule(r);default:throw Error("non exhaustive match")}},t.prototype.visitNonTerminal=function(e){},t.prototype.visitAlternative=function(e){},t.prototype.visitOption=function(e){},t.prototype.visitRepetition=function(e){},t.prototype.visitRepetitionMandatory=function(e){},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){},t.prototype.visitRepetitionWithSeparator=function(e){},t.prototype.visitAlternation=function(e){},t.prototype.visitTerminal=function(e){},t.prototype.visitRule=function(e){},t}();II.GAstVisitor=IIe});var Jh=E(Si=>{"use strict";var yIe=Si&&Si.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(Si,"__esModule",{value:!0});Si.collectMethods=Si.DslMethodsCollectorVisitor=Si.getProductionDslName=Si.isBranchingProd=Si.isOptionalProd=Si.isSequenceProd=void 0;var qh=Dt(),dr=hn(),wIe=wu();function BIe(t){return t instanceof dr.Alternative||t instanceof dr.Option||t instanceof dr.Repetition||t instanceof dr.RepetitionMandatory||t instanceof dr.RepetitionMandatoryWithSeparator||t instanceof dr.RepetitionWithSeparator||t instanceof dr.Terminal||t instanceof dr.Rule}Si.isSequenceProd=BIe;function $v(t,e){e===void 0&&(e=[]);var r=t instanceof dr.Option||t instanceof dr.Repetition||t instanceof dr.RepetitionWithSeparator;return r?!0:t instanceof dr.Alternation?(0,qh.some)(t.definition,function(i){return $v(i,e)}):t instanceof dr.NonTerminal&&(0,qh.contains)(e,t)?!1:t instanceof dr.AbstractProduction?(t instanceof dr.NonTerminal&&e.push(t),(0,qh.every)(t.definition,function(i){return $v(i,e)})):!1}Si.isOptionalProd=$v;function QIe(t){return t instanceof dr.Alternation}Si.isBranchingProd=QIe;function bIe(t){if(t instanceof dr.NonTerminal)return"SUBRULE";if(t instanceof dr.Option)return"OPTION";if(t instanceof dr.Alternation)return"OR";if(t instanceof dr.RepetitionMandatory)return"AT_LEAST_ONE";if(t instanceof dr.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(t instanceof dr.RepetitionWithSeparator)return"MANY_SEP";if(t instanceof dr.Repetition)return"MANY";if(t instanceof dr.Terminal)return"CONSUME";throw Error("non exhaustive match")}Si.getProductionDslName=bIe;var UG=function(t){yIe(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.separator="-",r.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},r}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(r){var i=r.terminalType.name+this.separator+"Terminal";(0,qh.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(r)},e.prototype.visitNonTerminal=function(r){var i=r.nonTerminalName+this.separator+"Terminal";(0,qh.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(r)},e.prototype.visitOption=function(r){this.dslMethods.option.push(r)},e.prototype.visitRepetitionWithSeparator=function(r){this.dslMethods.repetitionWithSeparator.push(r)},e.prototype.visitRepetitionMandatory=function(r){this.dslMethods.repetitionMandatory.push(r)},e.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.dslMethods.repetitionMandatoryWithSeparator.push(r)},e.prototype.visitRepetition=function(r){this.dslMethods.repetition.push(r)},e.prototype.visitAlternation=function(r){this.dslMethods.alternation.push(r)},e}(wIe.GAstVisitor);Si.DslMethodsCollectorVisitor=UG;var yI=new UG;function vIe(t){yI.reset(),t.accept(yI);var e=yI.dslMethods;return yI.reset(),e}Si.collectMethods=vIe});var tS=E(co=>{"use strict";Object.defineProperty(co,"__esModule",{value:!0});co.firstForTerminal=co.firstForBranching=co.firstForSequence=co.first=void 0;var wI=Dt(),HG=hn(),eS=Jh();function BI(t){if(t instanceof HG.NonTerminal)return BI(t.referencedRule);if(t instanceof HG.Terminal)return YG(t);if((0,eS.isSequenceProd)(t))return GG(t);if((0,eS.isBranchingProd)(t))return jG(t);throw Error("non exhaustive match")}co.first=BI;function GG(t){for(var e=[],r=t.definition,i=0,n=r.length>i,s,o=!0;n&&o;)s=r[i],o=(0,eS.isOptionalProd)(s),e=e.concat(BI(s)),i=i+1,n=r.length>i;return(0,wI.uniq)(e)}co.firstForSequence=GG;function jG(t){var e=(0,wI.map)(t.definition,function(r){return BI(r)});return(0,wI.uniq)((0,wI.flatten)(e))}co.firstForBranching=jG;function YG(t){return[t.terminalType]}co.firstForTerminal=YG});var rS=E(QI=>{"use strict";Object.defineProperty(QI,"__esModule",{value:!0});QI.IN=void 0;QI.IN="_~IN~_"});var VG=E(es=>{"use strict";var SIe=es&&es.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(es,"__esModule",{value:!0});es.buildInProdFollowPrefix=es.buildBetweenProdsFollowPrefix=es.computeAllProdsFollows=es.ResyncFollowsWalker=void 0;var xIe=EI(),kIe=tS(),qG=Dt(),JG=rS(),PIe=hn(),zG=function(t){SIe(e,t);function e(r){var i=t.call(this)||this;return i.topProd=r,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(r,i,n){},e.prototype.walkProdRef=function(r,i,n){var s=WG(r.referencedRule,r.idx)+this.topProd.name,o=i.concat(n),a=new PIe.Alternative({definition:o}),l=(0,kIe.first)(a);this.follows[s]=l},e}(xIe.RestWalker);es.ResyncFollowsWalker=zG;function DIe(t){var e={};return(0,qG.forEach)(t,function(r){var i=new zG(r).startWalking();(0,qG.assign)(e,i)}),e}es.computeAllProdsFollows=DIe;function WG(t,e){return t.name+e+JG.IN}es.buildBetweenProdsFollowPrefix=WG;function RIe(t){var e=t.terminalType.name;return e+t.idx+JG.IN}es.buildInProdFollowPrefix=RIe});var Wh=E(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.defaultGrammarValidatorErrorProvider=aa.defaultGrammarResolverErrorProvider=aa.defaultParserErrorProvider=void 0;var Bu=nA(),FIe=Dt(),Rs=Dt(),iS=hn(),_G=Jh();aa.defaultParserErrorProvider={buildMismatchTokenMessage:function(t){var e=t.expected,r=t.actual,i=t.previous,n=t.ruleName,s=(0,Bu.hasTokenLabel)(e),o=s?"--> "+(0,Bu.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+r.image+"' <--";return a},buildNotAllInputParsedMessage:function(t){var e=t.firstRedundant,r=t.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(t){var e=t.expectedPathsPerAlt,r=t.actual,i=t.previous,n=t.customUserDescription,s=t.ruleName,o="Expecting: ",a=(0,Rs.first)(r).image,l=` -but found: '`+a+"'";if(n)return o+n+l;var c=(0,Rs.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,Rs.map)(c,function(h){return"["+(0,Rs.map)(h,function(p){return(0,Bu.tokenLabel)(p)}).join(", ")+"]"}),g=(0,Rs.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: -`+g.join(` -`);return o+f+l},buildEarlyExitMessage:function(t){var e=t.expectedIterationPaths,r=t.actual,i=t.customUserDescription,n=t.ruleName,s="Expecting: ",o=(0,Rs.first)(r).image,a=` -but found: '`+o+"'";if(i)return s+i+a;var l=(0,Rs.map)(e,function(u){return"["+(0,Rs.map)(u,function(g){return(0,Bu.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: - `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(aa.defaultParserErrorProvider);aa.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(t,e){var r="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+t.name+"<-";return r}};aa.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(t,e){function r(u){return u instanceof iS.Terminal?u.terminalType.name:u instanceof iS.NonTerminal?u.nonTerminalName:""}var i=t.name,n=(0,Rs.first)(e),s=n.idx,o=(0,_G.getProductionDslName)(n),a=r(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` - appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. - For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES - `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` -`),c},buildNamespaceConflictError:function(t){var e=`Namespace conflict found in grammar. -`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+t.name+`>. -`)+`To resolve this make sure each Terminal and Non-Terminal names are unique -This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(t){var e=(0,Rs.map)(t.prefixPath,function(n){return(0,Bu.tokenLabel)(n)}).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,i="Ambiguous alternatives: <"+t.ambiguityIndices.join(" ,")+`> due to common lookahead prefix -`+("in inside <"+t.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`;return i},buildAlternationAmbiguityError:function(t){var e=(0,Rs.map)(t.prefixPath,function(n){return(0,Bu.tokenLabel)(n)}).join(", "),r=t.alternation.idx===0?"":t.alternation.idx,i="Ambiguous Alternatives Detected: <"+t.ambiguityIndices.join(" ,")+"> in "+(" inside <"+t.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,i},buildEmptyRepetitionError:function(t){var e=(0,_G.getProductionDslName)(t.repetition);t.repetition.idx!==0&&(e+=t.repetition.idx);var r="The repetition <"+e+"> within Rule <"+t.topLevelRule.name+`> can never consume any tokens. -This could lead to an infinite loop.`;return r},buildTokenNameError:function(t){return"deprecated"},buildEmptyAlternationError:function(t){var e="Ambiguous empty alternative: <"+(t.emptyChoiceIdx+1)+">"+(" in inside <"+t.topLevelRule.name+`> Rule. -`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(t){var e=`An Alternation cannot have more than 256 alternatives: -`+(" inside <"+t.topLevelRule.name+`> Rule. - has `+(t.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(t){var e=t.topLevelRule.name,r=FIe.map(t.leftRecursionPath,function(s){return s.name}),i=e+" --> "+r.concat([e]).join(" --> "),n=`Left Recursion found in grammar. -`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) -`)+(`without consuming any Tokens. The grammar path that causes this is: - `+i+` -`)+` To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(t){return"deprecated"},buildDuplicateRuleNameError:function(t){var e;t.topLevelRule instanceof iS.Rule?e=t.topLevelRule.name:e=t.topLevelRule;var r="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+t.grammarName+"<-";return r}}});var $G=E(sA=>{"use strict";var NIe=sA&&sA.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(sA,"__esModule",{value:!0});sA.GastRefResolverVisitor=sA.resolveGrammar=void 0;var LIe=Tn(),XG=Dt(),TIe=wu();function MIe(t,e){var r=new ZG(t,e);return r.resolveRefs(),r.errors}sA.resolveGrammar=MIe;var ZG=function(t){NIe(e,t);function e(r,i){var n=t.call(this)||this;return n.nameToTopRule=r,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var r=this;(0,XG.forEach)((0,XG.values)(this.nameToTopRule),function(i){r.currTopLevel=i,i.accept(r)})},e.prototype.visitNonTerminal=function(r){var i=this.nameToTopRule[r.nonTerminalName];if(i)r.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,r);this.errors.push({message:n,type:LIe.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:r.nonTerminalName})}},e}(TIe.GAstVisitor);sA.GastRefResolverVisitor=ZG});var Vh=E(Br=>{"use strict";var Fl=Br&&Br.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(Br,"__esModule",{value:!0});Br.nextPossibleTokensAfter=Br.possiblePathsFrom=Br.NextTerminalAfterAtLeastOneSepWalker=Br.NextTerminalAfterAtLeastOneWalker=Br.NextTerminalAfterManySepWalker=Br.NextTerminalAfterManyWalker=Br.AbstractNextTerminalAfterProductionWalker=Br.NextAfterTokenWalker=Br.AbstractNextPossibleTokensWalker=void 0;var ej=EI(),xt=Dt(),OIe=tS(),It=hn(),tj=function(t){Fl(e,t);function e(r,i){var n=t.call(this)||this;return n.topProd=r,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,xt.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,xt.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(r,i){i===void 0&&(i=[]),this.found||t.prototype.walk.call(this,r,i)},e.prototype.walkProdRef=function(r,i,n){if(r.referencedRule.name===this.nextProductionName&&r.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(r.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,xt.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(ej.RestWalker);Br.AbstractNextPossibleTokensWalker=tj;var KIe=function(t){Fl(e,t);function e(r,i){var n=t.call(this,r,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(r,i,n){if(this.isAtEndOfPath&&r.terminalType.name===this.nextTerminalName&&r.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new It.Alternative({definition:s});this.possibleTokTypes=(0,OIe.first)(o),this.found=!0}},e}(tj);Br.NextAfterTokenWalker=KIe;var zh=function(t){Fl(e,t);function e(r,i){var n=t.call(this)||this;return n.topRule=r,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(ej.RestWalker);Br.AbstractNextTerminalAfterProductionWalker=zh;var UIe=function(t){Fl(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.walkMany=function(r,i,n){if(r.idx===this.occurrence){var s=(0,xt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof It.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else t.prototype.walkMany.call(this,r,i,n)},e}(zh);Br.NextTerminalAfterManyWalker=UIe;var HIe=function(t){Fl(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.walkManySep=function(r,i,n){if(r.idx===this.occurrence){var s=(0,xt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof It.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else t.prototype.walkManySep.call(this,r,i,n)},e}(zh);Br.NextTerminalAfterManySepWalker=HIe;var GIe=function(t){Fl(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(r,i,n){if(r.idx===this.occurrence){var s=(0,xt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof It.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else t.prototype.walkAtLeastOne.call(this,r,i,n)},e}(zh);Br.NextTerminalAfterAtLeastOneWalker=GIe;var jIe=function(t){Fl(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(r,i,n){if(r.idx===this.occurrence){var s=(0,xt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof It.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else t.prototype.walkAtLeastOneSep.call(this,r,i,n)},e}(zh);Br.NextTerminalAfterAtLeastOneSepWalker=jIe;function rj(t,e,r){r===void 0&&(r=[]),r=(0,xt.cloneArr)(r);var i=[],n=0;function s(c){return c.concat((0,xt.drop)(t,n+1))}function o(c){var u=rj(s(c),e,r);return i.concat(u)}for(;r.length=0;W--){var X=I.definition[W],F={idx:p,def:X.definition.concat((0,xt.drop)(h)),ruleStack:d,occurrenceStack:m};g.push(F),g.push(o)}else if(I instanceof It.Alternative)g.push({idx:p,def:I.definition.concat((0,xt.drop)(h)),ruleStack:d,occurrenceStack:m});else if(I instanceof It.Rule)g.push(YIe(I,p,d,m));else throw Error("non exhaustive match")}}return u}Br.nextPossibleTokensAfter=qIe;function YIe(t,e,r,i){var n=(0,xt.cloneArr)(r);n.push(t.name);var s=(0,xt.cloneArr)(i);return s.push(1),{idx:e,def:t.definition,ruleStack:n,occurrenceStack:s}}});var _h=E(Gt=>{"use strict";var ij=Gt&&Gt.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.areTokenCategoriesNotUsed=Gt.isStrictPrefixOfPath=Gt.containsPath=Gt.getLookaheadPathsForOptionalProd=Gt.getLookaheadPathsForOr=Gt.lookAheadSequenceFromAlternatives=Gt.buildSingleAlternativeLookaheadFunction=Gt.buildAlternativesLookAheadFunc=Gt.buildLookaheadFuncForOptionalProd=Gt.buildLookaheadFuncForOr=Gt.getProdType=Gt.PROD_TYPE=void 0;var _t=Dt(),nj=Vh(),JIe=EI(),bI=yu(),oA=hn(),WIe=wu(),zr;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(zr=Gt.PROD_TYPE||(Gt.PROD_TYPE={}));function zIe(t){if(t instanceof oA.Option)return zr.OPTION;if(t instanceof oA.Repetition)return zr.REPETITION;if(t instanceof oA.RepetitionMandatory)return zr.REPETITION_MANDATORY;if(t instanceof oA.RepetitionMandatoryWithSeparator)return zr.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof oA.RepetitionWithSeparator)return zr.REPETITION_WITH_SEPARATOR;if(t instanceof oA.Alternation)return zr.ALTERNATION;throw Error("non exhaustive match")}Gt.getProdType=zIe;function VIe(t,e,r,i,n,s){var o=sj(t,e,r),a=nS(o)?bI.tokenStructuredMatcherNoCategories:bI.tokenStructuredMatcher;return s(o,i,a,n)}Gt.buildLookaheadFuncForOr=VIe;function _Ie(t,e,r,i,n,s){var o=oj(t,e,n,r),a=nS(o)?bI.tokenStructuredMatcherNoCategories:bI.tokenStructuredMatcher;return s(o[0],a,i)}Gt.buildLookaheadFuncForOptionalProd=_Ie;function XIe(t,e,r,i){var n=t.length,s=(0,_t.every)(t,function(l){return(0,_t.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,_t.map)(l,function(b){return b.GATE}),u=0;u{"use strict";var aS=Mt&&Mt.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.checkPrefixAlternativesAmbiguities=Mt.validateSomeNonEmptyLookaheadPath=Mt.validateTooManyAlts=Mt.RepetionCollector=Mt.validateAmbiguousAlternationAlternatives=Mt.validateEmptyOrAlternative=Mt.getFirstNoneTerminal=Mt.validateNoLeftRecursion=Mt.validateRuleIsOverridden=Mt.validateRuleDoesNotAlreadyExist=Mt.OccurrenceValidationCollector=Mt.identifyProductionForDuplicates=Mt.validateGrammar=void 0;var jt=Dt(),Cr=Dt(),uo=Tn(),AS=Jh(),Qu=_h(),rye=Vh(),Fs=hn(),lS=wu();function sye(t,e,r,i,n){var s=jt.map(t,function(h){return iye(h,i)}),o=jt.map(t,function(h){return cS(h,h,i)}),a=[],l=[],c=[];(0,Cr.every)(o,Cr.isEmpty)&&(a=(0,Cr.map)(t,function(h){return uj(h,i)}),l=(0,Cr.map)(t,function(h){return gj(h,e,i)}),c=hj(t,e,i));var u=nye(t,r,i),g=(0,Cr.map)(t,function(h){return fj(h,i)}),f=(0,Cr.map)(t,function(h){return cj(h,t,n,i)});return jt.flatten(s.concat(c,o,a,l,u,g,f))}Mt.validateGrammar=sye;function iye(t,e){var r=new Cj;t.accept(r);var i=r.allProductions,n=jt.groupBy(i,pj),s=jt.pick(n,function(a){return a.length>1}),o=jt.map(jt.values(s),function(a){var l=jt.first(a),c=e.buildDuplicateFoundError(t,a),u=(0,AS.getProductionDslName)(l),g={message:c,type:uo.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:u,occurrence:l.idx},f=dj(l);return f&&(g.parameter=f),g});return o}function pj(t){return(0,AS.getProductionDslName)(t)+"_#_"+t.idx+"_#_"+dj(t)}Mt.identifyProductionForDuplicates=pj;function dj(t){return t instanceof Fs.Terminal?t.terminalType.name:t instanceof Fs.NonTerminal?t.nonTerminalName:""}var Cj=function(t){aS(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.allProductions=[],r}return e.prototype.visitNonTerminal=function(r){this.allProductions.push(r)},e.prototype.visitOption=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionWithSeparator=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionMandatory=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.allProductions.push(r)},e.prototype.visitRepetition=function(r){this.allProductions.push(r)},e.prototype.visitAlternation=function(r){this.allProductions.push(r)},e.prototype.visitTerminal=function(r){this.allProductions.push(r)},e}(lS.GAstVisitor);Mt.OccurrenceValidationCollector=Cj;function cj(t,e,r,i){var n=[],s=(0,Cr.reduce)(e,function(a,l){return l.name===t.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});n.push({message:o,type:uo.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:t.name})}return n}Mt.validateRuleDoesNotAlreadyExist=cj;function oye(t,e,r){var i=[],n;return jt.contains(e,t)||(n="Invalid rule override, rule: ->"+t+"<- cannot be overridden in the grammar: ->"+r+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:uo.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:t})),i}Mt.validateRuleIsOverridden=oye;function cS(t,e,r,i){i===void 0&&(i=[]);var n=[],s=Xh(e.definition);if(jt.isEmpty(s))return[];var o=t.name,a=jt.contains(s,t);a&&n.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:i}),type:uo.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=jt.difference(s,i.concat([t])),c=jt.map(l,function(u){var g=jt.cloneArr(i);return g.push(u),cS(t,u,r,g)});return n.concat(jt.flatten(c))}Mt.validateNoLeftRecursion=cS;function Xh(t){var e=[];if(jt.isEmpty(t))return e;var r=jt.first(t);if(r instanceof Fs.NonTerminal)e.push(r.referencedRule);else if(r instanceof Fs.Alternative||r instanceof Fs.Option||r instanceof Fs.RepetitionMandatory||r instanceof Fs.RepetitionMandatoryWithSeparator||r instanceof Fs.RepetitionWithSeparator||r instanceof Fs.Repetition)e=e.concat(Xh(r.definition));else if(r instanceof Fs.Alternation)e=jt.flatten(jt.map(r.definition,function(o){return Xh(o.definition)}));else if(!(r instanceof Fs.Terminal))throw Error("non exhaustive match");var i=(0,AS.isOptionalProd)(r),n=t.length>1;if(i&&n){var s=jt.drop(t);return e.concat(Xh(s))}else return e}Mt.getFirstNoneTerminal=Xh;var uS=function(t){aS(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.alternations=[],r}return e.prototype.visitAlternation=function(r){this.alternations.push(r)},e}(lS.GAstVisitor);function uj(t,e){var r=new uS;t.accept(r);var i=r.alternations,n=jt.reduce(i,function(s,o){var a=jt.dropRight(o.definition),l=jt.map(a,function(c,u){var g=(0,rye.nextPossibleTokensAfter)([c],[],null,1);return jt.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:o,emptyChoiceIdx:u}),type:uo.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(jt.compact(l))},[]);return n}Mt.validateEmptyOrAlternative=uj;function gj(t,e,r){var i=new uS;t.accept(i);var n=i.alternations;n=(0,Cr.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=jt.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,Qu.getLookaheadPathsForOr)(l,t,c,a),g=aye(u,a,t,r),f=mj(u,a,t,r);return o.concat(g,f)},[]);return s}Mt.validateAmbiguousAlternationAlternatives=gj;var Ej=function(t){aS(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.allProductions=[],r}return e.prototype.visitRepetitionWithSeparator=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionMandatory=function(r){this.allProductions.push(r)},e.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.allProductions.push(r)},e.prototype.visitRepetition=function(r){this.allProductions.push(r)},e}(lS.GAstVisitor);Mt.RepetionCollector=Ej;function fj(t,e){var r=new uS;t.accept(r);var i=r.alternations,n=jt.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:o}),type:uo.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:t.name,occurrence:o.idx}),s},[]);return n}Mt.validateTooManyAlts=fj;function hj(t,e,r){var i=[];return(0,Cr.forEach)(t,function(n){var s=new Ej;n.accept(s);var o=s.allProductions;(0,Cr.forEach)(o,function(a){var l=(0,Qu.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,Qu.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,Cr.isEmpty)((0,Cr.flatten)(f))){var h=r.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:uo.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}Mt.validateSomeNonEmptyLookaheadPath=hj;function aye(t,e,r,i){var n=[],s=(0,Cr.reduce)(t,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,Cr.forEach)(l,function(u){var g=[c];(0,Cr.forEach)(t,function(f,h){c!==h&&(0,Qu.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,Qu.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=jt.map(s,function(a){var l=(0,Cr.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:uo.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function mj(t,e,r,i){var n=[],s=(0,Cr.reduce)(t,function(o,a,l){var c=(0,Cr.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,Cr.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,Cr.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.validateGrammar=bu.resolveGrammar=void 0;var fS=Dt(),Aye=$G(),lye=gS(),Ij=Wh();function cye(t){t=(0,fS.defaults)(t,{errMsgProvider:Ij.defaultGrammarResolverErrorProvider});var e={};return(0,fS.forEach)(t.rules,function(r){e[r.name]=r}),(0,Aye.resolveGrammar)(e,t.errMsgProvider)}bu.resolveGrammar=cye;function uye(t){return t=(0,fS.defaults)(t,{errMsgProvider:Ij.defaultGrammarValidatorErrorProvider}),(0,lye.validateGrammar)(t.rules,t.maxLookahead,t.tokenTypes,t.errMsgProvider,t.grammarName)}bu.validateGrammar=uye});var vu=E(dn=>{"use strict";var Zh=dn&&dn.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(dn,"__esModule",{value:!0});dn.EarlyExitException=dn.NotAllInputParsedException=dn.NoViableAltException=dn.MismatchedTokenException=dn.isRecognitionException=void 0;var gye=Dt(),wj="MismatchedTokenException",Bj="NoViableAltException",Qj="EarlyExitException",bj="NotAllInputParsedException",vj=[wj,Bj,Qj,bj];Object.freeze(vj);function fye(t){return(0,gye.contains)(vj,t.name)}dn.isRecognitionException=fye;var vI=function(t){Zh(e,t);function e(r,i){var n=this.constructor,s=t.call(this,r)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),hye=function(t){Zh(e,t);function e(r,i,n){var s=t.call(this,r,i)||this;return s.previousToken=n,s.name=wj,s}return e}(vI);dn.MismatchedTokenException=hye;var pye=function(t){Zh(e,t);function e(r,i,n){var s=t.call(this,r,i)||this;return s.previousToken=n,s.name=Bj,s}return e}(vI);dn.NoViableAltException=pye;var dye=function(t){Zh(e,t);function e(r,i){var n=t.call(this,r,i)||this;return n.name=bj,n}return e}(vI);dn.NotAllInputParsedException=dye;var Cye=function(t){Zh(e,t);function e(r,i,n){var s=t.call(this,r,i)||this;return s.previousToken=n,s.name=Qj,s}return e}(vI);dn.EarlyExitException=Cye});var pS=E(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});xi.attemptInRepetitionRecovery=xi.Recoverable=xi.InRuleRecoveryException=xi.IN_RULE_RECOVERY_EXCEPTION=xi.EOF_FOLLOW_KEY=void 0;var SI=nA(),ts=Dt(),mye=vu(),Eye=rS(),Iye=Tn();xi.EOF_FOLLOW_KEY={};xi.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function hS(t){this.name=xi.IN_RULE_RECOVERY_EXCEPTION,this.message=t}xi.InRuleRecoveryException=hS;hS.prototype=Error.prototype;var yye=function(){function t(){}return t.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,ts.has)(e,"recoveryEnabled")?e.recoveryEnabled:Iye.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Sj)},t.prototype.getTokenToInsert=function(e){var r=(0,SI.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r},t.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},t.prototype.tryInRepetitionRecovery=function(e,r,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),d=new mye.MismatchedTokenException(p,u,s.LA(0));d.resyncedTokens=(0,ts.dropRight)(l),s.SAVE_ERROR(d)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},t.prototype.shouldInRepetitionRecoveryBeTried=function(e,r,i){return!(i===!1||e===void 0||r===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))},t.prototype.getFollowsForInRuleRecovery=function(e,r){var i=this.getCurrentGrammarPath(e,r),n=this.getNextPossibleTokenTypes(i);return n},t.prototype.tryInRuleRecovery=function(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new hS("sad sad panda")},t.prototype.canPerformInRuleRecovery=function(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)},t.prototype.canRecoverWithSingleTokenInsertion=function(e,r){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,ts.isEmpty)(r))return!1;var n=this.LA(1),s=(0,ts.find)(r,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},t.prototype.canRecoverWithSingleTokenDeletion=function(e){var r=this.tokenMatcher(this.LA(2),e);return r},t.prototype.isInCurrentRuleReSyncSet=function(e){var r=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(r);return(0,ts.contains)(i,e)},t.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),r=this.LA(1),i=2;;){var n=r.tokenType;if((0,ts.contains)(e,n))return n;r=this.LA(i),i++}},t.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return xi.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(i)}},t.prototype.buildFullFollowKeyStack=function(){var e=this,r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,ts.map)(r,function(n,s){return s===0?xi.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(r[s-1])}})},t.prototype.flattenFollowSet=function(){var e=this,r=(0,ts.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,ts.flatten)(r)},t.prototype.getFollowSetFromFollowKey=function(e){if(e===xi.EOF_FOLLOW_KEY)return[SI.EOF];var r=e.ruleName+e.idxInCallingRule+Eye.IN+e.inRule;return this.resyncFollows[r]},t.prototype.addToResyncTokens=function(e,r){return this.tokenMatcher(e,SI.EOF)||r.push(e),r},t.prototype.reSyncTo=function(e){for(var r=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,r);return(0,ts.dropRight)(r)},t.prototype.attemptInRepetitionRecovery=function(e,r,i,n,s,o,a){},t.prototype.getCurrentGrammarPath=function(e,r){var i=this.getHumanReadableRuleStack(),n=(0,ts.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:r};return s},t.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,ts.map)(this.RULE_STACK,function(r){return e.shortRuleNameToFullName(r)})},t}();xi.Recoverable=yye;function Sj(t,e,r,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=SI.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(t,e,r,f)}xi.attemptInRepetitionRecovery=Sj});var xI=E(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.getKeyForAutomaticLookahead=Nt.AT_LEAST_ONE_SEP_IDX=Nt.MANY_SEP_IDX=Nt.AT_LEAST_ONE_IDX=Nt.MANY_IDX=Nt.OPTION_IDX=Nt.OR_IDX=Nt.BITS_FOR_ALT_IDX=Nt.BITS_FOR_RULE_IDX=Nt.BITS_FOR_OCCURRENCE_IDX=Nt.BITS_FOR_METHOD_TYPE=void 0;Nt.BITS_FOR_METHOD_TYPE=4;Nt.BITS_FOR_OCCURRENCE_IDX=8;Nt.BITS_FOR_RULE_IDX=12;Nt.BITS_FOR_ALT_IDX=8;Nt.OR_IDX=1<{"use strict";Object.defineProperty(kI,"__esModule",{value:!0});kI.LooksAhead=void 0;var Aa=_h(),Ns=Dt(),xj=Tn(),la=xI(),Nl=Jh(),Bye=function(){function t(){}return t.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,Ns.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:xj.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,Ns.has)(e,"maxLookahead")?e.maxLookahead:xj.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,Ns.isES2015MapSupported)()?new Map:[],(0,Ns.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},t.prototype.preComputeLookaheadFunctions=function(e){var r=this;(0,Ns.forEach)(e,function(i){r.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Nl.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,Ns.forEach)(s,function(g){var f=g.idx===0?"":g.idx;r.TRACE_INIT(""+(0,Nl.getProductionDslName)(g)+f,function(){var h=(0,Aa.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||r.maxLookahead,g.hasPredicates,r.dynamicTokensEnabled,r.lookAheadBuilderForAlternatives),p=(0,la.getKeyForAutomaticLookahead)(r.fullRuleNameToShort[i.name],la.OR_IDX,g.idx);r.setLaFuncCache(p,h)})}),(0,Ns.forEach)(o,function(g){r.computeLookaheadFunc(i,g.idx,la.MANY_IDX,Aa.PROD_TYPE.REPETITION,g.maxLookahead,(0,Nl.getProductionDslName)(g))}),(0,Ns.forEach)(a,function(g){r.computeLookaheadFunc(i,g.idx,la.OPTION_IDX,Aa.PROD_TYPE.OPTION,g.maxLookahead,(0,Nl.getProductionDslName)(g))}),(0,Ns.forEach)(l,function(g){r.computeLookaheadFunc(i,g.idx,la.AT_LEAST_ONE_IDX,Aa.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Nl.getProductionDslName)(g))}),(0,Ns.forEach)(c,function(g){r.computeLookaheadFunc(i,g.idx,la.AT_LEAST_ONE_SEP_IDX,Aa.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Nl.getProductionDslName)(g))}),(0,Ns.forEach)(u,function(g){r.computeLookaheadFunc(i,g.idx,la.MANY_SEP_IDX,Aa.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Nl.getProductionDslName)(g))})})})},t.prototype.computeLookaheadFunc=function(e,r,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(r===0?"":r),function(){var l=(0,Aa.buildLookaheadFuncForOptionalProd)(r,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,la.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,r);a.setLaFuncCache(c,l)})},t.prototype.lookAheadBuilderForOptional=function(e,r,i){return(0,Aa.buildSingleAlternativeLookaheadFunction)(e,r,i)},t.prototype.lookAheadBuilderForAlternatives=function(e,r,i,n){return(0,Aa.buildAlternativesLookAheadFunc)(e,r,i,n)},t.prototype.getKeyForAutomaticLookahead=function(e,r){var i=this.getLastExplicitRuleShortName();return(0,la.getKeyForAutomaticLookahead)(i,e,r)},t.prototype.getLaFuncFromCache=function(e){},t.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},t.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},t.prototype.setLaFuncCache=function(e,r){},t.prototype.setLaFuncCacheUsingMap=function(e,r){this.lookAheadFuncsCache.set(e,r)},t.prototype.setLaFuncUsingObj=function(e,r){this.lookAheadFuncsCache[e]=r},t}();kI.LooksAhead=Bye});var Pj=E(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.addNoneTerminalToCst=go.addTerminalToCst=go.setNodeLocationFull=go.setNodeLocationOnlyOffset=void 0;function Qye(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{"use strict";Object.defineProperty(aA,"__esModule",{value:!0});aA.defineNameProp=aA.functionName=aA.classNameFromInstance=void 0;var xye=Dt();function kye(t){return Dj(t.constructor)}aA.classNameFromInstance=kye;var Rj="name";function Dj(t){var e=t.name;return e||"anonymous"}aA.functionName=Dj;function Pye(t,e){var r=Object.getOwnPropertyDescriptor(t,Rj);return(0,xye.isUndefined)(r)||r.configurable?(Object.defineProperty(t,Rj,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}aA.defineNameProp=Pye});var Mj=E(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.validateRedundantMethods=mi.validateMissingCstMethods=mi.validateVisitor=mi.CstVisitorDefinitionError=mi.createBaseVisitorConstructorWithDefaults=mi.createBaseSemanticVisitorConstructor=mi.defaultVisit=void 0;var rs=Dt(),$h=dS();function Fj(t,e){for(var r=(0,rs.keys)(t),i=r.length,n=0;n: - `+(""+s.join(` - -`).replace(/\n/g,` - `)))}}};return r.prototype=i,r.prototype.constructor=r,r._RULE_NAMES=e,r}mi.createBaseSemanticVisitorConstructor=Dye;function Rye(t,e,r){var i=function(){};(0,$h.defineNameProp)(i,t+"BaseSemanticsWithDefaults");var n=Object.create(r.prototype);return(0,rs.forEach)(e,function(s){n[s]=Fj}),i.prototype=n,i.prototype.constructor=i,i}mi.createBaseVisitorConstructorWithDefaults=Rye;var CS;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(CS=mi.CstVisitorDefinitionError||(mi.CstVisitorDefinitionError={}));function Nj(t,e){var r=Lj(t,e),i=Tj(t,e);return r.concat(i)}mi.validateVisitor=Nj;function Lj(t,e){var r=(0,rs.map)(e,function(i){if(!(0,rs.isFunction)(t[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,$h.functionName)(t.constructor)+" CST Visitor.",type:CS.MISSING_METHOD,methodName:i}});return(0,rs.compact)(r)}mi.validateMissingCstMethods=Lj;var Fye=["constructor","visit","validateVisitor"];function Tj(t,e){var r=[];for(var i in t)(0,rs.isFunction)(t[i])&&!(0,rs.contains)(Fye,i)&&!(0,rs.contains)(e,i)&&r.push({msg:"Redundant visitor method: <"+i+"> on "+(0,$h.functionName)(t.constructor)+` CST Visitor -There is no Grammar Rule corresponding to this method's name. -`,type:CS.REDUNDANT_METHOD,methodName:i});return r}mi.validateRedundantMethods=Tj});var Kj=E(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});PI.TreeBuilder=void 0;var Su=Pj(),Ur=Dt(),Oj=Mj(),Nye=Tn(),Lye=function(){function t(){}return t.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,Ur.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:Nye.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Ur.NOOP,this.cstFinallyStateUpdate=Ur.NOOP,this.cstPostTerminal=Ur.NOOP,this.cstPostNonTerminal=Ur.NOOP,this.cstPostRule=Ur.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Su.setNodeLocationFull,this.setNodeLocationFromNode=Su.setNodeLocationFull,this.cstPostRule=Ur.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Ur.NOOP,this.setNodeLocationFromNode=Ur.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Su.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=Su.setNodeLocationOnlyOffset,this.cstPostRule=Ur.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Ur.NOOP,this.setNodeLocationFromNode=Ur.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Ur.NOOP,this.setNodeLocationFromNode=Ur.NOOP,this.cstPostRule=Ur.NOOP,this.setInitialNodeLocation=Ur.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},t.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},t.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},t.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.setInitialNodeLocationFullRegular=function(e){var r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},t.prototype.cstInvocationStateUpdate=function(e,r){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},t.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},t.prototype.cstPostRuleFull=function(e){var r=this.LA(0),i=e.location;i.startOffset<=r.startOffset?(i.endOffset=r.endOffset,i.endLine=r.endLine,i.endColumn=r.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},t.prototype.cstPostRuleOnlyOffset=function(e){var r=this.LA(0),i=e.location;i.startOffset<=r.startOffset?i.endOffset=r.endOffset:i.startOffset=NaN},t.prototype.cstPostTerminal=function(e,r){var i=this.CST_STACK[this.CST_STACK.length-1];(0,Su.addTerminalToCst)(i,r,e),this.setNodeLocationFromToken(i.location,r)},t.prototype.cstPostNonTerminal=function(e,r){var i=this.CST_STACK[this.CST_STACK.length-1];(0,Su.addNoneTerminalToCst)(i,r,e),this.setNodeLocationFromNode(i.location,e.location)},t.prototype.getBaseCstVisitorConstructor=function(){if((0,Ur.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,Oj.createBaseSemanticVisitorConstructor)(this.className,(0,Ur.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},t.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,Ur.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,Oj.createBaseVisitorConstructorWithDefaults)(this.className,(0,Ur.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},t.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},t.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},t.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},t}();PI.TreeBuilder=Lye});var Hj=E(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});DI.LexerAdapter=void 0;var Uj=Tn(),Tye=function(){function t(){}return t.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(t.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),t.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Uj.END_OF_FILE},t.prototype.LA=function(e){var r=this.currIdx+e;return r<0||this.tokVectorLength<=r?Uj.END_OF_FILE:this.tokVector[r]},t.prototype.consumeToken=function(){this.currIdx++},t.prototype.exportLexerState=function(){return this.currIdx},t.prototype.importLexerState=function(e){this.currIdx=e},t.prototype.resetLexerState=function(){this.currIdx=-1},t.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},t.prototype.getLexerPosition=function(){return this.exportLexerState()},t}();DI.LexerAdapter=Tye});var jj=E(RI=>{"use strict";Object.defineProperty(RI,"__esModule",{value:!0});RI.RecognizerApi=void 0;var Gj=Dt(),Mye=vu(),mS=Tn(),Oye=Wh(),Kye=gS(),Uye=hn(),Hye=function(){function t(){}return t.prototype.ACTION=function(e){return e.call(this)},t.prototype.consume=function(e,r,i){return this.consumeInternal(r,e,i)},t.prototype.subrule=function(e,r,i){return this.subruleInternal(r,e,i)},t.prototype.option=function(e,r){return this.optionInternal(r,e)},t.prototype.or=function(e,r){return this.orInternal(r,e)},t.prototype.many=function(e,r){return this.manyInternal(e,r)},t.prototype.atLeastOne=function(e,r){return this.atLeastOneInternal(e,r)},t.prototype.CONSUME=function(e,r){return this.consumeInternal(e,0,r)},t.prototype.CONSUME1=function(e,r){return this.consumeInternal(e,1,r)},t.prototype.CONSUME2=function(e,r){return this.consumeInternal(e,2,r)},t.prototype.CONSUME3=function(e,r){return this.consumeInternal(e,3,r)},t.prototype.CONSUME4=function(e,r){return this.consumeInternal(e,4,r)},t.prototype.CONSUME5=function(e,r){return this.consumeInternal(e,5,r)},t.prototype.CONSUME6=function(e,r){return this.consumeInternal(e,6,r)},t.prototype.CONSUME7=function(e,r){return this.consumeInternal(e,7,r)},t.prototype.CONSUME8=function(e,r){return this.consumeInternal(e,8,r)},t.prototype.CONSUME9=function(e,r){return this.consumeInternal(e,9,r)},t.prototype.SUBRULE=function(e,r){return this.subruleInternal(e,0,r)},t.prototype.SUBRULE1=function(e,r){return this.subruleInternal(e,1,r)},t.prototype.SUBRULE2=function(e,r){return this.subruleInternal(e,2,r)},t.prototype.SUBRULE3=function(e,r){return this.subruleInternal(e,3,r)},t.prototype.SUBRULE4=function(e,r){return this.subruleInternal(e,4,r)},t.prototype.SUBRULE5=function(e,r){return this.subruleInternal(e,5,r)},t.prototype.SUBRULE6=function(e,r){return this.subruleInternal(e,6,r)},t.prototype.SUBRULE7=function(e,r){return this.subruleInternal(e,7,r)},t.prototype.SUBRULE8=function(e,r){return this.subruleInternal(e,8,r)},t.prototype.SUBRULE9=function(e,r){return this.subruleInternal(e,9,r)},t.prototype.OPTION=function(e){return this.optionInternal(e,0)},t.prototype.OPTION1=function(e){return this.optionInternal(e,1)},t.prototype.OPTION2=function(e){return this.optionInternal(e,2)},t.prototype.OPTION3=function(e){return this.optionInternal(e,3)},t.prototype.OPTION4=function(e){return this.optionInternal(e,4)},t.prototype.OPTION5=function(e){return this.optionInternal(e,5)},t.prototype.OPTION6=function(e){return this.optionInternal(e,6)},t.prototype.OPTION7=function(e){return this.optionInternal(e,7)},t.prototype.OPTION8=function(e){return this.optionInternal(e,8)},t.prototype.OPTION9=function(e){return this.optionInternal(e,9)},t.prototype.OR=function(e){return this.orInternal(e,0)},t.prototype.OR1=function(e){return this.orInternal(e,1)},t.prototype.OR2=function(e){return this.orInternal(e,2)},t.prototype.OR3=function(e){return this.orInternal(e,3)},t.prototype.OR4=function(e){return this.orInternal(e,4)},t.prototype.OR5=function(e){return this.orInternal(e,5)},t.prototype.OR6=function(e){return this.orInternal(e,6)},t.prototype.OR7=function(e){return this.orInternal(e,7)},t.prototype.OR8=function(e){return this.orInternal(e,8)},t.prototype.OR9=function(e){return this.orInternal(e,9)},t.prototype.MANY=function(e){this.manyInternal(0,e)},t.prototype.MANY1=function(e){this.manyInternal(1,e)},t.prototype.MANY2=function(e){this.manyInternal(2,e)},t.prototype.MANY3=function(e){this.manyInternal(3,e)},t.prototype.MANY4=function(e){this.manyInternal(4,e)},t.prototype.MANY5=function(e){this.manyInternal(5,e)},t.prototype.MANY6=function(e){this.manyInternal(6,e)},t.prototype.MANY7=function(e){this.manyInternal(7,e)},t.prototype.MANY8=function(e){this.manyInternal(8,e)},t.prototype.MANY9=function(e){this.manyInternal(9,e)},t.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},t.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},t.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},t.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},t.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},t.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},t.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},t.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},t.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},t.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},t.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},t.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},t.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},t.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},t.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},t.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},t.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},t.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},t.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},t.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},t.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},t.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},t.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},t.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},t.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},t.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},t.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},t.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},t.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},t.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},t.prototype.RULE=function(e,r,i){if(i===void 0&&(i=mS.DEFAULT_RULE_CONFIG),(0,Gj.contains)(this.definedRulesNames,e)){var n=Oye.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:mS.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,r,i);return this[e]=o,o},t.prototype.OVERRIDE_RULE=function(e,r,i){i===void 0&&(i=mS.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,Kye.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,r,i);return this[e]=s,s},t.prototype.BACKTRACK=function(e,r){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,r),!0}catch(n){if((0,Mye.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},t.prototype.getGAstProductions=function(){return this.gastProductionsCache},t.prototype.getSerializedGastProductions=function(){return(0,Uye.serializeGrammar)((0,Gj.values)(this.gastProductionsCache))},t}();RI.RecognizerApi=Hye});var Wj=E(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});FI.RecognizerEngine=void 0;var Er=Dt(),Mn=xI(),NI=vu(),Yj=_h(),xu=Vh(),qj=Tn(),Gye=pS(),Jj=nA(),ep=yu(),jye=dS(),Yye=function(){function t(){}return t.prototype.initRecognizerEngine=function(e,r){if(this.className=(0,jye.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ep.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,Er.has)(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if((0,Er.isArray)(e)){if((0,Er.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. - Note that the first argument for the parser constructor - is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 - For Further details.`)}if((0,Er.isArray)(e))this.tokensMap=(0,Er.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,Er.has)(e,"modes")&&(0,Er.every)((0,Er.flatten)((0,Er.values)(e.modes)),ep.isTokenType)){var i=(0,Er.flatten)((0,Er.values)(e.modes)),n=(0,Er.uniq)(i);this.tokensMap=(0,Er.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,Er.isObject)(e))this.tokensMap=(0,Er.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Jj.EOF;var s=(0,Er.every)((0,Er.values)(e),function(o){return(0,Er.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?ep.tokenStructuredMatcherNoCategories:ep.tokenStructuredMatcher,(0,ep.augmentTokenTypes)((0,Er.values)(this.tokensMap))},t.prototype.defineRule=function(e,r,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,Er.has)(i,"resyncEnabled")?i.resyncEnabled:qj.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,Er.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:qj.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<r},t.prototype.orInternal=function(e,r){var i=this.getKeyForAutomaticLookahead(Mn.OR_IDX,r),n=(0,Er.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(r,e.ERR_MSG)},t.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new NI.NotAllInputParsedException(r,e))}},t.prototype.subruleInternal=function(e,r,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,r,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},t.prototype.subruleInternalError=function(e,r,i){throw(0,NI.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:i),delete e.partialCstResult),e},t.prototype.consumeInternal=function(e,r,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,r,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},t.prototype.consumeInternalError=function(e,r,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new NI.MismatchedTokenException(n,r,s))},t.prototype.consumeInternalRecovery=function(e,r,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===Gye.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},t.prototype.saveRecogState=function(){var e=this.errors,r=(0,Er.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}},t.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},t.prototype.ruleInvocationStateUpdate=function(e,r,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r,e)},t.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},t.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},t.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},t.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Jj.EOF)},t.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},t}();FI.RecognizerEngine=Yye});var Vj=E(LI=>{"use strict";Object.defineProperty(LI,"__esModule",{value:!0});LI.ErrorHandler=void 0;var ES=vu(),IS=Dt(),zj=_h(),qye=Tn(),Jye=function(){function t(){}return t.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,IS.has)(e,"errorMessageProvider")?e.errorMessageProvider:qye.DEFAULT_PARSER_CONFIG.errorMessageProvider},t.prototype.SAVE_ERROR=function(e){if((0,ES.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,IS.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(t.prototype,"errors",{get:function(){return(0,IS.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),t.prototype.raiseEarlyExitException=function(e,r,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,zj.getLookaheadPathsForOptionalProd)(e,s,r,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new ES.EarlyExitException(u,this.LA(1),this.LA(0)))},t.prototype.raiseNoAltException=function(e,r){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,zj.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ES.NoViableAltException(c,this.LA(1),l))},t}();LI.ErrorHandler=Jye});var Zj=E(TI=>{"use strict";Object.defineProperty(TI,"__esModule",{value:!0});TI.ContentAssist=void 0;var _j=Vh(),Xj=Dt(),Wye=function(){function t(){}return t.prototype.initContentAssist=function(){},t.prototype.computeContentAssist=function(e,r){var i=this.gastProductionsCache[e];if((0,Xj.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,_j.nextPossibleTokensAfter)([i],r,this.tokenMatcher,this.maxLookahead)},t.prototype.getNextPossibleTokenTypes=function(e){var r=(0,Xj.first)(e.ruleStack),i=this.getGAstProductions(),n=i[r],s=new _j.NextAfterTokenWalker(n,e).startWalking();return s},t}();TI.ContentAssist=Wye});var oY=E(MI=>{"use strict";Object.defineProperty(MI,"__esModule",{value:!0});MI.GastRecorder=void 0;var Cn=Dt(),fo=hn(),zye=Gh(),$j=yu(),eY=nA(),Vye=Tn(),_ye=xI(),OI={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(OI);var tY=!0,rY=Math.pow(2,_ye.BITS_FOR_OCCURRENCE_IDX)-1,iY=(0,eY.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:zye.Lexer.NA});(0,$j.augmentTokenTypes)([iY]);var nY=(0,eY.createTokenInstance)(iY,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(nY);var Xye={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},$ye=function(){function t(){}return t.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},t.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var r=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)r(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},t.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var r=0;r<10;r++){var i=r>0?r:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},t.prototype.ACTION_RECORD=function(e){},t.prototype.BACKTRACK_RECORD=function(e,r){return function(){return!0}},t.prototype.LA_RECORD=function(e){return Vye.END_OF_FILE},t.prototype.topLevelRuleRecord=function(e,r){try{var i=new fo.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),r.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` - This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch(s){throw n}throw n}},t.prototype.optionInternalRecord=function(e,r){return tp.call(this,fo.Option,e,r)},t.prototype.atLeastOneInternalRecord=function(e,r){tp.call(this,fo.RepetitionMandatory,r,e)},t.prototype.atLeastOneSepFirstInternalRecord=function(e,r){tp.call(this,fo.RepetitionMandatoryWithSeparator,r,e,tY)},t.prototype.manyInternalRecord=function(e,r){tp.call(this,fo.Repetition,r,e)},t.prototype.manySepFirstInternalRecord=function(e,r){tp.call(this,fo.RepetitionWithSeparator,r,e,tY)},t.prototype.orInternalRecord=function(e,r){return Zye.call(this,e,r)},t.prototype.subruleInternalRecord=function(e,r,i){if(KI(r),!e||(0,Cn.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,Cn.peek)(this.recordingProdStack),o=e.ruleName,a=new fo.NonTerminal({idx:r,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?Xye:OI},t.prototype.consumeInternalRecord=function(e,r,i){if(KI(r),!(0,$j.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,Cn.peek)(this.recordingProdStack),o=new fo.Terminal({idx:r,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),nY},t}();MI.GastRecorder=$ye;function tp(t,e,r,i){i===void 0&&(i=!1),KI(r);var n=(0,Cn.peek)(this.recordingProdStack),s=(0,Cn.isFunction)(e)?e:e.DEF,o=new t({definition:[],idx:r});return i&&(o.separator=e.SEP),(0,Cn.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),OI}function Zye(t,e){var r=this;KI(e);var i=(0,Cn.peek)(this.recordingProdStack),n=(0,Cn.isArray)(t)===!1,s=n===!1?t:t.DEF,o=new fo.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});(0,Cn.has)(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD);var a=(0,Cn.some)(s,function(l){return(0,Cn.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,Cn.forEach)(s,function(l){var c=new fo.Alternative({definition:[]});o.definition.push(c),(0,Cn.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,Cn.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),r.recordingProdStack.push(c),l.ALT.call(r),r.recordingProdStack.pop()}),OI}function sY(t){return t===0?"":""+t}function KI(t){if(t<0||t>rY){var e=new Error("Invalid DSL Method idx value: <"+t+`> - `+("Idx value must be a none negative value smaller than "+(rY+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var AY=E(UI=>{"use strict";Object.defineProperty(UI,"__esModule",{value:!0});UI.PerformanceTracer=void 0;var aY=Dt(),ewe=Tn(),twe=function(){function t(){}return t.prototype.initPerformanceTracer=function(e){if((0,aY.has)(e,"traceInitPerf")){var r=e.traceInitPerf,i=typeof r=="number";this.traceInitMaxIdent=i?r:Infinity,this.traceInitPerf=i?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=ewe.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},t.prototype.TRACE_INIT=function(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,aY.timer)(r),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return r()},t}();UI.PerformanceTracer=twe});var lY=E(HI=>{"use strict";Object.defineProperty(HI,"__esModule",{value:!0});HI.applyMixins=void 0;function rwe(t,e){e.forEach(function(r){var i=r.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(t.prototype,n,s):t.prototype[n]=r.prototype[n]}})})}HI.applyMixins=rwe});var Tn=E(or=>{"use strict";var cY=or&&or.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function i(){this.constructor=e}e.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();Object.defineProperty(or,"__esModule",{value:!0});or.EmbeddedActionsParser=or.CstParser=or.Parser=or.EMPTY_ALT=or.ParserDefinitionErrorType=or.DEFAULT_RULE_CONFIG=or.DEFAULT_PARSER_CONFIG=or.END_OF_FILE=void 0;var Wi=Dt(),iwe=VG(),uY=nA(),gY=Wh(),fY=yj(),nwe=pS(),swe=kj(),owe=Kj(),awe=Hj(),Awe=jj(),lwe=Wj(),cwe=Vj(),uwe=Zj(),gwe=oY(),fwe=AY(),hwe=lY();or.END_OF_FILE=(0,uY.createTokenInstance)(uY.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(or.END_OF_FILE);or.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:gY.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});or.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var pwe;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(pwe=or.ParserDefinitionErrorType||(or.ParserDefinitionErrorType={}));function dwe(t){return t===void 0&&(t=void 0),function(){return t}}or.EMPTY_ALT=dwe;var GI=function(){function t(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(r),i.initLexerAdapter(),i.initLooksAhead(r),i.initRecognizerEngine(e,r),i.initRecoverable(r),i.initTreeBuilder(r),i.initContentAssist(),i.initGastRecorder(r),i.initPerformanceTracer(r),(0,Wi.has)(r,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. - Please use the flag on the relevant DSL method instead. - See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=(0,Wi.has)(r,"skipValidations")?r.skipValidations:or.DEFAULT_PARSER_CONFIG.skipValidations}return t.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var r;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,Wi.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,Wi.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,fY.resolveGrammar)({rules:(0,Wi.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,Wi.isEmpty)(n)&&e.skipValidations===!1){var s=(0,fY.validateGrammar)({rules:(0,Wi.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,Wi.values)(e.tokensMap),errMsgProvider:gY.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,Wi.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,iwe.computeAllProdsFollows)((0,Wi.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,Wi.values)(e.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,Wi.isEmpty)(e.definitionErrors))throw r=(0,Wi.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: - `+r.join(` -------------------------------- -`))})},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();or.Parser=GI;(0,hwe.applyMixins)(GI,[nwe.Recoverable,swe.LooksAhead,owe.TreeBuilder,awe.LexerAdapter,lwe.RecognizerEngine,Awe.RecognizerApi,cwe.ErrorHandler,uwe.ContentAssist,gwe.GastRecorder,fwe.PerformanceTracer]);var Cwe=function(t){cY(e,t);function e(r,i){i===void 0&&(i=or.DEFAULT_PARSER_CONFIG);var n=this,s=(0,Wi.cloneObj)(i);return s.outputCst=!0,n=t.call(this,r,s)||this,n}return e}(GI);or.CstParser=Cwe;var mwe=function(t){cY(e,t);function e(r,i){i===void 0&&(i=or.DEFAULT_PARSER_CONFIG);var n=this,s=(0,Wi.cloneObj)(i);return s.outputCst=!1,n=t.call(this,r,s)||this,n}return e}(GI);or.EmbeddedActionsParser=mwe});var pY=E(jI=>{"use strict";Object.defineProperty(jI,"__esModule",{value:!0});jI.createSyntaxDiagramsCode=void 0;var hY=Uv();function Ewe(t,e){var r=e===void 0?{}:e,i=r.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+hY.VERSION+"/diagrams/":i,s=r.css,o=s===void 0?"https://unpkg.com/chevrotain@"+hY.VERSION+"/diagrams/diagrams.css":s,a=` - - - - - -`,l=` - -`,c=` - - - - -`,u=` -
-`,g=` - -`,f=` - -`;return a+l+c+u+g+f}jI.createSyntaxDiagramsCode=Ewe});var mY=E(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.Parser=He.createSyntaxDiagramsCode=He.clearCache=He.GAstVisitor=He.serializeProduction=He.serializeGrammar=He.Terminal=He.Rule=He.RepetitionWithSeparator=He.RepetitionMandatoryWithSeparator=He.RepetitionMandatory=He.Repetition=He.Option=He.NonTerminal=He.Alternative=He.Alternation=He.defaultLexerErrorProvider=He.NoViableAltException=He.NotAllInputParsedException=He.MismatchedTokenException=He.isRecognitionException=He.EarlyExitException=He.defaultParserErrorProvider=He.tokenName=He.tokenMatcher=He.tokenLabel=He.EOF=He.createTokenInstance=He.createToken=He.LexerDefinitionErrorType=He.Lexer=He.EMPTY_ALT=He.ParserDefinitionErrorType=He.EmbeddedActionsParser=He.CstParser=He.VERSION=void 0;var Iwe=Uv();Object.defineProperty(He,"VERSION",{enumerable:!0,get:function(){return Iwe.VERSION}});var YI=Tn();Object.defineProperty(He,"CstParser",{enumerable:!0,get:function(){return YI.CstParser}});Object.defineProperty(He,"EmbeddedActionsParser",{enumerable:!0,get:function(){return YI.EmbeddedActionsParser}});Object.defineProperty(He,"ParserDefinitionErrorType",{enumerable:!0,get:function(){return YI.ParserDefinitionErrorType}});Object.defineProperty(He,"EMPTY_ALT",{enumerable:!0,get:function(){return YI.EMPTY_ALT}});var dY=Gh();Object.defineProperty(He,"Lexer",{enumerable:!0,get:function(){return dY.Lexer}});Object.defineProperty(He,"LexerDefinitionErrorType",{enumerable:!0,get:function(){return dY.LexerDefinitionErrorType}});var ku=nA();Object.defineProperty(He,"createToken",{enumerable:!0,get:function(){return ku.createToken}});Object.defineProperty(He,"createTokenInstance",{enumerable:!0,get:function(){return ku.createTokenInstance}});Object.defineProperty(He,"EOF",{enumerable:!0,get:function(){return ku.EOF}});Object.defineProperty(He,"tokenLabel",{enumerable:!0,get:function(){return ku.tokenLabel}});Object.defineProperty(He,"tokenMatcher",{enumerable:!0,get:function(){return ku.tokenMatcher}});Object.defineProperty(He,"tokenName",{enumerable:!0,get:function(){return ku.tokenName}});var ywe=Wh();Object.defineProperty(He,"defaultParserErrorProvider",{enumerable:!0,get:function(){return ywe.defaultParserErrorProvider}});var rp=vu();Object.defineProperty(He,"EarlyExitException",{enumerable:!0,get:function(){return rp.EarlyExitException}});Object.defineProperty(He,"isRecognitionException",{enumerable:!0,get:function(){return rp.isRecognitionException}});Object.defineProperty(He,"MismatchedTokenException",{enumerable:!0,get:function(){return rp.MismatchedTokenException}});Object.defineProperty(He,"NotAllInputParsedException",{enumerable:!0,get:function(){return rp.NotAllInputParsedException}});Object.defineProperty(He,"NoViableAltException",{enumerable:!0,get:function(){return rp.NoViableAltException}});var wwe=_v();Object.defineProperty(He,"defaultLexerErrorProvider",{enumerable:!0,get:function(){return wwe.defaultLexerErrorProvider}});var ho=hn();Object.defineProperty(He,"Alternation",{enumerable:!0,get:function(){return ho.Alternation}});Object.defineProperty(He,"Alternative",{enumerable:!0,get:function(){return ho.Alternative}});Object.defineProperty(He,"NonTerminal",{enumerable:!0,get:function(){return ho.NonTerminal}});Object.defineProperty(He,"Option",{enumerable:!0,get:function(){return ho.Option}});Object.defineProperty(He,"Repetition",{enumerable:!0,get:function(){return ho.Repetition}});Object.defineProperty(He,"RepetitionMandatory",{enumerable:!0,get:function(){return ho.RepetitionMandatory}});Object.defineProperty(He,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return ho.RepetitionMandatoryWithSeparator}});Object.defineProperty(He,"RepetitionWithSeparator",{enumerable:!0,get:function(){return ho.RepetitionWithSeparator}});Object.defineProperty(He,"Rule",{enumerable:!0,get:function(){return ho.Rule}});Object.defineProperty(He,"Terminal",{enumerable:!0,get:function(){return ho.Terminal}});var CY=hn();Object.defineProperty(He,"serializeGrammar",{enumerable:!0,get:function(){return CY.serializeGrammar}});Object.defineProperty(He,"serializeProduction",{enumerable:!0,get:function(){return CY.serializeProduction}});var Bwe=wu();Object.defineProperty(He,"GAstVisitor",{enumerable:!0,get:function(){return Bwe.GAstVisitor}});function Qwe(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API. - It performs no action other than printing this message. - Please avoid using it as it will be completely removed in the future`)}He.clearCache=Qwe;var bwe=pY();Object.defineProperty(He,"createSyntaxDiagramsCode",{enumerable:!0,get:function(){return bwe.createSyntaxDiagramsCode}});var vwe=function(){function t(){throw new Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead. -See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return t}();He.Parser=vwe});var yY=E((Trt,EY)=>{var qI=mY(),ca=qI.createToken,IY=qI.tokenMatcher,yS=qI.Lexer,Swe=qI.EmbeddedActionsParser;EY.exports=t=>{let e=ca({name:"LogicalOperator",pattern:yS.NA}),r=ca({name:"Or",pattern:/\|/,categories:e}),i=ca({name:"Xor",pattern:/\^/,categories:e}),n=ca({name:"And",pattern:/&/,categories:e}),s=ca({name:"Not",pattern:/!/}),o=ca({name:"LParen",pattern:/\(/}),a=ca({name:"RParen",pattern:/\)/}),l=ca({name:"Query",pattern:t}),u=[ca({name:"WhiteSpace",pattern:/\s+/,group:yS.SKIPPED}),r,i,n,o,a,s,e,l],g=new yS(u);class f extends Swe{constructor(p){super(u);this.RULE("expression",()=>this.SUBRULE(this.logicalExpression)),this.RULE("logicalExpression",()=>{let m=this.SUBRULE(this.atomicExpression);return this.MANY(()=>{let I=m,B=this.CONSUME(e),b=this.SUBRULE2(this.atomicExpression);IY(B,r)?m=R=>I(R)||b(R):IY(B,i)?m=R=>!!(I(R)^b(R)):m=R=>I(R)&&b(R)}),m}),this.RULE("atomicExpression",()=>this.OR([{ALT:()=>this.SUBRULE(this.parenthesisExpression)},{ALT:()=>{let{image:d}=this.CONSUME(l);return m=>m(d)}},{ALT:()=>{this.CONSUME(s);let d=this.SUBRULE(this.atomicExpression);return m=>!d(m)}}])),this.RULE("parenthesisExpression",()=>{let d;return this.CONSUME(o),d=this.SUBRULE(this.expression),this.CONSUME(a),d}),this.performSelfAnalysis()}}return{TinylogicLexer:g,TinylogicParser:f}}});var wY=E(JI=>{var xwe=yY();JI.makeParser=(t=/[a-z]+/)=>{let{TinylogicLexer:e,TinylogicParser:r}=xwe(t),i=new r;return(n,s)=>{let o=e.tokenize(n);return i.input=o.tokens,i.expression()(s)}};JI.parse=JI.makeParser()});var QY=E((Ort,BY)=>{"use strict";BY.exports=(...t)=>[...new Set([].concat(...t))]});var wS=E((Krt,bY)=>{"use strict";var kwe=require("stream"),vY=kwe.PassThrough,Pwe=Array.prototype.slice;bY.exports=Dwe;function Dwe(){let t=[],e=!1,r=Pwe.call(arguments),i=r[r.length-1];i&&!Array.isArray(i)&&i.pipe==null?r.pop():i={};let n=i.end!==!1;i.objectMode==null&&(i.objectMode=!0),i.highWaterMark==null&&(i.highWaterMark=64*1024);let s=vY(i);function o(){for(let c=0,u=arguments.length;c0||(e=!1,a())}function f(h){function p(){h.removeListener("merge2UnpipeEnd",p),h.removeListener("end",p),g()}if(h._readableState.endEmitted)return g();h.on("merge2UnpipeEnd",p),h.on("end",p),h.pipe(s,{end:!1}),h.resume()}for(let h=0;h{"use strict";Object.defineProperty(WI,"__esModule",{value:!0});function Rwe(t){return t.reduce((e,r)=>[].concat(e,r),[])}WI.flatten=Rwe;function Fwe(t,e){let r=[[]],i=0;for(let n of t)e(n)?(i++,r[i]=[]):r[i].push(n);return r}WI.splitWhen=Fwe});var kY=E(BS=>{"use strict";Object.defineProperty(BS,"__esModule",{value:!0});function Nwe(t){return t.code==="ENOENT"}BS.isEnoentCodeError=Nwe});var DY=E(QS=>{"use strict";Object.defineProperty(QS,"__esModule",{value:!0});var PY=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 Lwe(t,e){return new PY(t,e)}QS.createDirentFromStats=Lwe});var RY=E(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});var Twe=require("path"),Mwe=2,Owe=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function Kwe(t){return t.replace(/\\/g,"/")}Pu.unixify=Kwe;function Uwe(t,e){return Twe.resolve(t,e)}Pu.makeAbsolute=Uwe;function Hwe(t){return t.replace(Owe,"\\$2")}Pu.escape=Hwe;function Gwe(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(Mwe)}return t}Pu.removeLeadingDotSegment=Gwe});var NY=E((Yrt,FY)=>{FY.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 TY=E((qrt,LY)=>{var jwe=NY(),Ywe={"{":"}","(":")","[":"]"},qwe=/\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/,Jwe=/\\(.)|(^!|[*?{}()[\]]|\(\?)/;LY.exports=function(e,r){if(typeof e!="string"||e==="")return!1;if(jwe(e))return!0;var i=qwe,n;for(r&&r.strict===!1&&(i=Jwe);n=i.exec(e);){if(n[2])return!0;var s=n.index+n[0].length,o=n[1],a=o?Ywe[o]:null;if(o&&a){var l=e.indexOf(a,s);l!==-1&&(s=l+1)}e=e.slice(s)}return!1}});var OY=E((Jrt,MY)=>{"use strict";var Wwe=TY(),zwe=require("path").posix.dirname,Vwe=require("os").platform()==="win32",bS="/",_we=/\\/g,Xwe=/[\{\[].*[\}\]]$/,Zwe=/(^|[^\\])([\{\[]|\([^\)]+$)/,$we=/\\([\!\*\?\|\[\]\(\)\{\}])/g;MY.exports=function(e,r){var i=Object.assign({flipBackslashes:!0},r);i.flipBackslashes&&Vwe&&e.indexOf(bS)<0&&(e=e.replace(_we,bS)),Xwe.test(e)&&(e+=bS),e+="a";do e=zwe(e);while(Wwe(e)||Zwe.test(e));return e.replace($we,"$1")}});var WY=E(Hr=>{"use strict";Object.defineProperty(Hr,"__esModule",{value:!0});var eBe=require("path"),tBe=OY(),KY=Nn(),rBe=iv(),UY="**",iBe="\\",nBe=/[*?]|^!/,sBe=/\[.*]/,oBe=/(?:^|[^!*+?@])\(.*\|.*\)/,aBe=/[!*+?@]\(.*\)/,ABe=/{.*(?:,|\.\.).*}/;function GY(t,e={}){return!HY(t,e)}Hr.isStaticPattern=GY;function HY(t,e={}){return!!(e.caseSensitiveMatch===!1||t.includes(iBe)||nBe.test(t)||sBe.test(t)||oBe.test(t)||e.extglob!==!1&&aBe.test(t)||e.braceExpansion!==!1&&ABe.test(t))}Hr.isDynamicPattern=HY;function lBe(t){return zI(t)?t.slice(1):t}Hr.convertToPositivePattern=lBe;function cBe(t){return"!"+t}Hr.convertToNegativePattern=cBe;function zI(t){return t.startsWith("!")&&t[1]!=="("}Hr.isNegativePattern=zI;function jY(t){return!zI(t)}Hr.isPositivePattern=jY;function uBe(t){return t.filter(zI)}Hr.getNegativePatterns=uBe;function gBe(t){return t.filter(jY)}Hr.getPositivePatterns=gBe;function fBe(t){return tBe(t,{flipBackslashes:!1})}Hr.getBaseDirectory=fBe;function hBe(t){return t.includes(UY)}Hr.hasGlobStar=hBe;function YY(t){return t.endsWith("/"+UY)}Hr.endsWithSlashGlobStar=YY;function pBe(t){let e=eBe.basename(t);return YY(t)||GY(e)}Hr.isAffectDepthOfReadingPattern=pBe;function dBe(t){return t.reduce((e,r)=>e.concat(qY(r)),[])}Hr.expandPatternsWithBraceExpansion=dBe;function qY(t){return KY.braces(t,{expand:!0,nodupes:!0})}Hr.expandBraceExpansion=qY;function CBe(t,e){let r=rBe.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.parts.length===0?[t]:r.parts}Hr.getPatternParts=CBe;function JY(t,e){return KY.makeRe(t,e)}Hr.makeRe=JY;function mBe(t,e){return t.map(r=>JY(r,e))}Hr.convertPatternsToRe=mBe;function EBe(t,e){return e.some(r=>r.test(t))}Hr.matchAny=EBe});var VY=E(vS=>{"use strict";Object.defineProperty(vS,"__esModule",{value:!0});var IBe=wS();function yBe(t){let e=IBe(t);return t.forEach(r=>{r.once("error",i=>e.emit("error",i))}),e.once("close",()=>zY(t)),e.once("end",()=>zY(t)),e}vS.merge=yBe;function zY(t){t.forEach(e=>e.emit("close"))}});var _Y=E(VI=>{"use strict";Object.defineProperty(VI,"__esModule",{value:!0});function wBe(t){return typeof t=="string"}VI.isString=wBe;function BBe(t){return t===""}VI.isEmpty=BBe});var ga=E(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});var QBe=xY();ua.array=QBe;var bBe=kY();ua.errno=bBe;var vBe=DY();ua.fs=vBe;var SBe=RY();ua.path=SBe;var xBe=WY();ua.pattern=xBe;var kBe=VY();ua.stream=kBe;var PBe=_Y();ua.string=PBe});var tq=E(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});var Ll=ga();function DBe(t,e){let r=XY(t),i=ZY(t,e.ignore),n=r.filter(l=>Ll.pattern.isStaticPattern(l,e)),s=r.filter(l=>Ll.pattern.isDynamicPattern(l,e)),o=SS(n,i,!1),a=SS(s,i,!0);return o.concat(a)}fa.generate=DBe;function SS(t,e,r){let i=$Y(t);return"."in i?[xS(".",t,e,r)]:eq(i,e,r)}fa.convertPatternsToTasks=SS;function XY(t){return Ll.pattern.getPositivePatterns(t)}fa.getPositivePatterns=XY;function ZY(t,e){return Ll.pattern.getNegativePatterns(t).concat(e).map(Ll.pattern.convertToPositivePattern)}fa.getNegativePatternsAsPositive=ZY;function $Y(t){let e={};return t.reduce((r,i)=>{let n=Ll.pattern.getBaseDirectory(i);return n in r?r[n].push(i):r[n]=[i],r},e)}fa.groupPatternsByBaseDirectory=$Y;function eq(t,e,r){return Object.keys(t).map(i=>xS(i,t[i],e,r))}fa.convertPatternGroupsToTasks=eq;function xS(t,e,r,i){return{dynamic:i,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Ll.pattern.convertToNegativePattern))}}fa.convertPatternGroupToTask=xS});var iq=E(_I=>{"use strict";Object.defineProperty(_I,"__esModule",{value:!0});_I.read=void 0;function RBe(t,e,r){e.fs.lstat(t,(i,n)=>{if(i!==null){rq(r,i);return}if(!n.isSymbolicLink()||!e.followSymbolicLink){kS(r,n);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){rq(r,s);return}kS(r,n);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),kS(r,o)})})}_I.read=RBe;function rq(t,e){t(e)}function kS(t,e){t(null,e)}});var nq=E(XI=>{"use strict";Object.defineProperty(XI,"__esModule",{value:!0});XI.read=void 0;function FBe(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let i=e.fs.statSync(t);return e.markSymbolicLink&&(i.isSymbolicLink=()=>!0),i}catch(i){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw i}}XI.read=FBe});var sq=E(AA=>{"use strict";Object.defineProperty(AA,"__esModule",{value:!0});AA.createFileSystemAdapter=AA.FILE_SYSTEM_ADAPTER=void 0;var ZI=require("fs");AA.FILE_SYSTEM_ADAPTER={lstat:ZI.lstat,stat:ZI.stat,lstatSync:ZI.lstatSync,statSync:ZI.statSync};function NBe(t){return t===void 0?AA.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},AA.FILE_SYSTEM_ADAPTER),t)}AA.createFileSystemAdapter=NBe});var aq=E(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});var LBe=sq(),oq=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=LBe.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!=null?e:r}};PS.default=oq});var Tl=E(lA=>{"use strict";Object.defineProperty(lA,"__esModule",{value:!0});lA.statSync=lA.stat=lA.Settings=void 0;var Aq=iq(),TBe=nq(),DS=aq();lA.Settings=DS.default;function MBe(t,e,r){if(typeof e=="function"){Aq.read(t,RS(),e);return}Aq.read(t,RS(e),r)}lA.stat=MBe;function OBe(t,e){let r=RS(e);return TBe.read(t,r)}lA.statSync=OBe;function RS(t={}){return t instanceof DS.default?t:new DS.default(t)}});var cq=E((iit,lq)=>{lq.exports=KBe;function KBe(t,e){var r,i,n,s=!0;Array.isArray(t)?(r=[],i=t.length):(n=Object.keys(t),r={},i=n.length);function o(l){function c(){e&&e(l,r),e=null}s?process.nextTick(c):c()}function a(l,c,u){r[l]=u,(--i==0||c)&&o(c)}i?n?n.forEach(function(l){t[l](function(c,u){a(l,c,u)})}):t.forEach(function(l,c){l(function(u,g){a(c,u,g)})}):o(null),s=!1}});var FS=E($I=>{"use strict";Object.defineProperty($I,"__esModule",{value:!0});$I.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var ey=process.versions.node.split(".");if(ey[0]===void 0||ey[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var uq=Number.parseInt(ey[0],10),UBe=Number.parseInt(ey[1],10),gq=10,HBe=10,GBe=uq>gq,jBe=uq===gq&&UBe>=HBe;$I.IS_SUPPORT_READDIR_WITH_FILE_TYPES=GBe||jBe});var hq=E(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.createDirentFromStats=void 0;var fq=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 YBe(t,e){return new fq(t,e)}ty.createDirentFromStats=YBe});var NS=E(ry=>{"use strict";Object.defineProperty(ry,"__esModule",{value:!0});ry.fs=void 0;var qBe=hq();ry.fs=qBe});var LS=E(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.joinPathSegments=void 0;function JBe(t,e,r){return t.endsWith(r)?t+e:t+r+e}iy.joinPathSegments=JBe});var Iq=E(cA=>{"use strict";Object.defineProperty(cA,"__esModule",{value:!0});cA.readdir=cA.readdirWithFileTypes=cA.read=void 0;var WBe=Tl(),pq=cq(),zBe=FS(),dq=NS(),Cq=LS();function VBe(t,e,r){if(!e.stats&&zBe.IS_SUPPORT_READDIR_WITH_FILE_TYPES){mq(t,e,r);return}Eq(t,e,r)}cA.read=VBe;function mq(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(i,n)=>{if(i!==null){ny(r,i);return}let s=n.map(a=>({dirent:a,name:a.name,path:Cq.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){TS(r,s);return}let o=s.map(a=>_Be(a,e));pq(o,(a,l)=>{if(a!==null){ny(r,a);return}TS(r,l)})})}cA.readdirWithFileTypes=mq;function _Be(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(i,n)=>{if(i!==null){if(e.throwErrorOnBrokenSymbolicLink){r(i);return}r(null,t);return}t.dirent=dq.fs.createDirentFromStats(t.name,n),r(null,t)})}}function Eq(t,e,r){e.fs.readdir(t,(i,n)=>{if(i!==null){ny(r,i);return}let s=n.map(o=>{let a=Cq.joinPathSegments(t,o,e.pathSegmentSeparator);return l=>{WBe.stat(a,e.fsStatSettings,(c,u)=>{if(c!==null){l(c);return}let g={name:o,path:a,dirent:dq.fs.createDirentFromStats(o,u)};e.stats&&(g.stats=u),l(null,g)})}});pq(s,(o,a)=>{if(o!==null){ny(r,o);return}TS(r,a)})})}cA.readdir=Eq;function ny(t,e){t(e)}function TS(t,e){t(null,e)}});var bq=E(uA=>{"use strict";Object.defineProperty(uA,"__esModule",{value:!0});uA.readdir=uA.readdirWithFileTypes=uA.read=void 0;var XBe=Tl(),ZBe=FS(),yq=NS(),wq=LS();function $Be(t,e){return!e.stats&&ZBe.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Bq(t,e):Qq(t,e)}uA.read=$Be;function Bq(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(i=>{let n={dirent:i,name:i.name,path:wq.joinPathSegments(t,i.name,e.pathSegmentSeparator)};if(n.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(n.path);n.dirent=yq.fs.createDirentFromStats(n.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return n})}uA.readdirWithFileTypes=Bq;function Qq(t,e){return e.fs.readdirSync(t).map(i=>{let n=wq.joinPathSegments(t,i,e.pathSegmentSeparator),s=XBe.statSync(n,e.fsStatSettings),o={name:i,path:n,dirent:yq.fs.createDirentFromStats(i,s)};return e.stats&&(o.stats=s),o})}uA.readdir=Qq});var vq=E(gA=>{"use strict";Object.defineProperty(gA,"__esModule",{value:!0});gA.createFileSystemAdapter=gA.FILE_SYSTEM_ADAPTER=void 0;var Du=require("fs");gA.FILE_SYSTEM_ADAPTER={lstat:Du.lstat,stat:Du.stat,lstatSync:Du.lstatSync,statSync:Du.statSync,readdir:Du.readdir,readdirSync:Du.readdirSync};function e0e(t){return t===void 0?gA.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},gA.FILE_SYSTEM_ADAPTER),t)}gA.createFileSystemAdapter=e0e});var xq=E(MS=>{"use strict";Object.defineProperty(MS,"__esModule",{value:!0});var t0e=require("path"),r0e=Tl(),i0e=vq(),Sq=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=i0e.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t0e.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new r0e.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e!=null?e:r}};MS.default=Sq});var sy=E(fA=>{"use strict";Object.defineProperty(fA,"__esModule",{value:!0});fA.Settings=fA.scandirSync=fA.scandir=void 0;var kq=Iq(),n0e=bq(),OS=xq();fA.Settings=OS.default;function s0e(t,e,r){if(typeof e=="function"){kq.read(t,KS(),e);return}kq.read(t,KS(e),r)}fA.scandir=s0e;function o0e(t,e){let r=KS(e);return n0e.read(t,r)}fA.scandirSync=o0e;function KS(t={}){return t instanceof OS.default?t:new OS.default(t)}});var Dq=E((fit,Pq)=>{"use strict";function a0e(t){var e=new t,r=e;function i(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function n(s){r.next=s,r=s}return{get:i,release:n}}Pq.exports=a0e});var Fq=E((hit,US)=>{"use strict";var A0e=Dq();function Rq(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var i=A0e(l0e),n=null,s=null,o=0,a=null,l={push:d,drain:po,saturated:po,pause:u,paused:!1,concurrency:r,running:c,resume:h,idle:p,length:g,getQueue:f,unshift:m,empty:po,kill:B,killAndDrain:b,error:R};return l;function c(){return o}function u(){l.paused=!0}function g(){for(var H=n,L=0;H;)H=H.next,L++;return L}function f(){for(var H=n,L=[];H;)L.push(H.value),H=H.next;return L}function h(){if(!!l.paused){l.paused=!1;for(var H=0;H{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.joinPathSegments=Co.replacePathSegmentSeparator=Co.isAppliedFilter=Co.isFatalError=void 0;function u0e(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Co.isFatalError=u0e;function g0e(t,e){return t===null||t(e)}Co.isAppliedFilter=g0e;function f0e(t,e){return t.split(/[/\\]/).join(e)}Co.replacePathSegmentSeparator=f0e;function h0e(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}Co.joinPathSegments=h0e});var GS=E(HS=>{"use strict";Object.defineProperty(HS,"__esModule",{value:!0});var p0e=oy(),Nq=class{constructor(e,r){this._root=e,this._settings=r,this._root=p0e.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};HS.default=Nq});var YS=E(jS=>{"use strict";Object.defineProperty(jS,"__esModule",{value:!0});var d0e=require("events"),C0e=sy(),m0e=Fq(),ay=oy(),E0e=GS(),Lq=class extends E0e.default{constructor(e,r){super(e,r);this._settings=r,this._scandir=C0e.scandir,this._emitter=new d0e.EventEmitter,this._queue=m0e(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 i={directory:e,base:r};this._queue.push(i,n=>{n!==null&&this._handleError(n)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(i,n)=>{if(i!==null){r(i,void 0);return}for(let s of n)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!ay.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 i=e.path;r!==void 0&&(e.path=ay.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ay.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&ay.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};jS.default=Lq});var Mq=E(qS=>{"use strict";Object.defineProperty(qS,"__esModule",{value:!0});var I0e=YS(),Tq=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new I0e.default(this._root,this._settings),this._storage=new Set}read(e){this._reader.onError(r=>{y0e(e,r)}),this._reader.onEntry(r=>{this._storage.add(r)}),this._reader.onEnd(()=>{w0e(e,[...this._storage])}),this._reader.read()}};qS.default=Tq;function y0e(t,e){t(e)}function w0e(t,e){t(null,e)}});var Kq=E(JS=>{"use strict";Object.defineProperty(JS,"__esModule",{value:!0});var B0e=require("stream"),Q0e=YS(),Oq=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Q0e.default(this._root,this._settings),this._stream=new B0e.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}};JS.default=Oq});var Hq=E(WS=>{"use strict";Object.defineProperty(WS,"__esModule",{value:!0});var b0e=sy(),Ay=oy(),v0e=GS(),Uq=class extends v0e.default{constructor(){super(...arguments);this._scandir=b0e.scandirSync,this._storage=new Set,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 i=this._scandir(e,this._settings.fsScandirSettings);for(let n of i)this._handleEntry(n,r)}catch(i){this._handleError(i)}}_handleError(e){if(!!Ay.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let i=e.path;r!==void 0&&(e.path=Ay.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Ay.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Ay.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(i,e.path)}_pushToStorage(e){this._storage.add(e)}};WS.default=Uq});var jq=E(zS=>{"use strict";Object.defineProperty(zS,"__esModule",{value:!0});var S0e=Hq(),Gq=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new S0e.default(this._root,this._settings)}read(){return this._reader.read()}};zS.default=Gq});var qq=E(VS=>{"use strict";Object.defineProperty(VS,"__esModule",{value:!0});var x0e=require("path"),k0e=sy(),Yq=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,x0e.sep),this.fsScandirSettings=new k0e.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!=null?e:r}};VS.default=Yq});var XS=E(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.Settings=mo.walkStream=mo.walkSync=mo.walk=void 0;var Jq=Mq(),P0e=Kq(),D0e=jq(),_S=qq();mo.Settings=_S.default;function R0e(t,e,r){if(typeof e=="function"){new Jq.default(t,ly()).read(e);return}new Jq.default(t,ly(e)).read(r)}mo.walk=R0e;function F0e(t,e){let r=ly(e);return new D0e.default(t,r).read()}mo.walkSync=F0e;function N0e(t,e){let r=ly(e);return new P0e.default(t,r).read()}mo.walkStream=N0e;function ly(t={}){return t instanceof _S.default?t:new _S.default(t)}});var $S=E(ZS=>{"use strict";Object.defineProperty(ZS,"__esModule",{value:!0});var L0e=require("path"),T0e=Tl(),Wq=ga(),zq=class{constructor(e){this._settings=e,this._fsStatSettings=new T0e.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return L0e.resolve(this._settings.cwd,e)}_makeEntry(e,r){let i={name:r,path:r,dirent:Wq.fs.createDirentFromStats(r,e)};return this._settings.stats&&(i.stats=e),i}_isFatalError(e){return!Wq.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};ZS.default=zq});var tx=E(ex=>{"use strict";Object.defineProperty(ex,"__esModule",{value:!0});var M0e=require("stream"),O0e=Tl(),K0e=XS(),U0e=$S(),Vq=class extends U0e.default{constructor(){super(...arguments);this._walkStream=K0e.walkStream,this._stat=O0e.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let i=e.map(this._getFullEntryPath,this),n=new M0e.PassThrough({objectMode:!0});n._write=(s,o,a)=>this._getEntry(i[s],e[s],r).then(l=>{l!==null&&r.entryFilter(l)&&n.push(l),s===i.length-1&&n.end(),a()}).catch(a);for(let s=0;sthis._makeEntry(n,r)).catch(n=>{if(i.errorFilter(n))return null;throw n})}_getStat(e){return new Promise((r,i)=>{this._stat(e,this._fsStatSettings,(n,s)=>n===null?r(s):i(n))})}};ex.default=Vq});var Xq=E(rx=>{"use strict";Object.defineProperty(rx,"__esModule",{value:!0});var Ru=ga(),_q=class{constructor(e,r,i){this._patterns=e,this._settings=r,this._micromatchOptions=i,this._storage=[],this._fillStorage()}_fillStorage(){let e=Ru.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of e){let i=this._getPatternSegments(r),n=this._splitSegmentsIntoSections(i);this._storage.push({complete:n.length<=1,pattern:r,segments:i,sections:n})}}_getPatternSegments(e){return Ru.pattern.getPatternParts(e,this._micromatchOptions).map(i=>Ru.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:Ru.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(e){return Ru.array.splitWhen(e,r=>r.dynamic&&Ru.pattern.hasGlobStar(r.pattern))}};rx.default=_q});var $q=E(ix=>{"use strict";Object.defineProperty(ix,"__esModule",{value:!0});var H0e=Xq(),Zq=class extends H0e.default{match(e){let r=e.split("/"),i=r.length,n=this._storage.filter(s=>!s.complete||s.segments.length>i);for(let s of n){let o=s.sections[0];if(!s.complete&&i>o.length||r.every((l,c)=>{let u=s.segments[c];return!!(u.dynamic&&u.patternRe.test(l)||!u.dynamic&&u.pattern===l)}))return!0}return!1}};ix.default=Zq});var tJ=E(nx=>{"use strict";Object.defineProperty(nx,"__esModule",{value:!0});var cy=ga(),G0e=$q(),eJ=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,i){let n=this._getMatcher(r),s=this._getNegativePatternsRe(i);return o=>this._filter(e,o,n,s)}_getMatcher(e){return new G0e.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(cy.pattern.isAffectDepthOfReadingPattern);return cy.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,i,n){let s=this._getEntryLevel(e,r.path);if(this._isSkippedByDeep(s)||this._isSkippedSymbolicLink(r))return!1;let o=cy.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(o,i)?!1:this._isSkippedByNegativePatterns(o,n)}_isSkippedByDeep(e){return e>=this._settings.deep}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_getEntryLevel(e,r){let i=e.split("/").length;return r.split("/").length-(e===""?0:i)}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!cy.pattern.matchAny(e,r)}};nx.default=eJ});var iJ=E(sx=>{"use strict";Object.defineProperty(sx,"__esModule",{value:!0});var ip=ga(),rJ=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let i=ip.pattern.convertPatternsToRe(e,this._micromatchOptions),n=ip.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,i,n)}_filter(e,r,i){if(this._settings.unique){if(this._isDuplicateEntry(e))return!1;this._createIndexRecord(e)}if(this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e,i))return!1;let n=this._settings.baseNameMatch?e.name:e.path;return this._isMatchToPatterns(n,r)&&!this._isMatchToPatterns(e.path,i)}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,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 i=ip.path.makeAbsolute(this._settings.cwd,e.path);return this._isMatchToPatterns(i,r)}_isMatchToPatterns(e,r){let i=ip.path.removeLeadingDotSegment(e);return ip.pattern.matchAny(i,r)}};sx.default=rJ});var sJ=E(ox=>{"use strict";Object.defineProperty(ox,"__esModule",{value:!0});var j0e=ga(),nJ=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return j0e.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};ox.default=nJ});var AJ=E(ax=>{"use strict";Object.defineProperty(ax,"__esModule",{value:!0});var oJ=ga(),aJ=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=oJ.path.makeAbsolute(this._settings.cwd,r),r=oJ.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};ax.default=aJ});var uy=E(Ax=>{"use strict";Object.defineProperty(Ax,"__esModule",{value:!0});var Y0e=require("path"),q0e=tJ(),J0e=iJ(),W0e=sJ(),z0e=AJ(),lJ=class{constructor(e){this._settings=e,this.errorFilter=new W0e.default(this._settings),this.entryFilter=new J0e.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new q0e.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new z0e.default(this._settings)}_getRootDirectory(e){return Y0e.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}}};Ax.default=lJ});var uJ=E(lx=>{"use strict";Object.defineProperty(lx,"__esModule",{value:!0});var V0e=tx(),_0e=uy(),cJ=class extends _0e.default{constructor(){super(...arguments);this._reader=new V0e.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e),n=[];return new Promise((s,o)=>{let a=this.api(r,e,i);a.once("error",o),a.on("data",l=>n.push(i.transform(l))),a.once("end",()=>s(n))})}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};lx.default=cJ});var fJ=E(cx=>{"use strict";Object.defineProperty(cx,"__esModule",{value:!0});var X0e=require("stream"),Z0e=tx(),$0e=uy(),gJ=class extends $0e.default{constructor(){super(...arguments);this._reader=new Z0e.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e),n=this.api(r,e,i),s=new X0e.Readable({objectMode:!0,read:()=>{}});return n.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",i.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>n.destroy()),s}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};cx.default=gJ});var pJ=E(ux=>{"use strict";Object.defineProperty(ux,"__esModule",{value:!0});var eQe=Tl(),tQe=XS(),rQe=$S(),hJ=class extends rQe.default{constructor(){super(...arguments);this._walkSync=tQe.walkSync,this._statSync=eQe.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let i=[];for(let n of e){let s=this._getFullEntryPath(n),o=this._getEntry(s,n,r);o===null||!r.entryFilter(o)||i.push(o)}return i}_getEntry(e,r,i){try{let n=this._getStat(e);return this._makeEntry(n,r)}catch(n){if(i.errorFilter(n))return null;throw n}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};ux.default=hJ});var CJ=E(gx=>{"use strict";Object.defineProperty(gx,"__esModule",{value:!0});var iQe=pJ(),nQe=uy(),dJ=class extends nQe.default{constructor(){super(...arguments);this._reader=new iQe.default(this._settings)}read(e){let r=this._getRootDirectory(e),i=this._getReaderOptions(e);return this.api(r,e,i).map(i.transform)}api(e,r,i){return r.dynamic?this._reader.dynamic(e,i):this._reader.static(r.patterns,i)}};gx.default=dJ});var EJ=E(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var Fu=require("fs"),sQe=require("os"),oQe=sQe.cpus().length;np.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:Fu.lstat,lstatSync:Fu.lstatSync,stat:Fu.stat,statSync:Fu.statSync,readdir:Fu.readdir,readdirSync:Fu.readdirSync};var mJ=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,oQe),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,Infinity),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)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},np.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};np.default=mJ});var gy=E((Oit,IJ)=>{"use strict";var yJ=tq(),aQe=uJ(),AQe=fJ(),lQe=CJ(),fx=EJ(),Ml=ga();async function px(t,e){Nu(t);let r=hx(t,aQe.default,e),i=await Promise.all(r);return Ml.array.flatten(i)}(function(t){function e(o,a){Nu(o);let l=hx(o,lQe.default,a);return Ml.array.flatten(l)}t.sync=e;function r(o,a){Nu(o);let l=hx(o,AQe.default,a);return Ml.stream.merge(l)}t.stream=r;function i(o,a){Nu(o);let l=[].concat(o),c=new fx.default(a);return yJ.generate(l,c)}t.generateTasks=i;function n(o,a){Nu(o);let l=new fx.default(a);return Ml.pattern.isDynamicPattern(o,l)}t.isDynamicPattern=n;function s(o){return Nu(o),Ml.path.escape(o)}t.escapePath=s})(px||(px={}));function hx(t,e,r){let i=[].concat(t),n=new fx.default(r),s=yJ.generate(i,n),o=new e(n);return s.map(o.read,o)}function Nu(t){if(![].concat(t).every(i=>Ml.string.isString(i)&&!Ml.string.isEmpty(i)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}IJ.exports=px});var BJ=E(Ol=>{"use strict";var{promisify:cQe}=require("util"),wJ=require("fs");async function dx(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await cQe(wJ[t])(r))[e]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function Cx(t,e,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return wJ[t](r)[e]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}Ol.isFile=dx.bind(null,"stat","isFile");Ol.isDirectory=dx.bind(null,"stat","isDirectory");Ol.isSymlink=dx.bind(null,"lstat","isSymbolicLink");Ol.isFileSync=Cx.bind(null,"statSync","isFile");Ol.isDirectorySync=Cx.bind(null,"statSync","isDirectory");Ol.isSymlinkSync=Cx.bind(null,"lstatSync","isSymbolicLink")});var xJ=E((Uit,mx)=>{"use strict";var Kl=require("path"),QJ=BJ(),bJ=t=>t.length>1?`{${t.join(",")}}`:t[0],vJ=(t,e)=>{let r=t[0]==="!"?t.slice(1):t;return Kl.isAbsolute(r)?r:Kl.join(e,r)},uQe=(t,e)=>Kl.extname(t)?`**/${t}`:`**/${t}.${bJ(e)}`,SJ=(t,e)=>{if(e.files&&!Array.isArray(e.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof e.files}\``);if(e.extensions&&!Array.isArray(e.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof e.extensions}\``);return e.files&&e.extensions?e.files.map(r=>Kl.posix.join(t,uQe(r,e.extensions))):e.files?e.files.map(r=>Kl.posix.join(t,`**/${r}`)):e.extensions?[Kl.posix.join(t,`**/*.${bJ(e.extensions)}`)]:[Kl.posix.join(t,"**")]};mx.exports=async(t,e)=>{if(e=P({cwd:process.cwd()},e),typeof e.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof e.cwd}\``);let r=await Promise.all([].concat(t).map(async i=>await QJ.isDirectory(vJ(i,e.cwd))?SJ(i,e):i));return[].concat.apply([],r)};mx.exports.sync=(t,e)=>{if(e=P({cwd:process.cwd()},e),typeof e.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof e.cwd}\``);let r=[].concat(t).map(i=>QJ.isDirectorySync(vJ(i,e.cwd))?SJ(i,e):i);return[].concat.apply([],r)}});var TJ=E((Hit,kJ)=>{function PJ(t){return Array.isArray(t)?t:[t]}var gQe=/^\s+$/,fQe=/^\\!/,hQe=/^\\#/,pQe=/\r?\n/g,dQe=/^\.*\/|^\.+$/,Ex="/",DJ=typeof Symbol!="undefined"?Symbol.for("node-ignore"):"node-ignore",CQe=(t,e,r)=>Object.defineProperty(t,e,{value:r}),mQe=/([0-z])-([0-z])/g,EQe=t=>t.replace(mQe,(e,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?e:""),IQe=[[/\\?\s+$/,t=>t.indexOf("\\")===0?" ":""],[/\\\s/g,()=>" "],[/[\\^$.|*+(){]/g,t=>`\\${t}`],[/\[([^\]/]*)($|\])/g,(t,e,r)=>r==="]"?`[${EQe(e)}]`:`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,r)=>e+6`${e}[^\\/]*`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`],[/\\\\\\/g,()=>"\\"]],RJ=Object.create(null),yQe=(t,e,r)=>{let i=RJ[t];if(i)return i;let n=IQe.reduce((s,o)=>s.replace(o[0],o[1].bind(t)),t);return RJ[t]=r?new RegExp(n,"i"):new RegExp(n)},Ix=t=>typeof t=="string",wQe=t=>t&&Ix(t)&&!gQe.test(t)&&t.indexOf("#")!==0,BQe=t=>t.split(pQe),FJ=class{constructor(e,r,i,n){this.origin=e,this.pattern=r,this.negative=i,this.regex=n}},QQe=(t,e)=>{let r=t,i=!1;t.indexOf("!")===0&&(i=!0,t=t.substr(1)),t=t.replace(fQe,"!").replace(hQe,"#");let n=yQe(t,i,e);return new FJ(r,t,i,n)},bQe=(t,e)=>{throw new e(t)},ha=(t,e,r)=>Ix(t)?t?ha.isNotRelative(t)?r(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${e}\``,TypeError),NJ=t=>dQe.test(t);ha.isNotRelative=NJ;ha.convert=t=>t;var LJ=class{constructor({ignorecase:e=!0}={}){this._rules=[],this._ignorecase=e,CQe(this,DJ,!0),this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[DJ]){this._rules=this._rules.concat(e._rules),this._added=!0;return}if(wQe(e)){let r=QQe(e,this._ignorecase);this._added=!0,this._rules.push(r)}}add(e){return this._added=!1,PJ(Ix(e)?BQe(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,r){let i=!1,n=!1;return this._rules.forEach(s=>{let{negative:o}=s;if(n===o&&i!==n||o&&!i&&!n&&!r)return;s.regex.test(e)&&(i=!o,n=o)}),{ignored:i,unignored:n}}_test(e,r,i,n){let s=e&&ha.convert(e);return ha(s,e,bQe),this._t(s,r,i,n)}_t(e,r,i,n){if(e in r)return r[e];if(n||(n=e.split(Ex)),n.pop(),!n.length)return r[e]=this._testOne(e,i);let s=this._t(n.join(Ex)+Ex,r,i,n);return r[e]=s.ignored?s:this._testOne(e,i)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return PJ(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},fy=t=>new LJ(t),vQe=()=>!1,SQe=t=>ha(t&&ha.convert(t),t,vQe);fy.isPathValid=SQe;fy.default=fy;kJ.exports=fy;if(typeof process!="undefined"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let t=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");ha.convert=t;let e=/^[a-z]:\//i;ha.isNotRelative=r=>e.test(r)||NJ(r)}});var OJ=E((Git,MJ)=>{"use strict";MJ.exports=t=>{let e=/^\\\\\?\\/.test(t),r=/[^\u0000-\u0080]+/.test(t);return e||r?t:t.replace(/\\/g,"/")}});var qJ=E((jit,yx)=>{"use strict";var{promisify:xQe}=require("util"),KJ=require("fs"),pa=require("path"),UJ=gy(),kQe=TJ(),sp=OJ(),HJ=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],PQe=xQe(KJ.readFile),DQe=t=>e=>e.startsWith("!")?"!"+pa.posix.join(t,e.slice(1)):pa.posix.join(t,e),RQe=(t,e)=>{let r=sp(pa.relative(e.cwd,pa.dirname(e.fileName)));return t.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(DQe(r))},GJ=t=>{let e=kQe();for(let r of t)e.add(RQe(r.content,{cwd:r.cwd,fileName:r.filePath}));return e},FQe=(t,e)=>{if(t=sp(t),pa.isAbsolute(e)){if(sp(e).startsWith(t))return e;throw new Error(`Path ${e} is not in cwd ${t}`)}return pa.join(t,e)},jJ=(t,e)=>r=>t.ignores(sp(pa.relative(e,FQe(e,r.path||r)))),NQe=async(t,e)=>{let r=pa.join(e,t),i=await PQe(r,"utf8");return{cwd:e,filePath:r,content:i}},LQe=(t,e)=>{let r=pa.join(e,t),i=KJ.readFileSync(r,"utf8");return{cwd:e,filePath:r,content:i}},YJ=({ignore:t=[],cwd:e=sp(process.cwd())}={})=>({ignore:t,cwd:e});yx.exports=async t=>{t=YJ(t);let e=await UJ("**/.gitignore",{ignore:HJ.concat(t.ignore),cwd:t.cwd}),r=await Promise.all(e.map(n=>NQe(n,t.cwd))),i=GJ(r);return jJ(i,t.cwd)};yx.exports.sync=t=>{t=YJ(t);let r=UJ.sync("**/.gitignore",{ignore:HJ.concat(t.ignore),cwd:t.cwd}).map(n=>LQe(n,t.cwd)),i=GJ(r);return jJ(i,t.cwd)}});var VJ=E((Yit,JJ)=>{"use strict";var{Transform:TQe}=require("stream"),wx=class extends TQe{constructor(){super({objectMode:!0})}},WJ=class extends wx{constructor(e){super();this._filter=e}_transform(e,r,i){this._filter(e)&&this.push(e),i()}},zJ=class extends wx{constructor(){super();this._pushed=new Set}_transform(e,r,i){this._pushed.has(e)||(this.push(e),this._pushed.add(e)),i()}};JJ.exports={FilterStream:WJ,UniqueStream:zJ}});var vx=E((qit,Ul)=>{"use strict";var _J=require("fs"),hy=QY(),MQe=wS(),py=gy(),dy=xJ(),Bx=qJ(),{FilterStream:OQe,UniqueStream:KQe}=VJ(),XJ=()=>!1,ZJ=t=>t[0]==="!",UQe=t=>{if(!t.every(e=>typeof e=="string"))throw new TypeError("Patterns must be a string or an array of strings")},HQe=(t={})=>{if(!t.cwd)return;let e;try{e=_J.statSync(t.cwd)}catch{return}if(!e.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},GQe=t=>t.stats instanceof _J.Stats?t.path:t,Cy=(t,e)=>{t=hy([].concat(t)),UQe(t),HQe(e);let r=[];e=P({ignore:[],expandDirectories:!0},e);for(let[i,n]of t.entries()){if(ZJ(n))continue;let s=t.slice(i).filter(a=>ZJ(a)).map(a=>a.slice(1)),o=_(P({},e),{ignore:e.ignore.concat(s)});r.push({pattern:n,options:o})}return r},jQe=(t,e)=>{let r={};return t.options.cwd&&(r.cwd=t.options.cwd),Array.isArray(t.options.expandDirectories)?r=_(P({},r),{files:t.options.expandDirectories}):typeof t.options.expandDirectories=="object"&&(r=P(P({},r),t.options.expandDirectories)),e(t.pattern,r)},Qx=(t,e)=>t.options.expandDirectories?jQe(t,e):[t.pattern],$J=t=>t&&t.gitignore?Bx.sync({cwd:t.cwd,ignore:t.ignore}):XJ,bx=t=>e=>{let{options:r}=t;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=dy.sync(r.ignore)),{pattern:e,options:r}};Ul.exports=async(t,e)=>{let r=Cy(t,e),i=async()=>e&&e.gitignore?Bx({cwd:e.cwd,ignore:e.ignore}):XJ,n=async()=>{let l=await Promise.all(r.map(async c=>{let u=await Qx(c,dy);return Promise.all(u.map(bx(c)))}));return hy(...l)},[s,o]=await Promise.all([i(),n()]),a=await Promise.all(o.map(l=>py(l.pattern,l.options)));return hy(...a).filter(l=>!s(GQe(l)))};Ul.exports.sync=(t,e)=>{let r=Cy(t,e),i=[];for(let o of r){let a=Qx(o,dy.sync).map(bx(o));i.push(...a)}let n=$J(e),s=[];for(let o of i)s=hy(s,py.sync(o.pattern,o.options));return s.filter(o=>!n(o))};Ul.exports.stream=(t,e)=>{let r=Cy(t,e),i=[];for(let a of r){let l=Qx(a,dy.sync).map(bx(a));i.push(...l)}let n=$J(e),s=new OQe(a=>!n(a)),o=new KQe;return MQe(i.map(a=>py.stream(a.pattern,a.options))).pipe(s).pipe(o)};Ul.exports.generateGlobTasks=Cy;Ul.exports.hasMagic=(t,e)=>[].concat(t).some(r=>py.isDynamicPattern(r,e));Ul.exports.gitignore=Bx});var Ca=E((da,Dy)=>{"use strict";Object.defineProperty(da,"__esModule",{value:!0});var A3=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function ibe(t){return A3.includes(t)}var nbe=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...A3];function sbe(t){return nbe.includes(t)}var obe=["null","undefined","string","number","bigint","boolean","symbol"];function abe(t){return obe.includes(t)}function Hu(t){return e=>typeof e===t}var{toString:l3}=Object.prototype,mp=t=>{let e=l3.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&j.domElement(t))return"HTMLElement";if(sbe(e))return e},er=t=>e=>mp(e)===t;function j(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(j.observable(t))return"Observable";if(j.array(t))return"Array";if(j.buffer(t))return"Buffer";let e=mp(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"}j.undefined=Hu("undefined");j.string=Hu("string");var Abe=Hu("number");j.number=t=>Abe(t)&&!j.nan(t);j.bigint=Hu("bigint");j.function_=Hu("function");j.null_=t=>t===null;j.class_=t=>j.function_(t)&&t.toString().startsWith("class ");j.boolean=t=>t===!0||t===!1;j.symbol=Hu("symbol");j.numericString=t=>j.string(t)&&!j.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));j.array=(t,e)=>Array.isArray(t)?j.function_(e)?t.every(e):!0:!1;j.buffer=t=>{var e,r,i,n;return(n=(i=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||i===void 0?void 0:i.call(r,t))!==null&&n!==void 0?n:!1};j.nullOrUndefined=t=>j.null_(t)||j.undefined(t);j.object=t=>!j.null_(t)&&(typeof t=="object"||j.function_(t));j.iterable=t=>{var e;return j.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};j.asyncIterable=t=>{var e;return j.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};j.generator=t=>j.iterable(t)&&j.function_(t.next)&&j.function_(t.throw);j.asyncGenerator=t=>j.asyncIterable(t)&&j.function_(t.next)&&j.function_(t.throw);j.nativePromise=t=>er("Promise")(t);var lbe=t=>{var e,r;return j.function_((e=t)===null||e===void 0?void 0:e.then)&&j.function_((r=t)===null||r===void 0?void 0:r.catch)};j.promise=t=>j.nativePromise(t)||lbe(t);j.generatorFunction=er("GeneratorFunction");j.asyncGeneratorFunction=t=>mp(t)==="AsyncGeneratorFunction";j.asyncFunction=t=>mp(t)==="AsyncFunction";j.boundFunction=t=>j.function_(t)&&!t.hasOwnProperty("prototype");j.regExp=er("RegExp");j.date=er("Date");j.error=er("Error");j.map=t=>er("Map")(t);j.set=t=>er("Set")(t);j.weakMap=t=>er("WeakMap")(t);j.weakSet=t=>er("WeakSet")(t);j.int8Array=er("Int8Array");j.uint8Array=er("Uint8Array");j.uint8ClampedArray=er("Uint8ClampedArray");j.int16Array=er("Int16Array");j.uint16Array=er("Uint16Array");j.int32Array=er("Int32Array");j.uint32Array=er("Uint32Array");j.float32Array=er("Float32Array");j.float64Array=er("Float64Array");j.bigInt64Array=er("BigInt64Array");j.bigUint64Array=er("BigUint64Array");j.arrayBuffer=er("ArrayBuffer");j.sharedArrayBuffer=er("SharedArrayBuffer");j.dataView=er("DataView");j.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;j.urlInstance=t=>er("URL")(t);j.urlString=t=>{if(!j.string(t))return!1;try{return new URL(t),!0}catch(e){return!1}};j.truthy=t=>Boolean(t);j.falsy=t=>!t;j.nan=t=>Number.isNaN(t);j.primitive=t=>j.null_(t)||abe(typeof t);j.integer=t=>Number.isInteger(t);j.safeInteger=t=>Number.isSafeInteger(t);j.plainObject=t=>{if(l3.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};j.typedArray=t=>ibe(mp(t));var cbe=t=>j.safeInteger(t)&&t>=0;j.arrayLike=t=>!j.nullOrUndefined(t)&&!j.function_(t)&&cbe(t.length);j.inRange=(t,e)=>{if(j.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(j.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var ube=1,gbe=["innerHTML","ownerDocument","style","attributes","nodeValue"];j.domElement=t=>j.object(t)&&t.nodeType===ube&&j.string(t.nodeName)&&!j.plainObject(t)&&gbe.every(e=>e in t);j.observable=t=>{var e,r,i,n;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((n=(i=t)["@@observable"])===null||n===void 0?void 0:n.call(i)):!1};j.nodeStream=t=>j.object(t)&&j.function_(t.pipe)&&!j.observable(t);j.infinite=t=>t===Infinity||t===-Infinity;var c3=t=>e=>j.integer(e)&&Math.abs(e%2)===t;j.evenInteger=c3(0);j.oddInteger=c3(1);j.emptyArray=t=>j.array(t)&&t.length===0;j.nonEmptyArray=t=>j.array(t)&&t.length>0;j.emptyString=t=>j.string(t)&&t.length===0;j.nonEmptyString=t=>j.string(t)&&t.length>0;var fbe=t=>j.string(t)&&!/\S/.test(t);j.emptyStringOrWhitespace=t=>j.emptyString(t)||fbe(t);j.emptyObject=t=>j.object(t)&&!j.map(t)&&!j.set(t)&&Object.keys(t).length===0;j.nonEmptyObject=t=>j.object(t)&&!j.map(t)&&!j.set(t)&&Object.keys(t).length>0;j.emptySet=t=>j.set(t)&&t.size===0;j.nonEmptySet=t=>j.set(t)&&t.size>0;j.emptyMap=t=>j.map(t)&&t.size===0;j.nonEmptyMap=t=>j.map(t)&&t.size>0;j.propertyKey=t=>j.any([j.string,j.number,j.symbol],t);j.formData=t=>er("FormData")(t);j.urlSearchParams=t=>er("URLSearchParams")(t);var u3=(t,e,r)=>{if(!j.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)};j.any=(t,...e)=>(j.array(t)?t:[t]).some(i=>u3(Array.prototype.some,i,e));j.all=(t,...e)=>u3(Array.prototype.every,t,e);var Te=(t,e,r,i={})=>{if(!t){let{multipleValues:n}=i,s=n?`received values of types ${[...new Set(r.map(o=>`\`${j(o)}\``))].join(", ")}`:`received value of type \`${j(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${s}.`)}};da.assert={undefined:t=>Te(j.undefined(t),"undefined",t),string:t=>Te(j.string(t),"string",t),number:t=>Te(j.number(t),"number",t),bigint:t=>Te(j.bigint(t),"bigint",t),function_:t=>Te(j.function_(t),"Function",t),null_:t=>Te(j.null_(t),"null",t),class_:t=>Te(j.class_(t),"Class",t),boolean:t=>Te(j.boolean(t),"boolean",t),symbol:t=>Te(j.symbol(t),"symbol",t),numericString:t=>Te(j.numericString(t),"string with a number",t),array:(t,e)=>{Te(j.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>Te(j.buffer(t),"Buffer",t),nullOrUndefined:t=>Te(j.nullOrUndefined(t),"null or undefined",t),object:t=>Te(j.object(t),"Object",t),iterable:t=>Te(j.iterable(t),"Iterable",t),asyncIterable:t=>Te(j.asyncIterable(t),"AsyncIterable",t),generator:t=>Te(j.generator(t),"Generator",t),asyncGenerator:t=>Te(j.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>Te(j.nativePromise(t),"native Promise",t),promise:t=>Te(j.promise(t),"Promise",t),generatorFunction:t=>Te(j.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>Te(j.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>Te(j.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>Te(j.boundFunction(t),"Function",t),regExp:t=>Te(j.regExp(t),"RegExp",t),date:t=>Te(j.date(t),"Date",t),error:t=>Te(j.error(t),"Error",t),map:t=>Te(j.map(t),"Map",t),set:t=>Te(j.set(t),"Set",t),weakMap:t=>Te(j.weakMap(t),"WeakMap",t),weakSet:t=>Te(j.weakSet(t),"WeakSet",t),int8Array:t=>Te(j.int8Array(t),"Int8Array",t),uint8Array:t=>Te(j.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>Te(j.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>Te(j.int16Array(t),"Int16Array",t),uint16Array:t=>Te(j.uint16Array(t),"Uint16Array",t),int32Array:t=>Te(j.int32Array(t),"Int32Array",t),uint32Array:t=>Te(j.uint32Array(t),"Uint32Array",t),float32Array:t=>Te(j.float32Array(t),"Float32Array",t),float64Array:t=>Te(j.float64Array(t),"Float64Array",t),bigInt64Array:t=>Te(j.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>Te(j.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>Te(j.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>Te(j.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>Te(j.dataView(t),"DataView",t),urlInstance:t=>Te(j.urlInstance(t),"URL",t),urlString:t=>Te(j.urlString(t),"string with a URL",t),truthy:t=>Te(j.truthy(t),"truthy",t),falsy:t=>Te(j.falsy(t),"falsy",t),nan:t=>Te(j.nan(t),"NaN",t),primitive:t=>Te(j.primitive(t),"primitive",t),integer:t=>Te(j.integer(t),"integer",t),safeInteger:t=>Te(j.safeInteger(t),"integer",t),plainObject:t=>Te(j.plainObject(t),"plain object",t),typedArray:t=>Te(j.typedArray(t),"TypedArray",t),arrayLike:t=>Te(j.arrayLike(t),"array-like",t),domElement:t=>Te(j.domElement(t),"HTMLElement",t),observable:t=>Te(j.observable(t),"Observable",t),nodeStream:t=>Te(j.nodeStream(t),"Node.js Stream",t),infinite:t=>Te(j.infinite(t),"infinite number",t),emptyArray:t=>Te(j.emptyArray(t),"empty array",t),nonEmptyArray:t=>Te(j.nonEmptyArray(t),"non-empty array",t),emptyString:t=>Te(j.emptyString(t),"empty string",t),nonEmptyString:t=>Te(j.nonEmptyString(t),"non-empty string",t),emptyStringOrWhitespace:t=>Te(j.emptyStringOrWhitespace(t),"empty string or whitespace",t),emptyObject:t=>Te(j.emptyObject(t),"empty object",t),nonEmptyObject:t=>Te(j.nonEmptyObject(t),"non-empty object",t),emptySet:t=>Te(j.emptySet(t),"empty set",t),nonEmptySet:t=>Te(j.nonEmptySet(t),"non-empty set",t),emptyMap:t=>Te(j.emptyMap(t),"empty map",t),nonEmptyMap:t=>Te(j.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>Te(j.propertyKey(t),"PropertyKey",t),formData:t=>Te(j.formData(t),"FormData",t),urlSearchParams:t=>Te(j.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>Te(j.evenInteger(t),"even integer",t),oddInteger:t=>Te(j.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>Te(j.directInstanceOf(t,e),"T",t),inRange:(t,e)=>Te(j.inRange(t,e),"in range",t),any:(t,...e)=>Te(j.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>Te(j.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(j,{class:{value:j.class_},function:{value:j.function_},null:{value:j.null_}});Object.defineProperties(da.assert,{class:{value:da.assert.class_},function:{value:da.assert.function_},null:{value:da.assert.null_}});da.default=j;Dy.exports=j;Dy.exports.default=j;Dy.exports.assert=da.assert});var g3=E((gnt,Ux)=>{"use strict";var Hx=class extends Error{constructor(e){super(e||"Promise was canceled");this.name="CancelError"}get isCanceled(){return!0}},Ep=class{static fn(e){return(...r)=>new Ep((i,n,s)=>{r.push(s),e(...r).then(i,n)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,i)=>{this._reject=i;let n=a=>{this._isPending=!1,r(a)},s=a=>{this._isPending=!1,i(a)},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a)};return Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a}}}),e(n,s,o)})}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 Hx(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Ep.prototype,Promise.prototype);Ux.exports=Ep;Ux.exports.CancelError=Hx});var f3=E((Gx,jx)=>{"use strict";Object.defineProperty(Gx,"__esModule",{value:!0});var hbe=require("tls"),Yx=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let i=typeof r.connect=="function",n=typeof r.secureConnect=="function",s=typeof r.close=="function",o=()=>{i&&r.connect(),t instanceof hbe.TLSSocket&&n&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),s&&t.once("close",r.close)};t.writable&&!t.connecting?o():t.connecting?t.once("connect",o):t.destroyed&&s&&r.close(t._hadError)};Gx.default=Yx;jx.exports=Yx;jx.exports.default=Yx});var h3=E((qx,Jx)=>{"use strict";Object.defineProperty(qx,"__esModule",{value:!0});var pbe=f3(),dbe=Number(process.versions.node.split(".")[0]),Wx=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=o=>{let a=o.emit.bind(o);o.emit=(l,...c)=>(l==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,o.emit=a),a(l,...c))};r(t),t.prependOnceListener("abort",()=>{e.abort=Date.now(),(!e.response||dbe>=13)&&(e.phases.total=Date.now()-e.start)});let i=o=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let a=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};o.prependOnceListener("lookup",a),pbe.default(o,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(o.removeListener("lookup",a),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?i(t.socket):t.prependOnceListener("socket",i);let n=()=>{var o;e.upload=Date.now(),e.phases.request=e.upload-(o=e.secureConnect,o!=null?o:e.connect)};return(()=>typeof t.writableFinished=="boolean"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))()?n():t.prependOnceListener("finish",n),t.prependOnceListener("response",o=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,o.timings=e,r(o),o.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};qx.default=Wx;Jx.exports=Wx;Jx.exports.default=Wx});var y3=E((fnt,zx)=>{"use strict";var{V4MAPPED:Cbe,ADDRCONFIG:mbe,ALL:p3,promises:{Resolver:d3},lookup:Ebe}=require("dns"),{promisify:Vx}=require("util"),Ibe=require("os"),Gu=Symbol("cacheableLookupCreateConnection"),_x=Symbol("cacheableLookupInstance"),C3=Symbol("expires"),ybe=typeof p3=="number",m3=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},wbe=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},E3=()=>{let t=!1,e=!1;for(let r of Object.values(Ibe.networkInterfaces()))for(let i of r)if(!i.internal&&(i.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},Bbe=t=>Symbol.iterator in t,I3={ttl:!0},Qbe={all:!0},Xx=class{constructor({cache:e=new Map,maxTtl:r=Infinity,fallbackDuration:i=3600,errorTtl:n=.15,resolver:s=new d3,lookup:o=Ebe}={}){if(this.maxTtl=r,this.errorTtl=n,this._cache=e,this._resolver=s,this._dnsLookup=Vx(o),this._resolver instanceof d3?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=Vx(this._resolver.resolve4.bind(this._resolver)),this._resolve6=Vx(this._resolver.resolve6.bind(this._resolver))),this._iface=E3(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,i<1)this._fallback=!1;else{this._fallback=!0;let a=setInterval(()=>{this._hostnamesToFallback.clear()},i*1e3);a.unref&&a.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,i){if(typeof r=="function"?(i=r,r={}):typeof r=="number"&&(r={family:r}),!i)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(n=>{r.all?i(null,n):i(null,n.address,n.family,n.expires,n.ttl)},i)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let i=await this.query(e);if(r.family===6){let n=i.filter(s=>s.family===6);r.hints&Cbe&&(ybe&&r.hints&p3||n.length===0)?wbe(i):i=n}else r.family===4&&(i=i.filter(n=>n.family===4));if(r.hints&mbe){let{_iface:n}=this;i=i.filter(s=>s.family===6?n.has6:n.has4)}if(i.length===0){let n=new Error(`cacheableLookup ENOTFOUND ${e}`);throw n.code="ENOTFOUND",n.hostname=e,n}return r.all?i:i[0]}async query(e){let r=await this._cache.get(e);if(!r){let i=this._pending[e];if(i)r=await i;else{let n=this.queryAndCache(e);this._pending[e]=n,r=await n}}return r=r.map(i=>P({},i)),r}async _resolve(e){let r=async c=>{try{return await c}catch(u){if(u.code==="ENODATA"||u.code==="ENOTFOUND")return[];throw u}},[i,n]=await Promise.all([this._resolve4(e,I3),this._resolve6(e,I3)].map(c=>r(c))),s=0,o=0,a=0,l=Date.now();for(let c of i)c.family=4,c.expires=l+c.ttl*1e3,s=Math.max(s,c.ttl);for(let c of n)c.family=6,c.expires=l+c.ttl*1e3,o=Math.max(o,c.ttl);return i.length>0?n.length>0?a=Math.min(s,o):a=s:a=o,{entries:[...i,...n],cacheTtl:a}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch(r){return{entries:[],cacheTtl:0}}}async _set(e,r,i){if(this.maxTtl>0&&i>0){i=Math.min(i,this.maxTtl)*1e3,r[C3]=Date.now()+i;try{await this._cache.set(e,r,i)}catch(n){this.lookupAsync=async()=>{let s=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw s.cause=n,s}}Bbe(this._cache)&&this._tick(i)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,Qbe);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 i=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,i),delete this._pending[e],r.entries}catch(r){throw delete this._pending[e],r}}_tick(e){let r=this._nextRemovalTime;(!r||e{this._nextRemovalTime=!1;let i=Infinity,n=Date.now();for(let[s,o]of this._cache){let a=o[C3];n>=a?this._cache.delete(s):a("lookup"in r||(r.lookup=this.lookup),e[Gu](r,i))}uninstall(e){if(m3(e),e[Gu]){if(e[_x]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[Gu],delete e[Gu],delete e[_x]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=E3(),(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()}};zx.exports=Xx;zx.exports.default=Xx});var Q3=E((hnt,Zx)=>{"use strict";var bbe=typeof URL=="undefined"?require("url").URL:URL,vbe="text/plain",Sbe="us-ascii",w3=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),xbe=(t,{stripHash:e})=>{let r=t.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${t}`);let i=r[1].split(";"),n=r[2],s=e?"":r[3],o=!1;i[i.length-1]==="base64"&&(i.pop(),o=!0);let a=(i.shift()||"").toLowerCase(),c=[...i.map(u=>{let[g,f=""]=u.split("=").map(h=>h.trim());return g==="charset"&&(f=f.toLowerCase(),f===Sbe)?"":`${g}${f?`=${f}`:""}`}).filter(Boolean)];return o&&c.push("base64"),(c.length!==0||a&&a!==vbe)&&c.unshift(a),`data:${c.join(";")},${o?n.trim():n}${s?`#${s}`:""}`},B3=(t,e)=>{if(e=P({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 xbe(t,e);let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let n=new bbe(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&n.protocol==="https:"&&(n.protocol="http:"),e.forceHttps&&n.protocol==="http:"&&(n.protocol="https:"),e.stripAuthentication&&(n.username="",n.password=""),e.stripHash&&(n.hash=""),n.pathname&&(n.pathname=n.pathname.replace(/((?!:).|^)\/{2,}/g,(s,o)=>/^(?!\/)/g.test(o)?`${o}/`:"/")),n.pathname&&(n.pathname=decodeURI(n.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let s=n.pathname.split("/"),o=s[s.length-1];w3(o,e.removeDirectoryIndex)&&(s=s.slice(0,s.length-1),n.pathname=s.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let s of[...n.searchParams.keys()])w3(s,e.removeQueryParameters)&&n.searchParams.delete(s);return e.sortQueryParameters&&n.searchParams.sort(),e.removeTrailingSlash&&(n.pathname=n.pathname.replace(/\/$/,"")),t=n.toString(),(e.removeTrailingSlash||n.pathname==="/")&&n.hash===""&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};Zx.exports=B3;Zx.exports.default=B3});var S3=E((pnt,b3)=>{b3.exports=v3;function v3(t,e){if(t&&e)return v3(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(i){r[i]=t[i]}),r;function r(){for(var i=new Array(arguments.length),n=0;n{var x3=S3();$x.exports=x3(Ry);$x.exports.strict=x3(k3);Ry.proto=Ry(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Ry(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return k3(this)},configurable:!0})});function Ry(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function k3(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 tk=E((Cnt,P3)=>{var kbe=ek(),Pbe=function(){},Dbe=function(t){return t.setHeader&&typeof t.abort=="function"},Rbe=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},D3=function(t,e,r){if(typeof e=="function")return D3(t,null,e);e||(e={}),r=kbe(r||Pbe);var i=t._writableState,n=t._readableState,s=e.readable||e.readable!==!1&&t.readable,o=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||l()},l=function(){o=!1,s||r.call(t)},c=function(){s=!1,o||r.call(t)},u=function(p){r.call(t,p?new Error("exited with error code: "+p):null)},g=function(p){r.call(t,p)},f=function(){if(s&&!(n&&n.ended))return r.call(t,new Error("premature close"));if(o&&!(i&&i.ended))return r.call(t,new Error("premature close"))},h=function(){t.req.on("finish",l)};return Dbe(t)?(t.on("complete",l),t.on("abort",f),t.req?h():t.on("request",h)):o&&!i&&(t.on("end",a),t.on("close",a)),Rbe(t)&&t.on("exit",u),t.on("end",c),t.on("finish",l),e.error!==!1&&t.on("error",g),t.on("close",f),function(){t.removeListener("complete",l),t.removeListener("abort",f),t.removeListener("request",h),t.req&&t.req.removeListener("finish",l),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",l),t.removeListener("exit",u),t.removeListener("end",c),t.removeListener("error",g),t.removeListener("close",f)}};P3.exports=D3});var N3=E((mnt,R3)=>{var Fbe=ek(),Nbe=tk(),rk=require("fs"),Ip=function(){},Lbe=/^v?\.0/.test(process.version),Fy=function(t){return typeof t=="function"},Tbe=function(t){return!Lbe||!rk?!1:(t instanceof(rk.ReadStream||Ip)||t instanceof(rk.WriteStream||Ip))&&Fy(t.close)},Mbe=function(t){return t.setHeader&&Fy(t.abort)},Obe=function(t,e,r,i){i=Fbe(i);var n=!1;t.on("close",function(){n=!0}),Nbe(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,Tbe(t))return t.close(Ip);if(Mbe(t))return t.abort();if(Fy(t.destroy))return t.destroy();i(o||new Error("stream was destroyed"))}}},F3=function(t){t()},Kbe=function(t,e){return t.pipe(e)},Ube=function(){var t=Array.prototype.slice.call(arguments),e=Fy(t[t.length-1]||Ip)&&t.pop()||Ip;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,i=t.map(function(n,s){var o=s0;return Obe(n,o,a,function(l){r||(r=l),l&&i.forEach(F3),!o&&(i.forEach(F3),e(r))})});return t.reduce(Kbe)};R3.exports=Ube});var T3=E((Ent,L3)=>{"use strict";var{PassThrough:Hbe}=require("stream");L3.exports=t=>{t=P({},t);let{array:e}=t,{encoding:r}=t,i=r==="buffer",n=!1;e?n=!(r||i):r=r||"utf8",i&&(r=null);let s=new Hbe({objectMode:n});r&&s.setEncoding(r);let o=0,a=[];return s.on("data",l=>{a.push(l),n?o=a.length:o+=l.length}),s.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),s.getBufferedLength=()=>o,s}});var M3=E((Int,ju)=>{"use strict";var Gbe=N3(),jbe=T3(),ik=class extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}};async function Ny(t,e){if(!t)return Promise.reject(new Error("Expected a stream"));e=P({maxBuffer:Infinity},e);let{maxBuffer:r}=e,i;return await new Promise((n,s)=>{let o=a=>{a&&(a.bufferedData=i.getBufferedValue()),s(a)};i=Gbe(t,jbe(e),a=>{if(a){o(a);return}n()}),i.on("data",()=>{i.getBufferedLength()>r&&o(new ik)})}),i.getBufferedValue()}ju.exports=Ny;ju.exports.default=Ny;ju.exports.buffer=(t,e)=>Ny(t,_(P({},e),{encoding:"buffer"}));ju.exports.array=(t,e)=>Ny(t,_(P({},e),{array:!0}));ju.exports.MaxBufferError=ik});var K3=E((wnt,O3)=>{"use strict";var Ybe=[200,203,204,206,300,301,404,405,410,414,501],qbe=[200,203,204,300,301,302,303,307,308,404,405,410,414,501],Jbe={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},Wbe={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function nk(t){let e={};if(!t)return e;let r=t.trim().split(/\s*,\s*/);for(let i of r){let[n,s]=i.split(/\s*=\s*/,2);e[n]=s===void 0?!0:s.replace(/^"|"$/g,"")}return e}function zbe(t){let e=[];for(let r in t){let i=t[r];e.push(i===!0?r:r+"="+i)}if(!!e.length)return e.join(", ")}O3.exports=class{constructor(e,r,{shared:i,cacheHeuristic:n,immutableMinTimeToLive:s,ignoreCargoCult:o,trustServerDate:a,_fromObject:l}={}){if(l){this._fromObject(l);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=i!==!1,this._trustServerDate=a!==void 0?a:!0,this._cacheHeuristic=n!==void 0?n:.1,this._immutableMinTtl=s!==void 0?s:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=nk(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=nk(e.headers["cache-control"]),o&&"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":zbe(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),!r.headers["cache-control"]&&/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())&&qbe.indexOf(this._status)!==-1&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc.public||this._rescc["max-age"]||this._rescc["s-maxage"]||Ybe.indexOf(this._status)!==-1))}_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=nk(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 i of r)if(e.headers[i]!==this._reqHeaders[i])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let i in e)Jbe[i]||(r[i]=e[i]);if(e.connection){let i=e.connection.trim().split(/\s*,\s*/);for(let n of i)delete r[n]}if(r.warning){let i=r.warning.split(/,/).filter(n=>!/^\s*1[0-9][0-9]/.test(n));i.length?r.warning=i.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(){return this._trustServerDate?this._serverDate():this._responseTime}_serverDate(){let e=Date.parse(this._resHeaders.date);if(isFinite(e)){let r=8*3600*1e3;if(Math.abs(this._responseTime-e)e&&(e=i)}let r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){let e=parseInt(this._resHeaders.age);return isFinite(e)?e:0}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 parseInt(this._rescc["s-maxage"],10)}if(this._rescc["max-age"])return parseInt(this._rescc["max-age"],10);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this._serverDate();if(this._resHeaders.expires){let i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||ii)return Math.max(e,(r-i)/1e3*this._cacheHeuristic)}return e}timeToLive(){return Math.max(0,this.maxAge()-this.age())*1e3}stale(){return this.maxAge()<=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 n=r["if-none-match"].split(/,/).filter(s=>!/^\s*W\//.test(s));n.length?r["if-none-match"]=n.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),!r||!r.headers)throw Error("Response headers missing");let i=!1;if(r.status!==void 0&&r.status!=304?i=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(i=!0),!i)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let n={};for(let o in this._resHeaders)n[o]=o in r.headers&&!Wbe[o]?r.headers[o]:this._resHeaders[o];let s=Object.assign({},r,{status:this._status,method:this._method,headers:n});return{policy:new this.constructor(e,s,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,trustServerDate:this._trustServerDate}),modified:!1,matches:!0}}}});var Ly=E((Bnt,U3)=>{"use strict";U3.exports=t=>{let e={};for(let[r,i]of Object.entries(t))e[r.toLowerCase()]=i;return e}});var j3=E((Qnt,H3)=>{"use strict";var Vbe=require("stream").Readable,_be=Ly(),G3=class extends Vbe{constructor(e,r,i,n){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(!(i instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof n!="string")throw new TypeError("Argument `url` should be a string");super();this.statusCode=e,this.headers=_be(r),this.body=i,this.url=n}_read(){this.push(this.body),this.push(null)}};H3.exports=G3});var q3=E((bnt,Y3)=>{"use strict";var Xbe=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];Y3.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(Xbe));for(let i of r)i in e||(e[i]=typeof t[i]=="function"?t[i].bind(t):t[i])}});var W3=E((vnt,J3)=>{"use strict";var Zbe=require("stream").PassThrough,$be=q3(),eve=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new Zbe;return $be(t,e),t.pipe(e)};J3.exports=eve});var z3=E(sk=>{sk.stringify=function t(e){if(typeof e=="undefined")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="",i=Array.isArray(e);r=i?"[":"{";var n=!0;for(var s in e){var o=typeof e[s]=="function"||!i&&typeof e[s]=="undefined";Object.hasOwnProperty.call(e,s)&&!o&&(n||(r+=","),n=!1,i?e[s]==null?r+="null":r+=t(e[s]):e[s]!==void 0&&(r+=t(s)+":"+t(e[s])))}return r+=i?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e=="undefined"?"null":JSON.stringify(e)};sk.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 Z3=E((xnt,V3)=>{"use strict";var tve=require("events"),_3=z3(),rve=t=>{let e={redis:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql"};if(t.adapter||t.uri){let r=t.adapter||/^[^:]*/.exec(t.uri)[0];return new(require(e[r]))(t)}return new Map},X3=class extends tve{constructor(e,r){super();if(this.opts=Object.assign({namespace:"keyv",serialize:_3.stringify,deserialize:_3.parse},typeof e=="string"?{uri:e}:e,r),!this.opts.store){let i=Object.assign({},this.opts);this.opts.store=rve(i)}typeof this.opts.store.on=="function"&&this.opts.store.on("error",i=>this.emit("error",i)),this.opts.store.namespace=this.opts.namespace}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}get(e,r){e=this._getKeyPrefix(e);let{store:i}=this.opts;return Promise.resolve().then(()=>i.get(e)).then(n=>typeof n=="string"?this.opts.deserialize(n):n).then(n=>{if(n!==void 0){if(typeof n.expires=="number"&&Date.now()>n.expires){this.delete(e);return}return r&&r.raw?n:n.value}})}set(e,r,i){e=this._getKeyPrefix(e),typeof i=="undefined"&&(i=this.opts.ttl),i===0&&(i=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let s=typeof i=="number"?Date.now()+i:null;return r={value:r,expires:s},this.opts.serialize(r)}).then(s=>n.set(e,s,i)).then(()=>!0)}delete(e){e=this._getKeyPrefix(e);let{store:r}=this.opts;return Promise.resolve().then(()=>r.delete(e))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}};V3.exports=X3});var tW=E((knt,$3)=>{"use strict";var ive=require("events"),Ty=require("url"),nve=Q3(),sve=M3(),ok=K3(),eW=j3(),ove=Ly(),ave=W3(),Ave=Z3(),yo=class{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new Ave({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,i)=>{let n;if(typeof r=="string")n=ak(Ty.parse(r)),r={};else if(r instanceof Ty.URL)n=ak(Ty.parse(r.toString())),r={};else{let[g,...f]=(r.path||"").split("?"),h=f.length>0?`?${f.join("?")}`:"";n=ak(_(P({},r),{pathname:g,search:h}))}r=P(P({headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1},r),lve(n)),r.headers=ove(r.headers);let s=new ive,o=nve(Ty.format(n),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),a=`${r.method}:${o}`,l=!1,c=!1,u=g=>{c=!0;let f=!1,h,p=new Promise(m=>{h=()=>{f||(f=!0,m())}}),d=m=>{if(l&&!g.forceRefresh){m.status=m.statusCode;let B=ok.fromObject(l.cachePolicy).revalidatedPolicy(g,m);if(!B.modified){let b=B.policy.responseHeaders();m=new eW(l.statusCode,b,l.body,l.url),m.cachePolicy=B.policy,m.fromCache=!0}}m.fromCache||(m.cachePolicy=new ok(g,m,g),m.fromCache=!1);let I;g.cache&&m.cachePolicy.storable()?(I=ave(m),(async()=>{try{let B=sve.buffer(m);if(await Promise.race([p,new Promise(L=>m.once("end",L))]),f)return;let b=await B,R={cachePolicy:m.cachePolicy.toObject(),url:m.url,statusCode:m.fromCache?l.statusCode:m.statusCode,body:b},H=g.strictTtl?m.cachePolicy.timeToLive():void 0;g.maxTtl&&(H=H?Math.min(H,g.maxTtl):g.maxTtl),await this.cache.set(a,R,H)}catch(B){s.emit("error",new yo.CacheError(B))}})()):g.cache&&l&&(async()=>{try{await this.cache.delete(a)}catch(B){s.emit("error",new yo.CacheError(B))}})(),s.emit("response",I||m),typeof i=="function"&&i(I||m)};try{let m=e(g,d);m.once("error",h),m.once("abort",h),s.emit("request",m)}catch(m){s.emit("error",new yo.RequestError(m))}};return(async()=>{let g=async h=>{await Promise.resolve();let p=h.cache?await this.cache.get(a):void 0;if(typeof p=="undefined")return u(h);let d=ok.fromObject(p.cachePolicy);if(d.satisfiesWithoutRevalidation(h)&&!h.forceRefresh){let m=d.responseHeaders(),I=new eW(p.statusCode,m,p.body,p.url);I.cachePolicy=d,I.fromCache=!0,s.emit("response",I),typeof i=="function"&&i(I)}else l=p,h.headers=d.revalidationHeaders(h),u(h)},f=h=>s.emit("error",new yo.CacheError(h));this.cache.once("error",f),s.on("response",()=>this.cache.removeListener("error",f));try{await g(r)}catch(h){r.automaticFailover&&!c&&u(r),s.emit("error",new yo.CacheError(h))}})(),s}}};function lve(t){let e=P({},t);return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function ak(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}yo.RequestError=class extends Error{constructor(t){super(t.message);this.name="RequestError",Object.assign(this,t)}};yo.CacheError=class extends Error{constructor(t){super(t.message);this.name="CacheError",Object.assign(this,t)}};$3.exports=yo});var iW=E((Pnt,rW)=>{"use strict";var cve=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];rW.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(cve)),i={};for(let n of r)n in e||(i[n]={get(){let s=t[n];return typeof s=="function"?s.bind(t):s},set(s){t[n]=s},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),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 sW=E((Dnt,nW)=>{"use strict";var{Transform:uve,PassThrough:gve}=require("stream"),Ak=require("zlib"),fve=iW();nW.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof Ak.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let i=!0,n=new uve({transform(a,l,c){i=!1,c(null,a)},flush(a){a()}}),s=new gve({autoDestroy:!1,destroy(a,l){t.destroy(),l(a)}}),o=r?Ak.createBrotliDecompress():Ak.createUnzip();return o.once("error",a=>{if(i&&!t.readable){s.end();return}s.destroy(a)}),fve(t,s),t.pipe(n).pipe(o).pipe(s),s}});var lk=E((Rnt,oW)=>{"use strict";var aW=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[i,n]of this.oldCache.entries())this.onEviction(i,n);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)}};oW.exports=aW});var uk=E((Fnt,AW)=>{"use strict";var hve=require("events"),pve=require("tls"),dve=require("http2"),Cve=lk(),_i=Symbol("currentStreamsCount"),lW=Symbol("request"),ns=Symbol("cachedOriginSet"),Yu=Symbol("gracefullyClosing"),mve=["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"],Eve=(t,e,r)=>{let i=0,n=t.length;for(;i>>1;r(t[s],e)?i=s+1:n=s}return i},Ive=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,ck=(t,e)=>{for(let r of t)r[ns].lengthe[ns].includes(i))&&r[_i]+e[_i]<=e.remoteSettings.maxConcurrentStreams&&cW(r)},yve=(t,e)=>{for(let r of t)e[ns].lengthr[ns].includes(i))&&e[_i]+r[_i]<=r.remoteSettings.maxConcurrentStreams&&cW(e)},uW=({agent:t,isFree:e})=>{let r={};for(let i in t.sessions){let s=t.sessions[i].filter(o=>{let a=o[ma.kCurrentStreamsCount]{t[Yu]=!0,t[_i]===0&&t.close()},ma=class extends hve{constructor({timeout:e=6e4,maxSessions:r=Infinity,maxFreeSessions:i=10,maxCachedTlsSessions:n=100}={}){super();this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=i,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new Cve({maxSize:n})}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 i of mve)e[i]&&(r+=`:${e[i]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let i=this.queue[e][r];this._sessionsCount{Array.isArray(i)?(i=[...i],n()):i=[{resolve:n,reject:s}];let o=this.normalizeOptions(r),a=ma.normalizeOrigin(e,r&&r.servername);if(a===void 0){for(let{reject:u}of i)u(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(o in this.sessions){let u=this.sessions[o],g=-1,f=-1,h;for(let p of u){let d=p.remoteSettings.maxConcurrentStreams;if(d=d||p[Yu]||p.destroyed)continue;h||(g=d),m>f&&(h=p,f=m)}}if(h){if(i.length!==1){for(let{reject:p}of i){let d=new Error(`Expected the length of listeners to be 1, got ${i.length}. -Please report this to https://github.com/szmarczak/http2-wrapper/`);p(d)}return}i[0].resolve(h);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...i),this._tryToCreateNewSession(o,a);return}}else this.queue[o]={};let l=()=>{o in this.queue&&this.queue[o][a]===c&&(delete this.queue[o][a],Object.keys(this.queue[o]).length===0&&delete this.queue[o])},c=()=>{let u=`${a}:${o}`,g=!1;try{let f=dve.connect(e,P({createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(u)},r));f[_i]=0,f[Yu]=!1;let h=()=>f[_i]{this.tlsSessionCache.set(u,m)}),f.once("error",m=>{for(let{reject:I}of i)I(m);this.tlsSessionCache.delete(u)}),f.setTimeout(this.timeout,()=>{f.destroy()}),f.once("close",()=>{if(g){p&&this._freeSessionsCount--,this._sessionsCount--;let m=this.sessions[o];m.splice(m.indexOf(f),1),m.length===0&&delete this.sessions[o]}else{let m=new Error("Session closed without receiving a SETTINGS frame");m.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:I}of i)I(m);l()}this._tryToCreateNewSession(o,a)});let d=()=>{if(!(!(o in this.queue)||!h())){for(let m of f[ns])if(m in this.queue[o]){let{listeners:I}=this.queue[o][m];for(;I.length!==0&&h();)I.shift().resolve(f);let B=this.queue[o];if(B[m].listeners.length===0&&(delete B[m],Object.keys(B).length===0)){delete this.queue[o];break}if(!h())break}}};f.on("origin",()=>{f[ns]=f.originSet,!!h()&&(d(),ck(this.sessions[o],f))}),f.once("remoteSettings",()=>{if(f.ref(),f.unref(),this._sessionsCount++,c.destroyed){let m=new Error("Agent has been destroyed");for(let I of i)I.reject(m);f.destroy();return}f[ns]=f.originSet;{let m=this.sessions;if(o in m){let I=m[o];I.splice(Eve(I,f,Ive),0,f)}else m[o]=[f]}this._freeSessionsCount+=1,g=!0,this.emit("session",f),d(),l(),f[_i]===0&&this._freeSessionsCount>this.maxFreeSessions&&f.close(),i.length!==0&&(this.getSession(a,r,i),i.length=0),f.on("remoteSettings",()=>{d(),ck(this.sessions[o],f)})}),f[lW]=f.request,f.request=(m,I)=>{if(f[Yu])throw new Error("The session is gracefully closing. No new streams are allowed.");let B=f[lW](m,I);return f.ref(),++f[_i],f[_i]===f.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,B.once("close",()=>{if(p=h(),--f[_i],!f.destroyed&&!f.closed&&(yve(this.sessions[o],f),h()&&!f.closed)){p||(this._freeSessionsCount++,p=!0);let b=f[_i]===0;b&&f.unref(),b&&(this._freeSessionsCount>this.maxFreeSessions||f[Yu])?f.close():(ck(this.sessions[o],f),d())}}),B}}catch(f){for(let h of i)h.reject(f);l()}};c.listeners=i,c.completed=!1,c.destroyed=!1,this.queue[o][a]=c,this._tryToCreateNewSession(o,a)})}request(e,r,i,n){return new Promise((s,o)=>{this.getSession(e,r,[{reject:o,resolve:a=>{try{s(a.request(i,n))}catch(l){o(l)}}}])})}createConnection(e,r){return ma.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let i=e.port||443,n=e.hostname||e.host;return typeof r.servername=="undefined"&&(r.servername=n),pve.connect(i,n,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[_i]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let i of r)i.destroy(e);for(let r of Object.values(this.queue))for(let i of Object.values(r))i.destroyed=!0;this.queue={}}get freeSessions(){return uW({agent:this,isFree:!0})}get busySessions(){return uW({agent:this,isFree:!1})}};ma.kCurrentStreamsCount=_i;ma.kGracefullyClosing=Yu;AW.exports={Agent:ma,globalAgent:new ma}});var gk=E((Nnt,gW)=>{"use strict";var{Readable:wve}=require("stream"),fW=class extends wve{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()}};gW.exports=fW});var fk=E((Lnt,hW)=>{"use strict";hW.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 dW=E((Tnt,pW)=>{"use strict";pW.exports=(t,e,r)=>{for(let i of r)t.on(i,(...n)=>e.emit(i,...n))}});var mW=E((Mnt,CW)=>{"use strict";CW.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var IW=E((Knt,EW)=>{"use strict";var qu=(t,e,r)=>{EW.exports[e]=class extends t{constructor(...n){super(typeof r=="string"?r:r(n));this.name=`${super.name} [${e}]`,this.code=e}}};qu(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],i=Array.isArray(r);return i&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${i?"one of":"of"} type ${r}. Received ${typeof t[2]}`});qu(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);qu(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);qu(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);qu(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);qu(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var Ck=E((Unt,yW)=>{"use strict";var Bve=require("http2"),{Writable:Qve}=require("stream"),{Agent:wW,globalAgent:bve}=uk(),vve=gk(),Sve=fk(),xve=dW(),kve=mW(),{ERR_INVALID_ARG_TYPE:hk,ERR_INVALID_PROTOCOL:Pve,ERR_HTTP_HEADERS_SENT:BW,ERR_INVALID_HTTP_TOKEN:Dve,ERR_HTTP_INVALID_HEADER_VALUE:Rve,ERR_INVALID_CHAR:Fve}=IW(),{HTTP2_HEADER_STATUS:QW,HTTP2_HEADER_METHOD:bW,HTTP2_HEADER_PATH:vW,HTTP2_METHOD_CONNECT:Nve}=Bve.constants,Pi=Symbol("headers"),pk=Symbol("origin"),dk=Symbol("session"),SW=Symbol("options"),My=Symbol("flushedHeaders"),yp=Symbol("jobs"),Lve=/^[\^`\-\w!#$%&*+.|~]+$/,Tve=/[^\t\u0020-\u007E\u0080-\u00FF]/,xW=class extends Qve{constructor(e,r,i){super({autoDestroy:!1});let n=typeof e=="string"||e instanceof URL;if(n&&(e=Sve(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(i=r,r=n?e:P({},e)):r=P(P({},e),r),r.h2session)this[dk]=r.h2session;else if(r.agent===!1)this.agent=new wW({maxFreeSessions:0});else if(typeof r.agent=="undefined"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new wW({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=bve;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new hk("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new Pve(r.protocol,"https:");let s=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,o=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;let{timeout:a}=r;if(r.timeout=void 0,this[Pi]=Object.create(null),this[yp]=[],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[l,c]of Object.entries(r.headers))this.setHeader(l,c);r.auth&&!("authorization"in this[Pi])&&(this[Pi].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[SW]=r,s===443?(this[pk]=`https://${o}`,":authority"in this[Pi]||(this[Pi][":authority"]=o)):(this[pk]=`https://${o}:${s}`,":authority"in this[Pi]||(this[Pi][":authority"]=`${o}:${s}`)),a&&this.setTimeout(a),i&&this.once("response",i),this[My]=!1}get method(){return this[Pi][bW]}set method(e){e&&(this[Pi][bW]=e.toUpperCase())}get path(){return this[Pi][vW]}set path(e){e&&(this[Pi][vW]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,i){if(this._mustNotHaveABody){i(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let n=()=>this._request.write(e,r,i);this._request?n():this[yp].push(n)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[yp].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[My]||this.destroyed)return;this[My]=!0;let e=this.method===Nve,r=i=>{if(this._request=i,this.destroyed){i.destroy();return}e||xve(i,this,["timeout","continue","close","error"]);let n=o=>(...a)=>{!this.writable&&!this.destroyed?o(...a):this.once("finish",()=>{o(...a)})};i.once("response",n((o,a,l)=>{let c=new vve(this.socket,i.readableHighWaterMark);this.res=c,c.req=this,c.statusCode=o[QW],c.headers=o,c.rawHeaders=l,c.once("end",()=>{this.aborted?(c.aborted=!0,c.emit("aborted")):(c.complete=!0,c.socket=null,c.connection=null)}),e?(c.upgrade=!0,this.emit("connect",c,i,Buffer.alloc(0))?this.emit("close"):i.destroy()):(i.on("data",u=>{!c._dumped&&!c.push(u)&&i.pause()}),i.once("end",()=>{c.push(null)}),this.emit("response",c)||c._dump())})),i.once("headers",n(o=>this.emit("information",{statusCode:o[QW]}))),i.once("trailers",n((o,a,l)=>{let{res:c}=this;c.trailers=o,c.rawTrailers=l}));let{socket:s}=i.session;this.socket=s,this.connection=s;for(let o of this[yp])o();this.emit("socket",this.socket)};if(this[dk])try{r(this[dk].request(this[Pi]))}catch(i){this.emit("error",i)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[pk],this[SW],this[Pi]))}catch(i){this.emit("error",i)}}}getHeader(e){if(typeof e!="string")throw new hk("name","string",e);return this[Pi][e.toLowerCase()]}get headersSent(){return this[My]}removeHeader(e){if(typeof e!="string")throw new hk("name","string",e);if(this.headersSent)throw new BW("remove");delete this[Pi][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new BW("set");if(typeof e!="string"||!Lve.test(e)&&!kve(e))throw new Dve("Header name",e);if(typeof r=="undefined")throw new Rve(r,e);if(Tve.test(r))throw new Fve("header content",e);this[Pi][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let i=()=>this._request.setTimeout(e,r);return this._request?i():this[yp].push(i),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};yW.exports=xW});var PW=E((Hnt,kW)=>{"use strict";var Mve=require("tls");kW.exports=(t={})=>new Promise((e,r)=>{let i=Mve.connect(t,()=>{t.resolveSocket?(i.off("error",r),e({alpnProtocol:i.alpnProtocol,socket:i})):(i.destroy(),e({alpnProtocol:i.alpnProtocol}))});i.on("error",r)})});var RW=E((Gnt,DW)=>{"use strict";var Ove=require("net");DW.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]),Ove.isIP(e)?"":e}});var LW=E((jnt,mk)=>{"use strict";var FW=require("http"),Ek=require("https"),Kve=PW(),Uve=lk(),Hve=Ck(),Gve=RW(),jve=fk(),Oy=new Uve({maxSize:100}),wp=new Map,NW=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let i=()=>{t.emit("free",e,r)};e.on("free",i);let n=()=>{t.removeSocket(e,r)};e.on("close",n);let s=()=>{t.removeSocket(e,r),e.off("close",n),e.off("free",i),e.off("agentRemove",s)};e.on("agentRemove",s),t.emit("free",e,r)},Yve=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!Oy.has(e)){if(wp.has(e))return(await wp.get(e)).alpnProtocol;let{path:r,agent:i}=t;t.path=t.socketPath;let n=Kve(t);wp.set(e,n);try{let{socket:s,alpnProtocol:o}=await n;if(Oy.set(e,o),t.path=r,o==="h2")s.destroy();else{let{globalAgent:a}=Ek,l=Ek.Agent.prototype.createConnection;i?i.createConnection===l?NW(i,s,t):s.destroy():a.createConnection===l?NW(a,s,t):s.destroy()}return wp.delete(e),o}catch(s){throw wp.delete(e),s}}return Oy.get(e)};mk.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=jve(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e=_(P(P({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 i=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||Gve(e),e.port=e.port||(i?443:80),e._defaultAgent=i?Ek.globalAgent:FW.globalAgent;let n=e.agent;if(n){if(n.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=n[i?"https":"http"]}return i&&await Yve(e)==="h2"?(n&&(e.agent=n.http2),new Hve(e,r)):FW.request(e,r)};mk.exports.protocolCache=Oy});var MW=E((Ynt,TW)=>{"use strict";var qve=require("http2"),Jve=uk(),Ik=Ck(),Wve=gk(),zve=LW(),Vve=(t,e,r)=>new Ik(t,e,r),_ve=(t,e,r)=>{let i=new Ik(t,e,r);return i.end(),i};TW.exports=_(P(_(P({},qve),{ClientRequest:Ik,IncomingMessage:Wve}),Jve),{request:Vve,get:_ve,auto:zve})});var wk=E(yk=>{"use strict";Object.defineProperty(yk,"__esModule",{value:!0});var OW=Ca();yk.default=t=>OW.default.nodeStream(t)&&OW.default.function_(t.getBoundary)});var GW=E(Bk=>{"use strict";Object.defineProperty(Bk,"__esModule",{value:!0});var KW=require("fs"),UW=require("util"),HW=Ca(),Xve=wk(),Zve=UW.promisify(KW.stat);Bk.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(HW.default.string(t))return Buffer.byteLength(t);if(HW.default.buffer(t))return t.length;if(Xve.default(t))return UW.promisify(t.getLength.bind(t))();if(t instanceof KW.ReadStream){let{size:r}=await Zve(t.path);return r===0?void 0:r}}});var bk=E(Qk=>{"use strict";Object.defineProperty(Qk,"__esModule",{value:!0});function $ve(t,e,r){let i={};for(let n of r)i[n]=(...s)=>{e.emit(n,...s)},t.on(n,i[n]);return()=>{for(let n of r)t.off(n,i[n])}}Qk.default=$ve});var jW=E(vk=>{"use strict";Object.defineProperty(vk,"__esModule",{value:!0});vk.default=()=>{let t=[];return{once(e,r,i){e.once(r,i),t.push({origin:e,event:r,fn:i})},unhandleAll(){for(let e of t){let{origin:r,event:i,fn:n}=e;r.removeListener(i,n)}t.length=0}}}});var qW=E(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp.TimeoutError=void 0;var eSe=require("net"),tSe=jW(),YW=Symbol("reentry"),rSe=()=>{},Sk=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`);this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};Bp.TimeoutError=Sk;Bp.default=(t,e,r)=>{if(YW in t)return rSe;t[YW]=!0;let i=[],{once:n,unhandleAll:s}=tSe.default(),o=(g,f,h)=>{var p;let d=setTimeout(f,g,g,h);(p=d.unref)===null||p===void 0||p.call(d);let m=()=>{clearTimeout(d)};return i.push(m),m},{host:a,hostname:l}=r,c=(g,f)=>{t.destroy(new Sk(g,f))},u=()=>{for(let g of i)g();s()};if(t.once("error",g=>{if(u(),t.listenerCount("error")===0)throw g}),t.once("close",u),n(t,"response",g=>{n(g,"end",u)}),typeof e.request!="undefined"&&o(e.request,c,"request"),typeof e.socket!="undefined"){let g=()=>{c(e.socket,"socket")};t.setTimeout(e.socket,g),i.push(()=>{t.removeListener("timeout",g)})}return n(t,"socket",g=>{var f;let{socketPath:h}=t;if(g.connecting){let p=Boolean(h!=null?h:eSe.isIP((f=l!=null?l:a)!==null&&f!==void 0?f:"")!==0);if(typeof e.lookup!="undefined"&&!p&&typeof g.address().address=="undefined"){let d=o(e.lookup,c,"lookup");n(g,"lookup",d)}if(typeof e.connect!="undefined"){let d=()=>o(e.connect,c,"connect");p?n(g,"connect",d()):n(g,"lookup",m=>{m===null&&n(g,"connect",d())})}typeof e.secureConnect!="undefined"&&r.protocol==="https:"&&n(g,"connect",()=>{let d=o(e.secureConnect,c,"secureConnect");n(g,"secureConnect",d)})}if(typeof e.send!="undefined"){let p=()=>o(e.send,c,"send");g.connecting?n(g,"connect",()=>{n(t,"upload-complete",p())}):n(t,"upload-complete",p())}}),typeof e.response!="undefined"&&n(t,"upload-complete",()=>{let g=o(e.response,c,"response");n(t,"response",g)}),u}});var WW=E(xk=>{"use strict";Object.defineProperty(xk,"__esModule",{value:!0});var JW=Ca();xk.default=t=>{t=t;let e={protocol:t.protocol,hostname:JW.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 JW.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 zW=E(kk=>{"use strict";Object.defineProperty(kk,"__esModule",{value:!0});var iSe=require("url"),nSe=["protocol","host","hostname","port","pathname","search"];kk.default=(t,e)=>{var r,i;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}//${(i=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&i!==void 0?i:""}`}let n=new iSe.URL(t);if(e.path){let s=e.path.indexOf("?");s===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,s),e.search=e.path.slice(s+1)),delete e.path}for(let s of nSe)e[s]&&(n[s]=e[s].toString());return n}});var _W=E(Pk=>{"use strict";Object.defineProperty(Pk,"__esModule",{value:!0});var VW=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)}};Pk.default=VW});var Rk=E(Dk=>{"use strict";Object.defineProperty(Dk,"__esModule",{value:!0});var sSe=async t=>{let e=[],r=0;for await(let i of t)e.push(i),r+=Buffer.byteLength(i);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};Dk.default=sSe});var ZW=E(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.dnsLookupIpVersionToFamily=ql.isDnsLookupIpVersion=void 0;var XW={auto:0,ipv4:4,ipv6:6};ql.isDnsLookupIpVersion=t=>t in XW;ql.dnsLookupIpVersionToFamily=t=>{if(ql.isDnsLookupIpVersion(t))return XW[t];throw new Error("Invalid DNS lookup IP version")}});var Fk=E(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});Ky.isResponseOk=void 0;Ky.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var e8=E(Nk=>{"use strict";Object.defineProperty(Nk,"__esModule",{value:!0});var $W=new Set;Nk.default=t=>{$W.has(t)||($W.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var t8=E(Lk=>{"use strict";Object.defineProperty(Lk,"__esModule",{value:!0});var ar=Ca(),oSe=(t,e)=>{if(ar.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");ar.assert.any([ar.default.string,ar.default.undefined],t.encoding),ar.assert.any([ar.default.boolean,ar.default.undefined],t.resolveBodyOnly),ar.assert.any([ar.default.boolean,ar.default.undefined],t.methodRewriting),ar.assert.any([ar.default.boolean,ar.default.undefined],t.isStream),ar.assert.any([ar.default.string,ar.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");let{retry:r}=t;if(e?t.retry=P({},e.retry):t.retry={calculateDelay:i=>i.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},ar.default.object(r)?(t.retry=P(P({},t.retry),r),t.retry.methods=[...new Set(t.retry.methods.map(i=>i.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):ar.default.number(r)&&(t.retry.limit=r),ar.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(ar.default.number))),ar.default.object(t.pagination)){e&&(t.pagination=P(P({},e.pagination),t.pagination));let{pagination:i}=t;if(!ar.default.function_(i.transform))throw new Error("`options.pagination.transform` must be implemented");if(!ar.default.function_(i.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!ar.default.function_(i.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!ar.default.function_(i.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};Lk.default=oSe});var r8=E(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});Qp.retryAfterStatusCodes=void 0;Qp.retryAfterStatusCodes=new Set([413,429,503]);var aSe=({attemptCount:t,retryOptions:e,error:r,retryAfter:i})=>{if(t>e.limit)return 0;let n=e.methods.includes(r.options.method),s=e.errorCodes.includes(r.code),o=r.response&&e.statusCodes.includes(r.response.statusCode);if(!n||!s&&!o)return 0;if(r.response){if(i)return e.maxRetryAfter===void 0||i>e.maxRetryAfter?0:i;if(r.response.statusCode===413)return 0}let a=Math.random()*100;return 2**(t-1)*1e3+a};Qp.default=aSe});var vp=E(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.UnsupportedProtocolError=Rt.ReadError=Rt.TimeoutError=Rt.UploadError=Rt.CacheError=Rt.HTTPError=Rt.MaxRedirectsError=Rt.RequestError=Rt.setNonEnumerableProperties=Rt.knownHookEvents=Rt.withoutBody=Rt.kIsNormalizedAlready=void 0;var i8=require("util"),n8=require("stream"),ASe=require("fs"),dA=require("url"),s8=require("http"),Tk=require("http"),lSe=require("https"),cSe=h3(),uSe=y3(),o8=tW(),gSe=sW(),fSe=MW(),hSe=Ly(),ce=Ca(),pSe=GW(),a8=wk(),dSe=bk(),A8=qW(),CSe=WW(),l8=zW(),mSe=_W(),ESe=Rk(),c8=ZW(),ISe=Fk(),CA=e8(),ySe=t8(),wSe=r8(),Mk,Ei=Symbol("request"),Uy=Symbol("response"),Ju=Symbol("responseSize"),Wu=Symbol("downloadedSize"),zu=Symbol("bodySize"),Vu=Symbol("uploadedSize"),Hy=Symbol("serverResponsesPiped"),u8=Symbol("unproxyEvents"),g8=Symbol("isFromCache"),Ok=Symbol("cancelTimeouts"),f8=Symbol("startedReading"),_u=Symbol("stopReading"),Gy=Symbol("triggerRead"),mA=Symbol("body"),bp=Symbol("jobs"),h8=Symbol("originalResponse"),p8=Symbol("retryTimeout");Rt.kIsNormalizedAlready=Symbol("isNormalizedAlready");var BSe=ce.default.string(process.versions.brotli);Rt.withoutBody=new Set(["GET","HEAD"]);Rt.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function QSe(t){for(let e in t){let r=t[e];if(!ce.default.string(r)&&!ce.default.number(r)&&!ce.default.boolean(r)&&!ce.default.null_(r)&&!ce.default.undefined(r))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}function bSe(t){return ce.default.object(t)&&!("statusCode"in t)}var Kk=new mSe.default,vSe=async t=>new Promise((e,r)=>{let i=n=>{r(n)};t.pending||e(),t.once("error",i),t.once("ready",()=>{t.off("error",i),e()})}),SSe=new Set([300,301,302,303,304,307,308]),xSe=["context","body","json","form"];Rt.setNonEnumerableProperties=(t,e)=>{let r={};for(let i of t)if(!!i)for(let n of xSe)n in i&&(r[n]={writable:!0,configurable:!0,enumerable:!1,value:i[n]});Object.defineProperties(e,r)};var _r=class extends Error{constructor(e,r,i){var n;super(e);if(Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code,i instanceof Uk?(Object.defineProperty(this,"request",{enumerable:!1,value:i}),Object.defineProperty(this,"response",{enumerable:!1,value:i[Uy]}),Object.defineProperty(this,"options",{enumerable:!1,value:i.options})):Object.defineProperty(this,"options",{enumerable:!1,value:i}),this.timings=(n=this.request)===null||n===void 0?void 0:n.timings,ce.default.string(r.stack)&&ce.default.string(this.stack)){let s=this.stack.indexOf(this.message)+this.message.length,o=this.stack.slice(s).split(` -`).reverse(),a=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(` -`).reverse();for(;a.length!==0&&a[0]===o[0];)o.shift();this.stack=`${this.stack.slice(0,s)}${o.reverse().join(` -`)}${a.reverse().join(` -`)}`}}};Rt.RequestError=_r;var Hk=class extends _r{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError"}};Rt.MaxRedirectsError=Hk;var Gk=class extends _r{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError"}};Rt.HTTPError=Gk;var jk=class extends _r{constructor(e,r){super(e.message,e,r);this.name="CacheError"}};Rt.CacheError=jk;var Yk=class extends _r{constructor(e,r){super(e.message,e,r);this.name="UploadError"}};Rt.UploadError=Yk;var qk=class extends _r{constructor(e,r,i){super(e.message,e,i);this.name="TimeoutError",this.event=e.event,this.timings=r}};Rt.TimeoutError=qk;var jy=class extends _r{constructor(e,r){super(e.message,e,r);this.name="ReadError"}};Rt.ReadError=jy;var Jk=class extends _r{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError"}};Rt.UnsupportedProtocolError=Jk;var kSe=["socket","connect","continue","information","upgrade","timeout"],Uk=class extends n8.Duplex{constructor(e,r={},i){super({autoDestroy:!1,highWaterMark:0});this[Wu]=0,this[Vu]=0,this.requestInitialized=!1,this[Hy]=new Set,this.redirects=[],this[_u]=!1,this[Gy]=!1,this[bp]=[],this.retryCount=0,this._progressCallbacks=[];let n=()=>this._unlockWrite(),s=()=>this._lockWrite();this.on("pipe",c=>{c.prependListener("data",n),c.on("data",s),c.prependListener("end",n),c.on("end",s)}),this.on("unpipe",c=>{c.off("data",n),c.off("data",s),c.off("end",n),c.off("end",s)}),this.on("pipe",c=>{c instanceof Tk.IncomingMessage&&(this.options.headers=P(P({},c.headers),this.options.headers))});let{json:o,body:a,form:l}=r;if((o||a||l)&&this._lockWrite(),Rt.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,i)}catch(c){ce.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(c);return}(async()=>{var c;try{this.options.body instanceof ASe.ReadStream&&await vSe(this.options.body);let{url:u}=this.options;if(!u)throw new TypeError("Missing `url` property");if(this.requestUrl=u.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(c=this[Ei])===null||c===void 0||c.destroy();return}for(let g of this[bp])g();this[bp].length=0,this.requestInitialized=!0}catch(u){if(u instanceof _r){this._beforeError(u);return}this.destroyed||this.destroy(u)}})()}static normalizeArguments(e,r,i){var n,s,o,a,l;let c=r;if(ce.default.object(e)&&!ce.default.urlInstance(e))r=P(P(P({},i),e),r);else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r=P(P({},i),r),e!==void 0&&(r.url=e),ce.default.urlInstance(r.url)&&(r.url=new dA.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),ce.assert.any([ce.default.string,ce.default.undefined],r.method),ce.assert.any([ce.default.object,ce.default.undefined],r.headers),ce.assert.any([ce.default.string,ce.default.urlInstance,ce.default.undefined],r.prefixUrl),ce.assert.any([ce.default.object,ce.default.undefined],r.cookieJar),ce.assert.any([ce.default.object,ce.default.string,ce.default.undefined],r.searchParams),ce.assert.any([ce.default.object,ce.default.string,ce.default.undefined],r.cache),ce.assert.any([ce.default.object,ce.default.number,ce.default.undefined],r.timeout),ce.assert.any([ce.default.object,ce.default.undefined],r.context),ce.assert.any([ce.default.object,ce.default.undefined],r.hooks),ce.assert.any([ce.default.boolean,ce.default.undefined],r.decompress),ce.assert.any([ce.default.boolean,ce.default.undefined],r.ignoreInvalidCookies),ce.assert.any([ce.default.boolean,ce.default.undefined],r.followRedirect),ce.assert.any([ce.default.number,ce.default.undefined],r.maxRedirects),ce.assert.any([ce.default.boolean,ce.default.undefined],r.throwHttpErrors),ce.assert.any([ce.default.boolean,ce.default.undefined],r.http2),ce.assert.any([ce.default.boolean,ce.default.undefined],r.allowGetBody),ce.assert.any([ce.default.string,ce.default.undefined],r.localAddress),ce.assert.any([c8.isDnsLookupIpVersion,ce.default.undefined],r.dnsLookupIpVersion),ce.assert.any([ce.default.object,ce.default.undefined],r.https),ce.assert.any([ce.default.boolean,ce.default.undefined],r.rejectUnauthorized),r.https&&(ce.assert.any([ce.default.boolean,ce.default.undefined],r.https.rejectUnauthorized),ce.assert.any([ce.default.function_,ce.default.undefined],r.https.checkServerIdentity),ce.assert.any([ce.default.string,ce.default.object,ce.default.array,ce.default.undefined],r.https.certificateAuthority),ce.assert.any([ce.default.string,ce.default.object,ce.default.array,ce.default.undefined],r.https.key),ce.assert.any([ce.default.string,ce.default.object,ce.default.array,ce.default.undefined],r.https.certificate),ce.assert.any([ce.default.string,ce.default.undefined],r.https.passphrase),ce.assert.any([ce.default.string,ce.default.buffer,ce.default.array,ce.default.undefined],r.https.pfx)),ce.assert.any([ce.default.object,ce.default.undefined],r.cacheOptions),ce.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===(i==null?void 0:i.headers)?r.headers=P({},r.headers):r.headers=hSe(P(P({},i==null?void 0:i.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!==(i==null?void 0:i.searchParams)){let h;if(ce.default.string(r.searchParams)||r.searchParams instanceof dA.URLSearchParams)h=new dA.URLSearchParams(r.searchParams);else{QSe(r.searchParams),h=new dA.URLSearchParams;for(let p in r.searchParams){let d=r.searchParams[p];d===null?h.append(p,""):d!==void 0&&h.append(p,d)}}(n=i==null?void 0:i.searchParams)===null||n===void 0||n.forEach((p,d)=>{h.has(d)||h.append(d,p)}),r.searchParams=h}if(r.username=(s=r.username)!==null&&s!==void 0?s:"",r.password=(o=r.password)!==null&&o!==void 0?o:"",ce.default.undefined(r.prefixUrl)?r.prefixUrl=(a=i==null?void 0:i.prefixUrl)!==null&&a!==void 0?a:"":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")&&(r.prefixUrl+="/")),ce.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=l8.default(r.prefixUrl+r.url,r)}else(ce.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=l8.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:h}=r;Object.defineProperty(r,"prefixUrl",{set:d=>{let m=r.url;if(!m.href.startsWith(d))throw new Error(`Cannot change \`prefixUrl\` from ${h} to ${d}: ${m.href}`);r.url=new dA.URL(d+m.href.slice(h.length)),h=d},get:()=>h});let{protocol:p}=r.url;if(p==="unix:"&&(p="http:",r.url=new dA.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),p!=="http:"&&p!=="https:")throw new Jk(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:u}=r;if(u){let{setCookie:h,getCookieString:p}=u;ce.assert.function_(h),ce.assert.function_(p),h.length===4&&p.length===0&&(h=i8.promisify(h.bind(r.cookieJar)),p=i8.promisify(p.bind(r.cookieJar)),r.cookieJar={setCookie:h,getCookieString:p})}let{cache:g}=r;if(g&&(Kk.has(g)||Kk.set(g,new o8((h,p)=>{let d=h[Ei](h,p);return ce.default.promise(d)&&(d.once=(m,I)=>{if(m==="error")d.catch(I);else if(m==="abort")(async()=>{try{(await d).once("abort",I)}catch(B){}})();else throw new Error(`Unknown HTTP2 promise event: ${m}`);return d}),d},g))),r.cacheOptions=P({},r.cacheOptions),r.dnsCache===!0)Mk||(Mk=new uSe.default),r.dnsCache=Mk;else if(!ce.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${ce.default(r.dnsCache)}`);ce.default.number(r.timeout)?r.timeout={request:r.timeout}:i&&r.timeout!==i.timeout?r.timeout=P(P({},i.timeout),r.timeout):r.timeout=P({},r.timeout),r.context||(r.context={});let f=r.hooks===(i==null?void 0:i.hooks);r.hooks=P({},r.hooks);for(let h of Rt.knownHookEvents)if(h in r.hooks)if(ce.default.array(r.hooks[h]))r.hooks[h]=[...r.hooks[h]];else throw new TypeError(`Parameter \`${h}\` must be an Array, got ${ce.default(r.hooks[h])}`);else r.hooks[h]=[];if(i&&!f)for(let h of Rt.knownHookEvents)i.hooks[h].length>0&&(r.hooks[h]=[...i.hooks[h],...r.hooks[h]]);if("family"in r&&CA.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),(i==null?void 0:i.https)&&(r.https=P(P({},i.https),r.https)),"rejectUnauthorized"in r&&CA.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&CA.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&CA.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&CA.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&CA.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&CA.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&CA.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 h in r.agent)if(h!=="http"&&h!=="https"&&h!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${h}\``)}return r.maxRedirects=(l=r.maxRedirects)!==null&&l!==void 0?l:0,Rt.setNonEnumerableProperties([i,c],r),ySe.default(r,i)}_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,i=!ce.default.undefined(e.form),n=!ce.default.undefined(e.json),s=!ce.default.undefined(e.body),o=i||n||s,a=Rt.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=a,o){if(a)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([s,i,n].filter(l=>l).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(s&&!(e.body instanceof n8.Readable)&&!ce.default.string(e.body)&&!ce.default.buffer(e.body)&&!a8.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(i&&!ce.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let l=!ce.default.string(r["content-type"]);s?(a8.default(e.body)&&l&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[mA]=e.body):i?(l&&(r["content-type"]="application/x-www-form-urlencoded"),this[mA]=new dA.URLSearchParams(e.form).toString()):(l&&(r["content-type"]="application/json"),this[mA]=e.stringifyJson(e.json));let c=await pSe.default(this[mA],e.headers);ce.default.undefined(r["content-length"])&&ce.default.undefined(r["transfer-encoding"])&&!a&&!ce.default.undefined(c)&&(r["content-length"]=String(c))}}else a?this._lockWrite():this._unlockWrite();this[zu]=Number(r["content-length"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:i}=r;this[h8]=e,r.decompress&&(e=gSe(e));let n=e.statusCode,s=e;s.statusMessage=s.statusMessage?s.statusMessage:s8.STATUS_CODES[n],s.url=r.url.toString(),s.requestUrl=this.requestUrl,s.redirectUrls=this.redirects,s.request=this,s.isFromCache=e.fromCache||!1,s.ip=this.ip,s.retryCount=this.retryCount,this[g8]=s.isFromCache,this[Ju]=Number(e.headers["content-length"])||void 0,this[Uy]=e,e.once("end",()=>{this[Ju]=this[Wu],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",a=>{e.destroy(),this._beforeError(new jy(a,this))}),e.once("aborted",()=>{this._beforeError(new jy({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let o=e.headers["set-cookie"];if(ce.default.object(r.cookieJar)&&o){let a=o.map(async l=>r.cookieJar.setCookie(l,i.toString()));r.ignoreInvalidCookies&&(a=a.map(async l=>l.catch(()=>{})));try{await Promise.all(a)}catch(l){this._beforeError(l);return}}if(r.followRedirect&&e.headers.location&&SSe.has(n)){if(e.resume(),this[Ei]&&(this[Ok](),delete this[Ei],this[u8]()),(n===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[mA]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new Hk(this));return}try{let l=Buffer.from(e.headers.location,"binary").toString(),c=new dA.URL(l,i),u=c.toString();decodeURI(u),c.hostname!==i.hostname||c.port!==i.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="")):(c.username=r.username,c.password=r.password),this.redirects.push(u),r.url=c;for(let g of r.hooks.beforeRedirect)await g(r,s);this.emit("redirect",s,r),await this._makeRequest()}catch(l){this._beforeError(l);return}return}if(r.isStream&&r.throwHttpErrors&&!ISe.isResponseOk(s)){this._beforeError(new Gk(s));return}e.on("readable",()=>{this[Gy]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let a of this[Hy])if(!a.headersSent){for(let l in e.headers){let c=r.decompress?l!=="content-encoding":!0,u=e.headers[l];c&&a.setHeader(l,u)}a.statusCode=n}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:i,url:n}=r;cSe.default(e),this[Ok]=A8.default(e,i,n);let s=r.cache?"cacheableResponse":"response";e.once(s,l=>{this._onResponse(l)}),e.once("error",l=>{var c;e.destroy(),(c=e.res)===null||c===void 0||c.removeAllListeners("end"),l=l instanceof A8.TimeoutError?new qk(l,this.timings,this):new _r(l.message,l,this),this._beforeError(l)}),this[u8]=dSe.default(e,this,kSe),this[Ei]=e,this.emit("uploadProgress",this.uploadProgress);let o=this[mA],a=this.redirects.length===0?this:e;ce.default.nodeStream(o)?(o.pipe(a),o.once("error",l=>{this._beforeError(new Yk(l,this))})):(this._unlockWrite(),ce.default.undefined(o)?(this._cannotHaveBody||this._noPipe)&&(a.end(),this._lockWrite()):(this._writeRequest(o,void 0,()=>{}),a.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,r){return new Promise((i,n)=>{Object.assign(r,CSe.default(e)),delete r.url;let s,o=Kk.get(r.cache)(r,async a=>{a._readableState.autoDestroy=!1,s&&(await s).emit("cacheableResponse",a),i(a)});r.url=e,o.once("error",n),o.once("request",async a=>{s=a,i(s)})})}async _makeRequest(){var e,r,i,n,s;let{options:o}=this,{headers:a}=o;for(let I in a)if(ce.default.undefined(a[I]))delete a[I];else if(ce.default.null_(a[I]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${I}\` header`);if(o.decompress&&ce.default.undefined(a["accept-encoding"])&&(a["accept-encoding"]=BSe?"gzip, deflate, br":"gzip, deflate"),o.cookieJar){let I=await o.cookieJar.getCookieString(o.url.toString());ce.default.nonEmptyString(I)&&(o.headers.cookie=I)}for(let I of o.hooks.beforeRequest){let B=await I(o);if(!ce.default.undefined(B)){o.request=()=>B;break}}o.body&&this[mA]!==o.body&&(this[mA]=o.body);let{agent:l,request:c,timeout:u,url:g}=o;if(o.dnsCache&&!("lookup"in o)&&(o.lookup=o.dnsCache.lookup),g.hostname==="unix"){let I=/(?.+?):(?.+)/.exec(`${g.pathname}${g.search}`);if(I==null?void 0:I.groups){let{socketPath:B,path:b}=I.groups;Object.assign(o,{socketPath:B,path:b,host:""})}}let f=g.protocol==="https:",h;o.http2?h=fSe.auto:h=f?lSe.request:s8.request;let p=(e=o.request)!==null&&e!==void 0?e:h,d=o.cache?this._createCacheableRequest:p;l&&!o.http2&&(o.agent=l[f?"https":"http"]),o[Ei]=p,delete o.request,delete o.timeout;let m=o;if(m.shared=(r=o.cacheOptions)===null||r===void 0?void 0:r.shared,m.cacheHeuristic=(i=o.cacheOptions)===null||i===void 0?void 0:i.cacheHeuristic,m.immutableMinTimeToLive=(n=o.cacheOptions)===null||n===void 0?void 0:n.immutableMinTimeToLive,m.ignoreCargoCult=(s=o.cacheOptions)===null||s===void 0?void 0:s.ignoreCargoCult,o.dnsLookupIpVersion!==void 0)try{m.family=c8.dnsLookupIpVersionToFamily(o.dnsLookupIpVersion)}catch(I){throw new Error("Invalid `dnsLookupIpVersion` option value")}o.https&&("rejectUnauthorized"in o.https&&(m.rejectUnauthorized=o.https.rejectUnauthorized),o.https.checkServerIdentity&&(m.checkServerIdentity=o.https.checkServerIdentity),o.https.certificateAuthority&&(m.ca=o.https.certificateAuthority),o.https.certificate&&(m.cert=o.https.certificate),o.https.key&&(m.key=o.https.key),o.https.passphrase&&(m.passphrase=o.https.passphrase),o.https.pfx&&(m.pfx=o.https.pfx));try{let I=await d(g,m);ce.default.undefined(I)&&(I=h(g,m)),o.request=c,o.timeout=u,o.agent=l,o.https&&("rejectUnauthorized"in o.https&&delete m.rejectUnauthorized,o.https.checkServerIdentity&&delete m.checkServerIdentity,o.https.certificateAuthority&&delete m.ca,o.https.certificate&&delete m.cert,o.https.key&&delete m.key,o.https.passphrase&&delete m.passphrase,o.https.pfx&&delete m.pfx),bSe(I)?this._onRequest(I):this.writable?(this.once("finish",()=>{this._onResponse(I)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(I)}catch(I){throw I instanceof o8.CacheError?new jk(I,this):new _r(I.message,I,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new _r(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[_u])return;let{options:r}=this,i=this.retryCount+1;this[_u]=!0,e instanceof _r||(e=new _r(e.message,e,this));let n=e,{response:s}=n;(async()=>{if(s&&!s.body){s.setEncoding(this._readableState.encoding);try{s.rawBody=await ESe.default(s),s.body=s.rawBody.toString()}catch(o){}}if(this.listenerCount("retry")!==0){let o;try{let a;s&&"retry-after"in s.headers&&(a=Number(s.headers["retry-after"]),Number.isNaN(a)?(a=Date.parse(s.headers["retry-after"])-Date.now(),a<=0&&(a=1)):a*=1e3),o=await r.retry.calculateDelay({attemptCount:i,retryOptions:r.retry,error:n,retryAfter:a,computedValue:wSe.default({attemptCount:i,retryOptions:r.retry,error:n,retryAfter:a,computedValue:0})})}catch(a){this._error(new _r(a.message,a,this));return}if(o){let a=async()=>{try{for(let l of this.options.hooks.beforeRetry)await l(this.options,n,i)}catch(l){this._error(new _r(l.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",i,e))};this[p8]=setTimeout(a,o);return}}this._error(n)})()}_read(){this[Gy]=!0;let e=this[Uy];if(e&&!this[_u]){e.readableLength&&(this[Gy]=!1);let r;for(;(r=e.read())!==null;){this[Wu]+=r.length,this[f8]=!0;let i=this.downloadProgress;i.percent<1&&this.emit("downloadProgress",i),this.push(r)}}}_write(e,r,i){let n=()=>{this._writeRequest(e,r,i)};this.requestInitialized?n():this[bp].push(n)}_writeRequest(e,r,i){this[Ei].destroyed||(this._progressCallbacks.push(()=>{this[Vu]+=Buffer.byteLength(e,r);let n=this.uploadProgress;n.percent<1&&this.emit("uploadProgress",n)}),this[Ei].write(e,r,n=>{!n&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),i(n)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(Ei in this)){e();return}if(this[Ei].destroyed){e();return}this[Ei].end(i=>{i||(this[zu]=this[Vu],this.emit("uploadProgress",this.uploadProgress),this[Ei].emit("upload-complete")),e(i)})};this.requestInitialized?r():this[bp].push(r)}_destroy(e,r){var i;this[_u]=!0,clearTimeout(this[p8]),Ei in this&&(this[Ok](),((i=this[Uy])===null||i===void 0?void 0:i.complete)||this[Ei].destroy()),e!==null&&!ce.default.undefined(e)&&!(e instanceof _r)&&(e=new _r(e.message,e,this)),r(e)}get _isAboutToError(){return this[_u]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,i;return((r=(e=this[Ei])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!((i=this[h8])===null||i===void 0?void 0:i.complete)}get socket(){var e,r;return(r=(e=this[Ei])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[Ju]?e=this[Wu]/this[Ju]:this[Ju]===this[Wu]?e=1:e=0,{percent:e,transferred:this[Wu],total:this[Ju]}}get uploadProgress(){let e;return this[zu]?e=this[Vu]/this[zu]:this[zu]===this[Vu]?e=1:e=0,{percent:e,transferred:this[Vu],total:this[zu]}}get timings(){var e;return(e=this[Ei])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[g8]}pipe(e,r){if(this[f8])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof Tk.ServerResponse&&this[Hy].add(e),super.pipe(e,r)}unpipe(e){return e instanceof Tk.ServerResponse&&this[Hy].delete(e),super.unpipe(e),this}};Rt.default=Uk});var Sp=E(Ms=>{"use strict";var PSe=Ms&&Ms.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),DSe=Ms&&Ms.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&PSe(e,t,r)};Object.defineProperty(Ms,"__esModule",{value:!0});Ms.CancelError=Ms.ParseError=void 0;var d8=vp(),C8=class extends d8.RequestError{constructor(e,r){let{options:i}=r.request;super(`${e.message} in "${i.url.toString()}"`,e,r.request);this.name="ParseError"}};Ms.ParseError=C8;var m8=class extends d8.RequestError{constructor(e){super("Promise was canceled",{},e);this.name="CancelError"}get isCanceled(){return!0}};Ms.CancelError=m8;DSe(vp(),Ms)});var I8=E(Wk=>{"use strict";Object.defineProperty(Wk,"__esModule",{value:!0});var E8=Sp(),RSe=(t,e,r,i)=>{let{rawBody:n}=t;try{if(e==="text")return n.toString(i);if(e==="json")return n.length===0?"":r(n.toString());if(e==="buffer")return n;throw new E8.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(s){throw new E8.ParseError(s,t)}};Wk.default=RSe});var zk=E(EA=>{"use strict";var FSe=EA&&EA.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),NSe=EA&&EA.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&FSe(e,t,r)};Object.defineProperty(EA,"__esModule",{value:!0});var LSe=require("events"),TSe=Ca(),MSe=g3(),Yy=Sp(),y8=I8(),w8=vp(),OSe=bk(),KSe=Rk(),B8=Fk(),USe=["request","response","redirect","uploadProgress","downloadProgress"];function Q8(t){let e,r,i=new LSe.EventEmitter,n=new MSe((o,a,l)=>{let c=u=>{let g=new w8.default(void 0,t);g.retryCount=u,g._noPipe=!0,l(()=>g.destroy()),l.shouldReject=!1,l(()=>a(new Yy.CancelError(g))),e=g,g.once("response",async p=>{var d;if(p.retryCount=u,p.request.aborted)return;let m;try{m=await KSe.default(g),p.rawBody=m}catch(R){return}if(g._isAboutToError)return;let I=((d=p.headers["content-encoding"])!==null&&d!==void 0?d:"").toLowerCase(),B=["gzip","deflate","br"].includes(I),{options:b}=g;if(B&&!b.decompress)p.body=m;else try{p.body=y8.default(p,b.responseType,b.parseJson,b.encoding)}catch(R){if(p.body=m.toString(),B8.isResponseOk(p)){g._beforeError(R);return}}try{for(let[R,H]of b.hooks.afterResponse.entries())p=await H(p,async L=>{let K=w8.default.normalizeArguments(void 0,_(P({},L),{retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1}),b);K.hooks.afterResponse=K.hooks.afterResponse.slice(0,R);for(let ne of K.hooks.beforeRetry)await ne(K);let J=Q8(K);return l(()=>{J.catch(()=>{}),J.cancel()}),J})}catch(R){g._beforeError(new Yy.RequestError(R.message,R,g));return}if(!B8.isResponseOk(p)){g._beforeError(new Yy.HTTPError(p));return}r=p,o(g.options.resolveBodyOnly?p.body:p)});let f=p=>{if(n.isCanceled)return;let{options:d}=g;if(p instanceof Yy.HTTPError&&!d.throwHttpErrors){let{response:m}=p;o(g.options.resolveBodyOnly?m.body:m);return}a(p)};g.once("error",f);let h=g.options.body;g.once("retry",(p,d)=>{var m,I;if(h===((m=d.request)===null||m===void 0?void 0:m.options.body)&&TSe.default.nodeStream((I=d.request)===null||I===void 0?void 0:I.options.body)){f(d);return}c(p)}),OSe.default(g,i,USe)};c(0)});n.on=(o,a)=>(i.on(o,a),n);let s=o=>{let a=(async()=>{await n;let{options:l}=r.request;return y8.default(r,o,l.parseJson,l.encoding)})();return Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)),a};return n.json=()=>{let{headers:o}=e.options;return!e.writableFinished&&o.accept===void 0&&(o.accept="application/json"),s("json")},n.buffer=()=>s("buffer"),n.text=()=>s("text"),n}EA.default=Q8;NSe(Sp(),EA)});var b8=E(Vk=>{"use strict";Object.defineProperty(Vk,"__esModule",{value:!0});var HSe=Sp();function GSe(t,...e){let r=(async()=>{if(t instanceof HSe.RequestError)try{for(let n of e)if(n)for(let s of n)t=await s(t)}catch(n){t=n}throw t})(),i=()=>r;return r.json=i,r.text=i,r.buffer=i,r.on=i,r}Vk.default=GSe});var x8=E(_k=>{"use strict";Object.defineProperty(_k,"__esModule",{value:!0});var v8=Ca();function S8(t){for(let e of Object.values(t))(v8.default.plainObject(e)||v8.default.array(e))&&S8(e);return Object.freeze(t)}_k.default=S8});var P8=E(k8=>{"use strict";Object.defineProperty(k8,"__esModule",{value:!0})});var Xk=E(ss=>{"use strict";var jSe=ss&&ss.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),YSe=ss&&ss.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&jSe(e,t,r)};Object.defineProperty(ss,"__esModule",{value:!0});ss.defaultHandler=void 0;var D8=Ca(),os=zk(),qSe=b8(),qy=vp(),JSe=x8(),WSe={RequestError:os.RequestError,CacheError:os.CacheError,ReadError:os.ReadError,HTTPError:os.HTTPError,MaxRedirectsError:os.MaxRedirectsError,TimeoutError:os.TimeoutError,ParseError:os.ParseError,CancelError:os.CancelError,UnsupportedProtocolError:os.UnsupportedProtocolError,UploadError:os.UploadError},zSe=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:Jy}=qy.default,R8=(...t)=>{let e;for(let r of t)e=Jy(void 0,r,e);return e},VSe=t=>t.isStream?new qy.default(void 0,t):os.default(t),_Se=t=>"defaults"in t&&"options"in t.defaults,XSe=["get","post","put","patch","head","delete"];ss.defaultHandler=(t,e)=>e(t);var F8=(t,e)=>{if(t)for(let r of t)r(e)},N8=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(i=>(n,s)=>{let o,a=i(n,l=>(o=s(l),o));if(a!==o&&!n.isStream&&o){let l=a,{then:c,catch:u,finally:g}=l;Object.setPrototypeOf(l,Object.getPrototypeOf(o)),Object.defineProperties(l,Object.getOwnPropertyDescriptors(o)),l.then=c,l.catch=u,l.finally=g}return a});let e=(i,n={},s)=>{var o,a;let l=0,c=u=>t.handlers[l++](u,l===t.handlers.length?VSe:c);if(D8.default.plainObject(i)){let u=P(P({},i),n);qy.setNonEnumerableProperties([i,n],u),n=u,i=void 0}try{let u;try{F8(t.options.hooks.init,n),F8((o=n.hooks)===null||o===void 0?void 0:o.init,n)}catch(f){u=f}let g=Jy(i,n,s!=null?s:t.options);if(g[qy.kIsNormalizedAlready]=!0,u)throw new os.RequestError(u.message,u,g);return c(g)}catch(u){if(n.isStream)throw u;return qSe.default(u,t.options.hooks.beforeError,(a=n.hooks)===null||a===void 0?void 0:a.beforeError)}};e.extend=(...i)=>{let n=[t.options],s=[...t._rawHandlers],o;for(let a of i)_Se(a)?(n.push(a.defaults.options),s.push(...a.defaults._rawHandlers),o=a.defaults.mutableDefaults):(n.push(a),"handlers"in a&&s.push(...a.handlers),o=a.mutableDefaults);return s=s.filter(a=>a!==ss.defaultHandler),s.length===0&&s.push(ss.defaultHandler),N8({options:R8(...n),handlers:s,mutableDefaults:Boolean(o)})};let r=async function*(i,n){let s=Jy(i,n,t.options);s.resolveBodyOnly=!1;let o=s.pagination;if(!D8.default.object(o))throw new TypeError("`options.pagination` must be implemented");let a=[],{countLimit:l}=o,c=0;for(;c{let s=[];for await(let o of r(i,n))s.push(o);return s},e.paginate.each=r,e.stream=(i,n)=>e(i,_(P({},n),{isStream:!0}));for(let i of XSe)e[i]=(n,s)=>e(n,_(P({},s),{method:i})),e.stream[i]=(n,s)=>e(n,_(P({},s),{method:i,isStream:!0}));return Object.assign(e,WSe),Object.defineProperty(e,"defaults",{value:t.mutableDefaults?t:JSe.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=R8,e};ss.default=N8;YSe(P8(),ss)});var zy=E((Ea,Wy)=>{"use strict";var ZSe=Ea&&Ea.__createBinding||(Object.create?function(t,e,r,i){i===void 0&&(i=r),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,i){i===void 0&&(i=r),t[i]=e[r]}),L8=Ea&&Ea.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ZSe(e,t,r)};Object.defineProperty(Ea,"__esModule",{value:!0});var $Se=require("url"),T8=Xk(),exe={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 i of e){let n=i.split(";");if(n[1].includes("next")){r=n[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new $Se.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:Infinity,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[T8.defaultHandler],mutableDefaults:!1},Zk=T8.default(exe);Ea.default=Zk;Wy.exports=Zk;Wy.exports.default=Zk;Wy.exports.__esModule=!0;L8(Xk(),Ea);L8(zk(),Ea)});var U8=E(Xu=>{"use strict";var fst=require("net"),txe=require("tls"),$k=require("http"),M8=require("https"),rxe=require("events"),hst=require("assert"),ixe=require("util");Xu.httpOverHttp=nxe;Xu.httpsOverHttp=sxe;Xu.httpOverHttps=oxe;Xu.httpsOverHttps=axe;function nxe(t){var e=new Ia(t);return e.request=$k.request,e}function sxe(t){var e=new Ia(t);return e.request=$k.request,e.createSocket=O8,e.defaultPort=443,e}function oxe(t){var e=new Ia(t);return e.request=M8.request,e}function axe(t){var e=new Ia(t);return e.request=M8.request,e.createSocket=O8,e.defaultPort=443,e}function Ia(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||$k.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(i,n,s,o){for(var a=K8(n,s,o),l=0,c=e.requests.length;l=this.maxSockets){s.requests.push(o);return}s.createSocket(o,function(a){a.on("free",l),a.on("close",c),a.on("agentRemove",c),e.onSocket(a);function l(){s.emit("free",a,o)}function c(u){s.removeSocket(a),a.removeListener("free",l),a.removeListener("close",c),a.removeListener("agentRemove",c)}})};Ia.prototype.createSocket=function(e,r){var i=this,n={};i.sockets.push(n);var s=eP({},i.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(s.localAddress=e.localAddress),s.proxyAuth&&(s.headers=s.headers||{},s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")),IA("making CONNECT request");var o=i.request(s);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",l),o.once("connect",c),o.once("error",u),o.end();function a(g){g.upgrade=!0}function l(g,f,h){process.nextTick(function(){c(g,f,h)})}function c(g,f,h){if(o.removeAllListeners(),f.removeAllListeners(),g.statusCode!==200){IA("tunneling socket could not be established, statusCode=%d",g.statusCode),f.destroy();var p=new Error("tunneling socket could not be established, statusCode="+g.statusCode);p.code="ECONNRESET",e.request.emit("error",p),i.removeSocket(n);return}if(h.length>0){IA("got illegal response body from proxy"),f.destroy();var p=new Error("got illegal response body from proxy");p.code="ECONNRESET",e.request.emit("error",p),i.removeSocket(n);return}return IA("tunneling connection has established"),i.sockets[i.sockets.indexOf(n)]=f,r(f)}function u(g){o.removeAllListeners(),IA(`tunneling socket could not be established, cause=%s -`,g.message,g.stack);var f=new Error("tunneling socket could not be established, cause="+g.message);f.code="ECONNRESET",e.request.emit("error",f),i.removeSocket(n)}};Ia.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var i=this.requests.shift();i&&this.createSocket(i,function(n){i.request.onSocket(n)})}};function O8(t,e){var r=this;Ia.prototype.createSocket.call(r,t,function(i){var n=t.request.getHeader("host"),s=eP({},r.options,{socket:i,servername:n?n.replace(/:.*$/,""):t.host}),o=txe.connect(0,s);r.sockets[r.sockets.indexOf(i)]=o,e(o)})}function K8(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function eP(t){for(var e=1,r=arguments.length;e{H8.exports=U8()});var b4=E((xot,sP)=>{var e4=Object.assign({},require("fs")),oe=typeof oe!="undefined"?oe:{},kp={},wA;for(wA in oe)oe.hasOwnProperty(wA)&&(kp[wA]=oe[wA]);var oP=[],t4="./this.program",r4=function(t,e){throw e},i4=!1,Wl=!0,Pp="";function dxe(t){return oe.locateFile?oe.locateFile(t,Pp):Pp+t}var Xy,aP,Zy,AP;Wl&&(i4?Pp=require("path").dirname(Pp)+"/":Pp=__dirname+"/",Xy=function(e,r){var i=s4(e);return i?r?i:i.toString():(Zy||(Zy=e4),AP||(AP=require("path")),e=AP.normalize(e),Zy.readFileSync(e,r?null:"utf8"))},aP=function(e){var r=Xy(e,!0);return r.buffer||(r=new Uint8Array(r)),n4(r.buffer),r},process.argv.length>1&&(t4=process.argv[1].replace(/\\/g,"/")),oP=process.argv.slice(2),typeof sP!="undefined"&&(sP.exports=oe),r4=function(t){process.exit(t)},oe.inspect=function(){return"[Emscripten Module object]"});var $y=oe.print||console.log.bind(console),Di=oe.printErr||console.warn.bind(console);for(wA in kp)kp.hasOwnProperty(wA)&&(oe[wA]=kp[wA]);kp=null;oe.arguments&&(oP=oe.arguments);oe.thisProgram&&(t4=oe.thisProgram);oe.quit&&(r4=oe.quit);var Cxe=16;function mxe(t,e){return e||(e=Cxe),Math.ceil(t/e)*e}var Exe=0,Ixe=function(t){Exe=t},lP;oe.wasmBinary&&(lP=oe.wasmBinary);var Pst=oe.noExitRuntime||!0;typeof WebAssembly!="object"&&Gr("no native wasm support detected");function yxe(t,e,r){switch(e=e||"i8",e.charAt(e.length-1)==="*"&&(e="i32"),e){case"i1":return Zi[t>>0];case"i8":return Zi[t>>0];case"i16":return cP[t>>1];case"i32":return _e[t>>2];case"i64":return _e[t>>2];case"float":return o4[t>>2];case"double":return a4[t>>3];default:Gr("invalid type for getValue: "+e)}return null}var ew,A4=!1,wxe;function n4(t,e){t||Gr("Assertion failed: "+e)}function l4(t){var e=oe["_"+t];return n4(e,"Cannot call unknown function "+t+", make sure it is exported"),e}function vxe(t,e,r,i,n){var s={string:function(h){var p=0;if(h!=null&&h!==0){var d=(h.length<<2)+1;p=g4(d),u4(h,p,d)}return p},array:function(h){var p=g4(h.length);return Bxe(h,p),p}};function o(h){return e==="string"?c4(h):e==="boolean"?Boolean(h):h}var a=l4(t),l=[],c=0;if(i)for(var u=0;u=i);)++n;if(n-e>16&&t.subarray&&f4)return f4.decode(t.subarray(e,n));for(var s="";e>10,56320|c&1023)}}return s}function c4(t,e){return t?Zu($u,t,e):""}function tw(t,e,r,i){if(!(i>0))return 0;for(var n=r,s=r+i-1,o=0;o=55296&&a<=57343){var l=t.charCodeAt(++o);a=65536+((a&1023)<<10)|l&1023}if(a<=127){if(r>=s)break;e[r++]=a}else if(a<=2047){if(r+1>=s)break;e[r++]=192|a>>6,e[r++]=128|a&63}else if(a<=65535){if(r+2>=s)break;e[r++]=224|a>>12,e[r++]=128|a>>6&63,e[r++]=128|a&63}else{if(r+3>=s)break;e[r++]=240|a>>18,e[r++]=128|a>>12&63,e[r++]=128|a>>6&63,e[r++]=128|a&63}}return e[r]=0,r-n}function u4(t,e,r){return tw(t,$u,e,r)}function rw(t){for(var e=0,r=0;r=55296&&i<=57343&&(i=65536+((i&1023)<<10)|t.charCodeAt(++r)&1023),i<=127?++e:i<=2047?e+=2:i<=65535?e+=3:e+=4}return e}function uP(t){var e=rw(t)+1,r=h4(e);return r&&tw(t,Zi,r,e),r}function Bxe(t,e){Zi.set(t,e)}function xxe(t,e){return t%e>0&&(t+=e-t%e),t}var gP,Zi,$u,cP,kxe,_e,Pxe,o4,a4;function p4(t){gP=t,oe.HEAP8=Zi=new Int8Array(t),oe.HEAP16=cP=new Int16Array(t),oe.HEAP32=_e=new Int32Array(t),oe.HEAPU8=$u=new Uint8Array(t),oe.HEAPU16=kxe=new Uint16Array(t),oe.HEAPU32=Pxe=new Uint32Array(t),oe.HEAPF32=o4=new Float32Array(t),oe.HEAPF64=a4=new Float64Array(t)}var Dst=oe.INITIAL_MEMORY||16777216,fP,d4=[],C4=[],m4=[],Dxe=!1;function Fxe(){if(oe.preRun)for(typeof oe.preRun=="function"&&(oe.preRun=[oe.preRun]);oe.preRun.length;)Rxe(oe.preRun.shift());hP(d4)}function Nxe(){Dxe=!0,!oe.noFSInit&&!y.init.initialized&&y.init(),BA.init(),hP(C4)}function Txe(){if(oe.postRun)for(typeof oe.postRun=="function"&&(oe.postRun=[oe.postRun]);oe.postRun.length;)Lxe(oe.postRun.shift());hP(m4)}function Rxe(t){d4.unshift(t)}function Mxe(t){C4.unshift(t)}function Lxe(t){m4.unshift(t)}var zl=0,pP=null,Dp=null;function Oxe(t){return t}function E4(t){zl++,oe.monitorRunDependencies&&oe.monitorRunDependencies(zl)}function dP(t){if(zl--,oe.monitorRunDependencies&&oe.monitorRunDependencies(zl),zl==0&&(pP!==null&&(clearInterval(pP),pP=null),Dp)){var e=Dp;Dp=null,e()}}oe.preloadedImages={};oe.preloadedAudios={};function Gr(t){oe.onAbort&&oe.onAbort(t),t+="",Di(t),A4=!0,wxe=1,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(t);throw e}var I4="data:application/octet-stream;base64,";function y4(t){return t.startsWith(I4)}var Rp="data:application/octet-stream;base64,AGFzbQEAAAABlAInYAF/AX9gA39/fwF/YAF/AGACf38Bf2ACf38AYAV/f39/fwF/YAR/f39/AX9gA39/fwBgBH9+f38Bf2AAAX9gBX9/f35/AX5gA39+fwF/YAF/AX5gAn9+AX9gBH9/fn8BfmADf35/AX5gA39/fgF/YAR/f35/AX9gBn9/f39/fwF/YAR/f39/AGADf39+AX5gAn5/AX9gA398fwBgBH9/f38BfmADf39/AX5gBn98f39/fwF/YAV/f35/fwF/YAV/fn9/fwF/YAV/f39/fwBgAn9+AGACf38BfmACf3wAYAh/fn5/f39+fwF/YAV/f39+fwBgAABgBX5+f35/AX5gAnx/AXxgAn9+AX5gBX9/f39/AX4CeRQBYQFhAAIBYQFiAAABYQFjAAMBYQFkAAYBYQFlAAEBYQFmAAABYQFnAAYBYQFoAAABYQFpAAMBYQFqAAMBYQFrAAMBYQFsAAMBYQFtAAABYQFuAAUBYQFvAAEBYQFwAAMBYQFxAAEBYQFyAAABYQFzAAEBYQF0AAADggKAAgcCAgQAAQECAgANBAQOBwICAhwLEw0AAA0dFAwMAAcCDBAeAgMCAwIAAgEABwgUBBUIBgADAAwABAgIAgEGBgABAB8XAQEDAhMCAwUFEQICIA8GAgMYAQgCAQAABwUBGAAaAxIBAAcEAyERCCIHAQsVAQMABQMDAwAFBAACIwYAAQEAGw0bFw0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QCADQQN2IgBBA3RB4JsBaiECAn9BuJsBKAIAIgFBASAAdCIAcUUEQEG4mwEgACABcjYCACACDAELIAIoAggLIQAgAiAGNgIIIAAgBjYCDCAGIAI2AgwgBiAANgIIDAELQR8hACADQf///wdNBEAgA0EIdiIAIABBgP4/akEQdkEIcSICdCIAIABBgOAfakEQdkEEcSIBdCIAIABBgIAPakEQdkECcSIAdEEPdiABIAJyIAByayIAQQF0IAMgAEEVanZBAXFyQRxqIQALIAYgADYCHCAGQgA3AhAgAEECdEHonQFqIQICQAJAIAlBASAAdCIBcUUEQEG8mwEgASAJcjYCACACIAY2AgAgBiACNgIYDAELIANBAEEZIABBAXZrIABBH0YbdCEAIAIoAgAhCANAIAgiASgCBEF4cSADRg0CIABBHXYhAiAAQQF0IQAgASACQQRxaiICKAIQIggNAAsgAiAGNgIQIAYgATYCGAsgBiAGNgIMIAYgBjYCCAwBCyABKAIIIgAgBjYCDCABIAY2AgggBkEANgIYIAYgATYCDCAGIAA2AggLIARBCGohAAwBCwJAIAtFDQACQCABKAIcIgJBAnRB6J0BaiIAKAIAIAFGBEAgACAENgIAIAQNAUG8mwEgBkF+IAJ3cTYCAAwCCyALQRBBFCALKAIQIAFGG2ogBDYCACAERQ0BCyAEIAs2AhggASgCECIABEAgBCAANgIQIAAgBDYCGAsgASgCFCIARQ0AIAQgADYCFCAAIAQ2AhgLAkAgA0EPTQRAIAEgAyAIaiIAQQNyNgIEIAAgAWoiACAAKAIEQQFyNgIEDAELIAEgCEEDcjYCBCAJIANBAXI2AgQgAyAJaiADNgIAIAoEQCAKQQN2IgBBA3RB4JsBaiEEQcybASgCACECAn9BASAAdCIAIAVxRQRAQbibASAAIAVyNgIAIAQMAQsgBCgCCAshACAEIAI2AgggACACNgIMIAIgBDYCDCACIAA2AggLQcybASAJNgIAQcCbASADNgIACyABQQhqIQALIAxBEGokACAAC4MEAQN/IAJBgARPBEAgACABIAIQEhogAA8LIAAgAmohAwJAIAAgAXNBA3FFBEACQCAAQQN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0akEIdGo2AgwLIAEoAgwhACABQRBqJAAgAAt/AQN/IAAhAQJAIABBA3EEQANAIAEtAABFDQIgAUEBaiIBQQNxDQALCwNAIAEiAkEEaiEBIAIoAgAiA0F/cyADQYGChAhrcUGAgYKEeHFFDQALIANB/wFxRQRAIAIgAGsPCwNAIAItAAEhAyACQQFqIgEhAiADDQALCyABIABrC2EBAX8jAEEQayICIAA2AgggAiABNwMAAkAgAikDACACKAIIKQMIVgRAIAIoAghBADoAACACQX82AgwMAQsgAigCCEEBOgAAIAIoAgggAikDADcDECACQQA2AgwLIAIoAgwL7wEBAX8jAEEgayICJAAgAiAANgIYIAIgATcDECACIAIoAhhCCBAeNgIMAkAgAigCDEUEQCACQX82AhwMAQsgAigCDCACKQMQQv8BgzwAACACKAIMIAIpAxBCCIhC/wGDPAABIAIoAgwgAikDEEIQiEL/AYM8AAIgAigCDCACKQMQQhiIQv8BgzwAAyACKAIMIAIpAxBCIIhC/wGDPAAEIAIoAgwgAikDEEIoiEL/AYM8AAUgAigCDCACKQMQQjCIQv8BgzwABiACKAIMIAIpAxBCOIhC/wGDPAAHIAJBADYCHAsgAigCHBogAkEgaiQAC4cDAQF/IwBBMGsiAyQAIAMgADYCJCADIAE2AiAgAyACNwMYAkAgAygCJC0AKEEBcQRAIANCfzcDKAwBCwJAAkAgAygCJCgCIEUNACADKQMYQv///////////wBWDQAgAykDGFANASADKAIgDQELIAMoAiRBDGpBEkEAEBQgA0J/NwMoDAELIAMoAiQtADVBAXEEQCADQn83AygMAQsCfyMAQRBrIgAgAygCJDYCDCAAKAIMLQA0QQFxCwRAIANCADcDKAwBCyADKQMYUARAIANCADcDKAwBCyADQgA3AxADQCADKQMQIAMpAxhUBEAgAyADKAIkIAMoAiAgAykDEKdqIAMpAxggAykDEH1BARAhIgI3AwggAkIAUwRAIAMoAiRBAToANSADKQMQUARAIANCfzcDKAwECyADIAMpAxA3AygMAwsgAykDCFAEQCADKAIkQQE6ADQFIAMgAykDCCADKQMQfDcDEA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QAaIAMoAqQBLwFSQYMCRgtBAXE6AIUBIAMtAIcBQQFxBEAgAyADQSBqQhwQKTYCHCADKAIcRQRAIAMoAqgBQQhqQQ5BABAUIAMoApABECMgA0F/NgKsAQwCCwJAIAMoAqABQYACcQRAAkAgAygCoAFBgAhxDQAgAygCpAEpAyBC/////w9WDQAgAygCpAEpAyhC/////w9YDQILIAMoAhwgAygCpAEpAygQLSADKAIcIAMoAqQBKQMgEC0MAQsCQAJAIAMoAqABQYAIcQ0AIAMoAqQBKQMgQv////8PVg0AIAMoAqQBKQMoQv////8PVg0AIAMoAqQBKQNIQv////8PWA0BCyADKAKkASkDKEL/////D1oEQCADKAIcIAMoAqQBKQMoEC0LIAMoAqQBKQMgQv////8PWgRAIAMoAhwgAygCpAEpAyAQLQsgAygCpAEpA0hC/////w9aBEAgAygCHCADKAKkASkDSBAtCwsLAn8jAEEQayIAIAMoAhw2AgwgACgCDC0AAEEBcUULBEAgAygCqAFBCGpBFEEAEBQgAygCHBAWIAMoApABECMgA0F/NgKsAQwCCyADQQECfyMAQRBrIgAgAygCHDYCDAJ+IAAoAgwtAABBAXEEQCAAKAIMKQMQDAELQgALp0H//wNxCyADQSBqQYAGEFE2AowBIAMoAhwQFiADKAKMASADKAKQATYCACADIAMoAowBNgKQAQsgAy0AhQFBAXEEQCADIANBFWpCBxApNgIQIAMoAhBFBEAgAygCqAFBCGpBDkEAEBQgAygCkAEQIyADQX82AqwBDAILIAMoAhBBAhAfIAMoAhBBvRJBAhBAIAMoAhAgAygCpAEvAVJB/wFxEI4BIAMoAhAgAygCpAEoAhBB//8DcRAfAn8jAEEQayIAIAMoAhA2AgwgACgCDC0AAEEBcUULBEAgAygCqAFBCGpBFEEAEBQgAygCEBAWIAMoApABECMgA0F/NgKsAQwCCyADQYGyAkEHIANBFWpBgAYQUTYCDCADKAIQEBYgAygCDCADKAKQATYCACADIAMoAgw2ApABCyADIANB0ABqQi4QKSIANgJMIABFBEAgAygCqAFBCGpBDkEAEBQgAygC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//8DcSAAKAIcajYCHCAAIAAoAhRBAWo2AhQMAQsLIAAoAggQR0EBcUUEQCAAKAIgQRRBABAUIAAoAggQFiAAQX82AiwMAQsgACgCCBAWIAAgACgCHDYCLAsgACgCLCECIABBMGokACADIAIiADYCBCAAQQBIBEAgA0IANwMoDAELIAMpAwggAygCBK18Qv///////////wBWBEAgAygCFEEEQRYQFCADQgA3AygMAQsgAyADKQMIIAMoAgStfDcDKAsgAykDKCEBIANBMGokACABC20BAX8jAEEgayIEJAAgBCAANgIYIAQgATYCFCAEIAI2AhAgBCADNgIMAkAgBCgCGEUEQCAEQQA2AhwMAQsgBCAEKAIUIAQoAhAgBCgCDCAEKAIYQQhqEJIBNgIcCyAEKAIcIQAgBEEgaiQAIAALVQEBfyMAQRBrIgEkACABIAA2AgwCQAJAIAEoAgwoAiRBAUYNACABKAIMKAIkQQJGDQAMAQsgASgCDEEAQgBBChAhGiABKAIMQQA2AiQLIAFBEGokAAumAQEBfyMAQRBrIgIkACACIAA2AgggAiABNgIEAkAgAigCCC0AKEEBcQRAIAJBfzYCDAwBCyACKAIIKAIABEAgAigCCCgCACACKAIEEGhBAEgEQCACKAIIQQxqIAIoAggoAgAQFyACQX82AgwMAgsLIAIoAgggAkEEakIEQRMQIUIAUwRAIAJBfzYCDAwBCyACQQA2AgwLIAIoAgwhACACQRBqJAAgAAuNCAIBfwF+IwBBkAFrIgMkACADIAA2AoQBIAMgATYCgAEgAyACNgJ8IAMQTwJAIAMoAoABKQMIQgBSBEAgAyADKAKAASgCACgCACkDSDcDYCADIAMoAoABKAIAKAIAKQNINwNoDAELIANCADcDYCADQgA3A2gLIANCADcDcAJAA0AgAykDcCADKAKAASkDCFQEQCADKAKAASgCACADKQNwp0EEdGooAgApA0ggAykDaFQEQCADIAMoAoABKAIAIAMpA3CnQQR0aigCACkDSDcDaAsgAykDaCADKAKAASkDIFYEQCADKAJ8QRNBABAUIANCfzcDiAEMAwsgAyADKAKAASgCACADKQNwp0EEdGooAgApA0ggA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ai8BAEcNACADKAIQIAMoAhxB2Chqai0AACADKAIcQdwWaiADKAIMQQJ0aigCACADKAIcQdgoamotAABKDQAMAQsgAygCHEHcFmogAygCFEECdGogAygCHEHcFmogAygCDEECdGooAgA2AgAgAyADKAIMNgIUIAMgAygCDEEBdDYCDAwBCwsgAygCHEHcFmogAygCFEECdGogAygCEDYCAAvXEwEDfyMAQTBrIgIkACACIAA2AiwgAiABNgIoIAIgAigCKCgCADYCJCACIAIoAigoAggoAgA2AiAgAiACKAIoKAIIKAIMNgIcIAJBfzYCECACKAIsQQA2AtAoIAIoAixBvQQ2AtQoIAJBADYCGANAIAIoAhggAigCHEgEQAJAIAIoAiQgAigCGEECdGovAQAEQCACIAIoAhgiATYCECACKAIsQdwWaiEDIAIoAiwiBCgC0ChBAWohACAEIAA2AtAoIABBAnQgA2ogATYCACACKAIYIAIoAixB2ChqakEAOgAADAELIAIoAiQgAigCGEECdGpBADsBAgsgAiACKAIYQQFqNgIYDAELCwNAIAIoAiwoAtAoQQJIBEACQCACKAIQQQJIBEAgAiACKAIQQQFqIgA2AhAMAQtBACEACyACKAIsQdwWaiEDIAIoAiwiBCgC0ChBAWohASAEIAE2AtAoIAFBAnQgA2ogADYCACACIAA2AgwgAigCJCACKAIMQQJ0akEBOwEAIAIoAgwgAigCLEHYKGpqQQA6AAAgAigCLCIAIAAoAqgtQQFrNgKoLSACKAIgBEAgAigCLCIAIAAoAqwtIAIoAiAgAigCDEECdGovAQJrNgKsLQsMAQsLIAIoAiggAigCEDYCBCACIAIoAiwoAtAoQQJtNgIYA0AgAigCGEEBTgRAIAIoAiwgAigCJCACKAIYEHogAiACKAIYQQFrNgIYDAELCyACIAIoAhw2AgwDQCACIAIoAiwoAuAWNgIYIAIoAixB3BZqIQEgAigCLCIDKALQKCEAIAMgAEEBazYC0CggAigCLCAAQQJ0IAFqKAIANgLgFiACKAIsIAIoAiRBARB6IAIgAigCLCgC4BY2AhQgAigCGCEBIAIoAixB3BZqIQMgAigCLCIEKALUKEEBayEAIAQgADYC1CggAEECdCADaiABNgIAIAIoAhQhASACKAIsQdwWaiEDIAIoAiwiBCgC1ChBAWshACAEIAA2AtQoIABBAnQgA2ogATYCACACKAIkIAIoAgxBAnRqIAIoAiQgAigCGEECdGovAQAgAigCJCACKAIUQQJ0ai8BAGo7AQAgAigCDCACKAIsQdgoamoCfyACKAIYIAIoAixB2Chqai0AACACKAIUIAIoAixB2Chqai0AAE4EQCACKAIYIAIoAixB2Chqai0AAAwBCyACKAIUIAIoAixB2Chqai0AAAtBAWo6AAAgAigCJCACKAIUQQJ0aiACKAIMIgA7AQIgAigCJCACKAIYQQJ0aiAAOwECIAIgAigCDCIAQQFqNgIMIAIoAiwgADYC4BYgAigCLCACKAIkQQEQeiACKAIsKALQKEECTg0ACyACKAIsKALgFiEBIAIoAixB3BZqIQMgAigCLCIEKALUKEEBayEAIAQgADYC1CggAEECdCADaiABNgIAIAIoAighASMAQUBqIgAgAigCLDYCPCAAIAE2AjggACAAKAI4KAIANgI0IAAgACgCOCgCBDYCMCAAIAAoAjgoAggoAgA2AiwgACAAKAI4KAIIKAIENgIoIAAgACgCOCgCCCgCCDYCJCAAIAAoAjgoAggoAhA2AiAgAEEANgIEIABBADYCEANAIAAoAhBBD0wEQCAAKAI8QbwWaiAAKAIQQQF0akEAOwEAIAAgACgCEEEBajYCEAwBCwsgACgCNCAAKAI8QdwWaiAAKAI8KALUKEECdGooAgBBAnRqQQA7AQIgACAAKAI8KALUKEEBajYCHANAIAAoAhxBvQRIBEAgACAAKAI8QdwWaiAAKAIcQQJ0aigCADYCGCAAIAAoAjQgACgCNCAAKAIYQQJ0ai8BAkECdGovAQJBAWo2AhAgACgCECAAKAIgSgRAIAAgACgCIDYCECAAIAAoAgRBAWo2AgQLIAAoAjQgACgCGEECdGogACgCEDsBAiAAKAIYIAAoAjBMBEAgACgCPCAAKAIQQQF0akG8FmoiASABLwEAQQFqOwEAIABBADYCDCAAKAIYIAAoAiROBEAgACAAKAIoIAAoAh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CfyMAQRBrIgAgAygCBDYCDCAAKAIMKAIEC0GABhBRNgIAIAMoAgQQFiADIAMoAgA2AhwLIAMoAhwhACADQSBqJAAgAAu0AgEBfyMAQTBrIgMkACADIAA2AiggAyABNwMgIAMgAjYCHAJAIAMpAyBQBEAgA0EBOgAvDAELIAMgAygCKCkDECADKQMgfDcDCAJAIAMpAwggAykDIFoEQCADKQMIQv////8AWA0BCyADKAIcQQ5BABAUIANBADoALwwBCyADIAMoAigoAgAgAykDCKdBBHQQSCIANgIEIABFBEAgAygCHEEOQQAQFCADQQA6AC8MAQsgAygCKCADKAIENgIAIAMgAygCKCkDCDcDEANAIAMpAxAgAykDCFpFBEAgAygCKCgCACADKQMQp0EEdGoQkAEgAyADKQMQQgF8NwMQDAELCyADKAIoIAMpAwgiATcDECADKAIoIAE3AwggA0EBOgAvCyADLQAvQQFxIQAgA0EwaiQAIAALzAEBAX8jAEEgayICJAAgAiAANwMQIAIgATYCDCACQTAQGCIBNgIIAkAgAUUEQCACKAIMQQ5BABAUIAJBADYCHAwBCyACKAIIQQA2AgAgAigCCEIANwMQIAIoAghCADcDCCACKAIIQgA3AyAgAigCCEIANwMYIAIoAghBADYCKCACKAIIQQA6ACwgAigCCCACKQMQIAIoAgwQgwFBAXFFBEAgAigCCBAkIAJBADYCHAwBCyACIAIoAgg2AhwLIAIoAhwhASACQSBqJAAgAQvWAgEBfyMAQSBrIgMkACADIAA2AhggAyABNgIUIAMgAjYCECADIANBDGpCBBApNgIIAkAgAygCCEUEQCADQX82AhwMAQsDQCADKAIUBEAgAygCFCgCBCADKAIQcUGABnEEQCADKAIIQgAQLBogAygCCCADKAIULwEIEB8gAygCCCADKAIULwEKEB8CfyMAQRBrIgAgAygCCDYCDCAAKAIMLQAAQQFxRQsEQCADKAIYQQhqQRRBABAUIAMoAggQFiADQX82AhwMBAsgAygCGCADQQxqQgQQNUEASARAIAMoAggQFiADQX82AhwMBAsgAygCFC8BCgRAIAMoAhggAygCFCgCDCADKAIULwEKr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MIAEoAgwoAgQgACkDMKdqQRRrKAAAQdCWmThHDQAgACgCZCAAKQMwQhR9ECwaIAAoAmgoAgAhBSAAKAJkIQYgACkDWCEJIAAoAmgoAhQhByAAKAJUIQgjAEGwAWsiASQAIAEgBTYCqAEgASAGNgKkASABIAk3A5gBIAEgBzYClAEgASAINgKQASMAQRBrIgUgASgCpAE2AgwgAQJ+IAUoAgwtAABBAXEEQCAFKAIMKQMQDAELQgALNwMYIAEoAqQBQgQQHhogASABKAKkARAdQf//A3E2AhAgASABKAKkARAdQf//A3E2AgggASABKAKkARAwNwM4AkAgASkDOEL///////////8AVgRAIAEoApABQQRBFhAUIAFBADYCrAEMAQsgASkDOEI4fCABKQMYIAEpA5gBfFYEQCABKAKQAUEVQQAQFCABQQA2AqwBDAELAkACQCABKQM4IAEpA5gBVA0AIAEpAzhCOHwgASkDmAECfiMAQRBrIgUgASgCpAE2AgwgBSgCDCkDCAt8Vg0AIAEoAqQBIAEpAzggASkDmAF9ECwaIAFBADoAFwwBCyABKAKoASABKQM4QQAQJ0EASARAIAEoApABIAEoAqgBEBcgAUEANgKsAQwCCyABIAEoAqgBQjggAUFAayABKAKQARBBIgU2AqQBIAVFBEAgAUEANgKsAQwCCyABQQE6ABcLIAEoAqQBQgQQHigAAEHQlpkwRwRAIAEoApABQRVBABAUIAEtABdBAXEEQCABKAKkARAWCyABQQA2AqwBDAELIAEgASgCpAEQMDcDMAJAIAEoApQBQQRxRQ0AIAEpAzAgASkDOHxCDHwgASkDmAEgASkDGHxRDQAgASgCkAFBFUEAEBQgAS0AF0EBcQRAIAEoAqQBEBYLIAFBADYCrAEMAQsgASgCpAFCBBAeGiABIAEoAqQBECo2AgwgASABKAKkARAqNgIEIAEoAhBB//8DRgRAIAEgASgCDDYCEAsgASgCCEH//wNGBEAgASABKAIENgIICwJAIAEoApQBQQRxRQ0AIAEoAgggASgCBEYEQCABKAIQIAEoAgxGDQELIAEoApABQRVBABAUIAEtABdBAXEEQCABKAKkARAWCyABQQA2AqwBDAELAkAgASgCEEUEQCABKAIIRQ0BCyABKAKQAUEBQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABIAEoAqQBEDA3AyggASABKAKkARAwNwMgIAEpAyggASkDIFIEQCABKAKQAUEBQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABIAEoAqQBEDA3AzAgASABKAKkARAwNwOAAQJ/IwBBEGsiBSABKAKkATYCDCAFKAIMLQAAQQFxRQsEQCABKAKQAUEUQQAQFCABLQAXQQFxBEAgASgCpAEQFgsgAUEANgKsAQwBCyABLQAXQQFxBEAgASgCpAEQFgsCQCABKQOAAUL///////////8AWARAIAEpA4ABIAEpA4ABIAEpAzB8WA0BCyABKAKQAUEEQRYQFCABQQA2AqwBDAELIAEpA4ABIAEpAzB8IAEpA5gBIAEpAzh8VgRAIAEoApABQRVBABAUIAFBADYCrAEMAQsCQCABKAKUAUEEcUUNACABKQOAASABKQMwfCABKQOYASABKQM4fFENACABKAKQAUEVQQAQFCABQQA2AqwBDAELIAEpAyggASkDMEIugFYEQCABKAKQAUEVQQAQFCABQQA2AqwBDAELIAEgASkDKCABKAKQARCEASIFNgKMASAFRQRAIAFBADYCrAEMAQsgASgCjAFBAToALCABKAKMASABKQMwNwMYIAEoAowBIAEpA4ABNwMgIAEgASgCjAE2AqwBCyABKAKsASEFIAFBsAFqJAAgACAFNgJQDAELIAAoAmQgACkDMBAsGiAAKAJkIQUgACkDWCEJIAAoAmgoAhQhBiAAKAJUIQcjAEHQAGsiASQAIAEgBTYCSCABIAk3A0AgASAGNgI8IAEgBzYCOAJAIAEoAkgQL0IWVARAIAEoAjhBFUEAEBQgAUEANgJMDAELIwBBEGsiBSABKAJINgIMIAECfiAFKAIMLQAAQQFxBEAgBSgCDCkDEAwBC0IACzcDCCABKAJIQgQQHhogASgCSBAqBEAgASgCOEEBQQAQFCABQQA2AkwMAQsgASABKAJIEB1B//8Dca03AyggASABKAJIEB1B//8Dca03Ay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AiACKAI4KAI4IAIoAjgoAmxqQYICajYCDCACIAIoAiwgAigCIEEBa2otAAA6AAsgAiACKAIsIAIoAiBqLQAAOgAKIAIoAjgoAnggAigCOCgCjAFPBEAgAiACKAIwQQJ2NgIwCyACKAIcIAIoAjgoAnRLBEAgAiACKAI4KAJ0NgIcCwNAAkAgAiACKAI4KAI4IAIoAjRqNgIoAkAgAigCKCACKAIgai0AACACLQAKRw0AIAIoAiggAigCIEEBa2otAAAgAi0AC0cNACACKAIoLQAAIAIoAiwtAABHDQAgAiACKAIoIgBBAWo2AiggAC0AASACKAIsLQABRwRADAELIAIgAigCLEECajYCLCACIAIoAihBAWo2AigDQCACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AigCf0EAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AihBACAALQABIAFHDQAaIAIgAigCLCIAQQFqNgIsIAAtAAEhASACIAIoAigiAEEBajYCKEEAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACIAIoAiwiAEEBajYCLCAALQABIQEgAiACKAIoIgBBAWo2AihBACAALQABIAFHDQAaIAIgAigCLCIAQQFqNgIsIAAtAAEhASACIAIoAigiAEEBajYCKEEAIAAtAAEgAUcNABogAiACKAIsIgBBAWo2AiwgAC0AASEBIAIgAigCKCIAQQFqNgIoQQAgAC0AASABRw0AGiACKAIsIAIoAgxJC0EBcQ0ACyACQYICIAIoAgwgAigCLGtrNgIkIAIgAigCDEGCAms2AiwgAigCJCACKAIgSgRAIAIoAjggAigCNDYCcCACIAIoAiQ2AiAgAigCJCACKAIcTg0CIAIgAigCLCACKAIgQQFrai0AADoACyACIAIoAiwgAigCIGotAAA6AAoLCyACIAIoAhQgAigCNCACKAIQcUEBdGovAQAiATYCNEEAIQAgASACKAIYSwR/IAIgAigCMEEBayIANgIwIABBAEcFQQALQQFxDQELCwJAIAIoAiAgAigCOCgCdE0EQCACIAIoAiA2AjwMAQsgAiACKAI4KAJ0NgI8CyACKAI8C5IQAQF/IwBBMGsiAiQAIAIgADYCKCACIAE2AiQgAgJ/IAIoAigoAiwgAigCKCgCDEEFa0kEQCACKAIoKAIsDAELIAIoAigoAgxBBWsLNgIgIAJBADYCECACIAIoAigoAgAoAgQ2AgwDQAJAIAJB//8DNgIcIAIgAigCKCgCvC1BKmpBA3U2AhQgAigCKCgCACgCECACKAIUSQ0AIAIgAigCKCgCACgCECACKAIUazYCFCACIAIoAigoAmwgAigCKCgCXGs2AhggAigCHCACKAIYIAIoAigoAgAoAgRqSwRAIAIgAigCGCACKAIoKAIAKAIEajYCHAsgAigCHCACKAIUSwRAIAIgAigCFDYCHAsCQCACKAIcIAIoAiBPDQACQCACKAIcRQRAIAIoAiRBBEcNAQsgAigCJEUNACACKAIcIAIoAhggAigCKCgCACgCBGpGDQELDAELQQAhACACIAIoAiRBBEYEfyACKAIcIAIoAhggAigCKCgCACgCBGpGBUEAC0EBcTYCECACKAIoQQBBACACKAIQEFwgAigCKCgCCCACKAIoKAIUQQRraiACKAIcOgAAIAIoAigoAgggAigCKCgCFEEDa2ogAigCHEEIdjoAACACKAIoKAIIIAIoAigoAhRBAmtqIAIoAhxBf3M6AAAgAigCKCgCCCACKAIoKAIUQQFraiACKAIcQX9zQQh2OgAAIAIoAigoAgAQHCACKAIYBEAgAigCGCACKAIcSwRAIAIgAigCHDYCGAsgAigCKCgCACgCDCACKAIoKAI4IAIoAigoAlxqIAIoAhgQGRogAigCKCgCACIAIAIoAhggACgCDGo2AgwgAigCKCgCACIAIAAoAhAgAigCGGs2AhAgAigCKCgCACIAIAIoAhggACgCFGo2AhQgAigCKCIAIAIoAhggACgCXGo2AlwgAiACKAIcIAIoAhhrNgIcCyACKAIcBEAgAigCKCgCACACKAIoKAIAKAIMIA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UBEAgAigCKCgCACACKAIoKAI4IAIoAigoAmxqIAIoAhQQeBogAigCKCIAIAIoAhQgACgCbGo2AmwLIAIoAigoAsAtIAIoAigoAmxJBEAgAigCKCACKAIoKAJsNgLALQsgAiACKAIoKAK8LUEqakEDdTYCFCACIAIoAigoAgwgAigCFGtB//8DSwR/Qf//AwUgAigCKCgCDCACKAIUaws2AhQgAgJ/IAIoAhQgAigCKCgCLEsEQCACKAIoKAIsDAELIAIoAhQLNgIgIAIgAigCKCgCbCACKAIoKAJcazYCGAJAIAIoAhggAigCIEkEQCACKAIYRQRAIAIoAiRBBEcNAgsgAigCJEUNASACKAIoKAIAKAIEDQEgAigCGCACKAIUSw0BCyACAn8gAigCGCACKAIUSwRAIAIoAhQMAQsgAigCGAs2AhwgAgJ/QQAgAigCJEEERw0AGkEAIAIoAigoAgAoAgQNABogAigCHCACKAIYRgtBAXE2AhAgAigCKCACKAIoKAI4IAIoAigoAlxqIAIoAhwgAigCEBBcIAIoAigiACACKAIcIAAoAlxqNgJcIAIoAigoAgAQHAsgAkECQQAgAigCEBs2AiwLIAIoAiwhACACQTBqJAAgAAuyAgEBfyMAQRBrIgEkACABIAA2AggCQCABKAIIEHkEQCABQX42AgwMAQsgASABKAIIKAIcKAIENgIEIAEoAggoAhwoAggEQCABKAIIKAIoIAEoAggoAhwoAgggASgCCCgCJBEEAAsgASgCCCgCHCgCRARAIAEoAggoAiggASgCCCgCHCgCRCABKAIIKAIkEQQACyABKAIIKAIcKAJABEAgASgCCCgCKCABKAIIKAIcKAJAIAEoAggoAiQRBAALIAEoAggoAhwoAjgEQCABKAIIKAIoIAEoAggoAhwoAjggASgCCCgCJBEEAAsgASgCCCgCKCABKAIIKAIcIAEoAggoAiQRBAAgASgCCEEANgIcIAFBfUEAIAEoAgRB8QBGGzYCDAsgASgCDCEAIAFBEGokACAAC+sXAQJ/IwBB8ABrIgMgADYCbCADIAE2AmggAyACNgJkIANBfzYCXCADIAMoAmgvAQI2AlQgA0EANgJQIAN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IgIgBzQQNxDQAgAEEDcQRAA0AgASAALQAAIgI6AAAgAkUNAyABQQFqIQEgAEEBaiIAQQNxDQALCyAAKAIAIgJBf3MgAkGBgoQIa3FBgIGChHhxDQADQCABIAI2AgAgACgCBCECIAFBBGohASAAQQRqIQAgAkGBgoQIayACQX9zcUGAgYKEeHFFDQALCyABIAAtAAAiAjoAACACRQ0AA0AgASAALQABIgI6AAEgAUEBaiEBIABBAWohACACDQALCyADKAIMIAMoAhhqQS86AAAgAygCDCADKAIYQQFqakEAOgAACyADIAMoAiRBAEIAQQAQfiIANgIIIABFBEAgAygCDBAVIANCfzcDKAwBCyADIAMoAiQCfyADKAIMBEAgAygCDAwBCyADKAIgCyADKAIIIAMoAhwQmgE3AxAgAygCDBAVAkAgAykDEEIAUwRAIAMoAggQGwwBCyADKAIkIAMpAxBBAEEDQYCA/I8EEJkBQQBIBEAgAygCJCADKQMQEJgBGiADQn83AygMAgsLIAMgAykDEDcDKAsgAykDKCEEIANBMGokACAEQiCIpwsQACAEpwsRACAAIAGtIAKtQiCGhBCYAQt/AgF/AX4jAEEgayIDJAAgAyAANgIYIAMgATYCFCADIAI2AhAgAyADKAIYIAMoAhQgAygCEBBzIgQ3AwgCQCAEQgBTBEAgA0EANgIcDAELIAMgAygCGCADKQMIIAMoAhAgAygCGCgCHBCtATYCHAsgAygCHCEAIANBIGokACAAC8QBAQF/IwBBMGsiASQAIAEgADYCKCABQQA2AiQgAUIANwMYAkADQCABKQMYIAEoAigpAzBUBEAgASABKAIoIAEpAxhBACABQRdqIAFBEGoQlwE2AgwgASgCDEF/RgRAIAFBfzYCLAwDBQJAIAEtABdBA0cNACABKAIQQRB2QYDgA3FBgMACRw0AIAEgASgCJEEBajYCJAsgASABKQMYQgF8NwMYDAILAAsLIAEgASgCJDYCLAsgASgCLCEAIAFBMGokACAACxAAIwAgAGtBcHEiACQAIAALBgAgACQACwQAIwALggECAX8BfiMAQSBrIgQkACAEIAA2AhggBCABNgIUIAQgAjYCECAEIA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KAKoASgCADYCECABQSBqQY8SIAFBEGoQcCABQQA2AqQBIAEgAUEgajYCoAEMAQsgASABKAKoASgCAEECdEGAE2ooAgA2AqQBAkACQAJAAkAgASgCqAEoAgBBAnRBkBRqKAIAQQFrDgIAAQILIAEoAqgBKAIEIQJBkJkBKAIAIQRBACEAAkACQANAIAIgAEGgiAFqLQAARwRAQdcAIQMgAEEBaiIAQdcARw0BDAILCyAAIgMNAEGAiQEhAgwBC0GAiQEhAANAIAAtAAAhBSAAQQFqIgIhACAFDQAgAiEAIANBAWsiAw0ACwsgBCgCFBogASACNgKgAQwCCyMAQRBrIgAgASgCqAEoAgQ2AgwgAUEAIAAoAgxrQQJ0QajZAGooAgA2AqABDAELIAFBADYCoAELCwJAIAEoAqABRQRAIAEgASgCpAE2AqwBDAELIAEgASgCoAEQKwJ/IAEoAqQBBEAgASgCpAEQK0ECagwBC0EAC2pBAWoQGCIANgIcIABFBEAgAUG4EygCADYCrAEMAQsgASgCHCEAAn8gASgCpAEEQCABKAKkAQwBC0H6EgshA0HfEkH6EiABKAKkARshAiABIAEoAqABNgIIIAEgAjYCBCABIAM2AgAgAEG+CiABEHAgASgCqAEgASgCHDYCCCABIAEoAhw2AqwBCyABKAKsASEAIAFBsAFqJAAgAAszAQF/IAAoAhQiAyABIAIgACgCECADayIBIAEgAksbIgEQGRogACAAKAIUIAFqNgIUIAILjwUCBn4BfyABIAEoAgBBD2pBcHEiAUEQajYCACAAAnwgASkDACEDIAEpAwghBiMAQSBrIggkAAJAIAZC////////////AIMiBEKAgICAgIDAgDx9IARCgICAgICAwP/DAH1UBEAgBkIEhiADQjyIhCEEIANC//////////8PgyIDQoGAgICAgICACFoEQCAEQoGAgICAgICAwAB8IQIMAgsgBEKAgICAgICAgEB9IQIgA0KAgICAgICAgAiFQgBSDQEgAiAEQgGDfCECDAELIANQIARCgICAgICAwP//AFQgBEKAgICAgIDA//8AURtFBEAgBkIEhiADQjyIhEL/////////A4NCgICAgICAgPz/AIQhAgwBC0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A0AgASgCHCECIAEgASgCGCIDQQFqNgIYAn9BACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCHCECIAEgASgCGCIDQQFqNgIYQQAgAy0AASACRw0AGiABKAIcIQIgASABKAIYIgNBAWo2AhhBACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCHCECIAEgASgCGCIDQQFqNgIYQQAgAy0AASACRw0AGiABKAIcIQIgASABKAIYIgNBAWo2AhhBACADLQABIAJHDQAaIAEoAhwhAiABIAEoAhgiA0EBajYCGEEAIAMtAAEgAkcNABogASgCGCABKAIUSQtBAXENAAsgASgCKEGCAiABKAIUIAEoAhhrazYCYCABKAIoKAJgIAEoAigoAnRLBEAgASgCKCABKAIoKAJ0NgJgCwsLAkAgASgCKCgCYEEDTwRAIAEgASgCKCgCYEEDazoAEyABQQE7ARAgASgCKCICKAKkLSACKAKgLUEBdGogAS8BEDsBACABLQATIQMgASgCKCICKAKYLSEEIAIgAigCoC0iAkEBajYCoC0gAiAEaiADOgAAIAEgAS8BEEEBazsBECABKAIoIAEtABNB0N0Aai0AAEECdGpBmAlqIgIgAi8BAEEBajsBACABKAIoQYgTagJ/IAEvARBBgAJJBEAgAS8BEC0A0FkMAQsgAS8BEEEHdkGAAmotANBZC0ECdGoiAiACLwEAQQFqOwEAIAEgASgCKCgCoC0gASgCKCgCnC1BAWtGNgIgIAEoAigiAiACKAJ0IAEoAigoAmBrNgJ0IAEoAigiAiABKAIoKAJgIAIoAmxqNgJsIAEoAihBADYCYAwBCyABIAEoAigiAigCOCACKAJsai0AADoADyABKAIoIgIoAqQtIAIoAqAtQQF0akEAOwEAIAEtAA8hAyABKAIoIgIoApgtIQQgAiACKAKgLSICQQFqNgKgLSACIARqIAM6AAAgASgCKCABLQAPQQJ0aiICIAIvAZQBQQFqOwGUASABIAEoAigoAqAtIAEoAigoApwtQQFrRjYCICABKAIoIgIgAigCd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oAhBBgQJrajYCQCABIAEoAlQoAiw2AjwgASABKAJUKAIwNgI4IAEgASgCVCgCNDYCNCABIAEoAlQoAjg2AjAgASABKAJUKAI8NgIsIAEgASgCVCgCQDYCKCABIAEoAlQoAlA2AiQgASABKAJUKAJUNgIgIAFBASABKAJUKAJYdEEBazYCHCABQQEgASgCVCgCXHRBAWs2AhgDQCABKAIoQQ9JBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKCABIAEoAlAiAkEBajYCUCABIAEoAiwgAi0AACABKAIodGo2AiwgASABKAIoQQhqNgIoCyABIAEoAiQgASgCLCABKAIccUECdGooAQA2ARACQAJAA0AgASABLQARNgIMIAEgASgCLCABKAIMdjYCLCABIAEoAiggASgCDGs2AiggASABLQAQNgIMIAEoAgxFBEAgAS8BEiECIAEgASgCSCIDQQFqNgJIIAMgAjoAAAwCCyABKAIMQRBxBEAgASABLwESNgIIIAEgASgCDEEPcTYCDCABKAIMBEAgASgCKCABKAIMSQRAIAEgASgCUCICQQFqNgJQIAEgASgCLCACLQAAIAEoAih0ajYCLCABIAEoAihBCGo2AigLIAEgASgCCCABKAIsQQEgASgCDHRBAWtxajYCCCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoCyABKAIoQQ9JBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKCABIAEoAlAiAkEBajYCUCABIAEoAiwgAi0AACABKAIodGo2AiwgASABKAIoQQhqNgIoCyABIAEoAiAgASgCLCABKAIYcUECdGooAQA2ARACQANAIAEgAS0AETYCDCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoIAEgAS0AEDYCDCABKAIMQRBxBEAgASABLwESNgIEIAEgASgCDEEPcTYCDCABKAIoIAEoAgxJBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKCABKAIoIAEoAgxJBEAgASABKAJQIgJBAWo2AlAgASABKAIsIAItAAAgASgCKHRqNgIsIAEgASgCKEEIajYCKAsLIAEgASgCBCABKAIsQQEgASgCDHRBAWtxajYCBCABIAEoAiwgASgCDHY2AiwgASABKAIoIAEoAgxrNgIoIAEgASgCSCABKAJEazYCDAJAIAEoAgQgASgCDEsEQCABIAEoAgQgASgCDGs2AgwgASgCDCABKAI4SwRAIAEoAlQoAsQ3BEAgASgCXEHdDDYCGCABKAJUQdH+ADYCBAwKCwsgASABKAIwNgIAAkAgASgCNEUEQCABIAEoAgAgASgCPCABKAIMa2o2AgAgASgCDCABKAIISQRAIAEgASgCCCABKAIMazYCCANAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIMQQFrIgI2AgwgAg0ACyABIAEoAkggASgCBGs2AgALDAELAkAgASgCNCABKAIMSQRAIAEgASgCACABKAI8IAEoAjRqIAEoAgxrajYCACABIAEoAgwgASgCNGs2AgwgASgCDCABKAIISQRAIAEgASgCCCABKAIMazYCCANAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIMQQFrIgI2AgwgAg0ACyABIAEoAjA2AgAgASgCNCABKAIISQRAIAEgASgCNDYCDCABIAEoAgggASgCDGs2AggDQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCDEEBayICNgIMIAINAAsgASABKAJIIAEoAgRrNgIACwsMAQsgASABKAIAIAEoAjQgASgCDGtqNgIAIAEoAgwgASgCCEkEQCABIAEoAgggASgCDGs2AggDQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCDEEBayICNgIMIAINAAsgASABKAJIIAEoAgRrNgIACwsLA0AgASgCCEECSwRAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIAIgJBAWo2AgAgAi0AACECIAEgASgCSCIDQQFqNgJIIAMgAjoAACABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCCEEDazYCCAwBCwsMAQsgASABKAJIIAEoAgRrNgIAA0AgASABKAIAIgJBAWo2AgAgAi0AACECIAEgASgCSCIDQQFqNgJIIAMgAjoAACABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEgASgCACICQQFqNgIAIAItAAAhAiABIAEoAkgiA0EBajYCSCADIAI6AAAgASABKAIIQQNrNgIIIAEoAghBAksNAAsLIAEoAggEQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAAIAEoAghBAUsEQCABIAEoAgAiAkEBajYCACACLQAAIQIgASABKAJIIgNBAWo2AkggAyACOgAACwsMAgsgASgCDEHAAHFFBEAgASABKAIgIAEvARIgASgCLEEBIAEoAgx0QQFrcWpBAnRqKAEANgEQDAELCyABKAJcQYUPNgIYIAEoAlRB0f4ANgIEDAQLDAILIAEoAgxBwABxRQRAIAEgASgCJCABLwESIAEoAixBASABKAIMdEEBa3FqQQJ0aigBADYBEAwBCwsgASgCDEEgcQRAIAEoAlRBv/4ANgIEDAILIAEoAlxB6Q42AhggASgCVEHR/gA2AgQMAQsgASgCUCABKAJMSQR/IAEoAkggASgCQEkFQQALQQFxDQELCyABIAEoAihBA3Y2AgggASABKAJQIAEoAghrNgJQIAEgASgCKCABKAIIQQN0azYCKCABIAEoAixBASABKAIodEEBa3E2AiwgASgCXCABKAJQNgIAIAEoAlwgASgCSDYCDCABKAJcAn8gASgCUCABKAJMSQRAIAEoAkwgASgCUGtBBWoMAQtBBSABKAJQIAEoAkxraws2AgQgASgCXAJ/IAEoAkggASgCQEkEQCABKAJAIAEoAkhrQYECagwBC0GBAiABKAJIIAEoAkBraws2AhAgASgCVCABKAIsNgI8IAEoAlQgASgCKDYCQCAAIAAoAlgoAgw2AkggACAAKAJYKAIQN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AU29ja2V0IG5vdCBjb25uZWN0ZWQAQ2Fubm90IHNlbmQgYWZ0ZXIgc29ja2V0IHNodXRkb3duAE9wZXJhdGlvbiBhbHJlYWR5IGluIHByb2dyZXNzAE9wZXJhdGlvbiBpbiBwcm9ncmVzcwBTdGFsZSBmaWxlIGhhbmRsZQBSZW1vdGUgSS9PIGVycm9yAFF1b3RhIGV4Y2VlZGVkAE5vIG1lZGl1bSBmb3VuZABXcm9uZyBtZWRpdW0gdHlwZQBObyBlcnJvciBpbmZvcm1hdGlvbgBBkJcBC1JQUFAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAAAEAAAAIAAAAlEsAALRLAEGQmQELAgxQAEHImQELCR8AAADkTAAAAwBB5JkBC4wBLfRRWM+MscBG9rXLKTEDxwRbcDC0Xf0geH+LmthZKVBoSImrp1YDbP+3zYg/1He0K6WjcPG65Kj8QYP92W/hinovLXSWBx8NCV4Ddixw90ClLKdvV0GoqnTfoFhkA0rHxDxTrq9fGAQVseNtKIarDKS/Q/DpUIE5VxZSN/////////////////////8=";y4(Rp)||(Rp=dxe(Rp));function Kxe(t){try{if(t==Rp&&lP)return new Uint8Array(lP);var e=s4(t);if(e)return e;if(aP)return aP(t);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(r){Gr(r)}}function Uxe(t,e){var r,i,n;try{n=Kxe(t),i=new WebAssembly.Module(n),r=new WebAssembly.Instance(i,e)}catch(o){var s=o.toString();throw Di("failed to compile wasm module: "+s),(s.includes("imported Memory")||s.includes("memory import"))&&Di("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)."),o}return[r,i]}function Gxe(){var t={a:Hxe};function e(n,s){var o=n.exports;oe.asm=o,ew=oe.asm.u,p4(ew.buffer),fP=oe.asm.za,Mxe(oe.asm.v),dP("wasm-instantiate")}if(E4("wasm-instantiate"),oe.instantiateWasm)try{var r=oe.instantiateWasm(t,e);return r}catch(n){return Di("Module.instantiateWasm callback failed with error: "+n),!1}var i=Uxe(Rp,t);return e(i[0]),oe.asm}var ai,ya;function hP(t){for(;t.length>0;){var e=t.shift();if(typeof e=="function"){e(oe);continue}var r=e.func;typeof r=="number"?e.arg===void 0?fP.get(r)():fP.get(r)(e.arg):r(e.arg===void 0?null:e.arg)}}function iw(t,e){var r=new Date(_e[t>>2]*1e3);_e[e>>2]=r.getUTCSeconds(),_e[e+4>>2]=r.getUTCMinutes(),_e[e+8>>2]=r.getUTCHours(),_e[e+12>>2]=r.getUTCDate(),_e[e+16>>2]=r.getUTCMonth(),_e[e+20>>2]=r.getUTCFullYear()-1900,_e[e+24>>2]=r.getUTCDay(),_e[e+36>>2]=0,_e[e+32>>2]=0;var i=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),n=(r.getTime()-i)/(1e3*60*60*24)|0;return _e[e+28>>2]=n,iw.GMTString||(iw.GMTString=uP("GMT")),_e[e+40>>2]=iw.GMTString,e}function jxe(t,e){return iw(t,e)}var yt={splitPath:function(t){var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(t).slice(1)},normalizeArray:function(t,e){for(var r=0,i=t.length-1;i>=0;i--){var n=t[i];n==="."?t.splice(i,1):n===".."?(t.splice(i,1),r++):r&&(t.splice(i,1),r--)}if(e)for(;r;r--)t.unshift("..");return t},normalize:function(t){var e=t.charAt(0)==="/",r=t.substr(-1)==="/";return t=yt.normalizeArray(t.split("/").filter(function(i){return!!i}),!e).join("/"),!t&&!e&&(t="."),t&&r&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=yt.splitPath(t),r=e[0],i=e[1];return!r&&!i?".":(i&&(i=i.substr(0,i.length-1)),r+i)},basename:function(t){if(t==="/")return"/";t=yt.normalize(t),t=t.replace(/\/$/,"");var e=t.lastIndexOf("/");return e===-1?t:t.substr(e+1)},extname:function(t){return yt.splitPath(t)[3]},join:function(){var t=Array.prototype.slice.call(arguments,0);return yt.normalize(t.join("/"))},join2:function(t,e){return yt.normalize(t+"/"+e)}};function Yxe(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var t=new Uint8Array(1);return function(){return crypto.getRandomValues(t),t[0]}}else if(Wl)try{var e=require("crypto");return function(){return e.randomBytes(1)[0]}}catch(r){}return function(){Gr("randomDevice")}}var wa={resolve:function(){for(var t="",e=!1,r=arguments.length-1;r>=-1&&!e;r--){var i=r>=0?arguments[r]:y.cwd();if(typeof i!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";t=i+"/"+t,e=i.charAt(0)==="/"}return t=yt.normalizeArray(t.split("/").filter(function(n){return!!n}),!e).join("/"),(e?"/":"")+t||"."},relative:function(t,e){t=wa.resolve(t).substr(1),e=wa.resolve(e).substr(1);function r(c){for(var u=0;u=0&&c[g]==="";g--);return u>g?[]:c.slice(u,g-u+1)}for(var i=r(t.split("/")),n=r(e.split("/")),s=Math.min(i.length,n.length),o=s,a=0;a0?e=i.slice(0,n).toString("utf-8"):e=null}else typeof window!="undefined"&&typeof window.prompt=="function"?(e=window.prompt("Input: "),e!==null&&(e+=` -`)):typeof readline=="function"&&(e=readline(),e!==null&&(e+=` -`));if(!e)return null;t.input=CP(e,!0)}return t.input.shift()},put_char:function(t,e){e===null||e===10?($y(Zu(t.output,0)),t.output=[]):e!=0&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&($y(Zu(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){e===null||e===10?(Di(Zu(t.output,0)),t.output=[]):e!=0&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(Di(Zu(t.output,0)),t.output=[])}}};function mP(t){for(var e=mxe(t,65536),r=h4(e);t=e)){var i=1024*1024;e=Math.max(e,r*(r>>0),r!=0&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e)if(e==0)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=y.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,y.isDir(t.mode)?e.size=4096:y.isFile(t.mode)?e.size=t.usedBytes:y.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){e.mode!==void 0&&(t.mode=e.mode),e.timestamp!==void 0&&(t.timestamp=e.timestamp),e.size!==void 0&&pt.resizeFileStorage(t,e.size)},lookup:function(t,e){throw y.genericErrors[44]},mknod:function(t,e,r,i){return pt.createNode(t,e,r,i)},rename:function(t,e,r){if(y.isDir(t.mode)){var i;try{i=y.lookupNode(e,r)}catch(s){}if(i)for(var n in i.contents)throw new y.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink:function(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir:function(t,e){var r=y.lookupNode(t,e);for(var i in r.contents)throw new y.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var r in t.contents)!t.contents.hasOwnProperty(r)||e.push(r);return e},symlink:function(t,e,r){var i=pt.createNode(t,e,511|40960,0);return i.link=r,i},readlink:function(t){if(!y.isLink(t.mode))throw new y.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,i,n){var s=t.node.contents;if(n>=t.node.usedBytes)return 0;var o=Math.min(t.node.usedBytes-n,i);if(o>8&&s.subarray)e.set(s.subarray(n,n+o),r);else for(var a=0;a0||i+r>2)}catch(r){throw r.code?new y.ErrnoError(tt.convertNodeCode(r)):r}return e.mode},realPath:function(t){for(var e=[];t.parent!==t;)e.push(t.name),t=t.parent;return e.push(t.mount.opts.root),e.reverse(),yt.join.apply(null,e)},flagsForNode:function(t){t&=~2097152,t&=~2048,t&=~32768,t&=~524288;var e=0;for(var r in tt.flagsForNodeMap)t&r&&(e|=tt.flagsForNodeMap[r],t^=r);if(t)throw new y.ErrnoError(28);return e},node_ops:{getattr:function(t){var e=tt.realPath(t),r;try{r=ft.lstatSync(e)}catch(i){throw i.code?new y.ErrnoError(tt.convertNodeCode(i)):i}return tt.isWindows&&!r.blksize&&(r.blksize=4096),tt.isWindows&&!r.blocks&&(r.blocks=(r.size+r.blksize-1)/r.blksize|0),{dev:r.dev,ino:r.ino,mode:r.mode,nlink:r.nlink,uid:r.uid,gid:r.gid,rdev:r.rdev,size:r.size,atime:r.atime,mtime:r.mtime,ctime:r.ctime,blksize:r.blksize,blocks:r.blocks}},setattr:function(t,e){var r=tt.realPath(t);try{if(e.mode!==void 0&&(ft.chmodSync(r,e.mode),t.mode=e.mode),e.timestamp!==void 0){var i=new Date(e.timestamp);ft.utimesSync(r,i,i)}e.size!==void 0&&ft.truncateSync(r,e.size)}catch(n){throw n.code?new y.ErrnoError(tt.convertNodeCode(n)):n}},lookup:function(t,e){var r=yt.join2(tt.realPath(t),e),i=tt.getMode(r);return tt.createNode(t,e,i)},mknod:function(t,e,r,i){var n=tt.createNode(t,e,r,i),s=tt.realPath(n);try{y.isDir(n.mode)?ft.mkdirSync(s,n.mode):ft.writeFileSync(s,"",{mode:n.mode})}catch(o){throw o.code?new y.ErrnoError(tt.convertNodeCode(o)):o}return n},rename:function(t,e,r){var i=tt.realPath(t),n=yt.join2(tt.realPath(e),r);try{ft.renameSync(i,n)}catch(s){throw s.code?new y.ErrnoError(tt.convertNodeCode(s)):s}t.name=r},unlink:function(t,e){var r=yt.join2(tt.realPath(t),e);try{ft.unlinkSync(r)}catch(i){throw i.code?new y.ErrnoError(tt.convertNodeCode(i)):i}},rmdir:function(t,e){var r=yt.join2(tt.realPath(t),e);try{ft.rmdirSync(r)}catch(i){throw i.code?new y.ErrnoError(tt.convertNodeCode(i)):i}},readdir:function(t){var e=tt.realPath(t);try{return ft.readdirSync(e)}catch(r){throw r.code?new y.ErrnoError(tt.convertNodeCode(r)):r}},symlink:function(t,e,r){var i=yt.join2(tt.realPath(t),e);try{ft.symlinkSync(r,i)}catch(n){throw n.code?new y.ErrnoError(tt.convertNodeCode(n)):n}},readlink:function(t){var e=tt.realPath(t);try{return e=ft.readlinkSync(e),e=EP.relative(EP.resolve(t.mount.opts.root),e),e}catch(r){throw r.code?new y.ErrnoError(tt.convertNodeCode(r)):r}}},stream_ops:{open:function(t){var e=tt.realPath(t.node);try{y.isFile(t.node.mode)&&(t.nfd=ft.openSync(e,tt.flagsForNode(t.flags)))}catch(r){throw r.code?new y.ErrnoError(tt.convertNodeCode(r)):r}},close:function(t){try{y.isFile(t.node.mode)&&t.nfd&&ft.closeSync(t.nfd)}catch(e){throw e.code?new y.ErrnoError(tt.convertNodeCode(e)):e}},read:function(t,e,r,i,n){if(i===0)return 0;try{return ft.readSync(t.nfd,tt.bufferFrom(e.buffer),r,i,n)}catch(s){throw new y.ErrnoError(tt.convertNodeCode(s))}},write:function(t,e,r,i,n){try{return ft.writeSync(t.nfd,tt.bufferFrom(e.buffer),r,i,n)}catch(s){throw new y.ErrnoError(tt.convertNodeCode(s))}},llseek:function(t,e,r){var i=e;if(r===1)i+=t.position;else if(r===2&&y.isFile(t.node.mode))try{var n=ft.fstatSync(t.nfd);i+=n.size}catch(s){throw new y.ErrnoError(tt.convertNodeCode(s))}if(i<0)throw new y.ErrnoError(28);return i},mmap:function(t,e,r,i,n,s){if(e!==0)throw new y.ErrnoError(28);if(!y.isFile(t.node.mode))throw new y.ErrnoError(43);var o=mP(r);return tt.stream_ops.read(t,Zi,o,r,i),{ptr:o,allocated:!0}},msync:function(t,e,r,i,n){if(!y.isFile(t.node.mode))throw new y.ErrnoError(43);if(n&2)return 0;var s=tt.stream_ops.write(t,e,0,i,r,!1);return 0}}},w4={lookupPath:function(t){return{path:t,node:{mode:tt.getMode(t)}}},createStandardStreams:function(){y.streams[0]={fd:0,nfd:0,position:0,path:"",flags:0,tty:!0,seekable:!1};for(var t=1;t<3;t++)y.streams[t]={fd:t,nfd:t,position:0,path:"",flags:577,tty:!0,seekable:!1}},cwd:function(){return process.cwd()},chdir:function(){process.chdir.apply(void 0,arguments)},mknod:function(t,e){y.isDir(t)?ft.mkdirSync(t,e):ft.writeFileSync(t,"",{mode:e})},mkdir:function(){ft.mkdirSync.apply(void 0,arguments)},symlink:function(){ft.symlinkSync.apply(void 0,arguments)},rename:function(){ft.renameSync.apply(void 0,arguments)},rmdir:function(){ft.rmdirSync.apply(void 0,arguments)},readdir:function(){ft.readdirSync.apply(void 0,arguments)},unlink:function(){ft.unlinkSync.apply(void 0,arguments)},readlink:function(){return ft.readlinkSync.apply(void 0,arguments)},stat:function(){return ft.statSync.apply(void 0,arguments)},lstat:function(){return ft.lstatSync.apply(void 0,arguments)},chmod:function(){ft.chmodSync.apply(void 0,arguments)},fchmod:function(){ft.fchmodSync.apply(void 0,arguments)},chown:function(){ft.chownSync.apply(void 0,arguments)},fchown:function(){ft.fchownSync.apply(void 0,arguments)},truncate:function(){ft.truncateSync.apply(void 0,arguments)},ftruncate:function(t,e){if(e<0)throw new y.ErrnoError(28);ft.ftruncateSync.apply(void 0,arguments)},utime:function(){ft.utimesSync.apply(void 0,arguments)},open:function(t,e,r,i){typeof e=="string"&&(e=Vl.modeStringToFlags(e));var n=ft.openSync(t,tt.flagsForNode(e),r),s=i!=null?i:y.nextfd(n),o={fd:s,nfd:n,position:0,path:t,flags:e,seekable:!0};return y.streams[s]=o,o},close:function(t){t.stream_ops||ft.closeSync(t.nfd),y.closeStream(t.fd)},llseek:function(t,e,r){if(t.stream_ops)return Vl.llseek(t,e,r);var i=e;if(r===1)i+=t.position;else if(r===2)i+=ft.fstatSync(t.nfd).size;else if(r!==0)throw new y.ErrnoError(eg.EINVAL);if(i<0)throw new y.ErrnoError(eg.EINVAL);return t.position=i,i},read:function(t,e,r,i,n){if(t.stream_ops)return Vl.read(t,e,r,i,n);var s=typeof n!="undefined";!s&&t.seekable&&(n=t.position);var o=ft.readSync(t.nfd,tt.bufferFrom(e.buffer),r,i,n);return s||(t.position+=o),o},write:function(t,e,r,i,n){if(t.stream_ops)return Vl.write(t,e,r,i,n);t.flags&+"1024"&&y.llseek(t,0,+"2");var s=typeof n!="undefined";!s&&t.seekable&&(n=t.position);var o=ft.writeSync(t.nfd,tt.bufferFrom(e.buffer),r,i,n);return s||(t.position+=o),o},allocate:function(){throw new y.ErrnoError(eg.EOPNOTSUPP)},mmap:function(t,e,r,i,n,s){if(t.stream_ops)return Vl.mmap(t,e,r,i,n,s);if(e!==0)throw new y.ErrnoError(28);var o=mP(r);return y.read(t,Zi,o,r,i),{ptr:o,allocated:!0}},msync:function(t,e,r,i,n){return t.stream_ops?Vl.msync(t,e,r,i,n):(n&2||y.write(t,e,0,i,r),0)},munmap:function(){return 0},ioctl:function(){throw new y.ErrnoError(eg.ENOTTY)}},y={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(t,e){if(t=wa.resolve(y.cwd(),t),e=e||{},!t)return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var i in r)e[i]===void 0&&(e[i]=r[i]);if(e.recurse_count>8)throw new y.ErrnoError(32);for(var n=yt.normalizeArray(t.split("/").filter(function(f){return!!f}),!1),s=y.root,o="/",a=0;a40)throw new y.ErrnoError(32)}}return{path:o,node:s}},getPath:function(t){for(var e;;){if(y.isRoot(t)){var r=t.mount.mountpoint;return e?r[r.length-1]!=="/"?r+"/"+e:r+e:r}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,e){for(var r=0,i=0;i>>0)%y.nameTable.length},hashAddNode:function(t){var e=y.hashName(t.parent.id,t.name);t.name_next=y.nameTable[e],y.nameTable[e]=t},hashRemoveNode:function(t){var e=y.hashName(t.parent.id,t.name);if(y.nameTable[e]===t)y.nameTable[e]=t.name_next;else for(var r=y.nameTable[e];r;){if(r.name_next===t){r.name_next=t.name_next;break}r=r.name_next}},lookupNode:function(t,e){var r=y.mayLookup(t);if(r)throw new y.ErrnoError(r,t);for(var i=y.hashName(t.id,e),n=y.nameTable[i];n;n=n.name_next){var s=n.name;if(n.parent.id===t.id&&s===e)return n}return y.lookup(t,e)},createNode:function(t,e,r,i){var n=new y.FSNode(t,e,r,i);return y.hashAddNode(n),n},destroyNode:function(t){y.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return(t&61440)==32768},isDir:function(t){return(t&61440)==16384},isLink:function(t){return(t&61440)==40960},isChrdev:function(t){return(t&61440)==8192},isBlkdev:function(t){return(t&61440)==24576},isFIFO:function(t){return(t&61440)==4096},isSocket:function(t){return(t&49152)==49152},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(t){var e=y.flagModes[t];if(typeof e=="undefined")throw new Error("Unknown file open mode: "+t);return e},flagsToPermissionString:function(t){var e=["r","w","rw"][t&3];return t&512&&(e+="w"),e},nodePermissions:function(t,e){return y.ignorePermissions?0:e.includes("r")&&!(t.mode&292)||e.includes("w")&&!(t.mode&146)||e.includes("x")&&!(t.mode&73)?2:0},mayLookup:function(t){var e=y.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,e){try{var r=y.lookupNode(t,e);return 20}catch(i){}return y.nodePermissions(t,"wx")},mayDelete:function(t,e,r){var i;try{i=y.lookupNode(t,e)}catch(s){return s.errno}var n=y.nodePermissions(t,"wx");if(n)return n;if(r){if(!y.isDir(i.mode))return 54;if(y.isRoot(i)||y.getPath(i)===y.cwd())return 10}else if(y.isDir(i.mode))return 31;return 0},mayOpen:function(t,e){return t?y.isLink(t.mode)?32:y.isDir(t.mode)&&(y.flagsToPermissionString(e)!=="r"||e&512)?31:y.nodePermissions(t,y.flagsToPermissionString(e)):44},MAX_OPEN_FDS:4096,nextfd:function(t,e){t=t||0,e=e||y.MAX_OPEN_FDS;for(var r=t;r<=e;r++)if(!y.streams[r])return r;throw new y.ErrnoError(33)},getStream:function(t){return y.streams[t]},createStream:function(t,e,r){y.FSStream||(y.FSStream=function(){},y.FSStream.prototype={object:{get:function(){return this.node},set:function(o){this.node=o}},isRead:{get:function(){return(this.flags&2097155)!=1}},isWrite:{get:function(){return(this.flags&2097155)!=0}},isAppend:{get:function(){return this.flags&1024}}});var i=new y.FSStream;for(var n in t)i[n]=t[n];t=i;var s=y.nextfd(e,r);return t.fd=s,y.streams[s]=t,t},closeStream:function(t){y.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=y.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new y.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return t&255},makedev:function(t,e){return t<<8|e},registerDevice:function(t,e){y.devices[t]={stream_ops:e}},getDevice:function(t){return y.devices[t]},getMounts:function(t){for(var e=[],r=[t];r.length;){var i=r.pop();e.push(i),r.push.apply(r,i.mounts)}return e},syncfs:function(t,e){typeof t=="function"&&(e=t,t=!1),y.syncFSRequests++,y.syncFSRequests>1&&Di("warning: "+y.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=y.getMounts(y.root.mount),i=0;function n(o){return y.syncFSRequests--,e(o)}function s(o){if(o)return s.errored?void 0:(s.errored=!0,n(o));++i>=r.length&&n(null)}r.forEach(function(o){if(!o.type.syncfs)return s(null);o.type.syncfs(o,t,s)})},mount:function(t,e,r){var i=r==="/",n=!r,s;if(i&&y.root)throw new y.ErrnoError(10);if(!i&&!n){var o=y.lookupPath(r,{follow_mount:!1});if(r=o.path,s=o.node,y.isMountpoint(s))throw new y.ErrnoError(10);if(!y.isDir(s.mode))throw new y.ErrnoError(54)}var a={type:t,opts:e,mountpoint:r,mounts:[]},l=t.mount(a);return l.mount=a,a.root=l,i?y.root=l:s&&(s.mounted=a,s.mount&&s.mount.mounts.push(a)),l},unmount:function(t){var e=y.lookupPath(t,{follow_mount:!1});if(!y.isMountpoint(e.node))throw new y.ErrnoError(28);var r=e.node,i=r.mounted,n=y.getMounts(i);Object.keys(y.nameTable).forEach(function(o){for(var a=y.nameTable[o];a;){var l=a.name_next;n.includes(a.mount)&&y.destroyNode(a),a=l}}),r.mounted=null;var s=r.mount.mounts.indexOf(i);r.mount.mounts.splice(s,1)},lookup:function(t,e){return t.node_ops.lookup(t,e)},mknod:function(t,e,r){var i=y.lookupPath(t,{parent:!0}),n=i.node,s=yt.basename(t);if(!s||s==="."||s==="..")throw new y.ErrnoError(28);var o=y.mayCreate(n,s);if(o)throw new y.ErrnoError(o);if(!n.node_ops.mknod)throw new y.ErrnoError(63);return n.node_ops.mknod(n,s,e,r)},create:function(t,e){return e=e!==void 0?e:438,e&=4095,e|=32768,y.mknod(t,e,0)},mkdir:function(t,e){return e=e!==void 0?e:511,e&=511|512,e|=16384,y.mknod(t,e,0)},mkdirTree:function(t,e){for(var r=t.split("/"),i="",n=0;nthis.length-1||f<0)){var h=f%this.chunkSize,p=f/this.chunkSize|0;return this.getter(p)[h]}},s.prototype.setDataGetter=function(f){this.getter=f},s.prototype.cacheLength=function(){var f=new XMLHttpRequest;if(f.open("HEAD",r,!1),f.send(null),!(f.status>=200&&f.status<300||f.status===304))throw new Error("Couldn't load "+r+". Status: "+f.status);var h=Number(f.getResponseHeader("Content-length")),p,d=(p=f.getResponseHeader("Accept-Ranges"))&&p==="bytes",m=(p=f.getResponseHeader("Content-Encoding"))&&p==="gzip",I=1024*1024;d||(I=h);var B=function(R,H){if(R>H)throw new Error("invalid range ("+R+", "+H+") or no bytes requested!");if(H>h-1)throw new Error("only "+h+" bytes available! programmer error!");var L=new XMLHttpRequest;if(L.open("GET",r,!1),h!==I&&L.setRequestHeader("Range","bytes="+R+"-"+H),typeof Uint8Array!="undefined"&&(L.responseType="arraybuffer"),L.overrideMimeType&&L.overrideMimeType("text/plain; charset=x-user-defined"),L.send(null),!(L.status>=200&&L.status<300||L.status===304))throw new Error("Couldn't load "+r+". Status: "+L.status);return L.response!==void 0?new Uint8Array(L.response||[]):CP(L.responseText||"",!0)},b=this;b.setDataGetter(function(R){var H=R*I,L=(R+1)*I-1;if(L=Math.min(L,h-1),typeof b.chunks[R]=="undefined"&&(b.chunks[R]=B(H,L)),typeof b.chunks[R]=="undefined")throw new Error("doXHR failed!");return b.chunks[R]}),(m||!h)&&(I=h=1,h=this.getter(0).length,I=h,$y("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=h,this._chunkSize=I,this.lengthKnown=!0},typeof XMLHttpRequest!="undefined"){if(!i4)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else var a={isDevice:!1,url:r};var l=y.createFile(t,e,a,i,n);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var c={},u=Object.keys(l.stream_ops);return u.forEach(function(g){var f=l.stream_ops[g];c[g]=function(){return y.forceLoadFile(l),f.apply(null,arguments)}}),c.read=function(f,h,p,d,m){y.forceLoadFile(l);var I=f.node.contents;if(m>=I.length)return 0;var B=Math.min(I.length-m,d);if(I.slice)for(var b=0;b>2]=i.dev,_e[r+4>>2]=0,_e[r+8>>2]=i.ino,_e[r+12>>2]=i.mode,_e[r+16>>2]=i.nlink,_e[r+20>>2]=i.uid,_e[r+24>>2]=i.gid,_e[r+28>>2]=i.rdev,_e[r+32>>2]=0,ya=[i.size>>>0,(ai=i.size,+Math.abs(ai)>=1?ai>0?(Math.min(+Math.floor(ai/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ai-+(~~ai>>>0))/4294967296)>>>0:0)],_e[r+40>>2]=ya[0],_e[r+44>>2]=ya[1],_e[r+48>>2]=4096,_e[r+52>>2]=i.blocks,_e[r+56>>2]=i.atime.getTime()/1e3|0,_e[r+60>>2]=0,_e[r+64>>2]=i.mtime.getTime()/1e3|0,_e[r+68>>2]=0,_e[r+72>>2]=i.ctime.getTime()/1e3|0,_e[r+76>>2]=0,ya=[i.ino>>>0,(ai=i.ino,+Math.abs(ai)>=1?ai>0?(Math.min(+Math.floor(ai/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ai-+(~~ai>>>0))/4294967296)>>>0:0)],_e[r+80>>2]=ya[0],_e[r+84>>2]=ya[1],0},doMsync:function(t,e,r,i,n){var s=$u.slice(t,t+r);y.msync(e,s,n,r,i)},doMkdir:function(t,e){return t=yt.normalize(t),t[t.length-1]==="/"&&(t=t.substr(0,t.length-1)),y.mkdir(t,e,0),0},doMknod:function(t,e,r){switch(e&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return y.mknod(t,e,r),0},doReadlink:function(t,e,r){if(r<=0)return-28;var i=y.readlink(t),n=Math.min(r,rw(i)),s=Zi[e+n];return u4(i,e,r+1),Zi[e+n]=s,n},doAccess:function(t,e){if(e&~7)return-28;var r,i=y.lookupPath(t,{follow:!0});if(r=i.node,!r)return-44;var n="";return e&4&&(n+="r"),e&2&&(n+="w"),e&1&&(n+="x"),n&&y.nodePermissions(r,n)?-2:0},doDup:function(t,e,r){var i=y.getStream(r);return i&&y.close(i),y.open(t,e,0,r,r).fd},doReadv:function(t,e,r,i){for(var n=0,s=0;s>2],a=_e[e+(s*8+4)>>2],l=y.read(t,Zi,o,a,i);if(l<0)return-1;if(n+=l,l>2],a=_e[e+(s*8+4)>>2],l=y.write(t,Zi,o,a,i);if(l<0)return-1;n+=l}return n},varargs:void 0,get:function(){Ot.varargs+=4;var t=_e[Ot.varargs-4>>2];return t},getStr:function(t){var e=c4(t);return e},getStreamFromFD:function(t){var e=y.getStream(t);if(!e)throw new y.ErrnoError(8);return e},get64:function(t,e){return t}};function qxe(t,e){try{return t=Ot.getStr(t),y.chmod(t,e),0}catch(r){return(typeof y=="undefined"||!(r instanceof y.ErrnoError))&&Gr(r),-r.errno}}function Wxe(t){return _e[Jxe()>>2]=t,t}function zxe(t,e,r){Ot.varargs=r;try{var i=Ot.getStreamFromFD(t);switch(e){case 0:{var n=Ot.get();if(n<0)return-28;var s;return s=y.open(i.path,i.flags,0,n),s.fd}case 1:case 2:return 0;case 3:return i.flags;case 4:{var n=Ot.get();return i.flags|=n,0}case 12:{var n=Ot.get(),o=0;return cP[n+o>>1]=2,0}case 13:case 14:return 0;case 16:case 8:return-28;case 9:return Wxe(28),-1;default:return-28}}catch(a){return(typeof y=="undefined"||!(a instanceof y.ErrnoError))&&Gr(a),-a.errno}}function Vxe(t,e){try{var r=Ot.getStreamFromFD(t);return Ot.doStat(y.stat,r.path,e)}catch(i){return(typeof y=="undefined"||!(i instanceof y.ErrnoError))&&Gr(i),-i.errno}}function _xe(t,e,r){Ot.varargs=r;try{var i=Ot.getStreamFromFD(t);switch(e){case 21509:case 21505:return i.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return i.tty?0:-59;case 21519:{if(!i.tty)return-59;var n=Ot.get();return _e[n>>2]=0,0}case 21520:return i.tty?-28:-59;case 21531:{var n=Ot.get();return y.ioctl(i,e,n)}case 21523:return i.tty?0:-59;case 21524:return i.tty?0:-59;default:Gr("bad ioctl syscall "+e)}}catch(s){return(typeof y=="undefined"||!(s instanceof y.ErrnoError))&&Gr(s),-s.errno}}function Xxe(t,e,r){Ot.varargs=r;try{var i=Ot.getStr(t),n=r?Ot.get():0,s=y.open(i,e,n);return s.fd}catch(o){return(typeof y=="undefined"||!(o instanceof y.ErrnoError))&&Gr(o),-o.errno}}function Zxe(t,e){try{return t=Ot.getStr(t),e=Ot.getStr(e),y.rename(t,e),0}catch(r){return(typeof y=="undefined"||!(r instanceof y.ErrnoError))&&Gr(r),-r.errno}}function $xe(t){try{return t=Ot.getStr(t),y.rmdir(t),0}catch(e){return(typeof y=="undefined"||!(e instanceof y.ErrnoError))&&Gr(e),-e.errno}}function eke(t,e){try{return t=Ot.getStr(t),Ot.doStat(y.stat,t,e)}catch(r){return(typeof y=="undefined"||!(r instanceof y.ErrnoError))&&Gr(r),-r.errno}}function tke(t){try{return t=Ot.getStr(t),y.unlink(t),0}catch(e){return(typeof y=="undefined"||!(e instanceof y.ErrnoError))&&Gr(e),-e.errno}}function rke(t,e,r){$u.copyWithin(t,e,e+r)}function ike(t){try{return ew.grow(t-gP.byteLength+65535>>>16),p4(ew.buffer),1}catch(e){}}function nke(t){var e=$u.length;t=t>>>0;var r=2147483648;if(t>r)return!1;for(var i=1;i<=4;i*=2){var n=e*(1+.2/i);n=Math.min(n,t+100663296);var s=Math.min(r,xxe(Math.max(t,n),65536)),o=ike(s);if(o)return!0}return!1}function ske(t){try{var e=Ot.getStreamFromFD(t);return y.close(e),0}catch(r){return(typeof y=="undefined"||!(r instanceof y.ErrnoError))&&Gr(r),r.errno}}function oke(t,e){try{var r=Ot.getStreamFromFD(t),i=r.tty?2:y.isDir(r.mode)?3:y.isLink(r.mode)?7:4;return Zi[e>>0]=i,0}catch(n){return(typeof y=="undefined"||!(n instanceof y.ErrnoError))&&Gr(n),n.errno}}function ake(t,e,r,i){try{var n=Ot.getStreamFromFD(t),s=Ot.doReadv(n,e,r);return _e[i>>2]=s,0}catch(o){return(typeof y=="undefined"||!(o instanceof y.ErrnoError))&&Gr(o),o.errno}}function Ake(t,e,r,i,n){try{var s=Ot.getStreamFromFD(t),o=4294967296,a=r*o+(e>>>0),l=9007199254740992;return a<=-l||a>=l?-61:(y.llseek(s,a,i),ya=[s.position>>>0,(ai=s.position,+Math.abs(ai)>=1?ai>0?(Math.min(+Math.floor(ai/4294967296),4294967295)|0)>>>0:~~+Math.ceil((ai-+(~~ai>>>0))/4294967296)>>>0:0)],_e[n>>2]=ya[0],_e[n+4>>2]=ya[1],s.getdents&&a===0&&i===0&&(s.getdents=null),0)}catch(c){return(typeof y=="undefined"||!(c instanceof y.ErrnoError))&&Gr(c),c.errno}}function lke(t,e,r,i){try{var n=Ot.getStreamFromFD(t),s=Ot.doWritev(n,e,r);return _e[i>>2]=s,0}catch(o){return(typeof y=="undefined"||!(o instanceof y.ErrnoError))&&Gr(o),o.errno}}function cke(t){Ixe(t)}function uke(t){var e=Date.now()/1e3|0;return t&&(_e[t>>2]=e),e}function IP(){if(IP.called)return;IP.called=!0;var t=new Date().getFullYear(),e=new Date(t,0,1),r=new Date(t,6,1),i=e.getTimezoneOffset(),n=r.getTimezoneOffset(),s=Math.max(i,n);_e[fke()>>2]=s*60,_e[gke()>>2]=Number(i!=n);function o(g){var f=g.toTimeString().match(/\(([A-Za-z ]+)\)$/);return f?f[1]:"GMT"}var a=o(e),l=o(r),c=uP(a),u=uP(l);n>2]=c,_e[nw()+4>>2]=u):(_e[nw()>>2]=u,_e[nw()+4>>2]=c)}function hke(t){IP();var e=Date.UTC(_e[t+20>>2]+1900,_e[t+16>>2],_e[t+12>>2],_e[t+8>>2],_e[t+4>>2],_e[t>>2],0),r=new Date(e);_e[t+24>>2]=r.getUTCDay();var i=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),n=(r.getTime()-i)/(1e3*60*60*24)|0;return _e[t+28>>2]=n,r.getTime()/1e3|0}var B4=function(t,e,r,i){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=y.nextInode++,this.name=e,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},sw=292|73,ow=146;Object.defineProperties(B4.prototype,{read:{get:function(){return(this.mode&sw)===sw},set:function(t){t?this.mode|=sw:this.mode&=~sw}},write:{get:function(){return(this.mode&ow)===ow},set:function(t){t?this.mode|=ow:this.mode&=~ow}},isFolder:{get:function(){return y.isDir(this.mode)}},isDevice:{get:function(){return y.isChrdev(this.mode)}}});y.FSNode=B4;y.staticInit();Wl&&(ft=e4,EP=require("path"),tt.staticInit());var ft,EP;if(Wl){Q4=function(t){return function(){try{return t.apply(this,arguments)}catch(e){throw e.code?new y.ErrnoError(eg[e.code]):e}}},Vl=Object.assign({},y);for(yP in w4)y[yP]=Q4(w4[yP])}else throw new Error("NODERAWFS is currently only supported on Node.js environment.");var Q4,Vl,yP;function CP(t,e,r){var i=r>0?r:rw(t)+1,n=new Array(i),s=tw(t,n,0,n.length);return e&&(n.length=s),n}var pke=typeof atob=="function"?atob:function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="",i,n,s,o,a,l,c,u=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do o=e.indexOf(t.charAt(u++)),a=e.indexOf(t.charAt(u++)),l=e.indexOf(t.charAt(u++)),c=e.indexOf(t.charAt(u++)),i=o<<2|a>>4,n=(a&15)<<4|l>>2,s=(l&3)<<6|c,r=r+String.fromCharCode(i),l!==64&&(r=r+String.fromCharCode(n)),c!==64&&(r=r+String.fromCharCode(s));while(u0||(Fxe(),zl>0))return;function e(){aw||(aw=!0,oe.calledRun=!0,!A4&&(Nxe(),oe.onRuntimeInitialized&&oe.onRuntimeInitialized(),Txe()))}oe.setStatus?(oe.setStatus("Running..."),setTimeout(function(){setTimeout(function(){oe.setStatus("")},1),e()},1)):e()}oe.run=wP;if(oe.preInit)for(typeof oe.preInit=="function"&&(oe.preInit=[oe.preInit]);oe.preInit.length>0;)oe.preInit.pop()();wP()});var x4=E((Dot,S4)=>{"use strict";function Cke(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function _l(t,e,r,i){this.message=t,this.expected=e,this.found=r,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,_l)}Cke(_l,Error);_l.buildMessage=function(t,e){var r={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",ee=At(">>",!1),Ue=">&",Oe=At(">&",!1),vt=">",dt=At(">",!1),ri="<<<",ii=At("<<<",!1),an="<&",yr=At("<&",!1),Ki="<",Qi=At("<",!1),Go=function(C){return{type:"argument",segments:[].concat(...C)}},wr=function(C){return C},Ui="'",ws=At("'",!1),Tf=function(C){return[{type:"text",text:C}]},Mf='"',Rm=At('"',!1),Fm=function(C){return C},Nm=function(C){return{type:"arithmetic",arithmetic:C,quoted:!0}},DQ=function(C){return{type:"shell",shell:C,quoted:!0}},RQ=function(C){return _(P({type:"variable"},C),{quoted:!0})},Of=function(C){return{type:"text",text:C}},FQ=function(C){return{type:"arithmetic",arithmetic:C,quoted:!1}},NQ=function(C){return{type:"shell",shell:C,quoted:!1}},Lm=function(C){return _(P({type:"variable"},C),{quoted:!1})},LQ=function(C){return{type:"glob",pattern:C}},Va="\\",jo=At("\\",!1),Tm=/^[\\']/,Mm=Qs(["\\","'"],!1,!1),te=function(C){return C},Om=/^[^']/,Km=Qs(["'"],!0,!1),il=function(C){return C.join("")},Um=/^[\\$"]/,Hm=Qs(["\\","$",'"'],!1,!1),Kf=/^[^$"]/,Gm=Qs(["$",'"'],!0,!1),jm="\\0",TQ=At("\\0",!1),MQ=function(){return"\0"},Ym="\\a",qm=At("\\a",!1),Jm=function(){return"a"},Wm="\\b",zm=At("\\b",!1),Vm=function(){return"\b"},Uf="\\e",OQ=At("\\e",!1),KQ=function(){return""},_m="\\f",UQ=At("\\f",!1),HQ=function(){return"\f"},O="\\n",ht=At("\\n",!1),Vc=function(){return` -`},xn="\\r",Hf=At("\\r",!1),Ye=function(){return"\r"},nl="\\t",Xm=At("\\t",!1),MM=function(){return" "},GQ="\\v",OM=At("\\v",!1),fr=function(){return"\v"},Bs="\\x",jQ=At("\\x",!1),Zm=function(C){return String.fromCharCode(parseInt(C,16))},Yo="\\u",$m=At("\\u",!1),_a="\\U",et=At("\\U",!1),YQ=function(C){return String.fromCodePoint(parseInt(C,16))},eE=/^[0-9a-fA-f]/,tE=Qs([["0","9"],["a","f"],["A","f"]],!1,!1),Xa=Cfe(),sl="-",ol=At("-",!1),al="+",qo=At("+",!1),Al=".",qQ=At(".",!1),rE=function(C,Q,k){return{type:"number",value:(C==="-"?-1:1)*parseFloat(Q.join("")+"."+k.join(""))}},iE=function(C,Q){return{type:"number",value:(C==="-"?-1:1)*parseInt(Q.join(""))}},JQ=function(C){return P({type:"variable"},C)},ll=function(C){return{type:"variable",name:C}},WQ=function(C){return C},nE="*",Gf=At("*",!1),_c="/",jf=At("/",!1),sE=function(C,Q,k){return{type:Q==="*"?"multiplication":"division",right:k}},cl=function(C,Q){return Q.reduce((k,N)=>P({left:k},N),C)},oE=function(C,Q,k){return{type:Q==="+"?"addition":"subtraction",right:k}},Yf="$((",Xc=At("$((",!1),xr="))",KM=At("))",!1),Jo=function(C){return C},Zs="$(",aE=At("$(",!1),Zc=function(C){return C},x="${",U=At("${",!1),le=":-",xe=At(":-",!1),Qe=function(C,Q){return{name:C,defaultValue:Q}},Ge=":-}",ct=At(":-}",!1),sr=function(C){return{name:C,defaultValue:[]}},Wo=function(C){return{name:C}},Afe="$",lfe=At("$",!1),cfe=function(C){return e.isGlobPattern(C)},ufe=function(C){return C},UM=/^[a-zA-Z0-9_]/,HM=Qs([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),GM=function(){return dfe()},jM=/^[$@*?#a-zA-Z0-9_\-]/,YM=Qs(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),gfe=/^[(){}<>$|&; \t"']/,ffe=Qs(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),hfe=/^[<>&; \t"']/,pfe=Qs(["<",">","&",";"," "," ",'"',"'"],!1,!1),qM=/^[ \t]/,JM=Qs([" "," "],!1,!1),w=0,Re=0,AE=[{line:1,column:1}],$s=0,zQ=[],we=0,lE;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function dfe(){return t.substring(Re,w)}function P_e(){return qf(Re,w)}function D_e(C,Q){throw Q=Q!==void 0?Q:qf(Re,w),zM([Efe(C)],t.substring(Re,w),Q)}function R_e(C,Q){throw Q=Q!==void 0?Q:qf(Re,w),Ife(C,Q)}function At(C,Q){return{type:"literal",text:C,ignoreCase:Q}}function Qs(C,Q,k){return{type:"class",parts:C,inverted:Q,ignoreCase:k}}function Cfe(){return{type:"any"}}function mfe(){return{type:"end"}}function Efe(C){return{type:"other",description:C}}function WM(C){var Q=AE[C],k;if(Q)return Q;for(k=C-1;!AE[k];)k--;for(Q=AE[k],Q={line:Q.line,column:Q.column};k$s&&($s=w,zQ=[]),zQ.push(C))}function Ife(C,Q){return new _l(C,null,null,Q)}function zM(C,Q,k){return new _l(_l.buildMessage(C,Q),C,Q,k)}function VM(){var C,Q;return C=w,Q=Jf(),Q===r&&(Q=null),Q!==r&&(Re=C,Q=s(Q)),C=Q,C}function Jf(){var C,Q,k,N,Z;if(C=w,Q=VQ(),Q!==r){for(k=[],N=ke();N!==r;)k.push(N),N=ke();k!==r?(N=_M(),N!==r?(Z=yfe(),Z===r&&(Z=null),Z!==r?(Re=C,Q=o(Q,N,Z),C=Q):(w=C,C=r)):(w=C,C=r)):(w=C,C=r)}else w=C,C=r;if(C===r)if(C=w,Q=VQ(),Q!==r){for(k=[],N=ke();N!==r;)k.push(N),N=ke();k!==r?(N=_M(),N===r&&(N=null),N!==r?(Re=C,Q=a(Q,N),C=Q):(w=C,C=r)):(w=C,C=r)}else w=C,C=r;return C}function yfe(){var C,Q,k,N,Z;for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r)if(k=Jf(),k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();N!==r?(Re=C,Q=l(k),C=Q):(w=C,C=r)}else w=C,C=r;else w=C,C=r;return C}function _M(){var C;return t.charCodeAt(w)===59?(C=c,w++):(C=r,we===0&&ve(u)),C===r&&(t.charCodeAt(w)===38?(C=g,w++):(C=r,we===0&&ve(f))),C}function VQ(){var C,Q,k;return C=w,Q=XM(),Q!==r?(k=wfe(),k===r&&(k=null),k!==r?(Re=C,Q=h(Q,k),C=Q):(w=C,C=r)):(w=C,C=r),C}function wfe(){var C,Q,k,N,Z,Ee,ot;for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r)if(k=Bfe(),k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();if(N!==r)if(Z=VQ(),Z!==r){for(Ee=[],ot=ke();ot!==r;)Ee.push(ot),ot=ke();Ee!==r?(Re=C,Q=p(k,Z),C=Q):(w=C,C=r)}else w=C,C=r;else w=C,C=r}else w=C,C=r;else w=C,C=r;return C}function Bfe(){var C;return t.substr(w,2)===d?(C=d,w+=2):(C=r,we===0&&ve(m)),C===r&&(t.substr(w,2)===I?(C=I,w+=2):(C=r,we===0&&ve(B))),C}function XM(){var C,Q,k;return C=w,Q=vfe(),Q!==r?(k=Qfe(),k===r&&(k=null),k!==r?(Re=C,Q=b(Q,k),C=Q):(w=C,C=r)):(w=C,C=r),C}function Qfe(){var C,Q,k,N,Z,Ee,ot;for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r)if(k=bfe(),k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();if(N!==r)if(Z=XM(),Z!==r){for(Ee=[],ot=ke();ot!==r;)Ee.push(ot),ot=ke();Ee!==r?(Re=C,Q=R(k,Z),C=Q):(w=C,C=r)}else w=C,C=r;else w=C,C=r}else w=C,C=r;else w=C,C=r;return C}function bfe(){var C;return t.substr(w,2)===H?(C=H,w+=2):(C=r,we===0&&ve(L)),C===r&&(t.charCodeAt(w)===124?(C=K,w++):(C=r,we===0&&ve(J))),C}function cE(){var C,Q,k,N,Z,Ee;if(C=w,Q=oO(),Q!==r)if(t.charCodeAt(w)===61?(k=ne,w++):(k=r,we===0&&ve(q)),k!==r)if(N=$M(),N!==r){for(Z=[],Ee=ke();Ee!==r;)Z.push(Ee),Ee=ke();Z!==r?(Re=C,Q=A(Q,N),C=Q):(w=C,C=r)}else w=C,C=r;else w=C,C=r;else w=C,C=r;if(C===r)if(C=w,Q=oO(),Q!==r)if(t.charCodeAt(w)===61?(k=ne,w++):(k=r,we===0&&ve(q)),k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();N!==r?(Re=C,Q=V(Q),C=Q):(w=C,C=r)}else w=C,C=r;else w=C,C=r;return C}function vfe(){var C,Q,k,N,Z,Ee,ot,ut,Tr,ni,Yn;for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r)if(t.charCodeAt(w)===40?(k=W,w++):(k=r,we===0&&ve(X)),k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();if(N!==r)if(Z=Jf(),Z!==r){for(Ee=[],ot=ke();ot!==r;)Ee.push(ot),ot=ke();if(Ee!==r)if(t.charCodeAt(w)===41?(ot=F,w++):(ot=r,we===0&&ve(D)),ot!==r){for(ut=[],Tr=ke();Tr!==r;)ut.push(Tr),Tr=ke();if(ut!==r){for(Tr=[],ni=Wf();ni!==r;)Tr.push(ni),ni=Wf();if(Tr!==r){for(ni=[],Yn=ke();Yn!==r;)ni.push(Yn),Yn=ke();ni!==r?(Re=C,Q=he(Z,Tr),C=Q):(w=C,C=r)}else w=C,C=r}else w=C,C=r}else w=C,C=r;else w=C,C=r}else w=C,C=r;else w=C,C=r}else w=C,C=r;else w=C,C=r;if(C===r){for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r)if(t.charCodeAt(w)===123?(k=pe,w++):(k=r,we===0&&ve(Ne)),k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();if(N!==r)if(Z=Jf(),Z!==r){for(Ee=[],ot=ke();ot!==r;)Ee.push(ot),ot=ke();if(Ee!==r)if(t.charCodeAt(w)===125?(ot=Pe,w++):(ot=r,we===0&&ve(qe)),ot!==r){for(ut=[],Tr=ke();Tr!==r;)ut.push(Tr),Tr=ke();if(ut!==r){for(Tr=[],ni=Wf();ni!==r;)Tr.push(ni),ni=Wf();if(Tr!==r){for(ni=[],Yn=ke();Yn!==r;)ni.push(Yn),Yn=ke();ni!==r?(Re=C,Q=re(Z,Tr),C=Q):(w=C,C=r)}else w=C,C=r}else w=C,C=r}else w=C,C=r;else w=C,C=r}else w=C,C=r;else w=C,C=r}else w=C,C=r;else w=C,C=r;if(C===r){for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r){for(k=[],N=cE();N!==r;)k.push(N),N=cE();if(k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();if(N!==r){if(Z=[],Ee=ZM(),Ee!==r)for(;Ee!==r;)Z.push(Ee),Ee=ZM();else Z=r;if(Z!==r){for(Ee=[],ot=ke();ot!==r;)Ee.push(ot),ot=ke();Ee!==r?(Re=C,Q=se(k,Z),C=Q):(w=C,C=r)}else w=C,C=r}else w=C,C=r}else w=C,C=r}else w=C,C=r;if(C===r){for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r){if(k=[],N=cE(),N!==r)for(;N!==r;)k.push(N),N=cE();else k=r;if(k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();N!==r?(Re=C,Q=be(k),C=Q):(w=C,C=r)}else w=C,C=r}else w=C,C=r}}}return C}function Sfe(){var C,Q,k,N,Z;for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r){if(k=[],N=uE(),N!==r)for(;N!==r;)k.push(N),N=uE();else k=r;if(k!==r){for(N=[],Z=ke();Z!==r;)N.push(Z),Z=ke();N!==r?(Re=C,Q=ae(k),C=Q):(w=C,C=r)}else w=C,C=r}else w=C,C=r;return C}function ZM(){var C,Q,k;for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();if(Q!==r?(k=Wf(),k!==r?(Re=C,Q=Ae(k),C=Q):(w=C,C=r)):(w=C,C=r),C===r){for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();Q!==r?(k=uE(),k!==r?(Re=C,Q=Ae(k),C=Q):(w=C,C=r)):(w=C,C=r)}return C}function Wf(){var C,Q,k,N,Z;for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();return Q!==r?(De.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve($)),k===r&&(k=null),k!==r?(N=xfe(),N!==r?(Z=uE(),Z!==r?(Re=C,Q=G(k,N,Z),C=Q):(w=C,C=r)):(w=C,C=r)):(w=C,C=r)):(w=C,C=r),C}function xfe(){var C;return t.substr(w,2)===Ce?(C=Ce,w+=2):(C=r,we===0&&ve(ee)),C===r&&(t.substr(w,2)===Ue?(C=Ue,w+=2):(C=r,we===0&&ve(Oe)),C===r&&(t.charCodeAt(w)===62?(C=vt,w++):(C=r,we===0&&ve(dt)),C===r&&(t.substr(w,3)===ri?(C=ri,w+=3):(C=r,we===0&&ve(ii)),C===r&&(t.substr(w,2)===an?(C=an,w+=2):(C=r,we===0&&ve(yr)),C===r&&(t.charCodeAt(w)===60?(C=Ki,w++):(C=r,we===0&&ve(Qi))))))),C}function uE(){var C,Q,k;for(C=w,Q=[],k=ke();k!==r;)Q.push(k),k=ke();return Q!==r?(k=$M(),k!==r?(Re=C,Q=Ae(k),C=Q):(w=C,C=r)):(w=C,C=r),C}function $M(){var C,Q,k;if(C=w,Q=[],k=eO(),k!==r)for(;k!==r;)Q.push(k),k=eO();else Q=r;return Q!==r&&(Re=C,Q=Go(Q)),C=Q,C}function eO(){var C,Q;return C=w,Q=kfe(),Q!==r&&(Re=C,Q=wr(Q)),C=Q,C===r&&(C=w,Q=Pfe(),Q!==r&&(Re=C,Q=wr(Q)),C=Q,C===r&&(C=w,Q=Dfe(),Q!==r&&(Re=C,Q=wr(Q)),C=Q)),C}function kfe(){var C,Q,k,N;return C=w,t.charCodeAt(w)===39?(Q=Ui,w++):(Q=r,we===0&&ve(ws)),Q!==r?(k=Rfe(),k!==r?(t.charCodeAt(w)===39?(N=Ui,w++):(N=r,we===0&&ve(ws)),N!==r?(Re=C,Q=Tf(k),C=Q):(w=C,C=r)):(w=C,C=r)):(w=C,C=r),C}function Pfe(){var C,Q,k,N;if(C=w,t.charCodeAt(w)===34?(Q=Mf,w++):(Q=r,we===0&&ve(Rm)),Q!==r){for(k=[],N=tO();N!==r;)k.push(N),N=tO();k!==r?(t.charCodeAt(w)===34?(N=Mf,w++):(N=r,we===0&&ve(Rm)),N!==r?(Re=C,Q=Fm(k),C=Q):(w=C,C=r)):(w=C,C=r)}else w=C,C=r;return C}function Dfe(){var C,Q,k;if(C=w,Q=[],k=rO(),k!==r)for(;k!==r;)Q.push(k),k=rO();else Q=r;return Q!==r&&(Re=C,Q=Fm(Q)),C=Q,C}function tO(){var C,Q;return C=w,Q=nO(),Q!==r&&(Re=C,Q=Nm(Q)),C=Q,C===r&&(C=w,Q=sO(),Q!==r&&(Re=C,Q=DQ(Q)),C=Q,C===r&&(C=w,Q=ZQ(),Q!==r&&(Re=C,Q=RQ(Q)),C=Q,C===r&&(C=w,Q=Ffe(),Q!==r&&(Re=C,Q=Of(Q)),C=Q))),C}function rO(){var C,Q;return C=w,Q=nO(),Q!==r&&(Re=C,Q=FQ(Q)),C=Q,C===r&&(C=w,Q=sO(),Q!==r&&(Re=C,Q=NQ(Q)),C=Q,C===r&&(C=w,Q=ZQ(),Q!==r&&(Re=C,Q=Lm(Q)),C=Q,C===r&&(C=w,Q=Lfe(),Q!==r&&(Re=C,Q=LQ(Q)),C=Q,C===r&&(C=w,Q=Nfe(),Q!==r&&(Re=C,Q=Of(Q)),C=Q)))),C}function Rfe(){var C,Q,k,N,Z;for(C=w,Q=[],k=gE(),k===r&&(k=fE(),k===r&&(k=w,t.charCodeAt(w)===92?(N=Va,w++):(N=r,we===0&&ve(jo)),N!==r?(Tm.test(t.charAt(w))?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Mm)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r),k===r&&(Om.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve(Km)))));k!==r;)Q.push(k),k=gE(),k===r&&(k=fE(),k===r&&(k=w,t.charCodeAt(w)===92?(N=Va,w++):(N=r,we===0&&ve(jo)),N!==r?(Tm.test(t.charAt(w))?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Mm)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r),k===r&&(Om.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve(Km)))));return Q!==r&&(Re=C,Q=il(Q)),C=Q,C}function Ffe(){var C,Q,k,N,Z;if(C=w,Q=[],k=gE(),k===r&&(k=fE(),k===r&&(k=w,t.charCodeAt(w)===92?(N=Va,w++):(N=r,we===0&&ve(jo)),N!==r?(Um.test(t.charAt(w))?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Hm)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r),k===r&&(Kf.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve(Gm))))),k!==r)for(;k!==r;)Q.push(k),k=gE(),k===r&&(k=fE(),k===r&&(k=w,t.charCodeAt(w)===92?(N=Va,w++):(N=r,we===0&&ve(jo)),N!==r?(Um.test(t.charAt(w))?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Hm)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r),k===r&&(Kf.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve(Gm)))));else Q=r;return Q!==r&&(Re=C,Q=il(Q)),C=Q,C}function gE(){var C,Q;return C=w,t.substr(w,2)===jm?(Q=jm,w+=2):(Q=r,we===0&&ve(TQ)),Q!==r&&(Re=C,Q=MQ()),C=Q,C===r&&(C=w,t.substr(w,2)===Ym?(Q=Ym,w+=2):(Q=r,we===0&&ve(qm)),Q!==r&&(Re=C,Q=Jm()),C=Q,C===r&&(C=w,t.substr(w,2)===Wm?(Q=Wm,w+=2):(Q=r,we===0&&ve(zm)),Q!==r&&(Re=C,Q=Vm()),C=Q,C===r&&(C=w,t.substr(w,2)===Uf?(Q=Uf,w+=2):(Q=r,we===0&&ve(OQ)),Q!==r&&(Re=C,Q=KQ()),C=Q,C===r&&(C=w,t.substr(w,2)===_m?(Q=_m,w+=2):(Q=r,we===0&&ve(UQ)),Q!==r&&(Re=C,Q=HQ()),C=Q,C===r&&(C=w,t.substr(w,2)===O?(Q=O,w+=2):(Q=r,we===0&&ve(ht)),Q!==r&&(Re=C,Q=Vc()),C=Q,C===r&&(C=w,t.substr(w,2)===xn?(Q=xn,w+=2):(Q=r,we===0&&ve(Hf)),Q!==r&&(Re=C,Q=Ye()),C=Q,C===r&&(C=w,t.substr(w,2)===nl?(Q=nl,w+=2):(Q=r,we===0&&ve(Xm)),Q!==r&&(Re=C,Q=MM()),C=Q,C===r&&(C=w,t.substr(w,2)===GQ?(Q=GQ,w+=2):(Q=r,we===0&&ve(OM)),Q!==r&&(Re=C,Q=fr()),C=Q)))))))),C}function fE(){var C,Q,k,N,Z,Ee,ot,ut,Tr,ni,Yn,$Q;return C=w,t.substr(w,2)===Bs?(Q=Bs,w+=2):(Q=r,we===0&&ve(jQ)),Q!==r?(k=w,N=w,Z=An(),Z!==r?(Ee=An(),Ee!==r?(Z=[Z,Ee],N=Z):(w=N,N=r)):(w=N,N=r),N!==r?k=t.substring(k,w):k=N,k!==r?(Re=C,Q=Zm(k),C=Q):(w=C,C=r)):(w=C,C=r),C===r&&(C=w,t.substr(w,2)===Yo?(Q=Yo,w+=2):(Q=r,we===0&&ve($m)),Q!==r?(k=w,N=w,Z=An(),Z!==r?(Ee=An(),Ee!==r?(ot=An(),ot!==r?(ut=An(),ut!==r?(Z=[Z,Ee,ot,ut],N=Z):(w=N,N=r)):(w=N,N=r)):(w=N,N=r)):(w=N,N=r),N!==r?k=t.substring(k,w):k=N,k!==r?(Re=C,Q=Zm(k),C=Q):(w=C,C=r)):(w=C,C=r),C===r&&(C=w,t.substr(w,2)===_a?(Q=_a,w+=2):(Q=r,we===0&&ve(et)),Q!==r?(k=w,N=w,Z=An(),Z!==r?(Ee=An(),Ee!==r?(ot=An(),ot!==r?(ut=An(),ut!==r?(Tr=An(),Tr!==r?(ni=An(),ni!==r?(Yn=An(),Yn!==r?($Q=An(),$Q!==r?(Z=[Z,Ee,ot,ut,Tr,ni,Yn,$Q],N=Z):(w=N,N=r)):(w=N,N=r)):(w=N,N=r)):(w=N,N=r)):(w=N,N=r)):(w=N,N=r)):(w=N,N=r)):(w=N,N=r),N!==r?k=t.substring(k,w):k=N,k!==r?(Re=C,Q=YQ(k),C=Q):(w=C,C=r)):(w=C,C=r))),C}function An(){var C;return eE.test(t.charAt(w))?(C=t.charAt(w),w++):(C=r,we===0&&ve(tE)),C}function Nfe(){var C,Q,k,N,Z;if(C=w,Q=[],k=w,t.charCodeAt(w)===92?(N=Va,w++):(N=r,we===0&&ve(jo)),N!==r?(t.length>w?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Xa)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r),k===r&&(k=w,N=w,we++,Z=aO(),we--,Z===r?N=void 0:(w=N,N=r),N!==r?(t.length>w?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Xa)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r)),k!==r)for(;k!==r;)Q.push(k),k=w,t.charCodeAt(w)===92?(N=Va,w++):(N=r,we===0&&ve(jo)),N!==r?(t.length>w?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Xa)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r),k===r&&(k=w,N=w,we++,Z=aO(),we--,Z===r?N=void 0:(w=N,N=r),N!==r?(t.length>w?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Xa)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r));else Q=r;return Q!==r&&(Re=C,Q=il(Q)),C=Q,C}function _Q(){var C,Q,k,N,Z,Ee;if(C=w,t.charCodeAt(w)===45?(Q=sl,w++):(Q=r,we===0&&ve(ol)),Q===r&&(t.charCodeAt(w)===43?(Q=al,w++):(Q=r,we===0&&ve(qo))),Q===r&&(Q=null),Q!==r){if(k=[],De.test(t.charAt(w))?(N=t.charAt(w),w++):(N=r,we===0&&ve($)),N!==r)for(;N!==r;)k.push(N),De.test(t.charAt(w))?(N=t.charAt(w),w++):(N=r,we===0&&ve($));else k=r;if(k!==r)if(t.charCodeAt(w)===46?(N=Al,w++):(N=r,we===0&&ve(qQ)),N!==r){if(Z=[],De.test(t.charAt(w))?(Ee=t.charAt(w),w++):(Ee=r,we===0&&ve($)),Ee!==r)for(;Ee!==r;)Z.push(Ee),De.test(t.charAt(w))?(Ee=t.charAt(w),w++):(Ee=r,we===0&&ve($));else Z=r;Z!==r?(Re=C,Q=rE(Q,k,Z),C=Q):(w=C,C=r)}else w=C,C=r;else w=C,C=r}else w=C,C=r;if(C===r){if(C=w,t.charCodeAt(w)===45?(Q=sl,w++):(Q=r,we===0&&ve(ol)),Q===r&&(t.charCodeAt(w)===43?(Q=al,w++):(Q=r,we===0&&ve(qo))),Q===r&&(Q=null),Q!==r){if(k=[],De.test(t.charAt(w))?(N=t.charAt(w),w++):(N=r,we===0&&ve($)),N!==r)for(;N!==r;)k.push(N),De.test(t.charAt(w))?(N=t.charAt(w),w++):(N=r,we===0&&ve($));else k=r;k!==r?(Re=C,Q=iE(Q,k),C=Q):(w=C,C=r)}else w=C,C=r;if(C===r&&(C=w,Q=ZQ(),Q!==r&&(Re=C,Q=JQ(Q)),C=Q,C===r&&(C=w,Q=zf(),Q!==r&&(Re=C,Q=ll(Q)),C=Q,C===r)))if(C=w,t.charCodeAt(w)===40?(Q=W,w++):(Q=r,we===0&&ve(X)),Q!==r){for(k=[],N=ke();N!==r;)k.push(N),N=ke();if(k!==r)if(N=iO(),N!==r){for(Z=[],Ee=ke();Ee!==r;)Z.push(Ee),Ee=ke();Z!==r?(t.charCodeAt(w)===41?(Ee=F,w++):(Ee=r,we===0&&ve(D)),Ee!==r?(Re=C,Q=WQ(N),C=Q):(w=C,C=r)):(w=C,C=r)}else w=C,C=r;else w=C,C=r}else w=C,C=r}return C}function XQ(){var C,Q,k,N,Z,Ee,ot,ut;if(C=w,Q=_Q(),Q!==r){for(k=[],N=w,Z=[],Ee=ke();Ee!==r;)Z.push(Ee),Ee=ke();if(Z!==r)if(t.charCodeAt(w)===42?(Ee=nE,w++):(Ee=r,we===0&&ve(Gf)),Ee===r&&(t.charCodeAt(w)===47?(Ee=_c,w++):(Ee=r,we===0&&ve(jf))),Ee!==r){for(ot=[],ut=ke();ut!==r;)ot.push(ut),ut=ke();ot!==r?(ut=_Q(),ut!==r?(Re=N,Z=sE(Q,Ee,ut),N=Z):(w=N,N=r)):(w=N,N=r)}else w=N,N=r;else w=N,N=r;for(;N!==r;){for(k.push(N),N=w,Z=[],Ee=ke();Ee!==r;)Z.push(Ee),Ee=ke();if(Z!==r)if(t.charCodeAt(w)===42?(Ee=nE,w++):(Ee=r,we===0&&ve(Gf)),Ee===r&&(t.charCodeAt(w)===47?(Ee=_c,w++):(Ee=r,we===0&&ve(jf))),Ee!==r){for(ot=[],ut=ke();ut!==r;)ot.push(ut),ut=ke();ot!==r?(ut=_Q(),ut!==r?(Re=N,Z=sE(Q,Ee,ut),N=Z):(w=N,N=r)):(w=N,N=r)}else w=N,N=r;else w=N,N=r}k!==r?(Re=C,Q=cl(Q,k),C=Q):(w=C,C=r)}else w=C,C=r;return C}function iO(){var C,Q,k,N,Z,Ee,ot,ut;if(C=w,Q=XQ(),Q!==r){for(k=[],N=w,Z=[],Ee=ke();Ee!==r;)Z.push(Ee),Ee=ke();if(Z!==r)if(t.charCodeAt(w)===43?(Ee=al,w++):(Ee=r,we===0&&ve(qo)),Ee===r&&(t.charCodeAt(w)===45?(Ee=sl,w++):(Ee=r,we===0&&ve(ol))),Ee!==r){for(ot=[],ut=ke();ut!==r;)ot.push(ut),ut=ke();ot!==r?(ut=XQ(),ut!==r?(Re=N,Z=oE(Q,Ee,ut),N=Z):(w=N,N=r)):(w=N,N=r)}else w=N,N=r;else w=N,N=r;for(;N!==r;){for(k.push(N),N=w,Z=[],Ee=ke();Ee!==r;)Z.push(Ee),Ee=ke();if(Z!==r)if(t.charCodeAt(w)===43?(Ee=al,w++):(Ee=r,we===0&&ve(qo)),Ee===r&&(t.charCodeAt(w)===45?(Ee=sl,w++):(Ee=r,we===0&&ve(ol))),Ee!==r){for(ot=[],ut=ke();ut!==r;)ot.push(ut),ut=ke();ot!==r?(ut=XQ(),ut!==r?(Re=N,Z=oE(Q,Ee,ut),N=Z):(w=N,N=r)):(w=N,N=r)}else w=N,N=r;else w=N,N=r}k!==r?(Re=C,Q=cl(Q,k),C=Q):(w=C,C=r)}else w=C,C=r;return C}function nO(){var C,Q,k,N,Z,Ee;if(C=w,t.substr(w,3)===Yf?(Q=Yf,w+=3):(Q=r,we===0&&ve(Xc)),Q!==r){for(k=[],N=ke();N!==r;)k.push(N),N=ke();if(k!==r)if(N=iO(),N!==r){for(Z=[],Ee=ke();Ee!==r;)Z.push(Ee),Ee=ke();Z!==r?(t.substr(w,2)===xr?(Ee=xr,w+=2):(Ee=r,we===0&&ve(KM)),Ee!==r?(Re=C,Q=Jo(N),C=Q):(w=C,C=r)):(w=C,C=r)}else w=C,C=r;else w=C,C=r}else w=C,C=r;return C}function sO(){var C,Q,k,N;return C=w,t.substr(w,2)===Zs?(Q=Zs,w+=2):(Q=r,we===0&&ve(aE)),Q!==r?(k=Jf(),k!==r?(t.charCodeAt(w)===41?(N=F,w++):(N=r,we===0&&ve(D)),N!==r?(Re=C,Q=Zc(k),C=Q):(w=C,C=r)):(w=C,C=r)):(w=C,C=r),C}function ZQ(){var C,Q,k,N,Z,Ee;return C=w,t.substr(w,2)===x?(Q=x,w+=2):(Q=r,we===0&&ve(U)),Q!==r?(k=zf(),k!==r?(t.substr(w,2)===le?(N=le,w+=2):(N=r,we===0&&ve(xe)),N!==r?(Z=Sfe(),Z!==r?(t.charCodeAt(w)===125?(Ee=Pe,w++):(Ee=r,we===0&&ve(qe)),Ee!==r?(Re=C,Q=Qe(k,Z),C=Q):(w=C,C=r)):(w=C,C=r)):(w=C,C=r)):(w=C,C=r)):(w=C,C=r),C===r&&(C=w,t.substr(w,2)===x?(Q=x,w+=2):(Q=r,we===0&&ve(U)),Q!==r?(k=zf(),k!==r?(t.substr(w,3)===Ge?(N=Ge,w+=3):(N=r,we===0&&ve(ct)),N!==r?(Re=C,Q=sr(k),C=Q):(w=C,C=r)):(w=C,C=r)):(w=C,C=r),C===r&&(C=w,t.substr(w,2)===x?(Q=x,w+=2):(Q=r,we===0&&ve(U)),Q!==r?(k=zf(),k!==r?(t.charCodeAt(w)===125?(N=Pe,w++):(N=r,we===0&&ve(qe)),N!==r?(Re=C,Q=Wo(k),C=Q):(w=C,C=r)):(w=C,C=r)):(w=C,C=r),C===r&&(C=w,t.charCodeAt(w)===36?(Q=Afe,w++):(Q=r,we===0&&ve(lfe)),Q!==r?(k=zf(),k!==r?(Re=C,Q=Wo(k),C=Q):(w=C,C=r)):(w=C,C=r)))),C}function Lfe(){var C,Q,k;return C=w,Q=Tfe(),Q!==r?(Re=w,k=cfe(Q),k?k=void 0:k=r,k!==r?(Re=C,Q=ufe(Q),C=Q):(w=C,C=r)):(w=C,C=r),C}function Tfe(){var C,Q,k,N,Z;if(C=w,Q=[],k=w,N=w,we++,Z=AO(),we--,Z===r?N=void 0:(w=N,N=r),N!==r?(t.length>w?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Xa)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r),k!==r)for(;k!==r;)Q.push(k),k=w,N=w,we++,Z=AO(),we--,Z===r?N=void 0:(w=N,N=r),N!==r?(t.length>w?(Z=t.charAt(w),w++):(Z=r,we===0&&ve(Xa)),Z!==r?(Re=k,N=te(Z),k=N):(w=k,k=r)):(w=k,k=r);else Q=r;return Q!==r&&(Re=C,Q=il(Q)),C=Q,C}function oO(){var C,Q,k;if(C=w,Q=[],UM.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve(HM)),k!==r)for(;k!==r;)Q.push(k),UM.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve(HM));else Q=r;return Q!==r&&(Re=C,Q=GM()),C=Q,C}function zf(){var C,Q,k;if(C=w,Q=[],jM.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve(YM)),k!==r)for(;k!==r;)Q.push(k),jM.test(t.charAt(w))?(k=t.charAt(w),w++):(k=r,we===0&&ve(YM));else Q=r;return Q!==r&&(Re=C,Q=GM()),C=Q,C}function aO(){var C;return gfe.test(t.charAt(w))?(C=t.charAt(w),w++):(C=r,we===0&&ve(ffe)),C}function AO(){var C;return hfe.test(t.charAt(w))?(C=t.charAt(w),w++):(C=r,we===0&&ve(pfe)),C}function ke(){var C,Q;if(C=[],qM.test(t.charAt(w))?(Q=t.charAt(w),w++):(Q=r,we===0&&ve(JM)),Q!==r)for(;Q!==r;)C.push(Q),qM.test(t.charAt(w))?(Q=t.charAt(w),w++):(Q=r,we===0&&ve(JM));else C=r;return C}if(lE=n(),lE!==r&&w===t.length)return lE;throw lE!==r&&w{"use strict";function Eke(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Xl(t,e,r,i){this.message=t,this.expected=e,this.found=r,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Xl)}Eke(Xl,Error);Xl.buildMessage=function(t,e){var r={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=B,L=[]),L.push($))}function qe($,G){return new Xl($,null,null,G)}function re($,G,Ce){return new Xl(Xl.buildMessage($,G),$,G,Ce)}function se(){var $,G,Ce,ee;return $=B,G=be(),G!==r?(t.charCodeAt(B)===47?(Ce=s,B++):(Ce=r,K===0&&Pe(o)),Ce!==r?(ee=be(),ee!==r?(b=$,G=a(G,ee),$=G):(B=$,$=r)):(B=$,$=r)):(B=$,$=r),$===r&&($=B,G=be(),G!==r&&(b=$,G=l(G)),$=G),$}function be(){var $,G,Ce,ee;return $=B,G=ae(),G!==r?(t.charCodeAt(B)===64?(Ce=c,B++):(Ce=r,K===0&&Pe(u)),Ce!==r?(ee=De(),ee!==r?(b=$,G=g(G,ee),$=G):(B=$,$=r)):(B=$,$=r)):(B=$,$=r),$===r&&($=B,G=ae(),G!==r&&(b=$,G=f(G)),$=G),$}function ae(){var $,G,Ce,ee,Ue;return $=B,t.charCodeAt(B)===64?(G=c,B++):(G=r,K===0&&Pe(u)),G!==r?(Ce=Ae(),Ce!==r?(t.charCodeAt(B)===47?(ee=s,B++):(ee=r,K===0&&Pe(o)),ee!==r?(Ue=Ae(),Ue!==r?(b=$,G=h(),$=G):(B=$,$=r)):(B=$,$=r)):(B=$,$=r)):(B=$,$=r),$===r&&($=B,G=Ae(),G!==r&&(b=$,G=h()),$=G),$}function Ae(){var $,G,Ce;if($=B,G=[],p.test(t.charAt(B))?(Ce=t.charAt(B),B++):(Ce=r,K===0&&Pe(d)),Ce!==r)for(;Ce!==r;)G.push(Ce),p.test(t.charAt(B))?(Ce=t.charAt(B),B++):(Ce=r,K===0&&Pe(d));else G=r;return G!==r&&(b=$,G=h()),$=G,$}function De(){var $,G,Ce;if($=B,G=[],m.test(t.charAt(B))?(Ce=t.charAt(B),B++):(Ce=r,K===0&&Pe(I)),Ce!==r)for(;Ce!==r;)G.push(Ce),m.test(t.charAt(B))?(Ce=t.charAt(B),B++):(Ce=r,K===0&&Pe(I));else G=r;return G!==r&&(b=$,G=h()),$=G,$}if(J=n(),J!==r&&B===t.length)return J;throw J!==r&&B{"use strict";function F4(t){return typeof t=="undefined"||t===null}function yke(t){return typeof t=="object"&&t!==null}function wke(t){return Array.isArray(t)?t:F4(t)?[]:[t]}function Bke(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r{"use strict";function Lp(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||""}Lp.prototype=Object.create(Error.prototype);Lp.prototype.constructor=Lp;Lp.prototype.toString=function(e){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!e&&this.mark&&(r+=" "+this.mark.toString()),r};N4.exports=Lp});var M4=E((Vot,L4)=>{"use strict";var T4=$l();function kP(t,e,r,i,n){this.name=t,this.buffer=e,this.position=r,this.line=i,this.column=n}kP.prototype.getSnippet=function(e,r){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,r=r||75,i="",n=this.position;n>0&&`\0\r -\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>r/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;or/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),T4.repeat(" ",e)+i+a+s+` -`+T4.repeat(" ",e+this.position-n+i.length)+"^"};kP.prototype.toString=function(e){var r,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(i+=`: -`+r)),i};L4.exports=kP});var Xr=E((_ot,O4)=>{"use strict";var K4=ng(),vke=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Ske=["scalar","sequence","mapping"];function xke(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function kke(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(vke.indexOf(r)===-1)throw new K4('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=xke(e.styleAliases||null),Ske.indexOf(this.kind)===-1)throw new K4('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}O4.exports=kke});var ec=E((Xot,U4)=>{"use strict";var H4=$l(),hw=ng(),Pke=Xr();function PP(t,e,r){var i=[];return t.include.forEach(function(n){r=PP(n,e,r)}),t[e].forEach(function(n){r.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),r.push(n)}),r.filter(function(n,s){return i.indexOf(s)===-1})}function Dke(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function i(n){t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e{"use strict";var Rke=Xr();G4.exports=new Rke("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var q4=E(($ot,Y4)=>{"use strict";var Fke=Xr();Y4.exports=new Fke("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var W4=E((eat,J4)=>{"use strict";var Nke=Xr();J4.exports=new Nke("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var pw=E((tat,z4)=>{"use strict";var Lke=ec();z4.exports=new Lke({explicit:[j4(),q4(),W4()]})});var _4=E((rat,V4)=>{"use strict";var Tke=Xr();function Mke(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function Oke(){return null}function Kke(t){return t===null}V4.exports=new Tke("tag:yaml.org,2002:null",{kind:"scalar",resolve:Mke,construct:Oke,predicate:Kke,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var Z4=E((iat,X4)=>{"use strict";var Uke=Xr();function Hke(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 jke(t){return Object.prototype.toString.call(t)==="[object Boolean]"}X4.exports=new Uke("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Hke,construct:Gke,predicate:jke,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 ez=E((nat,$4)=>{"use strict";var Yke=$l(),qke=Xr();function Jke(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function Wke(t){return 48<=t&&t<=55}function zke(t){return 48<=t&&t<=57}function Vke(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r=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 iz=E((sat,tz)=>{"use strict";var rz=$l(),Zke=Xr(),$ke=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 ePe(t){return!(t===null||!$ke.test(t)||t[t.length-1]==="_")}function tPe(t){var e,r,i,n;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,n=[],"+-".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(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),r*e):r*parseFloat(e,10)}var rPe=/^[-+]?[0-9]+e/;function iPe(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(rz.isNegativeZero(t))return"-0.0";return r=t.toString(10),rPe.test(r)?r.replace("e",".e"):r}function nPe(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!=0||rz.isNegativeZero(t))}tz.exports=new Zke("tag:yaml.org,2002:float",{kind:"scalar",resolve:ePe,construct:tPe,predicate:nPe,represent:iPe,defaultStyle:"lowercase"})});var DP=E((oat,nz)=>{"use strict";var sPe=ec();nz.exports=new sPe({include:[pw()],implicit:[_4(),Z4(),ez(),iz()]})});var RP=E((aat,sz)=>{"use strict";var oPe=ec();sz.exports=new oPe({include:[DP()]})});var lz=E((Aat,oz)=>{"use strict";var aPe=Xr(),az=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Az=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 APe(t){return t===null?!1:az.exec(t)!==null||Az.exec(t)!==null}function lPe(t){var e,r,i,n,s,o,a,l=0,c=null,u,g,f;if(e=az.exec(t),e===null&&(e=Az.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function cPe(t){return t.toISOString()}oz.exports=new aPe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:APe,construct:lPe,instanceOf:Date,represent:cPe})});var uz=E((lat,cz)=>{"use strict";var uPe=Xr();function gPe(t){return t==="<<"||t===null}cz.exports=new uPe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:gPe})});var hz=E((cat,gz)=>{"use strict";var tc;try{fz=require,tc=fz("buffer").Buffer}catch(t){}var fz,fPe=Xr(),FP=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function hPe(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=FP;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8==0}function pPe(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=FP,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),tc?tc.from?tc.from(a):new tc(a):a}function dPe(t){var e="",r=0,i,n,s=t.length,o=FP;for(i=0;i>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):n===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):n===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function CPe(t){return tc&&tc.isBuffer(t)}gz.exports=new fPe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:hPe,construct:pPe,predicate:CPe,represent:dPe})});var dz=E((uat,pz)=>{"use strict";var mPe=Xr(),EPe=Object.prototype.hasOwnProperty,IPe=Object.prototype.toString;function yPe(t){if(t===null)return!0;var e=[],r,i,n,s,o,a=t;for(r=0,i=a.length;r{"use strict";var BPe=Xr(),QPe=Object.prototype.toString;function bPe(t){if(t===null)return!0;var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e{"use strict";var SPe=Xr(),xPe=Object.prototype.hasOwnProperty;function kPe(t){if(t===null)return!0;var e,r=t;for(e in r)if(xPe.call(r,e)&&r[e]!==null)return!1;return!0}function PPe(t){return t!==null?t:{}}Ez.exports=new SPe("tag:yaml.org,2002:set",{kind:"mapping",resolve:kPe,construct:PPe})});var og=E((hat,yz)=>{"use strict";var DPe=ec();yz.exports=new DPe({include:[RP()],implicit:[lz(),uz()],explicit:[hz(),dz(),mz(),Iz()]})});var Bz=E((pat,wz)=>{"use strict";var RPe=Xr();function FPe(){return!0}function NPe(){}function LPe(){return""}function TPe(t){return typeof t=="undefined"}wz.exports=new RPe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:FPe,construct:NPe,predicate:TPe,represent:LPe})});var bz=E((dat,Qz)=>{"use strict";var MPe=Xr();function OPe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),i="";return!(e[0]==="/"&&(r&&(i=r[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function KPe(t){var e=t,r=/\/([gim]*)$/.exec(t),i="";return e[0]==="/"&&(r&&(i=r[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function UPe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function HPe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}Qz.exports=new MPe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:OPe,construct:KPe,predicate:HPe,represent:UPe})});var xz=E((Cat,vz)=>{"use strict";var dw;try{Sz=require,dw=Sz("esprima")}catch(t){typeof window!="undefined"&&(dw=window.esprima)}var Sz,GPe=Xr();function jPe(t){if(t===null)return!1;try{var e="("+t+")",r=dw.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(i){return!1}}function YPe(t){var e="("+t+")",r=dw.parse(e,{range:!0}),i=[],n;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(s){i.push(s.name)}),n=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function qPe(t){return t.toString()}function JPe(t){return Object.prototype.toString.call(t)==="[object Function]"}vz.exports=new GPe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:jPe,construct:YPe,predicate:JPe,represent:qPe})});var Tp=E((mat,kz)=>{"use strict";var Pz=ec();kz.exports=Pz.DEFAULT=new Pz({include:[og()],explicit:[Bz(),bz(),xz()]})});var Vz=E((Eat,Mp)=>{"use strict";var Ba=$l(),Dz=ng(),WPe=M4(),Rz=og(),zPe=Tp(),QA=Object.prototype.hasOwnProperty,Cw=1,Fz=2,Nz=3,mw=4,NP=1,VPe=2,Lz=3,_Pe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,XPe=/[\x85\u2028\u2029]/,ZPe=/[,\[\]\{\}]/,Tz=/^(?:!|!!|![a-z\-]+!)$/i,Mz=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Oz(t){return Object.prototype.toString.call(t)}function wo(t){return t===10||t===13}function rc(t){return t===9||t===32}function yn(t){return t===9||t===32||t===10||t===13}function ag(t){return t===44||t===91||t===93||t===123||t===125}function $Pe(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function eDe(t){return t===120?2:t===117?4:t===85?8:0}function tDe(t){return 48<=t&&t<=57?t-48:-1}function Kz(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?` -`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function rDe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Uz=new Array(256),Hz=new Array(256);for(var Ag=0;Ag<256;Ag++)Uz[Ag]=Kz(Ag)?1:0,Hz[Ag]=Kz(Ag);function iDe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||zPe,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 Gz(t,e){return new Dz(e,new WPe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function st(t,e){throw Gz(t,e)}function Ew(t,e){t.onWarning&&t.onWarning.call(null,Gz(t,e))}var jz={YAML:function(e,r,i){var n,s,o;e.version!==null&&st(e,"duplication of %YAML directive"),i.length!==1&&st(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&st(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&st(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&Ew(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&st(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],Tz.test(n)||st(e,"ill-formed tag handle (first argument) of the TAG directive"),QA.call(e.tagMap,n)&&st(e,'there is a previously declared suffix for "'+n+'" tag handle'),Mz.test(s)||st(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function bA(t,e,r,i){var n,s,o,a;if(e1&&(t.result+=Ba.repeat(` -`,e-1))}function nDe(t,e,r){var i,n,s,o,a,l,c,u,g=t.kind,f=t.result,h;if(h=t.input.charCodeAt(t.position),yn(h)||ag(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=t.input.charCodeAt(t.position+1),yn(n)||r&&ag(n)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;h!==0;){if(h===58){if(n=t.input.charCodeAt(t.position+1),yn(n)||r&&ag(n))break}else if(h===35){if(i=t.input.charCodeAt(t.position-1),yn(i))break}else{if(t.position===t.lineStart&&Iw(t)||r&&ag(h))break;if(wo(h))if(l=t.line,c=t.lineStart,u=t.lineIndent,jr(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=c,t.lineIndent=u;break}}a&&(bA(t,s,o,!1),TP(t,t.line-l),s=o=t.position,a=!1),rc(h)||(o=t.position+1),h=t.input.charCodeAt(++t.position)}return bA(t,s,o,!1),t.result?!0:(t.kind=g,t.result=f,!1)}function sDe(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(bA(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else wo(r)?(bA(t,i,n,!0),TP(t,jr(t,!1,e)),i=n=t.position):t.position===t.lineStart&&Iw(t)?st(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);st(t,"unexpected end of the stream within a single quoted scalar")}function oDe(t,e){var r,i,n,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return bA(t,r,t.position,!0),t.position++,!0;if(a===92){if(bA(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),wo(a))jr(t,!1,e);else if(a<256&&Uz[a])t.result+=Hz[a],t.position++;else if((o=eDe(a))>0){for(n=o,s=0;n>0;n--)a=t.input.charCodeAt(++t.position),(o=$Pe(a))>=0?s=(s<<4)+o:st(t,"expected hexadecimal character");t.result+=rDe(s),t.position++}else st(t,"unknown escape sequence");r=i=t.position}else wo(a)?(bA(t,r,i,!0),TP(t,jr(t,!1,e)),r=i=t.position):t.position===t.lineStart&&Iw(t)?st(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}st(t,"unexpected end of the stream within a double quoted scalar")}function aDe(t,e){var r=!0,i,n=t.tag,s,o=t.anchor,a,l,c,u,g,f={},h,p,d,m;if(m=t.input.charCodeAt(t.position),m===91)l=93,g=!1,s=[];else if(m===123)l=125,g=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),m=t.input.charCodeAt(++t.position);m!==0;){if(jr(t,!0,e),m=t.input.charCodeAt(t.position),m===l)return t.position++,t.tag=n,t.anchor=o,t.kind=g?"mapping":"sequence",t.result=s,!0;r||st(t,"missed comma between flow collection entries"),p=h=d=null,c=u=!1,m===63&&(a=t.input.charCodeAt(t.position+1),yn(a)&&(c=u=!0,t.position++,jr(t,!0,e))),i=t.line,cg(t,e,Cw,!1,!0),p=t.tag,h=t.result,jr(t,!0,e),m=t.input.charCodeAt(t.position),(u||t.line===i)&&m===58&&(c=!0,m=t.input.charCodeAt(++t.position),jr(t,!0,e),cg(t,e,Cw,!1,!0),d=t.result),g?lg(t,s,f,p,h,d):c?s.push(lg(t,null,f,p,h,d)):s.push(h),jr(t,!0,e),m=t.input.charCodeAt(t.position),m===44?(r=!0,m=t.input.charCodeAt(++t.position)):r=!1}st(t,"unexpected end of the stream within a flow collection")}function ADe(t,e){var r,i,n=NP,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=t.input.charCodeAt(t.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(t.kind="scalar",t.result="";g!==0;)if(g=t.input.charCodeAt(++t.position),g===43||g===45)NP===n?n=g===43?Lz:VPe:st(t,"repeat of a chomping mode identifier");else if((u=tDe(g))>=0)u===0?st(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?st(t,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(rc(g)){do g=t.input.charCodeAt(++t.position);while(rc(g));if(g===35)do g=t.input.charCodeAt(++t.position);while(!wo(g)&&g!==0)}for(;g!==0;){for(LP(t),t.lineIndent=0,g=t.input.charCodeAt(t.position);(!o||t.lineIndenta&&(a=t.lineIndent),wo(g)){l++;continue}if(t.lineIndente)&&l!==0)st(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(cg(t,e,mw,!0,n)&&(p?f=t.result:h=t.result),p||(lg(t,c,u,g,f,h,s,o),g=f=h=null),jr(t,!0,-1),m=t.input.charCodeAt(t.position)),t.lineIndent>e&&m!==0)st(t,"bad indentation of a mapping entry");else if(t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndente?l=1:t.lineIndent===e?l=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),g=0,f=t.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+t.kind+'"'),h.resolve(t.result)?(t.result=h.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):st(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):st(t,"unknown tag !<"+t.tag+">");return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}function fDe(t){var e=t.position,r,i,n,s=!1,o;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(o=t.input.charCodeAt(t.position))!==0&&(jr(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||o!==37));){for(s=!0,o=t.input.charCodeAt(++t.position),r=t.position;o!==0&&!yn(o);)o=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&st(t,"directive name must not be less than one character in length");o!==0;){for(;rc(o);)o=t.input.charCodeAt(++t.position);if(o===35){do o=t.input.charCodeAt(++t.position);while(o!==0&&!wo(o));break}if(wo(o))break;for(r=t.position;o!==0&&!yn(o);)o=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}o!==0&&LP(t),QA.call(jz,i)?jz[i](t,i,n):Ew(t,'unknown document directive "'+i+'"')}if(jr(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,jr(t,!0,-1)):s&&st(t,"directives end mark is expected"),cg(t,t.lineIndent-1,mw,!1,!0),jr(t,!0,-1),t.checkLineBreaks&&XPe.test(t.input.slice(e,t.position))&&Ew(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Iw(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,jr(t,!0,-1));return}if(t.position{"use strict";var Op=$l(),Kp=ng(),dDe=Tp(),CDe=og(),_z=Object.prototype.toString,Xz=Object.prototype.hasOwnProperty,mDe=9,Up=10,EDe=13,IDe=32,yDe=33,wDe=34,Zz=35,BDe=37,QDe=38,bDe=39,vDe=42,$z=44,SDe=45,e5=58,xDe=61,kDe=62,PDe=63,DDe=64,t5=91,r5=93,RDe=96,i5=123,FDe=124,n5=125,Ri={};Ri[0]="\\0";Ri[7]="\\a";Ri[8]="\\b";Ri[9]="\\t";Ri[10]="\\n";Ri[11]="\\v";Ri[12]="\\f";Ri[13]="\\r";Ri[27]="\\e";Ri[34]='\\"';Ri[92]="\\\\";Ri[133]="\\N";Ri[160]="\\_";Ri[8232]="\\L";Ri[8233]="\\P";var NDe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function LDe(t,e){var r,i,n,s,o,a,l;if(e===null)return{};for(r={},i=Object.keys(e),n=0,s=i.length;n0?t.charCodeAt(s-1):null,f=f&&a5(o,a)}else{for(s=0;si&&t[g+1]!==" ",g=s);else if(!ug(o))return yw;a=s>0?t.charCodeAt(s-1):null,f=f&&a5(o,a)}c=c||u&&s-g-1>i&&t[g+1]!==" "}return!l&&!c?f&&!n(t)?l5:c5:r>9&&A5(t)?yw:c?g5:u5}function jDe(t,e,r,i){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&NDe.indexOf(e)!==-1)return"'"+e+"'";var n=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),o=i||t.flowLevel>-1&&r>=t.flowLevel;function a(l){return MDe(t,l)}switch(UDe(e,o,t.indent,s,a)){case l5:return e;case c5:return"'"+e.replace(/'/g,"''")+"'";case u5:return"|"+f5(e,t.indent)+h5(o5(e,n));case g5:return">"+f5(e,t.indent)+h5(o5(HDe(e,s),n));case yw:return'"'+GDe(e,s)+'"';default:throw new Kp("impossible error: invalid scalar style")}}()}function f5(t,e){var r=A5(t)?String(e):"",i=t[t.length-1]===` -`,n=i&&(t[t.length-2]===` -`||t===` -`),s=n?"+":i?"":"-";return r+s+` -`}function h5(t){return t[t.length-1]===` -`?t.slice(0,-1):t}function HDe(t,e){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=t.indexOf(` -`);return c=c!==-1?c:t.length,r.lastIndex=c,p5(t.slice(0,c),e)}(),n=t[0]===` -`||t[0]===" ",s,o;o=r.exec(t);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` -`:"")+p5(l,e),n=s}return i}function p5(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=r.exec(t);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` -`+t.slice(n,s),n=s+1),o=a;return l+=` -`,t.length-n>e&&o>n?l+=t.slice(n,o)+` -`+t.slice(o+1):l+=t.slice(n),l.slice(1)}function GDe(t){for(var e="",r,i,n,s=0;s=55296&&r<=56319&&(i=t.charCodeAt(s+1),i>=56320&&i<=57343)){e+=s5((r-55296)*1024+i-56320+65536),s++;continue}n=Ri[r],e+=!n&&ug(r)?t[s]:n||s5(r)}return e}function YDe(t,e,r){var i="",n=t.tag,s,o;for(s=0,o=r.length;s1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),!!ic(t,e,c,!1,!1)&&(u+=t.dump,i+=u));t.tag=n,t.dump="{"+i+"}"}function WDe(t,e,r,i){var n="",s=t.tag,o=Object.keys(r),a,l,c,u,g,f;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new Kp("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(t.dump&&Up===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,g&&(f+=OP(t,e)),!!ic(t,e+1,u,!0,g)&&(t.dump&&Up===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,n+=f));t.tag=s,t.dump=n||"{}"}function d5(t,e,r){var i,n,s,o,a,l;for(n=r?t.explicitTypes:t.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');t.dump=i}return!0}return!1}function ic(t,e,r,i,n,s){t.tag=null,t.dump=r,d5(t,r,!1)||d5(t,r,!0);var o=_z.call(t.dump);i&&(i=t.flowLevel<0||t.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=t.duplicates.indexOf(r),c=l!==-1),(t.tag!==null&&t.tag!=="?"||c||t.indent!==2&&e>0)&&(n=!1),c&&t.usedDuplicates[l])t.dump="*ref_"+l;else{if(a&&c&&!t.usedDuplicates[l]&&(t.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(t.dump).length!==0?(WDe(t,e,t.dump,n),c&&(t.dump="&ref_"+l+t.dump)):(JDe(t,e,t.dump),c&&(t.dump="&ref_"+l+" "+t.dump));else if(o==="[object Array]"){var u=t.noArrayIndent&&e>0?e-1:e;i&&t.dump.length!==0?(qDe(t,u,t.dump,n),c&&(t.dump="&ref_"+l+t.dump)):(YDe(t,u,t.dump),c&&(t.dump="&ref_"+l+" "+t.dump))}else if(o==="[object String]")t.tag!=="?"&&jDe(t,t.dump,e,s);else{if(t.skipInvalid)return!1;throw new Kp("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function zDe(t,e){var r=[],i=[],n,s;for(UP(t,r,i),n=0,s=i.length;n{"use strict";var ww=Vz(),E5=m5();function Bw(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Qr.exports.Type=Xr();Qr.exports.Schema=ec();Qr.exports.FAILSAFE_SCHEMA=pw();Qr.exports.JSON_SCHEMA=DP();Qr.exports.CORE_SCHEMA=RP();Qr.exports.DEFAULT_SAFE_SCHEMA=og();Qr.exports.DEFAULT_FULL_SCHEMA=Tp();Qr.exports.load=ww.load;Qr.exports.loadAll=ww.loadAll;Qr.exports.safeLoad=ww.safeLoad;Qr.exports.safeLoadAll=ww.safeLoadAll;Qr.exports.dump=E5.dump;Qr.exports.safeDump=E5.safeDump;Qr.exports.YAMLException=ng();Qr.exports.MINIMAL_SCHEMA=pw();Qr.exports.SAFE_SCHEMA=og();Qr.exports.DEFAULT_SCHEMA=Tp();Qr.exports.scan=Bw("scan");Qr.exports.parse=Bw("parse");Qr.exports.compose=Bw("compose");Qr.exports.addConstructor=Bw("addConstructor")});var w5=E((wat,y5)=>{"use strict";var _De=I5();y5.exports=_De});var Q5=E((Bat,B5)=>{"use strict";function XDe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function nc(t,e,r,i){this.message=t,this.expected=e,this.found=r,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,nc)}XDe(nc,Error);nc.buildMessage=function(t,e){var r={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[xe]:le})))},H=function(x){return x},L=function(x){return x},K=Yo("correct indentation"),J=" ",ne=fr(" ",!1),q=function(x){return x.length===Zc*aE},A=function(x){return x.length===(Zc+1)*aE},V=function(){return Zc++,!0},W=function(){return Zc--,!0},X=function(){return Xm()},F=Yo("pseudostring"),D=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,he=Bs(["\r",` -`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),pe=/^[^\r\n\t ,\][{}:#"']/,Ne=Bs(["\r",` -`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Pe=function(){return Xm().replace(/^ *| *$/g,"")},qe="--",re=fr("--",!1),se=/^[a-zA-Z\/0-9]/,be=Bs([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),ae=/^[^\r\n\t :,]/,Ae=Bs(["\r",` -`," "," ",":",","],!0,!1),De="null",$=fr("null",!1),G=function(){return null},Ce="true",ee=fr("true",!1),Ue=function(){return!0},Oe="false",vt=fr("false",!1),dt=function(){return!1},ri=Yo("string"),ii='"',an=fr('"',!1),yr=function(){return""},Ki=function(x){return x},Qi=function(x){return x.join("")},Go=/^[^"\\\0-\x1F\x7F]/,wr=Bs(['"',"\\",["\0",""],"\x7F"],!0,!1),Ui='\\"',ws=fr('\\"',!1),Tf=function(){return'"'},Mf="\\\\",Rm=fr("\\\\",!1),Fm=function(){return"\\"},Nm="\\/",DQ=fr("\\/",!1),RQ=function(){return"/"},Of="\\b",FQ=fr("\\b",!1),NQ=function(){return"\b"},Lm="\\f",LQ=fr("\\f",!1),Va=function(){return"\f"},jo="\\n",Tm=fr("\\n",!1),Mm=function(){return` -`},te="\\r",Om=fr("\\r",!1),Km=function(){return"\r"},il="\\t",Um=fr("\\t",!1),Hm=function(){return" "},Kf="\\u",Gm=fr("\\u",!1),jm=function(x,U,le,xe){return String.fromCharCode(parseInt(`0x${x}${U}${le}${xe}`))},TQ=/^[0-9a-fA-F]/,MQ=Bs([["0","9"],["a","f"],["A","F"]],!1,!1),Ym=Yo("blank space"),qm=/^[ \t]/,Jm=Bs([" "," "],!1,!1),Wm=Yo("white space"),zm=/^[ \t\n\r]/,Vm=Bs([" "," ",` -`,"\r"],!1,!1),Uf=`\r -`,OQ=fr(`\r -`,!1),KQ=` -`,_m=fr(` -`,!1),UQ="\r",HQ=fr("\r",!1),O=0,ht=0,Vc=[{line:1,column:1}],xn=0,Hf=[],Ye=0,nl;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function Xm(){return t.substring(ht,O)}function MM(){return _a(ht,O)}function GQ(x,U){throw U=U!==void 0?U:_a(ht,O),eE([Yo(x)],t.substring(ht,O),U)}function OM(x,U){throw U=U!==void 0?U:_a(ht,O),YQ(x,U)}function fr(x,U){return{type:"literal",text:x,ignoreCase:U}}function Bs(x,U,le){return{type:"class",parts:x,inverted:U,ignoreCase:le}}function jQ(){return{type:"any"}}function Zm(){return{type:"end"}}function Yo(x){return{type:"other",description:x}}function $m(x){var U=Vc[x],le;if(U)return U;for(le=x-1;!Vc[le];)le--;for(U=Vc[le],U={line:U.line,column:U.column};lexn&&(xn=O,Hf=[]),Hf.push(x))}function YQ(x,U){return new nc(x,null,null,U)}function eE(x,U,le){return new nc(nc.buildMessage(x,U),x,U,le)}function tE(){var x;return x=ol(),x}function Xa(){var x,U,le;for(x=O,U=[],le=sl();le!==r;)U.push(le),le=sl();return U!==r&&(ht=x,U=s(U)),x=U,x}function sl(){var x,U,le,xe,Qe;return x=O,U=Al(),U!==r?(t.charCodeAt(O)===45?(le=o,O++):(le=r,Ye===0&&et(a)),le!==r?(xe=xr(),xe!==r?(Qe=qo(),Qe!==r?(ht=x,U=l(Qe),x=U):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r),x}function ol(){var x,U,le;for(x=O,U=[],le=al();le!==r;)U.push(le),le=al();return U!==r&&(ht=x,U=c(U)),x=U,x}function al(){var x,U,le,xe,Qe,Ge,ct,sr,Wo;if(x=O,U=xr(),U===r&&(U=null),U!==r){if(le=O,t.charCodeAt(O)===35?(xe=u,O++):(xe=r,Ye===0&&et(g)),xe!==r){if(Qe=[],Ge=O,ct=O,Ye++,sr=Zs(),Ye--,sr===r?ct=void 0:(O=ct,ct=r),ct!==r?(t.length>O?(sr=t.charAt(O),O++):(sr=r,Ye===0&&et(f)),sr!==r?(ct=[ct,sr],Ge=ct):(O=Ge,Ge=r)):(O=Ge,Ge=r),Ge!==r)for(;Ge!==r;)Qe.push(Ge),Ge=O,ct=O,Ye++,sr=Zs(),Ye--,sr===r?ct=void 0:(O=ct,ct=r),ct!==r?(t.length>O?(sr=t.charAt(O),O++):(sr=r,Ye===0&&et(f)),sr!==r?(ct=[ct,sr],Ge=ct):(O=Ge,Ge=r)):(O=Ge,Ge=r);else Qe=r;Qe!==r?(xe=[xe,Qe],le=xe):(O=le,le=r)}else O=le,le=r;if(le===r&&(le=null),le!==r){if(xe=[],Qe=Jo(),Qe!==r)for(;Qe!==r;)xe.push(Qe),Qe=Jo();else xe=r;xe!==r?(ht=x,U=h(),x=U):(O=x,x=r)}else O=x,x=r}else O=x,x=r;if(x===r&&(x=O,U=Al(),U!==r?(le=JQ(),le!==r?(xe=xr(),xe===r&&(xe=null),xe!==r?(t.charCodeAt(O)===58?(Qe=p,O++):(Qe=r,Ye===0&&et(d)),Qe!==r?(Ge=xr(),Ge===r&&(Ge=null),Ge!==r?(ct=qo(),ct!==r?(ht=x,U=m(le,ct),x=U):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r),x===r&&(x=O,U=Al(),U!==r?(le=ll(),le!==r?(xe=xr(),xe===r&&(xe=null),xe!==r?(t.charCodeAt(O)===58?(Qe=p,O++):(Qe=r,Ye===0&&et(d)),Qe!==r?(Ge=xr(),Ge===r&&(Ge=null),Ge!==r?(ct=qo(),ct!==r?(ht=x,U=m(le,ct),x=U):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r),x===r))){if(x=O,U=Al(),U!==r)if(le=ll(),le!==r)if(xe=xr(),xe!==r)if(Qe=nE(),Qe!==r){if(Ge=[],ct=Jo(),ct!==r)for(;ct!==r;)Ge.push(ct),ct=Jo();else Ge=r;Ge!==r?(ht=x,U=m(le,Qe),x=U):(O=x,x=r)}else O=x,x=r;else O=x,x=r;else O=x,x=r;else O=x,x=r;if(x===r)if(x=O,U=Al(),U!==r)if(le=ll(),le!==r){if(xe=[],Qe=O,Ge=xr(),Ge===r&&(Ge=null),Ge!==r?(t.charCodeAt(O)===44?(ct=I,O++):(ct=r,Ye===0&&et(B)),ct!==r?(sr=xr(),sr===r&&(sr=null),sr!==r?(Wo=ll(),Wo!==r?(ht=Qe,Ge=b(le,Wo),Qe=Ge):(O=Qe,Qe=r)):(O=Qe,Qe=r)):(O=Qe,Qe=r)):(O=Qe,Qe=r),Qe!==r)for(;Qe!==r;)xe.push(Qe),Qe=O,Ge=xr(),Ge===r&&(Ge=null),Ge!==r?(t.charCodeAt(O)===44?(ct=I,O++):(ct=r,Ye===0&&et(B)),ct!==r?(sr=xr(),sr===r&&(sr=null),sr!==r?(Wo=ll(),Wo!==r?(ht=Qe,Ge=b(le,Wo),Qe=Ge):(O=Qe,Qe=r)):(O=Qe,Qe=r)):(O=Qe,Qe=r)):(O=Qe,Qe=r);else xe=r;xe!==r?(Qe=xr(),Qe===r&&(Qe=null),Qe!==r?(t.charCodeAt(O)===58?(Ge=p,O++):(Ge=r,Ye===0&&et(d)),Ge!==r?(ct=xr(),ct===r&&(ct=null),ct!==r?(sr=qo(),sr!==r?(ht=x,U=R(le,xe,sr),x=U):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)}else O=x,x=r;else O=x,x=r}return x}function qo(){var x,U,le,xe,Qe,Ge,ct;if(x=O,U=O,Ye++,le=O,xe=Zs(),xe!==r?(Qe=qQ(),Qe!==r?(t.charCodeAt(O)===45?(Ge=o,O++):(Ge=r,Ye===0&&et(a)),Ge!==r?(ct=xr(),ct!==r?(xe=[xe,Qe,Ge,ct],le=xe):(O=le,le=r)):(O=le,le=r)):(O=le,le=r)):(O=le,le=r),Ye--,le!==r?(O=U,U=void 0):U=r,U!==r?(le=Jo(),le!==r?(xe=rE(),xe!==r?(Qe=Xa(),Qe!==r?(Ge=iE(),Ge!==r?(ht=x,U=H(Qe),x=U):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r),x===r&&(x=O,U=Zs(),U!==r?(le=rE(),le!==r?(xe=ol(),xe!==r?(Qe=iE(),Qe!==r?(ht=x,U=H(xe),x=U):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r),x===r))if(x=O,U=WQ(),U!==r){if(le=[],xe=Jo(),xe!==r)for(;xe!==r;)le.push(xe),xe=Jo();else le=r;le!==r?(ht=x,U=L(U),x=U):(O=x,x=r)}else O=x,x=r;return x}function Al(){var x,U,le;for(Ye++,x=O,U=[],t.charCodeAt(O)===32?(le=J,O++):(le=r,Ye===0&&et(ne));le!==r;)U.push(le),t.charCodeAt(O)===32?(le=J,O++):(le=r,Ye===0&&et(ne));return U!==r?(ht=O,le=q(U),le?le=void 0:le=r,le!==r?(U=[U,le],x=U):(O=x,x=r)):(O=x,x=r),Ye--,x===r&&(U=r,Ye===0&&et(K)),x}function qQ(){var x,U,le;for(x=O,U=[],t.charCodeAt(O)===32?(le=J,O++):(le=r,Ye===0&&et(ne));le!==r;)U.push(le),t.charCodeAt(O)===32?(le=J,O++):(le=r,Ye===0&&et(ne));return U!==r?(ht=O,le=A(U),le?le=void 0:le=r,le!==r?(U=[U,le],x=U):(O=x,x=r)):(O=x,x=r),x}function rE(){var x;return ht=O,x=V(),x?x=void 0:x=r,x}function iE(){var x;return ht=O,x=W(),x?x=void 0:x=r,x}function JQ(){var x;return x=cl(),x===r&&(x=Gf()),x}function ll(){var x,U,le;if(x=cl(),x===r){if(x=O,U=[],le=_c(),le!==r)for(;le!==r;)U.push(le),le=_c();else U=r;U!==r&&(ht=x,U=X()),x=U}return x}function WQ(){var x;return x=jf(),x===r&&(x=sE(),x===r&&(x=cl(),x===r&&(x=Gf()))),x}function nE(){var x;return x=jf(),x===r&&(x=cl(),x===r&&(x=_c())),x}function Gf(){var x,U,le,xe,Qe,Ge;if(Ye++,x=O,D.test(t.charAt(O))?(U=t.charAt(O),O++):(U=r,Ye===0&&et(he)),U!==r){for(le=[],xe=O,Qe=xr(),Qe===r&&(Qe=null),Qe!==r?(pe.test(t.charAt(O))?(Ge=t.charAt(O),O++):(Ge=r,Ye===0&&et(Ne)),Ge!==r?(Qe=[Qe,Ge],xe=Qe):(O=xe,xe=r)):(O=xe,xe=r);xe!==r;)le.push(xe),xe=O,Qe=xr(),Qe===r&&(Qe=null),Qe!==r?(pe.test(t.charAt(O))?(Ge=t.charAt(O),O++):(Ge=r,Ye===0&&et(Ne)),Ge!==r?(Qe=[Qe,Ge],xe=Qe):(O=xe,xe=r)):(O=xe,xe=r);le!==r?(ht=x,U=Pe(),x=U):(O=x,x=r)}else O=x,x=r;return Ye--,x===r&&(U=r,Ye===0&&et(F)),x}function _c(){var x,U,le,xe,Qe;if(x=O,t.substr(O,2)===qe?(U=qe,O+=2):(U=r,Ye===0&&et(re)),U===r&&(U=null),U!==r)if(se.test(t.charAt(O))?(le=t.charAt(O),O++):(le=r,Ye===0&&et(be)),le!==r){for(xe=[],ae.test(t.charAt(O))?(Qe=t.charAt(O),O++):(Qe=r,Ye===0&&et(Ae));Qe!==r;)xe.push(Qe),ae.test(t.charAt(O))?(Qe=t.charAt(O),O++):(Qe=r,Ye===0&&et(Ae));xe!==r?(ht=x,U=Pe(),x=U):(O=x,x=r)}else O=x,x=r;else O=x,x=r;return x}function jf(){var x,U;return x=O,t.substr(O,4)===De?(U=De,O+=4):(U=r,Ye===0&&et($)),U!==r&&(ht=x,U=G()),x=U,x}function sE(){var x,U;return x=O,t.substr(O,4)===Ce?(U=Ce,O+=4):(U=r,Ye===0&&et(ee)),U!==r&&(ht=x,U=Ue()),x=U,x===r&&(x=O,t.substr(O,5)===Oe?(U=Oe,O+=5):(U=r,Ye===0&&et(vt)),U!==r&&(ht=x,U=dt()),x=U),x}function cl(){var x,U,le,xe;return Ye++,x=O,t.charCodeAt(O)===34?(U=ii,O++):(U=r,Ye===0&&et(an)),U!==r?(t.charCodeAt(O)===34?(le=ii,O++):(le=r,Ye===0&&et(an)),le!==r?(ht=x,U=yr(),x=U):(O=x,x=r)):(O=x,x=r),x===r&&(x=O,t.charCodeAt(O)===34?(U=ii,O++):(U=r,Ye===0&&et(an)),U!==r?(le=oE(),le!==r?(t.charCodeAt(O)===34?(xe=ii,O++):(xe=r,Ye===0&&et(an)),xe!==r?(ht=x,U=Ki(le),x=U):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)),Ye--,x===r&&(U=r,Ye===0&&et(ri)),x}function oE(){var x,U,le;if(x=O,U=[],le=Yf(),le!==r)for(;le!==r;)U.push(le),le=Yf();else U=r;return U!==r&&(ht=x,U=Qi(U)),x=U,x}function Yf(){var x,U,le,xe,Qe,Ge;return Go.test(t.charAt(O))?(x=t.charAt(O),O++):(x=r,Ye===0&&et(wr)),x===r&&(x=O,t.substr(O,2)===Ui?(U=Ui,O+=2):(U=r,Ye===0&&et(ws)),U!==r&&(ht=x,U=Tf()),x=U,x===r&&(x=O,t.substr(O,2)===Mf?(U=Mf,O+=2):(U=r,Ye===0&&et(Rm)),U!==r&&(ht=x,U=Fm()),x=U,x===r&&(x=O,t.substr(O,2)===Nm?(U=Nm,O+=2):(U=r,Ye===0&&et(DQ)),U!==r&&(ht=x,U=RQ()),x=U,x===r&&(x=O,t.substr(O,2)===Of?(U=Of,O+=2):(U=r,Ye===0&&et(FQ)),U!==r&&(ht=x,U=NQ()),x=U,x===r&&(x=O,t.substr(O,2)===Lm?(U=Lm,O+=2):(U=r,Ye===0&&et(LQ)),U!==r&&(ht=x,U=Va()),x=U,x===r&&(x=O,t.substr(O,2)===jo?(U=jo,O+=2):(U=r,Ye===0&&et(Tm)),U!==r&&(ht=x,U=Mm()),x=U,x===r&&(x=O,t.substr(O,2)===te?(U=te,O+=2):(U=r,Ye===0&&et(Om)),U!==r&&(ht=x,U=Km()),x=U,x===r&&(x=O,t.substr(O,2)===il?(U=il,O+=2):(U=r,Ye===0&&et(Um)),U!==r&&(ht=x,U=Hm()),x=U,x===r&&(x=O,t.substr(O,2)===Kf?(U=Kf,O+=2):(U=r,Ye===0&&et(Gm)),U!==r?(le=Xc(),le!==r?(xe=Xc(),xe!==r?(Qe=Xc(),Qe!==r?(Ge=Xc(),Ge!==r?(ht=x,U=jm(le,xe,Qe,Ge),x=U):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)):(O=x,x=r)))))))))),x}function Xc(){var x;return TQ.test(t.charAt(O))?(x=t.charAt(O),O++):(x=r,Ye===0&&et(MQ)),x}function xr(){var x,U;if(Ye++,x=[],qm.test(t.charAt(O))?(U=t.charAt(O),O++):(U=r,Ye===0&&et(Jm)),U!==r)for(;U!==r;)x.push(U),qm.test(t.charAt(O))?(U=t.charAt(O),O++):(U=r,Ye===0&&et(Jm));else x=r;return Ye--,x===r&&(U=r,Ye===0&&et(Ym)),x}function KM(){var x,U;if(Ye++,x=[],zm.test(t.charAt(O))?(U=t.charAt(O),O++):(U=r,Ye===0&&et(Vm)),U!==r)for(;U!==r;)x.push(U),zm.test(t.charAt(O))?(U=t.charAt(O),O++):(U=r,Ye===0&&et(Vm));else x=r;return Ye--,x===r&&(U=r,Ye===0&&et(Wm)),x}function Jo(){var x,U,le,xe,Qe,Ge;if(x=O,U=Zs(),U!==r){for(le=[],xe=O,Qe=xr(),Qe===r&&(Qe=null),Qe!==r?(Ge=Zs(),Ge!==r?(Qe=[Qe,Ge],xe=Qe):(O=xe,xe=r)):(O=xe,xe=r);xe!==r;)le.push(xe),xe=O,Qe=xr(),Qe===r&&(Qe=null),Qe!==r?(Ge=Zs(),Ge!==r?(Qe=[Qe,Ge],xe=Qe):(O=xe,xe=r)):(O=xe,xe=r);le!==r?(U=[U,le],x=U):(O=x,x=r)}else O=x,x=r;return x}function Zs(){var x;return t.substr(O,2)===Uf?(x=Uf,O+=2):(x=r,Ye===0&&et(OQ)),x===r&&(t.charCodeAt(O)===10?(x=KQ,O++):(x=r,Ye===0&&et(_m)),x===r&&(t.charCodeAt(O)===13?(x=UQ,O++):(x=r,Ye===0&&et(HQ)))),x}let aE=2,Zc=0;if(nl=n(),nl!==r&&O===t.length)return nl;throw nl!==r&&O{var fRe=typeof global=="object"&&global&&global.Object===Object&&global;V5.exports=fRe});var Ks=E((Zat,_5)=>{var hRe=WP(),pRe=typeof self=="object"&&self&&self.Object===Object&&self,dRe=hRe||pRe||Function("return this")();_5.exports=dRe});var ac=E(($at,X5)=>{var CRe=Ks(),mRe=CRe.Symbol;X5.exports=mRe});var $5=E((eAt,Z5)=>{function ERe(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r{var IRe=Array.isArray;e6.exports=IRe});var n6=E((rAt,t6)=>{var r6=ac(),i6=Object.prototype,yRe=i6.hasOwnProperty,wRe=i6.toString,Jp=r6?r6.toStringTag:void 0;function BRe(t){var e=yRe.call(t,Jp),r=t[Jp];try{t[Jp]=void 0;var i=!0}catch(s){}var n=wRe.call(t);return i&&(e?t[Jp]=r:delete t[Jp]),n}t6.exports=BRe});var o6=E((iAt,s6)=>{var QRe=Object.prototype,bRe=QRe.toString;function vRe(t){return bRe.call(t)}s6.exports=vRe});var Ac=E((nAt,a6)=>{var A6=ac(),SRe=n6(),xRe=o6(),kRe="[object Null]",PRe="[object Undefined]",l6=A6?A6.toStringTag:void 0;function DRe(t){return t==null?t===void 0?PRe:kRe:l6&&l6 in Object(t)?SRe(t):xRe(t)}a6.exports=DRe});var Qo=E((sAt,c6)=>{function RRe(t){return t!=null&&typeof t=="object"}c6.exports=RRe});var Nw=E((oAt,u6)=>{var FRe=Ac(),NRe=Qo(),LRe="[object Symbol]";function TRe(t){return typeof t=="symbol"||NRe(t)&&FRe(t)==LRe}u6.exports=TRe});var C6=E((aAt,g6)=>{var f6=ac(),MRe=$5(),ORe=As(),KRe=Nw(),URe=1/0,h6=f6?f6.prototype:void 0,p6=h6?h6.toString:void 0;function d6(t){if(typeof t=="string")return t;if(ORe(t))return MRe(t,d6)+"";if(KRe(t))return p6?p6.call(t):"";var e=t+"";return e=="0"&&1/t==-URe?"-0":e}g6.exports=d6});var gg=E((AAt,m6)=>{var HRe=C6();function GRe(t){return t==null?"":HRe(t)}m6.exports=GRe});var zP=E((lAt,E6)=>{function jRe(t,e,r){var i=-1,n=t.length;e<0&&(e=-e>n?0:n+e),r=r>n?n:r,r<0&&(r+=n),n=e>r?0:r-e>>>0,e>>>=0;for(var s=Array(n);++i{var YRe=zP();function qRe(t,e,r){var i=t.length;return r=r===void 0?i:r,!e&&r>=i?t:YRe(t,e,r)}I6.exports=qRe});var VP=E((uAt,w6)=>{var JRe="\\ud800-\\udfff",WRe="\\u0300-\\u036f",zRe="\\ufe20-\\ufe2f",VRe="\\u20d0-\\u20ff",_Re=WRe+zRe+VRe,XRe="\\ufe0e\\ufe0f",ZRe="\\u200d",$Re=RegExp("["+ZRe+JRe+_Re+XRe+"]");function eFe(t){return $Re.test(t)}w6.exports=eFe});var Q6=E((gAt,B6)=>{function tFe(t){return t.split("")}B6.exports=tFe});var R6=E((fAt,b6)=>{var v6="\\ud800-\\udfff",rFe="\\u0300-\\u036f",iFe="\\ufe20-\\ufe2f",nFe="\\u20d0-\\u20ff",sFe=rFe+iFe+nFe,oFe="\\ufe0e\\ufe0f",aFe="["+v6+"]",_P="["+sFe+"]",XP="\\ud83c[\\udffb-\\udfff]",AFe="(?:"+_P+"|"+XP+")",S6="[^"+v6+"]",x6="(?:\\ud83c[\\udde6-\\uddff]){2}",k6="[\\ud800-\\udbff][\\udc00-\\udfff]",lFe="\\u200d",P6=AFe+"?",D6="["+oFe+"]?",cFe="(?:"+lFe+"(?:"+[S6,x6,k6].join("|")+")"+D6+P6+")*",uFe=D6+P6+cFe,gFe="(?:"+[S6+_P+"?",_P,x6,k6,aFe].join("|")+")",fFe=RegExp(XP+"(?="+XP+")|"+gFe+uFe,"g");function hFe(t){return t.match(fFe)||[]}b6.exports=hFe});var N6=E((hAt,F6)=>{var pFe=Q6(),dFe=VP(),CFe=R6();function mFe(t){return dFe(t)?CFe(t):pFe(t)}F6.exports=mFe});var T6=E((pAt,L6)=>{var EFe=y6(),IFe=VP(),yFe=N6(),wFe=gg();function BFe(t){return function(e){e=wFe(e);var r=IFe(e)?yFe(e):void 0,i=r?r[0]:e.charAt(0),n=r?EFe(r,1).join(""):e.slice(1);return i[t]()+n}}L6.exports=BFe});var O6=E((dAt,M6)=>{var QFe=T6(),bFe=QFe("toUpperCase");M6.exports=bFe});var ZP=E((CAt,K6)=>{var vFe=gg(),SFe=O6();function xFe(t){return SFe(vFe(t).toLowerCase())}K6.exports=xFe});var H6=E((mAt,U6)=>{"use strict";U6.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var Wp=E((EAt,$P)=>{"use strict";var kFe=H6(),G6=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,i=()=>{r--,e.length>0&&e.shift()()},n=(a,l,...c)=>{r++;let u=kFe(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{rnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),o};$P.exports=G6;$P.exports.default=G6});var X6=E((FAt,Mw)=>{function PFe(){var t=0,e=1,r=2,i=3,n=4,s=5,o=6,a=7,l=8,c=9,u=10,g=11,f=12,h=13,p=14,d=15,m=16,I=17,B=0,b=1,R=2,H=3,L=4;function K(A,V){return 55296<=A.charCodeAt(V)&&A.charCodeAt(V)<=56319&&56320<=A.charCodeAt(V+1)&&A.charCodeAt(V+1)<=57343}function J(A,V){V===void 0&&(V=0);var W=A.charCodeAt(V);if(55296<=W&&W<=56319&&V=1){var X=A.charCodeAt(V-1),F=W;return 55296<=X&&X<=56319?(X-55296)*1024+(F-56320)+65536:F}return W}function ne(A,V,W){var X=[A].concat(V).concat([W]),F=X[X.length-2],D=W,he=X.lastIndexOf(p);if(he>1&&X.slice(1,he).every(function(Pe){return Pe==i})&&[i,h,I].indexOf(A)==-1)return R;var pe=X.lastIndexOf(n);if(pe>0&&X.slice(1,pe).every(function(Pe){return Pe==n})&&[f,n].indexOf(F)==-1)return X.filter(function(Pe){return Pe==n}).length%2==1?H:L;if(F==t&&D==e)return B;if(F==r||F==t||F==e)return D==p&&V.every(function(Pe){return Pe==i})?R:b;if(D==r||D==t||D==e)return b;if(F==o&&(D==o||D==a||D==c||D==u))return B;if((F==c||F==a)&&(D==a||D==l))return B;if((F==u||F==l)&&D==l)return B;if(D==i||D==d)return B;if(D==s)return B;if(F==f)return B;var Ne=X.indexOf(i)!=-1?X.lastIndexOf(i)-1:X.length-2;return[h,I].indexOf(X[Ne])!=-1&&X.slice(Ne+1,-1).every(function(Pe){return Pe==i})&&D==p||F==d&&[m,I].indexOf(D)!=-1?B:V.indexOf(n)!=-1?R:F==n&&D==n?B:b}this.nextBreak=function(A,V){if(V===void 0&&(V=0),V<0)return 0;if(V>=A.length-1)return A.length;for(var W=q(J(A,V)),X=[],F=V+1;F{var DFe=X6(),RFe=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,FFe=new DFe;Z6.exports=(t,e=0,r=t.length)=>{if(e<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");let i=r-e,n="",s=0,o=0;for(;t.length>0;){let a=t.match(RFe)||[t,t,void 0],l=FFe.splitGraphemes(a[1]),c=Math.min(e-s,l.length);l=l.slice(c);let u=Math.min(i-o,l.length);n+=l.slice(0,u).join(""),s+=c,o+=u,typeof a[2]!="undefined"&&(n+=a[2]),t=t.slice(a[0].length)}return n}});var fg=E((alt,f9)=>{"use strict";var h9=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"]]),olt=f9.exports=t=>t?Object.keys(t).map(e=>[h9.has(e)?h9.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var hg=E((Alt,p9)=>{"use strict";var JFe=require("events"),d9=require("stream"),_p=Rh(),C9=require("string_decoder").StringDecoder,va=Symbol("EOF"),Xp=Symbol("maybeEmitEnd"),xA=Symbol("emittedEnd"),Gw=Symbol("emittingEnd"),jw=Symbol("closed"),m9=Symbol("read"),iD=Symbol("flush"),E9=Symbol("flushChunk"),Bn=Symbol("encoding"),Sa=Symbol("decoder"),Yw=Symbol("flowing"),Zp=Symbol("paused"),$p=Symbol("resume"),rn=Symbol("bufferLength"),I9=Symbol("bufferPush"),nD=Symbol("bufferShift"),Ni=Symbol("objectMode"),Li=Symbol("destroyed"),y9=global._MP_NO_ITERATOR_SYMBOLS_!=="1",WFe=y9&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),zFe=y9&&Symbol.iterator||Symbol("iterator not implemented"),w9=t=>t==="end"||t==="finish"||t==="prefinish",VFe=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,_Fe=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t);p9.exports=class B9 extends d9{constructor(e){super();this[Yw]=!1,this[Zp]=!1,this.pipes=new _p,this.buffer=new _p,this[Ni]=e&&e.objectMode||!1,this[Ni]?this[Bn]=null:this[Bn]=e&&e.encoding||null,this[Bn]==="buffer"&&(this[Bn]=null),this[Sa]=this[Bn]?new C9(this[Bn]):null,this[va]=!1,this[xA]=!1,this[Gw]=!1,this[jw]=!1,this.writable=!0,this.readable=!0,this[rn]=0,this[Li]=!1}get bufferLength(){return this[rn]}get encoding(){return this[Bn]}set encoding(e){if(this[Ni])throw new Error("cannot set encoding in objectMode");if(this[Bn]&&e!==this[Bn]&&(this[Sa]&&this[Sa].lastNeed||this[rn]))throw new Error("cannot change encoding");this[Bn]!==e&&(this[Sa]=e?new C9(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[Sa].write(r)))),this[Bn]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Ni]}set objectMode(e){this[Ni]=this[Ni]||!!e}write(e,r,i){if(this[va])throw new Error("write after end");return this[Li]?(this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0):(typeof r=="function"&&(i=r,r="utf8"),r||(r="utf8"),!this[Ni]&&!Buffer.isBuffer(e)&&(_Fe(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):VFe(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),!this.objectMode&&!e.length?(this[rn]!==0&&this.emit("readable"),i&&i(),this.flowing):(typeof e=="string"&&!this[Ni]&&!(r===this[Bn]&&!this[Sa].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Bn]&&(e=this[Sa].write(e)),this.flowing?(this[rn]!==0&&this[iD](!0),this.emit("data",e)):this[I9](e),this[rn]!==0&&this.emit("readable"),i&&i(),this.flowing))}read(e){if(this[Li])return null;try{return this[rn]===0||e===0||e>this[rn]?null:(this[Ni]&&(e=null),this.buffer.length>1&&!this[Ni]&&(this.encoding?this.buffer=new _p([Array.from(this.buffer).join("")]):this.buffer=new _p([Buffer.concat(Array.from(this.buffer),this[rn])])),this[m9](e||null,this.buffer.head.value))}finally{this[Xp]()}}[m9](e,r){return e===r.length||e===null?this[nD]():(this.buffer.head.value=r.slice(e),r=r.slice(0,e),this[rn]-=e),this.emit("data",r),!this.buffer.length&&!this[va]&&this.emit("drain"),r}end(e,r,i){return typeof e=="function"&&(i=e,e=null),typeof r=="function"&&(i=r,r="utf8"),e&&this.write(e,r),i&&this.once("end",i),this[va]=!0,this.writable=!1,(this.flowing||!this[Zp])&&this[Xp](),this}[$p](){this[Li]||(this[Zp]=!1,this[Yw]=!0,this.emit("resume"),this.buffer.length?this[iD]():this[va]?this[Xp]():this.emit("drain"))}resume(){return this[$p]()}pause(){this[Yw]=!1,this[Zp]=!0}get destroyed(){return this[Li]}get flowing(){return this[Yw]}get paused(){return this[Zp]}[I9](e){return this[Ni]?this[rn]+=1:this[rn]+=e.length,this.buffer.push(e)}[nD](){return this.buffer.length&&(this[Ni]?this[rn]-=1:this[rn]-=this.buffer.head.value.length),this.buffer.shift()}[iD](e){do;while(this[E9](this[nD]()));!e&&!this.buffer.length&&!this[va]&&this.emit("drain")}[E9](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Li])return;let i=this[xA];r=r||{},e===process.stdout||e===process.stderr?r.end=!1:r.end=r.end!==!1;let n={dest:e,opts:r,ondrain:s=>this[$p]()};return this.pipes.push(n),e.on("drain",n.ondrain),this[$p](),i&&n.opts.end&&n.dest.end(),e}addListener(e,r){return this.on(e,r)}on(e,r){try{return super.on(e,r)}finally{e==="data"&&!this.pipes.length&&!this.flowing?this[$p]():w9(e)&&this[xA]&&(super.emit(e),this.removeAllListeners(e))}}get emittedEnd(){return this[xA]}[Xp](){!this[Gw]&&!this[xA]&&!this[Li]&&this.buffer.length===0&&this[va]&&(this[Gw]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[jw]&&this.emit("close"),this[Gw]=!1)}emit(e,r){if(e!=="error"&&e!=="close"&&e!==Li&&this[Li])return;if(e==="data"){if(!r)return;this.pipes.length&&this.pipes.forEach(n=>n.dest.write(r)===!1&&this.pause())}else if(e==="end"){if(this[xA]===!0)return;this[xA]=!0,this.readable=!1,this[Sa]&&(r=this[Sa].end(),r&&(this.pipes.forEach(n=>n.dest.write(r)),super.emit("data",r))),this.pipes.forEach(n=>{n.dest.removeListener("drain",n.ondrain),n.opts.end&&n.dest.end()})}else if(e==="close"&&(this[jw]=!0,!this[xA]&&!this[Li]))return;let i=new Array(arguments.length);if(i[0]=e,i[1]=r,arguments.length>2)for(let n=2;n{e.push(i),this[Ni]||(e.dataLength+=i.length)}),r.then(()=>e)}concat(){return this[Ni]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Ni]?Promise.reject(new Error("cannot concat in objectMode")):this[Bn]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Li,()=>r(new Error("stream destroyed"))),this.on("end",()=>e()),this.on("error",i=>r(i))})}[WFe](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[va])return Promise.resolve({done:!0});let i=null,n=null,s=c=>{this.removeListener("data",o),this.removeListener("end",a),n(c)},o=c=>{this.removeListener("error",s),this.removeListener("end",a),this.pause(),i({value:c,done:!!this[va]})},a=()=>{this.removeListener("error",s),this.removeListener("data",o),i({done:!0})},l=()=>s(new Error("stream destroyed"));return new Promise((c,u)=>{n=u,i=c,this.once(Li,l),this.once("error",s),this.once("end",a),this.once("data",o)})}}}[zFe](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Li]?(e?this.emit("error",e):this.emit(Li),this):(this[Li]=!0,this.buffer=new _p,this[rn]=0,typeof this.close=="function"&&!this[jw]&&this.close(),e?this.emit("error",e):this.emit(Li),this)}static isStream(e){return!!e&&(e instanceof B9||e instanceof d9||e instanceof JFe&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var b9=E((llt,Q9)=>{var XFe=require("zlib").constants||{ZLIB_VERNUM:4736};Q9.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:Infinity,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},XFe))});var fD=E(Un=>{"use strict";var sD=require("assert"),kA=require("buffer").Buffer,v9=require("zlib"),uc=Un.constants=b9(),ZFe=hg(),S9=kA.concat,gc=Symbol("_superWrite"),ed=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"}},$Fe=Symbol("opts"),td=Symbol("flushFlag"),x9=Symbol("finishFlushFlag"),oD=Symbol("fullFlushFlag"),tr=Symbol("handle"),qw=Symbol("onError"),pg=Symbol("sawError"),aD=Symbol("level"),AD=Symbol("strategy"),lD=Symbol("ended"),clt=Symbol("_defaultFullFlush"),cD=class extends ZFe{constructor(e,r){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e);this[pg]=!1,this[lD]=!1,this[$Fe]=e,this[td]=e.flush,this[x9]=e.finishFlush;try{this[tr]=new v9[r](e)}catch(i){throw new ed(i)}this[qw]=i=>{this[pg]||(this[pg]=!0,this.close(),this.emit("error",i))},this[tr].on("error",i=>this[qw](new ed(i))),this.once("end",()=>this.close)}close(){this[tr]&&(this[tr].close(),this[tr]=null,this.emit("close"))}reset(){if(!this[pg])return sD(this[tr],"zlib binding closed"),this[tr].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[oD]),this.write(Object.assign(kA.alloc(0),{[td]:e})))}end(e,r,i){return e&&this.write(e,r),this.flush(this[x9]),this[lD]=!0,super.end(null,null,i)}get ended(){return this[lD]}write(e,r,i){if(typeof r=="function"&&(i=r,r="utf8"),typeof e=="string"&&(e=kA.from(e,r)),this[pg])return;sD(this[tr],"zlib binding closed");let n=this[tr]._handle,s=n.close;n.close=()=>{};let o=this[tr].close;this[tr].close=()=>{},kA.concat=c=>c;let a;try{let c=typeof e[td]=="number"?e[td]:this[td];a=this[tr]._processChunk(e,c),kA.concat=S9}catch(c){kA.concat=S9,this[qw](new ed(c))}finally{this[tr]&&(this[tr]._handle=n,n.close=s,this[tr].close=o,this[tr].removeAllListeners("error"))}this[tr]&&this[tr].on("error",c=>this[qw](new ed(c)));let l;if(a)if(Array.isArray(a)&&a.length>0){l=this[gc](kA.from(a[0]));for(let c=1;c{this.flush(n),s()};try{this[tr].params(e,r)}finally{this[tr].flush=i}this[tr]&&(this[aD]=e,this[AD]=r)}}}},k9=class extends PA{constructor(e){super(e,"Deflate")}},P9=class extends PA{constructor(e){super(e,"Inflate")}},uD=Symbol("_portable"),D9=class extends PA{constructor(e){super(e,"Gzip");this[uD]=e&&!!e.portable}[gc](e){return this[uD]?(this[uD]=!1,e[9]=255,super[gc](e)):super[gc](e)}},R9=class extends PA{constructor(e){super(e,"Gunzip")}},F9=class extends PA{constructor(e){super(e,"DeflateRaw")}},N9=class extends PA{constructor(e){super(e,"InflateRaw")}},L9=class extends PA{constructor(e){super(e,"Unzip")}},gD=class extends cD{constructor(e,r){e=e||{},e.flush=e.flush||uc.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||uc.BROTLI_OPERATION_FINISH,super(e,r),this[oD]=uc.BROTLI_OPERATION_FLUSH}},T9=class extends gD{constructor(e){super(e,"BrotliCompress")}},M9=class extends gD{constructor(e){super(e,"BrotliDecompress")}};Un.Deflate=k9;Un.Inflate=P9;Un.Gzip=D9;Un.Gunzip=R9;Un.DeflateRaw=F9;Un.InflateRaw=N9;Un.Unzip=L9;typeof v9.BrotliCompress=="function"?(Un.BrotliCompress=T9,Un.BrotliDecompress=M9):Un.BrotliCompress=Un.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var rd=E(Jw=>{"use strict";Jw.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"]]);Jw.code=new Map(Array.from(Jw.name).map(t=>[t[1],t[0]]))});var id=E((plt,O9)=>{"use strict";var flt=rd(),eNe=hg(),hD=Symbol("slurp");O9.exports=class extends eNe{constructor(e,r,i){super();switch(this.pause(),this.extended=r,this.globalExtended=i,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=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=e.linkpath,this.uname=e.uname,this.gname=e.gname,r&&this[hD](r),i&&this[hD](i,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let i=this.remain,n=this.blockRemain;return this.remain=Math.max(0,i-r),this.blockRemain=Math.max(0,n-r),this.ignore?!0:i>=r?super.write(e):super.write(e.slice(0,i))}[hD](e,r){for(let i in e)e[i]!==null&&e[i]!==void 0&&!(r&&i==="path")&&(this[i]=e[i])}}});var H9=E(pD=>{"use strict";var dlt=pD.encode=(t,e)=>{if(Number.isSafeInteger(t))t<0?rNe(t,e):tNe(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},tNe=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},rNe=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var i=e.length;i>1;i--){var n=t&255;t=Math.floor(t/256),r?e[i-1]=K9(n):n===0?e[i-1]=0:(r=!0,e[i-1]=U9(n))}},Clt=pD.parse=t=>{var e=t[t.length-1],r=t[0],i;if(r===128)i=nNe(t.slice(1,t.length));else if(r===255)i=iNe(t);else throw Error("invalid base256 encoding");if(!Number.isSafeInteger(i))throw Error("parsed number outside of javascript safe integer range");return i},iNe=t=>{for(var e=t.length,r=0,i=!1,n=e-1;n>-1;n--){var s=t[n],o;i?o=K9(s):s===0?o=s:(i=!0,o=U9(s)),o!==0&&(r-=o*Math.pow(256,e-n-1))}return r},nNe=t=>{for(var e=t.length,r=0,i=e-1;i>-1;i--){var n=t[i];n!==0&&(r+=n*Math.pow(256,e-i-1))}return r},K9=t=>(255^t)&255,U9=t=>(255^t)+1&255});var Cg=E((Elt,G9)=>{"use strict";var dD=rd(),dg=require("path").posix,j9=H9(),CD=Symbol("slurp"),Hn=Symbol("type"),Y9=class{constructor(e,r,i,n){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[Hn]="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,i,n):e&&this.set(e)}decode(e,r,i,n){if(r||(r=0),!e||!(e.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=fc(e,r,100),this.mode=DA(e,r+100,8),this.uid=DA(e,r+108,8),this.gid=DA(e,r+116,8),this.size=DA(e,r+124,12),this.mtime=mD(e,r+136,12),this.cksum=DA(e,r+148,12),this[CD](i),this[CD](n,!0),this[Hn]=fc(e,r+156,1),this[Hn]===""&&(this[Hn]="0"),this[Hn]==="0"&&this.path.substr(-1)==="/"&&(this[Hn]="5"),this[Hn]==="5"&&(this.size=0),this.linkpath=fc(e,r+157,100),e.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=fc(e,r+265,32),this.gname=fc(e,r+297,32),this.devmaj=DA(e,r+329,8),this.devmin=DA(e,r+337,8),e[r+475]!==0){let o=fc(e,r+345,155);this.path=o+"/"+this.path}else{let o=fc(e,r+345,130);o&&(this.path=o+"/"+this.path),this.atime=mD(e,r+476,12),this.ctime=mD(e,r+488,12)}let s=8*32;for(let o=r;o=r+512))throw new Error("need 512 bytes for header");let i=this.ctime||this.atime?130:155,n=sNe(this.path||"",i),s=n[0],o=n[1];this.needPax=n[2],this.needPax=hc(e,r,100,s)||this.needPax,this.needPax=RA(e,r+100,8,this.mode)||this.needPax,this.needPax=RA(e,r+108,8,this.uid)||this.needPax,this.needPax=RA(e,r+116,8,this.gid)||this.needPax,this.needPax=RA(e,r+124,12,this.size)||this.needPax,this.needPax=ED(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[Hn].charCodeAt(0),this.needPax=hc(e,r+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",r+257,8),this.needPax=hc(e,r+265,32,this.uname)||this.needPax,this.needPax=hc(e,r+297,32,this.gname)||this.needPax,this.needPax=RA(e,r+329,8,this.devmaj)||this.needPax,this.needPax=RA(e,r+337,8,this.devmin)||this.needPax,this.needPax=hc(e,r+345,i,o)||this.needPax,e[r+475]!==0?this.needPax=hc(e,r+345,155,o)||this.needPax:(this.needPax=hc(e,r+345,130,o)||this.needPax,this.needPax=ED(e,r+476,12,this.atime)||this.needPax,this.needPax=ED(e,r+488,12,this.ctime)||this.needPax);let a=8*32;for(let l=r;l{let r=100,i=t,n="",s,o=dg.parse(t).root||".";if(Buffer.byteLength(i)r&&Buffer.byteLength(n)<=e?s=[i.substr(0,r-1),n,!0]:(i=dg.join(dg.basename(n),i),n=dg.dirname(n));while(n!==o&&!s);s||(s=[t.substr(0,r-1),"",!0])}return s},fc=(t,e,r)=>t.slice(e,e+r).toString("utf8").replace(/\0.*/,""),mD=(t,e,r)=>oNe(DA(t,e,r)),oNe=t=>t===null?null:new Date(t*1e3),DA=(t,e,r)=>t[e]&128?j9.parse(t.slice(e,e+r)):aNe(t,e,r),ANe=t=>isNaN(t)?null:t,aNe=(t,e,r)=>ANe(parseInt(t.slice(e,e+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),lNe={12:8589934591,8:2097151},RA=(t,e,r,i)=>i===null?!1:i>lNe[r]||i<0?(j9.encode(i,t.slice(e,e+r)),!0):(cNe(t,e,r,i),!1),cNe=(t,e,r,i)=>t.write(uNe(i,r),e,r,"ascii"),uNe=(t,e)=>gNe(Math.floor(t).toString(8),e),gNe=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",ED=(t,e,r,i)=>i===null?!1:RA(t,e,r,i.getTime()/1e3),fNe=new Array(156).join("\0"),hc=(t,e,r,i)=>i===null?!1:(t.write(i+fNe,e,r,"utf8"),i.length!==Buffer.byteLength(i)||i.length>r);G9.exports=Y9});var zw=E((Ilt,q9)=>{"use strict";var hNe=Cg(),pNe=require("path"),Ww=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),i=512*Math.ceil(1+r/512),n=Buffer.allocUnsafe(i);for(let s=0;s<512;s++)n[s]=0;new hNe({path:("PaxHeader/"+pNe.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(n),n.write(e,512,r,"utf8");for(let s=r+512;s=Math.pow(10,s)&&(s+=1),s+n+i}};Ww.parse=(t,e,r)=>new Ww(dNe(CNe(t),e),r);var dNe=(t,e)=>e?Object.keys(t).reduce((r,i)=>(r[i]=t[i],r),e):t,CNe=t=>t.replace(/\n$/,"").split(` -`).reduce(mNe,Object.create(null)),mNe=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let i=e.split("="),n=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n)return t;let s=i.join("=");return t[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s,t};q9.exports=Ww});var Vw=E((ylt,J9)=>{"use strict";J9.exports=t=>class extends t{warn(e,r,i={}){this.file&&(i.file=this.file),this.cwd&&(i.cwd=this.cwd),i.code=r instanceof Error&&r.code||e,i.tarCode=e,!this.strict&&i.recoverable!==!1?(r instanceof Error&&(i=Object.assign(r,i),r=r.message),this.emit("warn",i.tarCode,r,i)):r instanceof Error?this.emit("error",Object.assign(r,i)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),i))}}});var yD=E((wlt,W9)=>{"use strict";var _w=["|","<",">","?",":"],ID=_w.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),ENe=new Map(_w.map((t,e)=>[t,ID[e]])),INe=new Map(ID.map((t,e)=>[t,_w[e]]));W9.exports={encode:t=>_w.reduce((e,r)=>e.split(r).join(ENe.get(r)),t),decode:t=>ID.reduce((e,r)=>e.split(r).join(INe.get(r)),t)}});var V9=E((Blt,z9)=>{"use strict";z9.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&~18),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var xD=E((xlt,_9)=>{"use strict";var X9=hg(),Z9=zw(),$9=Cg(),Qlt=id(),bo=require("fs"),mg=require("path"),blt=rd(),yNe=16*1024*1024,eV=Symbol("process"),tV=Symbol("file"),rV=Symbol("directory"),wD=Symbol("symlink"),iV=Symbol("hardlink"),nd=Symbol("header"),Xw=Symbol("read"),BD=Symbol("lstat"),Zw=Symbol("onlstat"),QD=Symbol("onread"),bD=Symbol("onreadlink"),vD=Symbol("openfile"),SD=Symbol("onopenfile"),pc=Symbol("close"),$w=Symbol("mode"),nV=Vw(),wNe=yD(),sV=V9(),eB=nV(class extends X9{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=e,this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid(),this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||yNe,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=r.cwd||process.cwd(),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let i=!1;if(!this.preservePaths&&mg.win32.isAbsolute(e)){let n=mg.win32.parse(e);this.path=e.substr(n.root.length),i=n.root}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=wNe.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=r.absolute||mg.resolve(this.cwd,e),this.path===""&&(this.path="./"),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.statCache.has(this.absolute)?this[Zw](this.statCache.get(this.absolute)):this[BD]()}[BD](){bo.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[Zw](r)})}[Zw](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=BNe(e),this.emit("stat",e),this[eV]()}[eV](){switch(this.type){case"File":return this[tV]();case"Directory":return this[rV]();case"SymbolicLink":return this[wD]();default:return this.end()}}[$w](e){return sV(e,this.type==="Directory",this.portable)}[nd](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new $9({path:this.path,linkpath:this.linkpath,mode:this[$w](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&&this.write(new Z9({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.path,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()),this.write(this.header.block)}[rV](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[nd](),this.end()}[wD](){bo.readlink(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[bD](r)})}[bD](e){this.linkpath=e.replace(/\\/g,"/"),this[nd](),this.end()}[iV](e){this.type="Link",this.linkpath=mg.relative(this.cwd,e).replace(/\\/g,"/"),this.stat.size=0,this[nd](),this.end()}[tV](){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[iV](r)}this.linkCache.set(e,this.absolute)}if(this[nd](),this.stat.size===0)return this.end();this[vD]()}[vD](){bo.open(this.absolute,"r",(e,r)=>{if(e)return this.emit("error",e);this[SD](r)})}[SD](e){let r=512*Math.ceil(this.stat.size/512),i=Math.min(r,this.maxReadSize),n=Buffer.allocUnsafe(i);this[Xw](e,n,0,n.length,0,this.stat.size,r)}[Xw](e,r,i,n,s,o,a){bo.read(e,r,i,n,s,(l,c)=>{if(l)return this[pc](e,()=>this.emit("error",l));this[QD](e,r,i,n,s,o,a,c)})}[pc](e,r){bo.close(e,r)}[QD](e,r,i,n,s,o,a,l){if(l<=0&&o>0){let u=new Error("encountered unexpected EOF");return u.path=this.absolute,u.syscall="read",u.code="EOF",this[pc](e,()=>this.emit("error",u))}if(l>o){let u=new Error("did not encounter expected EOF");return u.path=this.absolute,u.syscall="read",u.code="EOF",this[pc](e,()=>this.emit("error",u))}if(l===o)for(let u=l;uu?this.emit("error",u):this.end());i>=n&&(r=Buffer.allocUnsafe(n),i=0),n=r.length-i,this[Xw](e,r,i,n,s,o,a)}}),oV=class extends eB{constructor(e,r){super(e,r)}[BD](){this[Zw](bo.lstatSync(this.absolute))}[wD](){this[bD](bo.readlinkSync(this.absolute))}[vD](){this[SD](bo.openSync(this.absolute,"r"))}[Xw](e,r,i,n,s,o,a){let l=!0;try{let c=bo.readSync(e,r,i,n,s);this[QD](e,r,i,n,s,o,a,c),l=!1}finally{if(l)try{this[pc](e,()=>{})}catch(c){}}}[pc](e,r){bo.closeSync(e),r()}},QNe=nV(class extends X9{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.path=e.path,this.mode=this[$w](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=e.linkpath,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let i=!1;if(mg.isAbsolute(this.path)&&!this.preservePaths){let n=mg.parse(this.path);i=n.root,this.path=this.path.substr(n.root.length)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new $9({path:this.path,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}),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.header.encode()&&!this.noPax&&super.write(new Z9({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.path,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)}[$w](e){return sV(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&&this.write(Buffer.alloc(this.blockRemain)),super.end()}});eB.Sync=oV;eB.Tar=QNe;var BNe=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";_9.exports=eB});var AB=E((Plt,aV)=>{"use strict";var kD=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}},bNe=hg(),vNe=fD(),SNe=id(),PD=xD(),xNe=PD.Sync,kNe=PD.Tar,PNe=Rh(),AV=Buffer.alloc(1024),tB=Symbol("onStat"),rB=Symbol("ended"),vo=Symbol("queue"),Eg=Symbol("current"),dc=Symbol("process"),iB=Symbol("processing"),lV=Symbol("processJob"),So=Symbol("jobs"),DD=Symbol("jobDone"),nB=Symbol("addFSEntry"),cV=Symbol("addTarEntry"),RD=Symbol("stat"),FD=Symbol("readdir"),sB=Symbol("onreaddir"),oB=Symbol("pipe"),uV=Symbol("entry"),ND=Symbol("entryOpt"),LD=Symbol("writeEntryClass"),gV=Symbol("write"),TD=Symbol("ondrain"),aB=require("fs"),fV=require("path"),DNe=Vw(),MD=DNe(class extends bNe{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=(e.prefix||"").replace(/(\\|\/)+$/,""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[LD]=PD,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 vNe.Gzip(e.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[TD]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[TD]),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[vo]=new PNe,this[So]=0,this.jobs=+e.jobs||4,this[iB]=!1,this[rB]=!1}[gV](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[rB]=!0,this[dc](),this}write(e){if(this[rB])throw new Error("write after end");return e instanceof SNe?this[cV](e):this[nB](e),this.flowing}[cV](e){let r=fV.resolve(this.cwd,e.path);if(this.prefix&&(e.path=this.prefix+"/"+e.path.replace(/^\.(\/+|$)/,"")),!this.filter(e.path,e))e.resume();else{let i=new kD(e.path,r,!1);i.entry=new kNe(e,this[ND](i)),i.entry.on("end",n=>this[DD](i)),this[So]+=1,this[vo].push(i)}this[dc]()}[nB](e){let r=fV.resolve(this.cwd,e);this.prefix&&(e=this.prefix+"/"+e.replace(/^\.(\/+|$)/,"")),this[vo].push(new kD(e,r)),this[dc]()}[RD](e){e.pending=!0,this[So]+=1;let r=this.follow?"stat":"lstat";aB[r](e.absolute,(i,n)=>{e.pending=!1,this[So]-=1,i?this.emit("error",i):this[tB](e,n)})}[tB](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[dc]()}[FD](e){e.pending=!0,this[So]+=1,aB.readdir(e.absolute,(r,i)=>{if(e.pending=!1,this[So]-=1,r)return this.emit("error",r);this[sB](e,i)})}[sB](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[dc]()}[dc](){if(!this[iB]){this[iB]=!0;for(let e=this[vo].head;e!==null&&this[So]this.warn(r,i,n),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}}[uV](e){this[So]+=1;try{return new this[LD](e.path,this[ND](e)).on("end",()=>this[DD](e)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[TD](){this[Eg]&&this[Eg].entry&&this[Eg].entry.resume()}[oB](e){e.piped=!0,e.readdir&&e.readdir.forEach(n=>{let s=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path,o=s==="./"?"":s.replace(/\/*$/,"/");this[nB](o+n)});let r=e.entry,i=this.zip;i?r.on("data",n=>{i.write(n)||r.pause()}):r.on("data",n=>{super.write(n)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),hV=class extends MD{constructor(e){super(e);this[LD]=xNe}pause(){}resume(){}[RD](e){let r=this.follow?"statSync":"lstatSync";this[tB](e,aB[r](e.absolute))}[FD](e,r){this[sB](e,aB.readdirSync(e.absolute))}[oB](e){let r=e.entry,i=this.zip;e.readdir&&e.readdir.forEach(n=>{let s=this.prefix?e.path.slice(this.prefix.length+1)||"./":e.path,o=s==="./"?"":s.replace(/\/*$/,"/");this[nB](o+n)}),i?r.on("data",n=>{i.write(n)}):r.on("data",n=>{super[gV](n)})}};MD.Sync=hV;aV.exports=MD});var bg=E(sd=>{"use strict";var RNe=hg(),FNe=require("events").EventEmitter,ls=require("fs"),lB=process.binding("fs"),Dlt=lB.writeBuffers,NNe=lB.FSReqWrap||lB.FSReqCallback,Ig=Symbol("_autoClose"),xo=Symbol("_close"),od=Symbol("_ended"),Jt=Symbol("_fd"),pV=Symbol("_finished"),Cc=Symbol("_flags"),OD=Symbol("_flush"),KD=Symbol("_handleChunk"),UD=Symbol("_makeBuf"),HD=Symbol("_mode"),cB=Symbol("_needDrain"),yg=Symbol("_onerror"),wg=Symbol("_onopen"),GD=Symbol("_onread"),mc=Symbol("_onwrite"),FA=Symbol("_open"),NA=Symbol("_path"),Ec=Symbol("_pos"),ko=Symbol("_queue"),Bg=Symbol("_read"),dV=Symbol("_readSize"),LA=Symbol("_reading"),uB=Symbol("_remain"),CV=Symbol("_size"),gB=Symbol("_write"),Qg=Symbol("_writing"),fB=Symbol("_defaultFlag"),jD=class extends RNe{constructor(e,r){if(r=r||{},super(r),this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[Jt]=typeof r.fd=="number"?r.fd:null,this[NA]=e,this[dV]=r.readSize||16*1024*1024,this[LA]=!1,this[CV]=typeof r.size=="number"?r.size:Infinity,this[uB]=this[CV],this[Ig]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[Jt]=="number"?this[Bg]():this[FA]()}get fd(){return this[Jt]}get path(){return this[NA]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[FA](){ls.open(this[NA],"r",(e,r)=>this[wg](e,r))}[wg](e,r){e?this[yg](e):(this[Jt]=r,this.emit("open",r),this[Bg]())}[UD](){return Buffer.allocUnsafe(Math.min(this[dV],this[uB]))}[Bg](){if(!this[LA]){this[LA]=!0;let e=this[UD]();if(e.length===0)return process.nextTick(()=>this[GD](null,0,e));ls.read(this[Jt],e,0,e.length,null,(r,i,n)=>this[GD](r,i,n))}}[GD](e,r,i){this[LA]=!1,e?this[yg](e):this[KD](r,i)&&this[Bg]()}[xo](){this[Ig]&&typeof this[Jt]=="number"&&(ls.close(this[Jt],e=>this.emit("close")),this[Jt]=null)}[yg](e){this[LA]=!0,this[xo](),this.emit("error",e)}[KD](e,r){let i=!1;return this[uB]-=e,e>0&&(i=super.write(ethis[wg](e,r))}[wg](e,r){this[fB]&&this[Cc]==="r+"&&e&&e.code==="ENOENT"?(this[Cc]="w",this[FA]()):e?this[yg](e):(this[Jt]=r,this.emit("open",r),this[OD]())}end(e,r){e&&this.write(e,r),this[od]=!0,!this[Qg]&&!this[ko].length&&typeof this[Jt]=="number"&&this[mc](null,0)}write(e,r){return typeof e=="string"&&(e=new Buffer(e,r)),this[od]?(this.emit("error",new Error("write() after end()")),!1):this[Jt]===null||this[Qg]||this[ko].length?(this[ko].push(e),this[cB]=!0,!1):(this[Qg]=!0,this[gB](e),!0)}[gB](e){ls.write(this[Jt],e,0,e.length,this[Ec],(r,i)=>this[mc](r,i))}[mc](e,r){e?this[yg](e):(this[Ec]!==null&&(this[Ec]+=r),this[ko].length?this[OD]():(this[Qg]=!1,this[od]&&!this[pV]?(this[pV]=!0,this[xo](),this.emit("finish")):this[cB]&&(this[cB]=!1,this.emit("drain"))))}[OD](){if(this[ko].length===0)this[od]&&this[mc](null,0);else if(this[ko].length===1)this[gB](this[ko].pop());else{let e=this[ko];this[ko]=[],LNe(this[Jt],e,this[Ec],(r,i)=>this[mc](r,i))}}[xo](){this[Ig]&&typeof this[Jt]=="number"&&(ls.close(this[Jt],e=>this.emit("close")),this[Jt]=null)}},EV=class extends YD{[FA](){let e;try{e=ls.openSync(this[NA],this[Cc],this[HD])}catch(r){if(this[fB]&&this[Cc]==="r+"&&r&&r.code==="ENOENT")return this[Cc]="w",this[FA]();throw r}this[wg](null,e)}[xo](){if(this[Ig]&&typeof this[Jt]=="number"){try{ls.closeSync(this[Jt])}catch(e){}this[Jt]=null,this.emit("close")}}[gB](e){try{this[mc](null,ls.writeSync(this[Jt],e,0,e.length,this[Ec]))}catch(r){this[mc](r,0)}}},LNe=(t,e,r,i)=>{let n=(o,a)=>i(o,a,e),s=new NNe;s.oncomplete=n,lB.writeBuffers(t,e,r,s)};sd.ReadStream=jD;sd.ReadStreamSync=mV;sd.WriteStream=YD;sd.WriteStreamSync=EV});var ld=E((Llt,IV)=>{"use strict";var TNe=Vw(),Flt=require("path"),MNe=Cg(),ONe=require("events"),KNe=Rh(),UNe=1024*1024,HNe=id(),yV=zw(),GNe=fD(),qD=Buffer.from([31,139]),cs=Symbol("state"),Ic=Symbol("writeEntry"),xa=Symbol("readEntry"),JD=Symbol("nextEntry"),wV=Symbol("processEntry"),us=Symbol("extendedHeader"),ad=Symbol("globalExtendedHeader"),TA=Symbol("meta"),BV=Symbol("emitMeta"),Ar=Symbol("buffer"),ka=Symbol("queue"),yc=Symbol("ended"),QV=Symbol("emittedEnd"),wc=Symbol("emit"),Qn=Symbol("unzip"),hB=Symbol("consumeChunk"),pB=Symbol("consumeChunkSub"),WD=Symbol("consumeBody"),bV=Symbol("consumeMeta"),vV=Symbol("consumeHeader"),dB=Symbol("consuming"),zD=Symbol("bufferConcat"),VD=Symbol("maybeEnd"),Ad=Symbol("writing"),MA=Symbol("aborted"),CB=Symbol("onDone"),Bc=Symbol("sawValidEntry"),mB=Symbol("sawNullBlock"),EB=Symbol("sawEOF"),jNe=t=>!0;IV.exports=TNe(class extends ONe{constructor(e){e=e||{},super(e),this.file=e.file||"",this[Bc]=null,this.on(CB,r=>{(this[cs]==="begin"||this[Bc]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(CB,e.ondone):this.on(CB,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||UNe,this.filter=typeof e.filter=="function"?e.filter:jNe,this.writable=!0,this.readable=!1,this[ka]=new KNe,this[Ar]=null,this[xa]=null,this[Ic]=null,this[cs]="begin",this[TA]="",this[us]=null,this[ad]=null,this[yc]=!1,this[Qn]=null,this[MA]=!1,this[mB]=!1,this[EB]=!1,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[vV](e,r){this[Bc]===null&&(this[Bc]=!1);let i;try{i=new MNe(e,r,this[us],this[ad])}catch(n){return this.warn("TAR_ENTRY_INVALID",n)}if(i.nullBlock)this[mB]?(this[EB]=!0,this[cs]==="begin"&&(this[cs]="header"),this[wc]("eof")):(this[mB]=!0,this[wc]("nullBlock"));else if(this[mB]=!1,!i.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:i});else if(!i.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:i});else{let n=i.type;if(/^(Symbolic)?Link$/.test(n)&&!i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:i});else if(!/^(Symbolic)?Link$/.test(n)&&i.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:i});else{let s=this[Ic]=new HNe(i,this[us],this[ad]);if(!this[Bc])if(s.remain){let o=()=>{s.invalid||(this[Bc]=!0)};s.on("end",o)}else this[Bc]=!0;s.meta?s.size>this.maxMetaEntrySize?(s.ignore=!0,this[wc]("ignoredEntry",s),this[cs]="ignore",s.resume()):s.size>0&&(this[TA]="",s.on("data",o=>this[TA]+=o),this[cs]="meta"):(this[us]=null,s.ignore=s.ignore||!this.filter(s.path,s),s.ignore?(this[wc]("ignoredEntry",s),this[cs]=s.remain?"ignore":"header",s.resume()):(s.remain?this[cs]="body":(this[cs]="header",s.end()),this[xa]?this[ka].push(s):(this[ka].push(s),this[JD]())))}}}[wV](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[xa]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",i=>this[JD]()),r=!1)):(this[xa]=null,r=!1),r}[JD](){do;while(this[wV](this[ka].shift()));if(!this[ka].length){let e=this[xa];!e||e.flowing||e.size===e.remain?this[Ad]||this.emit("drain"):e.once("drain",i=>this.emit("drain"))}}[WD](e,r){let i=this[Ic],n=i.blockRemain,s=n>=e.length&&r===0?e:e.slice(r,r+n);return i.write(s),i.blockRemain||(this[cs]="header",this[Ic]=null,i.end()),s.length}[bV](e,r){let i=this[Ic],n=this[WD](e,r);return this[Ic]||this[BV](i),n}[wc](e,r,i){!this[ka].length&&!this[xa]?this.emit(e,r,i):this[ka].push([e,r,i])}[BV](e){switch(this[wc]("meta",this[TA]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[us]=yV.parse(this[TA],this[us],!1);break;case"GlobalExtendedHeader":this[ad]=yV.parse(this[TA],this[ad],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[us]=this[us]||Object.create(null),this[us].path=this[TA].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[us]=this[us]||Object.create(null),this[us].linkpath=this[TA].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[MA]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[MA])return;if(this[Qn]===null&&e){if(this[Ar]&&(e=Buffer.concat([this[Ar],e]),this[Ar]=null),e.lengththis[hB](s)),this[Qn].on("error",s=>this.abort(s)),this[Qn].on("end",s=>{this[yc]=!0,this[hB]()}),this[Ad]=!0;let n=this[Qn][i?"end":"write"](e);return this[Ad]=!1,n}}this[Ad]=!0,this[Qn]?this[Qn].write(e):this[hB](e),this[Ad]=!1;let r=this[ka].length?!1:this[xa]?this[xa].flowing:!0;return!r&&!this[ka].length&&this[xa].once("drain",i=>this.emit("drain")),r}[zD](e){e&&!this[MA]&&(this[Ar]=this[Ar]?Buffer.concat([this[Ar],e]):e)}[VD](){if(this[yc]&&!this[QV]&&!this[MA]&&!this[dB]){this[QV]=!0;let e=this[Ic];if(e&&e.blockRemain){let r=this[Ar]?this[Ar].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[Ar]&&e.write(this[Ar]),e.end()}this[wc](CB)}}[hB](e){if(this[dB])this[zD](e);else if(!e&&!this[Ar])this[VD]();else{if(this[dB]=!0,this[Ar]){this[zD](e);let r=this[Ar];this[Ar]=null,this[pB](r)}else this[pB](e);for(;this[Ar]&&this[Ar].length>=512&&!this[MA]&&!this[EB];){let r=this[Ar];this[Ar]=null,this[pB](r)}this[dB]=!1}(!this[Ar]||this[yc])&&this[VD]()}[pB](e){let r=0,i=e.length;for(;r+512<=i&&!this[MA]&&!this[EB];)switch(this[cs]){case"begin":case"header":this[vV](e,r),r+=512;break;case"ignore":case"body":r+=this[WD](e,r);break;case"meta":r+=this[bV](e,r);break;default:throw new Error("invalid state: "+this[cs])}r{"use strict";var YNe=fg(),xV=ld(),vg=require("fs"),qNe=bg(),kV=require("path"),Tlt=SV.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 i=YNe(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&WNe(i,e),i.noResume||JNe(i),i.file&&i.sync?zNe(i):i.file?VNe(i,r):PV(i)},JNe=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},WNe=(t,e)=>{let r=new Map(e.map(s=>[s.replace(/\/+$/,""),!0])),i=t.filter,n=(s,o)=>{let a=o||kV.parse(s).root||".",l=s===a?!1:r.has(s)?r.get(s):n(kV.dirname(s),a);return r.set(s,l),l};t.filter=i?(s,o)=>i(s,o)&&n(s.replace(/\/+$/,"")):s=>n(s.replace(/\/+$/,""))},zNe=t=>{let e=PV(t),r=t.file,i=!0,n;try{let s=vg.statSync(r),o=t.maxReadSize||16*1024*1024;if(s.size{let r=new xV(t),i=t.maxReadSize||16*1024*1024,n=t.file,s=new Promise((o,a)=>{r.on("error",a),r.on("end",o),vg.stat(n,(l,c)=>{if(l)a(l);else{let u=new qNe.ReadStream(n,{readSize:i,size:c.size});u.on("error",a),u.pipe(r)}})});return e?s.then(e,e):s},PV=t=>new xV(t)});var TV=E((Ult,DV)=>{"use strict";var _Ne=fg(),yB=AB(),Olt=require("fs"),RV=bg(),FV=IB(),NV=require("path"),Klt=DV.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 i=_Ne(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return i.file&&i.sync?XNe(i,e):i.file?ZNe(i,e,r):i.sync?$Ne(i,e):eLe(i,e)},XNe=(t,e)=>{let r=new yB.Sync(t),i=new RV.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(i),LV(r,e)},ZNe=(t,e,r)=>{let i=new yB(t),n=new RV.WriteStream(t.file,{mode:t.mode||438});i.pipe(n);let s=new Promise((o,a)=>{n.on("error",a),n.on("close",o),i.on("error",a)});return _D(i,e),r?s.then(r,r):s},LV=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?FV({file:NV.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:i=>t.add(i)}):t.add(r)}),t.end()},_D=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return FV({file:NV.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:i=>t.add(i)}).then(i=>_D(t,e));t.add(r)}t.end()},$Ne=(t,e)=>{let r=new yB.Sync(t);return LV(r,e),r},eLe=(t,e)=>{let r=new yB(t);return _D(r,e),r}});var XD=E((jlt,MV)=>{"use strict";var tLe=fg(),OV=AB(),Hlt=ld(),gs=require("fs"),KV=bg(),UV=IB(),HV=require("path"),GV=Cg(),Glt=MV.exports=(t,e,r)=>{let i=tLe(t);if(!i.file)throw new TypeError("file is required");if(i.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),i.sync?rLe(i,e):iLe(i,e,r)},rLe=(t,e)=>{let r=new OV.Sync(t),i=!0,n,s;try{try{n=gs.openSync(t.file,"r+")}catch(l){if(l.code==="ENOENT")n=gs.openSync(t.file,"w+");else throw l}let o=gs.fstatSync(n),a=Buffer.alloc(512);e:for(s=0;so.size)break;s+=c,t.mtimeCache&&t.mtimeCache.set(l.path,l.mtime)}i=!1,nLe(t,r,s,n,e)}finally{if(i)try{gs.closeSync(n)}catch(o){}}},nLe=(t,e,r,i,n)=>{let s=new KV.WriteStreamSync(t.file,{fd:i,start:r});e.pipe(s),sLe(e,n)},iLe=(t,e,r)=>{e=Array.from(e);let i=new OV(t),n=(o,a,l)=>{let c=(p,d)=>{p?gs.close(o,m=>l(p)):l(null,d)},u=0;if(a===0)return c(null,0);let g=0,f=Buffer.alloc(512),h=(p,d)=>{if(p)return c(p);if(g+=d,g<512&&d)return gs.read(o,f,g,f.length-g,u+g,h);if(u===0&&f[0]===31&&f[1]===139)return c(new Error("cannot append to compressed archives"));if(g<512)return c(null,u);let m=new GV(f);if(!m.cksumValid)return c(null,u);let I=512*Math.ceil(m.size/512);if(u+I+512>a||(u+=I+512,u>=a))return c(null,u);t.mtimeCache&&t.mtimeCache.set(m.path,m.mtime),g=0,gs.read(o,f,0,512,u,h)};gs.read(o,f,0,512,u,h)},s=new Promise((o,a)=>{i.on("error",a);let l="r+",c=(u,g)=>{if(u&&u.code==="ENOENT"&&l==="r+")return l="w+",gs.open(t.file,l,c);if(u)return a(u);gs.fstat(g,(f,h)=>{if(f)return a(f);n(g,h.size,(p,d)=>{if(p)return a(p);let m=new KV.WriteStream(t.file,{fd:g,start:d});i.pipe(m),m.on("error",a),m.on("close",o),jV(i,e)})})};gs.open(t.file,l,c)});return r?s.then(r,r):s},sLe=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?UV({file:HV.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:i=>t.add(i)}):t.add(r)}),t.end()},jV=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return UV({file:HV.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:i=>t.add(i)}).then(i=>jV(t,e));t.add(r)}t.end()}});var qV=E((qlt,YV)=>{"use strict";var oLe=fg(),aLe=XD(),Ylt=YV.exports=(t,e,r)=>{let i=oLe(t);if(!i.file)throw new TypeError("file is required");if(i.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),ALe(i),aLe(i,e,r)},ALe=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,i)=>e(r,i)&&!(t.mtimeCache.get(r)>i.mtime):(r,i)=>!(t.mtimeCache.get(r)>i.mtime)}});var zV=E((Jlt,JV)=>{var{promisify:WV}=require("util"),OA=require("fs"),lLe=t=>{if(!t)t={mode:511,fs:OA};else if(typeof t=="object")t=P({mode:511,fs:OA},t);else if(typeof t=="number")t={mode:t,fs:OA};else if(typeof t=="string")t={mode:parseInt(t,8),fs:OA};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||OA.mkdir,t.mkdirAsync=WV(t.mkdir),t.stat=t.stat||t.fs.stat||OA.stat,t.statAsync=WV(t.stat),t.statSync=t.statSync||t.fs.statSync||OA.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||OA.mkdirSync,t};JV.exports=lLe});var _V=E((Wlt,VV)=>{var cLe=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:uLe,parse:gLe}=require("path"),fLe=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=uLe(t),cLe==="win32"){let e=/[*|"<>?:]/,{root:r}=gLe(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};VV.exports=fLe});var t7=E((zlt,XV)=>{var{dirname:ZV}=require("path"),$V=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(i=>i.isDirectory()?r:void 0,i=>i.code==="ENOENT"?$V(t,ZV(e),e):void 0),e7=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(i){return i.code==="ENOENT"?e7(t,ZV(e),e):void 0}};XV.exports={findMade:$V,findMadeSync:e7}});var eR=E((Vlt,r7)=>{var{dirname:i7}=require("path"),ZD=(t,e,r)=>{e.recursive=!1;let i=i7(t);return i===t?e.mkdirAsync(t,e).catch(n=>{if(n.code!=="EISDIR")throw n}):e.mkdirAsync(t,e).then(()=>r||t,n=>{if(n.code==="ENOENT")return ZD(i,e).then(s=>ZD(t,e,s));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;return e.statAsync(t).then(s=>{if(s.isDirectory())return r;throw n},()=>{throw n})})},$D=(t,e,r)=>{let i=i7(t);if(e.recursive=!1,i===t)try{return e.mkdirSync(t,e)}catch(n){if(n.code!=="EISDIR")throw n;return}try{return e.mkdirSync(t,e),r||t}catch(n){if(n.code==="ENOENT")return $D(t,e,$D(i,e,r));if(n.code!=="EEXIST"&&n.code!=="EROFS")throw n;try{if(!e.statSync(t).isDirectory())throw n}catch(s){throw n}}};r7.exports={mkdirpManual:ZD,mkdirpManualSync:$D}});var o7=E((_lt,n7)=>{var{dirname:s7}=require("path"),{findMade:hLe,findMadeSync:pLe}=t7(),{mkdirpManual:dLe,mkdirpManualSync:CLe}=eR(),mLe=(t,e)=>(e.recursive=!0,s7(t)===t?e.mkdirAsync(t,e):hLe(e,t).then(i=>e.mkdirAsync(t,e).then(()=>i).catch(n=>{if(n.code==="ENOENT")return dLe(t,e);throw n}))),ELe=(t,e)=>{if(e.recursive=!0,s7(t)===t)return e.mkdirSync(t,e);let i=pLe(e,t);try{return e.mkdirSync(t,e),i}catch(n){if(n.code==="ENOENT")return CLe(t,e);throw n}};n7.exports={mkdirpNative:mLe,mkdirpNativeSync:ELe}});var c7=E((Xlt,a7)=>{var A7=require("fs"),ILe=process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version,tR=ILe.replace(/^v/,"").split("."),l7=+tR[0]>10||+tR[0]==10&&+tR[1]>=12,yLe=l7?t=>t.mkdir===A7.mkdir:()=>!1,wLe=l7?t=>t.mkdirSync===A7.mkdirSync:()=>!1;a7.exports={useNative:yLe,useNativeSync:wLe}});var d7=E((Zlt,u7)=>{var Sg=zV(),xg=_V(),{mkdirpNative:g7,mkdirpNativeSync:f7}=o7(),{mkdirpManual:h7,mkdirpManualSync:p7}=eR(),{useNative:BLe,useNativeSync:QLe}=c7(),kg=(t,e)=>(t=xg(t),e=Sg(e),BLe(e)?g7(t,e):h7(t,e)),bLe=(t,e)=>(t=xg(t),e=Sg(e),QLe(e)?f7(t,e):p7(t,e));kg.sync=bLe;kg.native=(t,e)=>g7(xg(t),Sg(e));kg.manual=(t,e)=>h7(xg(t),Sg(e));kg.nativeSync=(t,e)=>f7(xg(t),Sg(e));kg.manualSync=(t,e)=>p7(xg(t),Sg(e));u7.exports=kg});var B7=E(($lt,C7)=>{"use strict";var fs=require("fs"),Qc=require("path"),vLe=fs.lchown?"lchown":"chown",SLe=fs.lchownSync?"lchownSync":"chownSync",m7=fs.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),E7=(t,e,r)=>{try{return fs[SLe](t,e,r)}catch(i){if(i.code!=="ENOENT")throw i}},xLe=(t,e,r)=>{try{return fs.chownSync(t,e,r)}catch(i){if(i.code!=="ENOENT")throw i}},kLe=m7?(t,e,r,i)=>n=>{!n||n.code!=="EISDIR"?i(n):fs.chown(t,e,r,i)}:(t,e,r,i)=>i,rR=m7?(t,e,r)=>{try{return E7(t,e,r)}catch(i){if(i.code!=="EISDIR")throw i;xLe(t,e,r)}}:(t,e,r)=>E7(t,e,r),PLe=process.version,I7=(t,e,r)=>fs.readdir(t,e,r),DLe=(t,e)=>fs.readdirSync(t,e);/^v4\./.test(PLe)&&(I7=(t,e,r)=>fs.readdir(t,r));var wB=(t,e,r,i)=>{fs[vLe](t,e,r,kLe(t,e,r,n=>{i(n&&n.code!=="ENOENT"?n:null)}))},y7=(t,e,r,i,n)=>{if(typeof e=="string")return fs.lstat(Qc.resolve(t,e),(s,o)=>{if(s)return n(s.code!=="ENOENT"?s:null);o.name=e,y7(t,o,r,i,n)});if(e.isDirectory())iR(Qc.resolve(t,e.name),r,i,s=>{if(s)return n(s);let o=Qc.resolve(t,e.name);wB(o,r,i,n)});else{let s=Qc.resolve(t,e.name);wB(s,r,i,n)}},iR=(t,e,r,i)=>{I7(t,{withFileTypes:!0},(n,s)=>{if(n){if(n.code==="ENOENT")return i();if(n.code!=="ENOTDIR"&&n.code!=="ENOTSUP")return i(n)}if(n||!s.length)return wB(t,e,r,i);let o=s.length,a=null,l=c=>{if(!a){if(c)return i(a=c);if(--o==0)return wB(t,e,r,i)}};s.forEach(c=>y7(t,c,e,r,l))})},RLe=(t,e,r,i)=>{if(typeof e=="string")try{let n=fs.lstatSync(Qc.resolve(t,e));n.name=e,e=n}catch(n){if(n.code==="ENOENT")return;throw n}e.isDirectory()&&w7(Qc.resolve(t,e.name),r,i),rR(Qc.resolve(t,e.name),r,i)},w7=(t,e,r)=>{let i;try{i=DLe(t,{withFileTypes:!0})}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR"||n.code==="ENOTSUP")return rR(t,e,r);throw n}return i&&i.length&&i.forEach(n=>RLe(t,n,e,r)),rR(t,e,r)};C7.exports=iR;iR.sync=w7});var S7=E((rct,nR)=>{"use strict";var Q7=d7(),hs=require("fs"),BB=require("path"),b7=B7(),sR=class extends Error{constructor(e,r){super("Cannot extract through symbolic link");this.path=r,this.symlink=e}get name(){return"SylinkError"}},cd=class extends Error{constructor(e,r){super(r+": Cannot cd into '"+e+"'");this.path=e,this.code=r}get name(){return"CwdError"}},ect=nR.exports=(t,e,r)=>{let i=e.umask,n=e.mode|448,s=(n&i)!=0,o=e.uid,a=e.gid,l=typeof o=="number"&&typeof a=="number"&&(o!==e.processUid||a!==e.processGid),c=e.preserve,u=e.unlink,g=e.cache,f=e.cwd,h=(m,I)=>{m?r(m):(g.set(t,!0),I&&l?b7(I,o,a,B=>h(B)):s?hs.chmod(t,n,r):r())};if(g&&g.get(t)===!0)return h();if(t===f)return hs.stat(t,(m,I)=>{(m||!I.isDirectory())&&(m=new cd(t,m&&m.code||"ENOTDIR")),h(m)});if(c)return Q7(t,{mode:n}).then(m=>h(null,m),h);let d=BB.relative(f,t).split(/\/|\\/);QB(f,d,n,g,u,f,null,h)},QB=(t,e,r,i,n,s,o,a)=>{if(!e.length)return a(null,o);let l=e.shift(),c=t+"/"+l;if(i.get(c))return QB(c,e,r,i,n,s,o,a);hs.mkdir(c,r,v7(c,e,r,i,n,s,o,a))},v7=(t,e,r,i,n,s,o,a)=>l=>{if(l){if(l.path&&BB.dirname(l.path)===s&&(l.code==="ENOTDIR"||l.code==="ENOENT"))return a(new cd(s,l.code));hs.lstat(t,(c,u)=>{if(c)a(c);else if(u.isDirectory())QB(t,e,r,i,n,s,o,a);else if(n)hs.unlink(t,g=>{if(g)return a(g);hs.mkdir(t,r,v7(t,e,r,i,n,s,o,a))});else{if(u.isSymbolicLink())return a(new sR(t,t+"/"+e.join("/")));a(l)}})}else o=o||t,QB(t,e,r,i,n,s,o,a)},tct=nR.exports.sync=(t,e)=>{let r=e.umask,i=e.mode|448,n=(i&r)!=0,s=e.uid,o=e.gid,a=typeof s=="number"&&typeof o=="number"&&(s!==e.processUid||o!==e.processGid),l=e.preserve,c=e.unlink,u=e.cache,g=e.cwd,f=m=>{u.set(t,!0),m&&a&&b7.sync(m,s,o),n&&hs.chmodSync(t,i)};if(u&&u.get(t)===!0)return f();if(t===g){let m=!1,I="ENOTDIR";try{m=hs.statSync(t).isDirectory()}catch(B){I=B.code}finally{if(!m)throw new cd(t,I)}f();return}if(l)return f(Q7.sync(t,i));let p=BB.relative(g,t).split(/\/|\\/),d=null;for(let m=p.shift(),I=g;m&&(I+="/"+m);m=p.shift())if(!u.get(I))try{hs.mkdirSync(I,i),d=d||I,u.set(I,!0)}catch(B){if(B.path&&BB.dirname(B.path)===g&&(B.code==="ENOTDIR"||B.code==="ENOENT"))return new cd(g,B.code);let b=hs.lstatSync(I);if(b.isDirectory()){u.set(I,!0);continue}else if(c){hs.unlinkSync(I),hs.mkdirSync(I,i),d=d||I,u.set(I,!0);continue}else if(b.isSymbolicLink())return new sR(I,I+"/"+p.join("/"))}return f(d)}});var P7=E((ict,x7)=>{var k7=require("assert");x7.exports=()=>{let t=new Map,e=new Map,{join:r}=require("path"),i=u=>r(u).split(/[\\\/]/).slice(0,-1).reduce((g,f)=>g.length?g.concat(r(g[g.length-1],f)):[f],[]),n=new Set,s=u=>{let g=e.get(u);if(!g)throw new Error("function does not have any path reservations");return{paths:g.paths.map(f=>t.get(f)),dirs:[...g.dirs].map(f=>t.get(f))}},o=u=>{let{paths:g,dirs:f}=s(u);return g.every(h=>h[0]===u)&&f.every(h=>h[0]instanceof Set&&h[0].has(u))},a=u=>n.has(u)||!o(u)?!1:(n.add(u),u(()=>l(u)),!0),l=u=>{if(!n.has(u))return!1;let{paths:g,dirs:f}=e.get(u),h=new Set;return g.forEach(p=>{let d=t.get(p);k7.equal(d[0],u),d.length===1?t.delete(p):(d.shift(),typeof d[0]=="function"?h.add(d[0]):d[0].forEach(m=>h.add(m)))}),f.forEach(p=>{let d=t.get(p);k7(d[0]instanceof Set),d[0].size===1&&d.length===1?t.delete(p):d[0].size===1?(d.shift(),h.add(d[0])):d[0].delete(u)}),n.delete(u),h.forEach(p=>a(p)),!0};return{check:o,reserve:(u,g)=>{let f=new Set(u.map(h=>i(h)).reduce((h,p)=>h.concat(p)));return e.set(g,{dirs:f,paths:u}),u.forEach(h=>{let p=t.get(h);p?p.push(g):t.set(h,[g])}),f.forEach(h=>{let p=t.get(h);p?p[p.length-1]instanceof Set?p[p.length-1].add(g):p.push(new Set([g])):t.set(h,[new Set([g])])}),a(g)}}}});var F7=E((nct,D7)=>{var FLe=process.env.__FAKE_PLATFORM__||process.platform,NLe=FLe==="win32",LLe=global.__FAKE_TESTING_FS__||require("fs"),{O_CREAT:TLe,O_TRUNC:MLe,O_WRONLY:OLe,UV_FS_O_FILEMAP:R7=0}=LLe.constants,KLe=NLe&&!!R7,ULe=512*1024,HLe=R7|MLe|TLe|OLe;D7.exports=KLe?t=>t"w"});var hR=E((Act,N7)=>{"use strict";var GLe=require("assert"),sct=require("events").EventEmitter,jLe=ld(),Ut=require("fs"),YLe=bg(),Pa=require("path"),oR=S7(),oct=oR.sync,L7=yD(),qLe=P7(),T7=Symbol("onEntry"),aR=Symbol("checkFs"),M7=Symbol("checkFs2"),AR=Symbol("isReusable"),Da=Symbol("makeFs"),lR=Symbol("file"),cR=Symbol("directory"),bB=Symbol("link"),O7=Symbol("symlink"),K7=Symbol("hardlink"),U7=Symbol("unsupported"),act=Symbol("unknown"),H7=Symbol("checkPath"),Pg=Symbol("mkdir"),nn=Symbol("onError"),vB=Symbol("pending"),G7=Symbol("pend"),Dg=Symbol("unpend"),uR=Symbol("ended"),gR=Symbol("maybeClose"),fR=Symbol("skip"),ud=Symbol("doChown"),gd=Symbol("uid"),fd=Symbol("gid"),j7=require("crypto"),Y7=F7(),SB=()=>{throw new Error("sync function called cb somehow?!?")},JLe=(t,e)=>{if(process.platform!=="win32")return Ut.unlink(t,e);let r=t+".DELETE."+j7.randomBytes(16).toString("hex");Ut.rename(t,r,i=>{if(i)return e(i);Ut.unlink(r,e)})},WLe=t=>{if(process.platform!=="win32")return Ut.unlinkSync(t);let e=t+".DELETE."+j7.randomBytes(16).toString("hex");Ut.renameSync(t,e),Ut.unlinkSync(e)},q7=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,xB=class extends jLe{constructor(e){if(e||(e={}),e.ondone=r=>{this[uR]=!0,this[gR]()},super(e),this.reservations=qLe(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[vB]=0,this[uR]=!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||process.platform==="win32",this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=Pa.resolve(e.cwd||process.cwd()),this.strip=+e.strip||0,this.processUmask=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[T7](r))}warn(e,r,i={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(i.recoverable=!1),super.warn(e,r,i)}[gR](){this[uR]&&this[vB]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[H7](e){if(this.strip){let r=e.path.split(/\/|\\/);if(r.length=this.strip&&(e.linkpath=i.slice(this.strip).join("/"))}}if(!this.preservePaths){let r=e.path;if(r.match(/(^|\/|\\)\.\.(\\|\/|$)/))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:r}),!1;if(Pa.win32.isAbsolute(r)){let i=Pa.win32.parse(r);e.path=r.substr(i.root.length);let n=i.root;this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:e,path:r})}}if(this.win32){let r=Pa.win32.parse(e.path);e.path=r.root===""?L7.encode(e.path):r.root+L7.encode(e.path.substr(r.root.length))}return Pa.isAbsolute(e.path)?e.absolute=e.path:e.absolute=Pa.resolve(this.cwd,e.path),!0}[T7](e){if(!this[H7](e))return e.resume();switch(GLe.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[aR](e);case"CharacterDevice":case"BlockDevice":case"FIFO":return this[U7](e)}}[nn](e,r){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:r}),this[Dg](),r.resume())}[Pg](e,r,i){oR(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},i)}[ud](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}[gd](e){return q7(this.uid,e.uid,this.processUid)}[fd](e){return q7(this.gid,e.gid,this.processGid)}[lR](e,r){let i=e.mode&4095||this.fmode,n=new YLe.WriteStream(e.absolute,{flags:Y7(e.size),mode:i,autoClose:!1});n.on("error",l=>this[nn](l,e));let s=1,o=l=>{if(l)return this[nn](l,e);--s==0&&Ut.close(n.fd,c=>{r(),c?this[nn](c,e):this[Dg]()})};n.on("finish",l=>{let c=e.absolute,u=n.fd;if(e.mtime&&!this.noMtime){s++;let g=e.atime||new Date,f=e.mtime;Ut.futimes(u,g,f,h=>h?Ut.utimes(c,g,f,p=>o(p&&h)):o())}if(this[ud](e)){s++;let g=this[gd](e),f=this[fd](e);Ut.fchown(u,g,f,h=>h?Ut.chown(c,g,f,p=>o(p&&h)):o())}o()});let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",l=>this[nn](l,e)),e.pipe(a)),a.pipe(n)}[cR](e,r){let i=e.mode&4095||this.dmode;this[Pg](e.absolute,i,n=>{if(n)return r(),this[nn](n,e);let s=1,o=a=>{--s==0&&(r(),this[Dg](),e.resume())};e.mtime&&!this.noMtime&&(s++,Ut.utimes(e.absolute,e.atime||new Date,e.mtime,o)),this[ud](e)&&(s++,Ut.chown(e.absolute,this[gd](e),this[fd](e),o)),o()})}[U7](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[O7](e,r){this[bB](e,e.linkpath,"symlink",r)}[K7](e,r){this[bB](e,Pa.resolve(this.cwd,e.linkpath),"link",r)}[G7](){this[vB]++}[Dg](){this[vB]--,this[gR]()}[fR](e){this[Dg](),e.resume()}[AR](e,r){return e.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&process.platform!=="win32"}[aR](e){this[G7]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,i=>this[M7](e,i))}[M7](e,r){this[Pg](Pa.dirname(e.absolute),this.dmode,i=>{if(i)return r(),this[nn](i,e);Ut.lstat(e.absolute,(n,s)=>{s&&(this.keep||this.newer&&s.mtime>e.mtime)?(this[fR](e),r()):n||this[AR](e,s)?this[Da](null,e,r):s.isDirectory()?e.type==="Directory"?!e.mode||(s.mode&4095)===e.mode?this[Da](null,e,r):Ut.chmod(e.absolute,e.mode,o=>this[Da](o,e,r)):Ut.rmdir(e.absolute,o=>this[Da](o,e,r)):JLe(e.absolute,o=>this[Da](o,e,r))})})}[Da](e,r,i){if(e)return this[nn](e,r);switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[lR](r,i);case"Link":return this[K7](r,i);case"SymbolicLink":return this[O7](r,i);case"Directory":case"GNUDumpDir":return this[cR](r,i)}}[bB](e,r,i,n){Ut[i](r,e.absolute,s=>{if(s)return this[nn](s,e);n(),this[Dg](),e.resume()})}},J7=class extends xB{constructor(e){super(e)}[aR](e){let r=this[Pg](Pa.dirname(e.absolute),this.dmode,SB);if(r)return this[nn](r,e);try{let i=Ut.lstatSync(e.absolute);if(this.keep||this.newer&&i.mtime>e.mtime)return this[fR](e);if(this[AR](e,i))return this[Da](null,e,SB);try{return i.isDirectory()?e.type==="Directory"?e.mode&&(i.mode&4095)!==e.mode&&Ut.chmodSync(e.absolute,e.mode):Ut.rmdirSync(e.absolute):WLe(e.absolute),this[Da](null,e,SB)}catch(n){return this[nn](n,e)}}catch(i){return this[Da](null,e,SB)}}[lR](e,r){let i=e.mode&4095||this.fmode,n=l=>{let c;try{Ut.closeSync(o)}catch(u){c=u}(l||c)&&this[nn](l||c,e)},s,o;try{o=Ut.openSync(e.absolute,Y7(e.size),i)}catch(l){return n(l)}let a=this.transform&&this.transform(e)||e;a!==e&&(a.on("error",l=>this[nn](l,e)),e.pipe(a)),a.on("data",l=>{try{Ut.writeSync(o,l,0,l.length)}catch(c){n(c)}}),a.on("end",l=>{let c=null;if(e.mtime&&!this.noMtime){let u=e.atime||new Date,g=e.mtime;try{Ut.futimesSync(o,u,g)}catch(f){try{Ut.utimesSync(e.absolute,u,g)}catch(h){c=f}}}if(this[ud](e)){let u=this[gd](e),g=this[fd](e);try{Ut.fchownSync(o,u,g)}catch(f){try{Ut.chownSync(e.absolute,u,g)}catch(h){c=c||f}}}n(c)})}[cR](e,r){let i=e.mode&4095||this.dmode,n=this[Pg](e.absolute,i);if(n)return this[nn](n,e);if(e.mtime&&!this.noMtime)try{Ut.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(s){}if(this[ud](e))try{Ut.chownSync(e.absolute,this[gd](e),this[fd](e))}catch(s){}e.resume()}[Pg](e,r){try{return oR.sync(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(i){return i}}[bB](e,r,i,n){try{Ut[i+"Sync"](r,e.absolute),e.resume()}catch(s){return this[nn](s,e)}}};xB.Sync=J7;N7.exports=xB});var X7=E((cct,W7)=>{"use strict";var zLe=fg(),kB=hR(),z7=require("fs"),V7=bg(),_7=require("path"),lct=W7.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 i=zLe(t);if(i.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!i.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&VLe(i,e),i.file&&i.sync?_Le(i):i.file?XLe(i,r):i.sync?ZLe(i):$Le(i)},VLe=(t,e)=>{let r=new Map(e.map(s=>[s.replace(/\/+$/,""),!0])),i=t.filter,n=(s,o)=>{let a=o||_7.parse(s).root||".",l=s===a?!1:r.has(s)?r.get(s):n(_7.dirname(s),a);return r.set(s,l),l};t.filter=i?(s,o)=>i(s,o)&&n(s.replace(/\/+$/,"")):s=>n(s.replace(/\/+$/,""))},_Le=t=>{let e=new kB.Sync(t),r=t.file,i=!0,n,s=z7.statSync(r),o=t.maxReadSize||16*1024*1024;new V7.ReadStreamSync(r,{readSize:o,size:s.size}).pipe(e)},XLe=(t,e)=>{let r=new kB(t),i=t.maxReadSize||16*1024*1024,n=t.file,s=new Promise((o,a)=>{r.on("error",a),r.on("close",o),z7.stat(n,(l,c)=>{if(l)a(l);else{let u=new V7.ReadStream(n,{readSize:i,size:c.size});u.on("error",a),u.pipe(r)}})});return e?s.then(e,e):s},ZLe=t=>new kB.Sync(t),$Le=t=>new kB(t)});var Z7=E($r=>{"use strict";$r.c=$r.create=TV();$r.r=$r.replace=XD();$r.t=$r.list=IB();$r.u=$r.update=qV();$r.x=$r.extract=X7();$r.Pack=AB();$r.Unpack=hR();$r.Parse=ld();$r.ReadEntry=id();$r.WriteEntry=xD();$r.Header=Cg();$r.Pax=zw();$r.types=rd()});var e_=E((gct,pR)=>{"use strict";var eTe=Object.prototype.hasOwnProperty,sn="~";function hd(){}Object.create&&(hd.prototype=Object.create(null),new hd().__proto__||(sn=!1));function tTe(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function $7(t,e,r,i,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new tTe(r,i||t,n),o=sn?sn+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],s]:t._events[o].push(s):(t._events[o]=s,t._eventsCount++),t}function PB(t,e){--t._eventsCount==0?t._events=new hd:delete t._events[e]}function Ti(){this._events=new hd,this._eventsCount=0}Ti.prototype.eventNames=function(){var e=[],r,i;if(this._eventsCount===0)return e;for(i in r=this._events)eTe.call(r,i)&&e.push(sn?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(r)):e};Ti.prototype.listeners=function(e){var r=sn?sn+e:e,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,o=new Array(s);n{"use strict";t_.exports=(t,e)=>(e=e||(()=>{}),t.then(r=>new Promise(i=>{i(e())}).then(()=>r),r=>new Promise(i=>{i(e())}).then(()=>{throw r})))});var n_=E((hct,DB)=>{"use strict";var rTe=r_(),dR=class extends Error{constructor(e){super(e);this.name="TimeoutError"}},i_=(t,e,r)=>new Promise((i,n)=>{if(typeof e!="number"||e<0)throw new TypeError("Expected `milliseconds` to be a positive number");if(e===Infinity){i(t);return}let s=setTimeout(()=>{if(typeof r=="function"){try{i(r())}catch(l){n(l)}return}let o=typeof r=="string"?r:`Promise timed out after ${e} milliseconds`,a=r instanceof Error?r:new dR(o);typeof t.cancel=="function"&&t.cancel(),n(a)},e);rTe(t.then(i,n),()=>{clearTimeout(s)})});DB.exports=i_;DB.exports.default=i_;DB.exports.TimeoutError=dR});var s_=E(CR=>{"use strict";Object.defineProperty(CR,"__esModule",{value:!0});function iTe(t,e,r){let i=0,n=t.length;for(;n>0;){let s=n/2|0,o=i+s;r(t[o],e)<=0?(i=++o,n-=s+1):n=s}return i}CR.default=iTe});var a_=E(mR=>{"use strict";Object.defineProperty(mR,"__esModule",{value:!0});var nTe=s_(),o_=class{constructor(){this._queue=[]}enqueue(e,r){r=Object.assign({priority:0},r);let i={priority:r.priority,run:e};if(this.size&&this._queue[this.size-1].priority>=r.priority){this._queue.push(i);return}let n=nTe.default(this._queue,i,(s,o)=>o.priority-s.priority);this._queue.splice(n,0,i)}dequeue(){let e=this._queue.shift();return e==null?void 0:e.run}filter(e){return this._queue.filter(r=>r.priority===e.priority).map(r=>r.run)}get size(){return this._queue.length}};mR.default=o_});var c_=E(ER=>{"use strict";Object.defineProperty(ER,"__esModule",{value:!0});var sTe=e_(),A_=n_(),oTe=a_(),RB=()=>{},aTe=new A_.TimeoutError,l_=class extends sTe{constructor(e){var r,i,n,s;super();if(this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=RB,this._resolveIdle=RB,e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:Infinity,interval:0,concurrency:Infinity,autoStart:!0,queueClass:oTe.default},e),!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(i=(r=e.intervalCap)===null||r===void 0?void 0:r.toString())!==null&&i!==void 0?i:""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(s=(n=e.interval)===null||n===void 0?void 0:n.toString())!==null&&s!==void 0?s:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===Infinity||e.interval===0,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=e.throwOnTimeout===!0,this._isPaused=e.autoStart===!1}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount{this._onResumeInterval()},r)),!0}return!1}_tryToStartAnother(){if(this._queue.size===0)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let r=this._queue.dequeue();return r?(this.emit("active"),r(),e&&this._initializeIntervalIfNeeded(),!0):!1}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||this._intervalId!==void 0||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){this._intervalCount===0&&this._pendingCount===0&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,r={}){return new Promise((i,n)=>{let s=async()=>{this._pendingCount++,this._intervalCount++;try{let o=this._timeout===void 0&&r.timeout===void 0?e():A_.default(Promise.resolve(e()),r.timeout===void 0?this._timeout:r.timeout,()=>{(r.throwOnTimeout===void 0?this._throwOnTimeout:r.throwOnTimeout)&&n(aTe)});i(await o)}catch(o){n(o)}this._next()};this._queue.enqueue(s,r),this._tryToStartAnother(),this.emit("add")})}async addAll(e,r){return Promise.all(e.map(async i=>this.add(i,r)))}start(){return this._isPaused?(this._isPaused=!1,this._processQueue(),this):this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(this._queue.size!==0)return new Promise(e=>{let r=this._resolveEmpty;this._resolveEmpty=()=>{r(),e()}})}async onIdle(){if(!(this._pendingCount===0&&this._queue.size===0))return new Promise(e=>{let r=this._resolveIdle;this._resolveIdle=()=>{r(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}};ER.default=l_});var p_=E((Ect,h_)=>{var yR;h_.exports.getContent=()=>(typeof yR=="undefined"&&(yR=require("zlib").brotliDecompressSync(Buffer.from("W4IvekBxw2bzwtWbVf5fyX2AzAPMISJEY/fbMcKtepRTQlBXjG63eijJbQN4ALzvTBt+EVRVTTsqQ1wCS1oAYPuvqgWZIinRemQXGoWk4C5BOebq1CAsym3ILBoVZ6LpLswKQ4VNE6OQ3IoPxtM31ikJr/0aapiJOVzKMZJvVs7xyhEPb7LomEWn5rAew20WdiSC78J8645T+pzTZd2xBeNUftH3D/KCqIvf9WM4TH9KLFd/FFfbC9KDCMMr8adqt8u9KMdA74EW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WX14rPiYP5Bh1/ryqVKN07xqFXGVJIuEDtMGz9DtMU5BgNahpB5TD5Z9M/vPCYW1vGN2b/cBMKrGVf+gp/u9nk9Y4hRxMF18iZpG05oz4TsHX4psYDy2rjSZR857hzFrR2VNTa6+wq6SzulSjHa3noQGQne9xHMlpmKhEQcBdIUsRAcmGC8vSEpM1ZjEXYmnp3jWBG4/Ghe4VJjYuxH6344nnFnT9midsCN8xgxESC1x2yB6Mi/Lw+IWUmDTQvK4PCY280BUBYREFXgydMTEUsAeW1UWzMLSutQo7EuuKokYIijcgEk+w322B11QPNdsI6GbKueCneic77NY/HwxlWbj7/nnYiYKjKUTKBmtBi7ws3hAuRIZ18/L4oVsbZnczZ9FcbOkiNolgHGNC44Ojgp+bhP/YXuKA5As6KZ9yRpviXZzr3XbsxR6uAxXh7jDZaBbpii0NNetxTbhNK2xx5JGgQkWXMeAlXa0Xf9PRIYtsaTyh5F4Iy7Hn2n6CDfbg19UDne3DdytglcmFKS/vKOpWLMYfqbKyMRfszSBnCgIpJoRqtAngSE1jV3MTCsAcz3hQs3cozb+YPpcST0sgh7zj8O+SxT7j9/oI4ezNJWw3eEn2GALDw3DyCsy3lS3Jzy8lkLvqYsxEn2niP0z9HK+bsvETqtmlzBYjvst/ayEPzFMCY6Cbd8jzMKAZafHiI6sh8tbBQcpz83TvHzx2rHU5ICEAcBDXctnJHArUy/oZ9+eLW5jPtVMuKB33QQ=","base64")).toString()),yR)});var y_=E((wR,I_)=>{(function(t,e){typeof wR=="object"?I_.exports=e():typeof define=="function"&&define.amd?define(e):t.treeify=e()})(wR,function(){function t(n,s){var o=s?"\u2514":"\u251C";return n?o+="\u2500 ":o+="\u2500\u2500\u2510",o}function e(n,s){var o=[];for(var a in n)!n.hasOwnProperty(a)||s&&typeof n[a]=="function"||o.push(a);return o}function r(n,s,o,a,l,c,u){var g="",f=0,h,p,d=a.slice(0);if(d.push([s,o])&&a.length>0&&(a.forEach(function(I,B){B>0&&(g+=(I[1]?" ":"\u2502")+" "),!p&&I[0]===s&&(p=!0)}),g+=t(n,o)+n,l&&(typeof s!="object"||s instanceof Date)&&(g+=": "+s),p&&(g+=" (circular ref.)"),u(g)),!p&&typeof s=="object"){var m=e(s,c);m.forEach(function(I){h=++f===m.length,r(I,s[I],h,d,l,c,u)})}}var i={};return i.asLines=function(n,s,o,a){var l=typeof o!="function"?o:!1;r(".",n,!1,[],s,l,a||o)},i.asTree=function(n,s,o){var a="";return r(".",n,!1,[],s,o,function(l){a+=l+` -`}),a},i})});var x_=E((Uct,bR)=>{"use strict";var pTe=t=>{let e=!1,r=!1,i=!1;for(let n=0;n{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=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(t)?t=t.map(n=>n.trim()).filter(n=>n.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=pTe(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),r(t))};bR.exports=S_;bR.exports.default=S_});var Na=E(TR=>{"use strict";Object.defineProperty(TR,"__esModule",{value:!0});TR.default=L_;function L_(){}L_.prototype={diff:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i.callback;typeof i=="function"&&(n=i,i={}),this.options=i;var s=this;function o(d){return n?(setTimeout(function(){n(void 0,d)},0),!0):d}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var a=r.length,l=e.length,c=1,u=a+l,g=[{newPos:-1,components:[]}],f=this.extractCommon(g[0],r,e,0);if(g[0].newPos+1>=a&&f+1>=l)return o([{value:this.join(r),count:r.length}]);function h(){for(var d=-1*c;d<=c;d+=2){var m=void 0,I=g[d-1],B=g[d+1],b=(B?B.newPos:0)-d;I&&(g[d-1]=void 0);var R=I&&I.newPos+1=a&&b+1>=l)return o(yTe(s,m.components,r,e,s.useLongestToken));g[d]=m}c++}if(n)(function d(){setTimeout(function(){if(c>u)return n();h()||d()},0)})();else for(;c<=u;){var p=h();if(p)return p}},pushComponent:function(e,r,i){var n=e[e.length-1];n&&n.added===r&&n.removed===i?e[e.length-1]={count:n.count+1,added:r,removed:i}:e.push({count:1,added:r,removed:i})},extractCommon:function(e,r,i,n){for(var s=r.length,o=i.length,a=e.newPos,l=a-n,c=0;a+1h.length?d:h}),c.value=t.join(u)}else c.value=t.join(r.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}var f=e[o-1];return o>1&&typeof f.value=="string"&&(f.added||f.removed)&&t.equals("",f.value)&&(e[o-2].value+=f.value,e.pop()),e}function wTe(t){return{newPos:t.newPos,components:t.components.slice(0)}}});var M_=E(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.diffChars=BTe;Cd.characterDiff=void 0;var bTe=QTe(Na());function QTe(t){return t&&t.__esModule?t:{default:t}}var T_=new bTe.default;Cd.characterDiff=T_;function BTe(t,e,r){return T_.diff(t,e,r)}});var OR=E(MR=>{"use strict";Object.defineProperty(MR,"__esModule",{value:!0});MR.generateOptions=vTe;function vTe(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}});var U_=E(Ng=>{"use strict";Object.defineProperty(Ng,"__esModule",{value:!0});Ng.diffWords=STe;Ng.diffWordsWithSpace=xTe;Ng.wordDiff=void 0;var PTe=kTe(Na()),DTe=OR();function kTe(t){return t&&t.__esModule?t:{default:t}}var O_=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,K_=/\S/,md=new PTe.default;Ng.wordDiff=md;md.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!K_.test(t)&&!K_.test(e)};md.tokenize=function(t){for(var e=t.split(/(\s+|[()[\]{}'"]|\b)/),r=0;r{"use strict";Object.defineProperty(Lg,"__esModule",{value:!0});Lg.diffLines=RTe;Lg.diffTrimmedLines=FTe;Lg.lineDiff=void 0;var LTe=NTe(Na()),TTe=OR();function NTe(t){return t&&t.__esModule?t:{default:t}}var OB=new LTe.default;Lg.lineDiff=OB;OB.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var i=0;i{"use strict";Object.defineProperty(Ed,"__esModule",{value:!0});Ed.diffSentences=MTe;Ed.sentenceDiff=void 0;var KTe=OTe(Na());function OTe(t){return t&&t.__esModule?t:{default:t}}var KR=new KTe.default;Ed.sentenceDiff=KR;KR.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};function MTe(t,e,r){return KR.diff(t,e,r)}});var G_=E(Id=>{"use strict";Object.defineProperty(Id,"__esModule",{value:!0});Id.diffCss=UTe;Id.cssDiff=void 0;var GTe=HTe(Na());function HTe(t){return t&&t.__esModule?t:{default:t}}var UR=new GTe.default;Id.cssDiff=UR;UR.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};function UTe(t,e,r){return UR.diff(t,e,r)}});var Y_=E(Tg=>{"use strict";Object.defineProperty(Tg,"__esModule",{value:!0});Tg.diffJson=jTe;Tg.canonicalize=UB;Tg.jsonDiff=void 0;var j_=YTe(Na()),qTe=KB();function YTe(t){return t&&t.__esModule?t:{default:t}}function HB(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?HB=function(r){return typeof r}:HB=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},HB(t)}var JTe=Object.prototype.toString,bc=new j_.default;Tg.jsonDiff=bc;bc.useLongestToken=!0;bc.tokenize=qTe.lineDiff.tokenize;bc.castInput=function(t){var e=this.options,r=e.undefinedReplacement,i=e.stringifyReplacer,n=i===void 0?function(s,o){return typeof o=="undefined"?r:o}:i;return typeof t=="string"?t:JSON.stringify(UB(t,null,null,n),n," ")};bc.equals=function(t,e){return j_.default.prototype.equals.call(bc,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};function jTe(t,e,r){return bc.diff(t,e,r)}function UB(t,e,r,i,n){e=e||[],r=r||[],i&&(t=i(n,t));var s;for(s=0;s{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.diffArrays=WTe;yd.arrayDiff=void 0;var VTe=zTe(Na());function zTe(t){return t&&t.__esModule?t:{default:t}}var wd=new VTe.default;yd.arrayDiff=wd;wd.tokenize=function(t){return t.slice()};wd.join=wd.removeEmpty=function(t){return t};function WTe(t,e,r){return wd.diff(t,e,r)}});var GB=E(HR=>{"use strict";Object.defineProperty(HR,"__esModule",{value:!0});HR.parsePatch=_Te;function _Te(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.split(/\r\n|[\n\v\f\r\x85]/),i=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],n=[],s=0;function o(){var c={};for(n.push(c);s{"use strict";Object.defineProperty(GR,"__esModule",{value:!0});GR.default=XTe;function XTe(t,e,r){var i=!0,n=!1,s=!1,o=1;return function a(){if(i&&!s){if(n?o++:i=!1,t+o<=r)return o;s=!0}if(!n)return s||(i=!0),e<=t-o?-o++:(n=!0,a())}}});var V_=E(jB=>{"use strict";Object.defineProperty(jB,"__esModule",{value:!0});jB.applyPatch=W_;jB.applyPatches=ZTe;var z_=GB(),eMe=$Te(J_());function $Te(t){return t&&t.__esModule?t:{default:t}}function W_(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string"&&(e=(0,z_.parsePatch)(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}var i=t.split(/\r\n|[\n\v\f\r\x85]/),n=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=e.hunks,o=r.compareLine||function(F,D,he,pe){return D===pe},a=0,l=r.fuzzFactor||0,c=0,u=0,g,f;function h(F,D){for(var he=0;he0?pe[0]:" ",Pe=pe.length>0?pe.substr(1):pe;if(Ne===" "||Ne==="-"){if(!o(D+1,i[D],Ne,Pe)&&(a++,a>l))return!1;D++}}return!0}for(var p=0;p0?ne[0]:" ",A=ne.length>0?ne.substr(1):ne,V=L.linedelimiters[J];if(q===" ")K++;else if(q==="-")i.splice(K,1),n.splice(K,1);else if(q==="+")i.splice(K,0,A),n.splice(K,0,V),K++;else if(q==="\\"){var W=L.lines[J-1]?L.lines[J-1][0]:null;W==="+"?g=!0:W==="-"&&(f=!0)}}}if(g)for(;!i[i.length-1];)i.pop(),n.pop();else f&&(i.push(""),n.push(` -`));for(var X=0;X{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.structuredPatch=__;Bd.createTwoFilesPatch=X_;Bd.createPatch=tMe;var rMe=KB();function jR(t){return sMe(t)||nMe(t)||iMe()}function iMe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function nMe(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function sMe(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e0?l(L.lines.slice(-o.context)):[],u-=f.length,g-=f.length)}(H=f).push.apply(H,jR(R.map(function(X){return(b.added?"+":"-")+X}))),b.added?p+=R.length:h+=R.length}else{if(u)if(R.length<=o.context*2&&B=a.length-2&&R.length<=o.context){var A=/\n$/.test(r),V=/\n$/.test(i),W=R.length==0&&f.length>q.oldLines;!A&&W&&f.splice(q.oldLines,0,"\\ No newline at end of file"),(!A&&!W||!V)&&f.push("\\ No newline at end of file")}c.push(q),u=0,g=0,f=[]}h+=R.length,p+=R.length}},m=0;m{"use strict";Object.defineProperty(YB,"__esModule",{value:!0});YB.arrayEqual=oMe;YB.arrayStartsWith=Z_;function oMe(t,e){return t.length!==e.length?!1:Z_(t,e)}function Z_(t,e){if(e.length>t.length)return!1;for(var r=0;r{"use strict";Object.defineProperty(qB,"__esModule",{value:!0});qB.calcLineCount=eX;qB.merge=aMe;var AMe=YR(),lMe=GB(),qR=$_();function Mg(t){return gMe(t)||uMe(t)||cMe()}function cMe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function uMe(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function gMe(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e{"use strict";Object.defineProperty(zR,"__esModule",{value:!0});zR.convertChangesToDMP=dMe;function dMe(t){for(var e=[],r,i,n=0;n{"use strict";Object.defineProperty(VR,"__esModule",{value:!0});VR.convertChangesToXML=CMe;function CMe(t){for(var e=[],r=0;r"):i.removed&&e.push(""),e.push(mMe(i.value)),i.added?e.push(""):i.removed&&e.push("")}return e.join("")}function mMe(t){var e=t;return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=e.replace(/"/g,"""),e}});var CX=E(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});Object.defineProperty(br,"Diff",{enumerable:!0,get:function(){return EMe.default}});Object.defineProperty(br,"diffChars",{enumerable:!0,get:function(){return IMe.diffChars}});Object.defineProperty(br,"diffWords",{enumerable:!0,get:function(){return fX.diffWords}});Object.defineProperty(br,"diffWordsWithSpace",{enumerable:!0,get:function(){return fX.diffWordsWithSpace}});Object.defineProperty(br,"diffLines",{enumerable:!0,get:function(){return hX.diffLines}});Object.defineProperty(br,"diffTrimmedLines",{enumerable:!0,get:function(){return hX.diffTrimmedLines}});Object.defineProperty(br,"diffSentences",{enumerable:!0,get:function(){return yMe.diffSentences}});Object.defineProperty(br,"diffCss",{enumerable:!0,get:function(){return wMe.diffCss}});Object.defineProperty(br,"diffJson",{enumerable:!0,get:function(){return pX.diffJson}});Object.defineProperty(br,"canonicalize",{enumerable:!0,get:function(){return pX.canonicalize}});Object.defineProperty(br,"diffArrays",{enumerable:!0,get:function(){return BMe.diffArrays}});Object.defineProperty(br,"applyPatch",{enumerable:!0,get:function(){return dX.applyPatch}});Object.defineProperty(br,"applyPatches",{enumerable:!0,get:function(){return dX.applyPatches}});Object.defineProperty(br,"parsePatch",{enumerable:!0,get:function(){return QMe.parsePatch}});Object.defineProperty(br,"merge",{enumerable:!0,get:function(){return bMe.merge}});Object.defineProperty(br,"structuredPatch",{enumerable:!0,get:function(){return _R.structuredPatch}});Object.defineProperty(br,"createTwoFilesPatch",{enumerable:!0,get:function(){return _R.createTwoFilesPatch}});Object.defineProperty(br,"createPatch",{enumerable:!0,get:function(){return _R.createPatch}});Object.defineProperty(br,"convertChangesToDMP",{enumerable:!0,get:function(){return vMe.convertChangesToDMP}});Object.defineProperty(br,"convertChangesToXML",{enumerable:!0,get:function(){return SMe.convertChangesToXML}});var EMe=xMe(Na()),IMe=M_(),fX=U_(),hX=KB(),yMe=H_(),wMe=G_(),pX=Y_(),BMe=q_(),dX=V_(),QMe=GB(),bMe=cX(),_R=YR(),vMe=uX(),SMe=gX();function xMe(t){return t&&t.__esModule?t:{default:t}}});var WB=E((agt,mX)=>{var kMe=As(),PMe=Nw(),DMe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,RMe=/^\w*$/;function FMe(t,e){if(kMe(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||PMe(t)?!0:RMe.test(t)||!DMe.test(t)||e!=null&&t in Object(e)}mX.exports=FMe});var Gs=E((Agt,EX)=>{function NMe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}EX.exports=NMe});var zB=E((lgt,IX)=>{var LMe=Ac(),TMe=Gs(),MMe="[object AsyncFunction]",OMe="[object Function]",KMe="[object GeneratorFunction]",UMe="[object Proxy]";function HMe(t){if(!TMe(t))return!1;var e=LMe(t);return e==OMe||e==KMe||e==MMe||e==UMe}IX.exports=HMe});var wX=E((cgt,yX)=>{var GMe=Ks(),jMe=GMe["__core-js_shared__"];yX.exports=jMe});var bX=E((ugt,BX)=>{var XR=wX(),QX=function(){var t=/[^.]+$/.exec(XR&&XR.keys&&XR.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function YMe(t){return!!QX&&QX in t}BX.exports=YMe});var ZR=E((ggt,vX)=>{var qMe=Function.prototype,JMe=qMe.toString;function WMe(t){if(t!=null){try{return JMe.call(t)}catch(e){}try{return t+""}catch(e){}}return""}vX.exports=WMe});var xX=E((fgt,SX)=>{var zMe=zB(),VMe=bX(),_Me=Gs(),XMe=ZR(),ZMe=/[\\^$.*+?()[\]{}|]/g,$Me=/^\[object .+?Constructor\]$/,eOe=Function.prototype,tOe=Object.prototype,rOe=eOe.toString,iOe=tOe.hasOwnProperty,nOe=RegExp("^"+rOe.call(iOe).replace(ZMe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sOe(t){if(!_Me(t)||VMe(t))return!1;var e=zMe(t)?nOe:$Me;return e.test(XMe(t))}SX.exports=sOe});var PX=E((hgt,kX)=>{function oOe(t,e){return t==null?void 0:t[e]}kX.exports=oOe});var UA=E((pgt,DX)=>{var aOe=xX(),AOe=PX();function lOe(t,e){var r=AOe(t,e);return aOe(r)?r:void 0}DX.exports=lOe});var Qd=E((dgt,RX)=>{var cOe=UA(),uOe=cOe(Object,"create");RX.exports=uOe});var LX=E((Cgt,FX)=>{var NX=Qd();function gOe(){this.__data__=NX?NX(null):{},this.size=0}FX.exports=gOe});var MX=E((mgt,TX)=>{function fOe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}TX.exports=fOe});var KX=E((Egt,OX)=>{var hOe=Qd(),pOe="__lodash_hash_undefined__",dOe=Object.prototype,COe=dOe.hasOwnProperty;function mOe(t){var e=this.__data__;if(hOe){var r=e[t];return r===pOe?void 0:r}return COe.call(e,t)?e[t]:void 0}OX.exports=mOe});var HX=E((Igt,UX)=>{var EOe=Qd(),IOe=Object.prototype,yOe=IOe.hasOwnProperty;function wOe(t){var e=this.__data__;return EOe?e[t]!==void 0:yOe.call(e,t)}UX.exports=wOe});var jX=E((ygt,GX)=>{var BOe=Qd(),QOe="__lodash_hash_undefined__";function bOe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=BOe&&e===void 0?QOe:e,this}GX.exports=bOe});var qX=E((wgt,YX)=>{var vOe=LX(),SOe=MX(),xOe=KX(),kOe=HX(),POe=jX();function Og(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{function DOe(){this.__data__=[],this.size=0}JX.exports=DOe});var Kg=E((Qgt,zX)=>{function ROe(t,e){return t===e||t!==t&&e!==e}zX.exports=ROe});var bd=E((bgt,VX)=>{var FOe=Kg();function NOe(t,e){for(var r=t.length;r--;)if(FOe(t[r][0],e))return r;return-1}VX.exports=NOe});var XX=E((vgt,_X)=>{var LOe=bd(),TOe=Array.prototype,MOe=TOe.splice;function OOe(t){var e=this.__data__,r=LOe(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():MOe.call(e,r,1),--this.size,!0}_X.exports=OOe});var $X=E((Sgt,ZX)=>{var KOe=bd();function UOe(t){var e=this.__data__,r=KOe(e,t);return r<0?void 0:e[r][1]}ZX.exports=UOe});var tZ=E((xgt,eZ)=>{var HOe=bd();function GOe(t){return HOe(this.__data__,t)>-1}eZ.exports=GOe});var iZ=E((kgt,rZ)=>{var jOe=bd();function YOe(t,e){var r=this.__data__,i=jOe(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}rZ.exports=YOe});var vd=E((Pgt,nZ)=>{var qOe=WX(),JOe=XX(),WOe=$X(),zOe=tZ(),VOe=iZ();function Ug(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var _Oe=UA(),XOe=Ks(),ZOe=_Oe(XOe,"Map");sZ.exports=ZOe});var AZ=E((Rgt,oZ)=>{var aZ=qX(),$Oe=vd(),eKe=VB();function tKe(){this.size=0,this.__data__={hash:new aZ,map:new(eKe||$Oe),string:new aZ}}oZ.exports=tKe});var cZ=E((Fgt,lZ)=>{function rKe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}lZ.exports=rKe});var Sd=E((Ngt,uZ)=>{var iKe=cZ();function nKe(t,e){var r=t.__data__;return iKe(e)?r[typeof e=="string"?"string":"hash"]:r.map}uZ.exports=nKe});var fZ=E((Lgt,gZ)=>{var sKe=Sd();function oKe(t){var e=sKe(this,t).delete(t);return this.size-=e?1:0,e}gZ.exports=oKe});var pZ=E((Tgt,hZ)=>{var aKe=Sd();function AKe(t){return aKe(this,t).get(t)}hZ.exports=AKe});var CZ=E((Mgt,dZ)=>{var lKe=Sd();function cKe(t){return lKe(this,t).has(t)}dZ.exports=cKe});var EZ=E((Ogt,mZ)=>{var uKe=Sd();function gKe(t,e){var r=uKe(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}mZ.exports=gKe});var _B=E((Kgt,IZ)=>{var fKe=AZ(),hKe=fZ(),pKe=pZ(),dKe=CZ(),CKe=EZ();function Hg(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var wZ=_B(),mKe="Expected a function";function $R(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(mKe);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var o=t.apply(this,i);return r.cache=s.set(n,o)||s,o};return r.cache=new($R.Cache||wZ),r}$R.Cache=wZ;yZ.exports=$R});var bZ=E((Hgt,QZ)=>{var EKe=BZ(),IKe=500;function yKe(t){var e=EKe(t,function(i){return r.size===IKe&&r.clear(),i}),r=e.cache;return e}QZ.exports=yKe});var SZ=E((Ggt,vZ)=>{var wKe=bZ(),BKe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,QKe=/\\(\\)?/g,bKe=wKe(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(BKe,function(r,i,n,s){e.push(n?s.replace(QKe,"$1"):i||r)}),e});vZ.exports=bKe});var Gg=E((jgt,xZ)=>{var vKe=As(),SKe=WB(),xKe=SZ(),kKe=gg();function PKe(t,e){return vKe(t)?t:SKe(t,e)?[t]:xKe(kKe(t))}xZ.exports=PKe});var Sc=E((Ygt,kZ)=>{var DKe=Nw(),RKe=1/0;function FKe(t){if(typeof t=="string"||DKe(t))return t;var e=t+"";return e=="0"&&1/t==-RKe?"-0":e}kZ.exports=FKe});var xd=E((qgt,PZ)=>{var NKe=Gg(),LKe=Sc();function TKe(t,e){e=NKe(e,t);for(var r=0,i=e.length;t!=null&&r{var MKe=UA(),OKe=function(){try{var t=MKe(Object,"defineProperty");return t({},"",{}),t}catch(e){}}();DZ.exports=OKe});var jg=E((Wgt,RZ)=>{var FZ=eF();function KKe(t,e,r){e=="__proto__"&&FZ?FZ(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}RZ.exports=KKe});var XB=E((zgt,NZ)=>{var UKe=jg(),HKe=Kg(),GKe=Object.prototype,jKe=GKe.hasOwnProperty;function YKe(t,e,r){var i=t[e];(!(jKe.call(t,e)&&HKe(i,r))||r===void 0&&!(e in t))&&UKe(t,e,r)}NZ.exports=YKe});var kd=E((Vgt,LZ)=>{var qKe=9007199254740991,JKe=/^(?:0|[1-9]\d*)$/;function WKe(t,e){var r=typeof t;return e=e==null?qKe:e,!!e&&(r=="number"||r!="symbol"&&JKe.test(t))&&t>-1&&t%1==0&&t{var zKe=XB(),VKe=Gg(),_Ke=kd(),MZ=Gs(),XKe=Sc();function ZKe(t,e,r,i){if(!MZ(t))return t;e=VKe(e,t);for(var n=-1,s=e.length,o=s-1,a=t;a!=null&&++n{var $Ke=xd(),e1e=tF(),t1e=Gg();function r1e(t,e,r){for(var i=-1,n=e.length,s={};++i{function i1e(t,e){return t!=null&&e in Object(t)}UZ.exports=i1e});var jZ=E(($gt,GZ)=>{var n1e=Ac(),s1e=Qo(),o1e="[object Arguments]";function a1e(t){return s1e(t)&&n1e(t)==o1e}GZ.exports=a1e});var Pd=E((eft,YZ)=>{var qZ=jZ(),A1e=Qo(),JZ=Object.prototype,l1e=JZ.hasOwnProperty,c1e=JZ.propertyIsEnumerable,u1e=qZ(function(){return arguments}())?qZ:function(t){return A1e(t)&&l1e.call(t,"callee")&&!c1e.call(t,"callee")};YZ.exports=u1e});var ZB=E((tft,WZ)=>{var g1e=9007199254740991;function f1e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=g1e}WZ.exports=f1e});var rF=E((rft,zZ)=>{var h1e=Gg(),p1e=Pd(),d1e=As(),C1e=kd(),m1e=ZB(),E1e=Sc();function I1e(t,e,r){e=h1e(e,t);for(var i=-1,n=e.length,s=!1;++i{var y1e=HZ(),w1e=rF();function B1e(t,e){return t!=null&&w1e(t,e,y1e)}VZ.exports=B1e});var XZ=E((nft,_Z)=>{var Q1e=KZ(),b1e=iF();function v1e(t,e){return Q1e(t,e,function(r,i){return b1e(t,i)})}_Z.exports=v1e});var $B=E((sft,ZZ)=>{function S1e(t,e){for(var r=-1,i=e.length,n=t.length;++r{var e$=ac(),x1e=Pd(),k1e=As(),t$=e$?e$.isConcatSpreadable:void 0;function P1e(t){return k1e(t)||x1e(t)||!!(t$&&t&&t[t$])}$Z.exports=P1e});var s$=E((aft,i$)=>{var D1e=$B(),R1e=r$();function n$(t,e,r,i,n){var s=-1,o=t.length;for(r||(r=R1e),n||(n=[]);++s0&&r(a)?e>1?n$(a,e-1,r,i,n):D1e(n,a):i||(n[n.length]=a)}return n}i$.exports=n$});var a$=E((Aft,o$)=>{var F1e=s$();function N1e(t){var e=t==null?0:t.length;return e?F1e(t,1):[]}o$.exports=N1e});var l$=E((lft,A$)=>{function L1e(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)}A$.exports=L1e});var nF=E((cft,c$)=>{var T1e=l$(),u$=Math.max;function M1e(t,e,r){return e=u$(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,s=u$(i.length-e,0),o=Array(s);++n{function O1e(t){return function(){return t}}g$.exports=O1e});var e0=E((gft,h$)=>{function K1e(t){return t}h$.exports=K1e});var C$=E((fft,p$)=>{var U1e=f$(),d$=eF(),H1e=e0(),G1e=d$?function(t,e){return d$(t,"toString",{configurable:!0,enumerable:!1,value:U1e(e),writable:!0})}:H1e;p$.exports=G1e});var E$=E((hft,m$)=>{var j1e=800,Y1e=16,q1e=Date.now;function J1e(t){var e=0,r=0;return function(){var i=q1e(),n=Y1e-(i-r);if(r=i,n>0){if(++e>=j1e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}m$.exports=J1e});var sF=E((pft,I$)=>{var W1e=C$(),z1e=E$(),V1e=z1e(W1e);I$.exports=V1e});var w$=E((dft,y$)=>{var _1e=a$(),X1e=nF(),Z1e=sF();function $1e(t){return Z1e(X1e(t,void 0,_1e),t+"")}y$.exports=$1e});var Q$=E((Cft,B$)=>{var eUe=XZ(),tUe=w$(),rUe=tUe(function(t,e){return t==null?{}:eUe(t,e)});B$.exports=rUe});var M$=E((lpt,N$)=>{"use strict";var pF;try{pF=Map}catch(t){}var dF;try{dF=Set}catch(t){}function L$(t,e,r){if(!t||typeof t!="object"||typeof t=="function")return t;if(t.nodeType&&"cloneNode"in t)return t.cloneNode(!0);if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);if(Array.isArray(t))return t.map(T$);if(pF&&t instanceof pF)return new Map(Array.from(t.entries()));if(dF&&t instanceof dF)return new Set(Array.from(t.values()));if(t instanceof Object){e.push(t);var i=Object.create(t);r.push(i);for(var n in t){var s=e.findIndex(function(o){return o===t[n]});i[n]=s>-1?r[s]:L$(t[n],e,r)}return i}return t}function T$(t){return L$(t,[],[])}N$.exports=T$});var Nd=E(CF=>{"use strict";Object.defineProperty(CF,"__esModule",{value:!0});CF.default=uUe;var gUe=Object.prototype.toString,fUe=Error.prototype.toString,hUe=RegExp.prototype.toString,pUe=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",dUe=/^Symbol\((.*)\)(.*)$/;function CUe(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function O$(t,e=!1){if(t==null||t===!0||t===!1)return""+t;let r=typeof t;if(r==="number")return CUe(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return pUe.call(t).replace(dUe,"Symbol($1)");let i=gUe.call(t).slice(8,-1);return i==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):i==="Error"||t instanceof Error?"["+fUe.call(t)+"]":i==="RegExp"?hUe.call(t):null}function uUe(t,e){let r=O$(t,e);return r!==null?r:JSON.stringify(t,function(i,n){let s=O$(this[i],e);return s!==null?s:n},2)}});var La=E(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.default=ci.array=ci.object=ci.boolean=ci.date=ci.number=ci.string=ci.mixed=void 0;var K$=mUe(Nd());function mUe(t){return t&&t.__esModule?t:{default:t}}var U$={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:i})=>{let n=i!=null&&i!==r,s=`${t} must be a \`${e}\` type, but the final value was: \`${(0,K$.default)(r,!0)}\``+(n?` (cast from the value \`${(0,K$.default)(i,!0)}\`).`:".");return r===null&&(s+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),s},defined:"${path} must be defined"};ci.mixed=U$;var H$={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"};ci.string=H$;var G$={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"};ci.number=G$;var j$={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"};ci.date=j$;var Y$={isValue:"${path} field must be ${value}"};ci.boolean=Y$;var q$={noUnknown:"${path} field has unspecified keys: ${unknown}"};ci.object=q$;var J$={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must be have ${length} items"};ci.array=J$;var EUe=Object.assign(Object.create(null),{mixed:U$,string:H$,number:G$,date:j$,object:q$,array:J$,boolean:Y$});ci.default=EUe});var z$=E((gpt,W$)=>{var IUe=Object.prototype,yUe=IUe.hasOwnProperty;function wUe(t,e){return t!=null&&yUe.call(t,e)}W$.exports=wUe});var Ld=E((fpt,V$)=>{var BUe=z$(),QUe=rF();function bUe(t,e){return t!=null&&QUe(t,e,BUe)}V$.exports=bUe});var qg=E(n0=>{"use strict";Object.defineProperty(n0,"__esModule",{value:!0});n0.default=void 0;var vUe=t=>t&&t.__isYupSchema__;n0.default=vUe});var Z$=E(s0=>{"use strict";Object.defineProperty(s0,"__esModule",{value:!0});s0.default=void 0;var SUe=_$(Ld()),xUe=_$(qg());function _$(t){return t&&t.__esModule?t:{default:t}}var X$=class{constructor(e,r){if(this.refs=e,this.refs=e,typeof r=="function"){this.fn=r;return}if(!(0,SUe.default)(r,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:n,otherwise:s}=r,o=typeof i=="function"?i:(...a)=>a.every(l=>l===i);this.fn=function(...a){let l=a.pop(),c=a.pop(),u=o(...a)?n:s;if(!!u)return typeof u=="function"?u(c):c.concat(u.resolve(l))}}resolve(e,r){let i=this.refs.map(s=>s.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),n=this.fn.apply(e,i.concat(e,r));if(n===void 0||n===e)return e;if(!(0,xUe.default)(n))throw new TypeError("conditions must return a schema object");return n.resolve(r)}},kUe=X$;s0.default=kUe});var EF=E(mF=>{"use strict";Object.defineProperty(mF,"__esModule",{value:!0});mF.default=PUe;function PUe(t){return t==null?[]:[].concat(t)}});var xc=E(o0=>{"use strict";Object.defineProperty(o0,"__esModule",{value:!0});o0.default=void 0;var DUe=$$(Nd()),RUe=$$(EF());function $$(t){return t&&t.__esModule?t:{default:t}}function IF(){return IF=Object.assign||function(t){for(var e=1;e(0,DUe.default)(r[s])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,i,n){super();this.name="ValidationError",this.value=r,this.path=i,this.type=n,this.errors=[],this.inner=[],(0,RUe.default)(e).forEach(s=>{Td.isError(s)?(this.errors.push(...s.errors),this.inner=this.inner.concat(s.inner.length?s.inner:s)):this.errors.push(s)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,Td)}};o0.default=Td});var a0=E(yF=>{"use strict";Object.defineProperty(yF,"__esModule",{value:!0});yF.default=NUe;var wF=LUe(xc());function LUe(t){return t&&t.__esModule?t:{default:t}}var TUe=t=>{let e=!1;return(...r)=>{e||(e=!0,t(...r))}};function NUe(t,e){let{endEarly:r,tests:i,args:n,value:s,errors:o,sort:a,path:l}=t,c=TUe(e),u=i.length,g=[];if(o=o||[],!u)return o.length?c(new wF.default(o,s,l)):c(null,s);for(let f=0;f{function MUe(t){return function(e,r,i){for(var n=-1,s=Object(e),o=i(e),a=o.length;a--;){var l=o[t?a:++n];if(r(s[l],l,s)===!1)break}return e}}eee.exports=MUe});var BF=E((Ipt,ree)=>{var OUe=tee(),KUe=OUe();ree.exports=KUe});var nee=E((ypt,iee)=>{function UUe(t,e){for(var r=-1,i=Array(t);++r{function HUe(){return!1}see.exports=HUe});var Od=E((Md,Jg)=>{var GUe=Ks(),jUe=oee(),aee=typeof Md=="object"&&Md&&!Md.nodeType&&Md,Aee=aee&&typeof Jg=="object"&&Jg&&!Jg.nodeType&&Jg,YUe=Aee&&Aee.exports===aee,lee=YUe?GUe.Buffer:void 0,qUe=lee?lee.isBuffer:void 0,JUe=qUe||jUe;Jg.exports=JUe});var uee=E((Bpt,cee)=>{var WUe=Ac(),zUe=ZB(),VUe=Qo(),_Ue="[object Arguments]",XUe="[object Array]",ZUe="[object Boolean]",$Ue="[object Date]",e2e="[object Error]",t2e="[object Function]",r2e="[object Map]",i2e="[object Number]",n2e="[object Object]",s2e="[object RegExp]",o2e="[object Set]",a2e="[object String]",A2e="[object WeakMap]",l2e="[object ArrayBuffer]",c2e="[object DataView]",u2e="[object Float32Array]",g2e="[object Float64Array]",f2e="[object Int8Array]",h2e="[object Int16Array]",p2e="[object Int32Array]",d2e="[object Uint8Array]",C2e="[object Uint8ClampedArray]",m2e="[object Uint16Array]",E2e="[object Uint32Array]",lr={};lr[u2e]=lr[g2e]=lr[f2e]=lr[h2e]=lr[p2e]=lr[d2e]=lr[C2e]=lr[m2e]=lr[E2e]=!0;lr[_Ue]=lr[XUe]=lr[l2e]=lr[ZUe]=lr[c2e]=lr[$Ue]=lr[e2e]=lr[t2e]=lr[r2e]=lr[i2e]=lr[n2e]=lr[s2e]=lr[o2e]=lr[a2e]=lr[A2e]=!1;function I2e(t){return VUe(t)&&zUe(t.length)&&!!lr[WUe(t)]}cee.exports=I2e});var A0=E((Qpt,gee)=>{function y2e(t){return function(e){return t(e)}}gee.exports=y2e});var l0=E((Kd,Wg)=>{var w2e=WP(),fee=typeof Kd=="object"&&Kd&&!Kd.nodeType&&Kd,Ud=fee&&typeof Wg=="object"&&Wg&&!Wg.nodeType&&Wg,B2e=Ud&&Ud.exports===fee,QF=B2e&&w2e.process,Q2e=function(){try{var t=Ud&&Ud.require&&Ud.require("util").types;return t||QF&&QF.binding&&QF.binding("util")}catch(e){}}();Wg.exports=Q2e});var c0=E((bpt,hee)=>{var b2e=uee(),v2e=A0(),pee=l0(),dee=pee&&pee.isTypedArray,S2e=dee?v2e(dee):b2e;hee.exports=S2e});var bF=E((vpt,Cee)=>{var x2e=nee(),k2e=Pd(),P2e=As(),D2e=Od(),R2e=kd(),F2e=c0(),N2e=Object.prototype,L2e=N2e.hasOwnProperty;function T2e(t,e){var r=P2e(t),i=!r&&k2e(t),n=!r&&!i&&D2e(t),s=!r&&!i&&!n&&F2e(t),o=r||i||n||s,a=o?x2e(t.length,String):[],l=a.length;for(var c in t)(e||L2e.call(t,c))&&!(o&&(c=="length"||n&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||R2e(c,l)))&&a.push(c);return a}Cee.exports=T2e});var u0=E((Spt,mee)=>{var M2e=Object.prototype;function O2e(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||M2e;return t===r}mee.exports=O2e});var vF=E((xpt,Eee)=>{function K2e(t,e){return function(r){return t(e(r))}}Eee.exports=K2e});var yee=E((kpt,Iee)=>{var U2e=vF(),H2e=U2e(Object.keys,Object);Iee.exports=H2e});var Bee=E((Ppt,wee)=>{var G2e=u0(),j2e=yee(),Y2e=Object.prototype,q2e=Y2e.hasOwnProperty;function J2e(t){if(!G2e(t))return j2e(t);var e=[];for(var r in Object(t))q2e.call(t,r)&&r!="constructor"&&e.push(r);return e}wee.exports=J2e});var Hd=E((Dpt,Qee)=>{var W2e=zB(),z2e=ZB();function V2e(t){return t!=null&&z2e(t.length)&&!W2e(t)}Qee.exports=V2e});var zg=E((Rpt,bee)=>{var _2e=bF(),X2e=Bee(),Z2e=Hd();function $2e(t){return Z2e(t)?_2e(t):X2e(t)}bee.exports=$2e});var SF=E((Fpt,vee)=>{var eHe=BF(),tHe=zg();function rHe(t,e){return t&&eHe(t,e,tHe)}vee.exports=rHe});var xee=E((Npt,See)=>{var iHe=vd();function nHe(){this.__data__=new iHe,this.size=0}See.exports=nHe});var Pee=E((Lpt,kee)=>{function sHe(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}kee.exports=sHe});var Ree=E((Tpt,Dee)=>{function oHe(t){return this.__data__.get(t)}Dee.exports=oHe});var Nee=E((Mpt,Fee)=>{function aHe(t){return this.__data__.has(t)}Fee.exports=aHe});var Tee=E((Opt,Lee)=>{var AHe=vd(),lHe=VB(),cHe=_B(),uHe=200;function gHe(t,e){var r=this.__data__;if(r instanceof AHe){var i=r.__data__;if(!lHe||i.length{var fHe=vd(),hHe=xee(),pHe=Pee(),dHe=Ree(),CHe=Nee(),mHe=Tee();function Vg(t){var e=this.__data__=new fHe(t);this.size=e.size}Vg.prototype.clear=hHe;Vg.prototype.delete=pHe;Vg.prototype.get=dHe;Vg.prototype.has=CHe;Vg.prototype.set=mHe;Mee.exports=Vg});var Kee=E((Upt,Oee)=>{var EHe="__lodash_hash_undefined__";function IHe(t){return this.__data__.set(t,EHe),this}Oee.exports=IHe});var Hee=E((Hpt,Uee)=>{function yHe(t){return this.__data__.has(t)}Uee.exports=yHe});var jee=E((Gpt,Gee)=>{var wHe=_B(),BHe=Kee(),QHe=Hee();function g0(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new wHe;++e{function bHe(t,e){for(var r=-1,i=t==null?0:t.length;++r{function vHe(t,e){return t.has(e)}Jee.exports=vHe});var xF=E((qpt,zee)=>{var SHe=jee(),xHe=qee(),kHe=Wee(),PHe=1,DHe=2;function RHe(t,e,r,i,n,s){var o=r&PHe,a=t.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(t),u=s.get(e);if(c&&u)return c==e&&u==t;var g=-1,f=!0,h=r&DHe?new SHe:void 0;for(s.set(t,e),s.set(e,t);++g{var FHe=Ks(),NHe=FHe.Uint8Array;Vee.exports=NHe});var Xee=E((Wpt,_ee)=>{function LHe(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}_ee.exports=LHe});var $ee=E((zpt,Zee)=>{function THe(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}Zee.exports=THe});var nte=E((Vpt,ete)=>{var tte=ac(),rte=kF(),MHe=Kg(),OHe=xF(),KHe=Xee(),UHe=$ee(),HHe=1,GHe=2,jHe="[object Boolean]",YHe="[object Date]",qHe="[object Error]",JHe="[object Map]",WHe="[object Number]",zHe="[object RegExp]",VHe="[object Set]",_He="[object String]",XHe="[object Symbol]",ZHe="[object ArrayBuffer]",$He="[object DataView]",ite=tte?tte.prototype:void 0,PF=ite?ite.valueOf:void 0;function eGe(t,e,r,i,n,s,o){switch(r){case $He:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ZHe:return!(t.byteLength!=e.byteLength||!s(new rte(t),new rte(e)));case jHe:case YHe:case WHe:return MHe(+t,+e);case qHe:return t.name==e.name&&t.message==e.message;case zHe:case _He:return t==e+"";case JHe:var a=KHe;case VHe:var l=i&HHe;if(a||(a=UHe),t.size!=e.size&&!l)return!1;var c=o.get(t);if(c)return c==e;i|=GHe,o.set(t,e);var u=OHe(a(t),a(e),i,n,s,o);return o.delete(t),u;case XHe:if(PF)return PF.call(t)==PF.call(e)}return!1}ete.exports=eGe});var DF=E((_pt,ste)=>{var tGe=$B(),rGe=As();function iGe(t,e,r){var i=e(t);return rGe(t)?i:tGe(i,r(t))}ste.exports=iGe});var ate=E((Xpt,ote)=>{function nGe(t,e){for(var r=-1,i=t==null?0:t.length,n=0,s=[];++r{function sGe(){return[]}Ate.exports=sGe});var f0=E(($pt,lte)=>{var oGe=ate(),aGe=RF(),AGe=Object.prototype,lGe=AGe.propertyIsEnumerable,cte=Object.getOwnPropertySymbols,cGe=cte?function(t){return t==null?[]:(t=Object(t),oGe(cte(t),function(e){return lGe.call(t,e)}))}:aGe;lte.exports=cGe});var FF=E((edt,ute)=>{var uGe=DF(),gGe=f0(),fGe=zg();function hGe(t){return uGe(t,fGe,gGe)}ute.exports=hGe});var hte=E((tdt,gte)=>{var fte=FF(),pGe=1,dGe=Object.prototype,CGe=dGe.hasOwnProperty;function mGe(t,e,r,i,n,s){var o=r&pGe,a=fte(t),l=a.length,c=fte(e),u=c.length;if(l!=u&&!o)return!1;for(var g=l;g--;){var f=a[g];if(!(o?f in e:CGe.call(e,f)))return!1}var h=s.get(t),p=s.get(e);if(h&&p)return h==e&&p==t;var d=!0;s.set(t,e),s.set(e,t);for(var m=o;++g{var EGe=UA(),IGe=Ks(),yGe=EGe(IGe,"DataView");pte.exports=yGe});var mte=E((idt,Cte)=>{var wGe=UA(),BGe=Ks(),QGe=wGe(BGe,"Promise");Cte.exports=QGe});var Ite=E((ndt,Ete)=>{var bGe=UA(),vGe=Ks(),SGe=bGe(vGe,"Set");Ete.exports=SGe});var wte=E((sdt,yte)=>{var xGe=UA(),kGe=Ks(),PGe=xGe(kGe,"WeakMap");yte.exports=PGe});var jd=E((odt,Bte)=>{var NF=dte(),LF=VB(),TF=mte(),MF=Ite(),OF=wte(),Qte=Ac(),_g=ZR(),bte="[object Map]",DGe="[object Object]",vte="[object Promise]",Ste="[object Set]",xte="[object WeakMap]",kte="[object DataView]",RGe=_g(NF),FGe=_g(LF),NGe=_g(TF),LGe=_g(MF),TGe=_g(OF),kc=Qte;(NF&&kc(new NF(new ArrayBuffer(1)))!=kte||LF&&kc(new LF)!=bte||TF&&kc(TF.resolve())!=vte||MF&&kc(new MF)!=Ste||OF&&kc(new OF)!=xte)&&(kc=function(t){var e=Qte(t),r=e==DGe?t.constructor:void 0,i=r?_g(r):"";if(i)switch(i){case RGe:return kte;case FGe:return bte;case NGe:return vte;case LGe:return Ste;case TGe:return xte}return e});Bte.exports=kc});var Mte=E((adt,Pte)=>{var KF=Gd(),MGe=xF(),OGe=nte(),KGe=hte(),Dte=jd(),Rte=As(),Fte=Od(),UGe=c0(),HGe=1,Nte="[object Arguments]",Lte="[object Array]",h0="[object Object]",GGe=Object.prototype,Tte=GGe.hasOwnProperty;function jGe(t,e,r,i,n,s){var o=Rte(t),a=Rte(e),l=o?Lte:Dte(t),c=a?Lte:Dte(e);l=l==Nte?h0:l,c=c==Nte?h0:c;var u=l==h0,g=c==h0,f=l==c;if(f&&Fte(t)){if(!Fte(e))return!1;o=!0,u=!1}if(f&&!u)return s||(s=new KF),o||UGe(t)?MGe(t,e,r,i,n,s):OGe(t,e,l,r,i,n,s);if(!(r&HGe)){var h=u&&Tte.call(t,"__wrapped__"),p=g&&Tte.call(e,"__wrapped__");if(h||p){var d=h?t.value():t,m=p?e.value():e;return s||(s=new KF),n(d,m,r,i,s)}}return f?(s||(s=new KF),KGe(t,e,r,i,n,s)):!1}Pte.exports=jGe});var UF=E((Adt,Ote)=>{var YGe=Mte(),Kte=Qo();function Ute(t,e,r,i,n){return t===e?!0:t==null||e==null||!Kte(t)&&!Kte(e)?t!==t&&e!==e:YGe(t,e,r,i,Ute,n)}Ote.exports=Ute});var Gte=E((ldt,Hte)=>{var qGe=Gd(),JGe=UF(),WGe=1,zGe=2;function VGe(t,e,r,i){var n=r.length,s=n,o=!i;if(t==null)return!s;for(t=Object(t);n--;){var a=r[n];if(o&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++n{var _Ge=Gs();function XGe(t){return t===t&&!_Ge(t)}jte.exports=XGe});var qte=E((udt,Yte)=>{var ZGe=HF(),$Ge=zg();function eje(t){for(var e=$Ge(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,ZGe(n)]}return e}Yte.exports=eje});var GF=E((gdt,Jte)=>{function tje(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}Jte.exports=tje});var zte=E((fdt,Wte)=>{var rje=Gte(),ije=qte(),nje=GF();function sje(t){var e=ije(t);return e.length==1&&e[0][2]?nje(e[0][0],e[0][1]):function(r){return r===t||rje(r,t,e)}}Wte.exports=sje});var p0=E((hdt,Vte)=>{var oje=xd();function aje(t,e,r){var i=t==null?void 0:oje(t,e);return i===void 0?r:i}Vte.exports=aje});var Xte=E((pdt,_te)=>{var Aje=UF(),lje=p0(),cje=iF(),uje=WB(),gje=HF(),fje=GF(),hje=Sc(),pje=1,dje=2;function Cje(t,e){return uje(t)&&gje(e)?fje(hje(t),e):function(r){var i=lje(r,t);return i===void 0&&i===e?cje(r,t):Aje(e,i,pje|dje)}}_te.exports=Cje});var $te=E((ddt,Zte)=>{function mje(t){return function(e){return e==null?void 0:e[t]}}Zte.exports=mje});var tre=E((Cdt,ere)=>{var Eje=xd();function Ije(t){return function(e){return Eje(e,t)}}ere.exports=Ije});var ire=E((mdt,rre)=>{var yje=$te(),wje=tre(),Bje=WB(),Qje=Sc();function bje(t){return Bje(t)?yje(Qje(t)):wje(t)}rre.exports=bje});var jF=E((Edt,nre)=>{var vje=zte(),Sje=Xte(),xje=e0(),kje=As(),Pje=ire();function Dje(t){return typeof t=="function"?t:t==null?xje:typeof t=="object"?kje(t)?Sje(t[0],t[1]):vje(t):Pje(t)}nre.exports=Dje});var YF=E((Idt,sre)=>{var Rje=jg(),Fje=SF(),Nje=jF();function Lje(t,e){var r={};return e=Nje(e,3),Fje(t,function(i,n,s){Rje(r,n,e(i,n,s))}),r}sre.exports=Lje});var Yd=E((ydt,ore)=>{"use strict";function Pc(t){this._maxSize=t,this.clear()}Pc.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Pc.prototype.get=function(t){return this._values[t]};Pc.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var Tje=/[^.^\]^[]+|(?=\[\]|\.\.)/g,are=/^\d+$/,Mje=/^\d/,Oje=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Kje=/^\s*(['"]?)(.*?)(\1)\s*$/,qF=512,Are=new Pc(qF),lre=new Pc(qF),cre=new Pc(qF);ore.exports={Cache:Pc,split:WF,normalizePath:JF,setter:function(t){var e=JF(t);return lre.get(t)||lre.set(t,function(i,n){for(var s=0,o=e.length,a=i;s{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.create=Yje;qd.default=void 0;var qje=Yd(),d0={context:"$",value:"."};function Yje(t,e){return new C0(t,e)}var C0=class{constructor(e,r={}){if(typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===d0.context,this.isValue=this.key[0]===d0.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?d0.context:this.isValue?d0.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&(0,qje.getter)(this.path,!0),this.map=r.map}getValue(e,r,i){let n=this.isContext?i:this.isValue?e:r;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}cast(e,r){return this.getValue(e,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}};qd.default=C0;C0.prototype.__isYupRef=!0});var ure=E(VF=>{"use strict";Object.defineProperty(VF,"__esModule",{value:!0});VF.default=Jje;var Wje=_F(YF()),m0=_F(xc()),zje=_F(Dc());function _F(t){return t&&t.__esModule?t:{default:t}}function E0(){return E0=Object.assign||function(t){for(var e=1;e=0)&&(r[n]=t[n]);return r}function Jje(t){function e(r,i){let{value:n,path:s="",label:o,options:a,originalValue:l,sync:c}=r,u=Vje(r,["value","path","label","options","originalValue","sync"]),{name:g,test:f,params:h,message:p}=t,{parent:d,context:m}=a;function I(L){return zje.default.isRef(L)?L.getValue(n,d,m):L}function B(L={}){let K=(0,Wje.default)(E0({value:n,originalValue:l,label:o,path:L.path||s},h,L.params),I),J=new m0.default(m0.default.formatError(L.message||p,K),n,K.path,L.type||g);return J.params=K,J}let b=E0({path:s,parent:d,type:g,createError:B,resolve:I,options:a,originalValue:l},u);if(!c){try{Promise.resolve(f.call(b,n,b)).then(L=>{m0.default.isError(L)?i(L):L?i(null,L):i(B())})}catch(L){i(L)}return}let R;try{var H;if(R=f.call(b,n,b),typeof((H=R)==null?void 0:H.then)=="function")throw new Error(`Validation test of type: "${b.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(L){i(L);return}m0.default.isError(R)?i(R):R?i(null,R):i(B())}return e.OPTIONS=t,e}});var XF=E(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});Jd.getIn=gre;Jd.default=void 0;var _je=Yd(),Xje=t=>t.substr(0,t.length-1).substr(1);function gre(t,e,r,i=r){let n,s,o;return e?((0,_je.forEach)(e,(a,l,c)=>{let u=l?Xje(a):a;if(t=t.resolve({context:i,parent:n,value:r}),t.innerType){let g=c?parseInt(u,10):0;if(r&&g>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${e}. because there is no value at that index. `);n=r,r=r&&r[g],t=t.innerType}if(!c){if(!t.fields||!t.fields[u])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${o} which is a type: "${t._type}")`);n=r,r=r&&r[u],t=t.fields[u]}s=u,o=l?"["+a+"]":"."+a}),{schema:t,parent:n,parentPath:s}):{parent:n,parentPath:e,schema:t}}var Zje=(t,e,r,i)=>gre(t,e,r,i).schema,$je=Zje;Jd.default=$je});var hre=E(I0=>{"use strict";Object.defineProperty(I0,"__esModule",{value:!0});I0.default=void 0;var fre=eYe(Dc());function eYe(t){return t&&t.__esModule?t:{default:t}}var y0=class{constructor(){this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){let e=[];for(let r of this.list)e.push(r);for(let[,r]of this.refs)e.push(r.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}add(e){fre.default.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){fre.default.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}has(e,r){if(this.list.has(e))return!0;let i,n=this.refs.values();for(;i=n.next(),!i.done;)if(r(i.value)===e)return!0;return!1}clone(){let e=new y0;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,r){let i=this.clone();return e.list.forEach(n=>i.add(n)),e.refs.forEach(n=>i.add(n)),r.list.forEach(n=>i.delete(n)),r.refs.forEach(n=>i.delete(n)),i}};I0.default=y0});var Ma=E(w0=>{"use strict";Object.defineProperty(w0,"__esModule",{value:!0});w0.default=void 0;var pre=Ta(M$()),Xg=La(),tYe=Ta(Z$()),dre=Ta(a0()),B0=Ta(ure()),Cre=Ta(Nd()),rYe=Ta(Dc()),iYe=XF(),nYe=Ta(EF()),mre=Ta(xc()),Ere=Ta(hre());function Ta(t){return t&&t.__esModule?t:{default:t}}function ds(){return ds=Object.assign||function(t){for(var e=1;e{this.typeError(Xg.mixed.notType)}),this.type=(e==null?void 0:e.type)||"mixed",this.spec=ds({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},e==null?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;let r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeError=this._typeError,r._whitelistError=this._whitelistError,r._blacklistError=this._blacklistError,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.exclusiveTests=ds({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=(0,pre.default)(ds({},this.spec,e)),r}label(e){var r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let i=e(this);return this._mutate=r,i}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,i=e.clone(),n=ds({},r.spec,i.spec);return i.spec=n,i._typeError||(i._typeError=r._typeError),i._whitelistError||(i._whitelistError=r._whitelistError),i._blacklistError||(i._blacklistError=r._blacklistError),i._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),i._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),i.tests=r.tests,i.exclusiveTests=r.exclusiveTests,i.withMutation(s=>{e.tests.forEach(o=>{s.test(o.OPTIONS)})}),i}isType(e){return this.spec.nullable&&e===null?!0:this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let i=r.conditions;r=r.clone(),r.conditions=[],r=i.reduce((n,s)=>s.resolve(n,e),r),r=r.resolve(e)}return r}cast(e,r={}){let i=this.resolve(ds({value:e},r)),n=i._cast(e,r);if(e!==void 0&&r.assert!==!1&&i.isType(n)!==!0){let s=(0,Cre.default)(e),o=(0,Cre.default)(n);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${i._type}". - -attempted value: ${s} -`+(o!==s?`result of cast: ${o}`:""))}return n}_cast(e,r){let i=e===void 0?e:this.transforms.reduce((n,s)=>s.call(this,n,e,this),e);return i===void 0&&(i=this.getDefault()),i}_validate(e,r={},i){let{sync:n,path:s,from:o=[],originalValue:a=e,strict:l=this.spec.strict,abortEarly:c=this.spec.abortEarly}=r,u=e;l||(u=this._cast(u,ds({assert:!1},r)));let g={value:u,path:s,options:r,originalValue:a,schema:this,label:this.spec.label,sync:n,from:o},f=[];this._typeError&&f.push(this._typeError),this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),(0,dre.default)({args:g,value:u,path:s,sync:n,tests:f,endEarly:c},h=>{if(h)return void i(h,u);(0,dre.default)({tests:this.tests,args:g,path:s,sync:n,value:u,endEarly:c},i)})}validate(e,r,i){let n=this.resolve(ds({},r,{value:e}));return typeof i=="function"?n._validate(e,r,i):new Promise((s,o)=>n._validate(e,r,(a,l)=>{a?o(a):s(l)}))}validateSync(e,r){let i=this.resolve(ds({},r,{value:e})),n;return i._validate(e,ds({},r,{sync:!0}),(s,o)=>{if(s)throw s;n=o}),n}isValid(e,r){return this.validate(e,r).then(()=>!0,i=>{if(mre.default.isError(i))return!1;throw i})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(i){if(mre.default.isError(i))return!1;throw i}}_getDefault(){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this):(0,pre.default)(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){var r=this.clone();return r.spec.strict=e,r}_isPresent(e){return e!=null}defined(e=Xg.mixed.defined){return this.test({message:e,name:"defined",exclusive:!0,test(r){return r!==void 0}})}required(e=Xg.mixed.required){return this.clone({presence:"required"}).withMutation(r=>r.test({message:e,name:"required",exclusive:!0,test(i){return this.schema._isPresent(i)}}))}notRequired(){var e=this.clone({presence:"optional"});return e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e}nullable(e=!0){var r=this.clone({nullable:e!==!1});return r}transform(e){var r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=Xg.mixed.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),n=(0,B0.default)(r),s=r.exclusive||r.name&&i.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(i.exclusiveTests[r.name]=!!r.exclusive),i.tests=i.tests.filter(o=>!(o.OPTIONS.name===r.name&&(s||o.OPTIONS.test===n.OPTIONS.test))),i.tests.push(n),i}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let i=this.clone(),n=(0,nYe.default)(e).map(s=>new rYe.default(s));return n.forEach(s=>{s.isSibling&&i.deps.push(s.key)}),i.conditions.push(new tYe.default(n,r)),i}typeError(e){var r=this.clone();return r._typeError=(0,B0.default)({message:e,name:"typeError",test(i){return i!==void 0&&!this.schema.isType(i)?this.createError({params:{type:this.schema._type}}):!0}}),r}oneOf(e,r=Xg.mixed.oneOf){var i=this.clone();return e.forEach(n=>{i._whitelist.add(n),i._blacklist.delete(n)}),i._whitelistError=(0,B0.default)({message:r,name:"oneOf",test(n){if(n===void 0)return!0;let s=this.schema._whitelist;return s.has(n,this.resolve)?!0:this.createError({params:{values:s.toArray().join(", ")}})}}),i}notOneOf(e,r=Xg.mixed.notOneOf){var i=this.clone();return e.forEach(n=>{i._blacklist.add(n),i._whitelist.delete(n)}),i._blacklistError=(0,B0.default)({message:r,name:"notOneOf",test(n){let s=this.schema._blacklist;return s.has(n,this.resolve)?this.createError({params:{values:s.toArray().join(", ")}}):!0}}),i}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(){let e=this.clone(),{label:r,meta:i}=e.spec;return{meta:i,label:r,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(s=>({name:s.OPTIONS.name,params:s.OPTIONS.params})).filter((s,o,a)=>a.findIndex(l=>l.name===s.name)===o)}}};w0.default=Do;Do.prototype.__isYupSchema__=!0;for(let t of["validate","validateSync"])Do.prototype[`${t}At`]=function(e,r,i={}){let{parent:n,parentPath:s,schema:o}=(0,iYe.getIn)(this,e,r,i.context);return o[t](n&&n[s],ds({},i,{parent:n,path:e}))};for(let t of["equals","is"])Do.prototype[t]=Do.prototype.oneOf;for(let t of["not","nope"])Do.prototype[t]=Do.prototype.notOneOf;Do.prototype.optional=Do.prototype.notRequired});var yre=E(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.create=Ire;Wd.default=void 0;var oYe=sYe(Ma());function sYe(t){return t&&t.__esModule?t:{default:t}}var ZF=oYe.default,aYe=ZF;Wd.default=aYe;function Ire(){return new ZF}Ire.prototype=ZF.prototype});var Zg=E(Q0=>{"use strict";Object.defineProperty(Q0,"__esModule",{value:!0});Q0.default=void 0;var AYe=t=>t==null;Q0.default=AYe});var vre=E(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.create=wre;zd.default=void 0;var lYe=Bre(Ma()),Qre=La(),bre=Bre(Zg());function Bre(t){return t&&t.__esModule?t:{default:t}}function wre(){return new b0}var b0=class extends lYe.default{constructor(){super({type:"boolean"});this.withMutation(()=>{this.transform(function(e){if(!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}_typeCheck(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}isTrue(e=Qre.boolean.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return(0,bre.default)(r)||r===!0}})}isFalse(e=Qre.boolean.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return(0,bre.default)(r)||r===!1}})}};zd.default=b0;wre.prototype=b0.prototype});var kre=E(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.create=Sre;Vd.default=void 0;var Ro=La(),Oa=xre(Zg()),cYe=xre(Ma());function xre(t){return t&&t.__esModule?t:{default:t}}var uYe=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\u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([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,fYe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,hYe=t=>(0,Oa.default)(t)||t===t.trim(),pYe={}.toString();function Sre(){return new v0}var v0=class extends cYe.default{constructor(){super({type:"string"});this.withMutation(()=>{this.transform(function(e){if(this.isType(e)||Array.isArray(e))return e;let r=e!=null&&e.toString?e.toString():e;return r===pYe?e:r})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,r=Ro.string.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},test(i){return(0,Oa.default)(i)||i.length===this.resolve(e)}})}min(e,r=Ro.string.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},test(i){return(0,Oa.default)(i)||i.length>=this.resolve(e)}})}max(e,r=Ro.string.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},test(i){return(0,Oa.default)(i)||i.length<=this.resolve(e)}})}matches(e,r){let i=!1,n,s;return r&&(typeof r=="object"?{excludeEmptyString:i=!1,message:n,name:s}=r:n=r),this.test({name:s||"matches",message:n||Ro.string.matches,params:{regex:e},test:o=>(0,Oa.default)(o)||o===""&&i||o.search(e)!==-1})}email(e=Ro.string.email){return this.matches(uYe,{name:"email",message:e,excludeEmptyString:!0})}url(e=Ro.string.url){return this.matches(gYe,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Ro.string.uuid){return this.matches(fYe,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=Ro.string.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:hYe})}lowercase(e=Ro.string.lowercase){return this.transform(r=>(0,Oa.default)(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:r=>(0,Oa.default)(r)||r===r.toLowerCase()})}uppercase(e=Ro.string.uppercase){return this.transform(r=>(0,Oa.default)(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:r=>(0,Oa.default)(r)||r===r.toUpperCase()})}};Vd.default=v0;Sre.prototype=v0.prototype});var Rre=E(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});_d.create=Pre;_d.default=void 0;var Rc=La(),Fc=Dre(Zg()),dYe=Dre(Ma());function Dre(t){return t&&t.__esModule?t:{default:t}}var CYe=t=>t!=+t;function Pre(){return new S0}var S0=class extends dYe.default{constructor(){super({type:"number"});this.withMutation(()=>{this.transform(function(e){let r=e;if(typeof r=="string"){if(r=r.replace(/\s/g,""),r==="")return NaN;r=+r}return this.isType(r)?r:parseFloat(r)})})}_typeCheck(e){return e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&!CYe(e)}min(e,r=Rc.number.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},test(i){return(0,Fc.default)(i)||i>=this.resolve(e)}})}max(e,r=Rc.number.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:e},test(i){return(0,Fc.default)(i)||i<=this.resolve(e)}})}lessThan(e,r=Rc.number.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:e},test(i){return(0,Fc.default)(i)||ithis.resolve(e)}})}positive(e=Rc.number.positive){return this.moreThan(0,e)}negative(e=Rc.number.negative){return this.lessThan(0,e)}integer(e=Rc.number.integer){return this.test({name:"integer",message:e,test:r=>(0,Fc.default)(r)||Number.isInteger(r)})}truncate(){return this.transform(e=>(0,Fc.default)(e)?e:e|0)}round(e){var r,i=["ceil","floor","round","trunc"];if(e=((r=e)==null?void 0:r.toLowerCase())||"round",e==="trunc")return this.truncate();if(i.indexOf(e.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+i.join(", "));return this.transform(n=>(0,Fc.default)(n)?n:Math[e](n))}};_d.default=S0;Pre.prototype=S0.prototype});var Fre=E($F=>{"use strict";Object.defineProperty($F,"__esModule",{value:!0});$F.default=mYe;var EYe=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function mYe(t){var e=[1,4,5,6,7,10,11],r=0,i,n;if(n=EYe.exec(t)){for(var s=0,o;o=e[s];++s)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,(n[8]===void 0||n[8]==="")&&(n[9]===void 0||n[9]==="")?i=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7]):(n[8]!=="Z"&&n[9]!==void 0&&(r=n[10]*60+n[11],n[9]==="+"&&(r=0-r)),i=Date.UTC(n[1],n[2],n[3],n[4],n[5]+r,n[6],n[7]))}else i=Date.parse?Date.parse(t):NaN;return i}});var Tre=E(Xd=>{"use strict";Object.defineProperty(Xd,"__esModule",{value:!0});Xd.create=eN;Xd.default=void 0;var IYe=x0(Fre()),Nre=La(),Lre=x0(Zg()),yYe=x0(Dc()),wYe=x0(Ma());function x0(t){return t&&t.__esModule?t:{default:t}}var tN=new Date(""),BYe=t=>Object.prototype.toString.call(t)==="[object Date]";function eN(){return new Zd}var Zd=class extends wYe.default{constructor(){super({type:"date"});this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=(0,IYe.default)(e),isNaN(e)?tN:new Date(e))})})}_typeCheck(e){return BYe(e)&&!isNaN(e.getTime())}prepareParam(e,r){let i;if(yYe.default.isRef(e))i=e;else{let n=this.cast(e);if(!this._typeCheck(n))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);i=n}return i}min(e,r=Nre.date.min){let i=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},test(n){return(0,Lre.default)(n)||n>=this.resolve(i)}})}max(e,r=Nre.date.max){var i=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},test(n){return(0,Lre.default)(n)||n<=this.resolve(i)}})}};Xd.default=Zd;Zd.INVALID_DATE=tN;eN.prototype=Zd.prototype;eN.INVALID_DATE=tN});var Ore=E((Ndt,Mre)=>{function QYe(t,e,r,i){var n=-1,s=t==null?0:t.length;for(i&&s&&(r=t[++n]);++n{function bYe(t){return function(e){return t==null?void 0:t[e]}}Kre.exports=bYe});var Gre=E((Tdt,Hre)=>{var vYe=Ure(),SYe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},xYe=vYe(SYe);Hre.exports=xYe});var Yre=E((Mdt,jre)=>{var kYe=Gre(),PYe=gg(),DYe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,RYe="\\u0300-\\u036f",FYe="\\ufe20-\\ufe2f",NYe="\\u20d0-\\u20ff",LYe=RYe+FYe+NYe,TYe="["+LYe+"]",MYe=RegExp(TYe,"g");function OYe(t){return t=PYe(t),t&&t.replace(DYe,kYe).replace(MYe,"")}jre.exports=OYe});var Jre=E((Odt,qre)=>{var KYe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function UYe(t){return t.match(KYe)||[]}qre.exports=UYe});var zre=E((Kdt,Wre)=>{var HYe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function GYe(t){return HYe.test(t)}Wre.exports=GYe});var fie=E((Udt,Vre)=>{var _re="\\ud800-\\udfff",jYe="\\u0300-\\u036f",YYe="\\ufe20-\\ufe2f",qYe="\\u20d0-\\u20ff",JYe=jYe+YYe+qYe,Xre="\\u2700-\\u27bf",Zre="a-z\\xdf-\\xf6\\xf8-\\xff",WYe="\\xac\\xb1\\xd7\\xf7",zYe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",VYe="\\u2000-\\u206f",_Ye=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$re="A-Z\\xc0-\\xd6\\xd8-\\xde",XYe="\\ufe0e\\ufe0f",eie=WYe+zYe+VYe+_Ye,tie="['\u2019]",rie="["+eie+"]",ZYe="["+JYe+"]",iie="\\d+",$Ye="["+Xre+"]",nie="["+Zre+"]",sie="[^"+_re+eie+iie+Xre+Zre+$re+"]",eqe="\\ud83c[\\udffb-\\udfff]",tqe="(?:"+ZYe+"|"+eqe+")",rqe="[^"+_re+"]",oie="(?:\\ud83c[\\udde6-\\uddff]){2}",aie="[\\ud800-\\udbff][\\udc00-\\udfff]",$g="["+$re+"]",iqe="\\u200d",Aie="(?:"+nie+"|"+sie+")",nqe="(?:"+$g+"|"+sie+")",lie="(?:"+tie+"(?:d|ll|m|re|s|t|ve))?",cie="(?:"+tie+"(?:D|LL|M|RE|S|T|VE))?",uie=tqe+"?",gie="["+XYe+"]?",sqe="(?:"+iqe+"(?:"+[rqe,oie,aie].join("|")+")"+gie+uie+")*",oqe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",aqe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Aqe=gie+uie+sqe,lqe="(?:"+[$Ye,oie,aie].join("|")+")"+Aqe,cqe=RegExp([$g+"?"+nie+"+"+lie+"(?="+[rie,$g,"$"].join("|")+")",nqe+"+"+cie+"(?="+[rie,$g+Aie,"$"].join("|")+")",$g+"?"+Aie+"+"+lie,$g+"+"+cie,aqe,oqe,iie,lqe].join("|"),"g");function uqe(t){return t.match(cqe)||[]}Vre.exports=uqe});var pie=E((Hdt,hie)=>{var gqe=Jre(),fqe=zre(),hqe=gg(),pqe=fie();function dqe(t,e,r){return t=hqe(t),e=r?void 0:e,e===void 0?fqe(t)?pqe(t):gqe(t):t.match(e)||[]}hie.exports=dqe});var rN=E((Gdt,die)=>{var Cqe=Ore(),mqe=Yre(),Eqe=pie(),Iqe="['\u2019]",yqe=RegExp(Iqe,"g");function wqe(t){return function(e){return Cqe(Eqe(mqe(e).replace(yqe,"")),t,"")}}die.exports=wqe});var mie=E((jdt,Cie)=>{var Bqe=rN(),Qqe=Bqe(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()});Cie.exports=Qqe});var Iie=E((Ydt,Eie)=>{var bqe=ZP(),vqe=rN(),Sqe=vqe(function(t,e,r){return e=e.toLowerCase(),t+(r?bqe(e):e)});Eie.exports=Sqe});var wie=E((qdt,yie)=>{var xqe=jg(),kqe=SF(),Pqe=jF();function Dqe(t,e){var r={};return e=Pqe(e,3),kqe(t,function(i,n,s){xqe(r,e(i,n,s),i)}),r}yie.exports=Dqe});var Qie=E((Jdt,iN)=>{iN.exports=function(t){return Bie(Rqe(t),t)};iN.exports.array=Bie;function Bie(t,e){var r=t.length,i=new Array(r),n={},s=r,o=Fqe(e),a=Nqe(t);for(e.forEach(function(c){if(!a.has(c[0])||!a.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)n[s]||l(t[s],s,new Set);return i;function l(c,u,g){if(g.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch(d){f=""}throw new Error("Cyclic dependency"+f)}if(!a.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!n[u]){n[u]=!0;var h=o.get(c)||new Set;if(h=Array.from(h),u=h.length){g.add(c);do{var p=h[--u];l(p,a.get(p),g)}while(u);g.delete(c)}i[--r]=c}}}function Rqe(t){for(var e=new Set,r=0,i=t.length;r{"use strict";Object.defineProperty(nN,"__esModule",{value:!0});nN.default=Lqe;var Tqe=k0(Ld()),Mqe=k0(Qie()),Oqe=Yd(),Kqe=k0(Dc()),Uqe=k0(qg());function k0(t){return t&&t.__esModule?t:{default:t}}function Lqe(t,e=[]){let r=[],i=[];function n(s,o){var a=(0,Oqe.split)(s)[0];~i.indexOf(a)||i.push(a),~e.indexOf(`${o}-${a}`)||r.push([o,a])}for(let s in t)if((0,Tqe.default)(t,s)){let o=t[s];~i.indexOf(s)||i.push(s),Kqe.default.isRef(o)&&o.isSibling?n(o.path,s):(0,Uqe.default)(o)&&"deps"in o&&o.deps.forEach(a=>n(a,s))}return Mqe.default.array(i,r).reverse()}});var Sie=E(sN=>{"use strict";Object.defineProperty(sN,"__esModule",{value:!0});sN.default=Hqe;function vie(t,e){let r=Infinity;return t.some((i,n)=>{var s;if(((s=e.path)==null?void 0:s.indexOf(i))!==-1)return r=n,!0}),r}function Hqe(t){return(e,r)=>vie(t,e)-vie(t,r)}});var Nie=E($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.create=xie;$d.default=void 0;var kie=Fo(Ld()),Pie=Fo(mie()),Gqe=Fo(Iie()),jqe=Fo(wie()),Yqe=Fo(YF()),qqe=Yd(),Die=La(),Jqe=Fo(bie()),Rie=Fo(Sie()),Wqe=Fo(a0()),zqe=Fo(xc()),oN=Fo(Ma());function Fo(t){return t&&t.__esModule?t:{default:t}}function ef(){return ef=Object.assign||function(t){for(var e=1;eObject.prototype.toString.call(t)==="[object Object]";function Vqe(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(i=>r.indexOf(i)===-1)}var _qe=(0,Rie.default)([]),P0=class extends oN.default{constructor(e){super({type:"object"});this.fields=Object.create(null),this._sortErrors=_qe,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(i){if(typeof i=="string")try{i=JSON.parse(i)}catch(n){i=null}return this.isType(i)?i:null}),e&&this.shape(e)})}_typeCheck(e){return Fie(e)||typeof e=="function"}_cast(e,r={}){var i;let n=super._cast(e,r);if(n===void 0)return this.getDefault();if(!this._typeCheck(n))return n;let s=this.fields,o=(i=r.stripUnknown)!=null?i:this.spec.noUnknown,a=this._nodes.concat(Object.keys(n).filter(g=>this._nodes.indexOf(g)===-1)),l={},c=ef({},r,{parent:l,__validating:r.__validating||!1}),u=!1;for(let g of a){let f=s[g],h=(0,kie.default)(n,g);if(f){let p,d=n[g];c.path=(r.path?`${r.path}.`:"")+g,f=f.resolve({value:d,context:r.context,parent:l});let m="spec"in f?f.spec:void 0,I=m==null?void 0:m.strict;if(m==null?void 0:m.strip){u=u||g in n;continue}p=!r.__validating||!I?f.cast(n[g],c):n[g],p!==void 0&&(l[g]=p)}else h&&!o&&(l[g]=n[g]);l[g]!==n[g]&&(u=!0)}return u?l:n}_validate(e,r={},i){let n=[],{sync:s,from:o=[],originalValue:a=e,abortEarly:l=this.spec.abortEarly,recursive:c=this.spec.recursive}=r;o=[{schema:this,value:a},...o],r.__validating=!0,r.originalValue=a,r.from=o,super._validate(e,r,(u,g)=>{if(u){if(!zqe.default.isError(u)||l)return void i(u,g);n.push(u)}if(!c||!Fie(g)){i(n[0]||null,g);return}a=a||g;let f=this._nodes.map(h=>(p,d)=>{let m=h.indexOf(".")===-1?(r.path?`${r.path}.`:"")+h:`${r.path||""}["${h}"]`,I=this.fields[h];if(I&&"validate"in I){I.validate(g[h],ef({},r,{path:m,from:o,strict:!0,parent:g,originalValue:a[h]}),d);return}d(null)});(0,Wqe.default)({sync:s,tests:f,value:g,errors:n,endEarly:l,sort:this._sortErrors,path:r.path},i)})}clone(e){let r=super.clone(e);return r.fields=ef({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(e){let r=super.concat(e),i=r.fields;for(let[n,s]of Object.entries(this.fields)){let o=i[n];o===void 0?i[n]=s:o instanceof oN.default&&s instanceof oN.default&&(i[n]=s.concat(o))}return r.withMutation(()=>r.shape(i))}getDefaultFromShape(){let e={};return this._nodes.forEach(r=>{let i=this.fields[r];e[r]="default"in i?i.getDefault():void 0}),e}_getDefault(){if("default"in this.spec)return super._getDefault();if(!!this._nodes.length)return this.getDefaultFromShape()}shape(e,r=[]){let i=this.clone(),n=Object.assign(i.fields,e);if(i.fields=n,i._sortErrors=(0,Rie.default)(Object.keys(n)),r.length){Array.isArray(r[0])||(r=[r]);let s=r.map(([o,a])=>`${o}-${a}`);i._excludedEdges=i._excludedEdges.concat(s)}return i._nodes=(0,Jqe.default)(n,i._excludedEdges),i}pick(e){let r={};for(let i of e)this.fields[i]&&(r[i]=this.fields[i]);return this.clone().withMutation(i=>(i.fields={},i.shape(r)))}omit(e){let r=this.clone(),i=r.fields;r.fields={};for(let n of e)delete i[n];return r.withMutation(()=>r.shape(i))}from(e,r,i){let n=(0,qqe.getter)(e,!0);return this.transform(s=>{if(s==null)return s;let o=s;return(0,kie.default)(s,e)&&(o=ef({},s),i||delete o[e],o[r]=n(s)),o})}noUnknown(e=!0,r=Die.object.noUnknown){typeof e=="string"&&(r=e,e=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:r,test(n){if(n==null)return!0;let s=Vqe(this.schema,n);return!e||s.length===0||this.createError({params:{unknown:s.join(", ")}})}});return i.spec.noUnknown=e,i}unknown(e=!0,r=Die.object.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>r&&(0,jqe.default)(r,(i,n)=>e(n)))}camelCase(){return this.transformKeys(Gqe.default)}snakeCase(){return this.transformKeys(Pie.default)}constantCase(){return this.transformKeys(e=>(0,Pie.default)(e).toUpperCase())}describe(){let e=super.describe();return e.fields=(0,Yqe.default)(this.fields,r=>r.describe()),e}};$d.default=P0;function xie(t){return new P0(t)}xie.prototype=P0.prototype});var Tie=E(eC=>{"use strict";Object.defineProperty(eC,"__esModule",{value:!0});eC.create=Lie;eC.default=void 0;var aN=tf(Zg()),Xqe=tf(qg()),Zqe=tf(Nd()),AN=La(),$qe=tf(a0()),eJe=tf(xc()),tJe=tf(Ma());function tf(t){return t&&t.__esModule?t:{default:t}}function D0(){return D0=Object.assign||function(t){for(var e=1;e{this.transform(function(r){if(typeof r=="string")try{r=JSON.parse(r)}catch(i){r=null}return this.isType(r)?r:null})})}_typeCheck(e){return Array.isArray(e)}get _subType(){return this.innerType}_cast(e,r){let i=super._cast(e,r);if(!this._typeCheck(i)||!this.innerType)return i;let n=!1,s=i.map((o,a)=>{let l=this.innerType.cast(o,D0({},r,{path:`${r.path||""}[${a}]`}));return l!==o&&(n=!0),l});return n?s:i}_validate(e,r={},i){var n,s;let o=[],a=r.sync,l=r.path,c=this.innerType,u=(n=r.abortEarly)!=null?n:this.spec.abortEarly,g=(s=r.recursive)!=null?s:this.spec.recursive,f=r.originalValue!=null?r.originalValue:e;super._validate(e,r,(h,p)=>{if(h){if(!eJe.default.isError(h)||u)return void i(h,p);o.push(h)}if(!g||!c||!this._typeCheck(p)){i(o[0]||null,p);return}f=f||p;let d=new Array(p.length);for(let m=0;mc.validate(I,b,H)}(0,$qe.default)({sync:a,path:l,value:p,errors:o,endEarly:u,tests:d},i)})}clone(e){let r=super.clone(e);return r.innerType=this.innerType,r}concat(e){let r=super.concat(e);return r.innerType=this.innerType,e.innerType&&(r.innerType=r.innerType?r.innerType.concat(e.innerType):e.innerType),r}of(e){let r=this.clone();if(!(0,Xqe.default)(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+(0,Zqe.default)(e));return r.innerType=e,r}length(e,r=AN.array.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},test(i){return(0,aN.default)(i)||i.length===this.resolve(e)}})}min(e,r){return r=r||AN.array.min,this.test({message:r,name:"min",exclusive:!0,params:{min:e},test(i){return(0,aN.default)(i)||i.length>=this.resolve(e)}})}max(e,r){return r=r||AN.array.max,this.test({message:r,name:"max",exclusive:!0,params:{max:e},test(i){return(0,aN.default)(i)||i.length<=this.resolve(e)}})}ensure(){return this.default(()=>[]).transform((e,r)=>this._typeCheck(e)?e:r==null?[]:[].concat(r))}compact(e){let r=e?(i,n,s)=>!e(i,n,s):i=>!!i;return this.transform(i=>i!=null?i.filter(r):i)}describe(){let e=super.describe();return this.innerType&&(e.innerType=this.innerType.describe()),e}nullable(e=!0){return super.nullable(e)}defined(){return super.defined()}required(e){return super.required(e)}};eC.default=R0;Lie.prototype=R0.prototype});var Mie=E(tC=>{"use strict";Object.defineProperty(tC,"__esModule",{value:!0});tC.create=rJe;tC.default=void 0;var nJe=iJe(qg());function iJe(t){return t&&t.__esModule?t:{default:t}}function rJe(t){return new lN(t)}var lN=class{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this._resolve=(r,i={})=>{let n=this.builder(r,i);if(!(0,nJe.default)(n))throw new TypeError("lazy() functions must return a valid schema");return n.resolve(i)},this.builder=e}resolve(e){return this._resolve(e.value,e)}cast(e,r){return this._resolve(e,r).cast(e,r)}validate(e,r,i){return this._resolve(e,r).validate(e,r,i)}validateSync(e,r){return this._resolve(e,r).validateSync(e,r)}validateAt(e,r,i){return this._resolve(r,i).validateAt(e,r,i)}validateSyncAt(e,r,i){return this._resolve(r,i).validateSyncAt(e,r,i)}describe(){return null}isValid(e,r){return this._resolve(e,r).isValid(e,r)}isValidSync(e,r){return this._resolve(e,r).isValidSync(e,r)}},sJe=lN;tC.default=sJe});var Oie=E(cN=>{"use strict";Object.defineProperty(cN,"__esModule",{value:!0});cN.default=oJe;var AJe=aJe(La());function aJe(t){return t&&t.__esModule?t:{default:t}}function oJe(t){Object.keys(t).forEach(e=>{Object.keys(t[e]).forEach(r=>{AJe.default[e][r]=t[e][r]})})}});var gN=E(cr=>{"use strict";Object.defineProperty(cr,"__esModule",{value:!0});cr.addMethod=lJe;Object.defineProperty(cr,"MixedSchema",{enumerable:!0,get:function(){return Kie.default}});Object.defineProperty(cr,"mixed",{enumerable:!0,get:function(){return Kie.create}});Object.defineProperty(cr,"BooleanSchema",{enumerable:!0,get:function(){return uN.default}});Object.defineProperty(cr,"bool",{enumerable:!0,get:function(){return uN.create}});Object.defineProperty(cr,"boolean",{enumerable:!0,get:function(){return uN.create}});Object.defineProperty(cr,"StringSchema",{enumerable:!0,get:function(){return Uie.default}});Object.defineProperty(cr,"string",{enumerable:!0,get:function(){return Uie.create}});Object.defineProperty(cr,"NumberSchema",{enumerable:!0,get:function(){return Hie.default}});Object.defineProperty(cr,"number",{enumerable:!0,get:function(){return Hie.create}});Object.defineProperty(cr,"DateSchema",{enumerable:!0,get:function(){return Gie.default}});Object.defineProperty(cr,"date",{enumerable:!0,get:function(){return Gie.create}});Object.defineProperty(cr,"ObjectSchema",{enumerable:!0,get:function(){return jie.default}});Object.defineProperty(cr,"object",{enumerable:!0,get:function(){return jie.create}});Object.defineProperty(cr,"ArraySchema",{enumerable:!0,get:function(){return Yie.default}});Object.defineProperty(cr,"array",{enumerable:!0,get:function(){return Yie.create}});Object.defineProperty(cr,"ref",{enumerable:!0,get:function(){return cJe.create}});Object.defineProperty(cr,"lazy",{enumerable:!0,get:function(){return uJe.create}});Object.defineProperty(cr,"ValidationError",{enumerable:!0,get:function(){return gJe.default}});Object.defineProperty(cr,"reach",{enumerable:!0,get:function(){return fJe.default}});Object.defineProperty(cr,"isSchema",{enumerable:!0,get:function(){return qie.default}});Object.defineProperty(cr,"setLocale",{enumerable:!0,get:function(){return hJe.default}});Object.defineProperty(cr,"BaseSchema",{enumerable:!0,get:function(){return pJe.default}});var Kie=Nc(yre()),uN=Nc(vre()),Uie=Nc(kre()),Hie=Nc(Rre()),Gie=Nc(Tre()),jie=Nc(Nie()),Yie=Nc(Tie()),cJe=Dc(),uJe=Mie(),gJe=rC(xc()),fJe=rC(XF()),qie=rC(qg()),hJe=rC(Oie()),pJe=rC(Ma());function rC(t){return t&&t.__esModule?t:{default:t}}function Jie(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return Jie=function(){return t},t}function Nc(t){if(t&&t.__esModule)return t;if(t===null||typeof t!="object"&&typeof t!="function")return{default:t};var e=Jie();if(e&&e.has(t))return e.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=i?Object.getOwnPropertyDescriptor(t,n):null;s&&(s.get||s.set)?Object.defineProperty(r,n,s):r[n]=t[n]}return r.default=t,e&&e.set(t,r),r}function lJe(t,e,r){if(!t||!(0,qie.default)(t.prototype))throw new TypeError("You must provide a yup schema constructor function");if(typeof e!="string")throw new TypeError("A Method name must be provided");if(typeof r!="function")throw new TypeError("Method function must be provided");t.prototype[e]=r}});var Xie=E((gCt,nC)=>{"use strict";var mJe=process.env.TERM_PROGRAM==="Hyper",EJe=process.platform==="win32",zie=process.platform==="linux",fN={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"},Vie=Object.assign({},fN,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),_ie=Object.assign({},fN,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:zie?"\u25B8":"\u276F",pointerSmall:zie?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});nC.exports=EJe&&!mJe?Vie:_ie;Reflect.defineProperty(nC.exports,"common",{enumerable:!1,value:fN});Reflect.defineProperty(nC.exports,"windows",{enumerable:!1,value:Vie});Reflect.defineProperty(nC.exports,"other",{enumerable:!1,value:_ie})});var js=E((fCt,hN)=>{"use strict";var IJe=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),yJe=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,Zie=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");let e=s=>{let o=s.open=`[${s.codes[0]}m`,a=s.close=`[${s.codes[1]}m`,l=s.regex=new RegExp(`\\u001b\\[${s.codes[1]}m`,"g");return s.wrap=(c,u)=>{c.includes(a)&&(c=c.replace(l,a+o));let g=o+c+a;return u?g.replace(/\r*\n/g,`${a}$&${o}`):g},s},r=(s,o,a)=>typeof s=="function"?s(o):s.wrap(o,a),i=(s,o)=>{if(s===""||s==null)return"";if(t.enabled===!1)return s;if(t.visible===!1)return"";let a=""+s,l=a.includes(` -`),c=o.length;for(c>0&&o.includes("unstyle")&&(o=[...new Set(["unstyle",...o])].reverse());c-- >0;)a=r(t.styles[o[c]],a,l);return a},n=(s,o,a)=>{t.styles[s]=e({name:s,codes:o}),(t.keys[a]||(t.keys[a]=[])).push(s),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(c){t.alias(s,c)},get(){let c=u=>i(u,c.stack);return Reflect.setPrototypeOf(c,t),c.stack=this.stack?this.stack.concat(s):[s],c}})};return n("reset",[0,0],"modifier"),n("bold",[1,22],"modifier"),n("dim",[2,22],"modifier"),n("italic",[3,23],"modifier"),n("underline",[4,24],"modifier"),n("inverse",[7,27],"modifier"),n("hidden",[8,28],"modifier"),n("strikethrough",[9,29],"modifier"),n("black",[30,39],"color"),n("red",[31,39],"color"),n("green",[32,39],"color"),n("yellow",[33,39],"color"),n("blue",[34,39],"color"),n("magenta",[35,39],"color"),n("cyan",[36,39],"color"),n("white",[37,39],"color"),n("gray",[90,39],"color"),n("grey",[90,39],"color"),n("bgBlack",[40,49],"bg"),n("bgRed",[41,49],"bg"),n("bgGreen",[42,49],"bg"),n("bgYellow",[43,49],"bg"),n("bgBlue",[44,49],"bg"),n("bgMagenta",[45,49],"bg"),n("bgCyan",[46,49],"bg"),n("bgWhite",[47,49],"bg"),n("blackBright",[90,39],"bright"),n("redBright",[91,39],"bright"),n("greenBright",[92,39],"bright"),n("yellowBright",[93,39],"bright"),n("blueBright",[94,39],"bright"),n("magentaBright",[95,39],"bright"),n("cyanBright",[96,39],"bright"),n("whiteBright",[97,39],"bright"),n("bgBlackBright",[100,49],"bgBright"),n("bgRedBright",[101,49],"bgBright"),n("bgGreenBright",[102,49],"bgBright"),n("bgYellowBright",[103,49],"bgBright"),n("bgBlueBright",[104,49],"bgBright"),n("bgMagentaBright",[105,49],"bgBright"),n("bgCyanBright",[106,49],"bgBright"),n("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=yJe,t.hasColor=t.hasAnsi=s=>(t.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&t.ansiRegex.test(s)),t.alias=(s,o)=>{let a=typeof o=="string"?t[o]:o;if(typeof a!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");a.stack||(Reflect.defineProperty(a,"name",{value:s}),t.styles[s]=a,a.stack=[s]),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(l){t.alias(s,l)},get(){let l=c=>i(c,l.stack);return Reflect.setPrototypeOf(l,t),l.stack=this.stack?this.stack.concat(a.stack):a.stack,l}})},t.theme=s=>{if(!IJe(s))throw new TypeError("Expected theme to be an object");for(let o of Object.keys(s))t.alias(o,s[o]);return t},t.alias("unstyle",s=>typeof s=="string"&&s!==""?(t.ansiRegex.lastIndex=0,s.replace(t.ansiRegex,"")):""),t.alias("noop",s=>s),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=Xie(),t.define=n,t};hN.exports=Zie();hN.exports.create=Zie});var Mi=E(bt=>{"use strict";var wJe=Object.prototype.toString,Cs=js(),$ie=!1,pN=[],ene={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};bt.longest=(t,e)=>t.reduce((r,i)=>Math.max(r,e?i[e].length:i.length),0);bt.hasColor=t=>!!t&&Cs.hasColor(t);var N0=bt.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);bt.nativeType=t=>wJe.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");bt.isAsyncFn=t=>bt.nativeType(t)==="asyncfunction";bt.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";bt.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;bt.scrollDown=(t=[])=>[...t.slice(1),t[0]];bt.scrollUp=(t=[])=>[t.pop(),...t];bt.reorder=(t=[])=>{let e=t.slice();return e.sort((r,i)=>r.index>i.index?1:r.index{let i=t.length,n=r===i?0:r<0?i-1:r,s=t[e];t[e]=t[n],t[n]=s};bt.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};bt.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};bt.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:i=` -`+r,width:n=80}=e;n-=((i+r).match(/[^\S\n]/g)||[]).length;let o=`.{1,${n}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,a=t.trim(),l=new RegExp(o,"g"),c=a.match(l)||[];return c=c.map(u=>u.replace(/\n$/,"")),e.padEnd&&(c=c.map(u=>u.padEnd(n," "))),e.padStart&&(c=c.map(u=>u.padStart(n," "))),r+c.join(i)};bt.unmute=t=>{let e=t.stack.find(i=>Cs.keys.color.includes(i));return e?Cs[e]:t.stack.find(i=>i.slice(2)==="bg")?Cs[e.slice(2)]:i=>i};bt.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";bt.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(i=>Cs.keys.color.includes(i));if(e){let i=Cs["bg"+bt.pascal(e)];return i?i.black:t}let r=t.stack.find(i=>i.slice(0,2)==="bg");return r?Cs[r.slice(2).toLowerCase()]||t:Cs.none};bt.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(i=>Cs.keys.color.includes(i)),r=t.stack.find(i=>i.slice(0,2)==="bg");if(e&&!r)return Cs[ene[e]||e];if(r){let i=r.slice(2).toLowerCase(),n=ene[i];return n&&Cs["bg"+bt.pascal(n)]||t}return Cs.none};bt.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),i=e>=12?"pm":"am";e=e%12;let n=e===0?12:e,s=r<10?"0"+r:r;return n+":"+s+" "+i};bt.set=(t={},e="",r)=>e.split(".").reduce((i,n,s,o)=>{let a=o.length-1>s?i[n]||{}:r;return!bt.isObject(a)&&s{let i=t[e]==null?e.split(".").reduce((n,s)=>n&&n[s],t):t[e];return i==null?r:i};bt.mixin=(t,e)=>{if(!N0(t))return e;if(!N0(e))return t;for(let r of Object.keys(e)){let i=Object.getOwnPropertyDescriptor(e,r);if(i.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&N0(i.value)){let n=Object.getOwnPropertyDescriptor(t,r);N0(n.value)?t[r]=bt.merge({},t[r],e[r]):Reflect.defineProperty(t,r,i)}else Reflect.defineProperty(t,r,i);else Reflect.defineProperty(t,r,i)}return t};bt.merge=(...t)=>{let e={};for(let r of t)bt.mixin(e,r);return e};bt.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let i of Object.keys(r)){let n=r[i];typeof n=="function"?bt.define(t,i,n.bind(e)):bt.define(t,i,n)}};bt.onExit=t=>{let e=(r,i)=>{$ie||($ie=!0,pN.forEach(n=>n()),r===!0&&process.exit(128+i))};pN.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),pN.push(t)};bt.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};bt.defineExport=(t,e,r)=>{let i;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(n){i=n},get(){return i?i():r()}})}});var tne=E(nf=>{"use strict";nf.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"};nf.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};nf.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};nf.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};nf.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 nne=E((dCt,rne)=>{"use strict";var ine=require("readline"),BJe=tne(),QJe=/^(?:\x1b)([a-zA-Z0-9])$/,bJe=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,vJe={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 SJe(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function xJe(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var L0=(t="",e={})=>{let r,i=P({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=""+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=i.sequence||""),i.sequence=i.sequence||t||i.name,t==="\r")i.raw=void 0,i.name="return";else if(t===` -`)i.name="enter";else if(t===" ")i.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x7F"||t==="\b")i.name="backspace",i.meta=t.charAt(0)==="";else if(t===""||t==="")i.name="escape",i.meta=t.length===2;else if(t===" "||t===" ")i.name="space",i.meta=t.length===2;else if(t<="")i.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),i.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")i.name="number";else if(t.length===1&&t>="a"&&t<="z")i.name=t;else if(t.length===1&&t>="A"&&t<="Z")i.name=t.toLowerCase(),i.shift=!0;else if(r=QJe.exec(t))i.meta=!0,i.shift=/^[A-Z]$/.test(r[1]);else if(r=bJe.exec(t)){let n=[...t];n[0]===""&&n[1]===""&&(i.option=!0);let s=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),o=(r[3]||r[5]||1)-1;i.ctrl=!!(o&4),i.meta=!!(o&10),i.shift=!!(o&1),i.code=s,i.name=vJe[s],i.shift=SJe(s)||i.shift,i.ctrl=xJe(s)||i.ctrl}return i};L0.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let i=ine.createInterface({terminal:!0,input:r});ine.emitKeypressEvents(r,i);let n=(a,l)=>e(a,L0(a,l),i),s=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",n),i.resume(),()=>{r.isTTY&&r.setRawMode(s),r.removeListener("keypress",n),i.pause(),i.close()}};L0.action=(t,e,r)=>{let i=P(P({},BJe),r);return e.ctrl?(e.action=i.ctrl[e.name],e):e.option&&i.option?(e.action=i.option[e.name],e):e.shift?(e.action=i.shift[e.name],e):(e.action=i.keys[e.name],e)};rne.exports=L0});var one=E((CCt,sne)=>{"use strict";sne.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let i=e[r];typeof i=="number"&&(i={interval:i}),kJe(t,r,i)}};function kJe(t,e,r={}){let i=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},n=r.interval||120;i.frames=r.frames||[],i.loading=!0;let s=setInterval(()=>{i.ms=Date.now()-i.start,i.tick++,t.render()},n);return i.stop=()=>{i.loading=!1,clearInterval(s)},Reflect.defineProperty(i,"interval",{value:s}),t.once("close",()=>i.stop()),i.stop}});var lne=E((mCt,ane)=>{"use strict";var{define:PJe,width:DJe}=Mi(),Ane=class{constructor(e){let r=e.options;PJe(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=DJe(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=P({},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"}};ane.exports=Ane});var une=E((ECt,cne)=>{"use strict";var dN=Mi(),yi=js(),CN={default:yi.noop,noop:yi.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||dN.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||dN.complement(this.primary)},primary:yi.cyan,success:yi.green,danger:yi.magenta,strong:yi.bold,warning:yi.yellow,muted:yi.dim,disabled:yi.gray,dark:yi.dim.gray,underline:yi.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}};CN.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(yi.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(yi.visible=t.styles.visible);let e=dN.merge({},CN,t.styles);delete e.merge;for(let r of Object.keys(yi))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>yi[r]});for(let r of Object.keys(yi.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>yi[r]});return e};cne.exports=CN});var fne=E((ICt,gne)=>{"use strict";var mN=process.platform==="win32",Ka=js(),RJe=Mi(),EN=_(P({},Ka.symbols),{upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:Ka.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:Ka.symbols.question,submitted:Ka.symbols.check,cancelled:Ka.symbols.cross},separator:{pending:Ka.symbols.pointerSmall,submitted:Ka.symbols.middot,cancelled:Ka.symbols.middot},radio:{off:mN?"( )":"\u25EF",on:mN?"(*)":"\u25C9",disabled:mN?"(|)":"\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"]});EN.merge=t=>{let e=RJe.merge({},Ka.symbols,EN,t.symbols);return delete e.merge,e};gne.exports=EN});var pne=E((yCt,hne)=>{"use strict";var FJe=une(),NJe=fne(),LJe=Mi();hne.exports=t=>{t.options=LJe.merge({},t.options.theme,t.options),t.symbols=NJe.merge(t.options),t.styles=FJe.merge(t.options)}});var Ine=E((dne,Cne)=>{"use strict";var mne=process.env.TERM_PROGRAM==="Apple_Terminal",TJe=js(),IN=Mi(),Ys=Cne.exports=dne,Ir="[",Ene="\x07",yN=!1,HA=Ys.code={bell:Ene,beep:Ene,beginning:`${Ir}G`,down:`${Ir}J`,esc:Ir,getPosition:`${Ir}6n`,hide:`${Ir}?25l`,line:`${Ir}2K`,lineEnd:`${Ir}K`,lineStart:`${Ir}1K`,restorePosition:Ir+(mne?"8":"u"),savePosition:Ir+(mne?"7":"s"),screen:`${Ir}2J`,show:`${Ir}?25h`,up:`${Ir}1J`},Lc=Ys.cursor={get hidden(){return yN},hide(){return yN=!0,HA.hide},show(){return yN=!1,HA.show},forward:(t=1)=>`${Ir}${t}C`,backward:(t=1)=>`${Ir}${t}D`,nextLine:(t=1)=>`${Ir}E`.repeat(t),prevLine:(t=1)=>`${Ir}F`.repeat(t),up:(t=1)=>t?`${Ir}${t}A`:"",down:(t=1)=>t?`${Ir}${t}B`:"",right:(t=1)=>t?`${Ir}${t}C`:"",left:(t=1)=>t?`${Ir}${t}D`:"",to(t,e){return e?`${Ir}${e+1};${t+1}H`:`${Ir}${t+1}G`},move(t=0,e=0){let r="";return r+=t<0?Lc.left(-t):t>0?Lc.right(t):"",r+=e<0?Lc.up(-e):e>0?Lc.down(e):"",r},restore(t={}){let{after:e,cursor:r,initial:i,input:n,prompt:s,size:o,value:a}=t;if(i=IN.isPrimitive(i)?String(i):"",n=IN.isPrimitive(n)?String(n):"",a=IN.isPrimitive(a)?String(a):"",o){let l=Ys.cursor.up(o)+Ys.cursor.to(s.length),c=n.length-r;return c>0&&(l+=Ys.cursor.left(c)),l}if(a||e){let l=!n&&!!i?-i.length:-n.length+r;return e&&(l-=e.length),n===""&&i&&!s.includes(i)&&(l+=i.length),Ys.cursor.move(l)}}},wN=Ys.erase={screen:HA.screen,up:HA.up,down:HA.down,line:HA.line,lineEnd:HA.lineEnd,lineStart:HA.lineStart,lines(t){let e="";for(let r=0;r{if(!e)return wN.line+Lc.to(0);let r=s=>[...TJe.unstyle(s)].length,i=t.split(/\r?\n/),n=0;for(let s of i)n+=1+Math.floor(Math.max(r(s)-1,0)/e);return(wN.line+Lc.prevLine()).repeat(n-1)+wN.line+Lc.to(0)}});var sf=E((wCt,yne)=>{"use strict";var MJe=require("events"),wne=js(),BN=nne(),OJe=one(),KJe=lne(),UJe=pne(),bn=Mi(),Tc=Ine(),T0=class extends MJe{constructor(e={}){super();this.name=e.name,this.type=e.type,this.options=e,UJe(this),OJe(this),this.state=new KJe(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=GJe(this.options.margin),this.setMaxListeners(0),HJe(this)}async keypress(e,r={}){this.keypressed=!0;let i=BN.action(e,BN(e,r),this.options.actions);this.state.keypress=i,this.emit("keypress",e,i),this.emit("state",this.state.clone());let n=this.options[i.action]||this[i.action]||this.dispatch;if(typeof n=="function")return await n.call(this,e,i);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(Tc.code.beep)}cursorHide(){this.stdout.write(Tc.cursor.hide()),bn.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(Tc.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(Tc.cursor.down(e)+Tc.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:i}=this.sections(),{cursor:n,initial:s="",input:o="",value:a=""}=this,l=this.state.size=i.length,c={after:r,cursor:n,initial:s,input:o,prompt:e,size:l,value:a},u=Tc.cursor.restore(c);u&&this.stdout.write(u)}sections(){let{buffer:e,input:r,prompt:i}=this.state;i=wne.unstyle(i);let n=wne.unstyle(e),s=n.indexOf(i),o=n.slice(0,s),l=n.slice(s).split(` -`),c=l[0],u=l[l.length-1],f=(i+(r?" "+r:"")).length,h=fe.call(this,this.value),this.result=()=>i.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 n=r.onSubmit.bind(this),s=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await n(this.name,this.value,this),s())}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,i){let{options:n,state:s,symbols:o,timers:a}=this,l=a&&a[e];s.timer=l;let c=n[e]||s[e]||o[e],u=r&&r[e]!=null?r[e]:await c;if(u==="")return u;let g=await this.resolve(u,s,r,i);return!g&&r&&r[e]?this.resolve(c,s,r,i):g}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,i=this.state;return i.timer=r,bn.isObject(e)&&(e=e[i.status]||e.pending),bn.hasColor(e)?e:(this.styles[i.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return bn.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,i=this.state;i.timer=r;let n=e[i.status]||e.pending||i.separator,s=await this.resolve(n,i);return bn.isObject(s)&&(s=s[i.status]||s.pending),bn.hasColor(s)?s:this.styles.muted(s)}async pointer(e,r){let i=await this.element("pointer",e,r);if(typeof i=="string"&&bn.hasColor(i))return i;if(i){let n=this.styles,s=this.index===r,o=s?n.primary:c=>c,a=await this.resolve(i[s?"on":"off"]||i,this.state),l=bn.hasColor(a)?a:o(a);return s?l:" ".repeat(a.length)}}async indicator(e,r){let i=await this.element("indicator",e,r);if(typeof i=="string"&&bn.hasColor(i))return i;if(i){let n=this.styles,s=e.enabled===!0,o=s?n.success:n.dark,a=i[s?"on":"off"]||i;return bn.hasColor(a)?a:o(a)}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 bn.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 bn.resolve(this,e,...r)}get base(){return T0.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||bn.height(this.stdout,25)}get width(){return this.options.columns||bn.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,i=[r,e].find(this.isValue.bind(this));return this.isValue(i)?i:this.initial}static get prompt(){return e=>new this(e).run()}};function HJe(t){let e=n=>t[n]===void 0||typeof t[n]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],i=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let n of Object.keys(t.options)){if(r.includes(n)||/^on[A-Z]/.test(n))continue;let s=t.options[n];typeof s=="function"&&e(n)?i.includes(n)||(t[n]=s.bind(t)):typeof t[n]!="function"&&(t[n]=s)}}function GJe(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=n=>n%2==0?` -`:" ",i=[];for(let n=0;n<4;n++){let s=r(n);e[n]?i.push(s.repeat(e[n])):i.push("")}return i}yne.exports=T0});var bne=E((BCt,Bne)=>{"use strict";var jJe=Mi(),Qne={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 Qne.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}};Bne.exports=(t,e={})=>{let r=jJe.merge({},Qne,e.roles);return r[t]||r.default}});var sC=E((QCt,vne)=>{"use strict";var YJe=js(),qJe=sf(),JJe=bne(),M0=Mi(),{reorder:QN,scrollUp:WJe,scrollDown:zJe,isObject:Sne,swap:VJe}=M0,xne=class extends qJe{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||Infinity,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:i,suggest:n}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(s=>s.enabled=!1),typeof n!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");Sne(r)&&(r=Object.keys(r)),Array.isArray(r)?(i!=null&&(this.index=this.findIndex(i)),r.forEach(s=>this.enable(this.find(s))),await this.render()):(i!=null&&(r=i),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 i=[],n=0,s=async(o,a)=>{typeof o=="function"&&(o=await o.call(this)),o instanceof Promise&&(o=await o);for(let l=0;l(this.state.loadingChoices=!1,o))}async toChoice(e,r,i){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 n=e.value;if(e=JJe(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,M0.define(e,"parent",i),e.level=i?i.level+1:1,e.indent==null&&(e.indent=i?i.indent+" ":e.indent||""),e.path=i?i.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,YJe.unstyle(e.message).length));let o=P({},e);return e.reset=(a=o.input,l=o.value)=>{for(let c of Object.keys(o))e[c]=o[c];e.input=a,e.value=l},n==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,i){let n=await this.toChoice(e,r,i);return this.choices.push(n),this.index=this.choices.length-1,this.limit=this.choices.length,n}async newItem(e,r,i){let n=P({name:"New choice name?",editable:!0,newChoice:!0},e),s=await this.addChoice(n,r,i);return s.updateChoice=()=>{delete s.newChoice,s.name=s.message=s.input,s.input="",s.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.maxSelectedr.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(n=>this.toggle(n,r));let i=e.parent;for(;i;){let n=i.choices.filter(s=>this.isDisabled(s));i.enabled=n.every(s=>s.enabled===!0),i=i.parent}return kne(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=i=>{let n=Number(i);if(n>this.choices.length-1)return this.alert();let s=this.focused,o=this.choices.find(a=>n===a.index);if(!o.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(o)===-1){let a=QN(this.choices),l=a.indexOf(o);if(s.index>l){let c=a.slice(l,l+this.limit),u=a.filter(g=>!c.includes(g));this.choices=c.concat(u)}else{let c=l-this.limit+1;this.choices=a.slice(c).concat(a.slice(0,c))}}return this.index=this.choices.indexOf(o),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(i=>{let n=this.choices.length,s=this.num,o=(a=!1,l)=>{clearTimeout(this.numberTimeout),a&&(l=r(s)),this.num="",i(l)};if(s==="0"||s.length===1&&Number(s+"0")>n)return o(!0);if(Number(s)>n)return o(!1,this.alert());this.numberTimeout=setTimeout(()=>o(!0),this.delay)})}home(){return this.choices=QN(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=QN(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,i=this.index;return this.options.scroll===!1&&i===0?this.alert():e>r&&i===0?this.scrollUp():(this.index=(i-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,i=this.index;return this.options.scroll===!1&&i===r-1?this.alert():e>r&&i===r-1?this.scrollDown():(this.index=(i+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=WJe(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=zJe(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){VJe(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(i=>e[i]===!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(i=>!this.isDisabled(i));return e.enabled&&r.every(i=>this.isEnabled(i))}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((i,n)=>(i[n]=this.find(n,r),i),{})}filter(e,r){let i=(a,l)=>[a.name,l].includes(e),n=typeof e=="function"?e:i,o=(this.options.multiple?this.state._choices:this.choices).filter(n);return r?o.map(a=>a[r]):o}find(e,r){if(Sne(e))return r?e[r]:e;let i=(o,a)=>[o.name,a].includes(e),n=typeof e=="function"?e:i,s=this.choices.find(n);if(s)return r?s[r]:s}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(o=>o.newChoice))return this.alert();let{reorder:r,sort:i}=this.options,n=this.multiple===!0,s=this.selected;return s===void 0?this.alert():(Array.isArray(s)&&r!==!1&&i!==!0&&(s=M0.reorder(s)),this.value=n?s.map(o=>o.name):s.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(i=>i.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 i=this.find(r);i&&(this.initial=i.index,this.focus(i,!0))}}}get choices(){return kne(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:i}=this,n=e.limit||this._limit||r.limit||i.length;return Math.min(n,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 kne(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(M0.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let i=r.choices.filter(n=>!t.isDisabled(n));r.enabled=i.every(n=>n.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}vne.exports=xne});var GA=E((bCt,Pne)=>{"use strict";var _Je=sC(),bN=Mi(),Dne=class extends _Je{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 i=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!bN.hasColor(i)&&(i=this.styles.strong(i)),this.resolve(i,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let i=this.index===r,n=await this.pointer(e,r),s=await this.indicator(e,r)+(e.pad||""),o=await this.resolve(e.hint,this.state,e,r);o&&!bN.hasColor(o)&&(o=this.styles.muted(o));let a=this.indent(e),l=await this.choiceMessage(e,r),c=()=>[this.margin[3],a+n+s,l,this.margin[1],o].filter(Boolean).join(" ");return e.role==="heading"?c():e.disabled?(bN.hasColor(l)||(l=this.styles.disabled(l)),c()):(i&&(l=this.styles.em(l)),c())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(s,o)=>await this.renderChoice(s,o)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let i=this.margin[0]+r.join(` -`),n;return this.options.choicesHeader&&(n=await this.resolve(this.options.choicesHeader,this.state)),[n,i].filter(Boolean).join(` -`)}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,i="",n=await this.header(),s=await this.prefix(),o=await this.separator(),a=await this.message();this.options.promptLine!==!1&&(i=[s,a,o,""].join(" "),this.state.prompt=i);let l=await this.format(),c=await this.error()||await this.hint(),u=await this.renderChoices(),g=await this.footer();l&&(i+=l),c&&!i.includes(c)&&(i+=" "+c),e&&!l&&!u.trim()&&this.multiple&&this.emptyError!=null&&(i+=this.styles.danger(this.emptyError)),this.clear(r),this.write([n,i,u,g].filter(Boolean).join(` -`)),this.write(this.margin[2]),this.restore()}};Pne.exports=Dne});var Nne=E((vCt,Rne)=>{"use strict";var XJe=GA(),ZJe=(t,e)=>{let r=t.toLowerCase();return i=>{let s=i.toLowerCase().indexOf(r),o=e(i.slice(s,s+r.length));return s>=0?i.slice(0,s)+o+i.slice(s+r.length):i}},Fne=class extends XJe{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:i}=this.state;return this.input=i.slice(0,r)+e+i.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 i=e.toLowerCase();return r.filter(n=>n.message.toLowerCase().includes(i))}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=ZJe(this.input,e),i=this.choices;this.choices=i.map(n=>_(P({},n),{message:r(n.message)})),await super.render(),this.choices=i}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};Rne.exports=Fne});var SN=E((SCt,Lne)=>{"use strict";var vN=Mi();Lne.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:i="",pos:n,showCursor:s=!0,color:o}=e,a=o||t.styles.placeholder,l=vN.inverse(t.styles.primary),c=d=>l(t.styles.black(d)),u=r,g=" ",f=c(g);if(t.blink&&t.blink.off===!0&&(c=d=>d,f=""),s&&n===0&&i===""&&r==="")return c(g);if(s&&n===0&&(r===i||r===""))return c(i[0])+a(i.slice(1));i=vN.isPrimitive(i)?`${i}`:"",r=vN.isPrimitive(r)?`${r}`:"";let h=i&&i.startsWith(r)&&i!==r,p=h?c(i[r.length]):f;if(n!==r.length&&s===!0&&(u=r.slice(0,n)+c(r[n])+r.slice(n+1),p=""),s===!1&&(p=""),h){let d=t.styles.unstyle(u+p);return u+p+a(i.slice(d.length))}return u+p}});var O0=E((xCt,Tne)=>{"use strict";var $Je=js(),e3e=GA(),t3e=SN(),Mne=class extends e3e{constructor(e){super(_(P({},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:i,input:n}=r;return r.value=r.input=n.slice(0,i)+e+n.slice(i),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:i}=e;return e.value=e.input=i.slice(0,r-1)+i.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:i}=e;if(i[r]===void 0)return this.alert();let n=`${i}`.slice(0,r)+`${i}`.slice(r+1);return e.value=e.input=n,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:i}=e;return r&&r.startsWith(i)&&i!==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 i=await this.resolve(e.separator,this.state,e,r)||":";return i?" "+this.styles.disabled(i):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:i,styles:n}=this,{cursor:s,initial:o="",name:a,hint:l,input:c=""}=e,{muted:u,submitted:g,primary:f,danger:h}=n,p=l,d=this.index===r,m=e.validate||(()=>!0),I=await this.choiceSeparator(e,r),B=e.message;this.align==="right"&&(B=B.padStart(this.longest+1," ")),this.align==="left"&&(B=B.padEnd(this.longest+1," "));let b=this.values[a]=c||o,R=c?"success":"dark";await m.call(e,b,this.state)!==!0&&(R="danger");let L=n[R](await this.indicator(e,r))+(e.pad||""),K=this.indent(e),J=()=>[K,L,B+I,c,p].filter(Boolean).join(" ");if(i.submitted)return B=$Je.unstyle(B),c=g(c),p="",J();if(e.format)c=await e.format.call(this,c,e,r);else{let ne=this.styles.muted;c=t3e(this,{input:c,initial:o,pos:s,showCursor:d,color:ne})}return this.isValue(c)||(c=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[a]=await e.result.call(this,b,e,r)),d&&(B=f(B)),e.error?c+=(c?" ":"")+h(e.error.trim()):e.hint&&(c+=(c?" ":"")+u(e.hint.trim())),J()}async submit(){return this.value=this.values,super.base.submit.call(this)}};Tne.exports=Mne});var xN=E((kCt,One)=>{"use strict";var r3e=O0(),i3e=()=>{throw new Error("expected prompt to have a custom authenticate method")},Kne=(t=i3e)=>{class e extends r3e{constructor(i){super(i)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(i){return Kne(i)}}return e};One.exports=Kne()});var Gne=E((PCt,Une)=>{"use strict";var n3e=xN();function s3e(t,e){return t.username===this.options.username&&t.password===this.options.password}var Hne=(t=s3e)=>{let e=[{name:"username",message:"username"},{name:"password",message:"password",format(i){return this.options.showPassword?i:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(i.length))}}];class r extends n3e.create(t){constructor(n){super(_(P({},n),{choices:e}))}static create(n){return Hne(n)}}return r};Une.exports=Hne()});var K0=E((DCt,jne)=>{"use strict";var o3e=sf(),{isPrimitive:a3e,hasColor:A3e}=Mi(),Yne=class extends o3e{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:i}=this;return i.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 a3e(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return A3e(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),o=this.styles.muted(this.default),a=[i,s,o,n].filter(Boolean).join(" ");this.state.prompt=a;let l=await this.header(),c=this.value=this.cast(e),u=await this.format(c),g=await this.error()||await this.hint(),f=await this.footer();g&&!a.includes(g)&&(u+=" "+g),a+=" "+u,this.clear(r),this.write([l,a,f].filter(Boolean).join(` -`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};jne.exports=Yne});var Wne=E((RCt,qne)=>{"use strict";var l3e=K0(),Jne=class extends l3e{constructor(e){super(e);this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};qne.exports=Jne});var _ne=E((FCt,zne)=>{"use strict";var c3e=GA(),u3e=O0(),of=u3e.prototype,Vne=class extends c3e{constructor(e){super(_(P({},e),{multiple:!0}));this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let i=this.focused,n=i.parent||{};return!i.editable&&!n.editable&&(e==="a"||e==="i")?super[e]():of.dispatch.call(this,e,r)}append(e,r){return of.append.call(this,e,r)}delete(e,r){return of.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?of.next.call(this):super.next()}prev(){return this.focused.editable?of.prev.call(this):super.prev()}async indicator(e,r){let i=e.indicator||"",n=e.editable?i:super.indicator(e,r);return await this.resolve(n,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?of.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 i=r.parent?this.value[r.parent.name]:this.value;if(r.editable?i=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(i=r.enabled===!0),e=await r.validate(i,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)}};zne.exports=Vne});var Mc=E((NCt,Xne)=>{"use strict";var g3e=sf(),f3e=SN(),{isPrimitive:h3e}=Mi(),Zne=class extends g3e{constructor(e){super(e);this.initial=h3e(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let i=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!i||i.name!=="return")?this.append(` -`,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:i}=this.state;this.input=`${i}`.slice(0,r)+e+`${i}`.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),i=this.input.slice(e),n=r.split(" ");this.state.clipboard.push(n.pop()),this.input=n.join(" "),this.cursor=this.input.length,this.input+=i,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):f3e(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),i=await this.separator(),n=await this.message(),s=[r,n,i].filter(Boolean).join(" ");this.state.prompt=s;let o=await this.header(),a=await this.format(),l=await this.error()||await this.hint(),c=await this.footer();l&&!a.includes(l)&&(a+=" "+l),s+=" "+a,this.clear(e),this.write([o,s,c].filter(Boolean).join(` -`)),this.restore()}};Xne.exports=Zne});var ese=E((LCt,$ne)=>{"use strict";var p3e=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),U0=t=>p3e(t).filter(Boolean);$ne.exports=(t,e={},r="")=>{let{past:i=[],present:n=""}=e,s,o;switch(t){case"prev":case"undo":return s=i.slice(0,i.length-1),o=i[i.length-1]||"",{past:U0([r,...s]),present:o};case"next":case"redo":return s=i.slice(1),o=i[0]||"",{past:U0([...s,r]),present:o};case"save":return{past:U0([...i,r]),present:""};case"remove":return o=U0(i.filter(a=>a!==r)),n="",o.length&&(n=o.pop()),{past:o,present:n};default:throw new Error(`Invalid action: "${t}"`)}}});var kN=E((TCt,tse)=>{"use strict";var d3e=Mc(),rse=ese(),ise=class extends d3e{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let i=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:i},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=rse(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=rse("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};tse.exports=ise});var ose=E((MCt,nse)=>{"use strict";var C3e=Mc(),sse=class extends C3e{format(){return""}};nse.exports=sse});var lse=E((OCt,ase)=>{"use strict";var m3e=Mc(),Ase=class extends m3e{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()}};ase.exports=Ase});var gse=E((KCt,cse)=>{"use strict";var E3e=GA(),use=class extends E3e{constructor(e){super(_(P({},e),{multiple:!0}))}};cse.exports=use});var PN=E((UCt,fse)=>{"use strict";var I3e=Mc(),hse=class extends I3e{constructor(e={}){super(P({style:"number"},e));this.min=this.isValue(e.min)?this.toNumber(e.min):-Infinity,this.max=this.isValue(e.max)?this.toNumber(e.max):Infinity,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,i=this.toNumber(this.input);return i>this.max+r?this.alert():(this.input=`${i+r}`,this.render())}down(e){let r=e||this.minor,i=this.toNumber(this.input);return ithis.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};fse.exports=hse});var dse=E((HCt,pse)=>{pse.exports=PN()});var Ese=E((GCt,Cse)=>{"use strict";var y3e=Mc(),mse=class extends y3e{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)):""}};Cse.exports=mse});var Bse=E((jCt,Ise)=>{"use strict";var w3e=js(),B3e=sC(),yse=Mi(),wse=class extends B3e{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||` - `;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((i,n)=>({name:n+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 i=0;i=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(){if(this.scaleKey===!1||this.state.submitted)return"";let e=this.scale.map(i=>` ${i.name} - ${i.message}`);return["",...e].map(i=>this.styles.muted(i)).join(` -`)}renderScaleHeading(e){let r=this.scale.map(l=>l.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let i=this.scaleLength-r.join("").length,n=Math.round(i/(r.length-1)),o=r.map(l=>this.styles.strong(l)).join(" ".repeat(n)),a=" ".repeat(this.widths[0]);return this.margin[3]+a+this.margin[1]+o}scaleIndicator(e,r,i){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,i);let n=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):n?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let i=e.scale.map(s=>this.scaleIndicator(e,s,r)),n=this.term==="Hyper"?"":" ";return i.join(n+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let i=this.index===r,n=await this.pointer(e,r),s=await e.hint;s&&!yse.hasColor(s)&&(s=this.styles.muted(s));let o=p=>this.margin[3]+p.replace(/\s+$/,"").padEnd(this.widths[0]," "),a=this.newline,l=this.indent(e),c=await this.resolve(e.message,this.state,e,r),u=await this.renderScale(e,r),g=this.margin[1]+this.margin[3];this.scaleLength=w3e.unstyle(u).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-g.length);let h=yse.wordWrap(c,{width:this.widths[0],newline:a}).split(` -`).map(p=>o(p)+this.margin[1]);return i&&(u=this.styles.info(u),h=h.map(p=>this.styles.info(p))),h[0]+=u,this.linebreak&&h.push(""),[l+n,h.join(` -`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(n,s)=>await this.renderChoice(n,s)),r=await Promise.all(e),i=await this.renderScaleHeading();return this.margin[0]+[i,...r.map(n=>n.join(" "))].join(` -`)}async render(){let{submitted:e,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),o="";this.options.promptLine!==!1&&(o=[i,s,n,""].join(" "),this.state.prompt=o);let a=await this.header(),l=await this.format(),c=await this.renderScaleKey(),u=await this.error()||await this.hint(),g=await this.renderChoices(),f=await this.footer(),h=this.emptyError;l&&(o+=l),u&&!o.includes(u)&&(o+=" "+u),e&&!l&&!g.trim()&&this.multiple&&h!=null&&(o+=this.styles.danger(h)),this.clear(r),this.write([a,o,c,g,f].filter(Boolean).join(` -`)),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)}};Ise.exports=wse});var Sse=E((YCt,Qse)=>{"use strict";var bse=js(),Q3e=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",vse=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=Q3e(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},b3e=async(t={},e={},r=i=>i)=>{let i=new Set,n=t.fields||[],s=t.template,o=[],a=[],l=[],c=1;typeof s=="function"&&(s=await s());let u=-1,g=()=>s[++u],f=()=>s[u+1],h=p=>{p.line=c,o.push(p)};for(h({type:"bos",value:""});uR.name===I.key);I.field=n.find(R=>R.name===I.key),b||(b=new vse(I),a.push(b)),b.lines.push(I.line-1);continue}let d=o[o.length-1];d.type==="text"&&d.line===c?d.value+=p:h({type:"text",value:p})}return h({type:"eos",value:""}),{input:s,tabstops:o,unique:i,keys:l,items:a}};Qse.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),i=P(P({},e.values),e.initial),{tabstops:n,items:s,keys:o}=await b3e(e,i),a=DN("result",t,e),l=DN("format",t,e),c=DN("validate",t,e,!0),u=t.isValue.bind(t);return async(g={},f=!1)=>{let h=0;g.required=r,g.items=s,g.keys=o,g.output="";let p=async(B,b,R,H)=>{let L=await c(B,b,R,H);return L===!1?"Invalid field "+R.name:L};for(let B of n){let b=B.value,R=B.key;if(B.type!=="template"){b&&(g.output+=b);continue}if(B.type==="template"){let H=s.find(q=>q.name===R);e.required===!0&&g.required.add(H.name);let L=[H.input,g.values[H.value],H.value,b].find(u),J=(H.field||{}).message||B.inner;if(f){let q=await p(g.values[R],g,H,h);if(q&&typeof q=="string"||q===!1){g.invalid.set(R,q);continue}g.invalid.delete(R);let A=await a(g.values[R],g,H,h);g.output+=bse.unstyle(A);continue}H.placeholder=!1;let ne=b;b=await l(b,g,H,h),L!==b?(g.values[R]=L,b=t.styles.typing(L),g.missing.delete(J)):(g.values[R]=void 0,L=`<${J}>`,b=t.styles.primary(L),H.placeholder=!0,g.required.has(R)&&g.missing.add(J)),g.missing.has(J)&&g.validating&&(b=t.styles.warning(L)),g.invalid.has(R)&&g.validating&&(b=t.styles.danger(L)),h===g.index&&(ne!==b?b=t.styles.underline(b):b=t.styles.heading(bse.unstyle(b))),h++}b&&(g.output+=b)}let d=g.output.split(` -`).map(B=>" "+B),m=s.length,I=0;for(let B of s)g.invalid.has(B.name)&&B.lines.forEach(b=>{d[b][0]===" "&&(d[b]=g.styles.danger(g.symbols.bullet)+d[b].slice(1))}),t.isValue(g.values[B.name])&&I++;return g.completed=(I/m*100).toFixed(0),g.output=d.join(` -`),g.output}};function DN(t,e,r,i){return(n,s,o,a)=>typeof o.field[t]=="function"?o.field[t].call(e,n,s,o,a):[i,n].find(l=>e.isValue(l))}});var Pse=E((qCt,xse)=>{"use strict";var v3e=js(),S3e=Sse(),x3e=sf(),kse=class extends x3e{constructor(e){super(e);this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await S3e(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 i=this.getItem(),n=i.input.slice(0,this.cursor),s=i.input.slice(this.cursor);this.input=i.input=`${n}${e}${s}`,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),i=e.input.slice(0,this.cursor-1);this.input=e.input=`${i}${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:i,size:n}=this.state,s=[this.options.newline,` -`].find(B=>B!=null),o=await this.prefix(),a=await this.separator(),l=await this.message(),c=[o,l,a].filter(Boolean).join(" ");this.state.prompt=c;let u=await this.header(),g=await this.error()||"",f=await this.hint()||"",h=i?"":await this.interpolate(this.state),p=this.state.key=r[e]||"",d=await this.format(p),m=await this.footer();d&&(c+=" "+d),f&&!d&&this.state.completed===0&&(c+=" "+f),this.clear(n);let I=[u,c,h,m,g.trim()];this.write(I.filter(Boolean).join(s)),this.restore()}getItem(e){let{items:r,keys:i,index:n}=this.state,s=r.find(o=>o.name===i[n]);return s&&s.input!=null&&(this.input=s.input,this.cursor=s.cursor),s}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:i,values:n}=this.state;if(e.size){let a="";for(let[l,c]of e)a+=`Invalid ${l}: ${c} -`;return this.state.error=a,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let o=v3e.unstyle(i).split(` -`).map(a=>a.slice(1)).join(` -`);return this.value={values:n,result:o},super.submit()}};xse.exports=kse});var Fse=E((JCt,Dse)=>{"use strict";var k3e="(Use + to sort)",P3e=GA(),Rse=class extends P3e{constructor(e){super(_(P({},e),{reorder:!1,sort:!0,multiple:!0}));this.state.hint=[this.options.hint,k3e].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let i=await super.renderChoice(e,r),n=this.symbols.identicalTo+" ",s=this.index===r&&this.sorting?this.styles.muted(n):" ";return this.options.drag===!1&&(s=""),this.options.numbered===!0?s+`${r+1} - `+i:s+i}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Dse.exports=Rse});var Tse=E((WCt,Nse)=>{"use strict";var D3e=sC(),Lse=class extends D3e{constructor(e={}){super(e);if(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(i=>this.styles.muted(i)),this.state.header=r.join(` - `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let i of r)i.scale=R3e(5,this.options),i.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],i=r.selected;return e.scale.forEach(n=>n.selected=!1),r.selected=!i,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 i=this.index===r,n=this.term==="Hyper",s=n?9:8,o=n?"":" ",a=this.symbols.line.repeat(s),l=" ".repeat(s+(n?0:1)),c=b=>(b?this.styles.success("\u25C9"):"\u25EF")+o,u=r+1+".",g=i?this.styles.heading:this.styles.noop,f=await this.resolve(e.message,this.state,e,r),h=this.indent(e),p=h+e.scale.map((b,R)=>c(R===e.scaleIdx)).join(a),d=b=>b===e.scaleIdx?g(b):b,m=h+e.scale.map((b,R)=>d(R)).join(l),I=()=>[u,f].filter(Boolean).join(" "),B=()=>[I(),p,m," "].filter(Boolean).join(` -`);return i&&(p=this.styles.cyan(p),m=this.styles.cyan(m)),B()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(i,n)=>await this.renderChoice(i,n)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(` -`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),o=[i,s,n].filter(Boolean).join(" ");this.state.prompt=o;let a=await this.header(),l=await this.format(),c=await this.error()||await this.hint(),u=await this.renderChoices(),g=await this.footer();(l||!c)&&(o+=" "+l),c&&!o.includes(c)&&(o+=" "+c),e&&!l&&!u&&this.multiple&&this.type!=="form"&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([o,a,u,g].filter(Boolean).join(` -`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function R3e(t,e={}){if(Array.isArray(e.scale))return e.scale.map(i=>P({},i));let r=[];for(let i=1;i{Mse.exports=kN()});var Hse=E((VCt,Kse)=>{"use strict";var F3e=K0(),Use=class extends F3e{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=i=>this.styles.primary.underline(i);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(),i=await this.prefix(),n=await this.separator(),s=await this.message(),o=await this.format(),a=await this.error()||await this.hint(),l=await this.footer(),c=[i,s,n,o].join(" ");this.state.prompt=c,a&&!c.includes(a)&&(c+=" "+a),this.clear(e),this.write([r,c,l].filter(Boolean).join(` -`)),this.write(this.margin[2]),this.restore()}};Kse.exports=Use});var Yse=E((_Ct,Gse)=>{"use strict";var N3e=GA(),jse=class extends N3e{constructor(e){super(e);if(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 i=await super.toChoices(e,r);if(i.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>i.length)throw new Error("Please specify the index of the correct answer from the list of choices");return i}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)}}};Gse.exports=jse});var Jse=E(RN=>{"use strict";var qse=Mi(),ti=(t,e)=>{qse.defineExport(RN,t,e),qse.defineExport(RN,t.toLowerCase(),e)};ti("AutoComplete",()=>Nne());ti("BasicAuth",()=>Gne());ti("Confirm",()=>Wne());ti("Editable",()=>_ne());ti("Form",()=>O0());ti("Input",()=>kN());ti("Invisible",()=>ose());ti("List",()=>lse());ti("MultiSelect",()=>gse());ti("Numeral",()=>dse());ti("Password",()=>Ese());ti("Scale",()=>Bse());ti("Select",()=>GA());ti("Snippet",()=>Pse());ti("Sort",()=>Fse());ti("Survey",()=>Tse());ti("Text",()=>Ose());ti("Toggle",()=>Hse());ti("Quiz",()=>Yse())});var zse=E((ZCt,Wse)=>{Wse.exports={ArrayPrompt:sC(),AuthPrompt:xN(),BooleanPrompt:K0(),NumberPrompt:PN(),StringPrompt:Mc()}});var aC=E(($Ct,Vse)=>{"use strict";var _se=require("assert"),FN=require("events"),jA=Mi(),No=class extends FN{constructor(e,r){super();this.options=jA.merge({},e),this.answers=P({},r)}register(e,r){if(jA.isObject(e)){for(let n of Object.keys(e))this.register(n,e[n]);return this}_se.equal(typeof r,"function","expected a function");let i=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[i]=r:this.prompts[i]=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(jA.merge({},this.options,r))}catch(i){return Promise.reject(i)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=jA.merge({},this.options,e),{type:i,name:n}=e,{set:s,get:o}=jA;if(typeof i=="function"&&(i=await i.call(this,e,this.answers)),!i)return this.answers[n];_se(this.prompts[i],`Prompt "${i}" is not registered`);let a=new this.prompts[i](r),l=o(this.answers,n);a.state.answers=this.answers,a.enquirer=this,n&&a.on("submit",u=>{this.emit("answer",n,u,a),s(this.answers,n,u)});let c=a.emit.bind(a);return a.emit=(...u)=>(this.emit.call(this,...u),c(...u)),this.emit("prompt",a,this),r.autofill&&l!=null?(a.value=a.input=l,r.autofill==="show"&&await a.submit()):l=a.value=await a.run(),l}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||sf()}static get prompts(){return Jse()}static get types(){return zse()}static get prompt(){let e=(r,...i)=>{let n=new this(...i),s=n.emit.bind(n);return n.emit=(...o)=>(e.emit(...o),s(...o)),n.prompt(r)};return jA.mixinEmitter(e,new FN),e}};jA.mixinEmitter(No,new FN);var NN=No.prompts;for(let t of Object.keys(NN)){let e=t.toLowerCase(),r=i=>new NN[t](i).run();No.prompt[e]=r,No[e]=r,No[t]||Reflect.defineProperty(No,t,{get:()=>NN[t]})}var oC=t=>{jA.defineExport(No,t,()=>No.types[t])};oC("ArrayPrompt");oC("AuthPrompt");oC("BooleanPrompt");oC("NumberPrompt");oC("StringPrompt");Vse.exports=No});var loe=E((Gmt,Aoe)=>{function K3e(t,e){for(var r=-1,i=t==null?0:t.length;++r{var U3e=XB(),H3e=jg();function G3e(t,e,r,i){var n=!r;r||(r={});for(var s=-1,o=e.length;++s{var j3e=Af(),Y3e=zg();function q3e(t,e){return t&&j3e(e,Y3e(e),t)}uoe.exports=q3e});var hoe=E((qmt,foe)=>{function J3e(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}foe.exports=J3e});var doe=E((Jmt,poe)=>{var W3e=Gs(),z3e=u0(),V3e=hoe(),_3e=Object.prototype,X3e=_3e.hasOwnProperty;function Z3e(t){if(!W3e(t))return V3e(t);var e=z3e(t),r=[];for(var i in t)i=="constructor"&&(e||!X3e.call(t,i))||r.push(i);return r}poe.exports=Z3e});var lf=E((Wmt,Coe)=>{var $3e=bF(),eWe=doe(),tWe=Hd();function rWe(t){return tWe(t)?$3e(t,!0):eWe(t)}Coe.exports=rWe});var Eoe=E((zmt,moe)=>{var iWe=Af(),nWe=lf();function sWe(t,e){return t&&iWe(e,nWe(e),t)}moe.exports=sWe});var UN=E((hC,cf)=>{var oWe=Ks(),Ioe=typeof hC=="object"&&hC&&!hC.nodeType&&hC,yoe=Ioe&&typeof cf=="object"&&cf&&!cf.nodeType&&cf,aWe=yoe&&yoe.exports===Ioe,woe=aWe?oWe.Buffer:void 0,Boe=woe?woe.allocUnsafe:void 0;function AWe(t,e){if(e)return t.slice();var r=t.length,i=Boe?Boe(r):new t.constructor(r);return t.copy(i),i}cf.exports=AWe});var HN=E((Vmt,Qoe)=>{function lWe(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r{var cWe=Af(),uWe=f0();function gWe(t,e){return cWe(t,uWe(t),e)}boe.exports=gWe});var H0=E((Xmt,Soe)=>{var fWe=vF(),hWe=fWe(Object.getPrototypeOf,Object);Soe.exports=hWe});var GN=E((Zmt,xoe)=>{var pWe=$B(),dWe=H0(),CWe=f0(),mWe=RF(),EWe=Object.getOwnPropertySymbols,IWe=EWe?function(t){for(var e=[];t;)pWe(e,CWe(t)),t=dWe(t);return e}:mWe;xoe.exports=IWe});var Poe=E(($mt,koe)=>{var yWe=Af(),wWe=GN();function BWe(t,e){return yWe(t,wWe(t),e)}koe.exports=BWe});var Roe=E((eEt,Doe)=>{var QWe=DF(),bWe=GN(),vWe=lf();function SWe(t){return QWe(t,vWe,bWe)}Doe.exports=SWe});var Noe=E((tEt,Foe)=>{var xWe=Object.prototype,kWe=xWe.hasOwnProperty;function PWe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&kWe.call(t,"index")&&(r.index=t.index,r.input=t.input),r}Foe.exports=PWe});var G0=E((rEt,Loe)=>{var Toe=kF();function DWe(t){var e=new t.constructor(t.byteLength);return new Toe(e).set(new Toe(t)),e}Loe.exports=DWe});var Ooe=E((iEt,Moe)=>{var RWe=G0();function FWe(t,e){var r=e?RWe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}Moe.exports=FWe});var Uoe=E((nEt,Koe)=>{var NWe=/\w*$/;function LWe(t){var e=new t.constructor(t.source,NWe.exec(t));return e.lastIndex=t.lastIndex,e}Koe.exports=LWe});var qoe=E((sEt,Hoe)=>{var Goe=ac(),joe=Goe?Goe.prototype:void 0,Yoe=joe?joe.valueOf:void 0;function TWe(t){return Yoe?Object(Yoe.call(t)):{}}Hoe.exports=TWe});var jN=E((oEt,Joe)=>{var MWe=G0();function OWe(t,e){var r=e?MWe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}Joe.exports=OWe});var zoe=E((aEt,Woe)=>{var KWe=G0(),UWe=Ooe(),HWe=Uoe(),GWe=qoe(),jWe=jN(),YWe="[object Boolean]",qWe="[object Date]",JWe="[object Map]",WWe="[object Number]",zWe="[object RegExp]",VWe="[object Set]",_We="[object String]",XWe="[object Symbol]",ZWe="[object ArrayBuffer]",$We="[object DataView]",e8e="[object Float32Array]",t8e="[object Float64Array]",r8e="[object Int8Array]",i8e="[object Int16Array]",n8e="[object Int32Array]",s8e="[object Uint8Array]",o8e="[object Uint8ClampedArray]",a8e="[object Uint16Array]",A8e="[object Uint32Array]";function l8e(t,e,r){var i=t.constructor;switch(e){case ZWe:return KWe(t);case YWe:case qWe:return new i(+t);case $We:return UWe(t,r);case e8e:case t8e:case r8e:case i8e:case n8e:case s8e:case o8e:case a8e:case A8e:return jWe(t,r);case JWe:return new i;case WWe:case _We:return new i(t);case zWe:return HWe(t);case VWe:return new i;case XWe:return GWe(t)}}Woe.exports=l8e});var Xoe=E((AEt,Voe)=>{var c8e=Gs(),_oe=Object.create,u8e=function(){function t(){}return function(e){if(!c8e(e))return{};if(_oe)return _oe(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();Voe.exports=u8e});var YN=E((lEt,Zoe)=>{var g8e=Xoe(),f8e=H0(),h8e=u0();function p8e(t){return typeof t.constructor=="function"&&!h8e(t)?g8e(f8e(t)):{}}Zoe.exports=p8e});var eae=E((cEt,$oe)=>{var d8e=jd(),C8e=Qo(),m8e="[object Map]";function E8e(t){return C8e(t)&&d8e(t)==m8e}$oe.exports=E8e});var nae=E((uEt,tae)=>{var I8e=eae(),y8e=A0(),rae=l0(),iae=rae&&rae.isMap,w8e=iae?y8e(iae):I8e;tae.exports=w8e});var oae=E((gEt,sae)=>{var B8e=jd(),Q8e=Qo(),b8e="[object Set]";function v8e(t){return Q8e(t)&&B8e(t)==b8e}sae.exports=v8e});var cae=E((fEt,aae)=>{var S8e=oae(),x8e=A0(),Aae=l0(),lae=Aae&&Aae.isSet,k8e=lae?x8e(lae):S8e;aae.exports=k8e});var pae=E((hEt,uae)=>{var P8e=Gd(),D8e=loe(),R8e=XB(),F8e=goe(),N8e=Eoe(),L8e=UN(),T8e=HN(),M8e=voe(),O8e=Poe(),K8e=FF(),U8e=Roe(),H8e=jd(),G8e=Noe(),j8e=zoe(),Y8e=YN(),q8e=As(),J8e=Od(),W8e=nae(),z8e=Gs(),V8e=cae(),_8e=zg(),X8e=lf(),Z8e=1,$8e=2,e4e=4,gae="[object Arguments]",t4e="[object Array]",r4e="[object Boolean]",i4e="[object Date]",n4e="[object Error]",fae="[object Function]",s4e="[object GeneratorFunction]",o4e="[object Map]",a4e="[object Number]",hae="[object Object]",A4e="[object RegExp]",l4e="[object Set]",c4e="[object String]",u4e="[object Symbol]",g4e="[object WeakMap]",f4e="[object ArrayBuffer]",h4e="[object DataView]",p4e="[object Float32Array]",d4e="[object Float64Array]",C4e="[object Int8Array]",m4e="[object Int16Array]",E4e="[object Int32Array]",I4e="[object Uint8Array]",y4e="[object Uint8ClampedArray]",w4e="[object Uint16Array]",B4e="[object Uint32Array]",rr={};rr[gae]=rr[t4e]=rr[f4e]=rr[h4e]=rr[r4e]=rr[i4e]=rr[p4e]=rr[d4e]=rr[C4e]=rr[m4e]=rr[E4e]=rr[o4e]=rr[a4e]=rr[hae]=rr[A4e]=rr[l4e]=rr[c4e]=rr[u4e]=rr[I4e]=rr[y4e]=rr[w4e]=rr[B4e]=!0;rr[n4e]=rr[fae]=rr[g4e]=!1;function j0(t,e,r,i,n,s){var o,a=e&Z8e,l=e&$8e,c=e&e4e;if(r&&(o=n?r(t,i,n,s):r(t)),o!==void 0)return o;if(!z8e(t))return t;var u=q8e(t);if(u){if(o=G8e(t),!a)return T8e(t,o)}else{var g=H8e(t),f=g==fae||g==s4e;if(J8e(t))return L8e(t,a);if(g==hae||g==gae||f&&!n){if(o=l||f?{}:Y8e(t),!a)return l?O8e(t,N8e(o,t)):M8e(t,F8e(o,t))}else{if(!rr[g])return n?t:{};o=j8e(t,g,a)}}s||(s=new P8e);var h=s.get(t);if(h)return h;s.set(t,o),V8e(t)?t.forEach(function(m){o.add(j0(m,e,r,m,t,s))}):W8e(t)&&t.forEach(function(m,I){o.set(I,j0(m,e,r,I,t,s))});var p=c?l?U8e:K8e:l?X8e:_8e,d=u?void 0:p(t);return D8e(d||t,function(m,I){d&&(I=m,m=t[I]),R8e(o,I,j0(m,e,r,I,t,s))}),o}uae.exports=j0});var qN=E((pEt,dae)=>{var Q4e=pae(),b4e=1,v4e=4;function S4e(t){return Q4e(t,b4e|v4e)}dae.exports=S4e});var mae=E((dEt,Cae)=>{var x4e=tF();function k4e(t,e,r){return t==null?t:x4e(t,e,r)}Cae.exports=k4e});var Qae=E((wEt,Bae)=>{function P4e(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}Bae.exports=P4e});var vae=E((BEt,bae)=>{var D4e=xd(),R4e=zP();function F4e(t,e){return e.length<2?t:D4e(t,R4e(e,0,-1))}bae.exports=F4e});var xae=E((QEt,Sae)=>{var N4e=Gg(),L4e=Qae(),T4e=vae(),M4e=Sc();function O4e(t,e){return e=N4e(e,t),t=T4e(t,e),t==null||delete t[M4e(L4e(e))]}Sae.exports=O4e});var Pae=E((bEt,kae)=>{var K4e=xae();function U4e(t,e){return t==null?!0:K4e(t,e)}kae.exports=U4e});var Kae=E((tIt,Oae)=>{Oae.exports={name:"@yarnpkg/cli",version:"3.1.1",license:"BSD-2-Clause",main:"./sources/index.ts",dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"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/shell":"workspace:^",chalk:"^3.0.0","ci-info":"^3.2.0",clipanion:"^3.0.1",semver:"^7.1.2",tslib:"^1.13.0",typanion:"^3.3.0",yup:"^0.32.9"},devDependencies:{"@types/semver":"^7.1.0","@types/yup":"^0","@yarnpkg/builder":"workspace:^","@yarnpkg/monorepo":"workspace:^","@yarnpkg/pnpify":"workspace:^",micromatch:"^4.0.2",typescript:"^4.5.2"},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",types:"./lib/index.d.ts",bin:null},files:["/lib/**/*","!/lib/pluginConfiguration.*","!/lib/cli.*"],"@yarnpkg/builder":{bundles:{standard:["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@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"]}},repository:{type:"git",url:"ssh://git@github.com/yarnpkg/berry.git",directory:"packages/yarnpkg-cli"},engines:{node:">=12 <14 || 14.2 - 14.9 || >14.10.0"}}});var iL=E((SBt,QAe)=>{"use strict";QAe.exports=function(e,r){r===!0&&(r=0);var i=e.indexOf("://"),n=e.substring(0,i).split("+").filter(Boolean);return typeof r=="number"?n[r]:n}});var nL=E((xBt,bAe)=>{"use strict";var sze=iL();function vAe(t){if(Array.isArray(t))return t.indexOf("ssh")!==-1||t.indexOf("rsync")!==-1;if(typeof t!="string")return!1;var e=sze(t);return t=t.substring(t.indexOf("://")+3),vAe(e)?!0:t.indexOf("@"){"use strict";var oze=iL(),aze=nL(),Aze=require("querystring");function lze(t){t=(t||"").trim();var e={protocols:oze(t),protocol:null,port:null,resource:"",user:"",pathname:"",hash:"",search:"",href:t,query:Object.create(null)},r=t.indexOf("://"),i=-1,n=null,s=null;t.startsWith(".")&&(t.startsWith("./")&&(t=t.substring(2)),e.pathname=t,e.protocol="file");var o=t.charAt(1);return e.protocol||(e.protocol=e.protocols[0],e.protocol||(aze(t)?e.protocol="ssh":((o==="/"||o==="~")&&(t=t.substring(2)),e.protocol="file"))),r!==-1&&(t=t.substring(r+3)),s=t.split("/"),e.protocol!=="file"?e.resource=s.shift():e.resource="",n=e.resource.split("@"),n.length===2&&(e.user=n[0],e.resource=n[1]),n=e.resource.split(":"),n.length===2&&(e.resource=n[0],n[1]?(e.port=Number(n[1]),isNaN(e.port)&&(e.port=null,s.unshift(n[1]))):e.port=null),s=s.filter(Boolean),e.protocol==="file"?e.pathname=e.href:e.pathname=e.pathname||(e.protocol!=="file"||e.href[0]==="/"?"/":"")+s.join("/"),n=e.pathname.split("#"),n.length===2&&(e.pathname=n[0],e.hash=n[1]),n=e.pathname.split("?"),n.length===2&&(e.pathname=n[0],e.search=n[1]),e.query=Aze.parse(e.search),e.href=e.href.replace(/\/$/,""),e.pathname=e.pathname.replace(/\/$/,""),e}SAe.exports=lze});var DAe=E((PBt,kAe)=>{"use strict";var cze=typeof URL=="undefined"?require("url").URL:URL,PAe=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t);kAe.exports=(t,e)=>{e=Object.assign({defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripHash:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0},e),Reflect.has(e,"normalizeHttps")&&(e.forceHttp=e.normalizeHttps),Reflect.has(e,"normalizeHttp")&&(e.forceHttps=e.normalizeHttp),Reflect.has(e,"stripFragment")&&(e.stripHash=e.stripFragment),t=t.trim();let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let n=new cze(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&n.protocol==="https:"&&(n.protocol="http:"),e.forceHttps&&n.protocol==="http:"&&(n.protocol="https:"),e.stripHash&&(n.hash=""),n.pathname&&(n.pathname=n.pathname.replace(/((?![https?:]).)\/{2,}/g,(s,o)=>/^(?!\/)/g.test(o)?`${o}/`:"/")),n.pathname&&(n.pathname=decodeURI(n.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let s=n.pathname.split("/"),o=s[s.length-1];PAe(o,e.removeDirectoryIndex)&&(s=s.slice(0,s.length-1),n.pathname=s.slice(1).join("/")+"/")}if(n.hostname&&(n.hostname=n.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z\.]{2,5})$/.test(n.hostname)&&(n.hostname=n.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let s of[...n.searchParams.keys()])PAe(s,e.removeQueryParameters)&&n.searchParams.delete(s);return e.sortQueryParameters&&n.searchParams.sort(),t=n.toString(),(e.removeTrailingSlash||n.pathname==="/")&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),t}});var FAe=E((DBt,RAe)=>{"use strict";var uze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gze=xAe(),fze=DAe();function hze(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof t!="string"||!t.trim())throw new Error("Invalid url.");e&&((typeof e=="undefined"?"undefined":uze(e))!=="object"&&(e={stripFragment:!1}),t=fze(t,e));var r=gze(t);return r}RAe.exports=hze});var TAe=E((RBt,NAe)=>{"use strict";var pze=FAe(),LAe=nL();function dze(t){var e=pze(t);e.token="";var r=e.user.split(":");return r.length===2&&(r[1]==="x-oauth-basic"?e.token=r[0]:r[0]==="x-token-auth"&&(e.token=r[1])),LAe(e.protocols)||LAe(t)?e.protocol="ssh":e.protocols.length?e.protocol=e.protocols[0]:e.protocol="file",e.href=e.href.replace(/\/$/,""),e}NAe.exports=dze});var OAe=E((FBt,MAe)=>{"use strict";var Cze=TAe();function sL(t){if(typeof t!="string")throw new Error("The url must be a string.");var e=Cze(t),r=e.resource.split("."),i=null;switch(e.toString=function(l){return sL.stringify(this,l)},e.source=r.length>2?r.slice(1-r.length).join("."):e.source=e.resource,e.git_suffix=/\.git$/.test(e.pathname),e.name=decodeURIComponent(e.pathname.replace(/^\//,"").replace(/\.git$/,"")),e.owner=decodeURIComponent(e.user),e.source){case"git.cloudforge.com":e.owner=e.user,e.organization=r[0],e.source="cloudforge.com";break;case"visualstudio.com":if(e.resource==="vs-ssh.visualstudio.com"){i=e.name.split("/"),i.length===4&&(e.organization=i[1],e.owner=i[2],e.name=i[3],e.full_name=i[2]+"/"+i[3]);break}else{i=e.name.split("/"),i.length===2?(e.owner=i[1],e.name=i[1],e.full_name="_git/"+e.name):i.length===3?(e.name=i[2],i[0]==="DefaultCollection"?(e.owner=i[2],e.organization=i[0],e.full_name=e.organization+"/_git/"+e.name):(e.owner=i[0],e.full_name=e.owner+"/_git/"+e.name)):i.length===4&&(e.organization=i[0],e.owner=i[1],e.name=i[3],e.full_name=e.organization+"/"+e.owner+"/_git/"+e.name);break}case"dev.azure.com":case"azure.com":if(e.resource==="ssh.dev.azure.com"){i=e.name.split("/"),i.length===4&&(e.organization=i[1],e.owner=i[2],e.name=i[3]);break}else{i=e.name.split("/"),i.length===5?(e.organization=i[0],e.owner=i[1],e.name=i[4],e.full_name="_git/"+e.name):i.length===3?(e.name=i[2],i[0]==="DefaultCollection"?(e.owner=i[2],e.organization=i[0],e.full_name=e.organization+"/_git/"+e.name):(e.owner=i[0],e.full_name=e.owner+"/_git/"+e.name)):i.length===4&&(e.organization=i[0],e.owner=i[1],e.name=i[3],e.full_name=e.organization+"/"+e.owner+"/_git/"+e.name);break}default:i=e.name.split("/");var n=i.length-1;if(i.length>=2){var s=i.indexOf("blob",2),o=i.indexOf("tree",2),a=i.indexOf("commit",2);n=s>0?s-1:o>0?o-1:a>0?a-1:n,e.owner=i.slice(0,n).join("/"),e.name=i[n],a&&(e.commit=i[n+2])}e.ref="",e.filepathtype="",e.filepath="",i.length>n+2&&["blob","tree"].indexOf(i[n+1])>=0&&(e.filepathtype=i[n+1],e.ref=i[n+2],i.length>n+3&&(e.filepath=i.slice(n+3).join("/"))),e.organization=e.owner;break}return e.full_name||(e.full_name=e.owner,e.name&&(e.full_name&&(e.full_name+="/"),e.full_name+=e.name)),e}sL.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join("+"):t.protocol);var r=t.port?":"+t.port:"",i=t.user||"git",n=t.git_suffix?".git":"";switch(e){case"ssh":return r?"ssh://"+i+"@"+t.resource+r+"/"+t.full_name+n:i+"@"+t.resource+":"+t.full_name+n;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return e+"://"+i+"@"+t.resource+r+"/"+t.full_name+n;case"http":case"https":var s=t.token?mze(t):t.user&&(t.protocols.includes("http")||t.protocols.includes("https"))?t.user+"@":"";return e+"://"+s+t.resource+r+"/"+t.full_name+n;default:return t.href}};function mze(t){switch(t.source){case"bitbucket.org":return"x-token-auth:"+t.token+"@";default:return t.token+"@"}}MAe.exports=sL});var NL=E((Obt,ole)=>{var Mze=jg(),Oze=Kg();function Kze(t,e,r){(r!==void 0&&!Oze(t[e],r)||r===void 0&&!(e in t))&&Mze(t,e,r)}ole.exports=Kze});var Ale=E((Kbt,ale)=>{var Uze=Hd(),Hze=Qo();function Gze(t){return Hze(t)&&Uze(t)}ale.exports=Gze});var ule=E((Ubt,lle)=>{var jze=Ac(),Yze=H0(),qze=Qo(),Jze="[object Object]",Wze=Function.prototype,zze=Object.prototype,cle=Wze.toString,Vze=zze.hasOwnProperty,_ze=cle.call(Object);function Xze(t){if(!qze(t)||jze(t)!=Jze)return!1;var e=Yze(t);if(e===null)return!0;var r=Vze.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&cle.call(r)==_ze}lle.exports=Xze});var LL=E((Hbt,gle)=>{function Zze(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}gle.exports=Zze});var hle=E((Gbt,fle)=>{var $ze=Af(),e5e=lf();function t5e(t){return $ze(t,e5e(t))}fle.exports=t5e});var Ile=E((jbt,ple)=>{var dle=NL(),r5e=UN(),i5e=jN(),n5e=HN(),s5e=YN(),Cle=Pd(),mle=As(),o5e=Ale(),a5e=Od(),A5e=zB(),l5e=Gs(),c5e=ule(),u5e=c0(),Ele=LL(),g5e=hle();function f5e(t,e,r,i,n,s,o){var a=Ele(t,r),l=Ele(e,r),c=o.get(l);if(c){dle(t,r,c);return}var u=s?s(a,l,r+"",t,e,o):void 0,g=u===void 0;if(g){var f=mle(l),h=!f&&a5e(l),p=!f&&!h&&u5e(l);u=l,f||h||p?mle(a)?u=a:o5e(a)?u=n5e(a):h?(g=!1,u=r5e(l,!0)):p?(g=!1,u=i5e(l,!0)):u=[]:c5e(l)||Cle(l)?(u=a,Cle(a)?u=g5e(a):(!l5e(a)||A5e(a))&&(u=s5e(l))):g=!1}g&&(o.set(l,u),n(u,l,i,s,o),o.delete(l)),dle(t,r,u)}ple.exports=f5e});var Ble=E((Ybt,yle)=>{var h5e=Gd(),p5e=NL(),d5e=BF(),C5e=Ile(),m5e=Gs(),E5e=lf(),I5e=LL();function wle(t,e,r,i,n){t!==e&&d5e(e,function(s,o){if(n||(n=new h5e),m5e(s))C5e(t,e,o,r,wle,i,n);else{var a=i?i(I5e(t,o),s,o+"",t,e,n):void 0;a===void 0&&(a=s),p5e(t,o,a)}},E5e)}yle.exports=wle});var ble=E((qbt,Qle)=>{var y5e=e0(),w5e=nF(),B5e=sF();function Q5e(t,e){return B5e(w5e(t,e,y5e),t+"")}Qle.exports=Q5e});var Sle=E((Jbt,vle)=>{var b5e=Kg(),v5e=Hd(),S5e=kd(),x5e=Gs();function k5e(t,e,r){if(!x5e(r))return!1;var i=typeof e;return(i=="number"?v5e(r)&&S5e(e,r.length):i=="string"&&e in r)?b5e(r[e],t):!1}vle.exports=k5e});var kle=E((Wbt,xle)=>{var P5e=ble(),D5e=Sle();function R5e(t){return P5e(function(e,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(n--,s):void 0,o&&D5e(r[0],r[1],o)&&(s=n<3?void 0:s,n=1),e=Object(e);++i{var F5e=Ble(),N5e=kle(),L5e=N5e(function(t,e,r){F5e(t,e,r)});Ple.exports=L5e});var Wle=E(($vt,Jle)=>{var VL;Jle.exports=()=>(typeof VL=="undefined"&&(VL=require("zlib").brotliDecompressSync(Buffer.from("WxSteIBtDGp/1Rsko1+37VeQEmWILAWus2NIX9GQfXTamdxQ3DAVQZm/czI4dZrL7m2taiqoqpqbVIbMBngCLTBU/Z3f9icopIlQyRwSW0LmAd1xJBp0KShTakLvhLqFls9ECISbkeazt+a3Oz6WDcIQ0rgyHJrpCa+V4cmVQ2z4oM2JfN4j+7vMT96CNwkkkPaSsvdW3AmkfVxAApnLX5aOBjpOc3P7TNjG17v+MIABlUDmOqzCLLLbv11H5fHeze26jjOpgJE6N40WFR11m5pRVZE27TUgwrj1KxBDRB2mWGZPkat662N5RXbtr37ttfl5OkO+WOsjtp6CdnBKLX6mPgUXYbPeQnK4HXKv21cNTTU/x/thkJk1y4lIlXAEX2X5tnKBomsuEuC/3L/Kl6Djv67fzqYtzB3ZIfxZGZV/UVGEKpxXKOofHL63VOt0JTRRECeeZkOI2lsusUvit9l8Rgd4KcD+a6reezk9CohA64NZQ9UjO9Y2F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dvFhQaP9qMIp2oFdWalk5gL4+m91OP1Kb2yg8kdmqj59aWw8Ecg+rGnS4Jm6SyswobqNOwiI8l3JiwHeUldFRrJJmeeIsj1bOp60lbwGFo+G7mcxq4uxrMuTNIE4D9wxL+XqS1PjqwUH0Sl53JwLb53lflHwWW+UifWrwfAEWJk/TdOnxk3oO3S2uxHIFovxx5nNGnBqITh3xcuEvLz+9FJbwlRKwz2kasmk/Q1bOYL7yOheR14xB4Hrj/o24KyTaT2oTB/zvNN+kBS0c0az5+Dwc3QqW8kb/v/g494aJXZU+ikv4Bt/efbwreM5DURtjLGLuPh8Mr8Y/pukoIvINsj+o6xGobt3MCJ1CMpFYvaQfEUCkAHHdKG2naXUQ91xouSsiGQmrb9bxYFfwcQ6iCxx+IwM7dlGHgZnhxtXr4z3Lga/x7zBJquMwXS4wdx4HswKGpHqPPvG0RYhMrOUfs6U/riWRF8MO21wqvGKSO1Xkk08HfxaQb9B69clyEorTUG1uyyVBfsRqmltf4CCwx/TYvXe/zB3P9aIr6dyzXufkNPl4Uc/XdUDjrCywVM9Nn0Zn9VNZu+89x71cA+cgC1yXlCZremcn+D9wJZz+4v3j3/9KEqul87dklTfICvP4J/tkKSYAkp6S2/qidd8o1EXNSraYXIZ+UN9HAMg9ezqYizSLSrkVKC4HZ+JfExqOVGA7xLxxd97aN4YoNmCpcmk2o3CPoNTbJl6HSQHJaIVhyMGBVSGTANcrmCfvo754uZcA+lavfki67M584Fn1L5bcwncusGNdCe2OqVzreua1K0pRsJ3z8W5aOrhR7Ra+7qEXhdAw=","base64")).toString()),VL)});var $le=E(XL=>{function pf(t,e){if(typeof t=="string")return t;if(t){let r,i;if(Array.isArray(t)){for(r=0;r0)return(f=pf(n[g],u))?f.replace("*",c.substring(g.length-1)):Gc(i,c,1)}return Gc(i,c)}}function l6e(t,e={}){let r=0,i,n=e.browser,s=e.fields||["module","main"];for(n&&!s.includes("browser")&&s.unshift("browser");r{var eT;nce.exports=()=>(typeof eT=="undefined"&&(eT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3qVVJ9anKKqokl94u/gvCpDMtwqH61i1g/zIK7qtZEzOYKjaiktuVO40kvz0vWoM3YaQm79KqmRf1q/BNHghpvQCDCJ4iz1ak/K/ks+edjG5ipd81BCGdq5QJLHvrJZK2WYvhOoiYKXnolnv1UN5++EqZpRXJCKPLrVMFKpl5hB6b0je+Oms3eSFyxbAOE3pIjqCg6UvCi/QVKYVv8YZ0RABb9rmNFmEOr7t1Fk11d24+zCS9gc5CVTclE909oExrTXHhBS0x3CP4TJ59GTvih5K5coxfcUy58EzjWFkWMDfdSjlq59pFEU7iIpD7HbtgufaEpv5we7xKwhb3XC5SbMkm5FcW2oLW5RobgTRFrsy1KawVNedhCvjvvp5cjw73QRgOlteW15dWl9e9oIMOi3dxzqO60K7MyX6eMo3Odhn2NUyd/Q8Bap7MljyFWW7ksXB/jSGuAVHarS0CEQRKhDC7oPaqzCFfpsdCy0pV+8HcxINa7qGHHyoyq8v7VrX0YQqg8iaeZl8sGD2r0TEr+1Wj4x0bmZ6WUHSr2bx3/PGu5d/zsmmxKglKna2lnstwta3+nqyEhQZBe4QKV+1KkZp5HS1l75WuhJZuvd9bmt6KHrwf2f7kE8iR8s+oImRLwXVi6Fum4EeYQb9lUh8LyKgqe9A/FpksPVbqXYPY7G3ansEqdF3IClEzzIKkmQubjcGQlnUTOq9KF1u98uogWAaJ3eBDErzN3rzz0Y5UGZggNlcV6uBKsdqrl1VeAq04LUyMnCENsPVETgA=","base64")).toString()),eT)});var gce=E((aT,AT)=>{(function(t){aT&&typeof aT=="object"&&typeof AT!="undefined"?AT.exports=t():typeof define=="function"&&define.amd?define([],t):typeof window!="undefined"?window.isWindows=t():typeof global!="undefined"?global.isWindows=t():typeof self!="undefined"?self.isWindows=t():this.isWindows=t()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var dce=E((Dxt,fce)=>{"use strict";lT.ifExists=E6e;var mf=require("util"),Es=require("path"),hce=gce(),I6e=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,y6e={createPwshFile:!0,createCmdFile:hce(),fs:require("fs")},w6e=new Map([[".js","node"],[".cjs","node"],[".mjs","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function pce(t){let e=P(P({},y6e),t),r=e.fs;return e.fs_={chmod:r.chmod?mf.promisify(r.chmod):async()=>{},mkdir:mf.promisify(r.mkdir),readFile:mf.promisify(r.readFile),stat:mf.promisify(r.stat),unlink:mf.promisify(r.unlink),writeFile:mf.promisify(r.writeFile)},e}async function lT(t,e,r){let i=pce(r);await i.fs_.stat(t),await B6e(t,e,i)}function E6e(t,e,r){return lT(t,e,r).catch(()=>{})}function Q6e(t,e){return e.fs_.unlink(t).catch(()=>{})}async function B6e(t,e,r){let i=await S6e(t,r);return await b6e(e,r),v6e(t,e,i,r)}function b6e(t,e){return e.fs_.mkdir(Es.dirname(t),{recursive:!0})}function v6e(t,e,r,i){let n=pce(i),s=[{generator:P6e,extension:""}];return n.createCmdFile&&s.push({generator:k6e,extension:".cmd"}),n.createPwshFile&&s.push({generator:D6e,extension:".ps1"}),Promise.all(s.map(o=>x6e(t,e+o.extension,r,o.generator,n)))}function R6e(t,e){return Q6e(t,e)}function N6e(t,e){return F6e(t,e)}async function S6e(t,e){let n=(await e.fs_.readFile(t,"utf8")).trim().split(/\r*\n/)[0].match(I6e);if(!n){let s=Es.extname(t).toLowerCase();return{program:w6e.get(s)||null,additionalArgs:""}}return{program:n[1],additionalArgs:n[2]}}async function x6e(t,e,r,i,n){let s=n.preserveSymlinks?"--preserve-symlinks":"",o=[r.additionalArgs,s].filter(a=>a).join(" ");return n=Object.assign({},n,{prog:r.program,args:o}),await R6e(e,n),await n.fs_.writeFile(e,i(t,e,n),"utf8"),N6e(e,n)}function k6e(t,e,r){let n=Es.relative(Es.dirname(e),t).split("/").join("\\"),s=Es.isAbsolute(n)?`"${n}"`:`"%~dp0\\${n}"`,o,a=r.prog,l=r.args||"",c=cT(r.nodePath).win32;a?(o=`"%~dp0\\${a}.exe"`,n=s):(a=s,l="",n="");let u=r.progArgs?`${r.progArgs.join(" ")} `:"",g=c?`@SET NODE_PATH=${c}\r -`:"";return o?g+=`@IF EXIST ${o} (\r - ${o} ${l} ${n} ${u}%*\r -) ELSE (\r - @SETLOCAL\r - @SET PATHEXT=%PATHEXT:;.JS;=;%\r - ${a} ${l} ${n} ${u}%*\r -)\r -`:g+=`@${a} ${l} ${n} ${u}%*\r -`,g}function P6e(t,e,r){let i=Es.relative(Es.dirname(e),t),n=r.prog&&r.prog.split("\\").join("/"),s;i=i.split("\\").join("/");let o=Es.isAbsolute(i)?`"${i}"`:`"$basedir/${i}"`,a=r.args||"",l=cT(r.nodePath).posix;n?(s=`"$basedir/${r.prog}"`,i=o):(n=o,a="",i="");let c=r.progArgs?`${r.progArgs.join(" ")} `:"",u=`#!/bin/sh -basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") - -case \`uname\` in - *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; -esac - -`,g=r.nodePath?`export NODE_PATH="${l}" -`:"";return s?u+=`${g}if [ -x ${s} ]; then - exec ${s} ${a} ${i} ${c}"$@" -else - exec ${n} ${a} ${i} ${c}"$@" -fi -`:u+=`${g}${n} ${a} ${i} ${c}"$@" -exit $? -`,u}function D6e(t,e,r){let i=Es.relative(Es.dirname(e),t),n=r.prog&&r.prog.split("\\").join("/"),s=n&&`"${n}$exe"`,o;i=i.split("\\").join("/");let a=Es.isAbsolute(i)?`"${i}"`:`"$basedir/${i}"`,l=r.args||"",c=cT(r.nodePath),u=c.win32,g=c.posix;s?(o=`"$basedir/${r.prog}$exe"`,i=a):(s=a,l="",i="");let f=r.progArgs?`${r.progArgs.join(" ")} `:"",h=`#!/usr/bin/env pwsh -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent - -$exe="" -${r.nodePath?`$env_node_path=$env:NODE_PATH -$env:NODE_PATH="${u}" -`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { - # Fix case when both the Windows and Linux builds of Node - # are installed in the same directory - $exe=".exe" -}`;return r.nodePath&&(h+=` else { - $env:NODE_PATH="${g}" -}`),o?h+=` -$ret=0 -if (Test-Path ${o}) { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & ${o} ${l} ${i} ${f}$args - } else { - & ${o} ${l} ${i} ${f}$args - } - $ret=$LASTEXITCODE -} else { - # Support pipeline input - if ($MyInvocation.ExpectingInput) { - $input | & ${s} ${l} ${i} ${f}$args - } else { - & ${s} ${l} ${i} ${f}$args - } - $ret=$LASTEXITCODE -} -${r.nodePath?`$env:NODE_PATH=$env_node_path -`:""}exit $ret -`:h+=` -# Support pipeline input -if ($MyInvocation.ExpectingInput) { - $input | & ${s} ${l} ${i} ${f}$args -} else { - & ${s} ${l} ${i} ${f}$args -} -${r.nodePath?`$env:NODE_PATH=$env_node_path -`:""}exit $LASTEXITCODE -`,h}function F6e(t,e){return e.fs_.chmod(t,493)}function cT(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(Es.delimiter):Array.from(t),r={};for(let i=0;i`/mnt/${a.toLowerCase()}`):e[i];r.win32=r.win32?`${r.win32};${n}`:n,r.posix=r.posix?`${r.posix}:${s}`:s,r[i]={win32:n,posix:s}}return r}fce.exports=lT});var PT=E((fPt,Nce)=>{Nce.exports=require("stream")});var Oce=E((hPt,Lce)=>{"use strict";function Tce(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function e9e(t){for(var e=1;e0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++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 i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return iQ.alloc(0);for(var i=iQ.allocUnsafe(r>>>0),n=this.head,s=0;n;)o9e(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return ro.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=iQ.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:s9e,value:function(r,i){return DT(this,e9e({},i,{depth:0,customInspect:!1}))}}]),t}()});var FT=E((pPt,Kce)=>{"use strict";function a9e(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(RT,this,t)):process.nextTick(RT,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(nQ,r):(r._writableState.errorEmitted=!0,process.nextTick(Uce,r,s)):process.nextTick(Uce,r,s):e?(process.nextTick(nQ,r),e(s)):process.nextTick(nQ,r)}),this)}function Uce(t,e){RT(t,e),nQ(t)}function nQ(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function A9e(){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 RT(t,e){t.emit("error",e)}function l9e(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Kce.exports={destroy:a9e,undestroy:A9e,errorOrDestroy:l9e}});var VA=E((dPt,Hce)=>{"use strict";var Gce={};function Is(t,e,r){r||(r=Error);function i(s,o,a){return typeof e=="string"?e:e(s,o,a)}class n extends r{constructor(o,a,l){super(i(o,a,l))}}n.prototype.name=r.name,n.prototype.code=t,Gce[t]=n}function jce(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),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 c9e(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function u9e(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function g9e(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Is("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Is("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&c9e(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(u9e(t," argument"))n=`The ${t} ${i} ${jce(e,"type")}`;else{let s=g9e(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${jce(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Is("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Is("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Is("ERR_STREAM_PREMATURE_CLOSE","Premature close");Is("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Is("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Is("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Is("ERR_STREAM_WRITE_AFTER_END","write after end");Is("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Is("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Is("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Hce.exports.codes=Gce});var NT=E((CPt,Yce)=>{"use strict";var f9e=VA().codes.ERR_INVALID_OPT_VALUE;function h9e(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function p9e(t,e,r,i){var n=h9e(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new f9e(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Yce.exports={getHighWaterMark:p9e}});var qce=E((mPt,LT)=>{typeof Object.create=="function"?LT.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:LT.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var _A=E((EPt,TT)=>{try{if(MT=require("util"),typeof MT.inherits!="function")throw"";TT.exports=MT.inherits}catch(t){TT.exports=qce()}var MT});var Wce=E((IPt,Jce)=>{Jce.exports=require("util").deprecate});var UT=E((yPt,zce)=>{"use strict";zce.exports=Sr;function Vce(t){var e=this;this.next=null,this.entry=null,this.finish=function(){d9e(e,t)}}var If;Sr.WritableState=em;var C9e={deprecate:Wce()},_ce=PT(),sQ=require("buffer").Buffer,m9e=global.Uint8Array||function(){};function E9e(t){return sQ.from(t)}function I9e(t){return sQ.isBuffer(t)||t instanceof m9e}var OT=FT(),y9e=NT(),w9e=y9e.getHighWaterMark,XA=VA().codes,B9e=XA.ERR_INVALID_ARG_TYPE,Q9e=XA.ERR_METHOD_NOT_IMPLEMENTED,b9e=XA.ERR_MULTIPLE_CALLBACK,v9e=XA.ERR_STREAM_CANNOT_PIPE,S9e=XA.ERR_STREAM_DESTROYED,x9e=XA.ERR_STREAM_NULL_VALUES,k9e=XA.ERR_STREAM_WRITE_AFTER_END,P9e=XA.ERR_UNKNOWN_ENCODING,yf=OT.errorOrDestroy;_A()(Sr,_ce);function D9e(){}function em(t,e,r){If=If||Yc(),t=t||{},typeof r!="boolean"&&(r=e instanceof If),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=w9e(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){R9e(e,n)},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 Vce(this)}em.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(em.prototype,"buffer",{get:C9e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}})();var oQ;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(oQ=Function.prototype[Symbol.hasInstance],Object.defineProperty(Sr,Symbol.hasInstance,{value:function(e){return oQ.call(this,e)?!0:this!==Sr?!1:e&&e._writableState instanceof em}})):oQ=function(e){return e instanceof this};function Sr(t){If=If||Yc();var e=this instanceof If;if(!e&&!oQ.call(Sr,this))return new Sr(t);this._writableState=new em(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)),_ce.call(this)}Sr.prototype.pipe=function(){yf(this,new v9e)};function F9e(t,e){var r=new k9e;yf(t,r),process.nextTick(e,r)}function N9e(t,e,r,i){var n;return r===null?n=new x9e:typeof r!="string"&&!e.objectMode&&(n=new B9e("chunk",["string","Buffer"],r)),n?(yf(t,n),process.nextTick(i,n),!1):!0}Sr.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&I9e(t);return s&&!sQ.isBuffer(t)&&(t=E9e(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=D9e),i.ending?F9e(this,r):(s||N9e(this,i,t,r))&&(i.pendingcb++,n=L9e(this,i,s,t,e,r)),n};Sr.prototype.cork=function(){this._writableState.corked++};Sr.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Xce(this,t))};Sr.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 P9e(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Sr.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function T9e(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=sQ.from(e,r)),e}Object.defineProperty(Sr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L9e(t,e,r,i,n,s){if(!r){var o=T9e(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var a=e.objectMode?1:i.length;e.length+=a;var l=e.length{"use strict";var j9e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};eue.exports=Mo;var tue=HT(),GT=UT();_A()(Mo,tue);for(jT=j9e(GT.prototype),aQ=0;aQ{var lQ=require("buffer"),qa=lQ.Buffer;function iue(t,e){for(var r in t)e[r]=t[r]}qa.from&&qa.alloc&&qa.allocUnsafe&&qa.allocUnsafeSlow?rue.exports=lQ:(iue(lQ,YT),YT.Buffer=wf);function wf(t,e,r){return qa(t,e,r)}iue(qa,wf);wf.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return qa(t,e,r)};wf.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=qa(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};wf.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return qa(t)};wf.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return lQ.SlowBuffer(t)}});var WT=E(sue=>{"use strict";var qT=nue().Buffer,oue=qT.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 J9e(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 W9e(t){var e=J9e(t);if(typeof e!="string"&&(qT.isEncoding===oue||!oue(t)))throw new Error("Unknown encoding: "+t);return e||t}sue.StringDecoder=rm;function rm(t){this.encoding=W9e(t);var e;switch(this.encoding){case"utf16le":this.text=V9e,this.end=_9e,e=4;break;case"utf8":this.fillLast=z9e,e=4;break;case"base64":this.text=X9e,this.end=Z9e,e=3;break;default:this.write=$9e,this.end=eVe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=qT.allocUnsafe(e)}rm.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>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function iVe(t,e,r){var i=e.length-1;if(i=0?(n>0&&(t.lastNeed=n-1),n):--i=0?(n>0&&(t.lastNeed=n-2),n):--i=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function nVe(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 z9e(t){var e=this.lastTotal-this.lastNeed,r=nVe(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 rVe(t,e){var r=iVe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function tVe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function V9e(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=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 _9e(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 X9e(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 Z9e(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function $9e(t){return t.toString(this.encoding)}function eVe(t){return t&&t.length?this.write(t):""}});var cQ=E((QPt,aue)=>{"use strict";var Aue=VA().codes.ERR_STREAM_PREMATURE_CLOSE;function sVe(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n{"use strict";var uQ;function ZA(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var AVe=cQ(),$A=Symbol("lastResolve"),qc=Symbol("lastReject"),im=Symbol("error"),gQ=Symbol("ended"),Jc=Symbol("lastPromise"),zT=Symbol("handlePromise"),Wc=Symbol("stream");function el(t,e){return{value:t,done:e}}function lVe(t){var e=t[$A];if(e!==null){var r=t[Wc].read();r!==null&&(t[Jc]=null,t[$A]=null,t[qc]=null,e(el(r,!1)))}}function cVe(t){process.nextTick(lVe,t)}function uVe(t,e){return function(r,i){t.then(function(){if(e[gQ]){r(el(void 0,!0));return}e[zT](r,i)},i)}}var gVe=Object.getPrototypeOf(function(){}),fVe=Object.setPrototypeOf((uQ={get stream(){return this[Wc]},next:function(){var e=this,r=this[im];if(r!==null)return Promise.reject(r);if(this[gQ])return Promise.resolve(el(void 0,!0));if(this[Wc].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[im]?a(e[im]):o(el(void 0,!0))})});var i=this[Jc],n;if(i)n=new Promise(uVe(i,this));else{var s=this[Wc].read();if(s!==null)return Promise.resolve(el(s,!1));n=new Promise(this[zT])}return this[Jc]=n,n}},ZA(uQ,Symbol.asyncIterator,function(){return this}),ZA(uQ,"return",function(){var e=this;return new Promise(function(r,i){e[Wc].destroy(null,function(n){if(n){i(n);return}r(el(void 0,!0))})})}),uQ),gVe),hVe=function(e){var r,i=Object.create(fVe,(r={},ZA(r,Wc,{value:e,writable:!0}),ZA(r,$A,{value:null,writable:!0}),ZA(r,qc,{value:null,writable:!0}),ZA(r,im,{value:null,writable:!0}),ZA(r,gQ,{value:e._readableState.endEmitted,writable:!0}),ZA(r,zT,{value:function(s,o){var a=i[Wc].read();a?(i[Jc]=null,i[$A]=null,i[qc]=null,s(el(a,!1))):(i[$A]=s,i[qc]=o)},writable:!0}),r));return i[Jc]=null,AVe(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[qc];s!==null&&(i[Jc]=null,i[$A]=null,i[qc]=null,s(n)),i[im]=n;return}var o=i[$A];o!==null&&(i[Jc]=null,i[$A]=null,i[qc]=null,o(el(void 0,!0))),i[gQ]=!0}),e.on("readable",cVe.bind(null,i)),i};cue.exports=hVe});var pue=E((vPt,gue)=>{"use strict";function fue(t,e,r,i,n,s,o){try{var a=t[s](o),l=a.value}catch(c){r(c);return}a.done?e(l):Promise.resolve(l).then(i,n)}function pVe(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){fue(s,i,n,o,a,"next",l)}function a(l){fue(s,i,n,o,a,"throw",l)}o(void 0)})}}function hue(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function CVe(t){for(var e=1;e{"use strict";due.exports=kt;var Bf;kt.ReadableState=Cue;var SPt=require("events").EventEmitter,mue=function(e,r){return e.listeners(r).length},nm=PT(),fQ=require("buffer").Buffer,IVe=global.Uint8Array||function(){};function yVe(t){return fQ.from(t)}function wVe(t){return fQ.isBuffer(t)||t instanceof IVe}var VT=require("util"),Et;VT&&VT.debuglog?Et=VT.debuglog("stream"):Et=function(){};var BVe=Oce(),_T=FT(),QVe=NT(),bVe=QVe.getHighWaterMark,hQ=VA().codes,vVe=hQ.ERR_INVALID_ARG_TYPE,SVe=hQ.ERR_STREAM_PUSH_AFTER_EOF,xVe=hQ.ERR_METHOD_NOT_IMPLEMENTED,kVe=hQ.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Qf,XT,ZT;_A()(kt,nm);var sm=_T.errorOrDestroy,$T=["error","close","destroy","pause","resume"];function PVe(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 Cue(t,e,r){Bf=Bf||Yc(),t=t||{},typeof r!="boolean"&&(r=e instanceof Bf),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=bVe(this,t,"readableHighWaterMark",r),this.buffer=new BVe,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&&(Qf||(Qf=WT().StringDecoder),this.decoder=new Qf(t.encoding),this.encoding=t.encoding)}function kt(t){if(Bf=Bf||Yc(),!(this instanceof kt))return new kt(t);var e=this instanceof Bf;this._readableState=new Cue(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),nm.call(this)}Object.defineProperty(kt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});kt.prototype.destroy=_T.destroy;kt.prototype._undestroy=_T.undestroy;kt.prototype._destroy=function(t,e){e(t)};kt.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=fQ.from(t,e),e=""),i=!0),Eue(this,t,e,!1,i)};kt.prototype.unshift=function(t){return Eue(this,t,null,!0,!1)};function Eue(t,e,r,i,n){Et("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,RVe(t,s);else{var o;if(n||(o=DVe(s,e)),o)sm(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==fQ.prototype&&(e=yVe(e)),i)s.endEmitted?sm(t,new kVe):eM(t,s,e,!0);else if(s.ended)sm(t,new SVe);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?eM(t,s,e,!1):tM(t,s)):eM(t,s,e,!1)}else i||(s.reading=!1,tM(t,s))}return!s.ended&&(s.length=Iue?t=Iue:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function yue(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=FVe(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}kt.prototype.read=function(t){Et("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 Et("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?rM(this):pQ(this),null;if(t=yue(t,e),t===0&&e.ended)return e.length===0&&rM(this),null;var i=e.needReadable;Et("need readable",i),(e.length===0||e.length-t0?n=wue(t,e):n=null,n===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&&rM(this)),n!==null&&this.emit("data",n),n};function RVe(t,e){if(Et("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?pQ(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Bue(t)))}}function pQ(t){var e=t._readableState;Et("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Et("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Bue,t))}function Bue(t){var e=t._readableState;Et("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,iM(t)}function tM(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(NVe,t,e))}function NVe(t,e){for(;!e.reading&&!e.ended&&(e.length1&&Que(i.pipes,t)!==-1)&&!c&&(Et("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function f(m){Et("onerror",m),d(),t.removeListener("error",f),mue(t,"error")===0&&sm(t,m)}PVe(t,"error",f);function h(){t.removeListener("finish",p),d()}t.once("close",h);function p(){Et("onfinish"),t.removeListener("close",h),d()}t.once("finish",p);function d(){Et("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Et("pipe resume"),r.resume()),t};function LVe(t){return function(){var r=t._readableState;Et("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&mue(t,"data")&&(r.flowing=!0,iM(t))}}kt.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 i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Et("on readable",i.length,i.reading),i.length?pQ(this):i.reading||process.nextTick(TVe,this)),r};kt.prototype.addListener=kt.prototype.on;kt.prototype.removeListener=function(t,e){var r=nm.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(bue,this),r};kt.prototype.removeAllListeners=function(t){var e=nm.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(bue,this),e};function bue(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 TVe(t){Et("readable nexttick read 0"),t.read(0)}kt.prototype.resume=function(){var t=this._readableState;return t.flowing||(Et("resume"),t.flowing=!t.readableListening,MVe(this,t)),t.paused=!1,this};function MVe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(OVe,t,e))}function OVe(t,e){Et("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),iM(t),e.flowing&&!e.reading&&t.read(0)}kt.prototype.pause=function(){return Et("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Et("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function iM(t){var e=t._readableState;for(Et("flow",e.flowing);e.flowing&&t.read()!==null;);}kt.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Et("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(Et("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(a){return function(){return t[a].apply(t,arguments)}}(n));for(var s=0;s<$T.length;s++)t.on($T[s],this.emit.bind(this,$T[s]));return this._read=function(o){Et("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(kt.prototype[Symbol.asyncIterator]=function(){return XT===void 0&&(XT=uue()),XT(this)});Object.defineProperty(kt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(kt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(kt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});kt._fromList=wue;Object.defineProperty(kt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function wue(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 rM(t){var e=t._readableState;Et("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(KVe,e,t))}function KVe(t,e){if(Et("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"&&(kt.from=function(t,e){return ZT===void 0&&(ZT=pue()),ZT(kt,t,e)});function Que(t,e){for(var r=0,i=t.length;r{"use strict";vue.exports=Ja;var dQ=VA().codes,UVe=dQ.ERR_METHOD_NOT_IMPLEMENTED,HVe=dQ.ERR_MULTIPLE_CALLBACK,GVe=dQ.ERR_TRANSFORM_ALREADY_TRANSFORMING,jVe=dQ.ERR_TRANSFORM_WITH_LENGTH_0,CQ=Yc();_A()(Ja,CQ);function YVe(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new HVe);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length{"use strict";xue.exports=om;var kue=nM();_A()(om,kue);function om(t){if(!(this instanceof om))return new om(t);kue.call(this,t)}om.prototype._transform=function(t,e,r){r(null,t)}});var Lue=E((DPt,Due)=>{"use strict";var sM;function JVe(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Rue=VA().codes,WVe=Rue.ERR_MISSING_ARGS,zVe=Rue.ERR_STREAM_DESTROYED;function Fue(t){if(t)throw t}function VVe(t){return t.setHeader&&typeof t.abort=="function"}function _Ve(t,e,r,i){i=JVe(i);var n=!1;t.on("close",function(){n=!0}),sM===void 0&&(sM=cQ()),sM(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,VVe(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new zVe("pipe"))}}}function Nue(t){t()}function XVe(t,e){return t.pipe(e)}function ZVe(t){return!t.length||typeof t[t.length-1]!="function"?Fue:t.pop()}function $Ve(){for(var t=arguments.length,e=new Array(t),r=0;r0;return _Ve(o,l,c,function(u){n||(n=u),u&&s.forEach(Nue),!l&&(s.forEach(Nue),i(n))})});return e.reduce(XVe)}Due.exports=$Ve});var bf=E((ys,am)=>{var Am=require("stream");process.env.READABLE_STREAM==="disable"&&Am?(am.exports=Am.Readable,Object.assign(am.exports,Am),am.exports.Stream=Am):(ys=am.exports=HT(),ys.Stream=Am||ys,ys.Readable=ys,ys.Writable=UT(),ys.Duplex=Yc(),ys.Transform=nM(),ys.PassThrough=Pue(),ys.finished=cQ(),ys.pipeline=Lue())});var Oue=E((RPt,Tue)=>{"use strict";var{Buffer:_s}=require("buffer"),Mue=Symbol.for("BufferList");function nr(t){if(!(this instanceof nr))return new nr(t);nr._init.call(this,t)}nr._init=function(e){Object.defineProperty(this,Mue,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};nr.prototype._new=function(e){return new nr(e)};nr.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let i=0;ithis.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};nr.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)};nr.prototype.copy=function(e,r,i,n){if((typeof i!="number"||i<0)&&(i=0),(typeof n!="number"||n>this.length)&&(n=this.length),i>=this.length||n<=0)return e||_s.alloc(0);let s=!!e,o=this._offset(i),a=n-i,l=a,c=s&&r||0,u=o[1];if(i===0&&n===this.length){if(!s)return this._bufs.length===1?this._bufs[0]:_s.concat(this._bufs,this.length);for(let g=0;gf)this._bufs[g].copy(e,c,u),c+=f;else{this._bufs[g].copy(e,c,u,u+l),c+=f;break}l-=f,u&&(u=0)}return e.length>c?e.slice(0,c):e};nr.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 i=this._offset(e),n=this._offset(r),s=this._bufs.slice(i[0],n[0]+1);return n[1]===0?s.pop():s[s.length-1]=s[s.length-1].slice(0,n[1]),i[1]!==0&&(s[0]=s[0].slice(i[1])),this._new(s)};nr.prototype.toString=function(e,r,i){return this.slice(r,i).toString(e)};nr.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};nr.prototype.duplicate=function(){let e=this._new();for(let r=0;rthis.length?this.length:e;let i=this._offset(e),n=i[0],s=i[1];for(;n=t.length){let l=o.indexOf(t,s);if(l!==-1)return this._reverseOffset([n,l]);s=o.length-t.length+1}else{let l=this._reverseOffset([n,s]);if(this._match(l,t))return l;s++}s=0}return-1};nr.prototype._match=function(t,e){if(this.length-t{"use strict";var oM=bf().Duplex,e7e=_A(),lm=Oue();function Oi(t){if(!(this instanceof Oi))return new Oi(t);if(typeof t=="function"){this._callback=t;let e=function(i){this._callback&&(this._callback(i),this._callback=null)}.bind(this);this.on("pipe",function(i){i.on("error",e)}),this.on("unpipe",function(i){i.removeListener("error",e)}),t=null}lm._init.call(this,t),oM.call(this)}e7e(Oi,oM);Object.assign(Oi.prototype,lm.prototype);Oi.prototype._new=function(e){return new Oi(e)};Oi.prototype._write=function(e,r,i){this._appendBuffer(e),typeof i=="function"&&i()};Oi.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)};Oi.prototype.end=function(e){oM.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};Oi.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};Oi.prototype._isBufferList=function(e){return e instanceof Oi||e instanceof lm||Oi.isBufferList(e)};Oi.isBufferList=lm.isBufferList;mQ.exports=Oi;mQ.exports.BufferListStream=Oi;mQ.exports.BufferList=lm});var lM=E(vf=>{var t7e=Buffer.alloc,r7e="0000000000000000000",i7e="7777777777777777777",Uue="0".charCodeAt(0),Hue=Buffer.from("ustar\0","binary"),n7e=Buffer.from("00","binary"),s7e=Buffer.from("ustar ","binary"),o7e=Buffer.from(" \0","binary"),a7e=parseInt("7777",8),cm=257,aM=263,A7e=function(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},l7e=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},c7e=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},Gue=function(t,e,r,i){for(;re?i7e.slice(0,e)+" ":r7e.slice(0,e-t.length)+t+" "};function u7e(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],i=t.length-1;i>0;i--){var n=t[i];e?r.push(n):r.push(255-n)}var s=0,o=r.length;for(i=0;i=Math.pow(10,r)&&r++,e+r+t};vf.decodeLongPath=function(t,e){return Sf(t,0,t.length,e)};vf.encodePax=function(t){var e="";t.name&&(e+=AM(" path="+t.name+` -`)),t.linkname&&(e+=AM(" linkpath="+t.linkname+` -`));var r=t.pax;if(r)for(var i in r)e+=AM(" "+i+"="+r[i]+` -`);return Buffer.from(e)};vf.decodePax=function(t){for(var e={};t.length;){for(var r=0;r100;){var n=r.indexOf("/");if(n===-1)return null;i+=i?"/"+r.slice(0,n):r.slice(0,n),r=r.slice(n+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(i)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(tl(t.mode&a7e,6),100),e.write(tl(t.uid,6),108),e.write(tl(t.gid,6),116),e.write(tl(t.size,11),124),e.write(tl(t.mtime.getTime()/1e3|0,11),136),e[156]=Uue+c7e(t.type),t.linkname&&e.write(t.linkname,157),Hue.copy(e,cm),n7e.copy(e,aM),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(tl(t.devmajor||0,6),329),e.write(tl(t.devminor||0,6),337),i&&e.write(i,345),e.write(tl(jue(e),6),148),e)};vf.decode=function(t,e,r){var i=t[156]===0?0:t[156]-Uue,n=Sf(t,0,100,e),s=rl(t,100,8),o=rl(t,108,8),a=rl(t,116,8),l=rl(t,124,12),c=rl(t,136,12),u=l7e(i),g=t[157]===0?null:Sf(t,157,100,e),f=Sf(t,265,32),h=Sf(t,297,32),p=rl(t,329,8),d=rl(t,337,8),m=jue(t);if(m===8*32)return null;if(m!==rl(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(Hue.compare(t,cm,cm+6)===0)t[345]&&(n=Sf(t,345,155,e)+"/"+n);else if(!(s7e.compare(t,cm,cm+6)===0&&o7e.compare(t,aM,aM+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return i===0&&n&&n[n.length-1]==="/"&&(i=5),{name:n,mode:s,uid:o,gid:a,size:l,mtime:new Date(1e3*c),type:u,linkname:g,uname:f,gname:h,devmajor:p,devminor:d}}});var _ue=E((LPt,Yue)=>{var que=require("util"),g7e=Kue(),um=lM(),Jue=bf().Writable,Wue=bf().PassThrough,zue=function(){},Vue=function(t){return t&=511,t&&512-t},f7e=function(t,e){var r=new EQ(t,e);return r.end(),r},h7e=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},EQ=function(t,e){this._parent=t,this.offset=e,Wue.call(this,{autoDestroy:!1})};que.inherits(EQ,Wue);EQ.prototype.destroy=function(t){this._parent.destroy(t)};var Wa=function(t){if(!(this instanceof Wa))return new Wa(t);Jue.call(this,t),t=t||{},this._offset=0,this._buffer=g7e(),this._missing=0,this._partial=!1,this._onparse=zue,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,i=function(){e._continue()},n=function(f){if(e._locked=!1,f)return e.destroy(f);e._stream||i()},s=function(){e._stream=null;var f=Vue(e._header.size);f?e._parse(f,o):e._parse(512,g),e._locked||i()},o=function(){e._buffer.consume(Vue(e._header.size)),e._parse(512,g),i()},a=function(){var f=e._header.size;e._paxGlobal=um.decodePax(r.slice(0,f)),r.consume(f),s()},l=function(){var f=e._header.size;e._pax=um.decodePax(r.slice(0,f)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(f),s()},c=function(){var f=e._header.size;this._gnuLongPath=um.decodeLongPath(r.slice(0,f),t.filenameEncoding),r.consume(f),s()},u=function(){var f=e._header.size;this._gnuLongLinkPath=um.decodeLongPath(r.slice(0,f),t.filenameEncoding),r.consume(f),s()},g=function(){var f=e._offset,h;try{h=e._header=um.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(p){e.emit("error",p)}if(r.consume(512),!h){e._parse(512,g),i();return}if(h.type==="gnu-long-path"){e._parse(h.size,c),i();return}if(h.type==="gnu-long-link-path"){e._parse(h.size,u),i();return}if(h.type==="pax-global-header"){e._parse(h.size,a),i();return}if(h.type==="pax-header"){e._parse(h.size,l),i();return}if(e._gnuLongPath&&(h.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(h.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=h=h7e(h,e._pax),e._pax=null),e._locked=!0,!h.size||h.type==="directory"){e._parse(512,g),e.emit("entry",h,f7e(e,f),n);return}e._stream=new EQ(e,f),e.emit("entry",h,e._stream,n),e._parse(h.size,s),i()};this._onheader=g,this._parse(512,g)};que.inherits(Wa,Jue);Wa.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};Wa.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};Wa.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=zue,this._overflow?this._write(this._overflow,void 0,t):t()}};Wa.prototype._write=function(t,e,r){if(!this._destroyed){var i=this._stream,n=this._buffer,s=this._missing;if(t.length&&(this._partial=!0),t.lengths&&(o=t.slice(s),t=t.slice(0,s)),i?i.end(t):n.append(t),this._overflow=o,this._onparse()}};Wa.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()};Yue.exports=Wa});var Zue=E((TPt,Xue)=>{Xue.exports=require("fs").constants||require("constants")});var ige=E((MPt,$ue)=>{var xf=Zue(),ege=tk(),IQ=_A(),p7e=Buffer.alloc,tge=bf().Readable,kf=bf().Writable,d7e=require("string_decoder").StringDecoder,yQ=lM(),C7e=parseInt("755",8),m7e=parseInt("644",8),rge=p7e(1024),cM=function(){},uM=function(t,e){e&=511,e&&t.push(rge.slice(0,512-e))};function E7e(t){switch(t&xf.S_IFMT){case xf.S_IFBLK:return"block-device";case xf.S_IFCHR:return"character-device";case xf.S_IFDIR:return"directory";case xf.S_IFIFO:return"fifo";case xf.S_IFLNK:return"symlink"}return"file"}var wQ=function(t){kf.call(this),this.written=0,this._to=t,this._destroyed=!1};IQ(wQ,kf);wQ.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};wQ.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var BQ=function(){kf.call(this),this.linkname="",this._decoder=new d7e("utf-8"),this._destroyed=!1};IQ(BQ,kf);BQ.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};BQ.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var gm=function(){kf.call(this),this._destroyed=!1};IQ(gm,kf);gm.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))};gm.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Oo=function(t){if(!(this instanceof Oo))return new Oo(t);tge.call(this,t),this._drain=cM,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};IQ(Oo,tge);Oo.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=cM);var i=this;if((!t.size||t.type==="symlink")&&(t.size=0),t.type||(t.type=E7e(t.mode)),t.mode||(t.mode=t.type==="directory"?C7e:m7e),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 n=this.push(e);return uM(i,t.size),n?process.nextTick(r):this._drain=r,new gm}if(t.type==="symlink"&&!t.linkname){var s=new BQ;return ege(s,function(a){if(a)return i.destroy(),r(a);t.linkname=s.linkname,i._encode(t),r()}),s}if(this._encode(t),t.type!=="file"&&t.type!=="contiguous-file")return process.nextTick(r),new gm;var o=new wQ(this);return this._stream=o,ege(o,function(a){if(i._stream=null,a)return i.destroy(),r(a);if(o.written!==t.size)return i.destroy(),r(new Error("size mismatch"));uM(i,t.size),i._finalizing&&i.finalize(),r()}),o}};Oo.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(rge),this.push(null))};Oo.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())};Oo.prototype._encode=function(t){if(!t.pax){var e=yQ.encode(t);if(e){this.push(e);return}}this._encodePax(t)};Oo.prototype._encodePax=function(t){var e=yQ.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(yQ.encode(r)),this.push(e),uM(this,e.length),r.size=t.size,r.type=t.type,this.push(yQ.encode(r))};Oo.prototype._read=function(t){var e=this._drain;this._drain=cM,e()};$ue.exports=Oo});var nge=E(gM=>{gM.extract=_ue();gM.pack=ige()});var Cge=E((oDt,fge)=>{"use strict";var Pf=class{constructor(e,r,i){this.__specs=e||{},Object.keys(this.__specs).forEach(n=>{if(typeof this.__specs[n]=="string"){let s=this.__specs[n],o=this.__specs[s];if(o){let a=o.aliases||[];a.push(n,s),o.aliases=[...new Set(a)],this.__specs[n]=o}else throw new Error(`Alias refers to invalid key: ${s} -> ${n}`)}}),this.__opts=r||{},this.__providers=pge(i.filter(n=>n!=null&&typeof n=="object")),this.__isFiggyPudding=!0}get(e){return mM(this,e,!0)}get[Symbol.toStringTag](){return"FiggyPudding"}forEach(e,r=this){for(let[i,n]of this.entries())e.call(r,n,i,this)}toJSON(){let e={};return this.forEach((r,i)=>{e[i]=r}),e}*entries(e){for(let i of Object.keys(this.__specs))yield[i,this.get(i)];let r=e||this.__opts.other;if(r){let i=new Set;for(let n of this.__providers){let s=n.entries?n.entries(r):R7e(n);for(let[o,a]of s)r(o)&&!i.has(o)&&(i.add(o),yield[o,a])}}}*[Symbol.iterator](){for(let[e,r]of this.entries())yield[e,r]}*keys(){for(let[e]of this.entries())yield e}*values(){for(let[,e]of this.entries())yield e}concat(...e){return new Proxy(new Pf(this.__specs,this.__opts,pge(this.__providers).concat(e)),hge)}};try{let t=require("util");Pf.prototype[t.inspect.custom]=function(e,r){return this[Symbol.toStringTag]+" "+t.inspect(this.toJSON(),r)}}catch(t){}function F7e(t){throw Object.assign(new Error(`invalid config key requested: ${t}`),{code:"EBADKEY"})}function mM(t,e,r){let i=t.__specs[e];if(r&&!i&&(!t.__opts.other||!t.__opts.other(e)))F7e(e);else{i||(i={});let n;for(let s of t.__providers){if(n=dge(e,s),n===void 0&&i.aliases&&i.aliases.length){for(let o of i.aliases)if(o!==e&&(n=dge(o,s),n!==void 0))break}if(n!==void 0)break}return n===void 0&&i.default!==void 0?typeof i.default=="function"?i.default(t):i.default:n}}function dge(t,e){let r;return e.__isFiggyPudding?r=mM(e,t,!1):typeof e.get=="function"?r=e.get(t):r=e[t],r}var hge={has(t,e){return e in t.__specs&&mM(t,e,!1)!==void 0},ownKeys(t){return Object.keys(t.__specs)},get(t,e){return typeof e=="symbol"||e.slice(0,2)==="__"||e in Pf.prototype?t[e]:t.get(e)},set(t,e,r){if(typeof e=="symbol"||e.slice(0,2)==="__")return t[e]=r,!0;throw new Error("figgyPudding options cannot be modified. Use .concat() instead.")},deleteProperty(){throw new Error("figgyPudding options cannot be deleted. Use .concat() and shadow them instead.")}};fge.exports=N7e;function N7e(t,e){function r(...i){return new Proxy(new Pf(t,e,i),hge)}return r}function pge(t){let e=[];return t.forEach(r=>e.unshift(r)),e}function R7e(t){return Object.keys(t).map(e=>[e,t[e]])}});var Ige=E((aDt,Ko)=>{"use strict";var hm=require("crypto"),L7e=Cge(),T7e=require("stream").Transform,mge=["sha256","sha384","sha512"],M7e=/^[a-z0-9+/]+(?:=?=?)$/i,O7e=/^([^-]+)-([^?]+)([?\S*]*)$/,K7e=/^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/,U7e=/^[\x21-\x7E]+$/,on=L7e({algorithms:{default:["sha512"]},error:{default:!1},integrity:{},options:{default:[]},pickAlgorithm:{default:()=>H7e},Promise:{default:()=>Promise},sep:{default:" "},single:{default:!1},size:{},strict:{default:!1}}),zc=class{get isHash(){return!0}constructor(e,r){r=on(r);let i=!!r.strict;this.source=e.trim();let n=this.source.match(i?K7e:O7e);if(!n||i&&!mge.some(o=>o===n[1]))return;this.algorithm=n[1],this.digest=n[2];let s=n[3];this.options=s?s.slice(1).split("?"):[]}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(e){if(e=on(e),e.strict&&!(mge.some(i=>i===this.algorithm)&&this.digest.match(M7e)&&(this.options||[]).every(i=>i.match(U7e))))return"";let r=this.options&&this.options.length?`?${this.options.join("?")}`:"";return`${this.algorithm}-${this.digest}${r}`}},Df=class{get isIntegrity(){return!0}toJSON(){return this.toString()}toString(e){e=on(e);let r=e.sep||" ";return e.strict&&(r=r.replace(/\S+/g," ")),Object.keys(this).map(i=>this[i].map(n=>zc.prototype.toString.call(n,e)).filter(n=>n.length).join(r)).filter(i=>i.length).join(r)}concat(e,r){r=on(r);let i=typeof e=="string"?e:pm(e,r);return Uo(`${this.toString(r)} ${i}`,r)}hexDigest(){return Uo(this,{single:!0}).hexDigest()}match(e,r){r=on(r);let i=Uo(e,r),n=i.pickAlgorithm(r);return this[n]&&i[n]&&this[n].find(s=>i[n].find(o=>s.digest===o.digest))||!1}pickAlgorithm(e){e=on(e);let r=e.pickAlgorithm,i=Object.keys(this);if(!i.length)throw new Error(`No algorithms available for ${JSON.stringify(this.toString())}`);return i.reduce((n,s)=>r(n,s)||n)}};Ko.exports.parse=Uo;function Uo(t,e){if(e=on(e),typeof t=="string")return EM(t,e);if(t.algorithm&&t.digest){let r=new Df;return r[t.algorithm]=[t],EM(pm(r,e),e)}else return EM(pm(t,e),e)}function EM(t,e){return e.single?new zc(t,e):t.trim().split(/\s+/).reduce((r,i)=>{let n=new zc(i,e);if(n.algorithm&&n.digest){let s=n.algorithm;r[s]||(r[s]=[]),r[s].push(n)}return r},new Df)}Ko.exports.stringify=pm;function pm(t,e){return e=on(e),t.algorithm&&t.digest?zc.prototype.toString.call(t,e):typeof t=="string"?pm(Uo(t,e),e):Df.prototype.toString.call(t,e)}Ko.exports.fromHex=G7e;function G7e(t,e,r){r=on(r);let i=r.options&&r.options.length?`?${r.options.join("?")}`:"";return Uo(`${e}-${Buffer.from(t,"hex").toString("base64")}${i}`,r)}Ko.exports.fromData=j7e;function j7e(t,e){e=on(e);let r=e.algorithms,i=e.options&&e.options.length?`?${e.options.join("?")}`:"";return r.reduce((n,s)=>{let o=hm.createHash(s).update(t).digest("base64"),a=new zc(`${s}-${o}${i}`,e);if(a.algorithm&&a.digest){let l=a.algorithm;n[l]||(n[l]=[]),n[l].push(a)}return n},new Df)}Ko.exports.fromStream=Y7e;function Y7e(t,e){e=on(e);let r=e.Promise||Promise,i=IM(e);return new r((n,s)=>{t.pipe(i),t.on("error",s),i.on("error",s);let o;i.on("integrity",a=>{o=a}),i.on("end",()=>n(o)),i.on("data",()=>{})})}Ko.exports.checkData=q7e;function q7e(t,e,r){if(r=on(r),e=Uo(e,r),!Object.keys(e).length){if(r.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let i=e.pickAlgorithm(r),n=hm.createHash(i).update(t).digest("base64"),s=Uo({algorithm:i,digest:n}),o=s.match(e,r);if(o||!r.error)return o;if(typeof r.size=="number"&&t.length!==r.size){let a=new Error(`data size mismatch when checking ${e}. - Wanted: ${r.size} - Found: ${t.length}`);throw a.code="EBADSIZE",a.found=t.length,a.expected=r.size,a.sri=e,a}else{let a=new Error(`Integrity checksum failed when using ${i}: Wanted ${e}, but got ${s}. (${t.length} bytes)`);throw a.code="EINTEGRITY",a.found=s,a.expected=e,a.algorithm=i,a.sri=e,a}}Ko.exports.checkStream=J7e;function J7e(t,e,r){r=on(r);let i=r.Promise||Promise,n=IM(r.concat({integrity:e}));return new i((s,o)=>{t.pipe(n),t.on("error",o),n.on("error",o);let a;n.on("verified",l=>{a=l}),n.on("end",()=>s(a)),n.on("data",()=>{})})}Ko.exports.integrityStream=IM;function IM(t){t=on(t);let e=t.integrity&&Uo(t.integrity,t),r=e&&Object.keys(e).length,i=r&&e.pickAlgorithm(t),n=r&&e[i],s=Array.from(new Set(t.algorithms.concat(i?[i]:[]))),o=s.map(hm.createHash),a=0,l=new T7e({transform(c,u,g){a+=c.length,o.forEach(f=>f.update(c,u)),g(null,c,u)}}).on("end",()=>{let c=t.options&&t.options.length?`?${t.options.join("?")}`:"",u=Uo(o.map((f,h)=>`${s[h]}-${f.digest("base64")}${c}`).join(" "),t),g=r&&u.match(e,t);if(typeof t.size=="number"&&a!==t.size){let f=new Error(`stream size mismatch when checking ${e}. - Wanted: ${t.size} - Found: ${a}`);f.code="EBADSIZE",f.found=a,f.expected=t.size,f.sri=e,l.emit("error",f)}else if(t.integrity&&!g){let f=new Error(`${e} integrity checksum failed when using ${i}: wanted ${n} but got ${u}. (${a} bytes)`);f.code="EINTEGRITY",f.found=u,f.expected=n,f.algorithm=i,f.sri=e,l.emit("error",f)}else l.emit("size",a),l.emit("integrity",u),g&&l.emit("verified",g)});return l}Ko.exports.create=W7e;function W7e(t){t=on(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",i=e.map(hm.createHash);return{update:function(n,s){return i.forEach(o=>o.update(n,s)),this},digest:function(n){return e.reduce((o,a)=>{let l=i.shift().digest("base64"),c=new zc(`${a}-${l}${r}`,t);if(c.algorithm&&c.digest){let u=c.algorithm;o[u]||(o[u]=[]),o[u].push(c)}return o},new Df)}}}var z7e=new Set(hm.getHashes()),Ege=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>z7e.has(t));function H7e(t,e){return Ege.indexOf(t.toLowerCase())>=Ege.indexOf(e.toLowerCase())?t:e}});var Fd={};it(Fd,{BuildType:()=>Gn,Cache:()=>Qt,Configuration:()=>fe,DEFAULT_LOCK_FILENAME:()=>DR,DEFAULT_RC_FILENAME:()=>PR,FormatType:()=>ps,InstallMode:()=>li,LightReport:()=>Fa,LinkType:()=>gt,Manifest:()=>Ze,MessageName:()=>z,PackageExtensionStatus:()=>ki,PackageExtensionType:()=>oi,Project:()=>Ke,ProjectLookup:()=>KA,Report:()=>Xi,ReportError:()=>nt,SettingsType:()=>ge,StreamReport:()=>Fe,TAG_REGEXP:()=>Rg,TelemetryManager:()=>Rd,ThrowReport:()=>ei,VirtualFetcher:()=>dd,Workspace:()=>Dd,WorkspaceResolver:()=>Yr,YarnVersion:()=>Zr,execUtils:()=>hr,folderUtils:()=>Pb,formatUtils:()=>ue,hashUtils:()=>mn,httpUtils:()=>Zt,miscUtils:()=>de,scriptUtils:()=>Kt,semverUtils:()=>qt,structUtils:()=>S,tgzUtils:()=>Ai,treeUtils:()=>Hs});var hr={};it(hr,{EndStrategy:()=>Pn,execvp:()=>Nhe,pipevp:()=>to});var ch={};it(ch,{AliasFS:()=>Xo,CwdFS:()=>Ft,DEFAULT_COMPRESSION_LEVEL:()=>pl,FakeFS:()=>eA,Filename:()=>wt,JailFS:()=>Zo,LazyFS:()=>oh,LinkStrategy:()=>eh,NoFS:()=>bE,NodeFS:()=>Wt,PortablePath:()=>Se,PosixFS:()=>ah,ProxiedFS:()=>fi,VirtualFS:()=>Pr,ZipFS:()=>Jr,ZipOpenFS:()=>Jn,constants:()=>mr,extendFs:()=>SE,normalizeLineEndings:()=>ul,npath:()=>M,opendir:()=>wE,patchFs:()=>pb,ppath:()=>v,statUtils:()=>rb,toFilename:()=>kr,xfs:()=>T});var mr={};it(mr,{SAFE_TIME:()=>tb,S_IFDIR:()=>zo,S_IFLNK:()=>_o,S_IFMT:()=>kn,S_IFREG:()=>Vo});var kn=61440,zo=16384,Vo=32768,_o=40960,tb=456789e3;var rb={};it(rb,{BigIntStatsEntry:()=>Xf,DEFAULT_MODE:()=>_f,DirEntry:()=>uO,StatEntry:()=>Za,areStatsEqual:()=>nb,clearStats:()=>pE,convertToBigIntStats:()=>dE,makeDefaultStats:()=>Zf,makeEmptyStats:()=>Jfe});var ib=ie(require("util"));var _f=Vo|420,uO=class{constructor(){this.name="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&kn)===zo}isFIFO(){return!1}isFile(){return(this.mode&kn)===Vo}isSocket(){return!1}isSymbolicLink(){return(this.mode&kn)===_o}},Za=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=_f;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&kn)===zo}isFIFO(){return!1}isFile(){return(this.mode&kn)===Vo}isSocket(){return!1}isSymbolicLink(){return(this.mode&kn)===_o}},Xf=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(_f);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(kn))===BigInt(zo)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(kn))===BigInt(Vo)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(kn))===BigInt(_o)}};function Zf(){return new Za}function Jfe(){return pE(Zf())}function pE(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):ib.types.isDate(r)&&(t[e]=new Date(0))}return t}function dE(t){let e=new Xf;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];typeof i=="number"?e[r]=BigInt(i):ib.types.isDate(i)&&(e[r]=new Date(i))}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 nb(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,i=e;return!(r.atimeNs!==i.atimeNs||r.mtimeNs!==i.mtimeNs||r.ctimeNs!==i.ctimeNs||r.birthtimeNs!==i.birthtimeNs)}var mE=ie(require("fs"));var $f=ie(require("path")),gO;(function(i){i[i.File=0]="File",i[i.Portable=1]="Portable",i[i.Native=2]="Native"})(gO||(gO={}));var Se={root:"/",dot:"."},wt={nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",rc:".yarnrc.yml"},M=Object.create($f.default),v=Object.create($f.default.posix);M.cwd=()=>process.cwd();v.cwd=()=>sb(process.cwd());v.resolve=(...t)=>t.length>0&&v.isAbsolute(t[0])?$f.default.posix.resolve(...t):$f.default.posix.resolve(v.cwd(),...t);var fO=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)};M.fromPortablePath=hO;M.toPortablePath=sb;M.contains=(t,e)=>fO(M,t,e);v.contains=(t,e)=>fO(v,t,e);var Wfe=/^([a-zA-Z]:.*)$/,zfe=/^\\\\(\.\\)?(.*)$/,Vfe=/^\/([a-zA-Z]:.*)$/,_fe=/^\/unc\/(\.dot\/)?(.*)$/;function hO(t){if(process.platform!=="win32")return t;let e,r;if(e=t.match(Vfe))t=e[1];else if(r=t.match(_fe))t=`\\\\${r[1]?".\\":""}${r[2]}`;else return t;return t.replace(/\//g,"\\")}function sb(t){if(process.platform!=="win32")return t;let e,r;return(e=t.match(Wfe))?t=`/${e[1]}`:(r=t.match(zfe))&&(t=`/unc/${r[1]?".dot/":""}${r[2]}`),t.replace(/\\/g,"/")}function CE(t,e){return t===M?hO(e):sb(e)}function kr(t){if(M.parse(t).dir!==""||v.parse(t).dir!=="")throw new Error(`Invalid filename: "${t}"`);return t}var EE=new Date(tb*1e3),eh;(function(r){r.Allow="allow",r.ReadOnly="readOnly"})(eh||(eh={}));async function pO(t,e,r,i,n){let s=t.pathUtils.normalize(e),o=r.pathUtils.normalize(i),a=[],l=[],c=n.stableTime?{mtime:EE,atime:EE}:await r.lstatPromise(o);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[c.atime,c.mtime]});let u=typeof t.lutimesPromise=="function"?t.lutimesPromise.bind(t):t.utimesPromise.bind(t);await ob(a,l,u,t,s,r,o,n);for(let g of a)await g();await Promise.all(l.map(g=>g()))}async function ob(t,e,r,i,n,s,o,a){var f,h;let l=await Xfe(i,n),c=await s.lstatPromise(o),u=a.stableTime?{mtime:EE,atime:EE}:c,g;switch(!0){case c.isDirectory():g=await Zfe(t,e,r,i,n,l,s,o,c,a);break;case c.isFile():g=await $fe(t,e,r,i,n,l,s,o,c,a);break;case c.isSymbolicLink():g=await ehe(t,e,r,i,n,l,s,o,c,a);break;default:throw new Error(`Unsupported file type (${c.mode})`)}return(g||((f=l==null?void 0:l.mtime)==null?void 0:f.getTime())!==u.mtime.getTime()||((h=l==null?void 0:l.atime)==null?void 0:h.getTime())!==u.atime.getTime())&&(e.push(()=>r(n,u.atime,u.mtime)),g=!0),(l===null||(l.mode&511)!=(c.mode&511))&&(e.push(()=>i.chmodPromise(n,c.mode&511)),g=!0),g}async function Xfe(t,e){try{return await t.lstatPromise(e)}catch(r){return null}}async function Zfe(t,e,r,i,n,s,o,a,l,c){if(s!==null&&!s.isDirectory())if(c.overwrite)t.push(async()=>i.removePromise(n)),s=null;else return!1;let u=!1;s===null&&(t.push(async()=>{try{await i.mkdirPromise(n,{mode:l.mode})}catch(f){if(f.code!=="EEXIST")throw f}}),u=!0);let g=await o.readdirPromise(a);if(c.stableSort)for(let f of g.sort())await ob(t,e,r,i,i.pathUtils.join(n,f),o,o.pathUtils.join(a,f),c)&&(u=!0);else(await Promise.all(g.map(async h=>{await ob(t,e,r,i,i.pathUtils.join(n,h),o,o.pathUtils.join(a,h),c)}))).some(h=>h)&&(u=!0);return u}var ab=new WeakMap;function Ab(t,e,r,i,n){return async()=>{await t.linkPromise(r,e),n===eh.ReadOnly&&(i.mode&=~146,await t.chmodPromise(e,i.mode))}}function the(t,e,r,i,n){let s=ab.get(t);return typeof s=="undefined"?async()=>{try{await t.copyFilePromise(r,e,mE.default.constants.COPYFILE_FICLONE_FORCE),ab.set(t,!0)}catch(o){if(o.code==="ENOSYS"||o.code==="ENOTSUP")ab.set(t,!1),await Ab(t,e,r,i,n)();else throw o}}:s?async()=>t.copyFilePromise(r,e,mE.default.constants.COPYFILE_FICLONE_FORCE):Ab(t,e,r,i,n)}async function $fe(t,e,r,i,n,s,o,a,l,c){var f;if(s!==null)if(c.overwrite)t.push(async()=>i.removePromise(n)),s=null;else return!1;let u=(f=c.linkStrategy)!=null?f:null,g=i===o?u!==null?the(i,n,a,l,u):async()=>i.copyFilePromise(a,n,mE.default.constants.COPYFILE_FICLONE):u!==null?Ab(i,n,a,l,u):async()=>i.writeFilePromise(n,await o.readFilePromise(a));return t.push(async()=>g()),!0}async function ehe(t,e,r,i,n,s,o,a,l,c){if(s!==null)if(c.overwrite)t.push(async()=>i.removePromise(n)),s=null;else return!1;return t.push(async()=>{await i.symlinkPromise(CE(i.pathUtils,await o.readlinkPromise(a)),n)}),!0}function qn(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function IE(t){return qn("EBUSY",t)}function th(t,e){return qn("ENOSYS",`${t}, ${e}`)}function $a(t){return qn("EINVAL",`invalid argument, ${t}`)}function Hi(t){return qn("EBADF",`bad file descriptor, ${t}`)}function bs(t){return qn("ENOENT",`no such file or directory, ${t}`)}function eo(t){return qn("ENOTDIR",`not a directory, ${t}`)}function rh(t){return qn("EISDIR",`illegal operation on a directory, ${t}`)}function yE(t){return qn("EEXIST",`file already exists, ${t}`)}function ln(t){return qn("EROFS",`read-only filesystem, ${t}`)}function dO(t){return qn("ENOTEMPTY",`directory not empty, ${t}`)}function CO(t){return qn("EOPNOTSUPP",`operation not supported, ${t}`)}function mO(){return qn("ERR_DIR_CLOSED","Directory handle was closed")}var lb=class extends Error{constructor(e,r){super(e);this.name="Libzip Error",this.code=r}};var EO=class{constructor(e,r,i={}){this.path=e;this.nextDirent=r;this.opts=i;this.closed=!1}throwIfClosed(){if(this.closed)throw mO()}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!="undefined"?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e!="undefined"?e(null):Promise.resolve()}closeSync(){var e,r;this.throwIfClosed(),(r=(e=this.opts).onClose)==null||r.call(e),this.closed=!0}};function wE(t,e,r,i){let n=()=>{let s=r.shift();return typeof s=="undefined"?null:Object.assign(t.statSync(t.pathUtils.join(e,s)),{name:s})};return new EO(e,n,i)}var IO=ie(require("os"));var eA=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let i=[e];for(;i.length>0;){let n=i.shift();if((await this.lstatPromise(n)).isDirectory()){let o=await this.readdirPromise(n);if(r)for(let a of o.sort())i.push(this.pathUtils.join(n,a));else throw new Error("Not supported")}else yield n}}async removePromise(e,{recursive:r=!0,maxRetries:i=5}={}){let n;try{n=await this.lstatPromise(e)}catch(s){if(s.code==="ENOENT")return;throw s}if(n.isDirectory()){if(r){let o=await this.readdirPromise(e);await Promise.all(o.map(a=>this.removePromise(this.pathUtils.resolve(e,a))))}let s=0;do try{await this.rmdirPromise(e);break}catch(o){if(o.code==="EBUSY"||o.code==="ENOTEMPTY"){if(i===0)break;await new Promise(a=>setTimeout(a,s*100));continue}else throw o}while(s++{let l;try{[l]=await this.readJsonPromise(i)}catch(c){return Date.now()-s<500}try{return process.kill(l,0),!0}catch(c){return!1}};for(;o===null;)try{o=await this.openPromise(i,"wx")}catch(l){if(l.code==="EEXIST"){if(!await a())try{await this.unlinkPromise(i);continue}catch(c){}if(Date.now()-s<60*1e3)await new Promise(c=>setTimeout(c,n));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${i})`)}else throw l}await this.writePromise(o,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(o),await this.unlinkPromise(i)}catch(l){}}}async readJsonPromise(e){let r=await this.readFilePromise(e,"utf8");try{return JSON.parse(r)}catch(i){throw i.message+=` (in ${e})`,i}}readJsonSync(e){let r=this.readFileSync(e,"utf8");try{return JSON.parse(r)}catch(i){throw i.message+=` (in ${e})`,i}}async writeJsonPromise(e,r){return await this.writeFilePromise(e,`${JSON.stringify(r,null,2)} -`)}writeJsonSync(e,r){return this.writeFileSync(e,`${JSON.stringify(r,null,2)} -`)}async preserveTimePromise(e,r){let i=await this.lstatPromise(e),n=await r();typeof n!="undefined"&&(e=n),this.lutimesPromise?await this.lutimesPromise(e,i.atime,i.mtime):i.isSymbolicLink()||await this.utimesPromise(e,i.atime,i.mtime)}async preserveTimeSync(e,r){let i=this.lstatSync(e),n=r();typeof n!="undefined"&&(e=n),this.lutimesSync?this.lutimesSync(e,i.atime,i.mtime):i.isSymbolicLink()||this.utimesSync(e,i.atime,i.mtime)}},gl=class extends eA{constructor(){super(v)}};function rhe(t){let e=t.match(/\r?\n/g);if(e===null)return IO.EOL;let r=e.filter(n=>n===`\r -`).length,i=e.length-r;return r>i?`\r -`:` -`}function ul(t,e){return e.replace(/\r?\n/g,rhe(t))}var $c=ie(require("fs")),cb=ie(require("stream")),QO=ie(require("util")),ub=ie(require("zlib"));var yO=ie(require("fs"));var Wt=class extends gl{constructor(e=yO.default){super();this.realFs=e,typeof this.realFs.lutimes!="undefined"&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return Se.root}resolve(e){return v.resolve(e)}async openPromise(e,r,i){return await new Promise((n,s)=>{this.realFs.open(M.fromPortablePath(e),r,i,this.makeCallback(n,s))})}openSync(e,r,i){return this.realFs.openSync(M.fromPortablePath(e),r,i)}async opendirPromise(e,r){return await new Promise((i,n)=>{typeof r!="undefined"?this.realFs.opendir(M.fromPortablePath(e),r,this.makeCallback(i,n)):this.realFs.opendir(M.fromPortablePath(e),this.makeCallback(i,n))}).then(i=>Object.defineProperty(i,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,r){let i=typeof r!="undefined"?this.realFs.opendirSync(M.fromPortablePath(e),r):this.realFs.opendirSync(M.fromPortablePath(e));return Object.defineProperty(i,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,r,i=0,n=0,s=-1){return await new Promise((o,a)=>{this.realFs.read(e,r,i,n,s,(l,c)=>{l?a(l):o(c)})})}readSync(e,r,i,n,s){return this.realFs.readSync(e,r,i,n,s)}async writePromise(e,r,i,n,s){return await new Promise((o,a)=>typeof r=="string"?this.realFs.write(e,r,i,this.makeCallback(o,a)):this.realFs.write(e,r,i,n,s,this.makeCallback(o,a)))}writeSync(e,r,i,n,s){return typeof r=="string"?this.realFs.writeSync(e,r,i):this.realFs.writeSync(e,r,i,n,s)}async closePromise(e){await new Promise((r,i)=>{this.realFs.close(e,this.makeCallback(r,i))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let i=e!==null?M.fromPortablePath(e):e;return this.realFs.createReadStream(i,r)}createWriteStream(e,r){let i=e!==null?M.fromPortablePath(e):e;return this.realFs.createWriteStream(i,r)}async realpathPromise(e){return await new Promise((r,i)=>{this.realFs.realpath(M.fromPortablePath(e),{},this.makeCallback(r,i))}).then(r=>M.toPortablePath(r))}realpathSync(e){return M.toPortablePath(this.realFs.realpathSync(M.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(M.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(M.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((i,n)=>{this.realFs.access(M.fromPortablePath(e),r,this.makeCallback(i,n))})}existsSync(e){return this.realFs.existsSync(M.fromPortablePath(e))}async statPromise(e,r){return await new Promise((i,n)=>{r?this.realFs.stat(M.fromPortablePath(e),r,this.makeCallback(i,n)):this.realFs.stat(M.fromPortablePath(e),this.makeCallback(i,n))})}statSync(e,r){return r?this.realFs.statSync(M.fromPortablePath(e),r):this.realFs.statSync(M.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((i,n)=>{r?this.realFs.fstat(e,r,this.makeCallback(i,n)):this.realFs.fstat(e,this.makeCallback(i,n))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((i,n)=>{r?this.realFs.lstat(M.fromPortablePath(e),r,this.makeCallback(i,n)):this.realFs.lstat(M.fromPortablePath(e),this.makeCallback(i,n))})}lstatSync(e,r){return r?this.realFs.lstatSync(M.fromPortablePath(e),r):this.realFs.lstatSync(M.fromPortablePath(e))}async chmodPromise(e,r){return await new Promise((i,n)=>{this.realFs.chmod(M.fromPortablePath(e),r,this.makeCallback(i,n))})}chmodSync(e,r){return this.realFs.chmodSync(M.fromPortablePath(e),r)}async chownPromise(e,r,i){return await new Promise((n,s)=>{this.realFs.chown(M.fromPortablePath(e),r,i,this.makeCallback(n,s))})}chownSync(e,r,i){return this.realFs.chownSync(M.fromPortablePath(e),r,i)}async renamePromise(e,r){return await new Promise((i,n)=>{this.realFs.rename(M.fromPortablePath(e),M.fromPortablePath(r),this.makeCallback(i,n))})}renameSync(e,r){return this.realFs.renameSync(M.fromPortablePath(e),M.fromPortablePath(r))}async copyFilePromise(e,r,i=0){return await new Promise((n,s)=>{this.realFs.copyFile(M.fromPortablePath(e),M.fromPortablePath(r),i,this.makeCallback(n,s))})}copyFileSync(e,r,i=0){return this.realFs.copyFileSync(M.fromPortablePath(e),M.fromPortablePath(r),i)}async appendFilePromise(e,r,i){return await new Promise((n,s)=>{let o=typeof e=="string"?M.fromPortablePath(e):e;i?this.realFs.appendFile(o,r,i,this.makeCallback(n,s)):this.realFs.appendFile(o,r,this.makeCallback(n,s))})}appendFileSync(e,r,i){let n=typeof e=="string"?M.fromPortablePath(e):e;i?this.realFs.appendFileSync(n,r,i):this.realFs.appendFileSync(n,r)}async writeFilePromise(e,r,i){return await new Promise((n,s)=>{let o=typeof e=="string"?M.fromPortablePath(e):e;i?this.realFs.writeFile(o,r,i,this.makeCallback(n,s)):this.realFs.writeFile(o,r,this.makeCallback(n,s))})}writeFileSync(e,r,i){let n=typeof e=="string"?M.fromPortablePath(e):e;i?this.realFs.writeFileSync(n,r,i):this.realFs.writeFileSync(n,r)}async unlinkPromise(e){return await new Promise((r,i)=>{this.realFs.unlink(M.fromPortablePath(e),this.makeCallback(r,i))})}unlinkSync(e){return this.realFs.unlinkSync(M.fromPortablePath(e))}async utimesPromise(e,r,i){return await new Promise((n,s)=>{this.realFs.utimes(M.fromPortablePath(e),r,i,this.makeCallback(n,s))})}utimesSync(e,r,i){this.realFs.utimesSync(M.fromPortablePath(e),r,i)}async lutimesPromiseImpl(e,r,i){let n=this.realFs.lutimes;if(typeof n=="undefined")throw th("unavailable Node binding",`lutimes '${e}'`);return await new Promise((s,o)=>{n.call(this.realFs,M.fromPortablePath(e),r,i,this.makeCallback(s,o))})}lutimesSyncImpl(e,r,i){let n=this.realFs.lutimesSync;if(typeof n=="undefined")throw th("unavailable Node binding",`lutimes '${e}'`);n.call(this.realFs,M.fromPortablePath(e),r,i)}async mkdirPromise(e,r){return await new Promise((i,n)=>{this.realFs.mkdir(M.fromPortablePath(e),r,this.makeCallback(i,n))})}mkdirSync(e,r){return this.realFs.mkdirSync(M.fromPortablePath(e),r)}async rmdirPromise(e,r){return await new Promise((i,n)=>{r?this.realFs.rmdir(M.fromPortablePath(e),r,this.makeCallback(i,n)):this.realFs.rmdir(M.fromPortablePath(e),this.makeCallback(i,n))})}rmdirSync(e,r){return this.realFs.rmdirSync(M.fromPortablePath(e),r)}async linkPromise(e,r){return await new Promise((i,n)=>{this.realFs.link(M.fromPortablePath(e),M.fromPortablePath(r),this.makeCallback(i,n))})}linkSync(e,r){return this.realFs.linkSync(M.fromPortablePath(e),M.fromPortablePath(r))}async symlinkPromise(e,r,i){return await new Promise((n,s)=>{this.realFs.symlink(M.fromPortablePath(e.replace(/\/+$/,"")),M.fromPortablePath(r),i,this.makeCallback(n,s))})}symlinkSync(e,r,i){return this.realFs.symlinkSync(M.fromPortablePath(e.replace(/\/+$/,"")),M.fromPortablePath(r),i)}async readFilePromise(e,r){return await new Promise((i,n)=>{let s=typeof e=="string"?M.fromPortablePath(e):e;this.realFs.readFile(s,r,this.makeCallback(i,n))})}readFileSync(e,r){let i=typeof e=="string"?M.fromPortablePath(e):e;return this.realFs.readFileSync(i,r)}async readdirPromise(e,r){return await new Promise((i,n)=>{(r==null?void 0:r.withFileTypes)?this.realFs.readdir(M.fromPortablePath(e),{withFileTypes:!0},this.makeCallback(i,n)):this.realFs.readdir(M.fromPortablePath(e),this.makeCallback(s=>i(s),n))})}readdirSync(e,r){return(r==null?void 0:r.withFileTypes)?this.realFs.readdirSync(M.fromPortablePath(e),{withFileTypes:!0}):this.realFs.readdirSync(M.fromPortablePath(e))}async readlinkPromise(e){return await new Promise((r,i)=>{this.realFs.readlink(M.fromPortablePath(e),this.makeCallback(r,i))}).then(r=>M.toPortablePath(r))}readlinkSync(e){return M.toPortablePath(this.realFs.readlinkSync(M.fromPortablePath(e)))}async truncatePromise(e,r){return await new Promise((i,n)=>{this.realFs.truncate(M.fromPortablePath(e),r,this.makeCallback(i,n))})}truncateSync(e,r){return this.realFs.truncateSync(M.fromPortablePath(e),r)}watch(e,r,i){return this.realFs.watch(M.fromPortablePath(e),r,i)}watchFile(e,r,i){return this.realFs.watchFile(M.fromPortablePath(e),r,i)}unwatchFile(e,r){return this.realFs.unwatchFile(M.fromPortablePath(e),r)}makeCallback(e,r){return(i,n)=>{i?r(i):e(n)}}};var wO=ie(require("events"));var fl;(function(r){r.Change="change",r.Stop="stop"})(fl||(fl={}));var hl;(function(i){i.Ready="ready",i.Running="running",i.Stopped="stopped"})(hl||(hl={}));function BO(t,e){if(t!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${t}'`)}var ih=class extends wO.EventEmitter{constructor(e,r,{bigint:i=!1}={}){super();this.status=hl.Ready;this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=e,this.path=r,this.bigint=i,this.lastStats=this.stat()}static create(e,r,i){let n=new ih(e,r,i);return n.start(),n}start(){BO(this.status,hl.Ready),this.status=hl.Running,this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit(fl.Change,this.lastStats,this.lastStats)},3)}stop(){BO(this.status,hl.Running),this.status=hl.Stopped,this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit(fl.Stop)}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch(e){let r=this.bigint?new Xf:new Za;return pE(r)}}makeInterval(e){let r=setInterval(()=>{let i=this.stat(),n=this.lastStats;nb(i,n)||(this.lastStats=i,this.emit(fl.Change,i,n))},e.interval);return e.persistent?r:r.unref()}registerChangeListener(e,r){this.addListener(fl.Change,e),this.changeListeners.set(e,this.makeInterval(r))}unregisterChangeListener(e){this.removeListener(fl.Change,e);let r=this.changeListeners.get(e);typeof r!="undefined"&&clearInterval(r),this.changeListeners.delete(e)}unregisterAllChangeListeners(){for(let e of this.changeListeners.keys())this.unregisterChangeListener(e)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let e of this.changeListeners.values())e.ref();return this}unref(){for(let e of this.changeListeners.values())e.unref();return this}};var BE=new WeakMap;function QE(t,e,r,i){let n,s,o,a;switch(typeof r){case"function":n=!1,s=!0,o=5007,a=r;break;default:({bigint:n=!1,persistent:s=!0,interval:o=5007}=r),a=i;break}let l=BE.get(t);typeof l=="undefined"&&BE.set(t,l=new Map);let c=l.get(e);return typeof c=="undefined"&&(c=ih.create(t,e,{bigint:n}),l.set(e,c)),c.registerChangeListener(a,{persistent:s,interval:o}),c}function nh(t,e,r){let i=BE.get(t);if(typeof i=="undefined")return;let n=i.get(e);typeof n!="undefined"&&(typeof r=="undefined"?n.unregisterAllChangeListeners():n.unregisterChangeListener(r),n.hasChangeListeners()||(n.stop(),i.delete(e)))}function sh(t){let e=BE.get(t);if(typeof e!="undefined")for(let r of e.keys())nh(t,r)}var pl="mixed";function ihe(t){if(typeof t=="string"&&String(+t)===t)return+t;if(Number.isFinite(t))return t<0?Date.now()/1e3:t;if((0,QO.isDate)(t))return t.getTime()/1e3;throw new Error("Invalid time")}function bO(){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 Jr=class extends gl{constructor(e,r){super();this.lzSource=null;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;this.libzip=r.libzip;let i=r;if(this.level=typeof i.level!="undefined"?i.level:pl,e!=null||(e=bO()),typeof e=="string"){let{baseFs:o=new Wt}=i;this.baseFs=o,this.path=e}else this.path=null,this.baseFs=null;if(r.stats)this.stats=r.stats;else if(typeof e=="string")try{this.stats=this.baseFs.statSync(e)}catch(o){if(o.code==="ENOENT"&&i.create)this.stats=Zf();else throw o}else this.stats=Zf();let n=this.libzip.malloc(4);try{let o=0;if(typeof e=="string"&&i.create&&(o|=this.libzip.ZIP_CREATE|this.libzip.ZIP_TRUNCATE),r.readOnly&&(o|=this.libzip.ZIP_RDONLY,this.readOnly=!0),typeof e=="string")this.zip=this.libzip.open(M.fromPortablePath(e),o,n);else{let a=this.allocateUnattachedSource(e);try{this.zip=this.libzip.openFromSource(a,o,n),this.lzSource=a}catch(l){throw this.libzip.source.free(a),l}}if(this.zip===0){let a=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(a,this.libzip.getValue(n,"i32")),this.makeLibzipError(a)}}finally{this.libzip.free(n)}this.listings.set(Se.root,new Set);let s=this.libzip.getNumEntries(this.zip,0);for(let o=0;oe)throw new Error("Overread");let n=this.libzip.HEAPU8.subarray(r,r+e);return Buffer.from(n)}finally{this.libzip.free(r)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}prepareClose(){if(!this.ready)throw IE("archive closed, close");sh(this)}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.prepareClose(),this.readOnly){this.discardAndClose();return}let e=this.baseFs.existsSync(this.path)||this.stats.mode===_f?void 0:this.stats.mode;if(this.entries.size===0)this.discardAndClose(),this.baseFs.writeFileSync(this.path,bO(),{mode:e});else{if(this.libzip.close(this.zip)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));typeof e!="undefined"&&this.baseFs.chmodSync(this.path,e)}this.ready=!1}discardAndClose(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}resolve(e){return v.resolve(Se.root,e)}async openPromise(e,r,i){return this.openSync(e,r,i)}openSync(e,r,i){let n=this.nextFd++;return this.fds.set(n,{cursor:0,p:e}),n}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(e,r){return this.opendirSync(e,r)}opendirSync(e,r={}){let i=this.resolveFilename(`opendir '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw bs(`opendir '${e}'`);let n=this.listings.get(i);if(!n)throw eo(`opendir '${e}'`);let s=[...n],o=this.openSync(i,"r");return wE(this,i,s,{onClose:()=>{this.closeSync(o)}})}async readPromise(e,r,i,n,s){return this.readSync(e,r,i,n,s)}readSync(e,r,i=0,n=r.byteLength,s=-1){let o=this.fds.get(e);if(typeof o=="undefined")throw Hi("read");let a;s===-1||s===null?a=o.cursor:a=s;let l=this.readFileSync(o.p);l.copy(r,i,a,a+n);let c=Math.max(0,Math.min(l.length-a,n));return(s===-1||s===null)&&(o.cursor+=c),c}async writePromise(e,r,i,n,s){return typeof r=="string"?this.writeSync(e,r,s):this.writeSync(e,r,i,n,s)}writeSync(e,r,i,n,s){throw typeof this.fds.get(e)=="undefined"?Hi("read"):new Error("Unimplemented")}async closePromise(e){return this.closeSync(e)}closeSync(e){if(typeof this.fds.get(e)=="undefined")throw Hi("read");this.fds.delete(e)}createReadStream(e,{encoding:r}={}){if(e===null)throw new Error("Unimplemented");let i=this.openSync(e,"r"),n=Object.assign(new cb.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(o,a)=>{clearImmediate(s),this.closeSync(i),a(o)}}),{close(){n.destroy()},bytesRead:0,path:e}),s=setImmediate(async()=>{try{let o=await this.readFilePromise(e,r);n.bytesRead=o.length,n.end(o)}catch(o){n.destroy(o)}});return n}createWriteStream(e,{encoding:r}={}){if(this.readOnly)throw ln(`open '${e}'`);if(e===null)throw new Error("Unimplemented");let i=[],n=this.openSync(e,"w"),s=Object.assign(new cb.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(o,a)=>{try{o?a(o):(this.writeFileSync(e,Buffer.concat(i),r),a(null))}catch(l){a(l)}finally{this.closeSync(n)}}}),{bytesWritten:0,path:e,close(){s.destroy()}});return s.on("data",o=>{let a=Buffer.from(o);s.bytesWritten+=a.length,i.push(a)}),s}async realpathPromise(e){return this.realpathSync(e)}realpathSync(e){let r=this.resolveFilename(`lstat '${e}'`,e);if(!this.entries.has(r)&&!this.listings.has(r))throw bs(`lstat '${e}'`);return r}async existsPromise(e){return this.existsSync(e)}existsSync(e){if(!this.ready)throw IE(`archive closed, existsSync '${e}'`);if(this.symlinkCount===0){let i=v.resolve(Se.root,e);return this.entries.has(i)||this.listings.has(i)}let r;try{r=this.resolveFilename(`stat '${e}'`,e)}catch(i){return!1}return this.entries.has(r)||this.listings.has(r)}async accessPromise(e,r){return this.accessSync(e,r)}accessSync(e,r=$c.constants.F_OK){let i=this.resolveFilename(`access '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw bs(`access '${e}'`);if(this.readOnly&&r&$c.constants.W_OK)throw ln(`access '${e}'`)}async statPromise(e,r){return this.statSync(e,r)}statSync(e,r){let i=this.resolveFilename(`stat '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw bs(`stat '${e}'`);if(e[e.length-1]==="/"&&!this.listings.has(i))throw eo(`stat '${e}'`);return this.statImpl(`stat '${e}'`,i,r)}async fstatPromise(e,r){return this.fstatSync(e,r)}fstatSync(e,r){let i=this.fds.get(e);if(typeof i=="undefined")throw Hi("fstatSync");let{p:n}=i,s=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(s)&&!this.listings.has(s))throw bs(`stat '${n}'`);if(n[n.length-1]==="/"&&!this.listings.has(s))throw eo(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,s,r)}async lstatPromise(e,r){return this.lstatSync(e,r)}lstatSync(e,r){let i=this.resolveFilename(`lstat '${e}'`,e,!1);if(!this.entries.has(i)&&!this.listings.has(i))throw bs(`lstat '${e}'`);if(e[e.length-1]==="/"&&!this.listings.has(i))throw eo(`lstat '${e}'`);return this.statImpl(`lstat '${e}'`,i,r)}statImpl(e,r,i={}){let n=this.entries.get(r);if(typeof n!="undefined"){let s=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,n,0,0,s)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let a=this.stats.uid,l=this.stats.gid,c=this.libzip.struct.statSize(s)>>>0,u=512,g=Math.ceil(c/u),f=(this.libzip.struct.statMtime(s)>>>0)*1e3,h=f,p=f,d=f,m=new Date(h),I=new Date(p),B=new Date(d),b=new Date(f),R=this.listings.has(r)?zo:this.isSymbolicLink(n)?_o:Vo,H=R===zo?493:420,L=R|this.getUnixMode(n,H)&511,K=this.libzip.struct.statCrc(s),J=Object.assign(new Za,{uid:a,gid:l,size:c,blksize:u,blocks:g,atime:m,birthtime:I,ctime:B,mtime:b,atimeMs:h,birthtimeMs:p,ctimeMs:d,mtimeMs:f,mode:L,crc:K});return i.bigint===!0?dE(J):J}if(this.listings.has(r)){let s=this.stats.uid,o=this.stats.gid,a=0,l=512,c=0,u=this.stats.mtimeMs,g=this.stats.mtimeMs,f=this.stats.mtimeMs,h=this.stats.mtimeMs,p=new Date(u),d=new Date(g),m=new Date(f),I=new Date(h),B=zo|493,b=0,R=Object.assign(new Za,{uid:s,gid:o,size:a,blksize:l,blocks:c,atime:p,birthtime:d,ctime:m,mtime:I,atimeMs:u,birthtimeMs:g,ctimeMs:f,mtimeMs:h,mode:B,crc:b});return i.bigint===!0?dE(R):R}throw new Error("Unreachable")}getUnixMode(e,r){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));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?r:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(e){let r=this.listings.get(e);if(r)return r;let i=this.registerListing(v.dirname(e));return r=new Set,i.add(v.basename(e)),this.listings.set(e,r),r}registerEntry(e,r){this.registerListing(v.dirname(e)).add(v.basename(e)),this.entries.set(e,r)}unregisterListing(e){this.listings.delete(e);let r=this.listings.get(v.dirname(e));r==null||r.delete(v.basename(e))}unregisterEntry(e){this.unregisterListing(e);let r=this.entries.get(e);this.entries.delete(e),typeof r!="undefined"&&(this.fileSources.delete(r),this.isSymbolicLink(r)&&this.symlinkCount--)}deleteEntry(e,r){if(this.unregisterEntry(e),this.libzip.delete(this.zip,r)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(e,r,i=!0){if(!this.ready)throw IE(`archive closed, ${e}`);let n=v.resolve(Se.root,r);if(n==="/")return Se.root;let s=this.entries.get(n);if(i&&s!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(s)){let o=this.getFileSource(s).toString();return this.resolveFilename(e,v.resolve(v.dirname(n),o),!0)}else return n;for(;;){let o=this.resolveFilename(e,v.dirname(n),!0),a=this.listings.has(o),l=this.entries.has(o);if(!a&&!l)throw bs(e);if(!a)throw eo(e);if(n=v.resolve(o,v.basename(n)),!i||this.symlinkCount===0)break;let c=this.libzip.name.locate(this.zip,n.slice(1));if(c===-1)break;if(this.isSymbolicLink(c)){let u=this.getFileSource(c).toString();n=v.resolve(v.dirname(n),u)}else break}return n}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:i,byteLength:n}=this.allocateBuffer(e),s=this.libzip.source.fromUnattachedBuffer(i,n,0,!0,r);if(s===0)throw this.libzip.free(r),this.makeLibzipError(r);return s}allocateSource(e){let{buffer:r,byteLength:i}=this.allocateBuffer(e),n=this.libzip.source.fromBuffer(this.zip,r,i,0,!0);if(n===0)throw this.libzip.free(r),this.makeLibzipError(this.libzip.getError(this.zip));return n}setFileSource(e,r){let i=Buffer.isBuffer(r)?r:Buffer.from(r),n=v.relative(Se.root,e),s=this.allocateSource(r);try{let o=this.libzip.file.add(this.zip,n,s,this.libzip.ZIP_FL_OVERWRITE);if(o===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.level!=="mixed"){let a;if(this.level===0?a=this.libzip.ZIP_CM_STORE:a=this.libzip.ZIP_CM_DEFLATE,this.libzip.file.setCompression(this.zip,o,0,a,this.level)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(o,i),o}catch(o){throw this.libzip.source.free(s),o}}isSymbolicLink(e){if(this.symlinkCount===0)return!1;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));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?!1:(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&kn)===_o}getFileSource(e,r={asyncDecompress:!1}){let i=this.fileSources.get(e);if(typeof i!="undefined")return i;let n=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,e,0,0,n)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let o=this.libzip.struct.statCompSize(n),a=this.libzip.struct.statCompMethod(n),l=this.libzip.malloc(o);try{let c=this.libzip.fopenIndex(this.zip,e,0,this.libzip.ZIP_FL_COMPRESSED);if(c===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let u=this.libzip.fread(c,l,o,0);if(u===-1)throw this.makeLibzipError(this.libzip.file.getError(c));if(uo)throw new Error("Overread");let g=this.libzip.HEAPU8.subarray(l,l+o),f=Buffer.from(g);if(a===0)return this.fileSources.set(e,f),f;if(r.asyncDecompress)return new Promise((h,p)=>{ub.default.inflateRaw(f,(d,m)=>{d?p(d):(this.fileSources.set(e,m),h(m))})});{let h=ub.default.inflateRawSync(f);return this.fileSources.set(e,h),h}}finally{this.libzip.fclose(c)}}finally{this.libzip.free(l)}}async chmodPromise(e,r){return this.chmodSync(e,r)}chmodSync(e,r){if(this.readOnly)throw ln(`chmod '${e}'`);r&=493;let i=this.resolveFilename(`chmod '${e}'`,e,!1),n=this.entries.get(i);if(typeof n=="undefined")throw new Error(`Assertion failed: The entry should have been registered (${i})`);let o=this.getUnixMode(n,Vo|0)&~511|r;if(this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,o<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async chownPromise(e,r,i){return this.chownSync(e,r,i)}chownSync(e,r,i){throw new Error("Unimplemented")}async renamePromise(e,r){return this.renameSync(e,r)}renameSync(e,r){throw new Error("Unimplemented")}async copyFilePromise(e,r,i){let{indexSource:n,indexDest:s,resolvedDestP:o}=this.prepareCopyFile(e,r,i),a=await this.getFileSource(n,{asyncDecompress:!0}),l=this.setFileSource(o,a);l!==s&&this.registerEntry(o,l)}copyFileSync(e,r,i=0){let{indexSource:n,indexDest:s,resolvedDestP:o}=this.prepareCopyFile(e,r,i),a=this.getFileSource(n),l=this.setFileSource(o,a);l!==s&&this.registerEntry(o,l)}prepareCopyFile(e,r,i=0){if(this.readOnly)throw ln(`copyfile '${e} -> '${r}'`);if((i&$c.constants.COPYFILE_FICLONE_FORCE)!=0)throw th("unsupported clone operation",`copyfile '${e}' -> ${r}'`);let n=this.resolveFilename(`copyfile '${e} -> ${r}'`,e),s=this.entries.get(n);if(typeof s=="undefined")throw $a(`copyfile '${e}' -> '${r}'`);let o=this.resolveFilename(`copyfile '${e}' -> ${r}'`,r),a=this.entries.get(o);if((i&($c.constants.COPYFILE_EXCL|$c.constants.COPYFILE_FICLONE_FORCE))!=0&&typeof a!="undefined")throw yE(`copyfile '${e}' -> '${r}'`);return{indexSource:s,resolvedDestP:o,indexDest:a}}async appendFilePromise(e,r,i){if(this.readOnly)throw ln(`open '${e}'`);return typeof i=="undefined"?i={flag:"a"}:typeof i=="string"?i={flag:"a",encoding:i}:typeof i.flag=="undefined"&&(i=P({flag:"a"},i)),this.writeFilePromise(e,r,i)}appendFileSync(e,r,i={}){if(this.readOnly)throw ln(`open '${e}'`);return typeof i=="undefined"?i={flag:"a"}:typeof i=="string"?i={flag:"a",encoding:i}:typeof i.flag=="undefined"&&(i=P({flag:"a"},i)),this.writeFileSync(e,r,i)}fdToPath(e,r){var n;let i=(n=this.fds.get(e))==null?void 0:n.p;if(typeof i=="undefined")throw Hi(r);return i}async writeFilePromise(e,r,i){let{encoding:n,mode:s,index:o,resolvedP:a}=this.prepareWriteFile(e,i);o!==void 0&&typeof i=="object"&&i.flag&&i.flag.includes("a")&&(r=Buffer.concat([await this.getFileSource(o,{asyncDecompress:!0}),Buffer.from(r)])),n!==null&&(r=r.toString(n));let l=this.setFileSource(a,r);l!==o&&this.registerEntry(a,l),s!==null&&await this.chmodPromise(a,s)}writeFileSync(e,r,i){let{encoding:n,mode:s,index:o,resolvedP:a}=this.prepareWriteFile(e,i);o!==void 0&&typeof i=="object"&&i.flag&&i.flag.includes("a")&&(r=Buffer.concat([this.getFileSource(o),Buffer.from(r)])),n!==null&&(r=r.toString(n));let l=this.setFileSource(a,r);l!==o&&this.registerEntry(a,l),s!==null&&this.chmodSync(a,s)}prepareWriteFile(e,r){if(typeof e=="number"&&(e=this.fdToPath(e,"read")),this.readOnly)throw ln(`open '${e}'`);let i=this.resolveFilename(`open '${e}'`,e);if(this.listings.has(i))throw rh(`open '${e}'`);let n=null,s=null;typeof r=="string"?n=r:typeof r=="object"&&({encoding:n=null,mode:s=null}=r);let o=this.entries.get(i);return{encoding:n,mode:s,resolvedP:i,index:o}}async unlinkPromise(e){return this.unlinkSync(e)}unlinkSync(e){if(this.readOnly)throw ln(`unlink '${e}'`);let r=this.resolveFilename(`unlink '${e}'`,e);if(this.listings.has(r))throw rh(`unlink '${e}'`);let i=this.entries.get(r);if(typeof i=="undefined")throw $a(`unlink '${e}'`);this.deleteEntry(r,i)}async utimesPromise(e,r,i){return this.utimesSync(e,r,i)}utimesSync(e,r,i){if(this.readOnly)throw ln(`utimes '${e}'`);let n=this.resolveFilename(`utimes '${e}'`,e);this.utimesImpl(n,i)}async lutimesPromise(e,r,i){return this.lutimesSync(e,r,i)}lutimesSync(e,r,i){if(this.readOnly)throw ln(`lutimes '${e}'`);let n=this.resolveFilename(`utimes '${e}'`,e,!1);this.utimesImpl(n,i)}utimesImpl(e,r){this.listings.has(e)&&(this.entries.has(e)||this.hydrateDirectory(e));let i=this.entries.get(e);if(i===void 0)throw new Error("Unreachable");if(this.libzip.file.setMtime(this.zip,i,0,ihe(r),0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async mkdirPromise(e,r){return this.mkdirSync(e,r)}mkdirSync(e,{mode:r=493,recursive:i=!1}={}){if(i){this.mkdirpSync(e,{chmod:r});return}if(this.readOnly)throw ln(`mkdir '${e}'`);let n=this.resolveFilename(`mkdir '${e}'`,e);if(this.entries.has(n)||this.listings.has(n))throw yE(`mkdir '${e}'`);this.hydrateDirectory(n),this.chmodSync(n,r)}async rmdirPromise(e,r){return this.rmdirSync(e,r)}rmdirSync(e,{recursive:r=!1}={}){if(this.readOnly)throw ln(`rmdir '${e}'`);if(r){this.removeSync(e);return}let i=this.resolveFilename(`rmdir '${e}'`,e),n=this.listings.get(i);if(!n)throw eo(`rmdir '${e}'`);if(n.size>0)throw dO(`rmdir '${e}'`);let s=this.entries.get(i);if(typeof s=="undefined")throw $a(`rmdir '${e}'`);this.deleteEntry(e,s)}hydrateDirectory(e){let r=this.libzip.dir.add(this.zip,v.relative(Se.root,e));if(r===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(e),this.registerEntry(e,r),r}async linkPromise(e,r){return this.linkSync(e,r)}linkSync(e,r){throw CO(`link '${e}' -> '${r}'`)}async symlinkPromise(e,r){return this.symlinkSync(e,r)}symlinkSync(e,r){if(this.readOnly)throw ln(`symlink '${e}' -> '${r}'`);let i=this.resolveFilename(`symlink '${e}' -> '${r}'`,r);if(this.listings.has(i))throw rh(`symlink '${e}' -> '${r}'`);if(this.entries.has(i))throw yE(`symlink '${e}' -> '${r}'`);let n=this.setFileSource(i,e);if(this.registerEntry(i,n),this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,(_o|511)<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(e,r){typeof r=="object"&&(r=r?r.encoding:void 0);let i=await this.readFileBuffer(e,{asyncDecompress:!0});return r?i.toString(r):i}readFileSync(e,r){typeof r=="object"&&(r=r?r.encoding:void 0);let i=this.readFileBuffer(e);return r?i.toString(r):i}readFileBuffer(e,r={asyncDecompress:!1}){typeof e=="number"&&(e=this.fdToPath(e,"read"));let i=this.resolveFilename(`open '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw bs(`open '${e}'`);if(e[e.length-1]==="/"&&!this.listings.has(i))throw eo(`open '${e}'`);if(this.listings.has(i))throw rh("read");let n=this.entries.get(i);if(n===void 0)throw new Error("Unreachable");return this.getFileSource(n,r)}async readdirPromise(e,r){return this.readdirSync(e,r)}readdirSync(e,r){let i=this.resolveFilename(`scandir '${e}'`,e);if(!this.entries.has(i)&&!this.listings.has(i))throw bs(`scandir '${e}'`);let n=this.listings.get(i);if(!n)throw eo(`scandir '${e}'`);let s=[...n];return(r==null?void 0:r.withFileTypes)?s.map(o=>Object.assign(this.statImpl("lstat",v.join(e,o)),{name:o})):s}async readlinkPromise(e){let r=this.prepareReadlink(e);return(await this.getFileSource(r,{asyncDecompress:!0})).toString()}readlinkSync(e){let r=this.prepareReadlink(e);return this.getFileSource(r).toString()}prepareReadlink(e){let r=this.resolveFilename(`readlink '${e}'`,e,!1);if(!this.entries.has(r)&&!this.listings.has(r))throw bs(`readlink '${e}'`);if(e[e.length-1]==="/"&&!this.listings.has(r))throw eo(`open '${e}'`);if(this.listings.has(r))throw $a(`readlink '${e}'`);let i=this.entries.get(r);if(i===void 0)throw new Error("Unreachable");if(!this.isSymbolicLink(i))throw $a(`readlink '${e}'`);return i}async truncatePromise(e,r=0){let i=this.resolveFilename(`open '${e}'`,e),n=this.entries.get(i);if(typeof n=="undefined")throw $a(`open '${e}'`);let s=await this.getFileSource(n,{asyncDecompress:!0}),o=Buffer.alloc(r,0);return s.copy(o),await this.writeFilePromise(e,o)}truncateSync(e,r=0){let i=this.resolveFilename(`open '${e}'`,e),n=this.entries.get(i);if(typeof n=="undefined")throw $a(`open '${e}'`);let s=this.getFileSource(n),o=Buffer.alloc(r,0);return s.copy(o),this.writeFileSync(e,o)}watch(e,r,i){let n;switch(typeof r){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=r);break}if(!n)return{on:()=>{},close:()=>{}};let s=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(s)}}}watchFile(e,r,i){let n=v.resolve(Se.root,e);return QE(this,n,r,i)}unwatchFile(e,r){let i=v.resolve(Se.root,e);return nh(this,i,r)}};var fi=class extends eA{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,i){return this.baseFs.openPromise(this.mapToBase(e),r,i)}openSync(e,r,i){return this.baseFs.openSync(this.mapToBase(e),r,i)}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,i,n,s){return await this.baseFs.readPromise(e,r,i,n,s)}readSync(e,r,i,n,s){return this.baseFs.readSync(e,r,i,n,s)}async writePromise(e,r,i,n,s){return typeof r=="string"?await this.baseFs.writePromise(e,r,i):await this.baseFs.writePromise(e,r,i,n,s)}writeSync(e,r,i,n,s){return typeof r=="string"?this.baseFs.writeSync(e,r,i):this.baseFs.writeSync(e,r,i,n,s)}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)}async lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(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 chownPromise(e,r,i){return this.baseFs.chownPromise(this.mapToBase(e),r,i)}chownSync(e,r,i){return this.baseFs.chownSync(this.mapToBase(e),r,i)}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,i=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),i)}copyFileSync(e,r,i=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),i)}async appendFilePromise(e,r,i){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,i)}appendFileSync(e,r,i){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,i)}async writeFilePromise(e,r,i){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,i)}writeFileSync(e,r,i){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,i)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,i){return this.baseFs.utimesPromise(this.mapToBase(e),r,i)}utimesSync(e,r,i){return this.baseFs.utimesSync(this.mapToBase(e),r,i)}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 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,i){let n=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),n,i);let s=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),o=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(n),s);return this.baseFs.symlinkPromise(o,n,i)}symlinkSync(e,r,i){let n=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),n,i);let s=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),o=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(n),s);return this.baseFs.symlinkSync(o,n,i)}async readFilePromise(e,r){return r==="utf8"?this.baseFs.readFilePromise(this.fsMapToBase(e),r):this.baseFs.readFilePromise(this.fsMapToBase(e),r)}readFileSync(e,r){return r==="utf8"?this.baseFs.readFileSync(this.fsMapToBase(e),r):this.baseFs.readFileSync(this.fsMapToBase(e),r)}async 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)}watch(e,r,i){return this.baseFs.watch(this.mapToBase(e),r,i)}watchFile(e,r,i){return this.baseFs.watchFile(this.mapToBase(e),r,i)}unwatchFile(e,r){return this.baseFs.unwatchFile(this.mapToBase(e),r)}fsMapToBase(e){return typeof e=="number"?e:this.mapToBase(e)}};var Xo=class extends fi{constructor(e,{baseFs:r,pathUtils:i}){super(i);this.target=e,this.baseFs=r}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(e){return e}mapToBase(e){return e}};var Ft=class extends fi{constructor(e,{baseFs:r=new Wt}={}){super(v);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)?v.normalize(e):this.baseFs.resolve(v.join(this.target,e))}mapFromBase(e){return e}mapToBase(e){return this.pathUtils.isAbsolute(e)?e:this.pathUtils.join(this.target,e)}};var vO=Se.root,Zo=class extends fi{constructor(e,{baseFs:r=new Wt}={}){super(v);this.target=this.pathUtils.resolve(Se.root,e),this.baseFs=r}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(Se.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(vO,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(vO,this.pathUtils.relative(this.target,e))}};var oh=class extends fi{constructor(e,r){super(r);this.instance=null;this.factory=e}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(e){this.instance=e}mapFromBase(e){return e}mapToBase(e){return e}};var ze=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"}),gb=class extends eA{constructor(){super(v)}getExtractHint(){throw ze()}getRealPath(){throw ze()}resolve(){throw ze()}async openPromise(){throw ze()}openSync(){throw ze()}async opendirPromise(){throw ze()}opendirSync(){throw ze()}async readPromise(){throw ze()}readSync(){throw ze()}async writePromise(){throw ze()}writeSync(){throw ze()}async closePromise(){throw ze()}closeSync(){throw ze()}createWriteStream(){throw ze()}createReadStream(){throw ze()}async realpathPromise(){throw ze()}realpathSync(){throw ze()}async readdirPromise(){throw ze()}readdirSync(){throw ze()}async existsPromise(e){throw ze()}existsSync(e){throw ze()}async accessPromise(){throw ze()}accessSync(){throw ze()}async statPromise(){throw ze()}statSync(){throw ze()}async fstatPromise(e){throw ze()}fstatSync(e){throw ze()}async lstatPromise(e){throw ze()}lstatSync(e){throw ze()}async chmodPromise(){throw ze()}chmodSync(){throw ze()}async chownPromise(){throw ze()}chownSync(){throw ze()}async mkdirPromise(){throw ze()}mkdirSync(){throw ze()}async rmdirPromise(){throw ze()}rmdirSync(){throw ze()}async linkPromise(){throw ze()}linkSync(){throw ze()}async symlinkPromise(){throw ze()}symlinkSync(){throw ze()}async renamePromise(){throw ze()}renameSync(){throw ze()}async copyFilePromise(){throw ze()}copyFileSync(){throw ze()}async appendFilePromise(){throw ze()}appendFileSync(){throw ze()}async writeFilePromise(){throw ze()}writeFileSync(){throw ze()}async unlinkPromise(){throw ze()}unlinkSync(){throw ze()}async utimesPromise(){throw ze()}utimesSync(){throw ze()}async readFilePromise(){throw ze()}readFileSync(){throw ze()}async readlinkPromise(){throw ze()}readlinkSync(){throw ze()}async truncatePromise(){throw ze()}truncateSync(){throw ze()}watch(){throw ze()}watchFile(){throw ze()}unwatchFile(){throw ze()}},bE=gb;bE.instance=new gb;var ah=class extends fi{constructor(e){super(M);this.baseFs=e}mapFromBase(e){return M.fromPortablePath(e)}mapToBase(e){return M.toPortablePath(e)}};var nhe=/^[0-9]+$/,fb=/^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,she=/^([^/]+-)?[a-f0-9]+$/,Pr=class extends fi{static makeVirtualPath(e,r,i){if(v.basename(e)!=="__virtual__")throw new Error('Assertion failed: Virtual folders must be named "__virtual__"');if(!v.basename(r).match(she))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");let s=v.relative(v.dirname(e),i).split("/"),o=0;for(;o{let r=t.indexOf(e);if(r<=0)return null;let i=r;for(;r>=0&&(i=r+e.length,t[i]!==v.sep);){if(t[r-1]===v.sep)return null;r=t.indexOf(e,i)}return t.length>i&&t[i]!==v.sep?null:t.slice(0,i)},Jn=class extends gl{constructor({libzip:e,baseFs:r=new Wt,filter:i=null,maxOpenFiles:n=Infinity,readOnlyArchives:s=!1,useCache:o=!0,maxAge:a=5e3,fileExtensions:l=null}){super();this.fdMap=new Map;this.nextFd=3;this.isZip=new Set;this.notZip=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.libzipFactory=typeof e!="function"?()=>e:e,this.baseFs=r,this.zipInstances=o?new Map:null,this.filter=i,this.maxOpenFiles=n,this.readOnlyArchives=s,this.maxAge=a,this.fileExtensions=l}static async openPromise(e,r){let i=new Jn(r);try{return await e(i)}finally{i.saveAndClose()}}get libzip(){return typeof this.libzipInstance=="undefined"&&(this.libzipInstance=this.libzipFactory()),this.libzipInstance}getExtractHint(e){return this.baseFs.getExtractHint(e)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(sh(this),this.zipInstances)for(let[e,{zipFs:r}]of this.zipInstances.entries())r.saveAndClose(),this.zipInstances.delete(e)}discardAndClose(){if(sh(this),this.zipInstances)for(let[e,{zipFs:r}]of this.zipInstances.entries())r.discardAndClose(),this.zipInstances.delete(e)}resolve(e){return this.baseFs.resolve(e)}remapFd(e,r){let i=this.nextFd++|$o;return this.fdMap.set(i,[e,r]),i}async openPromise(e,r,i){return await this.makeCallPromise(e,async()=>await this.baseFs.openPromise(e,r,i),async(n,{subPath:s})=>this.remapFd(n,await n.openPromise(s,r,i)))}openSync(e,r,i){return this.makeCallSync(e,()=>this.baseFs.openSync(e,r,i),(n,{subPath:s})=>this.remapFd(n,n.openSync(s,r,i)))}async opendirPromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.opendirPromise(e,r),async(i,{subPath:n})=>await i.opendirPromise(n,r),{requireSubpath:!1})}opendirSync(e,r){return this.makeCallSync(e,()=>this.baseFs.opendirSync(e,r),(i,{subPath:n})=>i.opendirSync(n,r),{requireSubpath:!1})}async readPromise(e,r,i,n,s){if((e&$o)==0)return await this.baseFs.readPromise(e,r,i,n,s);let o=this.fdMap.get(e);if(typeof o=="undefined")throw Hi("read");let[a,l]=o;return await a.readPromise(l,r,i,n,s)}readSync(e,r,i,n,s){if((e&$o)==0)return this.baseFs.readSync(e,r,i,n,s);let o=this.fdMap.get(e);if(typeof o=="undefined")throw Hi("readSync");let[a,l]=o;return a.readSync(l,r,i,n,s)}async writePromise(e,r,i,n,s){if((e&$o)==0)return typeof r=="string"?await this.baseFs.writePromise(e,r,i):await this.baseFs.writePromise(e,r,i,n,s);let o=this.fdMap.get(e);if(typeof o=="undefined")throw Hi("write");let[a,l]=o;return typeof r=="string"?await a.writePromise(l,r,i):await a.writePromise(l,r,i,n,s)}writeSync(e,r,i,n,s){if((e&$o)==0)return typeof r=="string"?this.baseFs.writeSync(e,r,i):this.baseFs.writeSync(e,r,i,n,s);let o=this.fdMap.get(e);if(typeof o=="undefined")throw Hi("writeSync");let[a,l]=o;return typeof r=="string"?a.writeSync(l,r,i):a.writeSync(l,r,i,n,s)}async closePromise(e){if((e&$o)==0)return await this.baseFs.closePromise(e);let r=this.fdMap.get(e);if(typeof r=="undefined")throw Hi("close");this.fdMap.delete(e);let[i,n]=r;return await i.closePromise(n)}closeSync(e){if((e&$o)==0)return this.baseFs.closeSync(e);let r=this.fdMap.get(e);if(typeof r=="undefined")throw Hi("closeSync");this.fdMap.delete(e);let[i,n]=r;return i.closeSync(n)}createReadStream(e,r){return e===null?this.baseFs.createReadStream(e,r):this.makeCallSync(e,()=>this.baseFs.createReadStream(e,r),(i,{subPath:n})=>i.createReadStream(n,r))}createWriteStream(e,r){return e===null?this.baseFs.createWriteStream(e,r):this.makeCallSync(e,()=>this.baseFs.createWriteStream(e,r),(i,{subPath:n})=>i.createWriteStream(n,r))}async realpathPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.realpathPromise(e),async(r,{archivePath:i,subPath:n})=>{let s=this.realPaths.get(i);return typeof s=="undefined"&&(s=await this.baseFs.realpathPromise(i),this.realPaths.set(i,s)),this.pathUtils.join(s,this.pathUtils.relative(Se.root,await r.realpathPromise(n)))})}realpathSync(e){return this.makeCallSync(e,()=>this.baseFs.realpathSync(e),(r,{archivePath:i,subPath:n})=>{let s=this.realPaths.get(i);return typeof s=="undefined"&&(s=this.baseFs.realpathSync(i),this.realPaths.set(i,s)),this.pathUtils.join(s,this.pathUtils.relative(Se.root,r.realpathSync(n)))})}async existsPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.existsPromise(e),async(r,{subPath:i})=>await r.existsPromise(i))}existsSync(e){return this.makeCallSync(e,()=>this.baseFs.existsSync(e),(r,{subPath:i})=>r.existsSync(i))}async accessPromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.accessPromise(e,r),async(i,{subPath:n})=>await i.accessPromise(n,r))}accessSync(e,r){return this.makeCallSync(e,()=>this.baseFs.accessSync(e,r),(i,{subPath:n})=>i.accessSync(n,r))}async statPromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.statPromise(e,r),async(i,{subPath:n})=>await i.statPromise(n,r))}statSync(e,r){return this.makeCallSync(e,()=>this.baseFs.statSync(e,r),(i,{subPath:n})=>i.statSync(n,r))}async fstatPromise(e,r){if((e&$o)==0)return this.baseFs.fstatPromise(e,r);let i=this.fdMap.get(e);if(typeof i=="undefined")throw Hi("fstat");let[n,s]=i;return n.fstatPromise(s,r)}fstatSync(e,r){if((e&$o)==0)return this.baseFs.fstatSync(e,r);let i=this.fdMap.get(e);if(typeof i=="undefined")throw Hi("fstatSync");let[n,s]=i;return n.fstatSync(s,r)}async lstatPromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.lstatPromise(e,r),async(i,{subPath:n})=>await i.lstatPromise(n,r))}lstatSync(e,r){return this.makeCallSync(e,()=>this.baseFs.lstatSync(e,r),(i,{subPath:n})=>i.lstatSync(n,r))}async chmodPromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.chmodPromise(e,r),async(i,{subPath:n})=>await i.chmodPromise(n,r))}chmodSync(e,r){return this.makeCallSync(e,()=>this.baseFs.chmodSync(e,r),(i,{subPath:n})=>i.chmodSync(n,r))}async chownPromise(e,r,i){return await this.makeCallPromise(e,async()=>await this.baseFs.chownPromise(e,r,i),async(n,{subPath:s})=>await n.chownPromise(s,r,i))}chownSync(e,r,i){return this.makeCallSync(e,()=>this.baseFs.chownSync(e,r,i),(n,{subPath:s})=>n.chownSync(s,r,i))}async renamePromise(e,r){return await this.makeCallPromise(e,async()=>await this.makeCallPromise(r,async()=>await this.baseFs.renamePromise(e,r),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(i,{subPath:n})=>await this.makeCallPromise(r,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(s,{subPath:o})=>{if(i!==s)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await i.renamePromise(n,o)}))}renameSync(e,r){return this.makeCallSync(e,()=>this.makeCallSync(r,()=>this.baseFs.renameSync(e,r),()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(i,{subPath:n})=>this.makeCallSync(r,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(s,{subPath:o})=>{if(i!==s)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return i.renameSync(n,o)}))}async copyFilePromise(e,r,i=0){let n=async(s,o,a,l)=>{if((i&Ah.constants.COPYFILE_FICLONE_FORCE)!=0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${o}' -> ${l}'`),{code:"EXDEV"});if(i&Ah.constants.COPYFILE_EXCL&&await this.existsPromise(o))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${o}' -> '${l}'`),{code:"EEXIST"});let c;try{c=await s.readFilePromise(o)}catch(u){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${o}' -> '${l}'`),{code:"EINVAL"})}await a.writeFilePromise(l,c)};return await this.makeCallPromise(e,async()=>await this.makeCallPromise(r,async()=>await this.baseFs.copyFilePromise(e,r,i),async(s,{subPath:o})=>await n(this.baseFs,e,s,o)),async(s,{subPath:o})=>await this.makeCallPromise(r,async()=>await n(s,o,this.baseFs,r),async(a,{subPath:l})=>s!==a?await n(s,o,a,l):await s.copyFilePromise(o,l,i)))}copyFileSync(e,r,i=0){let n=(s,o,a,l)=>{if((i&Ah.constants.COPYFILE_FICLONE_FORCE)!=0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${o}' -> ${l}'`),{code:"EXDEV"});if(i&Ah.constants.COPYFILE_EXCL&&this.existsSync(o))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${o}' -> '${l}'`),{code:"EEXIST"});let c;try{c=s.readFileSync(o)}catch(u){throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${o}' -> '${l}'`),{code:"EINVAL"})}a.writeFileSync(l,c)};return this.makeCallSync(e,()=>this.makeCallSync(r,()=>this.baseFs.copyFileSync(e,r,i),(s,{subPath:o})=>n(this.baseFs,e,s,o)),(s,{subPath:o})=>this.makeCallSync(r,()=>n(s,o,this.baseFs,r),(a,{subPath:l})=>s!==a?n(s,o,a,l):s.copyFileSync(o,l,i)))}async appendFilePromise(e,r,i){return await this.makeCallPromise(e,async()=>await this.baseFs.appendFilePromise(e,r,i),async(n,{subPath:s})=>await n.appendFilePromise(s,r,i))}appendFileSync(e,r,i){return this.makeCallSync(e,()=>this.baseFs.appendFileSync(e,r,i),(n,{subPath:s})=>n.appendFileSync(s,r,i))}async writeFilePromise(e,r,i){return await this.makeCallPromise(e,async()=>await this.baseFs.writeFilePromise(e,r,i),async(n,{subPath:s})=>await n.writeFilePromise(s,r,i))}writeFileSync(e,r,i){return this.makeCallSync(e,()=>this.baseFs.writeFileSync(e,r,i),(n,{subPath:s})=>n.writeFileSync(s,r,i))}async unlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.unlinkPromise(e),async(r,{subPath:i})=>await r.unlinkPromise(i))}unlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.unlinkSync(e),(r,{subPath:i})=>r.unlinkSync(i))}async utimesPromise(e,r,i){return await this.makeCallPromise(e,async()=>await this.baseFs.utimesPromise(e,r,i),async(n,{subPath:s})=>await n.utimesPromise(s,r,i))}utimesSync(e,r,i){return this.makeCallSync(e,()=>this.baseFs.utimesSync(e,r,i),(n,{subPath:s})=>n.utimesSync(s,r,i))}async mkdirPromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.mkdirPromise(e,r),async(i,{subPath:n})=>await i.mkdirPromise(n,r))}mkdirSync(e,r){return this.makeCallSync(e,()=>this.baseFs.mkdirSync(e,r),(i,{subPath:n})=>i.mkdirSync(n,r))}async rmdirPromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.rmdirPromise(e,r),async(i,{subPath:n})=>await i.rmdirPromise(n,r))}rmdirSync(e,r){return this.makeCallSync(e,()=>this.baseFs.rmdirSync(e,r),(i,{subPath:n})=>i.rmdirSync(n,r))}async linkPromise(e,r){return await this.makeCallPromise(r,async()=>await this.baseFs.linkPromise(e,r),async(i,{subPath:n})=>await i.linkPromise(e,n))}linkSync(e,r){return this.makeCallSync(r,()=>this.baseFs.linkSync(e,r),(i,{subPath:n})=>i.linkSync(e,n))}async symlinkPromise(e,r,i){return await this.makeCallPromise(r,async()=>await this.baseFs.symlinkPromise(e,r,i),async(n,{subPath:s})=>await n.symlinkPromise(e,s))}symlinkSync(e,r,i){return this.makeCallSync(r,()=>this.baseFs.symlinkSync(e,r,i),(n,{subPath:s})=>n.symlinkSync(e,s))}async readFilePromise(e,r){return this.makeCallPromise(e,async()=>{switch(r){case"utf8":return await this.baseFs.readFilePromise(e,r);default:return await this.baseFs.readFilePromise(e,r)}},async(i,{subPath:n})=>await i.readFilePromise(n,r))}readFileSync(e,r){return this.makeCallSync(e,()=>{switch(r){case"utf8":return this.baseFs.readFileSync(e,r);default:return this.baseFs.readFileSync(e,r)}},(i,{subPath:n})=>i.readFileSync(n,r))}async readdirPromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.readdirPromise(e,r),async(i,{subPath:n})=>await i.readdirPromise(n,r),{requireSubpath:!1})}readdirSync(e,r){return this.makeCallSync(e,()=>this.baseFs.readdirSync(e,r),(i,{subPath:n})=>i.readdirSync(n,r),{requireSubpath:!1})}async readlinkPromise(e){return await this.makeCallPromise(e,async()=>await this.baseFs.readlinkPromise(e),async(r,{subPath:i})=>await r.readlinkPromise(i))}readlinkSync(e){return this.makeCallSync(e,()=>this.baseFs.readlinkSync(e),(r,{subPath:i})=>r.readlinkSync(i))}async truncatePromise(e,r){return await this.makeCallPromise(e,async()=>await this.baseFs.truncatePromise(e,r),async(i,{subPath:n})=>await i.truncatePromise(n,r))}truncateSync(e,r){return this.makeCallSync(e,()=>this.baseFs.truncateSync(e,r),(i,{subPath:n})=>i.truncateSync(n,r))}watch(e,r,i){return this.makeCallSync(e,()=>this.baseFs.watch(e,r,i),(n,{subPath:s})=>n.watch(s,r,i))}watchFile(e,r,i){return this.makeCallSync(e,()=>this.baseFs.watchFile(e,r,i),()=>QE(this,e,r,i))}unwatchFile(e,r){return this.makeCallSync(e,()=>this.baseFs.unwatchFile(e,r),()=>nh(this,e,r))}async makeCallPromise(e,r,i,{requireSubpath:n=!0}={}){if(typeof e!="string")return await r();let s=this.resolve(e),o=this.findZip(s);return o?n&&o.subPath==="/"?await r():await this.getZipPromise(o.archivePath,async a=>await i(a,o)):await r()}makeCallSync(e,r,i,{requireSubpath:n=!0}={}){if(typeof e!="string")return r();let s=this.resolve(e),o=this.findZip(s);return!o||n&&o.subPath==="/"?r():this.getZipSync(o.archivePath,a=>i(a,o))}findZip(e){if(this.filter&&!this.filter.test(e))return null;let r="";for(;;){let i=e.substr(r.length),n;if(!this.fileExtensions)n=SO(i,".zip");else for(let s of this.fileExtensions)if(n=SO(i,s),n)break;if(!n)return null;if(r=this.pathUtils.join(r,n),this.isZip.has(r)===!1){if(this.notZip.has(r))continue;try{if(!this.baseFs.lstatSync(r).isFile()){this.notZip.add(r);continue}}catch{return null}this.isZip.add(r)}return{archivePath:r,subPath:this.pathUtils.join(Se.root,e.substr(r.length))}}}limitOpenFiles(e){if(this.zipInstances===null)return;let r=Date.now(),i=r+this.maxAge,n=e===null?0:this.zipInstances.size-e;for(let[s,{zipFs:o,expiresAt:a,refCount:l}]of this.zipInstances.entries())if(!(l!==0||o.hasOpenFileHandles())){if(r>=a){o.saveAndClose(),this.zipInstances.delete(s),n-=1;continue}else if(e===null||n<=0){i=a;break}o.saveAndClose(),this.zipInstances.delete(s),n-=1}this.limitOpenFilesTimeout===null&&(e===null&&this.zipInstances.size>0||e!==null)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},i-r).unref())}async getZipPromise(e,r){let i=async()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:await this.baseFs.statPromise(e)});if(this.zipInstances){let n=this.zipInstances.get(e);if(!n){let s=await i();n=this.zipInstances.get(e),n||(n={zipFs:new Jr(e,s),expiresAt:0,refCount:0})}this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,n),n.expiresAt=Date.now()+this.maxAge,n.refCount+=1;try{return await r(n.zipFs)}finally{n.refCount-=1}}else{let n=new Jr(e,await i());try{return await r(n)}finally{n.saveAndClose()}}}getZipSync(e,r){let i=()=>({baseFs:this.baseFs,libzip:this.libzip,readOnly:this.readOnlyArchives,stats:this.baseFs.statSync(e)});if(this.zipInstances){let n=this.zipInstances.get(e);return n||(n={zipFs:new Jr(e,i()),expiresAt:0,refCount:0}),this.zipInstances.delete(e),this.limitOpenFiles(this.maxOpenFiles-1),this.zipInstances.set(e,n),n.expiresAt=Date.now()+this.maxAge,r(n.zipFs)}else{let n=new Jr(e,i());try{return r(n)}finally{n.saveAndClose()}}}};var lh=ie(require("util"));var vE=ie(require("url"));var hb=class extends fi{constructor(e){super(M);this.baseFs=e}mapFromBase(e){return e}mapToBase(e){return e instanceof vE.URL?(0,vE.fileURLToPath)(e):e}};var ohe=new Set(["accessSync","appendFileSync","createReadStream","createWriteStream","chmodSync","chownSync","closeSync","copyFileSync","linkSync","lstatSync","fstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","statSync","symlinkSync","truncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),xO=new Set(["accessPromise","appendFilePromise","chmodPromise","chownPromise","closePromise","copyFilePromise","linkPromise","fstatPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","statPromise","symlinkPromise","truncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"]),ahe=new Set(["appendFilePromise","chmodPromise","chownPromise","closePromise","readPromise","readFilePromise","statPromise","truncatePromise","utimesPromise","writePromise","writeFilePromise"]);function pb(t,e){e=new hb(e);let r=(i,n,s)=>{let o=i[n];i[n]=s,typeof(o==null?void 0:o[lh.promisify.custom])!="undefined"&&(s[lh.promisify.custom]=o[lh.promisify.custom])};{r(t,"exists",(i,...n)=>{let o=typeof n[n.length-1]=="function"?n.pop():()=>{};process.nextTick(()=>{e.existsPromise(i).then(a=>{o(a)},()=>{o(!1)})})}),r(t,"read",(i,n,...s)=>{let a=typeof s[s.length-1]=="function"?s.pop():()=>{};process.nextTick(()=>{e.readPromise(i,n,...s).then(l=>{a(null,l,n)},l=>{a(l,0,n)})})});for(let i of xO){let n=i.replace(/Promise$/,"");if(typeof t[n]=="undefined")continue;let s=e[i];if(typeof s=="undefined")continue;r(t,n,(...a)=>{let c=typeof a[a.length-1]=="function"?a.pop():()=>{};process.nextTick(()=>{s.apply(e,a).then(u=>{c(null,u)},u=>{c(u)})})})}t.realpath.native=t.realpath}{r(t,"existsSync",i=>{try{return e.existsSync(i)}catch(n){return!1}});for(let i of ohe){let n=i;if(typeof t[n]=="undefined")continue;let s=e[i];typeof s!="undefined"&&r(t,n,s.bind(e))}t.realpathSync.native=t.realpathSync}{let i=process.emitWarning;process.emitWarning=()=>{};let n;try{n=t.promises}finally{process.emitWarning=i}if(typeof n!="undefined"){for(let o of xO){let a=o.replace(/Promise$/,"");if(typeof n[a]=="undefined")continue;let l=e[o];typeof l!="undefined"&&o!=="open"&&r(n,a,l.bind(e))}class s{constructor(a){this.fd=a}}for(let o of ahe){let a=o.replace(/Promise$/,""),l=e[o];typeof l!="undefined"&&r(s.prototype,a,function(...c){return l.call(e,this.fd,...c)})}r(n,"open",async(...o)=>{let a=await e.openPromise(...o);return new s(a)})}}t.read[lh.promisify.custom]=async(i,n,...s)=>({bytesRead:await e.readPromise(i,n,...s),buffer:n})}function SE(t,e){let r=Object.create(t);return pb(r,e),r}var kO=ie(require("os"));function PO(t){let e=M.toPortablePath(kO.default.tmpdir()),r=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,"0");return v.join(e,`${t}${r}`)}var vs=new Set,DO=!1;function RO(){DO||(DO=!0,process.once("exit",()=>{T.rmtempSync()}))}var T=Object.assign(new Wt,{detachTemp(t){vs.delete(t)},mktempSync(t){for(RO();;){let e=PO("xfs-");try{this.mkdirSync(e)}catch(i){if(i.code==="EEXIST")continue;throw i}let r=this.realpathSync(e);if(vs.add(r),typeof t!="undefined")try{return t(r)}finally{if(vs.has(r)){vs.delete(r);try{this.removeSync(r)}catch{}}}else return r}},async mktempPromise(t){for(RO();;){let e=PO("xfs-");try{await this.mkdirPromise(e)}catch(i){if(i.code==="EEXIST")continue;throw i}let r=await this.realpathPromise(e);if(vs.add(r),typeof t!="undefined")try{return await t(r)}finally{if(vs.has(r)){vs.delete(r);try{await this.removePromise(r)}catch{}}}else return r}},async rmtempPromise(){await Promise.all(Array.from(vs.values()).map(async t=>{try{await T.removePromise(t,{maxRetries:0}),vs.delete(t)}catch{}}))},rmtempSync(){for(let t of vs)try{T.removeSync(t),vs.delete(t)}catch{}}});var vb=ie(bb()),Pn;(function(i){i[i.Never=0]="Never",i[i.ErrorCode=1]="ErrorCode",i[i.Always=2]="Always"})(Pn||(Pn={}));function dl(t){return t!==null&&typeof t.fd=="number"}var Cl=new Set;function Sb(){}function xb(){for(let t of Cl)t.kill()}async function to(t,e,{cwd:r,env:i=process.env,strict:n=!1,stdin:s=null,stdout:o,stderr:a,end:l=2}){let c=["pipe","pipe","pipe"];s===null?c[0]="ignore":dl(s)&&(c[0]=s),dl(o)&&(c[1]=o),dl(a)&&(c[2]=a);let u=(0,vb.default)(t,e,{cwd:M.fromPortablePath(r),env:_(P({},i),{PWD:M.fromPortablePath(r)}),stdio:c});Cl.add(u),Cl.size===1&&(process.on("SIGINT",Sb),process.on("SIGTERM",xb)),!dl(s)&&s!==null&&s.pipe(u.stdin),dl(o)||u.stdout.pipe(o,{end:!1}),dl(a)||u.stderr.pipe(a,{end:!1});let g=()=>{for(let f of new Set([o,a]))dl(f)||f.end()};return new Promise((f,h)=>{u.on("error",p=>{Cl.delete(u),Cl.size===0&&(process.off("SIGINT",Sb),process.off("SIGTERM",xb)),(l===2||l===1)&&g(),h(p)}),u.on("close",(p,d)=>{Cl.delete(u),Cl.size===0&&(process.off("SIGINT",Sb),process.off("SIGTERM",xb)),(l===2||l===1&&p>0)&&g(),p===0||!n?f({code:kb(p,d)}):h(p!==null?new Error(`Child "${t}" exited with exit code ${p}`):new Error(`Child "${t}" exited with signal ${d}`))})})}async function Nhe(t,e,{cwd:r,env:i=process.env,encoding:n="utf8",strict:s=!1}){let o=["ignore","pipe","pipe"],a=[],l=[],c=M.fromPortablePath(r);typeof i.PWD!="undefined"&&(i=_(P({},i),{PWD:c}));let u=(0,vb.default)(t,e,{cwd:c,env:i,stdio:o});return u.stdout.on("data",g=>{a.push(g)}),u.stderr.on("data",g=>{l.push(g)}),await new Promise((g,f)=>{u.on("error",()=>{f()}),u.on("close",(h,p)=>{let d=n==="buffer"?Buffer.concat(a):Buffer.concat(a).toString(n),m=n==="buffer"?Buffer.concat(l):Buffer.concat(l).toString(n);h===0||!s?g({code:kb(h,p),stdout:d,stderr:m}):f(Object.assign(new Error(`Child "${t}" exited with exit code ${h} - -${m}`),{code:kb(h,p),stdout:d,stderr:m}))})})}var Lhe=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]]);function kb(t,e){let r=Lhe.get(e);return typeof r!="undefined"?128+r:t!=null?t:1}var Pb={};it(Pb,{getDefaultGlobalFolder:()=>Rb,getHomeFolder:()=>uh,isFolderInside:()=>Fb});var Db=ie(require("os"));function Rb(){if(process.platform==="win32"){let t=M.toPortablePath(process.env.LOCALAPPDATA||M.join((0,Db.homedir)(),"AppData","Local"));return v.resolve(t,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){let t=M.toPortablePath(process.env.XDG_DATA_HOME);return v.resolve(t,"yarn/berry")}return v.resolve(uh(),".yarn/berry")}function uh(){return M.toPortablePath((0,Db.homedir)()||"/usr/local/share")}function Fb(t,e){let r=v.relative(e,t);return r&&!r.startsWith("..")&&!v.isAbsolute(r)}var ue={};it(ue,{LogLevel:()=>Ts,Style:()=>Gl,Type:()=>Le,addLogFilterSupport:()=>Cp,applyColor:()=>On,applyHyperlink:()=>Ku,applyStyle:()=>Py,json:()=>Uu,mark:()=>xx,pretty:()=>Ve,prettyField:()=>Yl,prettyList:()=>Kx,supportsColor:()=>xy,supportsHyperlinks:()=>Mx,tuple:()=>jl});var pp=ie(jb()),dp=ie(ml()),o3=ie(Nn()),a3=ie(gU());var z;(function(te){te[te.UNNAMED=0]="UNNAMED",te[te.EXCEPTION=1]="EXCEPTION",te[te.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",te[te.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",te[te.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",te[te.BUILD_DISABLED=5]="BUILD_DISABLED",te[te.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",te[te.MUST_BUILD=7]="MUST_BUILD",te[te.MUST_REBUILD=8]="MUST_REBUILD",te[te.BUILD_FAILED=9]="BUILD_FAILED",te[te.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",te[te.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",te[te.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",te[te.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",te[te.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",te[te.REMOTE_INVALID=15]="REMOTE_INVALID",te[te.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",te[te.RESOLUTION_PACK=17]="RESOLUTION_PACK",te[te.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",te[te.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",te[te.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",te[te.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",te[te.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",te[te.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",te[te.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",te[te.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",te[te.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",te[te.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",te[te.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",te[te.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",te[te.FETCH_FAILED=30]="FETCH_FAILED",te[te.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",te[te.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",te[te.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",te[te.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",te[te.NETWORK_ERROR=35]="NETWORK_ERROR",te[te.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",te[te.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",te[te.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",te[te.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",te[te.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",te[te.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",te[te.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",te[te.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",te[te.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",te[te.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",te[te.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",te[te.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",te[te.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",te[te.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",te[te.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",te[te.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",te[te.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",te[te.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",te[te.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",te[te.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",te[te.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",te[te.INVALID_MANIFEST=57]="INVALID_MANIFEST",te[te.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",te[te.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",te[te.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",te[te.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",te[te.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",te[te.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",te[te.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",te[te.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",te[te.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",te[te.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",te[te.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",te[te.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION",te[te.AUTO_NM_SUCCESS=70]="AUTO_NM_SUCCESS",te[te.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]="NM_CANT_INSTALL_EXTERNAL_SOFT_LINK",te[te.NM_PRESERVE_SYMLINKS_REQUIRED=72]="NM_PRESERVE_SYMLINKS_REQUIRED",te[te.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]="UPDATE_LOCKFILE_ONLY_SKIP_LINK",te[te.NM_HARDLINKS_MODE_DOWNGRADED=74]="NM_HARDLINKS_MODE_DOWNGRADED",te[te.PROLOG_INSTANTIATION_ERROR=75]="PROLOG_INSTANTIATION_ERROR",te[te.INCOMPATIBLE_ARCHITECTURE=76]="INCOMPATIBLE_ARCHITECTURE",te[te.GHOST_ARCHITECTURE=77]="GHOST_ARCHITECTURE"})(z||(z={}));function KE(t){return`YN${t.toString(10).padStart(4,"0")}`}var de={};it(de,{BufferStream:()=>OH,CachingStrategy:()=>Dl,DefaultStream:()=>KH,assertNever:()=>Lv,bufferStream:()=>Cu,buildIgnorePattern:()=>DEe,convertMapsToIndexableObjects:()=>aI,dynamicRequire:()=>mu,escapeRegExp:()=>SEe,getArrayWithDefault:()=>hu,getFactoryWithDefault:()=>na,getMapWithDefault:()=>pu,getSetWithDefault:()=>Pl,isIndexableObject:()=>Tv,isPathLike:()=>REe,isTaggedYarnVersion:()=>vEe,mapAndFilter:()=>kl,mapAndFind:()=>MH,overrideType:()=>Nv,parseBoolean:()=>Hh,parseOptionalBoolean:()=>jH,prettifyAsyncErrors:()=>du,prettifySyncErrors:()=>Mv,releaseAfterUseAsync:()=>kEe,replaceEnvVariables:()=>Ov,sortMap:()=>gn,tryParseOptionalBoolean:()=>Kv,validateEnum:()=>xEe});var vh={};it(vh,{Builtins:()=>Iv,Cli:()=>oo,Command:()=>ye,Option:()=>Y,UsageError:()=>me});var yl=0,Eh=1,Gi=2,sv="",hi="\0",Au=-1,ov=/^(-h|--help)(?:=([0-9]+))?$/,UE=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,fU=/^-[a-zA-Z]{2,}$/,av=/^([^=]+)=([\s\S]*)$/,Av=process.env.DEBUG_CLI==="1";var me=class extends Error{constructor(e){super(e);this.clipanion={type:"usage"},this.name="UsageError"}},Ih=class extends Error{constructor(e,r){super();if(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(i=>i.reason!==null&&i.reason===r[0].reason)){let[{reason:i}]=this.candidates;this.message=`${i} - -${this.candidates.map(({usage:n})=>`$ ${n}`).join(` -`)}`}else if(this.candidates.length===1){let[{usage:i}]=this.candidates;this.message=`Command not found; did you mean: - -$ ${i} -${lv(e)}`}else this.message=`Command not found; did you mean one of: - -${this.candidates.map(({usage:i},n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${lv(e)}`}},cv=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: - -${this.usages.map((i,n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${lv(e)}`}},lv=t=>`While running ${t.filter(e=>e!==hi).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`;var yh=Symbol("clipanion/isOption");function ji(t){return _(P({},t),{[yh]:!0})}function so(t,e){return typeof t=="undefined"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function HE(t,e=!1){let r=t.replace(/^\.: /,"");return e&&(r=r[0].toLowerCase()+r.slice(1)),r}function wh(t,e){return e.length===1?new me(`${t}: ${HE(e[0],!0)}`):new me(`${t}: -${e.map(r=>` -- ${HE(r)}`).join("")}`)}function Bh(t,e,r){if(typeof r=="undefined")return e;let i=[],n=[],s=a=>{let l=e;return e=a,s.bind(null,l)};if(!r(e,{errors:i,coercions:n,coercion:s}))throw wh(`Invalid value for ${t}`,i);for(let[,a]of n)a();return e}var ye=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(typeof r!="undefined"){let{isDict:n,isUnknown:s,applyCascade:o}=await Promise.resolve().then(()=>(Ss(),lu)),a=o(n(s()),r),l=[],c=[];if(!a(this,{errors:l,coercions:c}))throw wh("Invalid option schema",l);for(let[,g]of c)g()}let i=await this.execute();return typeof i!="undefined"?i:0}};ye.isOption=yh;ye.Default=[];function un(t){Av&&console.log(t)}var BU={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:Au};function QU(){return{nodes:[qi(),qi(),qi()]}}function nCe(t){let e=QU(),r=[],i=e.nodes.length;for(let n of t){r.push(i);for(let s=0;s{if(e.has(i))return;e.add(i);let n=t.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)r(a);for(let[,{to:o}]of n.dynamics)r(o);for(let{to:o}of n.shortcuts)r(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=t.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};r(yl)}function oCe(t,{prefix:e=""}={}){if(Av){un(`${e}Nodes are:`);for(let r=0;rl!==Gi).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===Gi))throw new Ih(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=aCe(a)}if(i.length>0){un(" Results:");for(let s of i)un(` - ${s.node} -> ${JSON.stringify(s.state)}`)}else un(" No results");return i}function ACe(t,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(t.statics,hi)){for(let{to:r}of t.statics[hi])if(r===Eh)return!0}return!1}function cCe(t,e,r){let i=r&&e.length>0?[""]:[],n=vU(t,e,r),s=[],o=new Set,a=(l,c,u=!0)=>{let g=[c];for(;g.length>0;){let h=g;g=[];for(let p of h){let d=t.nodes[p],m=Object.keys(d.statics);for(let I of Object.keys(d.statics)){let B=m[0];for(let{to:b,reducer:R}of d.statics[B])R==="pushPath"&&(u||l.push(B),g.push(b))}}u=!1}let f=JSON.stringify(l);o.has(f)||(s.push(l),o.add(f))};for(let{node:l,state:c}of n){if(c.remainder!==null){a([c.remainder],l);continue}let u=t.nodes[l],g=ACe(u,c);for(let[f,h]of Object.entries(u.statics))(g&&f!==hi||!f.startsWith("-")&&h.some(({reducer:p})=>p==="pushPath"))&&a([...i,f],l);if(!!g)for(let[f,{to:h}]of u.dynamics){if(h===Gi)continue;let p=lCe(f,c);if(p!==null)for(let d of p)a([...i,d],l)}}return[...s].sort()}function gCe(t,e){let r=vU(t,[...e,hi]);return uCe(e,r.map(({state:i})=>i))}function aCe(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 uCe(t,e){let r=e.filter(g=>g.selectedIndex!==null);if(r.length===0)throw new Error;let i=r.filter(g=>g.requiredOptions.every(f=>f.some(h=>g.options.find(p=>p.name===h))));if(i.length===0)throw new Ih(t,r.map(g=>({usage:g.candidateUsage,reason:null})));let n=0;for(let g of i)g.path.length>n&&(n=g.path.length);let s=i.filter(g=>g.path.length===n),o=g=>g.positionals.filter(({extra:f})=>!f).length+g.options.length,a=s.map(g=>({state:g,positionalCount:o(g)})),l=0;for(let{positionalCount:g}of a)g>l&&(l=g);let c=a.filter(({positionalCount:g})=>g===l).map(({state:g})=>g),u=fCe(c);if(u.length>1)throw new cv(t,u.map(g=>g.candidateUsage));return u[0]}function fCe(t){let e=[],r=[];for(let i of t)i.selectedIndex===Au?r.push(i):e.push(i);return r.length>0&&e.push(_(P({},BU),{path:SU(...r.map(i=>i.path)),options:r.reduce((i,n)=>i.concat(n.options),[])})),e}function SU(t,e,...r){return e===void 0?Array.from(t):SU(t.filter((i,n)=>i===e[n]),...r)}function qi(){return{dynamics:[],shortcuts:[],statics:{}}}function bU(t){return t===Eh||t===Gi}function Cv(t,e=0){return{to:bU(t.to)?t.to:t.to>2?t.to+e-2:t.to+e,reducer:t.reducer}}function iCe(t,e=0){let r=qi();for(let[i,n]of t.dynamics)r.dynamics.push([i,Cv(n,e)]);for(let i of t.shortcuts)r.shortcuts.push(Cv(i,e));for(let[i,n]of Object.entries(t.statics))r.statics[i]=n.map(s=>Cv(s,e));return r}function pi(t,e,r,i,n){t.nodes[e].dynamics.push([r,{to:i,reducer:n}])}function cu(t,e,r,i){t.nodes[e].shortcuts.push({to:r,reducer:i})}function ta(t,e,r,i,n){(Object.prototype.hasOwnProperty.call(t.nodes[e].statics,r)?t.nodes[e].statics[r]:t.nodes[e].statics[r]=[]).push({to:i,reducer:n})}function jE(t,e,r,i){if(Array.isArray(e)){let[n,...s]=e;return t[n](r,i,...s)}else return t[e](r,i)}function lCe(t,e){let r=Array.isArray(t)?YE[t[0]]:YE[t];if(typeof r.suggest=="undefined")return null;let i=Array.isArray(t)?t.slice(1):[];return r.suggest(e,...i)}var YE={always:()=>!0,isOptionLike:(t,e)=>!t.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(t,e)=>t.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(t,e,r,i)=>!t.ignoreOptions&&e===r,isBatchOption:(t,e,r)=>!t.ignoreOptions&&fU.test(e)&&[...e.slice(1)].every(i=>r.includes(`-${i}`)),isBoundOption:(t,e,r,i)=>{let n=e.match(av);return!t.ignoreOptions&&!!n&&UE.test(n[1])&&r.includes(n[1])&&i.filter(s=>s.names.includes(n[1])).every(s=>s.allowBinding)},isNegatedOption:(t,e,r)=>!t.ignoreOptions&&e===`--no-${r.slice(2)}`,isHelp:(t,e)=>!t.ignoreOptions&&ov.test(e),isUnsupportedOption:(t,e,r)=>!t.ignoreOptions&&e.startsWith("-")&&UE.test(e)&&!r.includes(e),isInvalidOption:(t,e)=>!t.ignoreOptions&&e.startsWith("-")&&!UE.test(e)};YE.isOption.suggest=(t,e,r=!0)=>r?null:[e];var dv={setCandidateState:(t,e,r)=>P(P({},t),r),setSelectedIndex:(t,e,r)=>_(P({},t),{selectedIndex:r}),pushBatch:(t,e)=>_(P({},t),{options:t.options.concat([...e.slice(1)].map(r=>({name:`-${r}`,value:!0})))}),pushBound:(t,e)=>{let[,r,i]=e.match(av);return _(P({},t),{options:t.options.concat({name:r,value:i})})},pushPath:(t,e)=>_(P({},t),{path:t.path.concat(e)}),pushPositional:(t,e)=>_(P({},t),{positionals:t.positionals.concat({value:e,extra:!1})}),pushExtra:(t,e)=>_(P({},t),{positionals:t.positionals.concat({value:e,extra:!0})}),pushExtraNoLimits:(t,e)=>_(P({},t),{positionals:t.positionals.concat({value:e,extra:Ln})}),pushTrue:(t,e,r=e)=>_(P({},t),{options:t.options.concat({name:e,value:!0})}),pushFalse:(t,e,r=e)=>_(P({},t),{options:t.options.concat({name:r,value:!1})}),pushUndefined:(t,e)=>_(P({},t),{options:t.options.concat({name:e,value:void 0})}),pushStringValue:(t,e)=>{var r;let i=_(P({},t),{options:[...t.options]}),n=t.options[t.options.length-1];return n.value=((r=n.value)!==null&&r!==void 0?r:[]).concat([e]),i},setStringValue:(t,e)=>{let r=_(P({},t),{options:[...t.options]}),i=t.options[t.options.length-1];return i.value=e,r},inhibateOptions:t=>_(P({},t),{ignoreOptions:!0}),useHelp:(t,e,r)=>{let[,,i]=e.match(ov);return typeof i!="undefined"?_(P({},t),{options:[{name:"-c",value:String(r)},{name:"-i",value:i}]}):_(P({},t),{options:[{name:"-c",value:String(r)}]})},setError:(t,e,r)=>e===hi?_(P({},t),{errorMessage:`${r}.`}):_(P({},t),{errorMessage:`${r} ("${e}").`}),setOptionArityError:(t,e)=>{let r=t.options[t.options.length-1];return _(P({},t),{errorMessage:`Not enough arguments to option ${r.name}.`})}},Ln=Symbol(),xU=class{constructor(e,r){this.allOptionNames=[],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:i=this.arity.extra,proxy:n=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:r,extra:i,proxy:n})}addPositional({name:e="arg",required:r=!0}={}){if(!r&&this.arity.extra===Ln)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!==Ln?this.arity.extra.push(e):this.arity.extra!==Ln&&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===Ln)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 i=0;i1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(i))throw new Error(`The arity must be an integer, got ${i}`);if(i<0)throw new Error(`The arity must be positive, got ${i}`);this.allOptionNames.push(...e),this.options.push({names:e,description:r,arity:i,hidden:n,required:s,allowBinding:o})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:r=!0}={}){let i=[this.cliOpts.binaryName],n=[];if(this.paths.length>0&&i.push(...this.paths[0]),e){for(let{names:o,arity:a,hidden:l,description:c,required:u}of this.options){if(l)continue;let g=[];for(let h=0;h`:`[${f}]`)}i.push(...this.arity.leading.map(o=>`<${o}>`)),this.arity.extra===Ln?i.push("..."):i.push(...this.arity.extra.map(o=>`[${o}]`)),i.push(...this.arity.trailing.map(o=>`<${o}>`))}return{usage:i.join(" "),options:n}}compile(){if(typeof this.context=="undefined")throw new Error("Assertion failed: No context attached");let e=QU(),r=yl,i=this.usage().usage,n=this.options.filter(a=>a.required).map(a=>a.names);r=xs(e,qi()),ta(e,yl,sv,r,["setCandidateState",{candidateUsage:i,requiredOptions:n}]);let s=this.arity.proxy?"always":"isNotOptionLike",o=this.paths.length>0?this.paths:[[]];for(let a of o){let l=r;if(a.length>0){let f=xs(e,qi());cu(e,l,f),this.registerOptions(e,f),l=f}for(let f=0;f0||!this.arity.proxy){let f=xs(e,qi());pi(e,l,"isHelp",f,["useHelp",this.cliIndex]),ta(e,f,hi,Eh,["setSelectedIndex",Au]),this.registerOptions(e,l)}this.arity.leading.length>0&&ta(e,l,hi,Gi,["setError","Not enough positional arguments"]);let c=l;for(let f=0;f0||f+1!==this.arity.leading.length)&&ta(e,h,hi,Gi,["setError","Not enough positional arguments"]),pi(e,c,"isNotOptionLike",h,"pushPositional"),c=h}let u=c;if(this.arity.extra===Ln||this.arity.extra.length>0){let f=xs(e,qi());if(cu(e,c,f),this.arity.extra===Ln){let h=xs(e,qi());this.arity.proxy||this.registerOptions(e,h),pi(e,c,s,h,"pushExtraNoLimits"),pi(e,h,s,h,"pushExtraNoLimits"),cu(e,h,f)}else for(let h=0;h0&&ta(e,u,hi,Gi,["setError","Not enough positional arguments"]);let g=u;for(let f=0;fo.length>s.length?o:s,"");if(i.arity===0)for(let s of i.names)pi(e,r,["isOption",s,i.hidden||s!==n],r,"pushTrue"),s.startsWith("--")&&!s.startsWith("--no-")&&pi(e,r,["isNegatedOption",s],r,["pushFalse",s]);else{let s=xs(e,qi());for(let o of i.names)pi(e,r,["isOption",o,i.hidden||o!==n],s,"pushUndefined");for(let o=0;o=0&&egCe(i,n),suggest:(n,s)=>cCe(i,n,s)}}};var kU=80,mv=Array(kU).fill("\u2501");for(let t=0;t<=24;++t)mv[mv.length-t]=`[38;5;${232+t}m\u2501`;var Ev={header:t=>`\u2501\u2501\u2501 ${t}${t.length`${t}`,error:t=>`${t}`,code:t=>`${t}`},PU={header:t=>t,bold:t=>t,error:t=>t,code:t=>t};function hCe(t){let e=t.split(` -`),r=e.filter(n=>n.match(/\S/)),i=r.length>0?r.reduce((n,s)=>Math.min(n,s.length-s.trimStart().length),Number.MAX_VALUE):0;return e.map(n=>n.slice(i).trimRight()).join(` -`)}function Vn(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,` -`),t=hCe(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 - -`),t=t.replace(/\n(\n)?\n*/g,"$1"),r&&(t=t.split(/\n/).map(i=>{let n=i.match(/^\s*[*-][\t ]+(.*)/);if(!n)return i.match(/(.{1,80})(?: |$)/g).join(` -`);let s=i.length-i.trimStart().length;return n[1].match(new RegExp(`(.{1,${78-s}})(?: |$)`,"g")).map((o,a)=>" ".repeat(s)+(a===0?"- ":" ")+o).join(` -`)}).join(` - -`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(i,n,s)=>e.code(n+s+n)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(i,n,s)=>e.bold(n+s+n)),t?`${t} -`:""}var bh=class extends ye{constructor(e){super();this.contexts=e,this.commands=[]}static from(e,r){let i=new bh(r);i.path=e.path;for(let n of e.options)switch(n.name){case"-c":i.commands.push(Number(n.value));break;case"-i":i.index=Number(n.value);break}return i}async execute(){let e=this.commands;if(typeof this.index!="undefined"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: -`),this.context.stdout.write(` -`);let r=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(` -`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. -`)}}};var DU=Symbol("clipanion/errorCommand");function pCe(){return process.env.FORCE_COLOR==="0"?!1:!!(process.env.FORCE_COLOR==="1"||typeof process.stdout!="undefined"&&process.stdout.isTTY)}var oo=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:i,enableColors:n=pCe()}={}){this.registrations=new Map,this.builder=new Qh({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=i,this.enableColors=n}static from(e,r={}){let i=new oo(r);for(let n of e)i.register(n);return i}register(e){var r;let i=new Map,n=new e;for(let l in n){let c=n[l];typeof c=="object"&&c!==null&&c[ye.isOption]&&i.set(l,c)}let s=this.builder.command(),o=s.cliIndex,a=(r=e.paths)!==null&&r!==void 0?r:n.paths;if(typeof a!="undefined")for(let l of a)s.addPath(l);this.registrations.set(e,{specs:i,builder:s,index:o});for(let[l,{definition:c}]of i.entries())c(s,l);s.setContext({commandClass:e})}process(e){let{contexts:r,process:i}=this.builder.compile(),n=i(e);switch(n.selectedIndex){case Au:return bh.from(n,r);default:{let{commandClass:s}=r[n.selectedIndex],o=this.registrations.get(s);if(typeof o=="undefined")throw new Error("Assertion failed: Expected the command class to have been registered.");let a=new s;a.path=n.path;try{for(let[l,{transformer:c}]of o.specs.entries())a[l]=c(o.builder,l,n);return a}catch(l){throw l[DU]=a,l}}break}}async run(e,r){let i;if(!Array.isArray(e))i=e;else try{i=this.process(e)}catch(s){return r.stdout.write(this.error(s)),1}if(i.help)return r.stdout.write(this.usage(i,{detailed:!0})),0;i.context=r,i.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(s,o)=>this.error(s,o),process:s=>this.process(s),run:(s,o)=>this.run(s,P(P({},r),o)),usage:(s,o)=>this.usage(s,o)};let n;try{n=await i.validateAndExecute().catch(s=>i.catch(s).then(()=>0))}catch(s){return r.stdout.write(this.error(s,{command:i})),1}return n}async runExit(e,r){process.exitCode=await this.run(e,r)}suggest(e,r){let{suggest:i}=this.builder.compile();return i(e,r)}definitions({colored:e=!1}={}){let r=[];for(let[i,{index:n}]of this.registrations){if(typeof i.usage=="undefined")continue;let{usage:s}=this.getUsageByIndex(n,{detailed:!1}),{usage:o,options:a}=this.getUsageByIndex(n,{detailed:!0,inlineOptions:!1}),l=typeof i.usage.category!="undefined"?Vn(i.usage.category,{format:this.format(e),paragraphs:!1}):void 0,c=typeof i.usage.description!="undefined"?Vn(i.usage.description,{format:this.format(e),paragraphs:!1}):void 0,u=typeof i.usage.details!="undefined"?Vn(i.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=typeof i.usage.examples!="undefined"?i.usage.examples.map(([f,h])=>[Vn(f,{format:this.format(e),paragraphs:!1}),h.replace(/\$0/g,this.binaryName)]):void 0;r.push({path:s,usage:o,category:l,description:c,details:u,examples:g,options:a})}return r}usage(e=null,{colored:r,detailed:i=!1,prefix:n="$ "}={}){var s;if(e===null){for(let l of this.registrations.keys()){let c=l.paths,u=typeof l.usage!="undefined";if(!c||c.length===0||c.length===1&&c[0].length===0||((s=c==null?void 0:c.some(h=>h.length===0))!==null&&s!==void 0?s:!1))if(e){e=null;break}else e=l;else if(u){e=null;continue}}e&&(i=!0)}let o=e!==null&&e instanceof ye?e.constructor:e,a="";if(o)if(i){let{description:l="",details:c="",examples:u=[]}=o.usage||{};l!==""&&(a+=Vn(l,{format:this.format(r),paragraphs:!1}).replace(/^./,h=>h.toUpperCase()),a+=` -`),(c!==""||u.length>0)&&(a+=`${this.format(r).header("Usage")} -`,a+=` -`);let{usage:g,options:f}=this.getUsageByRegistration(o,{inlineOptions:!1});if(a+=`${this.format(r).bold(n)}${g} -`,f.length>0){a+=` -`,a+=`${Ev.header("Options")} -`;let h=f.reduce((p,d)=>Math.max(p,d.definition.length),0);a+=` -`;for(let{definition:p,description:d}of f)a+=` ${this.format(r).bold(p.padEnd(h))} ${Vn(d,{format:this.format(r),paragraphs:!1})}`}if(c!==""&&(a+=` -`,a+=`${this.format(r).header("Details")} -`,a+=` -`,a+=Vn(c,{format:this.format(r),paragraphs:!0})),u.length>0){a+=` -`,a+=`${this.format(r).header("Examples")} -`;for(let[h,p]of u)a+=` -`,a+=Vn(h,{format:this.format(r),paragraphs:!1}),a+=`${p.replace(/^/m,` ${this.format(r).bold(n)}`).replace(/\$0/g,this.binaryName)} -`}}else{let{usage:l}=this.getUsageByRegistration(o);a+=`${this.format(r).bold(n)}${l} -`}else{let l=new Map;for(let[f,{index:h}]of this.registrations.entries()){if(typeof f.usage=="undefined")continue;let p=typeof f.usage.category!="undefined"?Vn(f.usage.category,{format:this.format(r),paragraphs:!1}):null,d=l.get(p);typeof d=="undefined"&&l.set(p,d=[]);let{usage:m}=this.getUsageByIndex(h);d.push({commandClass:f,usage:m})}let c=Array.from(l.keys()).sort((f,h)=>f===null?-1:h===null?1:f.localeCompare(h,"en",{usage:"sort",caseFirst:"upper"})),u=typeof this.binaryLabel!="undefined",g=typeof this.binaryVersion!="undefined";u||g?(u&&g?a+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)} - -`:u?a+=`${this.format(r).header(`${this.binaryLabel}`)} -`:a+=`${this.format(r).header(`${this.binaryVersion}`)} -`,a+=` ${this.format(r).bold(n)}${this.binaryName} -`):a+=`${this.format(r).bold(n)}${this.binaryName} -`;for(let f of c){let h=l.get(f).slice().sort((d,m)=>d.usage.localeCompare(m.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=` -`,a+=`${this.format(r).header(`${p}`)} -`;for(let{commandClass:d,usage:m}of h){let I=d.usage.description||"undocumented";a+=` -`,a+=` ${this.format(r).bold(m)} -`,a+=` ${Vn(I,{format:this.format(r),paragraphs:!1})}`}}a+=` -`,a+=Vn("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 a}error(e,r){var i,{colored:n,command:s=(i=e[DU])!==null&&i!==void 0?i:null}=r===void 0?{}:r;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}: ${e.message} -`;let l=e.clipanion;return typeof l!="undefined"?l.type==="usage"&&(o+=` -`,o+=this.usage(s)):e.stack&&(o+=`${e.stack.replace(/^.*\n/,"")} -`),o}getUsageByRegistration(e,r){let i=this.registrations.get(e);if(typeof i=="undefined")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(i.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}format(e=this.enableColors){return e?Ev:PU}};oo.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr};var Iv={};it(Iv,{DefinitionsCommand:()=>qE,HelpCommand:()=>JE,VersionCommand:()=>WE});var qE=class extends ye{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} -`)}};qE.paths=[["--clipanion=definitions"]];var JE=class extends ye{async execute(){this.context.stdout.write(this.cli.usage())}};JE.paths=[["-h"],["--help"]];var WE=class extends ye{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} -`)}};WE.paths=[["-v"],["--version"]];var Y={};it(Y,{Array:()=>RU,Boolean:()=>FU,Counter:()=>NU,Proxy:()=>LU,Rest:()=>TU,String:()=>MU,applyValidator:()=>Bh,cleanValidationError:()=>HE,formatError:()=>wh,isOptionSymbol:()=>yh,makeCommandOption:()=>ji,rerouteArguments:()=>so});function RU(t,e,r){let[i,n]=so(e,r!=null?r:{}),{arity:s=1}=n,o=t.split(","),a=new Set(o);return ji({definition(l){l.addOption({names:o,arity:s,hidden:n==null?void 0:n.hidden,description:n==null?void 0:n.description,required:n.required})},transformer(l,c,u){let g=typeof i!="undefined"?[...i]:void 0;for(let{name:f,value:h}of u.options)!a.has(f)||(g=g!=null?g:[],g.push(h));return g}})}function FU(t,e,r){let[i,n]=so(e,r!=null?r:{}),s=t.split(","),o=new Set(s);return ji({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u=f);return u}})}function NU(t,e,r){let[i,n]=so(e,r!=null?r:{}),s=t.split(","),o=new Set(s);return ji({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u!=null||(u=0),f?u+=1:u=0);return u}})}function LU(t={}){return ji({definition(e,r){var i;e.addProxy({name:(i=t.name)!==null&&i!==void 0?i:r,required:t.required})},transformer(e,r,i){return i.positionals.map(({value:n})=>n)}})}function TU(t={}){return ji({definition(e,r){var i;e.addRest({name:(i=t.name)!==null&&i!==void 0?i:r,required:t.required})},transformer(e,r,i){let n=o=>{let a=i.positionals[o];return a.extra===Ln||a.extra===!1&&oo)}})}function dCe(t,e,r){let[i,n]=so(e,r!=null?r:{}),{arity:s=1}=n,o=t.split(","),a=new Set(o);return ji({definition(l){l.addOption({names:o,arity:n.tolerateBoolean?0:s,hidden:n.hidden,description:n.description,required:n.required})},transformer(l,c,u){let g,f=i;for(let{name:h,value:p}of u.options)!a.has(h)||(g=h,f=p);return typeof f=="string"?Bh(g!=null?g:c,f,n.validator):f}})}function CCe(t={}){let{required:e=!0}=t;return ji({definition(r,i){var n;r.addPositional({name:(n=t.name)!==null&&n!==void 0?n:i,required:t.required})},transformer(r,i,n){var s;for(let o=0;oJSON.stringify(i)).join(", ")})`);return e}function kl(t,e){let r=[];for(let i of t){let n=e(i);n!==LH&&r.push(n)}return r}var LH=Symbol();kl.skip=LH;function MH(t,e){for(let r of t){let i=e(r);if(i!==TH)return i}}var TH=Symbol();MH.skip=TH;function Tv(t){return typeof t=="object"&&t!==null}function aI(t){if(t instanceof Map&&(t=Object.fromEntries(t)),Tv(t))for(let e of Object.keys(t)){let r=t[e];Tv(r)&&(t[e]=aI(r))}return t}function na(t,e,r){let i=t.get(e);return typeof i=="undefined"&&t.set(e,i=r()),i}function hu(t,e){let r=t.get(e);return typeof r=="undefined"&&t.set(e,r=[]),r}function Pl(t,e){let r=t.get(e);return typeof r=="undefined"&&t.set(e,r=new Set),r}function pu(t,e){let r=t.get(e);return typeof r=="undefined"&&t.set(e,r=new Map),r}async function kEe(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function du(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function Mv(t,e){try{return t()}catch(r){throw r.message=e(r.message),r}}async function Cu(t){return await new Promise((e,r)=>{let i=[];t.on("error",n=>{r(n)}),t.on("data",n=>{i.push(n)}),t.on("end",()=>{e(Buffer.concat(i))})})}var OH=class extends Fv.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(e,r,i){if(r!=="buffer"||!Buffer.isBuffer(e))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(e),i(null,null)}_flush(e){e(null,Buffer.concat(this.chunks))}},KH=class extends Fv.Transform{constructor(e=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=e}_transform(e,r,i){if(r!=="buffer"||!Buffer.isBuffer(e))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,i(null,e)}_flush(e){this.active&&this.ifEmpty.length>0?e(null,this.ifEmpty):e(null)}},Uh=eval("require");function UH(t){return Uh(M.fromPortablePath(t))}function HH(path){let physicalPath=M.fromPortablePath(path),currentCacheEntry=Uh.cache[physicalPath];delete Uh.cache[physicalPath];let result;try{result=UH(physicalPath);let freshCacheEntry=Uh.cache[physicalPath],dynamicModule=eval("module"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{Uh.cache[physicalPath]=currentCacheEntry}return result}var GH=new Map;function PEe(t){let e=GH.get(t),r=T.statSync(t);if((e==null?void 0:e.mtime)===r.mtimeMs)return e.instance;let i=HH(t);return GH.set(t,{mtime:r.mtimeMs,instance:i}),i}var Dl;(function(i){i[i.NoCache=0]="NoCache",i[i.FsTime=1]="FsTime",i[i.Node=2]="Node"})(Dl||(Dl={}));function mu(t,{cachingStrategy:e=2}={}){switch(e){case 0:return HH(t);case 1:return PEe(t);case 2:return UH(t);default:throw new Error("Unsupported caching strategy")}}function gn(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let i=[];for(let s of e)i.push(r.map(o=>s(o)));let n=r.map((s,o)=>o);return n.sort((s,o)=>{for(let a of i){let l=a[s]a[o]?1:0;if(l!==0)return l}return 0}),n.map(s=>r[s])}function DEe(t){return t.length===0?null:t.map(e=>`(${FH.default.makeRe(e,{windows:!1,dot:!0}).source})`).join("|")}function Ov(t,{env:e}){let r=/\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g;return t.replace(r,(...i)=>{let{variableName:n,colon:s,fallback:o}=i[i.length-1],a=Object.prototype.hasOwnProperty.call(e,n),l=e[n];if(l||a&&!s)return l;if(o!=null)return o;throw new me(`Environment variable not found (${n})`)})}function Hh(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 jH(t){return typeof t=="undefined"?t:Hh(t)}function Kv(t){try{return jH(t)}catch{return null}}function REe(t){return!!(M.isAbsolute(t)||t.match(/^(\.{1,2}|~)\//))}var S={};it(S,{areDescriptorsEqual:()=>i3,areIdentsEqual:()=>cp,areLocatorsEqual:()=>up,areVirtualPackagesEquivalent:()=>XQe,bindDescriptor:()=>VQe,bindLocator:()=>_Qe,convertDescriptorToLocator:()=>By,convertLocatorToDescriptor:()=>WQe,convertPackageToLocator:()=>zQe,convertToIdent:()=>JQe,convertToManifestRange:()=>ebe,copyPackage:()=>ap,devirtualizeDescriptor:()=>Ap,devirtualizeLocator:()=>lp,getIdentVendorPath:()=>Lx,isPackageCompatible:()=>Sy,isVirtualDescriptor:()=>hA,isVirtualLocator:()=>Io,makeDescriptor:()=>Yt,makeIdent:()=>Eo,makeLocator:()=>Vi,makeRange:()=>by,parseDescriptor:()=>pA,parseFileStyleRange:()=>ZQe,parseIdent:()=>En,parseLocator:()=>Hl,parseRange:()=>Tu,prettyDependent:()=>Nx,prettyDescriptor:()=>Xt,prettyIdent:()=>Vr,prettyLocator:()=>lt,prettyLocatorNoColors:()=>Rx,prettyRange:()=>yy,prettyReference:()=>fp,prettyResolution:()=>Fx,prettyWorkspace:()=>hp,renamePackage:()=>op,slugifyIdent:()=>Dx,slugifyLocator:()=>Mu,sortDescriptors:()=>Ou,stringifyDescriptor:()=>In,stringifyIdent:()=>St,stringifyLocator:()=>is,tryParseDescriptor:()=>gp,tryParseIdent:()=>n3,tryParseLocator:()=>Qy,virtualizeDescriptor:()=>kx,virtualizePackage:()=>Px});var Lu=ie(require("querystring")),e3=ie(Or()),t3=ie(wY());var mn={};it(mn,{checksumFile:()=>Ey,checksumPattern:()=>Iy,makeHash:()=>zi});var my=ie(require("crypto")),Sx=ie(vx());function zi(...t){let e=(0,my.createHash)("sha512"),r="";for(let i of t)typeof i=="string"?r+=i:i&&(r&&(e.update(r),r=""),e.update(i));return r&&e.update(r),e.digest("hex")}async function Ey(t,{baseFs:e,algorithm:r}={baseFs:T,algorithm:"sha512"}){let i=await e.openPromise(t,"r");try{let n=65536,s=Buffer.allocUnsafeSlow(n),o=(0,my.createHash)(r),a=0;for(;(a=await e.readPromise(i,s,0,n))!==0;)o.update(a===n?s:s.slice(0,a));return o.digest("hex")}finally{await e.closePromise(i)}}async function Iy(t,{cwd:e}){let i=(await(0,Sx.default)(t,{cwd:M.fromPortablePath(e),expandDirectories:!1,onlyDirectories:!0,unique:!0})).map(a=>`${a}/**/*`),n=await(0,Sx.default)([t,...i],{cwd:M.fromPortablePath(e),expandDirectories:!1,onlyFiles:!1,unique:!0});n.sort();let s=await Promise.all(n.map(async a=>{let l=[Buffer.from(a)],c=M.toPortablePath(a),u=await T.lstatPromise(c);return u.isSymbolicLink()?l.push(Buffer.from(await T.readlinkPromise(c))):u.isFile()&&l.push(await T.readFilePromise(c)),l.join("\0")})),o=(0,my.createHash)("sha512");for(let a of s)o.update(a);return o.digest("hex")}var wy="virtual:",YQe=5,r3=/(os|cpu)=([a-z0-9_-]+)/,qQe=(0,t3.makeParser)(r3);function Eo(t,e){if(t==null?void 0:t.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:zi(t,e),scope:t,name:e}}function Yt(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:zi(t.identHash,e),range:e}}function Vi(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:zi(t.identHash,e),reference:e}}function JQe(t){return{identHash:t.identHash,scope:t.scope,name:t.name}}function By(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.descriptorHash,reference:t.range}}function WQe(t){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:t.locatorHash,range:t.reference}}function zQe(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference}}function op(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 ap(t){return op(t,t)}function kx(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return Yt(t,`virtual:${e}#${t.range}`)}function Px(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return op(t,Vi(t,`virtual:${e}#${t.reference}`))}function hA(t){return t.range.startsWith(wy)}function Io(t){return t.reference.startsWith(wy)}function Ap(t){if(!hA(t))throw new Error("Not a virtual descriptor");return Yt(t,t.range.replace(/^[^#]*#/,""))}function lp(t){if(!Io(t))throw new Error("Not a virtual descriptor");return Vi(t,t.reference.replace(/^[^#]*#/,""))}function VQe(t,e){return t.range.includes("::")?t:Yt(t,`${t.range}::${Lu.default.stringify(e)}`)}function _Qe(t,e){return t.reference.includes("::")?t:Vi(t,`${t.reference}::${Lu.default.stringify(e)}`)}function cp(t,e){return t.identHash===e.identHash}function i3(t,e){return t.descriptorHash===e.descriptorHash}function up(t,e){return t.locatorHash===e.locatorHash}function XQe(t,e){if(!Io(t))throw new Error("Invalid package type");if(!Io(e))throw new Error("Invalid package type");if(!cp(t,e)||t.dependencies.size!==e.dependencies.size)return!1;for(let r of t.dependencies.values()){let i=e.dependencies.get(r.identHash);if(!i||!i3(r,i))return!1}return!0}function En(t){let e=n3(t);if(!e)throw new Error(`Invalid ident (${t})`);return e}function n3(t){let e=t.match(/^(?:@([^/]+?)\/)?([^/]+)$/);if(!e)return null;let[,r,i]=e,n=typeof r!="undefined"?r:null;return Eo(n,i)}function pA(t,e=!1){let r=gp(t,e);if(!r)throw new Error(`Invalid descriptor (${t})`);return r}function gp(t,e=!1){let r=e?t.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):t.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;let[,i,n,s]=r;if(s==="unknown")throw new Error(`Invalid range (${t})`);let o=typeof i!="undefined"?i:null,a=typeof s!="undefined"?s:"unknown";return Yt(Eo(o,n),a)}function Hl(t,e=!1){let r=Qy(t,e);if(!r)throw new Error(`Invalid locator (${t})`);return r}function Qy(t,e=!1){let r=e?t.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))$/):t.match(/^(?:@([^/]+?)\/)?([^/]+?)(?:@(.+))?$/);if(!r)return null;let[,i,n,s]=r;if(s==="unknown")throw new Error(`Invalid reference (${t})`);let o=typeof i!="undefined"?i:null,a=typeof s!="undefined"?s:"unknown";return Vi(Eo(o,n),a)}function Tu(t,e){let r=t.match(/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/);if(r===null)throw new Error(`Invalid range (${t})`);let i=typeof r[1]!="undefined"?r[1]:null;if(typeof(e==null?void 0:e.requireProtocol)=="string"&&i!==e.requireProtocol)throw new Error(`Invalid protocol (${i})`);if((e==null?void 0:e.requireProtocol)&&i===null)throw new Error(`Missing protocol (${i})`);let n=typeof r[3]!="undefined"?decodeURIComponent(r[2]):null;if((e==null?void 0:e.requireSource)&&n===null)throw new Error(`Missing source (${t})`);let s=typeof r[3]!="undefined"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),o=(e==null?void 0:e.parseSelector)?Lu.default.parse(s):s,a=typeof r[4]!="undefined"?Lu.default.parse(r[4]):null;return{protocol:i,source:n,selector:o,params:a}}function ZQe(t,{protocol:e}){let{selector:r,params:i}=Tu(t,{requireProtocol:e,requireBindings:!0});if(typeof i.locator!="string")throw new Error(`Assertion failed: Invalid bindings for ${t}`);return{parentLocator:Hl(i.locator,!0),path:r}}function s3(t){return t=t.replace(/%/g,"%25"),t=t.replace(/:/g,"%3A"),t=t.replace(/#/g,"%23"),t}function $Qe(t){return t===null?!1:Object.entries(t).length>0}function by({protocol:t,source:e,selector:r,params:i}){let n="";return t!==null&&(n+=`${t}`),e!==null&&(n+=`${s3(e)}#`),n+=s3(r),$Qe(i)&&(n+=`::${Lu.default.stringify(i)}`),n}function ebe(t){let{params:e,protocol:r,source:i,selector:n}=Tu(t);for(let s in e)s.startsWith("__")&&delete e[s];return by({protocol:r,source:i,params:e,selector:n})}function St(t){return t.scope?`@${t.scope}/${t.name}`:`${t.name}`}function In(t){return t.scope?`@${t.scope}/${t.name}@${t.range}`:`${t.name}@${t.range}`}function is(t){return t.scope?`@${t.scope}/${t.name}@${t.reference}`:`${t.name}@${t.reference}`}function Dx(t){return t.scope!==null?`@${t.scope}-${t.name}`:t.name}function Mu(t){let{protocol:e,selector:r}=Tu(t.reference),i=e!==null?e.replace(/:$/,""):"exotic",n=e3.default.valid(r),s=n!==null?`${i}-${n}`:`${i}`,o=10,a=t.scope?`${Dx(t)}-${s}-${t.locatorHash.slice(0,o)}`:`${Dx(t)}-${s}-${t.locatorHash.slice(0,o)}`;return kr(a)}function Vr(t,e){return e.scope?`${Ve(t,`@${e.scope}/`,Le.SCOPE)}${Ve(t,e.name,Le.NAME)}`:`${Ve(t,e.name,Le.NAME)}`}function vy(t){if(t.startsWith(wy)){let e=vy(t.substr(t.indexOf("#")+1)),r=t.substr(wy.length,YQe);return`${e} [${r}]`}else return t.replace(/\?.*/,"?[...]")}function yy(t,e){return`${Ve(t,vy(e),Le.RANGE)}`}function Xt(t,e){return`${Vr(t,e)}${Ve(t,"@",Le.RANGE)}${yy(t,e.range)}`}function fp(t,e){return`${Ve(t,vy(e),Le.REFERENCE)}`}function lt(t,e){return`${Vr(t,e)}${Ve(t,"@",Le.REFERENCE)}${fp(t,e.reference)}`}function Rx(t){return`${St(t)}@${vy(t.reference)}`}function Ou(t){return gn(t,[e=>St(e),e=>e.range])}function hp(t,e){return Vr(t,e.locator)}function Fx(t,e,r){let i=hA(e)?Ap(e):e;return r===null?`${Xt(t,i)} \u2192 ${xx(t).Cross}`:i.identHash===r.identHash?`${Xt(t,i)} \u2192 ${fp(t,r.reference)}`:`${Xt(t,i)} \u2192 ${lt(t,r)}`}function Nx(t,e,r){return r===null?`${lt(t,e)}`:`${lt(t,e)} (via ${yy(t,r.range)})`}function Lx(t){return`node_modules/${St(t)}`}function Sy(t,e){return t.conditions?qQe(t.conditions,r=>{let[,i,n]=r.match(r3),s=e[i];return s?s.includes(n):!0}):!0}var gt;(function(r){r.HARD="HARD",r.SOFT="SOFT"})(gt||(gt={}));var oi;(function(i){i.Dependency="Dependency",i.PeerDependency="PeerDependency",i.PeerDependencyMeta="PeerDependencyMeta"})(oi||(oi={}));var ki;(function(i){i.Inactive="inactive",i.Redundant="redundant",i.Active="active"})(ki||(ki={}));var Le={NO_HINT:"NO_HINT",NULL:"NULL",SCOPE:"SCOPE",NAME:"NAME",RANGE:"RANGE",REFERENCE:"REFERENCE",NUMBER:"NUMBER",PATH:"PATH",URL:"URL",ADDED:"ADDED",REMOVED:"REMOVED",CODE:"CODE",DURATION:"DURATION",SIZE:"SIZE",IDENT:"IDENT",DESCRIPTOR:"DESCRIPTOR",LOCATOR:"LOCATOR",RESOLUTION:"RESOLUTION",DEPENDENT:"DEPENDENT",PACKAGE_EXTENSION:"PACKAGE_EXTENSION",SETTING:"SETTING"},Gl;(function(e){e[e.BOLD=2]="BOLD"})(Gl||(Gl={}));var Tx=dp.default.GITHUB_ACTIONS?{level:2}:pp.default.supportsColor?{level:pp.default.supportsColor.level}:{level:0},xy=Tx.level!==0,Mx=xy&&!dp.default.GITHUB_ACTIONS&&!dp.default.CIRCLE&&!dp.default.GITLAB,Ox=new pp.default.Instance(Tx),tbe=new Map([[Le.NO_HINT,null],[Le.NULL,["#a853b5",129]],[Le.SCOPE,["#d75f00",166]],[Le.NAME,["#d7875f",173]],[Le.RANGE,["#00afaf",37]],[Le.REFERENCE,["#87afff",111]],[Le.NUMBER,["#ffd700",220]],[Le.PATH,["#d75fd7",170]],[Le.URL,["#d75fd7",170]],[Le.ADDED,["#5faf00",70]],[Le.REMOVED,["#d70000",160]],[Le.CODE,["#87afff",111]],[Le.SIZE,["#ffd700",220]]]),Ls=t=>t,ky={[Le.NUMBER]:Ls({pretty:(t,e)=>`${e}`,json:t=>t}),[Le.IDENT]:Ls({pretty:(t,e)=>Vr(t,e),json:t=>St(t)}),[Le.LOCATOR]:Ls({pretty:(t,e)=>lt(t,e),json:t=>is(t)}),[Le.DESCRIPTOR]:Ls({pretty:(t,e)=>Xt(t,e),json:t=>In(t)}),[Le.RESOLUTION]:Ls({pretty:(t,{descriptor:e,locator:r})=>Fx(t,e,r),json:({descriptor:t,locator:e})=>({descriptor:In(t),locator:e!==null?is(e):null})}),[Le.DEPENDENT]:Ls({pretty:(t,{locator:e,descriptor:r})=>Nx(t,e,r),json:({locator:t,descriptor:e})=>({locator:is(t),descriptor:In(e)})}),[Le.PACKAGE_EXTENSION]:Ls({pretty:(t,e)=>{switch(e.type){case oi.Dependency:return`${Vr(t,e.parentDescriptor)} \u27A4 ${On(t,"dependencies",Le.CODE)} \u27A4 ${Vr(t,e.descriptor)}`;case oi.PeerDependency:return`${Vr(t,e.parentDescriptor)} \u27A4 ${On(t,"peerDependencies",Le.CODE)} \u27A4 ${Vr(t,e.descriptor)}`;case oi.PeerDependencyMeta:return`${Vr(t,e.parentDescriptor)} \u27A4 ${On(t,"peerDependenciesMeta",Le.CODE)} \u27A4 ${Vr(t,En(e.selector))} \u27A4 ${On(t,e.key,Le.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:t=>{switch(t.type){case oi.Dependency:return`${St(t.parentDescriptor)} > ${St(t.descriptor)}`;case oi.PeerDependency:return`${St(t.parentDescriptor)} >> ${St(t.descriptor)}`;case oi.PeerDependencyMeta:return`${St(t.parentDescriptor)} >> ${t.selector} / ${t.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}}}),[Le.SETTING]:Ls({pretty:(t,e)=>(t.get(e),Ku(t,On(t,e,Le.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:t=>t}),[Le.DURATION]:Ls({pretty:(t,e)=>{if(e>1e3*60){let r=Math.floor(e/1e3/60),i=Math.ceil((e-r*60*1e3)/1e3);return i===0?`${r}m`:`${r}m ${i}s`}else{let r=Math.floor(e/1e3),i=e-r*1e3;return i===0?`${r}s`:`${r}s ${i}ms`}},json:t=>t}),[Le.SIZE]:Ls({pretty:(t,e)=>{let r=["KB","MB","GB","TB"],i=r.length;for(;i>1&&e<1024**i;)i-=1;let n=1024**i,s=Math.floor(e*100/n)/100;return On(t,`${s} ${r[i-1]}`,Le.NUMBER)},json:t=>t}),[Le.PATH]:Ls({pretty:(t,e)=>On(t,M.fromPortablePath(e),Le.PATH),json:t=>M.fromPortablePath(t)})};function jl(t,e){return[e,t]}function Py(t,e,r){return t.get("enableColors")&&r&2&&(e=pp.default.bold(e)),e}function On(t,e,r){if(!t.get("enableColors"))return e;let i=tbe.get(r);if(i===null)return e;let n=typeof i=="undefined"?r:Tx.level>=3?i[0]:i[1],s=typeof n=="number"?Ox.ansi256(n):n.startsWith("#")?Ox.hex(n):Ox[n];if(typeof s!="function")throw new Error(`Invalid format type ${n}`);return s(e)}var rbe=!!process.env.KONSOLE_VERSION;function Ku(t,e,r){return t.get("enableHyperlinks")?rbe?`]8;;${r}\\${e}]8;;\\`:`]8;;${r}\x07${e}]8;;\x07`:e}function Ve(t,e,r){if(e===null)return On(t,"null",Le.NULL);if(Object.prototype.hasOwnProperty.call(ky,r))return ky[r].pretty(t,e);if(typeof e!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return On(t,e,r)}function Kx(t,e,r,{separator:i=", "}={}){return[...e].map(n=>Ve(t,n,r)).join(i)}function Uu(t,e){if(t===null)return null;if(Object.prototype.hasOwnProperty.call(ky,e))return Nv(e),ky[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 xx(t){return{Check:On(t,"\u2713","green"),Cross:On(t,"\u2718","red"),Question:On(t,"?","cyan")}}function Yl(t,{label:e,value:[r,i]}){return`${Ve(t,e,Le.CODE)}: ${Ve(t,r,i)}`}var Ts;(function(n){n.Error="error",n.Warning="warning",n.Info="info",n.Discard="discard"})(Ts||(Ts={}));function Cp(t,{configuration:e}){let r=e.get("logFilters"),i=new Map,n=new Map,s=[];for(let g of r){let f=g.get("level");if(typeof f=="undefined")continue;let h=g.get("code");typeof h!="undefined"&&i.set(h,f);let p=g.get("text");typeof p!="undefined"&&n.set(p,f);let d=g.get("pattern");typeof d!="undefined"&&s.push([o3.default.matcher(d,{contains:!0}),f])}s.reverse();let o=(g,f,h)=>{if(g===null||g===z.UNNAMED)return h;let p=n.size>0||s.length>0?(0,a3.default)(f):f;if(n.size>0){let d=n.get(p);if(typeof d!="undefined")return d!=null?d:h}if(s.length>0){for(let[d,m]of s)if(d(p))return m!=null?m:h}if(i.size>0){let d=i.get(KE(g));if(typeof d!="undefined")return d!=null?d:h}return h},a=t.reportInfo,l=t.reportWarning,c=t.reportError,u=function(g,f,h,p){switch(o(f,h,p)){case Ts.Info:a.call(g,f,h);break;case Ts.Warning:l.call(g,f!=null?f:z.UNNAMED,h);break;case Ts.Error:c.call(g,f!=null?f:z.UNNAMED,h);break}};t.reportInfo=function(...g){return u(this,...g,Ts.Info)},t.reportWarning=function(...g){return u(this,...g,Ts.Warning)},t.reportError=function(...g){return u(this,...g,Ts.Error)}}var Zt={};it(Zt,{Method:()=>Jl,RequestError:()=>z8.RequestError,del:()=>pxe,get:()=>fxe,getNetworkSettings:()=>Z8,post:()=>iP,put:()=>hxe,request:()=>xp});var q8=ie(zy()),J8=ie(require("https")),W8=ie(require("http")),tP=ie(Nn()),rP=ie(G8()),Vy=ie(require("url"));var j8=ie(require("stream")),Y8=ie(require("string_decoder"));var nt=class extends Error{constructor(e,r,i){super(r);this.reportExtra=i;this.reportCode=e}};function Axe(t){return typeof t.reportCode!="undefined"}var Xi=class{constructor(){this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}static progressViaCounter(e){let r=0,i,n=new Promise(l=>{i=l}),s=l=>{let c=i;n=new Promise(u=>{i=u}),r=l,c()},o=(l=0)=>{s(r+1)},a=async function*(){for(;r{let o=i.write(s),a;do if(a=o.indexOf(` -`),a!==-1){let l=n+o.substr(0,a);o=o.substr(a+1),n="",e!==null?this.reportInfo(null,`${e} ${l}`):this.reportInfo(null,l)}while(a!==-1);n+=o}),r.on("end",()=>{let s=i.end();s!==""&&(e!==null?this.reportInfo(null,`${e} ${s}`):this.reportInfo(null,s))}),r}};var z8=ie(zy()),V8=new Map,_8=new Map,lxe=new W8.Agent({keepAlive:!0}),cxe=new J8.Agent({keepAlive:!0});function X8(t){let e=new Vy.URL(t),r={host:e.hostname,headers:{}};return e.port&&(r.port=Number(e.port)),{proxy:r}}async function uxe(t){return na(_8,t,()=>T.readFilePromise(t).then(e=>(_8.set(t,e),e)))}function gxe({statusCode:t,statusMessage:e},r){let i=Ve(r,t,Le.NUMBER),n=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return Ku(r,`${i}${e?` (${e})`:""}`,n)}async function _y(t,{configuration:e,customErrorMessage:r}){var i,n;try{return await t}catch(s){if(s.name!=="HTTPError")throw s;let o=(n=r==null?void 0:r(s))!=null?n:(i=s.response.body)==null?void 0:i.error;o==null&&(s.message.startsWith("Response code")?o="The remote server failed to provide the requested resource":o=s.message),s instanceof q8.TimeoutError&&s.event==="socket"&&(o+=`(can be increased via ${Ve(e,"httpTimeout",Le.SETTING)})`);let a=new nt(z.NETWORK_ERROR,o,l=>{s.response&&l.reportError(z.NETWORK_ERROR,` ${Yl(e,{label:"Response Code",value:jl(Le.NO_HINT,gxe(s.response,e))})}`),s.request&&(l.reportError(z.NETWORK_ERROR,` ${Yl(e,{label:"Request Method",value:jl(Le.NO_HINT,s.request.options.method)})}`),l.reportError(z.NETWORK_ERROR,` ${Yl(e,{label:"Request URL",value:jl(Le.URL,s.request.requestUrl)})}`)),s.request.redirects.length>0&&l.reportError(z.NETWORK_ERROR,` ${Yl(e,{label:"Request Redirects",value:jl(Le.NO_HINT,Kx(e,s.request.redirects,Le.URL))})}`),s.request.retryCount===s.request.options.retry.limit&&l.reportError(z.NETWORK_ERROR,` ${Yl(e,{label:"Request Retry Count",value:jl(Le.NO_HINT,`${Ve(e,s.request.retryCount,Le.NUMBER)} (can be increased via ${Ve(e,"httpRetry",Le.SETTING)})`)})}`)});throw a.originalError=s,a}}function Z8(t,e){let r=[...e.configuration.get("networkSettings")].sort(([o],[a])=>a.length-o.length),i={enableNetwork:void 0,caFilePath:void 0,httpProxy:void 0,httpsProxy:void 0},n=Object.keys(i),s=typeof t=="string"?new Vy.URL(t):t;for(let[o,a]of r)if(tP.default.isMatch(s.hostname,o))for(let l of n){let c=a.get(l);c!==null&&typeof i[l]=="undefined"&&(i[l]=c)}for(let o of n)typeof i[o]=="undefined"&&(i[o]=e.configuration.get(o));return i}var Jl;(function(n){n.GET="GET",n.PUT="PUT",n.POST="POST",n.DELETE="DELETE"})(Jl||(Jl={}));async function xp(t,e,{configuration:r,headers:i,jsonRequest:n,jsonResponse:s,method:o=Jl.GET}){let a=typeof t=="string"?new Vy.URL(t):t,l=Z8(a,{configuration:r});if(l.enableNetwork===!1)throw new Error(`Request to '${a.href}' has been blocked because of your configuration settings`);if(a.protocol==="http:"&&!tP.default.isMatch(a.hostname,r.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${a.hostname})`);let u={agent:{http:l.httpProxy?rP.default.httpOverHttp(X8(l.httpProxy)):lxe,https:l.httpsProxy?rP.default.httpsOverHttp(X8(l.httpsProxy)):cxe},headers:i,method:o};u.responseType=s?"json":"buffer",e!==null&&(Buffer.isBuffer(e)||!n&&typeof e=="string"?u.body=e:u.json=e);let g=r.get("httpTimeout"),f=r.get("httpRetry"),h=r.get("enableStrictSsl"),p=l.caFilePath,{default:d}=await Promise.resolve().then(()=>ie(zy())),m=p?await uxe(p):void 0,I=d.extend(P({timeout:{socket:g},retry:f,https:{rejectUnauthorized:h,certificateAuthority:m}},u));return r.getLimit("networkConcurrency")(()=>I(a))}async function fxe(t,n){var s=n,{configuration:e,jsonResponse:r}=s,i=qr(s,["configuration","jsonResponse"]);let o=na(V8,t,()=>_y(xp(t,null,P({configuration:e},i)),{configuration:e}).then(a=>(V8.set(t,a.body),a.body)));return Buffer.isBuffer(o)===!1&&(o=await o),r?JSON.parse(o.toString()):o}async function hxe(t,e,n){var s=n,{customErrorMessage:r}=s,i=qr(s,["customErrorMessage"]);return(await _y(xp(t,e,_(P({},i),{method:Jl.PUT})),i)).body}async function iP(t,e,n){var s=n,{customErrorMessage:r}=s,i=qr(s,["customErrorMessage"]);return(await _y(xp(t,e,_(P({},i),{method:Jl.POST})),i)).body}async function pxe(t,i){var n=i,{customErrorMessage:e}=n,r=qr(n,["customErrorMessage"]);return(await _y(xp(t,null,_(P({},r),{method:Jl.DELETE})),r)).body}var Kt={};it(Kt,{PackageManager:()=>tn,detectPackageManager:()=>a9,executePackageAccessibleBinary:()=>g9,executePackageScript:()=>Uw,executePackageShellcode:()=>rD,executeWorkspaceAccessibleBinary:()=>qFe,executeWorkspaceLifecycleScript:()=>u9,executeWorkspaceScript:()=>c9,getPackageAccessibleBinaries:()=>Hw,getWorkspaceAccessibleBinaries:()=>l9,hasPackageScript:()=>GFe,hasWorkspaceScript:()=>tD,makeScriptEnv:()=>Vp,maybeExecuteWorkspaceLifecycleScript:()=>YFe,prepareExternalProject:()=>HFe});var Fp={};it(Fp,{getLibzipPromise:()=>$i,getLibzipSync:()=>v4});var yA=["number","number"],nP;(function(D){D[D.ZIP_ER_OK=0]="ZIP_ER_OK",D[D.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",D[D.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",D[D.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",D[D.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",D[D.ZIP_ER_READ=5]="ZIP_ER_READ",D[D.ZIP_ER_WRITE=6]="ZIP_ER_WRITE",D[D.ZIP_ER_CRC=7]="ZIP_ER_CRC",D[D.ZIP_ER_ZIPCLOSED=8]="ZIP_ER_ZIPCLOSED",D[D.ZIP_ER_NOENT=9]="ZIP_ER_NOENT",D[D.ZIP_ER_EXISTS=10]="ZIP_ER_EXISTS",D[D.ZIP_ER_OPEN=11]="ZIP_ER_OPEN",D[D.ZIP_ER_TMPOPEN=12]="ZIP_ER_TMPOPEN",D[D.ZIP_ER_ZLIB=13]="ZIP_ER_ZLIB",D[D.ZIP_ER_MEMORY=14]="ZIP_ER_MEMORY",D[D.ZIP_ER_CHANGED=15]="ZIP_ER_CHANGED",D[D.ZIP_ER_COMPNOTSUPP=16]="ZIP_ER_COMPNOTSUPP",D[D.ZIP_ER_EOF=17]="ZIP_ER_EOF",D[D.ZIP_ER_INVAL=18]="ZIP_ER_INVAL",D[D.ZIP_ER_NOZIP=19]="ZIP_ER_NOZIP",D[D.ZIP_ER_INTERNAL=20]="ZIP_ER_INTERNAL",D[D.ZIP_ER_INCONS=21]="ZIP_ER_INCONS",D[D.ZIP_ER_REMOVE=22]="ZIP_ER_REMOVE",D[D.ZIP_ER_DELETED=23]="ZIP_ER_DELETED",D[D.ZIP_ER_ENCRNOTSUPP=24]="ZIP_ER_ENCRNOTSUPP",D[D.ZIP_ER_RDONLY=25]="ZIP_ER_RDONLY",D[D.ZIP_ER_NOPASSWD=26]="ZIP_ER_NOPASSWD",D[D.ZIP_ER_WRONGPASSWD=27]="ZIP_ER_WRONGPASSWD",D[D.ZIP_ER_OPNOTSUPP=28]="ZIP_ER_OPNOTSUPP",D[D.ZIP_ER_INUSE=29]="ZIP_ER_INUSE",D[D.ZIP_ER_TELL=30]="ZIP_ER_TELL",D[D.ZIP_ER_COMPRESSED_DATA=31]="ZIP_ER_COMPRESSED_DATA"})(nP||(nP={}));var $8=t=>({get HEAP8(){return t.HEAP8},get HEAPU8(){return t.HEAPU8},errors:nP,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_CREATE:1,ZIP_EXCL:2,ZIP_TRUNCATE:8,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),uint16S:t._malloc(2),uint32S:t._malloc(4),uint64S:t._malloc(8),malloc:t._malloc,free:t._free,getValue:t.getValue,open:t.cwrap("zip_open","number",["string","number","number"]),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"]),stat:t.cwrap("zip_stat","number",["number","string","number","number"]),statIndex:t.cwrap("zip_stat_index","number",["number",...yA,"number","number"]),fopen:t.cwrap("zip_fopen","number",["number","string","number"]),fopenIndex:t.cwrap("zip_fopen_index","number",["number",...yA,"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",...yA,"number","number","number"]),setExternalAttributes:t.cwrap("zip_file_set_external_attributes","number",["number",...yA,"number","number","number"]),setMtime:t.cwrap("zip_file_set_mtime","number",["number",...yA,"number","number"]),setCompression:t.cwrap("zip_set_file_compression","number",["number",...yA,"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","number","number","number"]),fromBuffer:t.cwrap("zip_source_buffer","number",["number","number",...yA,"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",...yA,"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"]),setMtime:t.cwrap("zip_source_set_mtime","number",["number","number"])},struct:{stat:t.cwrap("zipstruct_stat","number",[]),statS:t.cwrap("zipstruct_statS","number",[]),statName:t.cwrap("zipstruct_stat_name","string",["number"]),statIndex:t.cwrap("zipstruct_stat_index","number",["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"]),error:t.cwrap("zipstruct_error","number",[]),errorS:t.cwrap("zipstruct_errorS","number",[]),errorCodeZip:t.cwrap("zipstruct_error_code_zip","number",["number"])}});var BP=null;function v4(){return BP===null&&(BP=$8(b4())),BP}async function $i(){return v4()}var jp={};it(jp,{ShellError:()=>as,execute:()=>Fw,globUtils:()=>bw});var Hp={};it(Hp,{parseResolution:()=>gw,parseShell:()=>Aw,parseSyml:()=>Ii,stringifyArgument:()=>SP,stringifyArgumentSegment:()=>xP,stringifyArithmeticExpression:()=>uw,stringifyCommand:()=>vP,stringifyCommandChain:()=>rg,stringifyCommandChainThen:()=>bP,stringifyCommandLine:()=>lw,stringifyCommandLineThen:()=>QP,stringifyEnvSegment:()=>cw,stringifyRedirectArgument:()=>Np,stringifyResolution:()=>fw,stringifyShell:()=>tg,stringifyShellLine:()=>tg,stringifySyml:()=>Qa,stringifyValueArgument:()=>ig});var k4=ie(x4());function Aw(t,e={isGlobPattern:()=>!1}){try{return(0,k4.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 tg(t,{endSemicolon:e=!1}={}){return t.map(({command:r,type:i},n)=>`${lw(r)}${i===";"?n!==t.length-1||e?";":"":" &"}`).join(" ")}function lw(t){return`${rg(t.chain)}${t.then?` ${QP(t.then)}`:""}`}function QP(t){return`${t.type} ${lw(t.line)}`}function rg(t){return`${vP(t)}${t.then?` ${bP(t.then)}`:""}`}function bP(t){return`${t.type} ${rg(t.chain)}`}function vP(t){switch(t.type){case"command":return`${t.envs.length>0?`${t.envs.map(e=>cw(e)).join(" ")} `:""}${t.args.map(e=>SP(e)).join(" ")}`;case"subshell":return`(${tg(t.subshell)})${t.args.length>0?` ${t.args.map(e=>Np(e)).join(" ")}`:""}`;case"group":return`{ ${tg(t.group,{endSemicolon:!0})} }${t.args.length>0?` ${t.args.map(e=>Np(e)).join(" ")}`:""}`;case"envs":return t.envs.map(e=>cw(e)).join(" ");default:throw new Error(`Unsupported command type: "${t.type}"`)}}function cw(t){return`${t.name}=${t.args[0]?ig(t.args[0]):""}`}function SP(t){switch(t.type){case"redirection":return Np(t);case"argument":return ig(t);default:throw new Error(`Unsupported argument type: "${t.type}"`)}}function Np(t){return`${t.subtype} ${t.args.map(e=>ig(e)).join(" ")}`}function ig(t){return t.segments.map(e=>xP(e)).join("")}function xP(t){let e=(i,n)=>n?`"${i}"`:i,r=i=>i===""?'""':i.match(/[(){}<>$|&; \t"']/)?`$'${i.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0")}'`:i;switch(t.type){case"text":return r(t.text);case"glob":return t.pattern;case"shell":return e(`\${${tg(t.shell)}}`,t.quoted);case"variable":return e(typeof t.defaultValue=="undefined"?`\${${t.name}}`:t.defaultValue.length===0?`\${${t.name}:-}`:`\${${t.name}:-${t.defaultValue.map(i=>ig(i)).join(" ")}}`,t.quoted);case"arithmetic":return`$(( ${uw(t.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${t.type}"`)}}function uw(t){let e=n=>{switch(n){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 "${n}"`)}},r=(n,s)=>s?`( ${n} )`:n,i=n=>r(uw(n),!["number","variable"].includes(n.type));switch(t.type){case"number":return String(t.value);case"variable":return t.name;default:return`${i(t.left)} ${e(t.type)} ${i(t.right)}`}}var R4=ie(D4());function gw(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,R4.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 fw(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 Qw=ie(w5()),b5=ie(Q5()),$De=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,v5=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],HP=class{constructor(e){this.data=e}};function S5(t){return t.match($De)?t:JSON.stringify(t)}function x5(t){return typeof t=="undefined"?!0:typeof t=="object"&&t!==null?Object.keys(t).every(e=>x5(t[e])):!1}function GP(t,e,r){if(t===null)return`null -`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()} -`;if(typeof t=="string")return`${S5(t)} -`;if(Array.isArray(t)){if(t.length===0)return`[] -`;let i=" ".repeat(e);return` -${t.map(s=>`${i}- ${GP(s,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let i,n;t instanceof HP?(i=t.data,n=!1):(i=t,n=!0);let s=" ".repeat(e),o=Object.keys(i);n&&o.sort((l,c)=>{let u=v5.indexOf(l),g=v5.indexOf(c);return u===-1&&g===-1?lc?1:0:u!==-1&&g===-1?-1:u===-1&&g!==-1?1:u-g});let a=o.filter(l=>!x5(i[l])).map((l,c)=>{let u=i[l],g=S5(l),f=GP(u,e+1,!0),h=c>0||r?s:"";return f.startsWith(` -`)?`${h}${g}:${f}`:`${h}${g}: ${f}`}).join(e===0?` -`:"")||` -`;return r?` -${a}`:`${a}`}throw new Error(`Unsupported value type (${t})`)}function Qa(t){try{let e=GP(t,0,!1);return e!==` -`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}Qa.PreserveOrdering=HP;function eRe(t){return t.endsWith(` -`)||(t+=` -`),(0,b5.parse)(t)}var tRe=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function rRe(t){if(tRe.test(t))return eRe(t);let e=(0,Qw.safeLoad)(t,{schema:Qw.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 Ii(t){return rRe(t)}var U5=ie(jb()),H5=ie(require("os")),Kn=ie(require("stream")),G5=ie(require("util"));var as=class extends Error{constructor(e){super(e);this.name="ShellError"}};var bw={};it(bw,{fastGlobOptions:()=>D5,isBraceExpansion:()=>R5,isGlobPattern:()=>iRe,match:()=>nRe,micromatchOptions:()=>Sw});var k5=ie(gy()),P5=ie(require("fs")),vw=ie(Nn()),Sw={strictBrackets:!0},D5={onlyDirectories:!1,onlyFiles:!1};function iRe(t){if(!vw.default.scan(t,Sw).isGlob)return!1;try{vw.default.parse(t,Sw)}catch{return!1}return!0}function nRe(t,{cwd:e,baseFs:r}){return(0,k5.default)(t,_(P({},D5),{cwd:M.fromPortablePath(e),fs:SE(P5.default,new ah(r))}))}function R5(t){return vw.default.scan(t,Sw).isBrace}var F5=ie(bb()),Bo=ie(require("stream")),N5=ie(require("string_decoder")),wn;(function(i){i[i.STDIN=0]="STDIN",i[i.STDOUT=1]="STDOUT",i[i.STDERR=2]="STDERR"})(wn||(wn={}));var sc=new Set;function jP(){}function YP(){for(let t of sc)t.kill()}function L5(t,e,r,i){return n=>{let s=n[0]instanceof Bo.Transform?"pipe":n[0],o=n[1]instanceof Bo.Transform?"pipe":n[1],a=n[2]instanceof Bo.Transform?"pipe":n[2],l=(0,F5.default)(t,e,_(P({},i),{stdio:[s,o,a]}));return sc.add(l),sc.size===1&&(process.on("SIGINT",jP),process.on("SIGTERM",YP)),n[0]instanceof Bo.Transform&&n[0].pipe(l.stdin),n[1]instanceof Bo.Transform&&l.stdout.pipe(n[1],{end:!1}),n[2]instanceof Bo.Transform&&l.stderr.pipe(n[2],{end:!1}),{stdin:l.stdin,promise:new Promise(c=>{l.on("error",u=>{switch(sc.delete(l),sc.size===0&&(process.off("SIGINT",jP),process.off("SIGTERM",YP)),u.code){case"ENOENT":n[2].write(`command not found: ${t} -`),c(127);break;case"EACCES":n[2].write(`permission denied: ${t} -`),c(128);break;default:n[2].write(`uncaught error: ${u.message} -`),c(1);break}}),l.on("exit",u=>{sc.delete(l),sc.size===0&&(process.off("SIGINT",jP),process.off("SIGTERM",YP)),c(u!==null?u:129)})})}}}function T5(t){return e=>{let r=e[0]==="pipe"?new Bo.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}var Os=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},M5=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}},Gp=class{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:i,stderr:n}){let s=new Gp(null,e);return s.stdin=r,s.stdout=i,s.stderr=n,s}pipeTo(e,r=1){let i=new Gp(this,e),n=new M5;return i.pipe=n,i.stdout=this.stdout,i.stderr=this.stderr,(r&1)==1?this.stdout=n:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)==2?this.stderr=n:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),i}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 i;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");i=this.stderr,e[2]=i.get();let n=this.implementation(e);return this.pipe&&this.pipe.attach(n.stdin),await n.promise.then(s=>(r.close(),i.close(),s))}async run(){let e=[];for(let i=this;i;i=i.ancestor)e.push(i.exec());return(await Promise.all(e))[0]}};function xw(t,e){return Gp.start(t,e)}function O5(t,e=null){let r=new Bo.PassThrough,i=new N5.StringDecoder,n="";return r.on("data",s=>{let o=i.write(s),a;do if(a=o.indexOf(` -`),a!==-1){let l=n+o.substr(0,a);o=o.substr(a+1),n="",t(e!==null?`${e} ${l}`:l)}while(a!==-1);n+=o}),r.on("end",()=>{let s=i.end();s!==""&&t(e!==null?`${e} ${s}`:s)}),r}function K5(t,{prefix:e}){return{stdout:O5(r=>t.stdout.write(`${r} -`),t.stdout.isTTY?e:null),stderr:O5(r=>t.stderr.write(`${r} -`),t.stderr.isTTY?e:null)}}var sRe=(0,G5.promisify)(setTimeout);var Fi;(function(r){r[r.Readable=1]="Readable",r[r.Writable=2]="Writable"})(Fi||(Fi={}));function j5(t,e,r){let i=new Kn.PassThrough({autoDestroy:!0});switch(t){case wn.STDIN:(e&1)==1&&r.stdin.pipe(i,{end:!1}),(e&2)==2&&r.stdin instanceof Kn.Writable&&i.pipe(r.stdin,{end:!1});break;case wn.STDOUT:(e&1)==1&&r.stdout.pipe(i,{end:!1}),(e&2)==2&&i.pipe(r.stdout,{end:!1});break;case wn.STDERR:(e&1)==1&&r.stderr.pipe(i,{end:!1}),(e&2)==2&&i.pipe(r.stderr,{end:!1});break;default:throw new as(`Bad file descriptor: "${t}"`)}return i}function kw(t,e={}){let r=P(P({},t),e);return r.environment=P(P({},t.environment),e.environment),r.variables=P(P({},t.variables),e.variables),r}var oRe=new Map([["cd",async([t=(0,H5.homedir)(),...e],r,i)=>{let n=v.resolve(i.cwd,M.toPortablePath(t));if(!(await r.baseFs.statPromise(n).catch(o=>{throw o.code==="ENOENT"?new as(`cd: no such file or directory: ${t}`):o})).isDirectory())throw new as(`cd: not a directory: ${t}`);return i.cwd=n,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${M.fromPortablePath(r.cwd)} -`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,i)=>i.exitCode=parseInt(t!=null?t:i.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")} -`),0)],["sleep",async([t],e,r)=>{if(typeof t=="undefined")throw new as("sleep: missing operand");let i=Number(t);if(Number.isNaN(i))throw new as(`sleep: invalid time interval '${t}'`);return await sRe(1e3*i,0)}],["__ysh_run_procedure",async(t,e,r)=>{let i=r.procedures[t[0]];return await xw(i,{stdin:new Os(r.stdin),stdout:new Os(r.stdout),stderr:new Os(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let i=r.stdin,n=r.stdout,s=r.stderr,o=[],a=[],l=[],c=0;for(;t[c]!=="--";){let g=t[c++],{type:f,fd:h}=JSON.parse(g),p=B=>{switch(h){case null:case 0:o.push(B);break;default:throw new Error(`Unsupported file descriptor: "${h}"`)}},d=B=>{switch(h){case null:case 1:a.push(B);break;case 2:l.push(B);break;default:throw new Error(`Unsupported file descriptor: "${h}"`)}},m=Number(t[c++]),I=c+m;for(let B=c;Be.baseFs.createReadStream(v.resolve(r.cwd,M.toPortablePath(t[B]))));break;case"<<<":p(()=>{let b=new Kn.PassThrough;return process.nextTick(()=>{b.write(`${t[B]} -`),b.end()}),b});break;case"<&":p(()=>j5(Number(t[B]),1,r));break;case">":case">>":{let b=v.resolve(r.cwd,M.toPortablePath(t[B]));d(b==="/dev/null"?new Kn.Writable({autoDestroy:!0,emitClose:!0,write(R,H,L){setImmediate(L)}}):e.baseFs.createWriteStream(b,f===">>"?{flags:"a"}:void 0))}break;case">&":d(j5(Number(t[B]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${f}"`)}}if(o.length>0){let g=new Kn.PassThrough;i=g;let f=h=>{if(h===o.length)g.end();else{let p=o[h]();p.pipe(g,{end:!1}),p.on("end",()=>{f(h+1)})}};f(0)}if(a.length>0){let g=new Kn.PassThrough;n=g;for(let f of a)g.pipe(f)}if(l.length>0){let g=new Kn.PassThrough;s=g;for(let f of l)g.pipe(f)}let u=await xw(Yp(t.slice(c+1),e,r),{stdin:new Os(i),stdout:new Os(n),stderr:new Os(s)}).run();return await Promise.all(a.map(g=>new Promise((f,h)=>{g.on("error",p=>{h(p)}),g.on("close",()=>{f()}),g.end()}))),await Promise.all(l.map(g=>new Promise((f,h)=>{g.on("error",p=>{h(p)}),g.on("close",()=>{f()}),g.end()}))),u}]]);async function aRe(t,e,r){let i=[],n=new Kn.PassThrough;return n.on("data",s=>i.push(s)),await Pw(t,e,kw(r,{stdout:n})),Buffer.concat(i).toString().replace(/[\r\n]+$/,"")}async function Y5(t,e,r){let i=t.map(async s=>{let o=await oc(s.args,e,r);return{name:s.name,value:o.join(" ")}});return(await Promise.all(i)).reduce((s,o)=>(s[o.name]=o.value,s),{})}function Dw(t){return t.match(/[^ \r\n\t]+/g)||[]}async function q5(t,e,r,i,n=i){switch(t.name){case"$":i(String(process.pid));break;case"#":i(String(e.args.length));break;case"@":if(t.quoted)for(let s of e.args)n(s);else for(let s of e.args){let o=Dw(s);for(let a=0;a=0&&st+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)};async function qp(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 i=[];await q5(_(P({},t),{quoted:!0}),e,r,s=>i.push(s));let n=Number(i.join(" "));return Number.isNaN(n)?qp({type:"variable",name:i.join(" ")},e,r):qp({type:"number",value:n},e,r)}else return ARe[t.type](await qp(t.left,e,r),await qp(t.right,e,r))}async function oc(t,e,r){let i=new Map,n=[],s=[],o=u=>{s.push(u)},a=()=>{s.length>0&&n.push(s.join("")),s=[]},l=u=>{o(u),a()},c=(u,g,f)=>{let h=JSON.stringify({type:u,fd:g}),p=i.get(h);typeof p=="undefined"&&i.set(h,p=[]),p.push(f)};for(let u of t){let g=!1;switch(u.type){case"redirection":{let f=await oc(u.args,e,r);for(let h of f)c(u.subtype,u.fd,h)}break;case"argument":for(let f of u.segments)switch(f.type){case"text":o(f.text);break;case"glob":o(f.pattern),g=!0;break;case"shell":{let h=await aRe(f.shell,e,r);if(f.quoted)o(h);else{let p=Dw(h);for(let d=0;d0){let u=[];for(let[g,f]of i.entries())u.splice(u.length,0,g,String(f.length),...f);n.splice(0,0,"__ysh_set_redirects",...u,"--")}return n}function Yp(t,e,r){e.builtins.has(t[0])||(t=["command",...t]);let i=M.fromPortablePath(r.cwd),n=r.environment;typeof n.PWD!="undefined"&&(n=_(P({},n),{PWD:i}));let[s,...o]=t;if(s==="command")return L5(o[0],o.slice(1),e,{cwd:i,env:n});let a=e.builtins.get(s);if(typeof a=="undefined")throw new Error(`Assertion failed: A builtin should exist for "${s}"`);return T5(async({stdin:l,stdout:c,stderr:u})=>{let{stdin:g,stdout:f,stderr:h}=r;r.stdin=l,r.stdout=c,r.stderr=u;try{return await a(o,e,r)}finally{r.stdin=g,r.stdout=f,r.stderr=h}})}function lRe(t,e,r){return i=>{let n=new Kn.PassThrough,s=Pw(t,e,kw(r,{stdin:n}));return{stdin:n,promise:s}}}function cRe(t,e,r){return i=>{let n=new Kn.PassThrough,s=Pw(t,e,r);return{stdin:n,promise:s}}}function J5(t,e,r,i){if(e.length===0)return t;{let n;do n=String(Math.random());while(Object.prototype.hasOwnProperty.call(i.procedures,n));return i.procedures=P({},i.procedures),i.procedures[n]=t,Yp([...e,"__ysh_run_procedure",n],r,i)}}async function W5(t,e,r){let i=t,n=null,s=null;for(;i;){let o=i.then?P({},r):r,a;switch(i.type){case"command":{let l=await oc(i.args,e,r),c=await Y5(i.envs,e,r);a=i.envs.length?Yp(l,e,kw(o,{environment:c})):Yp(l,e,o)}break;case"subshell":{let l=await oc(i.args,e,r),c=lRe(i.subshell,e,o);a=J5(c,l,e,o)}break;case"group":{let l=await oc(i.args,e,r),c=cRe(i.group,e,o);a=J5(c,l,e,o)}break;case"envs":{let l=await Y5(i.envs,e,r);o.environment=P(P({},o.environment),l),a=Yp(["true"],e,o)}break}if(typeof a=="undefined")throw new Error("Assertion failed: An action should have been generated");if(n===null)s=xw(a,{stdin:new Os(o.stdin),stdout:new Os(o.stdout),stderr:new Os(o.stderr)});else{if(s===null)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(n){case"|":s=s.pipeTo(a,wn.STDOUT);break;case"|&":s=s.pipeTo(a,wn.STDOUT|wn.STDERR);break}}i.then?(n=i.then.type,i=i.then.chain):i=null}if(s===null)throw new Error("Assertion failed: The execution pipeline should have been setup");return await s.run()}async function uRe(t,e,r,{background:i=!1}={}){function n(s){let o=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],a=o[s%o.length];return U5.default.hex(a)}if(i){let s=r.nextBackgroundJobIndex++,o=n(s),a=`[${s}]`,l=o(a),{stdout:c,stderr:u}=K5(r,{prefix:l});return r.backgroundJobs.push(W5(t,e,kw(r,{stdout:c,stderr:u})).catch(g=>u.write(`${g.message} -`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${l}, '${o(rg(t))}' has ended -`)})),0}return await W5(t,e,r)}async function gRe(t,e,r,{background:i=!1}={}){let n,s=a=>{n=a,r.variables["?"]=String(a)},o=async a=>{try{return await uRe(a.chain,e,r,{background:i&&typeof a.then=="undefined"})}catch(l){if(!(l instanceof as))throw l;return r.stderr.write(`${l.message} -`),1}};for(s(await o(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":n===0&&s(await o(t.then.line));break;case"||":n!==0&&s(await o(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return n}async function Pw(t,e,r){let i=r.backgroundJobs;r.backgroundJobs=[];let n=0;for(let{command:s,type:o}of t){if(n=await gRe(s,e,r,{background:o==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(n)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=i,n}function z5(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=>Rw(e));case"arithmetic":return qP(t.arithmetic);case"shell":return JP(t.shell);default:return!1}}function Rw(t){switch(t.type){case"redirection":return t.args.some(e=>Rw(e));case"argument":return t.segments.some(e=>z5(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function qP(t){switch(t.type){case"variable":return z5(t);case"number":return!1;default:return qP(t.left)||qP(t.right)}}function JP(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let i;switch(r.type){case"subshell":i=JP(r.subshell);break;case"command":i=r.envs.some(n=>n.args.some(s=>Rw(s)))||r.args.some(n=>Rw(n));break}if(i)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function Fw(t,e=[],{baseFs:r=new Wt,builtins:i={},cwd:n=M.toPortablePath(process.cwd()),env:s=process.env,stdin:o=process.stdin,stdout:a=process.stdout,stderr:l=process.stderr,variables:c={},glob:u=bw}={}){let g={};for(let[p,d]of Object.entries(s))typeof d!="undefined"&&(g[p]=d);let f=new Map(oRe);for(let[p,d]of Object.entries(i))f.set(p,d);o===null&&(o=new Kn.PassThrough,o.end());let h=Aw(t,u);if(!JP(h)&&h.length>0&&e.length>0){let{command:p}=h[h.length-1];for(;p.then;)p=p.then.line;let d=p.chain;for(;d.then;)d=d.then.chain;d.type==="command"&&(d.args=d.args.concat(e.map(m=>({type:"argument",segments:[{type:"text",text:m}]}))))}return await Pw(h,{args:e,baseFs:r,builtins:f,initialStdin:o,initialStdout:a,initialStderr:l,glob:u},{cwd:n,environment:g,exitCode:null,procedures:{},stdin:o,stdout:a,stderr:l,variables:Object.assign({},c,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var s9=ie(ZP()),o9=ie(Wp()),cc=ie(require("stream"));var J6=ie(Or());var zp=class{supportsDescriptor(e,r){return!!(e.range.startsWith(zp.protocol)||r.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,r){return!!e.reference.startsWith(zp.protocol)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){return e}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){return[i.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,r,i){return null}async resolve(e,r){let i=r.project.getWorkspaceByCwd(e.reference.slice(zp.protocol.length));return _(P({},e),{version:i.manifest.version||"0.0.0",languageName:"unknown",linkType:gt.SOFT,conditions:null,dependencies:new Map([...i.manifest.dependencies,...i.manifest.devDependencies]),peerDependencies:new Map([...i.manifest.peerDependencies]),dependenciesMeta:i.manifest.dependenciesMeta,peerDependenciesMeta:i.manifest.peerDependenciesMeta,bin:i.manifest.bin})}},Yr=zp;Yr.protocol="workspace:";var qt={};it(qt,{SemVer:()=>j6.SemVer,satisfiesWithPrereleases:()=>lc,validRange:()=>Us});var Lw=ie(Or()),j6=ie(Or()),Y6=new Map;function lc(t,e,r=!1){if(!t)return!1;let i=`${e}${r}`,n=Y6.get(i);if(typeof n=="undefined")try{n=new Lw.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{Y6.set(i,n||null)}else if(n===null)return!1;let s;try{s=new Lw.default.SemVer(t,n)}catch(o){return!1}return n.test(s)?!0:(s.prerelease&&(s.prerelease=[]),n.set.some(o=>{for(let a of o)a.semver.prerelease&&(a.semver.prerelease=[]);return o.every(a=>a.test(s))}))}var q6=new Map;function Us(t){if(t.indexOf(":")!==-1)return null;let e=q6.get(t);if(typeof e!="undefined")return e;try{e=new Lw.default.Range(t)}catch{e=null}return q6.set(t,e),e}var vA=class{constructor(){this.indent=" ";this.name=null;this.version=null;this.os=null;this.cpu=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 async tryFind(e,{baseFs:r=new Wt}={}){let i=v.join(e,"package.json");return await r.existsPromise(i)?await vA.fromFile(i,{baseFs:r}):null}static async find(e,{baseFs:r}={}){let i=await vA.tryFind(e,{baseFs:r});if(i===null)throw new Error("Manifest not found");return i}static async fromFile(e,{baseFs:r=new Wt}={}){let i=new vA;return await i.loadFile(e,{baseFs:r}),i}static fromText(e){let r=new vA;return r.loadFromText(e),r}static isManifestFieldCompatible(e,r){if(e===null)return!0;let i=!0,n=!1;for(let s of e)if(s[0]==="!"){if(n=!0,r===s.slice(1))return!1}else if(i=!1,s===r)return!0;return n&&i}loadFromText(e){let r;try{r=JSON.parse(z6(e)||"{}")}catch(i){throw i.message+=` (when parsing ${e})`,i}this.load(r),this.indent=W6(e)}async loadFile(e,{baseFs:r=new Wt}){let i=await r.readFilePromise(e,"utf8"),n;try{n=JSON.parse(z6(i)||"{}")}catch(s){throw s.message+=` (when parsing ${e})`,s}this.load(n),this.indent=W6(i)}load(e,{yamlCompatibilityMode:r=!1}={}){if(typeof e!="object"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let i=[];if(this.name=null,typeof e.name=="string")try{this.name=En(e.name)}catch(s){i.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 s=[];this.os=s;for(let o of e.os)typeof o!="string"?i.push(new Error("Parsing failed for the 'os' field")):s.push(o)}else this.os=null;if(Array.isArray(e.cpu)){let s=[];this.cpu=s;for(let o of e.cpu)typeof o!="string"?i.push(new Error("Parsing failed for the 'cpu' field")):s.push(o)}else this.cpu=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=en(e.main):this.main=null,typeof e.module=="string"?this.module=en(e.module):this.module=null,e.browser!=null)if(typeof e.browser=="string")this.browser=en(e.browser);else{this.browser=new Map;for(let[s,o]of Object.entries(e.browser))this.browser.set(en(s),typeof o=="string"?en(o):o)}else this.browser=null;if(this.bin=new Map,typeof e.bin=="string")this.name!==null?this.bin.set(this.name.name,en(e.bin)):i.push(new Error("String bin field, but no attached package name"));else if(typeof e.bin=="object"&&e.bin!==null)for(let[s,o]of Object.entries(e.bin)){if(typeof o!="string"){i.push(new Error(`Invalid bin definition for '${s}'`));continue}this.bin.set(s,en(o))}if(this.scripts=new Map,typeof e.scripts=="object"&&e.scripts!==null)for(let[s,o]of Object.entries(e.scripts)){if(typeof o!="string"){i.push(new Error(`Invalid script definition for '${s}'`));continue}this.scripts.set(s,o)}if(this.dependencies=new Map,typeof e.dependencies=="object"&&e.dependencies!==null)for(let[s,o]of Object.entries(e.dependencies)){if(typeof o!="string"){i.push(new Error(`Invalid dependency range for '${s}'`));continue}let a;try{a=En(s)}catch(c){i.push(new Error(`Parsing failed for the dependency name '${s}'`));continue}let l=Yt(a,o);this.dependencies.set(l.identHash,l)}if(this.devDependencies=new Map,typeof e.devDependencies=="object"&&e.devDependencies!==null)for(let[s,o]of Object.entries(e.devDependencies)){if(typeof o!="string"){i.push(new Error(`Invalid dependency range for '${s}'`));continue}let a;try{a=En(s)}catch(c){i.push(new Error(`Parsing failed for the dependency name '${s}'`));continue}let l=Yt(a,o);this.devDependencies.set(l.identHash,l)}if(this.peerDependencies=new Map,typeof e.peerDependencies=="object"&&e.peerDependencies!==null)for(let[s,o]of Object.entries(e.peerDependencies)){let a;try{a=En(s)}catch(c){i.push(new Error(`Parsing failed for the dependency name '${s}'`));continue}(typeof o!="string"||!o.startsWith(Yr.protocol)&&!Us(o))&&(i.push(new Error(`Invalid dependency range for '${s}'`)),o="*");let l=Yt(a,o);this.peerDependencies.set(l.identHash,l)}typeof e.workspaces=="object"&&e.workspaces.nohoist&&i.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));let n=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 s of n){if(typeof s!="string"){i.push(new Error(`Invalid workspace definition for '${s}'`));continue}this.workspaceDefinitions.push({pattern:s})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta=="object"&&e.dependenciesMeta!==null)for(let[s,o]of Object.entries(e.dependenciesMeta)){if(typeof o!="object"||o===null){i.push(new Error(`Invalid meta field for '${s}`));continue}let a=pA(s),l=this.ensureDependencyMeta(a),c=Tw(o.built,{yamlCompatibilityMode:r});if(c===null){i.push(new Error(`Invalid built meta field for '${s}'`));continue}let u=Tw(o.optional,{yamlCompatibilityMode:r});if(u===null){i.push(new Error(`Invalid optional meta field for '${s}'`));continue}let g=Tw(o.unplugged,{yamlCompatibilityMode:r});if(g===null){i.push(new Error(`Invalid unplugged meta field for '${s}'`));continue}Object.assign(l,{built:c,optional:u,unplugged:g})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta=="object"&&e.peerDependenciesMeta!==null)for(let[s,o]of Object.entries(e.peerDependenciesMeta)){if(typeof o!="object"||o===null){i.push(new Error(`Invalid meta field for '${s}'`));continue}let a=pA(s),l=this.ensurePeerDependencyMeta(a),c=Tw(o.optional,{yamlCompatibilityMode:r});if(c===null){i.push(new Error(`Invalid optional meta field for '${s}'`));continue}Object.assign(l,{optional:c})}if(this.resolutions=[],typeof e.resolutions=="object"&&e.resolutions!==null)for(let[s,o]of Object.entries(e.resolutions)){if(typeof o!="string"){i.push(new Error(`Invalid resolution entry for '${s}'`));continue}try{this.resolutions.push({pattern:gw(s),reference:o})}catch(a){i.push(a);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let s of e.files){if(typeof s!="string"){i.push(new Error(`Invalid files entry for '${s}'`));continue}this.files.add(s)}}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=en(e.publishConfig.main)),typeof e.publishConfig.module=="string"&&(this.publishConfig.module=en(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser=="string")this.publishConfig.browser=en(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[s,o]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set(en(s),typeof o=="string"?en(o):o)}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,en(e.publishConfig.bin)]]):i.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[s,o]of Object.entries(e.publishConfig.bin)){if(typeof o!="string"){i.push(new Error(`Invalid bin definition for '${s}'`));continue}this.publishConfig.bin.set(s,en(o))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let s of e.publishConfig.executableFiles){if(typeof s!="string"){i.push(new Error("Invalid executable file definition"));continue}this.publishConfig.executableFiles.add(en(s))}}}else this.publishConfig=null;if(typeof e.installConfig=="object"&&e.installConfig!==null){this.installConfig={};for(let s of Object.keys(e.installConfig))s==="hoistingLimits"?typeof e.installConfig.hoistingLimits=="string"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:i.push(new Error("Invalid hoisting limits definition")):s=="selfReferences"?typeof e.installConfig.selfReferences=="boolean"?this.installConfig.selfReferences=e.installConfig.selfReferences:i.push(new Error("Invalid selfReferences definition, must be a boolean value")):i.push(new Error(`Unrecognized installConfig key: ${s}`))}else this.installConfig=null;if(typeof e.optionalDependencies=="object"&&e.optionalDependencies!==null)for(let[s,o]of Object.entries(e.optionalDependencies)){if(typeof o!="string"){i.push(new Error(`Invalid dependency range for '${s}'`));continue}let a;try{a=En(s)}catch(g){i.push(new Error(`Parsing failed for the dependency name '${s}'`));continue}let l=Yt(a,o);this.dependencies.set(l.identHash,l);let c=Yt(a,"unknown"),u=this.ensureDependencyMeta(c);Object.assign(u,{optional:!0})}typeof e.preferUnplugged=="boolean"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=i}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(V6("os",this.os)),this.cpu&&this.cpu.length>0&&e.push(V6("cpu",this.cpu)),e.length>0?e.join(" & "):null}isCompatibleWithOS(e){return vA.isManifestFieldCompatible(this.os,e)}isCompatibleWithCPU(e){return vA.isManifestFieldCompatible(this.cpu,e)}ensureDependencyMeta(e){if(e.range!=="unknown"&&!J6.default.valid(e.range))throw new Error(`Invalid meta field range for '${In(e)}'`);let r=St(e),i=e.range!=="unknown"?e.range:null,n=this.dependenciesMeta.get(r);n||this.dependenciesMeta.set(r,n=new Map);let s=n.get(i);return s||n.set(i,s={}),s}ensurePeerDependencyMeta(e){if(e.range!=="unknown")throw new Error(`Invalid meta field range for '${In(e)}'`);let r=St(e),i=this.peerDependenciesMeta.get(r);return i||this.peerDependenciesMeta.set(r,i={}),i}setRawField(e,r,{after:i=[]}={}){let n=new Set(i.filter(s=>Object.prototype.hasOwnProperty.call(this.raw,s)));if(n.size===0||Object.prototype.hasOwnProperty.call(this.raw,e))this.raw[e]=r;else{let s=this.raw,o=this.raw={},a=!1;for(let l of Object.keys(s))o[l]=s[l],a||(n.delete(l),n.size===0&&(o[e]=r,a=!0))}}exportTo(e,{compatibilityMode:r=!0}={}){var s;if(Object.assign(e,this.raw),this.name!==null?e.name=St(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 o=this.browser;typeof o=="string"?e.browser=o:o instanceof Map&&(e.browser=Object.assign({},...Array.from(o.keys()).sort().map(a=>({[a]:o.get(a)}))))}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(o=>({[o]:this.bin.get(o)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces=_(P({},this.raw.workspaces),{packages:this.workspaceDefinitions.map(({pattern:o})=>o)}):e.workspaces=this.workspaceDefinitions.map(({pattern:o})=>o):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let i=[],n=[];for(let o of this.dependencies.values()){let a=this.dependenciesMeta.get(St(o)),l=!1;if(r&&a){let c=a.get(null);c&&c.optional&&(l=!0)}l?n.push(o):i.push(o)}i.length>0?e.dependencies=Object.assign({},...Ou(i).map(o=>({[St(o)]:o.range}))):delete e.dependencies,n.length>0?e.optionalDependencies=Object.assign({},...Ou(n).map(o=>({[St(o)]:o.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...Ou(this.devDependencies.values()).map(o=>({[St(o)]:o.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...Ou(this.peerDependencies.values()).map(o=>({[St(o)]:o.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[o,a]of gn(this.dependenciesMeta.entries(),([l,c])=>l))for(let[l,c]of gn(a.entries(),([u,g])=>u!==null?`0${u}`:"1")){let u=l!==null?In(Yt(En(o),l)):o,g=P({},c);r&&l===null&&delete g.optional,Object.keys(g).length!==0&&(e.dependenciesMeta[u]=g)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...gn(this.peerDependenciesMeta.entries(),([o,a])=>o).map(([o,a])=>({[o]:a}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:o,reference:a})=>({[fw(o)]:a}))):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){(s=e.scripts)!=null||(e.scripts={});for(let o of Object.keys(e.scripts))this.scripts.has(o)||delete e.scripts[o];for(let[o,a]of this.scripts.entries())e.scripts[o]=a}else delete e.scripts;return e}},Ze=vA;Ze.fileName="package.json",Ze.allDependencies=["dependencies","devDependencies","peerDependencies"],Ze.hardDependencies=["dependencies","devDependencies"];function W6(t){let e=t.match(/^[ \t]+/m);return e?e[0]:" "}function z6(t){return t.charCodeAt(0)===65279?t.slice(1):t}function en(t){return t.replace(/\\/g,"/")}function Tw(t,{yamlCompatibilityMode:e}){return e?Kv(t):typeof t=="undefined"||typeof t=="boolean"?t:null}function _6(t,e){let r=e.search(/[^!]/);if(r===-1)return"invalid";let i=r%2==0?"":"!",n=e.slice(r);return`${i}${t}=${n}`}function V6(t,e){return e.length===1?_6(t,e[0]):`(${e.map(r=>_6(t,r)).join(" | ")})`}var e9=ie($6()),Ow=ie(ml());var t9=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],r9=80,NFe=new Set([z.FETCH_NOT_CACHED,z.UNUSED_CACHE_ENTRY]),LFe=5,SA=Ow.default.GITHUB_ACTIONS?{start:t=>`::group::${t} -`,end:t=>`::endgroup:: -`}:Ow.default.TRAVIS?{start:t=>`travis_fold:start:${t} -`,end:t=>`travis_fold:end:${t} -`}:Ow.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r${t} -`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r`}:null,i9=new Date,TFe=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,MFe=t=>t,Kw=MFe({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}}),OFe=TFe&&Object.keys(Kw).find(t=>{let e=Kw[t];return!(e.date&&(e.date[0]!==i9.getDate()||e.date[1]!==i9.getMonth()+1))})||"default";function n9(t,{configuration:e,json:r}){if(!e.get("enableMessageNames"))return"";let n=KE(t===null?0:t);return!r&&t===null?Ve(e,n,"grey"):n}function eD(t,{configuration:e,json:r}){let i=n9(t,{configuration:e,json:r});if(!i||t===null||t===z.UNNAMED)return i;let n=z[t],s=`https://yarnpkg.com/advanced/error-codes#${i}---${n}`.toLowerCase();return Ku(e,i,s)}var Fe=class extends Xi{constructor({configuration:e,stdout:r,json:i=!1,includeFooter:n=!0,includeLogs:s=!i,includeInfos:o=s,includeWarnings:a=s,forgettableBufferSize:l=LFe,forgettableNames:c=new Set}){super();this.uncommitted=new Set;this.cacheHitCount=0;this.cacheMissCount=0;this.lastCacheMiss=null;this.warningCount=0;this.errorCount=0;this.startTime=Date.now();this.indent=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.forgettableLines=[];Cp(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=l,this.forgettableNames=new Set([...c,...NFe]),this.includeFooter=n,this.includeInfos=o,this.includeWarnings=a,this.json=i,this.stdout=r;let u=this.configuration.get("progressBarStyle")||OFe;if(!Object.prototype.hasOwnProperty.call(Kw,u))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=Kw[u];let g="\u27A4 YN0000: \u250C ".length,f=Math.max(0,Math.min(process.stdout.columns-g,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*f/80)}static async start(e,r){let i=new this(e),n=process.emitWarning;process.emitWarning=(s,o)=>{if(typeof s!="string"){let l=s;s=l.message,o=o!=null?o:l.name}let a=typeof o!="undefined"?`${o}: ${s}`:s;i.reportWarning(z.UNNAMED,a)};try{await r(i)}catch(s){i.reportExceptionOnce(s)}finally{await i.finalize(),process.emitWarning=n}return i}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,r){this.lastCacheMiss=e,this.cacheMissCount+=1,typeof r!="undefined"&&!this.configuration.get("preferAggregateCacheInfo")&&this.reportInfo(z.FETCH_NOT_CACHED,r)}startTimerSync(e,r,i){let n=typeof r=="function"?{}:r,s=typeof r=="function"?r:i,o={committed:!1,action:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,SA!==null&&!this.json&&this.includeInfos&&this.stdout.write(SA.start(e))}};n.skipIfEmpty?this.uncommitted.add(o):(o.action(),o.committed=!0);let a=Date.now();try{return s()}catch(l){throw this.reportExceptionOnce(l),l}finally{let l=Date.now();this.uncommitted.delete(o),o.committed&&(this.indent-=1,SA!==null&&!this.json&&this.includeInfos&&this.stdout.write(SA.end(e)),this.configuration.get("enableTimers")&&l-a>200?this.reportInfo(null,`\u2514 Completed in ${Ve(this.configuration,l-a,Le.DURATION)}`):this.reportInfo(null,"\u2514 Completed"))}}async startTimerPromise(e,r,i){let n=typeof r=="function"?{}:r,s=typeof r=="function"?r:i,o={committed:!1,action:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,SA!==null&&!this.json&&this.includeInfos&&this.stdout.write(SA.start(e))}};n.skipIfEmpty?this.uncommitted.add(o):(o.action(),o.committed=!0);let a=Date.now();try{return await s()}catch(l){throw this.reportExceptionOnce(l),l}finally{let l=Date.now();this.uncommitted.delete(o),o.committed&&(this.indent-=1,SA!==null&&!this.json&&this.includeInfos&&this.stdout.write(SA.end(e)),this.configuration.get("enableTimers")&&l-a>200?this.reportInfo(null,`\u2514 Completed in ${Ve(this.configuration,l-a,Le.DURATION)}`):this.reportInfo(null,"\u2514 Completed"))}}async startCacheReport(e){let r=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await e()}catch(i){throw this.reportExceptionOnce(i),i}finally{r!==null&&this.reportCacheChanges(r)}}reportSeparator(){this.indent===0?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(e,r){if(!this.includeInfos)return;this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"",s=`${Ve(this.configuration,"\u27A4","blueBright")} ${n}${this.formatIndent()}${r}`;if(this.json)this.reportJson({type:"info",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:r});else if(this.forgettableNames.has(e))if(this.forgettableLines.push(s),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(s,{truncate:!0});else this.writeLineWithForgettableReset(s)}reportWarning(e,r){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"";this.json?this.reportJson({type:"warning",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:r}):this.writeLineWithForgettableReset(`${Ve(this.configuration,"\u27A4","yellowBright")} ${n}${this.formatIndent()}${r}`)}reportError(e,r){this.errorCount+=1,this.commit();let i=this.formatNameWithHyperlink(e),n=i?`${i}: `:"";this.json?this.reportJson({type:"error",name:e,displayName:this.formatName(e),indent:this.formatIndent(),data:r}):this.writeLineWithForgettableReset(`${Ve(this.configuration,"\u27A4","redBright")} ${n}${this.formatIndent()}${r}`,{truncate:!1})}reportProgress(e){let r=!1,i=Promise.resolve().then(async()=>{let s={progress:0,title:void 0};this.progress.set(e,{definition:s,lastScaledSize:-1}),this.refreshProgress(-1);for await(let{progress:o,title:a}of e)r||s.progress===o&&s.title===a||(s.progress=o,s.title=a,this.refreshProgress());n()}),n=()=>{r||(r=!0,this.progress.delete(e),this.refreshProgress(1))};return _(P({},i),{stop:n})}reportJson(e){this.json&&this.writeLineWithForgettableReset(`${JSON.stringify(e)}`)}async finalize(){if(!this.includeFooter)return;let e="";this.errorCount>0?e="Failed with errors":this.warningCount>0?e="Done with warnings":e="Done";let r=Ve(this.configuration,Date.now()-this.startTime,Le.DURATION),i=this.configuration.get("enableTimers")?`${e} in ${r}`:e;this.errorCount>0?this.reportError(z.UNNAMED,i):this.warningCount>0?this.reportWarning(z.UNNAMED,i):this.reportInfo(z.UNNAMED,i)}writeLine(e,{truncate:r}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(e,{truncate:r})} -`),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:r}={}){this.forgettableLines=[],this.writeLine(e,{truncate:r})}writeLines(e,{truncate:r}={}){this.clearProgress({delta:e.length});for(let i of e)this.stdout.write(`${this.truncate(i,{truncate:r})} -`);this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:r}){let i=this.cacheHitCount-e,n=this.cacheMissCount-r;if(i===0&&n===0)return;let s="";this.cacheHitCount>1?s+=`${this.cacheHitCount} packages were already cached`:this.cacheHitCount===1?s+=" - one package was already cached":s+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?s+=`, ${this.cacheMissCount} had to be fetched`:this.cacheMissCount===1&&(s+=`, one had to be fetched (${lt(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?s+=` - ${this.cacheMissCount} packages had to be fetched`:this.cacheMissCount===1&&(s+=` - one package had to be fetched (${lt(this.configuration,this.lastCacheMiss)})`),this.reportInfo(z.FETCH_NOT_CACHED,s)}commit(){let e=this.uncommitted;this.uncommitted=new Set;for(let r of e)r.committed=!0,r.action()}clearProgress({delta:e=0,clear:r=!1}){!this.configuration.get("enableProgressBars")||this.json||this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||r)&&this.stdout.write(""))}writeProgress(){if(!this.configuration.get("enableProgressBars")||this.json||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let e=Date.now();e-this.progressTime>r9&&(this.progressFrame=(this.progressFrame+1)%t9.length,this.progressTime=e);let r=t9[this.progressFrame];for(let i of this.progress.values()){let n=this.progressStyle.chars[0].repeat(i.lastScaledSize),s=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-i.lastScaledSize),o=this.formatName(null),a=o?`${o}: `:"";this.stdout.write(`${Ve(this.configuration,"\u27A4","blueBright")} ${a}${r} ${n}${s} -`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},r9)}refreshProgress(e=0){let r=!1;if(this.progress.size===0)r=!0;else for(let i of this.progress.values()){let n=Math.trunc(this.progressMaxScaledSize*i.definition.progress),s=i.lastScaledSize;if(i.lastScaledSize=n,n!==s){r=!0;break}}r&&(this.clearProgress({delta:e}),this.writeProgress())}truncate(e,{truncate:r}={}){return this.configuration.get("enableProgressBars")||(r=!1),typeof r=="undefined"&&(r=this.configuration.get("preferTruncatedLines")),r&&(e=(0,e9.default)(e,0,process.stdout.columns-1)),e}formatName(e){return n9(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return eD(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}};var Zr="3.1.1";var tn;(function(n){n.Yarn1="Yarn Classic",n.Yarn2="Yarn",n.Npm="npm",n.Pnpm="pnpm"})(tn||(tn={}));async function ba(t,e,r,i=[]){if(process.platform==="win32"){let n=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${i.map(s=>`"${s.replace('"','""')}"`).join(" ")} %*`;await T.writeFilePromise(v.format({dir:t,name:e,ext:".cmd"}),n)}await T.writeFilePromise(v.join(t,e),`#!/bin/sh -exec "${r}" ${i.map(n=>`'${n.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@" -`,{mode:493})}async function a9(t){let e=await Ze.tryFind(t);if(e==null?void 0:e.packageManager){let i=Qy(e.packageManager);if(i==null?void 0:i.name){let n=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[s]=i.reference.split(".");switch(i.name){case"yarn":return{packageManager:Number(s)===1?tn.Yarn1:tn.Yarn2,reason:n};case"npm":return{packageManager:tn.Npm,reason:n};case"pnpm":return{packageManager:tn.Pnpm,reason:n}}}}let r;try{r=await T.readFilePromise(v.join(t,wt.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:tn.Yarn2,reason:'"__metadata" key found in yarn.lock'}:{packageManager:tn.Yarn1,reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:T.existsSync(v.join(t,"package-lock.json"))?{packageManager:tn.Npm,reason:`found npm's "package-lock.json" lockfile`}:T.existsSync(v.join(t,"pnpm-lock.yaml"))?{packageManager:tn.Pnpm,reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function Vp({project:t,locator:e,binFolder:r,lifecycleScript:i}){var l,c;let n={};for(let[u,g]of Object.entries(process.env))typeof g!="undefined"&&(n[u.toLowerCase()!=="path"?u:"PATH"]=g);let s=M.fromPortablePath(r);n.BERRY_BIN_FOLDER=M.fromPortablePath(s);let o=process.env.COREPACK_ROOT?M.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([ba(r,"node",process.execPath),...Zr!==null?[ba(r,"run",process.execPath,[o,"run"]),ba(r,"yarn",process.execPath,[o]),ba(r,"yarnpkg",process.execPath,[o]),ba(r,"node-gyp",process.execPath,[o,"run","--top-level","node-gyp"])]:[]]),t&&(n.INIT_CWD=M.fromPortablePath(t.configuration.startingCwd),n.PROJECT_CWD=M.fromPortablePath(t.cwd)),n.PATH=n.PATH?`${s}${M.delimiter}${n.PATH}`:`${s}`,n.npm_execpath=`${s}${M.sep}yarn`,n.npm_node_execpath=`${s}${M.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let u=t.tryWorkspaceByLocator(e),g=u?(l=u.manifest.version)!=null?l:"":(c=t.storedPackages.get(e.locatorHash).version)!=null?c:"";n.npm_package_name=St(e),n.npm_package_version=g}let a=Zr!==null?`yarn/${Zr}`:`yarn/${mu("@yarnpkg/core").version}-core`;return n.npm_config_user_agent=`${a} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,i&&(n.npm_lifecycle_event=i),t&&await t.configuration.triggerHook(u=>u.setupScriptEnvironment,t,n,async(u,g,f)=>await ba(r,kr(u),g,f)),n}var KFe=2,UFe=(0,o9.default)(KFe);async function HFe(t,e,{configuration:r,report:i,workspace:n=null,locator:s=null}){await UFe(async()=>{await T.mktempPromise(async o=>{let a=v.join(o,"pack.log"),l=null,{stdout:c,stderr:u}=r.getSubprocessStreams(a,{prefix:M.fromPortablePath(t),report:i}),g=s&&Io(s)?lp(s):s,f=g?is(g):"an external project";c.write(`Packing ${f} from sources -`);let h=await a9(t),p;h!==null?(c.write(`Using ${h.packageManager} for bootstrap. Reason: ${h.reason} - -`),p=h.packageManager):(c.write(`No package manager configuration detected; defaulting to Yarn - -`),p=tn.Yarn2),await T.mktempPromise(async d=>{let m=await Vp({binFolder:d}),B=new Map([[tn.Yarn1,async()=>{let R=n!==null?["workspace",n]:[],H=await to("yarn",["set","version","classic","--only-if-needed"],{cwd:t,env:m,stdin:l,stdout:c,stderr:u,end:Pn.ErrorCode});if(H.code!==0)return H.code;await T.appendFilePromise(v.join(t,".npmignore"),`/.yarn -`),c.write(` -`);let L=await to("yarn",["install"],{cwd:t,env:m,stdin:l,stdout:c,stderr:u,end:Pn.ErrorCode});if(L.code!==0)return L.code;c.write(` -`);let K=await to("yarn",[...R,"pack","--filename",M.fromPortablePath(e)],{cwd:t,env:m,stdin:l,stdout:c,stderr:u});return K.code!==0?K.code:0}],[tn.Yarn2,async()=>{let R=n!==null?["workspace",n]:[];m.YARN_ENABLE_INLINE_BUILDS="1";let H=v.join(t,wt.lockfile);await T.existsPromise(H)||await T.writeFilePromise(H,"");let L=await to("yarn",[...R,"pack","--install-if-needed","--filename",M.fromPortablePath(e)],{cwd:t,env:m,stdin:l,stdout:c,stderr:u});return L.code!==0?L.code:0}],[tn.Npm,async()=>{if(n!==null){let A=new cc.PassThrough,V=Cu(A);A.pipe(c,{end:!1});let W=await to("npm",["--version"],{cwd:t,env:m,stdin:l,stdout:A,stderr:u,end:Pn.Never});if(A.end(),W.code!==0)return c.end(),u.end(),W.code;let X=(await V).toString().trim();if(!lc(X,">=7.x")){let F=Eo(null,"npm"),D=Yt(F,X),he=Yt(F,">=7.x");throw new Error(`Workspaces aren't supported by ${Xt(r,D)}; please upgrade to ${Xt(r,he)} (npm has been detected as the primary package manager for ${Ve(r,t,Le.PATH)})`)}}let R=n!==null?["--workspace",n]:[];delete m.npm_config_user_agent;let H=await to("npm",["install"],{cwd:t,env:m,stdin:l,stdout:c,stderr:u,end:Pn.ErrorCode});if(H.code!==0)return H.code;let L=new cc.PassThrough,K=Cu(L);L.pipe(c);let J=await to("npm",["pack","--silent",...R],{cwd:t,env:m,stdin:l,stdout:L,stderr:u});if(J.code!==0)return J.code;let ne=(await K).toString().trim().replace(/^.*\n/s,""),q=v.resolve(t,M.toPortablePath(ne));return await T.renamePromise(q,e),0}]]).get(p);if(typeof B=="undefined")throw new Error("Assertion failed: Unsupported workflow");let b=await B();if(!(b===0||typeof b=="undefined"))throw T.detachTemp(o),new nt(z.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${b}, logs can be found here: ${Ve(r,a,Le.PATH)})`)})})})}async function GFe(t,e,{project:r}){let i=r.tryWorkspaceByLocator(t);if(i!==null)return tD(i,e);let n=r.storedPackages.get(t.locatorHash);if(!n)throw new Error(`Package for ${lt(r.configuration,t)} not found in the project`);return await Jn.openPromise(async s=>{let o=r.configuration,a=r.configuration.getLinkers(),l={project:r,report:new Fe({stdout:new cc.PassThrough,configuration:o})},c=a.find(h=>h.supportsPackage(n,l));if(!c)throw new Error(`The package ${lt(r.configuration,n)} isn't supported by any of the available linkers`);let u=await c.findPackageLocation(n,l),g=new Ft(u,{baseFs:s});return(await Ze.find(Se.dot,{baseFs:g})).scripts.has(e)},{libzip:await $i()})}async function Uw(t,e,r,{cwd:i,project:n,stdin:s,stdout:o,stderr:a}){return await T.mktempPromise(async l=>{let{manifest:c,env:u,cwd:g}=await A9(t,{project:n,binFolder:l,cwd:i,lifecycleScript:e}),f=c.scripts.get(e);if(typeof f=="undefined")return 1;let h=async()=>await Fw(f,r,{cwd:g,env:u,stdin:s,stdout:o,stderr:a});return await(await n.configuration.reduceHook(d=>d.wrapScriptExecution,h,n,t,e,{script:f,args:r,cwd:g,env:u,stdin:s,stdout:o,stderr:a}))()})}async function rD(t,e,r,{cwd:i,project:n,stdin:s,stdout:o,stderr:a}){return await T.mktempPromise(async l=>{let{env:c,cwd:u}=await A9(t,{project:n,binFolder:l,cwd:i});return await Fw(e,r,{cwd:u,env:c,stdin:s,stdout:o,stderr:a})})}async function jFe(t,{binFolder:e,cwd:r,lifecycleScript:i}){let n=await Vp({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:i});return await Promise.all(Array.from(await l9(t),([s,[,o]])=>ba(e,kr(s),process.execPath,[o]))),typeof r=="undefined"&&(r=v.dirname(await T.realpathPromise(v.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:n,cwd:r}}async function A9(t,{project:e,binFolder:r,cwd:i,lifecycleScript:n}){let s=e.tryWorkspaceByLocator(t);if(s!==null)return jFe(s,{binFolder:r,cwd:i,lifecycleScript:n});let o=e.storedPackages.get(t.locatorHash);if(!o)throw new Error(`Package for ${lt(e.configuration,t)} not found in the project`);return await Jn.openPromise(async a=>{let l=e.configuration,c=e.configuration.getLinkers(),u={project:e,report:new Fe({stdout:new cc.PassThrough,configuration:l})},g=c.find(m=>m.supportsPackage(o,u));if(!g)throw new Error(`The package ${lt(e.configuration,o)} isn't supported by any of the available linkers`);let f=await Vp({project:e,locator:t,binFolder:r,lifecycleScript:n});await Promise.all(Array.from(await Hw(t,{project:e}),([m,[,I]])=>ba(r,kr(m),process.execPath,[I])));let h=await g.findPackageLocation(o,u),p=new Ft(h,{baseFs:a}),d=await Ze.find(Se.dot,{baseFs:p});return typeof i=="undefined"&&(i=h),{manifest:d,binFolder:r,env:f,cwd:i}},{libzip:await $i()})}async function c9(t,e,r,{cwd:i,stdin:n,stdout:s,stderr:o}){return await Uw(t.anchoredLocator,e,r,{cwd:i,project:t.project,stdin:n,stdout:s,stderr:o})}function tD(t,e){return t.manifest.scripts.has(e)}async function u9(t,e,{cwd:r,report:i}){let{configuration:n}=t.project,s=null;await T.mktempPromise(async o=>{let a=v.join(o,`${e}.log`),l=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${M.fromPortablePath(t.cwd)}") -`,{stdout:c,stderr:u}=n.getSubprocessStreams(a,{report:i,prefix:lt(n,t.anchoredLocator),header:l});i.reportInfo(z.LIFECYCLE_SCRIPT,`Calling the "${e}" lifecycle script`);let g=await c9(t,e,[],{cwd:r,stdin:s,stdout:c,stderr:u});if(c.end(),u.end(),g!==0)throw T.detachTemp(o),new nt(z.LIFECYCLE_SCRIPT,`${(0,s9.default)(e)} script failed (exit code ${Ve(n,g,Le.NUMBER)}, logs can be found here: ${Ve(n,a,Le.PATH)}); run ${Ve(n,`yarn ${e}`,Le.CODE)} to investigate`)})}async function YFe(t,e,r){tD(t,e)&&await u9(t,e,r)}async function Hw(t,{project:e}){let r=e.configuration,i=new Map,n=e.storedPackages.get(t.locatorHash);if(!n)throw new Error(`Package for ${lt(r,t)} not found in the project`);let s=new cc.Writable,o=r.getLinkers(),a={project:e,report:new Fe({configuration:r,stdout:s})},l=new Set([t.locatorHash]);for(let u of n.dependencies.values()){let g=e.storedResolutions.get(u.descriptorHash);if(!g)throw new Error(`Assertion failed: The resolution (${Xt(r,u)}) should have been registered`);l.add(g)}let c=await Promise.all(Array.from(l,async u=>{let g=e.storedPackages.get(u);if(!g)throw new Error(`Assertion failed: The package (${u}) should have been registered`);if(g.bin.size===0)return kl.skip;let f=o.find(p=>p.supportsPackage(g,a));if(!f)return kl.skip;let h=null;try{h=await f.findPackageLocation(g,a)}catch(p){if(p.code==="LOCATOR_NOT_INSTALLED")return kl.skip;throw p}return{dependency:g,packageLocation:h}}));for(let u of c){if(u===kl.skip)continue;let{dependency:g,packageLocation:f}=u;for(let[h,p]of g.bin)i.set(h,[g,M.fromPortablePath(v.resolve(f,p))])}return i}async function l9(t){return await Hw(t.anchoredLocator,{project:t.project})}async function g9(t,e,r,{cwd:i,project:n,stdin:s,stdout:o,stderr:a,nodeArgs:l=[],packageAccessibleBinaries:c}){c!=null||(c=await Hw(t,{project:n}));let u=c.get(e);if(!u)throw new Error(`Binary not found (${e}) for ${lt(n.configuration,t)}`);return await T.mktempPromise(async g=>{let[,f]=u,h=await Vp({project:n,locator:t,binFolder:g});await Promise.all(Array.from(c,([d,[,m]])=>ba(h.BERRY_BIN_FOLDER,kr(d),process.execPath,[m])));let p;try{p=await to(process.execPath,[...l,f,...r],{cwd:i,env:h,stdin:s,stdout:o,stderr:a})}finally{await T.removePromise(h.BERRY_BIN_FOLDER)}return p.code})}async function qFe(t,e,r,{cwd:i,stdin:n,stdout:s,stderr:o,packageAccessibleBinaries:a}){return await g9(t.anchoredLocator,e,r,{project:t.project,cwd:i,stdin:n,stdout:s,stderr:o,packageAccessibleBinaries:a})}var Ai={};it(Ai,{convertToZip:()=>lTe,extractArchiveTo:()=>uTe,makeArchiveFromDirectory:()=>ATe});var d_=ie(require("stream")),C_=ie(Z7());var u_=ie(require("os")),g_=ie(c_()),f_=ie(require("worker_threads")),IR=class{constructor(e){this.source=e;this.pool=[];this.queue=new g_.default({concurrency:Math.max(1,(0,u_.cpus)().length)});let r=setTimeout(()=>{if(!(this.queue.size!==0||this.queue.pending!==0)){for(let i of this.pool)i.terminate();this.pool=[]}},1e3).unref();this.queue.on("idle",()=>{r.refresh()})}run(e){return this.queue.add(()=>{var i;let r=(i=this.pool.pop())!=null?i:new f_.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,"--unhandled-rejections=strict"]});return r.ref(),new Promise((n,s)=>{let o=a=>{a!==0&&s(new Error(`Worker exited with code ${a}`))};r.once("message",a=>{this.pool.push(r),r.unref(),r.off("error",s),r.off("exit",o),n(a)}),r.once("error",s),r.once("exit",o),r.postMessage(e)})})}};var m_=ie(p_());async function ATe(t,{baseFs:e=new Wt,prefixPath:r=Se.root,compressionLevel:i,inMemory:n=!1}={}){let s=await $i(),o;if(n)o=new Jr(null,{libzip:s,level:i});else{let l=await T.mktempPromise(),c=v.join(l,"archive.zip");o=new Jr(c,{create:!0,libzip:s,level:i})}let a=v.resolve(Se.root,r);return await o.copyPromise(a,t,{baseFs:e,stableTime:!0,stableSort:!0}),o}var E_;async function lTe(t,e){let r=await T.mktempPromise(),i=v.join(r,"archive.zip");return E_||(E_=new IR((0,m_.getContent)())),await E_.run({tmpFile:i,tgz:t,opts:e}),new Jr(i,{libzip:await $i(),level:e.compressionLevel})}async function*cTe(t){let e=new C_.default.Parse,r=new d_.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on("entry",i=>{r.write(i)}),e.on("error",i=>{r.destroy(i)}),e.on("close",()=>{r.destroyed||r.end()}),e.end(t);for await(let i of r){let n=i;yield n,n.resume()}}async function uTe(t,e,{stripComponents:r=0,prefixPath:i=Se.dot}={}){var s,o;function n(a){if(a.path[0]==="/")return!0;let l=a.path.split(/\//g);return!!(l.some(c=>c==="..")||l.length<=r)}for await(let a of cTe(t)){if(n(a))continue;let l=v.normalize(M.toPortablePath(a.path)).replace(/\/$/,"").split(/\//g);if(l.length<=r)continue;let c=l.slice(r).join("/"),u=v.join(i,c),g=420;switch((a.type==="Directory"||(((s=a.mode)!=null?s:0)&73)!=0)&&(g|=73),a.type){case"Directory":e.mkdirpSync(v.dirname(u),{chmod:493,utimes:[mr.SAFE_TIME,mr.SAFE_TIME]}),e.mkdirSync(u,{mode:g}),e.utimesSync(u,mr.SAFE_TIME,mr.SAFE_TIME);break;case"OldFile":case"File":e.mkdirpSync(v.dirname(u),{chmod:493,utimes:[mr.SAFE_TIME,mr.SAFE_TIME]}),e.writeFileSync(u,await Cu(a),{mode:g}),e.utimesSync(u,mr.SAFE_TIME,mr.SAFE_TIME);break;case"SymbolicLink":e.mkdirpSync(v.dirname(u),{chmod:493,utimes:[mr.SAFE_TIME,mr.SAFE_TIME]}),e.symlinkSync(a.linkpath,u),(o=e.lutimesSync)==null||o.call(e,u,mr.SAFE_TIME,mr.SAFE_TIME);break}}return e}var Hs={};it(Hs,{emitList:()=>gTe,emitTree:()=>b_,treeNodeToJson:()=>Q_,treeNodeToTreeify:()=>B_});var w_=ie(y_());function B_(t,{configuration:e}){let r={},i=(n,s)=>{let o=Array.isArray(n)?n.entries():Object.entries(n);for(let[a,{label:l,value:c,children:u}]of o){let g=[];typeof l!="undefined"&&g.push(Py(e,l,Gl.BOLD)),typeof c!="undefined"&&g.push(Ve(e,c[0],c[1])),g.length===0&&g.push(Py(e,`${a}`,Gl.BOLD));let f=g.join(": "),h=s[f]={};typeof u!="undefined"&&i(u,h)}};if(typeof t.children=="undefined")throw new Error("The root node must only contain children");return i(t.children,r),r}function Q_(t){let e=r=>{var s;if(typeof r.children=="undefined"){if(typeof r.value=="undefined")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Uu(r.value[0],r.value[1])}let i=Array.isArray(r.children)?r.children.entries():Object.entries((s=r.children)!=null?s:{}),n=Array.isArray(r.children)?[]:{};for(let[o,a]of i)n[o]=e(a);return typeof r.value=="undefined"?n:{value:Uu(r.value[0],r.value[1]),children:n}};return e(t)}function gTe(t,{configuration:e,stdout:r,json:i}){let n=t.map(s=>({value:s}));b_({children:n},{configuration:e,stdout:r,json:i})}function b_(t,{configuration:e,stdout:r,json:i,separators:n=0}){var o;if(i){let a=Array.isArray(t.children)?t.children.values():Object.values((o=t.children)!=null?o:{});for(let l of a)r.write(`${JSON.stringify(Q_(l))} -`);return}let s=(0,w_.asTree)(B_(t,{configuration:e}),!1,!1);if(n>=1&&(s=s.replace(/^([├└]─)/gm,`\u2502 -$1`).replace(/^│\n/,"")),n>=2)for(let a=0;a<2;++a)s=s.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502 -$2`).replace(/^│\n/,"");if(n>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(s)}var v_=ie(require("crypto")),BR=ie(require("fs"));var fTe=8,Qt=class{constructor(e,{configuration:r,immutable:i=r.get("enableImmutableCache"),check:n=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,v_.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=i,this.check=n;let s=r.get("cacheKeyOverride");if(s!==null)this.cacheKey=`${s}`;else{let o=r.get("compressionLevel"),a=o!==pl?`c${o}`:"";this.cacheKey=[fTe,a].join("")}}static async find(e,{immutable:r,check:i}={}){let n=new Qt(e.get("cacheFolder"),{configuration:e,immutable:r,check:i});return await n.setup(),n}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`${Mu(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let n=hTe(r).slice(0,10);return`${Mu(e)}-${n}.zip`}getLocatorPath(e,r,i={}){var s;return this.mirrorCwd===null||((s=i.unstablePackages)==null?void 0:s.has(e.locatorHash))?v.resolve(this.cwd,this.getVersionFilename(e)):r===null||QR(r)!==this.cacheKey?null:v.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?v.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await T.existsPromise(this.cwd))throw new nt(z.IMMUTABLE_CACHE,"Cache path does not exist.")}else{await T.mkdirPromise(this.cwd,{recursive:!0});let e=v.resolve(this.cwd,".gitignore");await T.changeFilePromise(e,`/.gitignore -*.flock -*.tmp -`)}(this.mirrorCwd||!this.immutable)&&await T.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,a){var l=a,{onHit:i,onMiss:n,loader:s}=l,o=qr(l,["onHit","onMiss","loader"]);var A;let c=this.getLocatorMirrorPath(e),u=new Wt,g=()=>{let V=new Jr(null,{libzip:H}),W=v.join(Se.root,Lx(e));return V.mkdirSync(W,{recursive:!0}),V.writeJsonSync(v.join(W,wt.manifest),{name:St(e),mocked:!0}),V},f=async(V,W=null)=>{let X=!o.skipIntegrityCheck||!r?`${this.cacheKey}/${await Ey(V)}`:r;if(W!==null){let F=!o.skipIntegrityCheck||!r?`${this.cacheKey}/${await Ey(W)}`:r;if(X!==F)throw new nt(z.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(r!==null&&X!==r){let F;switch(this.check?F="throw":QR(r)!==QR(X)?F="update":F=this.configuration.get("checksumBehavior"),F){case"ignore":return r;case"update":return X;default:case"throw":throw new nt(z.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return X},h=async V=>{if(!s)throw new Error(`Cache check required but no loader configured for ${lt(this.configuration,e)}`);let W=await s(),X=W.getRealPath();return W.saveAndClose(),await T.chmodPromise(X,420),await f(V,X)},p=async()=>{if(c===null||!await T.existsPromise(c)){let V=await s(),W=V.getRealPath();return V.saveAndClose(),{source:"loader",path:W}}return{source:"mirror",path:c}},d=async()=>{if(!s)throw new Error(`Cache entry required but missing for ${lt(this.configuration,e)}`);if(this.immutable)throw new nt(z.IMMUTABLE_CACHE,`Cache entry required but missing for ${lt(this.configuration,e)}`);let{path:V,source:W}=await p(),X=await f(V),F=this.getLocatorPath(e,X,o);if(!F)throw new Error("Assertion failed: Expected the cache path to be available");let D=[];W!=="mirror"&&c!==null&&D.push(async()=>{let pe=`${c}${this.cacheId}`;await T.copyFilePromise(V,pe,BR.default.constants.COPYFILE_FICLONE),await T.chmodPromise(pe,420),await T.renamePromise(pe,c)}),(!o.mirrorWriteOnly||c===null)&&D.push(async()=>{let pe=`${F}${this.cacheId}`;await T.copyFilePromise(V,pe,BR.default.constants.COPYFILE_FICLONE),await T.chmodPromise(pe,420),await T.renamePromise(pe,F)});let he=o.mirrorWriteOnly&&c!=null?c:F;return await Promise.all(D.map(pe=>pe())),[!1,he,X]},m=async()=>{let W=(async()=>{var Ne;let X=this.getLocatorPath(e,r,o),F=X!==null?await u.existsPromise(X):!1,D=!!((Ne=o.mockedPackages)==null?void 0:Ne.has(e.locatorHash))&&(!this.check||!F),he=D||F,pe=he?i:n;if(pe&&pe(),he){let Pe=null,qe=X;return D||(Pe=this.check?await h(qe):await f(qe)),[D,qe,Pe]}else return d()})();this.mutexes.set(e.locatorHash,W);try{return await W}finally{this.mutexes.delete(e.locatorHash)}};for(let V;V=this.mutexes.get(e.locatorHash);)await V;let[I,B,b]=await m();this.markedFiles.add(B);let R,H=await $i(),L=I?()=>g():()=>new Jr(B,{baseFs:u,libzip:H,readOnly:!0}),K=new oh(()=>Mv(()=>R=L(),V=>`Failed to open the cache entry for ${lt(this.configuration,e)}: ${V}`),v),J=new Xo(B,{baseFs:K,pathUtils:v}),ne=()=>{R==null||R.discardAndClose()},q=((A=o.unstablePackages)==null?void 0:A.has(e.locatorHash))?null:b;return[J,ne,q]}};function QR(t){let e=t.indexOf("/");return e!==-1?t.slice(0,e):null}function hTe(t){let e=t.indexOf("/");return e!==-1?t.slice(e+1):t}var F_=ie(x_()),NB=ie(ml());var N_=ie(Wp()),kR=ie(require("stream"));var k_={hooks:{reduceDependency:(t,e,r,i,{resolver:n,resolveOptions:s})=>{for(let{pattern:o,reference:a}of e.topLevelWorkspace.manifest.resolutions){if(o.from&&o.from.fullName!==St(r)||o.from&&o.from.description&&o.from.description!==r.reference||o.descriptor.fullName!==St(t)||o.descriptor.description&&o.descriptor.description!==t.range)continue;return n.bindDescriptor(Yt(t,a),e.topLevelWorkspace.anchoredLocator,s)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let i=hp(t.configuration,r);await t.configuration.triggerHook(n=>n.validateWorkspace,r,{reportWarning:(n,s)=>e.reportWarning(n,`${i}: ${s}`),reportError:(n,s)=>e.reportError(n,`${i}: ${s}`)})}},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 i of r.errors)e.reportWarning(z.INVALID_MANIFEST,i.message)}}};var vR=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 i=this.fetchers.find(n=>n.supports(e,r));return i||null}getFetcher(e,r){let i=this.fetchers.find(n=>n.supports(e,r));if(!i)throw new nt(z.FETCHER_NOT_FOUND,`${lt(r.project.configuration,e)} isn't supported by any available fetcher`);return i}};var pd=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,i){return this.getResolverByDescriptor(e,i).bindDescriptor(e,r,i)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,i){return await this.getResolverByDescriptor(e,i).getCandidates(e,r,i)}async getSatisfying(e,r,i){return this.getResolverByDescriptor(e,i).getSatisfying(e,r,i)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let i=this.resolvers.find(n=>n.supportsDescriptor(e,r));return i||null}getResolverByDescriptor(e,r){let i=this.resolvers.find(n=>n.supportsDescriptor(e,r));if(!i)throw new Error(`${Xt(r.project.configuration,e)} isn't supported by any available resolver`);return i}tryResolverByLocator(e,r){let i=this.resolvers.find(n=>n.supportsLocator(e,r));return i||null}getResolverByLocator(e,r){let i=this.resolvers.find(n=>n.supportsLocator(e,r));if(!i)throw new Error(`${lt(r.project.configuration,e)} isn't supported by any available resolver`);return i}};var P_=ie(Or());var Rg=/^(?!v)[a-z0-9._-]+$/i,SR=class{supportsDescriptor(e,r){return!!(Us(e.range)||Rg.test(e.range))}supportsLocator(e,r){return!!(P_.default.valid(e.reference)||Rg.test(e.reference))}shouldPersistResolution(e,r){return r.resolver.shouldPersistResolution(this.forwardLocator(e,r),r)}bindDescriptor(e,r,i){return i.resolver.bindDescriptor(this.forwardDescriptor(e,i),r,i)}getResolutionDependencies(e,r){return r.resolver.getResolutionDependencies(this.forwardDescriptor(e,r),r)}async getCandidates(e,r,i){return await i.resolver.getCandidates(this.forwardDescriptor(e,i),r,i)}async getSatisfying(e,r,i){return await i.resolver.getSatisfying(this.forwardDescriptor(e,i),r,i)}async resolve(e,r){let i=await r.resolver.resolve(this.forwardLocator(e,r),r);return op(i,e)}forwardDescriptor(e,r){return Yt(e,`${r.project.configuration.get("defaultProtocol")}${e.range}`)}forwardLocator(e,r){return Vi(e,`${r.project.configuration.get("defaultProtocol")}${e.reference}`)}};var dd=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let i=e.reference.indexOf("#");if(i===-1)throw new Error("Invalid virtual package reference");let n=e.reference.slice(i+1),s=Vi(e,n);return r.fetcher.getLocalPath(s,r)}async fetch(e,r){let i=e.reference.indexOf("#");if(i===-1)throw new Error("Invalid virtual package reference");let n=e.reference.slice(i+1),s=Vi(e,n),o=await r.fetcher.fetch(s,r);return await this.ensureVirtualLink(e,o,r)}getLocatorFilename(e){return Mu(e)}async ensureVirtualLink(e,r,i){let n=r.packageFs.getRealPath(),s=i.project.configuration.get("virtualFolder"),o=this.getLocatorFilename(e),a=Pr.makeVirtualPath(s,o,n),l=new Xo(a,{baseFs:r.packageFs,pathUtils:v});return _(P({},r),{packageFs:l})}};var Fg=class{static isVirtualDescriptor(e){return!!e.range.startsWith(Fg.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(Fg.protocol)}supportsDescriptor(e,r){return Fg.isVirtualDescriptor(e)}supportsLocator(e,r){return Fg.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){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,i){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,i){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')}},FB=Fg;FB.protocol="virtual:";var xR=class{supports(e){return!!e.reference.startsWith(Yr.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let i=this.getWorkspace(e,r).cwd;return{packageFs:new Ft(i),prefixPath:Se.dot,localPath:i}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(Yr.protocol.length))}};var D_=ie(require("module"));function R_(){return new Set(D_.default.builtinModules||Object.keys(process.binding("natives")))}var dTe=new Set(["binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput","home","confDir"]),LB="yarn_",PR=".yarnrc.yml",DR="yarn.lock",CTe="********",ge;(function(u){u.ANY="ANY",u.BOOLEAN="BOOLEAN",u.ABSOLUTE_PATH="ABSOLUTE_PATH",u.LOCATOR="LOCATOR",u.LOCATOR_LOOSE="LOCATOR_LOOSE",u.NUMBER="NUMBER",u.STRING="STRING",u.SECRET="SECRET",u.SHAPE="SHAPE",u.MAP="MAP"})(ge||(ge={}));var ps=Le,RR={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:ge.STRING,default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:ge.ABSOLUTE_PATH,default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:ge.BOOLEAN,default:!1},ignoreCwd:{description:"If true, the `--cwd` flag will be ignored",type:ge.BOOLEAN,default:!1},cacheKeyOverride:{description:"A global cache key override; used only for test purposes",type:ge.STRING,default:null},globalFolder:{description:"Folder where are stored the system-wide settings",type:ge.ABSOLUTE_PATH,default:Rb()},cacheFolder:{description:"Folder where the cache files must be written",type:ge.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:ge.NUMBER,values:["mixed",0,1,2,3,4,5,6,7,8,9],default:pl},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)",type:ge.ABSOLUTE_PATH,default:"./.yarn/__virtual__"},lockfileFilename:{description:"Name of the files where the Yarn dependency tree entries must be stored",type:ge.STRING,default:DR},installStatePath:{description:"Path of the file where the install state will be persisted",type:ge.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:ge.STRING,default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:ge.STRING,default:TB()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:ge.BOOLEAN,default:!1},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:ge.BOOLEAN,default:xy,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:ge.BOOLEAN,default:Mx,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:ge.BOOLEAN,default:NB.isCI,defaultText:""},enableMessageNames:{description:"If true, the CLI will prefix most messages with codes suitable for search engines",type:ge.BOOLEAN,default:!0},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:ge.BOOLEAN,default:!NB.isCI&&process.stdout.isTTY&&process.stdout.columns>22,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:ge.BOOLEAN,default:!0},preferAggregateCacheInfo:{description:"If true, the CLI will only print a one-line report of any cache changes",type:ge.BOOLEAN,default:NB.isCI},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:ge.BOOLEAN,default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:ge.BOOLEAN,default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:ge.STRING,default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:ge.STRING,default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:ge.STRING,default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:ge.BOOLEAN,default:!0},supportedArchitectures:{description:"Architectures that Yarn will fetch and inject into the resolver",type:ge.SHAPE,properties:{os:{description:"Array of supported process.platform strings, or null to target them all",type:ge.STRING,isArray:!0,isNullable:!0,default:["current"]},cpu:{description:"Array of supported process.arch strings, or null to target them all",type:ge.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:ge.BOOLEAN,default:!0},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:ge.BOOLEAN,default:!0},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:ge.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:ge.STRING,default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:ge.STRING,default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:ge.NUMBER,default:6e4},httpRetry:{description:"Retry times on http failure",type:ge.NUMBER,default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:ge.NUMBER,default:50},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:ge.MAP,valueDefinition:{description:"",type:ge.SHAPE,properties:{caFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:ge.ABSOLUTE_PATH,default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:ge.BOOLEAN,default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:ge.STRING,default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:ge.STRING,default:null}}}},caFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:ge.ABSOLUTE_PATH,default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:ge.BOOLEAN,default:!0},logFilters:{description:"Overrides for log levels",type:ge.SHAPE,isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:ge.STRING,default:void 0},text:{description:"Code of the texts covered by this override",type:ge.STRING,default:void 0},pattern:{description:"Code of the patterns covered by this override",type:ge.STRING,default:void 0},level:{description:"Log level override, set to null to remove override",type:ge.STRING,values:Object.values(Ts),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:ge.BOOLEAN,default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:ge.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:ge.STRING,default:null},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:ge.BOOLEAN,default:!0},enableStrictSettings:{description:"If true, unknown settings will cause Yarn to abort",type:ge.BOOLEAN,default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:ge.BOOLEAN,default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:ge.STRING,default:"throw"},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:ge.MAP,valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:ge.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:ge.MAP,valueDefinition:{description:"A range",type:ge.STRING}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:ge.MAP,valueDefinition:{description:"A semver range",type:ge.STRING}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:ge.MAP,valueDefinition:{description:"The peerDependency meta",type:ge.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:ge.BOOLEAN,default:!1}}}}}}}};function NR(t,e,r,i,n){if(i.isArray||i.type===ge.ANY&&Array.isArray(r))return Array.isArray(r)?r.map((s,o)=>FR(t,`${e}[${o}]`,s,i,n)):String(r).split(/,/).map(s=>FR(t,e,s,i,n));if(Array.isArray(r))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return FR(t,e,r,i,n)}function FR(t,e,r,i,n){var a;switch(i.type){case ge.ANY:return r;case ge.SHAPE:return mTe(t,e,r,i,n);case ge.MAP:return ETe(t,e,r,i,n)}if(r===null&&!i.isNullable&&i.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if((a=i.values)==null?void 0:a.includes(r))return r;let o=(()=>{if(i.type===ge.BOOLEAN&&typeof r!="string")return Hh(r);if(typeof r!="string")throw new Error(`Expected value (${r}) to be a string`);let l=Ov(r,{env:process.env});switch(i.type){case ge.ABSOLUTE_PATH:return v.resolve(n,M.toPortablePath(l));case ge.LOCATOR_LOOSE:return Hl(l,!1);case ge.NUMBER:return parseInt(l);case ge.LOCATOR:return Hl(l);case ge.BOOLEAN:return Hh(l);default:return l}})();if(i.values&&!i.values.includes(o))throw new Error(`Invalid value, expected one of ${i.values.join(", ")}`);return o}function mTe(t,e,r,i,n){if(typeof r!="object"||Array.isArray(r))throw new me(`Object configuration settings "${e}" must be an object`);let s=LR(t,i,{ignoreArrays:!0});if(r===null)return s;for(let[o,a]of Object.entries(r)){let l=`${e}.${o}`;if(!i.properties[o])throw new me(`Unrecognized configuration settings found: ${e}.${o} - run "yarn config -v" to see the list of settings supported in Yarn`);s.set(o,NR(t,l,a,i.properties[o],n))}return s}function ETe(t,e,r,i,n){let s=new Map;if(typeof r!="object"||Array.isArray(r))throw new me(`Map configuration settings "${e}" must be an object`);if(r===null)return s;for(let[o,a]of Object.entries(r)){let l=i.normalizeKeys?i.normalizeKeys(o):o,c=`${e}['${l}']`,u=i.valueDefinition;s.set(l,NR(t,c,a,u,n))}return s}function LR(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case ge.SHAPE:{if(e.isArray&&!r)return[];let i=new Map;for(let[n,s]of Object.entries(e.properties))i.set(n,LR(t,s));return i}break;case ge.MAP:return e.isArray&&!r?[]:new Map;case ge.ABSOLUTE_PATH:return e.default===null?null:t.projectCwd===null?v.isAbsolute(e.default)?v.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(i=>v.resolve(t.projectCwd,i)):v.resolve(t.projectCwd,e.default);default:return e.default}}function MB(t,e,r){if(e.type===ge.SECRET&&typeof t=="string"&&r.hideSecrets)return CTe;if(e.type===ge.ABSOLUTE_PATH&&typeof t=="string"&&r.getNativePaths)return M.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let i=[];for(let n of t)i.push(MB(n,e,r));return i}if(e.type===ge.MAP&&t instanceof Map){let i=new Map;for(let[n,s]of t.entries())i.set(n,MB(s,e.valueDefinition,r));return i}if(e.type===ge.SHAPE&&t instanceof Map){let i=new Map;for(let[n,s]of t.entries()){let o=e.properties[n];i.set(n,MB(s,o,r))}return i}return t}function ITe(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),!!e.startsWith(LB)&&(e=(0,F_.default)(e.slice(LB.length)),t[e]=r);return t}function TB(){let t=`${LB}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return PR}var KA;(function(i){i[i.LOCKFILE=0]="LOCKFILE",i[i.MANIFEST=1]="MANIFEST",i[i.NONE=2]="NONE"})(KA||(KA={}));var Ra=class{constructor(e){this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.packageExtensions=new Map;this.limits=new Map;this.startingCwd=e}static create(e,r,i){let n=new Ra(e);typeof r!="undefined"&&!(r instanceof Map)&&(n.projectCwd=r),n.importSettings(RR);let s=typeof i!="undefined"?i:r instanceof Map?r:new Map;for(let[o,a]of s)n.activatePlugin(o,a);return n}static async find(e,r,{lookup:i=0,strict:n=!0,usePath:s=!1,useRc:o=!0}={}){let a=ITe();delete a.rcFilename;let l=await Ra.findRcFiles(e),c=await Ra.findHomeRcFile();if(c){let I=l.find(B=>B.path===c.path);I?I.strict=!1:l.push(_(P({},c),{strict:!1}))}let u=({ignoreCwd:I,yarnPath:B,ignorePath:b,lockfileFilename:R})=>({ignoreCwd:I,yarnPath:B,ignorePath:b,lockfileFilename:R}),g=L=>{var K=L,{ignoreCwd:I,yarnPath:B,ignorePath:b,lockfileFilename:R}=K,H=qr(K,["ignoreCwd","yarnPath","ignorePath","lockfileFilename"]);return H},f=new Ra(e);f.importSettings(u(RR)),f.useWithSource("",u(a),e,{strict:!1});for(let{path:I,cwd:B,data:b}of l)f.useWithSource(I,u(b),B,{strict:!1});if(s){let I=f.get("yarnPath"),B=f.get("ignorePath");if(I!==null&&!B)return f}let h=f.get("lockfileFilename"),p;switch(i){case 0:p=await Ra.findProjectCwd(e,h);break;case 1:p=await Ra.findProjectCwd(e,null);break;case 2:T.existsSync(v.join(e,"package.json"))?p=v.resolve(e):p=null;break}f.startingCwd=e,f.projectCwd=p,f.importSettings(g(RR));let d=new Map([["@@core",k_]]),m=I=>"default"in I?I.default:I;if(r!==null){for(let R of r.plugins.keys())d.set(R,m(r.modules.get(R)));let I=new Map;for(let R of R_())I.set(R,()=>mu(R));for(let[R,H]of r.modules)I.set(R,()=>H);let B=new Set,b=async(R,H)=>{let{factory:L,name:K}=mu(R);if(B.has(K))return;let J=new Map(I),ne=A=>{if(J.has(A))return J.get(A)();throw new me(`This plugin cannot access the package referenced via ${A} which is neither a builtin, nor an exposed entry`)},q=await du(async()=>m(await L(ne)),A=>`${A} (when initializing ${K}, defined in ${H})`);I.set(K,()=>q),B.add(K),d.set(K,q)};if(a.plugins)for(let R of a.plugins.split(";")){let H=v.resolve(e,M.toPortablePath(R));await b(H,"")}for(let{path:R,cwd:H,data:L}of l)if(!!o&&!!Array.isArray(L.plugins))for(let K of L.plugins){let J=typeof K!="string"?K.path:K,ne=v.resolve(H,M.toPortablePath(J));await b(ne,R)}}for(let[I,B]of d)f.activatePlugin(I,B);f.useWithSource("",g(a),e,{strict:n});for(let{path:I,cwd:B,data:b,strict:R}of l)f.useWithSource(I,g(b),B,{strict:R!=null?R:n});return f.get("enableGlobalCache")&&(f.values.set("cacheFolder",`${f.get("globalFolder")}/cache`),f.sources.set("cacheFolder","")),await f.refreshPackageExtensions(),f}static async findRcFiles(e){let r=TB(),i=[],n=e,s=null;for(;n!==s;){s=n;let o=v.join(s,r);if(T.existsSync(o)){let a=await T.readFilePromise(o,"utf8"),l;try{l=Ii(a)}catch(c){let u="";throw a.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(u=" (in particular, make sure you list the colons after each key name)"),new me(`Parse error when loading ${o}; please check it's proper Yaml${u}`)}i.push({path:o,cwd:s,data:l})}n=v.dirname(s)}return i}static async findHomeRcFile(){let e=TB(),r=uh(),i=v.join(r,e);if(T.existsSync(i)){let n=await T.readFilePromise(i,"utf8"),s=Ii(n);return{path:i,cwd:r,data:s}}return null}static async findProjectCwd(e,r){let i=null,n=e,s=null;for(;n!==s;){if(s=n,T.existsSync(v.join(s,"package.json"))&&(i=s),r!==null){if(T.existsSync(v.join(s,r))){i=s;break}}else if(i!==null)break;n=v.dirname(s)}return i}static async updateConfiguration(e,r){let i=TB(),n=v.join(e,i),s=T.existsSync(n)?Ii(await T.readFilePromise(n,"utf8")):{},o=!1,a;if(typeof r=="function"){try{a=r(s)}catch{a=r({})}if(a===s)return}else{a=s;for(let l of Object.keys(r)){let c=s[l],u=r[l],g;if(typeof u=="function")try{g=u(c)}catch{g=u(void 0)}else g=u;c!==g&&(a[l]=g,o=!0)}if(!o)return}await T.changeFilePromise(n,Qa(a),{automaticNewlines:!0})}static async updateHomeConfiguration(e){let r=uh();return await Ra.updateConfiguration(r,e)}activatePlugin(e,r){this.plugins.set(e,r),typeof r.configuration!="undefined"&&this.importSettings(r.configuration)}importSettings(e){for(let[r,i]of Object.entries(e))if(i!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings "${r}"`);this.settings.set(r,i),this.values.set(r,LR(this,i))}}useWithSource(e,r,i,n){try{this.use(e,r,i,n)}catch(s){throw s.message+=` (in ${Ve(this,e,Le.PATH)})`,s}}use(e,r,i,{strict:n=!0,overwrite:s=!1}={}){n=n&&this.get("enableStrictSettings");for(let o of["enableStrictSettings",...Object.keys(r)]){if(typeof r[o]=="undefined"||o==="plugins"||e===""&&dTe.has(o))continue;if(o==="rcFilename")throw new me(`The rcFilename settings can only be set via ${`${LB}RC_FILENAME`.toUpperCase()}, not via a rc file`);let l=this.settings.get(o);if(!l){if(n)throw new me(`Unrecognized or legacy configuration settings found: ${o} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(o,e);continue}if(this.sources.has(o)&&!(s||l.type===ge.MAP||l.isArray&&l.concatenateValues))continue;let c;try{c=NR(this,o,r[o],l,i)}catch(u){throw u.message+=` in ${Ve(this,e,Le.PATH)}`,u}if(o==="enableStrictSettings"&&e!==""){n=c;continue}if(l.type===ge.MAP){let u=this.values.get(o);this.values.set(o,new Map(s?[...u,...c]:[...c,...u])),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else if(l.isArray&&l.concatenateValues){let u=this.values.get(o);this.values.set(o,s?[...u,...c]:[...c,...u]),this.sources.set(o,`${this.sources.get(o)}, ${e}`)}else this.values.set(o,c),this.sources.set(o,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:i=!1}){let n=this.get(e),s=this.settings.get(e);if(typeof s=="undefined")throw new me(`Couldn't find a configuration settings named "${e}"`);return MB(n,s,{hideSecrets:r,getNativePaths:i})}getSubprocessStreams(e,{header:r,prefix:i,report:n}){let s,o,a=T.createWriteStream(e);if(this.get("enableInlineBuilds")){let l=n.createStreamReporter(`${i} ${Ve(this,"STDOUT","green")}`),c=n.createStreamReporter(`${i} ${Ve(this,"STDERR","red")}`);s=new kR.PassThrough,s.pipe(l),s.pipe(a),o=new kR.PassThrough,o.pipe(c),o.pipe(a)}else s=a,o=a,typeof r!="undefined"&&s.write(`${r} -`);return{stdout:s,stderr:o}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let i of r.resolvers||[])e.push(new i);return new pd([new FB,new Yr,new SR,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let i of r.fetchers||[])e.push(new i);return new vR([new dd,new xR,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let i of r.linkers||[])e.push(new i);return e}getSupportedArchitectures(){let e=this.get("supportedArchitectures"),r=e.get("os");r!==null&&(r=r.map(n=>n==="current"?process.platform:n));let i=e.get("cpu");return i!==null&&(i=i.map(n=>n==="current"?process.arch:n)),{os:r,cpu:i}}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,r=(i,n,{userProvided:s=!1}={})=>{if(!Us(i.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let o=new Ze;o.load(n,{yamlCompatibilityMode:!0});let a=hu(e,i.identHash),l=[];a.push([i.range,l]);let c={status:ki.Inactive,userProvided:s,parentDescriptor:i};for(let u of o.dependencies.values())l.push(_(P({},c),{type:oi.Dependency,descriptor:u}));for(let u of o.peerDependencies.values())l.push(_(P({},c),{type:oi.PeerDependency,descriptor:u}));for(let[u,g]of o.peerDependenciesMeta)for(let[f,h]of Object.entries(g))l.push(_(P({},c),{type:oi.PeerDependencyMeta,selector:u,key:f,value:h}))};await this.triggerHook(i=>i.registerPackageExtensions,this,r);for(let[i,n]of this.get("packageExtensions"))r(pA(i,!0),aI(n),{userProvided:!0})}normalizePackage(e){let r=ap(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let i=this.packageExtensions.get(e.identHash);if(typeof i!="undefined"){let s=e.version;if(s!==null){for(let[o,a]of i)if(!!lc(s,o))for(let l of a)switch(l.status===ki.Inactive&&(l.status=ki.Redundant),l.type){case oi.Dependency:typeof r.dependencies.get(l.descriptor.identHash)=="undefined"&&(l.status=ki.Active,r.dependencies.set(l.descriptor.identHash,l.descriptor));break;case oi.PeerDependency:typeof r.peerDependencies.get(l.descriptor.identHash)=="undefined"&&(l.status=ki.Active,r.peerDependencies.set(l.descriptor.identHash,l.descriptor));break;case oi.PeerDependencyMeta:{let c=r.peerDependenciesMeta.get(l.selector);(typeof c=="undefined"||!Object.prototype.hasOwnProperty.call(c,l.key)||c[l.key]!==l.value)&&(l.status=ki.Active,na(r.peerDependenciesMeta,l.selector,()=>({}))[l.key]=l.value)}break;default:Lv(l);break}}}let n=s=>s.scope?`${s.scope}__${s.name}`:`${s.name}`;for(let s of r.peerDependenciesMeta.keys()){let o=En(s);r.peerDependencies.has(o.identHash)||r.peerDependencies.set(o.identHash,Yt(o,"*"))}for(let s of r.peerDependencies.values()){if(s.scope==="types")continue;let o=n(s),a=Eo("types",o),l=St(a);r.peerDependencies.has(a.identHash)||r.peerDependenciesMeta.has(l)||(r.peerDependencies.set(a.identHash,Yt(a,"*")),r.peerDependenciesMeta.set(l,{optional:!0}))}return r.dependencies=new Map(gn(r.dependencies,([,s])=>In(s))),r.peerDependencies=new Map(gn(r.peerDependencies,([,s])=>In(s))),r}getLimit(e){return na(this.limits,e,()=>(0,N_.default)(this.get(e)))}async triggerHook(e,...r){for(let i of this.plugins.values()){let n=i.hooks;if(!n)continue;let s=e(n);!s||await s(...r)}}async triggerMultipleHooks(e,r){for(let i of r)await this.triggerHook(e,...i)}async reduceHook(e,r,...i){let n=r;for(let s of this.plugins.values()){let o=s.hooks;if(!o)continue;let a=e(o);!a||(n=await a(n,...i))}return n}async firstHook(e,...r){for(let i of this.plugins.values()){let n=i.hooks;if(!n)continue;let s=e(n);if(!s)continue;let o=await s(...r);if(typeof o!="undefined")return o}return null}},fe=Ra;fe.telemetry=null;var Gn;(function(r){r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE"})(Gn||(Gn={}));var Fa=class extends Xi{constructor({configuration:e,stdout:r,suggestInstall:i=!0}){super();this.errorCount=0;Cp(this,{configuration:e}),this.configuration=e,this.stdout=r,this.suggestInstall=i}static async start(e,r){let i=new this(e);try{await r(i)}catch(n){i.reportExceptionOnce(n)}finally{await i.finalize()}return i}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,r,i){return(typeof r=="function"?r:i)()}async startTimerPromise(e,r,i){return await(typeof r=="function"?r:i)()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){this.errorCount+=1,this.stdout.write(`${Ve(this.configuration,"\u27A4","redBright")} ${this.formatNameWithHyperlink(e)}: ${r} -`)}reportProgress(e){let r=Promise.resolve().then(async()=>{for await(let{}of e);}),i=()=>{};return _(P({},r),{stop:i})}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(` -`),this.stdout.write(`${Ve(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command. -`),this.suggestInstall&&this.stdout.write(`${Ve(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help. -`))}formatNameWithHyperlink(e){return eD(e,{configuration:this.configuration,json:!1})}};var t0=ie(require("crypto")),v$=ie(CX()),r0=ie(Q$()),S$=ie(Wp()),x$=ie(Or()),lF=ie(require("util")),cF=ie(require("v8")),uF=ie(require("zlib"));var iUe=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,i)=>`${r}#commit=${i}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",i,n)=>`https://${r}github.com/${i}.git#commit=${n}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",i,n)=>`https://${r}github.com/${i}.git#commit=${n}`],[/^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?:\/\/(?:[^\\.]+)\.jfrog\.io\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>by({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],oF=class{constructor(){this.resolutions=null}async setup(e,{report:r}){let i=v.join(e.cwd,e.configuration.get("lockfileFilename"));if(!T.existsSync(i))return;let n=await T.readFilePromise(i,"utf8"),s=Ii(n);if(Object.prototype.hasOwnProperty.call(s,"__metadata"))return;let o=this.resolutions=new Map;for(let a of Object.keys(s)){let l=gp(a);if(!l){r.reportWarning(z.YARN_IMPORT_FAILED,`Failed to parse the string "${a}" into a proper descriptor`);continue}Us(l.range)&&(l=Yt(l,`npm:${l.range}`));let{version:c,resolved:u}=s[a];if(!u)continue;let g;for(let[h,p]of iUe){let d=u.match(h);if(d){g=p(c,...d);break}}if(!g){r.reportWarning(z.YARN_IMPORT_FAILED,`${Xt(e.configuration,l)}: Only some patterns can be imported from legacy lockfiles (not "${u}")`);continue}let f=l;try{let h=Tu(l.range),p=gp(h.selector,!0);p&&(f=p)}catch{}o.set(l.descriptorHash,Vi(f,g))}}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,i){return e}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let n=this.resolutions.get(e.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");return[n]}async getSatisfying(e,r,i){return null}async resolve(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}};var aF=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(By(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,i){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,i){let n=i.project.originalPackages.get(By(e).locatorHash);if(n)return[n];let s=i.project.storedResolutions.get(e.descriptorHash);if(!s)throw new Error("Expected the resolution to have been successful - resolution not found");if(n=i.project.originalPackages.get(s),!n)throw new Error("Expected the resolution to have been successful - package not found");return[n]}async getSatisfying(e,r,i){return null}async resolve(e,r){let i=r.project.originalPackages.get(e.locatorHash);if(!i)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return i}};var AF=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,i){return this.resolver.bindDescriptor(e,r,i)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,i){throw new nt(z.MISSING_LOCKFILE_ENTRY,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(e,r,i){throw new nt(z.MISSING_LOCKFILE_ENTRY,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(e,r){throw new nt(z.MISSING_LOCKFILE_ENTRY,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}};var ei=class extends Xi{reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,r,i){return(typeof r=="function"?r:i)()}async startTimerPromise(e,r,i){return await(typeof r=="function"?r:i)()}async startCacheReport(e){return await e()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){}reportProgress(e){let r=Promise.resolve().then(async()=>{for await(let{}of e);}),i=()=>{};return _(P({},r),{stop:i})}reportJson(e){}async finalize(){}};var b$=ie(vx());var Dd=class{constructor(e,{project:r}){this.workspacesCwds=new Set;this.dependencies=new Map;this.project=r,this.cwd=e}async setup(){this.manifest=T.existsSync(v.join(this.cwd,Ze.fileName))?await Ze.find(this.cwd):new Ze,this.relativeCwd=v.relative(this.project.cwd,this.cwd)||Se.dot;let e=this.manifest.name?this.manifest.name:Eo(null,`${this.computeCandidateName()}-${zi(this.relativeCwd).substr(0,6)}`),r=this.manifest.version?this.manifest.version:"0.0.0";this.locator=Vi(e,r),this.anchoredDescriptor=Yt(this.locator,`${Yr.protocol}${this.relativeCwd}`),this.anchoredLocator=Vi(this.locator,`${Yr.protocol}${this.relativeCwd}`);let i=this.manifest.workspaceDefinitions.map(({pattern:s})=>s),n=await(0,b$.default)(i,{cwd:M.fromPortablePath(this.cwd),expandDirectories:!1,onlyDirectories:!0,onlyFiles:!1,ignore:["**/node_modules","**/.git","**/.yarn"]});n.sort();for(let s of n){let o=v.resolve(this.cwd,M.toPortablePath(s));T.existsSync(v.join(o,"package.json"))&&this.workspacesCwds.add(o)}}accepts(e){var o;let r=e.indexOf(":"),i=r!==-1?e.slice(0,r+1):null,n=r!==-1?e.slice(r+1):e;if(i===Yr.protocol&&v.normalize(n)===this.relativeCwd||i===Yr.protocol&&(n==="*"||n==="^"||n==="~"))return!0;let s=Us(n);return s?i===Yr.protocol?s.test((o=this.manifest.version)!=null?o:"0.0.0"):this.project.configuration.get("enableTransparentWorkspaces")&&this.manifest.version!==null?s.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":`${v.basename(this.cwd)}`||"unnamed-workspace"}getRecursiveWorkspaceDependencies({dependencies:e=Ze.hardDependencies}={}){let r=new Set,i=n=>{for(let s of e)for(let o of n.manifest[s].values()){let a=this.project.tryWorkspaceByDescriptor(o);a===null||r.has(a)||(r.add(a),i(a))}};return i(this),r}getRecursiveWorkspaceDependents({dependencies:e=Ze.hardDependencies}={}){let r=new Set,i=n=>{for(let s of this.project.workspaces)e.some(a=>[...s.manifest[a].values()].some(l=>{let c=this.project.tryWorkspaceByDescriptor(l);return c!==null&&up(c.anchoredLocator,n.anchoredLocator)}))&&!r.has(s)&&(r.add(s),i(s))};return i(this),r}getRecursiveWorkspaceChildren(){let e=[];for(let r of this.workspacesCwds){let i=this.project.workspacesByCwd.get(r);i&&e.push(i,...i.getRecursiveWorkspaceChildren())}return e}async persistManifest(){let e={};this.manifest.exportTo(e);let r=v.join(this.cwd,Ze.fileName),i=`${JSON.stringify(e,null,this.manifest.indent)} -`;await T.changeFilePromise(r,i,{automaticNewlines:!0}),this.manifest.raw=e}};var k$=5,nUe=1,sUe=/ *, */g,P$=/\/$/,oUe=32,aUe=(0,lF.promisify)(uF.default.gzip),AUe=(0,lF.promisify)(uF.default.gunzip),li;(function(r){r.UpdateLockfile="update-lockfile",r.SkipBuild="skip-build"})(li||(li={}));var gF={restoreInstallersCustomData:["installersCustomData"],restoreResolutions:["accessibleLocators","conditionalLocators","disabledLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["storedBuildState"]},D$=t=>zi(`${nUe}`,t),Ke=class{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.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.installersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){var c,u,g;if(!e.projectCwd)throw new me(`No project found in ${r}`);let i=e.projectCwd,n=r,s=null;for(;s!==e.projectCwd;){if(s=n,T.existsSync(v.join(s,wt.manifest))){i=s;break}n=v.dirname(s)}let o=new Ke(e.projectCwd,{configuration:e});(c=fe.telemetry)==null||c.reportProject(o.cwd),await o.setupResolutions(),await o.setupWorkspaces(),(u=fe.telemetry)==null||u.reportWorkspaceCount(o.workspaces.length),(g=fe.telemetry)==null||g.reportDependencyCount(o.workspaces.reduce((f,h)=>f+h.manifest.dependencies.size+h.manifest.devDependencies.size,0));let a=o.tryWorkspaceByCwd(i);if(a)return{project:o,workspace:a,locator:a.anchoredLocator};let l=await o.findLocatorForLocation(`${i}/`,{strict:!0});if(l)return{project:o,locator:l,workspace:null};throw new me(`The nearest package directory (${Ve(e,i,Le.PATH)}) doesn't seem to be part of the project declared in ${Ve(e,o.cwd,Le.PATH)}. - -- If the project directory is right, it might be that you forgot to list ${Ve(e,v.relative(o.cwd,i),Le.PATH)} as a workspace. -- If it isn't, it's likely because you have a yarn.lock or package.json file there, confusing the project root detection.`)}async setupResolutions(){var i;this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=v.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.configuration.get("defaultLanguageName");if(T.existsSync(e)){let n=await T.readFilePromise(e,"utf8");this.lockFileChecksum=D$(n);let s=Ii(n);if(s.__metadata){let o=s.__metadata.version,a=s.__metadata.cacheKey;this.lockfileNeedsRefresh=o0;){let r=e;e=[];for(let i of r){if(this.workspacesByCwd.has(i))continue;let n=await this.addWorkspace(i),s=this.storedPackages.get(n.anchoredLocator.locatorHash);s&&(n.dependencies=s.dependencies);for(let o of n.workspacesCwds)e.push(o)}}}async addWorkspace(e){let r=new Dd(e,{project:this});await r.setup();let i=this.workspacesByIdent.get(r.locator.identHash);if(typeof i!="undefined")throw new Error(`Duplicate workspace name ${Vr(this.configuration,r.locator)}: ${M.fromPortablePath(e)} conflicts with ${M.fromPortablePath(i.cwd)}`);return this.workspaces.push(r),this.workspacesByCwd.set(e,r),this.workspacesByIdent.set(r.locator.identHash,r),r}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){v.isAbsolute(e)||(e=v.resolve(this.cwd,e)),e=v.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 i of this.workspaces)v.relative(i.cwd,e).startsWith("../")||r&&r.cwd.length>=i.cwd.length||(r=i);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=="undefined"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${Vr(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){let r=this.tryWorkspaceByIdent(e);return r===null||(hA(e)&&(e=Ap(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${Xt(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Io(e)&&(e=lp(e)),r.locator.locatorHash!==e.locatorHash&&r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${lt(this.configuration,e)})`);return r}refreshWorkspaceDependencies(){for(let e of this.workspaces){let r=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!r)throw new Error(`Assertion failed: Expected workspace ${hp(this.configuration,e)} (${Ve(this.configuration,v.join(e.cwd,wt.manifest),Le.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);e.dependencies=new Map(r.dependencies)}}forgetResolution(e){let r=n=>{this.storedResolutions.delete(n),this.storedDescriptors.delete(n)},i=n=>{this.originalPackages.delete(n),this.storedPackages.delete(n),this.accessibleLocators.delete(n)};if("descriptorHash"in e){let n=this.storedResolutions.get(e.descriptorHash);r(e.descriptorHash);let s=new Set(this.storedResolutions.values());typeof n!="undefined"&&!s.has(n)&&i(n)}if("locatorHash"in e){i(e.locatorHash);for(let[n,s]of this.storedResolutions)s===e.locatorHash&&r(n)}}forgetTransientResolutions(){let e=this.configuration.makeResolver();for(let r of this.originalPackages.values()){let i;try{i=e.shouldPersistResolution(r,{project:this,resolver:e})}catch{i=!1}i||this.forgetResolution(r)}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,i]of e.dependencies)hA(i)&&e.dependencies.set(r,Ap(i))}getDependencyMeta(e,r){let i={},s=this.topLevelWorkspace.manifest.dependenciesMeta.get(St(e));if(!s)return i;let o=s.get(null);if(o&&Object.assign(i,o),r===null||!x$.default.valid(r))return i;for(let[a,l]of s)a!==null&&a===r&&Object.assign(i,l);return i}async findLocatorForLocation(e,{strict:r=!1}={}){let i=new ei,n=this.configuration.getLinkers(),s={project:this,report:i};for(let o of n){let a=await o.findPackageLocator(e,s);if(a){if(r&&(await o.findPackageLocation(a,s)).replace(P$,"")!==e.replace(P$,""))continue;return a}}return null}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions(),e.lockfileOnly||this.forgetTransientResolutions();let r=e.resolver||this.configuration.makeResolver(),i=new oF;await i.setup(this,{report:e.report});let n=e.lockfileOnly?[new AF(r)]:[i,r],s=new pd([new aF(r),...n]),o=this.configuration.makeFetcher(),a=e.lockfileOnly?{project:this,report:e.report,resolver:s}:{project:this,report:e.report,resolver:s,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:o,cacheOptions:{mirrorWriteOnly:!0}}},l=new Map,c=new Map,u=new Map,g=new Map,f=new Map,h=new Map,p=this.topLevelWorkspace.anchoredLocator,d=new Set,m=[],I=async W=>{let X=await du(async()=>await s.resolve(W,a),D=>`${lt(this.configuration,W)}: ${D}`);if(!up(W,X))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${lt(this.configuration,W)} to ${lt(this.configuration,X)})`);g.set(X.locatorHash,X);let F=this.configuration.normalizePackage(X);for(let[D,he]of F.dependencies){let pe=await this.configuration.reduceHook(Pe=>Pe.reduceDependency,he,this,F,he,{resolver:s,resolveOptions:a});if(!cp(he,pe))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");let Ne=s.bindDescriptor(pe,W,a);F.dependencies.set(D,Ne)}return m.push(Promise.all([...F.dependencies.values()].map(D=>H(D)))),c.set(F.locatorHash,F),F},B=async W=>{let X=f.get(W.locatorHash);if(typeof X!="undefined")return X;let F=Promise.resolve().then(()=>I(W));return f.set(W.locatorHash,F),F},b=async(W,X)=>{let F=await H(X);return l.set(W.descriptorHash,W),u.set(W.descriptorHash,F.locatorHash),F},R=async W=>{let X=this.resolutionAliases.get(W.descriptorHash);if(typeof X!="undefined")return b(W,this.storedDescriptors.get(X));let F=s.getResolutionDependencies(W,a),D=new Map(await Promise.all(F.map(async Ne=>{let Pe=s.bindDescriptor(Ne,p,a),qe=await H(Pe);return d.add(qe.locatorHash),[Ne.descriptorHash,qe]}))),pe=(await du(async()=>await s.getCandidates(W,D,a),Ne=>`${Xt(this.configuration,W)}: ${Ne}`))[0];if(typeof pe=="undefined")throw new Error(`${Xt(this.configuration,W)}: No candidates found`);return l.set(W.descriptorHash,W),u.set(W.descriptorHash,pe.locatorHash),B(pe)},H=W=>{let X=h.get(W.descriptorHash);if(typeof X!="undefined")return X;l.set(W.descriptorHash,W);let F=Promise.resolve().then(()=>R(W));return h.set(W.descriptorHash,F),F};for(let W of this.workspaces){let X=W.anchoredDescriptor;m.push(H(X))}for(;m.length>0;){let W=[...m];m.length=0,await Promise.all(W)}let L=new Set(this.resolutionAliases.values()),K=new Set(c.keys()),J=new Set,ne=new Map;lUe({project:this,report:e.report,accessibleLocators:J,volatileDescriptors:L,optionalBuilds:K,peerRequirements:ne,allDescriptors:l,allResolutions:u,allPackages:c});for(let W of d)K.delete(W);for(let W of L)l.delete(W),u.delete(W);let q=this.configuration.getSupportedArchitectures(),A=new Set,V=new Set;for(let W of c.values())W.conditions!=null&&(!K.has(W.locatorHash)||(Sy(W,q)||(Sy(W,{os:[process.platform],cpu:[process.arch]})&&e.report.reportWarningOnce(z.GHOST_ARCHITECTURE,`${lt(this.configuration,W)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${Ve(this.configuration,"supportedArchitectures",ps.SETTING)} setting`),V.add(W.locatorHash)),A.add(W.locatorHash)));this.storedResolutions=u,this.storedDescriptors=l,this.storedPackages=c,this.accessibleLocators=J,this.conditionalLocators=A,this.disabledLocators=V,this.originalPackages=g,this.optionalBuilds=K,this.peerRequirements=ne,this.refreshWorkspaceDependencies()}async fetchEverything({cache:e,report:r,fetcher:i,mode:n}){let s={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},o=i||this.configuration.makeFetcher(),a={checksums:this.storedChecksums,project:this,cache:e,fetcher:o,report:r,cacheOptions:s},l=Array.from(new Set(gn(this.storedResolutions.values(),[f=>{let h=this.storedPackages.get(f);if(!h)throw new Error("Assertion failed: The locator should have been registered");return is(h)}])));n===li.UpdateLockfile&&(l=l.filter(f=>!this.storedChecksums.has(f)));let c=!1,u=Xi.progressViaCounter(l.length);r.reportProgress(u);let g=(0,S$.default)(oUe);if(await r.startCacheReport(async()=>{await Promise.all(l.map(f=>g(async()=>{let h=this.storedPackages.get(f);if(!h)throw new Error("Assertion failed: The locator should have been registered");if(Io(h))return;let p;try{p=await o.fetch(h,a)}catch(d){d.message=`${lt(this.configuration,h)}: ${d.message}`,r.reportExceptionOnce(d),c=d;return}p.checksum!=null?this.storedChecksums.set(h.locatorHash,p.checksum):this.storedChecksums.delete(h.locatorHash),p.releaseFs&&p.releaseFs()}).finally(()=>{u.tick()})))}),c)throw c}async linkEverything({cache:e,report:r,fetcher:i,mode:n}){var A,V,W;let s={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},o=i||this.configuration.makeFetcher(),a={checksums:this.storedChecksums,project:this,cache:e,fetcher:o,report:r,skipIntegrityCheck:!0,cacheOptions:s},l=this.configuration.getLinkers(),c={project:this,report:r},u=new Map(l.map(X=>{let F=X.makeInstaller(c),D=F.getCustomDataKey(),he=this.installersCustomData.get(D);return typeof he!="undefined"&&F.attachCustomData(he),[X,F]})),g=new Map,f=new Map,h=new Map,p=new Map(await Promise.all([...this.accessibleLocators].map(async X=>{let F=this.storedPackages.get(X);if(!F)throw new Error("Assertion failed: The locator should have been registered");return[X,await o.fetch(F,a)]}))),d=[];for(let X of this.accessibleLocators){let F=this.storedPackages.get(X);if(typeof F=="undefined")throw new Error("Assertion failed: The locator should have been registered");let D=p.get(F.locatorHash);if(typeof D=="undefined")throw new Error("Assertion failed: The fetch result should have been registered");let he=[],pe=Pe=>{he.push(Pe)},Ne=this.tryWorkspaceByLocator(F);if(Ne!==null){let Pe=[],{scripts:qe}=Ne.manifest;for(let se of["preinstall","install","postinstall"])qe.has(se)&&Pe.push([Gn.SCRIPT,se]);try{for(let[se,be]of u)if(se.supportsPackage(F,c)&&(await be.installPackage(F,D,{holdFetchResult:pe})).buildDirective!==null)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}finally{he.length===0?(A=D.releaseFs)==null||A.call(D):d.push(Promise.all(he).catch(()=>{}).then(()=>{var se;(se=D.releaseFs)==null||se.call(D)}))}let re=v.join(D.packageFs.getRealPath(),D.prefixPath);f.set(F.locatorHash,re),!Io(F)&&Pe.length>0&&h.set(F.locatorHash,{directives:Pe,buildLocations:[re]})}else{let Pe=l.find(se=>se.supportsPackage(F,c));if(!Pe)throw new nt(z.LINKER_NOT_FOUND,`${lt(this.configuration,F)} isn't supported by any available linker`);let qe=u.get(Pe);if(!qe)throw new Error("Assertion failed: The installer should have been registered");let re;try{re=await qe.installPackage(F,D,{holdFetchResult:pe})}finally{he.length===0?(V=D.releaseFs)==null||V.call(D):d.push(Promise.all(he).then(()=>{}).then(()=>{var se;(se=D.releaseFs)==null||se.call(D)}))}g.set(F.locatorHash,Pe),f.set(F.locatorHash,re.packageLocation),re.buildDirective&&re.buildDirective.length>0&&re.packageLocation&&h.set(F.locatorHash,{directives:re.buildDirective,buildLocations:[re.packageLocation]})}}let m=new Map;for(let X of this.accessibleLocators){let F=this.storedPackages.get(X);if(!F)throw new Error("Assertion failed: The locator should have been registered");let D=this.tryWorkspaceByLocator(F)!==null,he=async(pe,Ne)=>{let Pe=f.get(F.locatorHash);if(typeof Pe=="undefined")throw new Error(`Assertion failed: The package (${lt(this.configuration,F)}) should have been registered`);let qe=[];for(let re of F.dependencies.values()){let se=this.storedResolutions.get(re.descriptorHash);if(typeof se=="undefined")throw new Error(`Assertion failed: The resolution (${Xt(this.configuration,re)}, from ${lt(this.configuration,F)})should have been registered`);let be=this.storedPackages.get(se);if(typeof be=="undefined")throw new Error(`Assertion failed: The package (${se}, resolved from ${Xt(this.configuration,re)}) should have been registered`);let ae=this.tryWorkspaceByLocator(be)===null?g.get(se):null;if(typeof ae=="undefined")throw new Error(`Assertion failed: The package (${se}, resolved from ${Xt(this.configuration,re)}) should have been registered`);ae===pe||ae===null?f.get(be.locatorHash)!==null&&qe.push([re,be]):!D&&Pe!==null&&hu(m,se).push(Pe)}Pe!==null&&await Ne.attachInternalDependencies(F,qe)};if(D)for(let[pe,Ne]of u)pe.supportsPackage(F,c)&&await he(pe,Ne);else{let pe=g.get(F.locatorHash);if(!pe)throw new Error("Assertion failed: The linker should have been found");let Ne=u.get(pe);if(!Ne)throw new Error("Assertion failed: The installer should have been registered");await he(pe,Ne)}}for(let[X,F]of m){let D=this.storedPackages.get(X);if(!D)throw new Error("Assertion failed: The package should have been registered");let he=g.get(D.locatorHash);if(!he)throw new Error("Assertion failed: The linker should have been found");let pe=u.get(he);if(!pe)throw new Error("Assertion failed: The installer should have been registered");await pe.attachExternalDependents(D,F)}let I=new Map;for(let X of u.values()){let F=await X.finalizeInstall();for(let D of(W=F==null?void 0:F.records)!=null?W:[])h.set(D.locatorHash,{directives:D.buildDirective,buildLocations:D.buildLocations});typeof(F==null?void 0:F.customData)!="undefined"&&I.set(X.getCustomDataKey(),F.customData)}if(this.installersCustomData=I,await Promise.all(d),n===li.SkipBuild)return;let B=new Set(this.storedPackages.keys()),b=new Set(h.keys());for(let X of b)B.delete(X);let R=(0,t0.createHash)("sha512");R.update(process.versions.node),await this.configuration.triggerHook(X=>X.globalHashGeneration,this,X=>{R.update("\0"),R.update(X)});let H=R.digest("hex"),L=new Map,K=X=>{let F=L.get(X.locatorHash);if(typeof F!="undefined")return F;let D=this.storedPackages.get(X.locatorHash);if(typeof D=="undefined")throw new Error("Assertion failed: The package should have been registered");let he=(0,t0.createHash)("sha512");he.update(X.locatorHash),L.set(X.locatorHash,"");for(let pe of D.dependencies.values()){let Ne=this.storedResolutions.get(pe.descriptorHash);if(typeof Ne=="undefined")throw new Error(`Assertion failed: The resolution (${Xt(this.configuration,pe)}) should have been registered`);let Pe=this.storedPackages.get(Ne);if(typeof Pe=="undefined")throw new Error("Assertion failed: The package should have been registered");he.update(K(Pe))}return F=he.digest("hex"),L.set(X.locatorHash,F),F},J=(X,F)=>{let D=(0,t0.createHash)("sha512");D.update(H),D.update(K(X));for(let he of F)D.update(he);return D.digest("hex")},ne=new Map,q=!1;for(;b.size>0;){let X=b.size,F=[];for(let D of b){let he=this.storedPackages.get(D);if(!he)throw new Error("Assertion failed: The package should have been registered");let pe=!0;for(let qe of he.dependencies.values()){let re=this.storedResolutions.get(qe.descriptorHash);if(!re)throw new Error(`Assertion failed: The resolution (${Xt(this.configuration,qe)}) should have been registered`);if(b.has(re)){pe=!1;break}}if(!pe)continue;b.delete(D);let Ne=h.get(he.locatorHash);if(!Ne)throw new Error("Assertion failed: The build directive should have been registered");let Pe=J(he,Ne.buildLocations);if(this.storedBuildState.get(he.locatorHash)===Pe){ne.set(he.locatorHash,Pe);continue}q||(await this.persistInstallStateFile(),q=!0),this.storedBuildState.has(he.locatorHash)?r.reportInfo(z.MUST_REBUILD,`${lt(this.configuration,he)} must be rebuilt because its dependency tree changed`):r.reportInfo(z.MUST_BUILD,`${lt(this.configuration,he)} must be built because it never has been before or the last one failed`);for(let qe of Ne.buildLocations){if(!v.isAbsolute(qe))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${qe})`);F.push((async()=>{for(let[re,se]of Ne.directives){let be=`# This file contains the result of Yarn building a package (${is(he)}) -`;switch(re){case Gn.SCRIPT:be+=`# Script name: ${se} -`;break;case Gn.SHELLCODE:be+=`# Script code: ${se} -`;break}let ae=null;if(!await T.mktempPromise(async De=>{let $=v.join(De,"build.log"),{stdout:G,stderr:Ce}=this.configuration.getSubprocessStreams($,{header:be,prefix:lt(this.configuration,he),report:r}),ee;try{switch(re){case Gn.SCRIPT:ee=await Uw(he,se,[],{cwd:qe,project:this,stdin:ae,stdout:G,stderr:Ce});break;case Gn.SHELLCODE:ee=await rD(he,se,[],{cwd:qe,project:this,stdin:ae,stdout:G,stderr:Ce});break}}catch(Oe){Ce.write(Oe.stack),ee=1}if(G.end(),Ce.end(),ee===0)return ne.set(he.locatorHash,Pe),!0;T.detachTemp(De);let Ue=`${lt(this.configuration,he)} couldn't be built successfully (exit code ${Ve(this.configuration,ee,Le.NUMBER)}, logs can be found here: ${Ve(this.configuration,$,Le.PATH)})`;return this.optionalBuilds.has(he.locatorHash)?(r.reportInfo(z.BUILD_FAILED,Ue),ne.set(he.locatorHash,Pe),!0):(r.reportError(z.BUILD_FAILED,Ue),!1)}))return}})())}}if(await Promise.all(F),X===b.size){let D=Array.from(b).map(he=>{let pe=this.storedPackages.get(he);if(!pe)throw new Error("Assertion failed: The package should have been registered");return lt(this.configuration,pe)}).join(", ");r.reportError(z.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${D})`);break}}this.storedBuildState=ne}async install(e){var a,l;let r=this.configuration.get("nodeLinker");(a=fe.telemetry)==null||a.reportInstall(r),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(c=>c.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(let c of this.configuration.packageExtensions.values())for(let[,u]of c)for(let g of u)g.status=ki.Inactive;let i=v.join(this.cwd,this.configuration.get("lockfileFilename")),n=null;if(e.immutable)try{n=await T.readFilePromise(i,"utf8")}catch(c){throw c.code==="ENOENT"?new nt(z.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):c}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,c]of this.configuration.packageExtensions)for(let[,u]of c)for(let g of u)if(g.userProvided){let f=Ve(this.configuration,g,Le.PACKAGE_EXTENSION);switch(g.status){case ki.Inactive:e.report.reportWarning(z.UNUSED_PACKAGE_EXTENSION,`${f}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case ki.Redundant:e.report.reportWarning(z.REDUNDANT_PACKAGE_EXTENSION,`${f}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(n!==null){let c=ul(n,this.generateLockfile());if(c!==n){let u=(0,v$.structuredPatch)(i,i,n,c);e.report.reportSeparator();for(let g of u.hunks){e.report.reportInfo(null,`@@ -${g.oldStart},${g.oldLines} +${g.newStart},${g.newLines} @@`);for(let f of g.lines)f.startsWith("+")?e.report.reportError(z.FROZEN_LOCKFILE_EXCEPTION,Ve(this.configuration,f,Le.ADDED)):f.startsWith("-")?e.report.reportError(z.FROZEN_LOCKFILE_EXCEPTION,Ve(this.configuration,f,Le.REMOVED)):e.report.reportInfo(null,Ve(this.configuration,f,"grey"))}throw e.report.reportSeparator(),new nt(z.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let c of this.configuration.packageExtensions.values())for(let[,u]of c)for(let g of u)g.userProvided&&g.status===ki.Active&&((l=fe.telemetry)==null||l.reportPackageExtension(Uu(g,Le.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(typeof e.persistProject=="undefined"||e.persistProject)&&e.mode!==li.UpdateLockfile&&await this.cacheCleanup(e)});let s=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],o=await Promise.all(s.map(async c=>Iy(c,{cwd:this.cwd})));(typeof e.persistProject=="undefined"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode===li.UpdateLockfile){e.report.reportWarning(z.UPDATE_LOCKFILE_ONLY_SKIP_LINK,`Skipped due to ${Ve(this.configuration,"mode=update-lockfile",Le.CODE)}`);return}await this.linkEverything(e);let c=await Promise.all(s.map(async u=>Iy(u,{cwd:this.cwd})));for(let u=0;uc.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[n,s]of this.storedResolutions.entries()){let o=e.get(s);o||e.set(s,o=new Set),o.add(n)}let r={};r.__metadata={version:k$,cacheKey:void 0};for(let[n,s]of e.entries()){let o=this.originalPackages.get(n);if(!o)continue;let a=[];for(let f of s){let h=this.storedDescriptors.get(f);if(!h)throw new Error("Assertion failed: The descriptor should have been registered");a.push(h)}let l=a.map(f=>In(f)).sort().join(", "),c=new Ze;c.version=o.linkType===gt.HARD?o.version:"0.0.0-use.local",c.languageName=o.languageName,c.dependencies=new Map(o.dependencies),c.peerDependencies=new Map(o.peerDependencies),c.dependenciesMeta=new Map(o.dependenciesMeta),c.peerDependenciesMeta=new Map(o.peerDependenciesMeta),c.bin=new Map(o.bin);let u,g=this.storedChecksums.get(o.locatorHash);if(typeof g!="undefined"){let f=g.indexOf("/");if(f===-1)throw new Error("Assertion failed: Expected the checksum to reference its cache key");let h=g.slice(0,f),p=g.slice(f+1);typeof r.__metadata.cacheKey=="undefined"&&(r.__metadata.cacheKey=h),h===r.__metadata.cacheKey?u=p:u=g}r[l]=_(P({},c.exportTo({},{compatibilityMode:!1})),{linkType:o.linkType.toLowerCase(),resolution:is(o),checksum:u,conditions:o.conditions||void 0})}return`${[`# This file is generated by running "yarn install" inside your project. -`,`# Manual changes might be lost - proceed with caution! -`].join("")} -`+Qa(r)}async persistLockfile(){let e=v.join(this.cwd,this.configuration.get("lockfileFilename")),r="";try{r=await T.readFilePromise(e,"utf8")}catch(s){}let i=this.generateLockfile(),n=ul(r,i);n!==r&&(await T.writeFilePromise(e,n),this.lockFileChecksum=D$(n),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let o of Object.values(gF))e.push(...o);let r=(0,r0.default)(this,e),i=cF.default.serialize(r),n=zi(i);if(this.installStateChecksum===n)return;let s=this.configuration.get("installStatePath");await T.mkdirPromise(v.dirname(s),{recursive:!0}),await T.writeFilePromise(s,await aUe(i)),this.installStateChecksum=n}async restoreInstallState({restoreInstallersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:i=!0}={}){let n=this.configuration.get("installStatePath");if(!T.existsSync(n)){r&&await this.applyLightResolution();return}let s=await AUe(await T.readFilePromise(n));this.installStateChecksum=zi(s);let o=cF.default.deserialize(s);e&&typeof o.installersCustomData!="undefined"&&(this.installersCustomData=o.installersCustomData),i&&Object.assign(this,(0,r0.default)(o,gF.restoreBuildState)),r&&(o.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,(0,r0.default)(o,gF.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new ei}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(let e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:r}){let i=new Set([".gitignore"]);if(!Fb(e.cwd,this.cwd)||!await T.existsPromise(e.cwd))return;let n=this.configuration.get("preferAggregateCacheInfo"),s=0,o=null;for(let a of await T.readdirPromise(e.cwd)){if(i.has(a))continue;let l=v.resolve(e.cwd,a);e.markedFiles.has(l)||(o=a,e.immutable?r.reportError(z.IMMUTABLE_CACHE,`${Ve(this.configuration,v.basename(l),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):(n?s+=1:r.reportInfo(z.UNUSED_CACHE_ENTRY,`${Ve(this.configuration,v.basename(l),"magenta")} appears to be unused - removing`),await T.removePromise(l)))}n&&s!==0&&r.reportInfo(z.UNUSED_CACHE_ENTRY,s>1?`${s} packages appeared to be unused and were removed`:`${o} appeared to be unused and was removed`),e.markedFiles.clear()}};function lUe({project:t,allDescriptors:e,allResolutions:r,allPackages:i,accessibleLocators:n=new Set,optionalBuilds:s=new Set,volatileDescriptors:o=new Set,peerRequirements:a=new Map,report:l,tolerateMissingPackages:c=!1}){var ne;let u=new Map,g=[],f=new Map,h=new Map,p=new Map,d=new Map,m=new Map,I=new Map(t.workspaces.map(q=>{let A=q.anchoredLocator.locatorHash,V=i.get(A);if(typeof V=="undefined"){if(c)return[A,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[A,ap(V)]})),B=()=>{let q=T.mktempSync(),A=v.join(q,"stacktrace.log"),V=String(g.length+1).length,W=g.map((X,F)=>`${`${F+1}.`.padStart(V," ")} ${is(X)} -`).join("");throw T.writeFileSync(A,W),T.detachTemp(q),new nt(z.STACK_OVERFLOW_RESOLUTION,`Encountered a stack overflow when resolving peer dependencies; cf ${M.fromPortablePath(A)}`)},b=q=>{let A=r.get(q.descriptorHash);if(typeof A=="undefined")throw new Error("Assertion failed: The resolution should have been registered");let V=i.get(A);if(!V)throw new Error("Assertion failed: The package could not be found");return V},R=(q,A,V,{top:W,optional:X})=>{g.length>1e3&&B(),g.push(A);let F=H(q,A,V,{top:W,optional:X});return g.pop(),F},H=(q,A,V,{top:W,optional:X})=>{if(n.has(A.locatorHash))return;n.add(A.locatorHash),X||s.delete(A.locatorHash);let F=i.get(A.locatorHash);if(!F){if(c)return;throw new Error(`Assertion failed: The package (${lt(t.configuration,A)}) should have been registered`)}let D=[],he=[],pe=[],Ne=[],Pe=[];for(let re of Array.from(F.dependencies.values())){if(F.peerDependencies.has(re.identHash)&&F.locatorHash!==W)continue;if(hA(re))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");o.delete(re.descriptorHash);let se=X;if(!se){let ee=F.dependenciesMeta.get(St(re));if(typeof ee!="undefined"){let Ue=ee.get(null);typeof Ue!="undefined"&&Ue.optional&&(se=!0)}}let be=r.get(re.descriptorHash);if(!be){if(c)continue;throw new Error(`Assertion failed: The resolution (${Xt(t.configuration,re)}) should have been registered`)}let ae=I.get(be)||i.get(be);if(!ae)throw new Error(`Assertion failed: The package (${be}, resolved from ${Xt(t.configuration,re)}) should have been registered`);if(ae.peerDependencies.size===0){R(re,ae,new Map,{top:W,optional:se});continue}let Ae=u.get(ae.locatorHash);typeof Ae=="number"&&Ae>=2&&B();let De,$,G=new Set,Ce;he.push(()=>{De=kx(re,A.locatorHash),$=Px(ae,A.locatorHash),F.dependencies.delete(re.identHash),F.dependencies.set(De.identHash,De),r.set(De.descriptorHash,$.locatorHash),e.set(De.descriptorHash,De),i.set($.locatorHash,$),D.push([ae,De,$])}),pe.push(()=>{var ee;Ce=new Map;for(let Ue of $.peerDependencies.values()){let Oe=F.dependencies.get(Ue.identHash);if(!Oe&&cp(A,Ue)&&(Oe=q),(!Oe||Oe.range==="missing:")&&$.dependencies.has(Ue.identHash)){$.peerDependencies.delete(Ue.identHash);continue}Oe||(Oe=Yt(Ue,"missing:")),$.dependencies.set(Oe.identHash,Oe),hA(Oe)&&Pl(p,Oe.descriptorHash).add($.locatorHash),f.set(Oe.identHash,Oe),Oe.range==="missing:"&&G.add(Oe.identHash),Ce.set(Ue.identHash,(ee=V.get(Ue.identHash))!=null?ee:$.locatorHash)}$.dependencies=new Map(gn($.dependencies,([Ue,Oe])=>St(Oe)))}),Ne.push(()=>{if(!i.has($.locatorHash))return;let ee=u.get(ae.locatorHash),Ue=typeof ee!="undefined"?ee+1:1;u.set(ae.locatorHash,Ue),R(De,$,Ce,{top:W,optional:se}),u.set(ae.locatorHash,Ue-1)}),Pe.push(()=>{let ee=F.dependencies.get(re.identHash);if(typeof ee=="undefined")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let Ue=r.get(ee.descriptorHash);if(typeof Ue=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");if(Pl(m,Ue).add(A.locatorHash),!!i.has($.locatorHash)){for(let Oe of $.peerDependencies.values()){let vt=Ce.get(Oe.identHash);if(typeof vt=="undefined")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");hu(pu(d,vt),St(Oe)).push($.locatorHash)}for(let Oe of G)$.dependencies.delete(Oe)}})}for(let re of[...he,...pe])re();let qe;do{qe=!0;for(let[re,se,be]of D){if(!i.has(be.locatorHash))continue;let ae=pu(h,re.locatorHash),Ae=zi(...[...be.dependencies.values()].map(Ce=>{let ee=Ce.range!=="missing:"?r.get(Ce.descriptorHash):"missing:";if(typeof ee=="undefined")throw new Error(`Assertion failed: Expected the resolution for ${Xt(t.configuration,Ce)} to have been registered`);return ee===W?`${ee} (top)`:ee}),se.identHash),De=ae.get(Ae);if(typeof De=="undefined"){ae.set(Ae,se);continue}if(De===se)continue;qe=!1,i.delete(be.locatorHash),e.delete(se.descriptorHash),r.delete(se.descriptorHash),n.delete(be.locatorHash);let $=p.get(se.descriptorHash)||[],G=[F.locatorHash,...$];p.delete(se.descriptorHash);for(let Ce of G){let ee=i.get(Ce);typeof ee!="undefined"&&ee.dependencies.set(se.identHash,De)}}}while(!qe);for(let re of[...Ne,...Pe])re()};for(let q of t.workspaces){let A=q.anchoredLocator;o.delete(q.anchoredDescriptor.descriptorHash),R(q.anchoredDescriptor,A,new Map,{top:A.locatorHash,optional:!1})}var L;(function(V){V[V.NotProvided=0]="NotProvided",V[V.NotCompatible=1]="NotCompatible"})(L||(L={}));let K=[];for(let[q,A]of m){let V=i.get(q);if(typeof V=="undefined")throw new Error("Assertion failed: Expected the root to be registered");let W=d.get(q);if(typeof W!="undefined")for(let X of A){let F=i.get(X);if(typeof F!="undefined")for(let[D,he]of W){let pe=En(D);if(F.peerDependencies.has(pe.identHash))continue;let Ne=`p${zi(X,D,q).slice(0,5)}`;a.set(Ne,{subject:X,requested:pe,rootRequester:q,allRequesters:he});let Pe=V.dependencies.get(pe.identHash);if(typeof Pe!="undefined"){let qe=b(Pe),re=(ne=qe.version)!=null?ne:"0.0.0",se=new Set;for(let ae of he){let Ae=i.get(ae);if(typeof Ae=="undefined")throw new Error("Assertion failed: Expected the link to be registered");let De=Ae.peerDependencies.get(pe.identHash);if(typeof De=="undefined")throw new Error("Assertion failed: Expected the ident to be registered");se.add(De.range)}[...se].every(ae=>{if(ae.startsWith(Yr.protocol)){if(!t.tryWorkspaceByLocator(qe))return!1;ae=ae.slice(Yr.protocol.length),(ae==="^"||ae==="~")&&(ae="*")}return lc(re,ae)})||K.push({type:1,subject:F,requested:pe,requester:V,version:re,hash:Ne,requirementCount:he.length})}else{let qe=V.peerDependenciesMeta.get(D);(qe==null?void 0:qe.optional)||K.push({type:0,subject:F,requested:pe,requester:V,hash:Ne})}}}}let J=[q=>Rx(q.subject),q=>St(q.requested),q=>`${q.type}`];for(let q of gn(K,J))switch(q.type){case 0:l==null||l.reportWarning(z.MISSING_PEER_DEPENDENCY,`${lt(t.configuration,q.subject)} doesn't provide ${Vr(t.configuration,q.requested)} (${Ve(t.configuration,q.hash,Le.CODE)}), requested by ${Vr(t.configuration,q.requester)}`);break;case 1:{let A=q.requirementCount>1?"and some of its descendants request":"requests";l==null||l.reportWarning(z.INCOMPATIBLE_PEER_DEPENDENCY,`${lt(t.configuration,q.subject)} provides ${Vr(t.configuration,q.requested)} (${Ve(t.configuration,q.hash,Le.CODE)}) with version ${fp(t.configuration,q.version)}, which doesn't satisfy what ${Vr(t.configuration,q.requester)} ${A}`)}break}K.length>0&&(l==null||l.reportWarning(z.UNNAMED,`Some peer dependencies are incorrectly met; run ${Ve(t.configuration,"yarn explain peer-requirements ",Le.CODE)} for details, where ${Ve(t.configuration,"",Le.CODE)} is the six-letter p-prefixed code`))}var Po;(function(l){l.VERSION="version",l.COMMAND_NAME="commandName",l.PLUGIN_NAME="pluginName",l.INSTALL_COUNT="installCount",l.PROJECT_COUNT="projectCount",l.WORKSPACE_COUNT="workspaceCount",l.DEPENDENCY_COUNT="dependencyCount",l.EXTENSION="packageExtension"})(Po||(Po={}));var Rd=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.configuration=e;let i=this.getRegistryPath();this.isNew=!T.existsSync(i),this.sendReport(r),this.startBuffer()}reportVersion(e){this.reportValue(Po.VERSION,e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue(Po.COMMAND_NAME,e||"")}reportPluginName(e){this.reportValue(Po.PLUGIN_NAME,e)}reportProject(e){this.reportEnumerator(Po.PROJECT_COUNT,e)}reportInstall(e){this.reportHit(Po.INSTALL_COUNT,e)}reportPackageExtension(e){this.reportValue(Po.EXTENSION,e)}reportWorkspaceCount(e){this.reportValue(Po.WORKSPACE_COUNT,String(e))}reportDependencyCount(e){this.reportValue(Po.DEPENDENCY_COUNT,String(e))}reportValue(e,r){Pl(this.values,e).add(r)}reportEnumerator(e,r){Pl(this.enumerators,e).add(zi(r))}reportHit(e,r="*"){let i=pu(this.hits,e),n=na(i,r,()=>0);i.set(r,n+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return v.join(e,"telemetry.json")}sendReport(e){var u,g,f;let r=this.getRegistryPath(),i;try{i=T.readJsonSync(r)}catch{i={}}let n=Date.now(),s=this.configuration.get("telemetryInterval")*24*60*60*1e3,a=((u=i.lastUpdate)!=null?u:n+s+Math.floor(s*Math.random()))+s;if(a>n&&i.lastUpdate!=null)return;try{T.mkdirSync(v.dirname(r),{recursive:!0}),T.writeJsonSync(r,{lastUpdate:n})}catch{return}if(a>n||!i.blocks)return;let l=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,c=h=>iP(l,h,{configuration:this.configuration}).catch(()=>{});for(let[h,p]of Object.entries((g=i.blocks)!=null?g:{})){if(Object.keys(p).length===0)continue;let d=p;d.userId=h,d.reportType="primary";for(let B of Object.keys((f=d.enumerators)!=null?f:{}))d.enumerators[B]=d.enumerators[B].length;c(d);let m=new Map,I=20;for(let[B,b]of Object.entries(d.values))b.length>0&&m.set(B,b.slice(0,I));for(;m.size>0;){let B={};B.userId=h,B.reportType="secondary",B.metrics={};for(let[b,R]of m)B.metrics[b]=R.shift(),R.length===0&&m.delete(b);c(B)}}}applyChanges(){var o,a,l,c,u,g,f,h,p;let e=this.getRegistryPath(),r;try{r=T.readJsonSync(e)}catch{r={}}let i=(o=this.configuration.get("telemetryUserId"))!=null?o:"*",n=r.blocks=(a=r.blocks)!=null?a:{},s=n[i]=(l=n[i])!=null?l:{};for(let d of this.hits.keys()){let m=s.hits=(c=s.hits)!=null?c:{},I=m[d]=(u=m[d])!=null?u:{};for(let[B,b]of this.hits.get(d))I[B]=((g=I[B])!=null?g:0)+b}for(let d of["values","enumerators"])for(let m of this[d].keys()){let I=s[d]=(f=s[d])!=null?f:{};I[m]=[...new Set([...(h=I[m])!=null?h:[],...(p=this[d].get(m))!=null?p:[]])]}T.mkdirSync(v.dirname(e),{recursive:!0}),T.writeJsonSync(e,r)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch{}})}};var fF=ie(require("child_process")),R$=ie(ml());var hF=ie(require("fs"));var Yg=new Map([["constraints",[["constraints","query"],["constraints","source"],["constraints"]]],["exec",[]],["interactive-tools",[["search"],["upgrade-interactive"]]],["stage",[["stage"]]],["typescript",[]],["version",[["version","apply"],["version","check"],["version"]]],["workspace-tools",[["workspaces","focus"],["workspaces","foreach"]]]]);function cUe(t){let e=M.fromPortablePath(t);process.on("SIGINT",()=>{}),e?(0,fF.execFileSync)(process.execPath,[e,...process.argv.slice(2)],{stdio:"inherit",env:_(P({},process.env),{YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"})}):(0,fF.execFileSync)(e,process.argv.slice(2),{stdio:"inherit",env:_(P({},process.env),{YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"})})}async function i0({binaryVersion:t,pluginConfiguration:e}){async function r(){let n=new oo({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:t});try{await i(n)}catch(s){process.stdout.write(n.error(s)),process.exitCode=1}}async function i(n){var p,d,m,I,B;let s=process.versions.node,o=">=12 <14 || 14.2 - 14.9 || >14.10.0";if(process.env.YARN_IGNORE_NODE!=="1"&&!qt.satisfiesWithPrereleases(s,o))throw new me(`This tool requires a Node version compatible with ${o} (got ${s}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);let a=await fe.find(M.toPortablePath(process.cwd()),e,{usePath:!0,strict:!1}),l=a.get("yarnPath"),c=a.get("ignorePath"),u=a.get("ignoreCwd"),g=M.toPortablePath(M.resolve(process.argv[1])),f=b=>T.readFilePromise(b).catch(()=>Buffer.of());if(!c&&!u&&await(async()=>l===g||Buffer.compare(...await Promise.all([f(l),f(g)]))===0)()){process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",await i(n);return}else if(l!==null&&!c)if(!T.existsSync(l))process.stdout.write(n.error(new Error(`The "yarn-path" option has been set (in ${a.sources.get("yarnPath")}), but the specified location doesn't exist (${l}).`))),process.exitCode=1;else try{cUe(l)}catch(b){process.exitCode=b.code||1}else{c&&delete process.env.YARN_IGNORE_PATH,a.get("enableTelemetry")&&!R$.isCI&&process.stdout.isTTY&&(fe.telemetry=new Rd(a,"puba9cdc10ec5790a2cf4969dd413a47270")),(p=fe.telemetry)==null||p.reportVersion(t);for(let[L,K]of a.plugins.entries()){Yg.has((m=(d=L.match(/^@yarnpkg\/plugin-(.*)$/))==null?void 0:d[1])!=null?m:"")&&((I=fe.telemetry)==null||I.reportPluginName(L));for(let J of K.commands||[])n.register(J)}let R=n.process(process.argv.slice(2));R.help||(B=fe.telemetry)==null||B.reportCommandName(R.path.join(" "));let H=R.cwd;if(typeof H!="undefined"&&!u){let L=(0,hF.realpathSync)(process.cwd()),K=(0,hF.realpathSync)(H);if(L!==K){process.chdir(H),await r();return}}await n.runExit(R,{cwd:M.toPortablePath(process.cwd()),plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr})}}return r().catch(n=>{process.stdout.write(n.stack||n.message),process.exitCode=1}).finally(()=>T.rmtempPromise())}function F$(t){t.Command.Path=(...e)=>r=>{r.paths=r.paths||[],r.paths.push(e)};for(let e of["Array","Boolean","String","Proxy","Rest","Counter"])t.Command[e]=(...r)=>(i,n)=>{let s=t.Option[e](...r);Object.defineProperty(i,`__${n}`,{configurable:!1,enumerable:!0,get(){return s},set(o){this[n]=o}})};return t}var iC={};it(iC,{BaseCommand:()=>Be,WorkspaceRequiredError:()=>rt,getDynamicLibs:()=>Wie,getPluginConfiguration:()=>F0,main:()=>i0,openWorkspace:()=>rf,pluginCommands:()=>Yg});var Be=class extends ye{constructor(){super(...arguments);this.cwd=Y.String("--cwd",{hidden:!0})}};var rt=class extends me{constructor(e,r){let i=v.relative(e,r),n=v.join(e,Ze.fileName);super(`This command can only be run from within a workspace of your project (${i} isn't a workspace of ${n}).`)}};var dJe=ie(Or());Ss();var CJe=ie(gN()),Wie=()=>new Map([["@yarnpkg/cli",iC],["@yarnpkg/core",Fd],["@yarnpkg/fslib",ch],["@yarnpkg/libzip",Fp],["@yarnpkg/parsers",Hp],["@yarnpkg/shell",jp],["clipanion",vh],["semver",dJe],["typanion",lu],["yup",CJe]]);async function rf(t,e){let{project:r,workspace:i}=await Ke.find(t,e);if(!i)throw new rt(r.cwd,e);return i}var x_e=ie(Or());Ss();var k_e=ie(gN());var hL={};it(hL,{dedupeUtils:()=>zN,default:()=>Qze,suggestUtils:()=>LN});var WAe=ie(ml());var roe=ie(aC());Ss();var LN={};it(LN,{Modifier:()=>Lo,Strategy:()=>Fr,Target:()=>vr,WorkspaceModifier:()=>af,applyModifier:()=>Zse,extractDescriptorFromPath:()=>ON,extractRangeModifier:()=>Xse,fetchDescriptorFrom:()=>MN,findProjectDescriptors:()=>toe,getModifier:()=>AC,getSuggestedDescriptors:()=>lC,makeWorkspaceDescriptor:()=>eoe,toWorkspaceModifier:()=>$se});var TN=ie(Or()),L3e="workspace:",vr;(function(i){i.REGULAR="dependencies",i.DEVELOPMENT="devDependencies",i.PEER="peerDependencies"})(vr||(vr={}));var Lo;(function(i){i.CARET="^",i.TILDE="~",i.EXACT=""})(Lo||(Lo={}));var af;(function(i){i.CARET="^",i.TILDE="~",i.EXACT="*"})(af||(af={}));var Fr;(function(s){s.KEEP="keep",s.REUSE="reuse",s.PROJECT="project",s.LATEST="latest",s.CACHE="cache"})(Fr||(Fr={}));function AC(t,e){return t.exact?Lo.EXACT:t.caret?Lo.CARET:t.tilde?Lo.TILDE:e.configuration.get("defaultSemverRangePrefix")}var T3e=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function Xse(t,{project:e}){let r=t.match(T3e);return r?r[1]:e.configuration.get("defaultSemverRangePrefix")}function Zse(t,e){let{protocol:r,source:i,params:n,selector:s}=S.parseRange(t.range);return TN.default.valid(s)&&(s=`${e}${t.range}`),S.makeDescriptor(t,S.makeRange({protocol:r,source:i,params:n,selector:s}))}function $se(t){switch(t){case Lo.CARET:return af.CARET;case Lo.TILDE:return af.TILDE;case Lo.EXACT:return af.EXACT;default:throw new Error(`Assertion failed: Unknown modifier: "${t}"`)}}function eoe(t,e){return S.makeDescriptor(t.anchoredDescriptor,`${L3e}${$se(e)}`)}async function toe(t,{project:e,target:r}){let i=new Map,n=s=>{let o=i.get(s.descriptorHash);return o||i.set(s.descriptorHash,o={descriptor:s,locators:[]}),o};for(let s of e.workspaces)if(r===vr.PEER){let o=s.manifest.peerDependencies.get(t.identHash);o!==void 0&&n(o).locators.push(s.locator)}else{let o=s.manifest.dependencies.get(t.identHash),a=s.manifest.devDependencies.get(t.identHash);r===vr.DEVELOPMENT?a!==void 0?n(a).locators.push(s.locator):o!==void 0&&n(o).locators.push(s.locator):o!==void 0?n(o).locators.push(s.locator):a!==void 0&&n(a).locators.push(s.locator)}return i}async function ON(t,{cwd:e,workspace:r}){return await M3e(async i=>{v.isAbsolute(t)||(t=v.relative(r.cwd,v.resolve(e,t)),t.match(/^\.{0,2}\//)||(t=`./${t}`));let{project:n}=r,s=await MN(S.makeIdent(null,"archive"),t,{project:r.project,cache:i,workspace:r});if(!s)throw new Error("Assertion failed: The descriptor should have been found");let o=new ei,a=n.configuration.makeResolver(),l=n.configuration.makeFetcher(),c={checksums:n.storedChecksums,project:n,cache:i,fetcher:l,report:o,resolver:a},u=a.bindDescriptor(s,r.anchoredLocator,c),g=S.convertDescriptorToLocator(u),f=await l.fetch(g,c),h=await Ze.find(f.prefixPath,{baseFs:f.packageFs});if(!h.name)throw new Error("Target path doesn't have a name");return S.makeDescriptor(h.name,t)})}async function lC(t,{project:e,workspace:r,cache:i,target:n,modifier:s,strategies:o,maxResults:a=Infinity}){if(!(a>=0))throw new Error(`Invalid maxResults (${a})`);if(t.range!=="unknown")return{suggestions:[{descriptor:t,name:`Use ${S.prettyDescriptor(e.configuration,t)}`,reason:"(unambiguous explicit request)"}],rejections:[]};let l=typeof r!="undefined"&&r!==null&&r.manifest[n].get(t.identHash)||null,c=[],u=[],g=async f=>{try{await f()}catch(h){u.push(h)}};for(let f of o){if(c.length>=a)break;switch(f){case Fr.KEEP:await g(async()=>{l&&c.push({descriptor:l,name:`Keep ${S.prettyDescriptor(e.configuration,l)}`,reason:"(no changes)"})});break;case Fr.REUSE:await g(async()=>{for(let{descriptor:h,locators:p}of(await toe(t,{project:e,target:n})).values()){if(p.length===1&&p[0].locatorHash===r.anchoredLocator.locatorHash&&o.includes(Fr.KEEP))continue;let d=`(originally used by ${S.prettyLocator(e.configuration,p[0])}`;d+=p.length>1?` and ${p.length-1} other${p.length>2?"s":""})`:")",c.push({descriptor:h,name:`Reuse ${S.prettyDescriptor(e.configuration,h)}`,reason:d})}});break;case Fr.CACHE:await g(async()=>{for(let h of e.storedDescriptors.values())h.identHash===t.identHash&&c.push({descriptor:h,name:`Reuse ${S.prettyDescriptor(e.configuration,h)}`,reason:"(already used somewhere in the lockfile)"})});break;case Fr.PROJECT:await g(async()=>{if(r.manifest.name!==null&&t.identHash===r.manifest.name.identHash)return;let h=e.tryWorkspaceByIdent(t);if(h===null)return;let p=eoe(h,s);c.push({descriptor:p,name:`Attach ${S.prettyDescriptor(e.configuration,p)}`,reason:`(local workspace at ${ue.pretty(e.configuration,h.relativeCwd,ue.Type.PATH)})`})});break;case Fr.LATEST:await g(async()=>{if(t.range!=="unknown")c.push({descriptor:t,name:`Use ${S.prettyRange(e.configuration,t.range)}`,reason:"(explicit range requested)"});else if(n===vr.PEER)c.push({descriptor:S.makeDescriptor(t,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(!e.configuration.get("enableNetwork"))c.push({descriptor:null,name:"Resolve from latest",reason:ue.pretty(e.configuration,"(unavailable because enableNetwork is toggled off)","grey")});else{let h=await MN(t,"latest",{project:e,cache:i,workspace:r,preserveModifier:!1});h&&(h=Zse(h,s),c.push({descriptor:h,name:`Use ${S.prettyDescriptor(e.configuration,h)}`,reason:"(resolved from latest)"}))}});break}}return{suggestions:c.slice(0,a),rejections:u.slice(0,a)}}async function MN(t,e,{project:r,cache:i,workspace:n,preserveModifier:s=!0}){let o=S.makeDescriptor(t,e),a=new ei,l=r.configuration.makeFetcher(),c=r.configuration.makeResolver(),u={project:r,fetcher:l,cache:i,checksums:r.storedChecksums,report:a,cacheOptions:{skipIntegrityCheck:!0},skipIntegrityCheck:!0},g=_(P({},u),{resolver:c,fetchOptions:u}),f=c.bindDescriptor(o,n.anchoredLocator,g),h=await c.getCandidates(f,new Map,g);if(h.length===0)return null;let p=h[0],{protocol:d,source:m,params:I,selector:B}=S.parseRange(S.convertToManifestRange(p.reference));if(d===r.configuration.get("defaultProtocol")&&(d=null),TN.default.valid(B)&&s!==!1){let b=typeof s=="string"?s:o.range;B=Xse(b,{project:r})+B}return S.makeDescriptor(p,S.makeRange({protocol:d,source:m,params:I,selector:B}))}async function M3e(t){return await T.mktempPromise(async e=>{let r=fe.create(e);return r.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await t(new Qt(e,{configuration:r,check:!1,immutable:!1}))})}var cC=class extends Be{constructor(){super(...arguments);this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.exact=Y.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=Y.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=Y.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.dev=Y.Boolean("-D,--dev",!1,{description:"Add a package as a dev dependency"});this.peer=Y.Boolean("-P,--peer",!1,{description:"Add a package as a peer dependency"});this.optional=Y.Boolean("-O,--optional",!1,{description:"Add / upgrade a package to an optional regular / peer dependency"});this.preferDev=Y.Boolean("--prefer-dev",!1,{description:"Add / upgrade a package to a dev dependency"});this.interactive=Y.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"});this.cached=Y.Boolean("--cached",!1,{description:"Reuse the highest version already used somewhere within the project"});this.mode=Y.String("--mode",{description:"Change what artifacts installs generate",validator:Yi(li)});this.silent=Y.Boolean("--silent",{hidden:!0});this.packages=Y.Rest()}async execute(){var d;let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=(d=this.interactive)!=null?d:e.get("preferInteractive"),o=AC(this,r),a=[...s?[Fr.REUSE]:[],Fr.PROJECT,...this.cached?[Fr.CACHE]:[],Fr.LATEST],l=s?Infinity:1,c=await Promise.all(this.packages.map(async m=>{let I=m.match(/^\.{0,2}\//)?await ON(m,{cwd:this.context.cwd,workspace:i}):S.parseDescriptor(m),B=O3e(i,I,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional}),b=await lC(I,{project:r,workspace:i,cache:n,target:B,modifier:o,strategies:a,maxResults:l});return[I,b,B]})),u=await Fa.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async m=>{for(let[I,{suggestions:B,rejections:b}]of c)if(B.filter(H=>H.descriptor!==null).length===0){let[H]=b;if(typeof H=="undefined")throw new Error("Assertion failed: Expected an error to have been set");r.configuration.get("enableNetwork")?m.reportError(z.CANT_SUGGEST_RESOLUTIONS,`${S.prettyDescriptor(e,I)} can't be resolved to a satisfying range`):m.reportError(z.CANT_SUGGEST_RESOLUTIONS,`${S.prettyDescriptor(e,I)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),m.reportSeparator(),m.reportExceptionOnce(H)}});if(u.hasErrors())return u.exitCode();let g=!1,f=[],h=[];for(let[,{suggestions:m},I]of c){let B,b=m.filter(K=>K.descriptor!==null),R=b[0].descriptor,H=b.every(K=>S.areDescriptorsEqual(K.descriptor,R));b.length===1||H?B=R:(g=!0,{answer:B}=await(0,roe.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:m.map(({descriptor:K,name:J,reason:ne})=>K?{name:J,hint:ne,descriptor:K}:{name:J,hint:ne,disabled:!0}),onCancel:()=>process.exit(130),result(K){return this.find(K,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let L=i.manifest[I].get(B.identHash);(typeof L=="undefined"||L.descriptorHash!==B.descriptorHash)&&(i.manifest[I].set(B.identHash,B),this.optional&&(I==="dependencies"?i.manifest.ensureDependencyMeta(_(P({},B),{range:"unknown"})).optional=!0:I==="peerDependencies"&&(i.manifest.ensurePeerDependencyMeta(_(P({},B),{range:"unknown"})).optional=!0)),typeof L=="undefined"?f.push([i,I,B,a]):h.push([i,I,L,B]))}return await e.triggerMultipleHooks(m=>m.afterWorkspaceDependencyAddition,f),await e.triggerMultipleHooks(m=>m.afterWorkspaceDependencyReplacement,h),g&&this.context.stdout.write(` -`),(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async m=>{await r.install({cache:n,report:m,mode:this.mode})})).exitCode()}};cC.paths=[["add"]],cC.usage=ye.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\": { \"\": { \"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=` 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 later 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/features/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"]]});var ioe=cC;function O3e(t,e,{dev:r,peer:i,preferDev:n,optional:s}){let o=t.manifest[vr.REGULAR].has(e.identHash),a=t.manifest[vr.DEVELOPMENT].has(e.identHash),l=t.manifest[vr.PEER].has(e.identHash);if((r||i)&&o)throw new me(`Package "${S.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&&!i&&l)throw new me(`Package "${S.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(s&&a)throw new me(`Package "${S.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(s&&!i&&l)throw new me(`Package "${S.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||n)&&s)throw new me(`Package "${S.prettyIdent(t.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);return i?vr.PEER:r||n?vr.DEVELOPMENT:o?vr.REGULAR:a?vr.DEVELOPMENT:vr.REGULAR}var uC=class extends Be{constructor(){super(...arguments);this.verbose=Y.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=Y.String({required:!1})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,locator:i}=await Ke.find(e,this.context.cwd);if(await r.restoreInstallState(),this.name){let o=(await Kt.getPackageAccessibleBinaries(i,{project:r})).get(this.name);if(!o)throw new me(`Couldn't find a binary named "${this.name}" for package "${S.prettyLocator(e,i)}"`);let[,a]=o;return this.context.stdout.write(`${a} -`),0}return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{let o=await Kt.getPackageAccessibleBinaries(i,{project:r}),l=Array.from(o.keys()).reduce((c,u)=>Math.max(c,u.length),0);for(let[c,[u,g]]of o)s.reportJson({name:c,source:S.stringifyIdent(u),path:g});if(this.verbose)for(let[c,[u]]of o)s.reportInfo(null,`${c.padEnd(l," ")} ${S.prettyLocator(e,u)}`);else for(let c of o.keys())s.reportInfo(null,c)})).exitCode()}};uC.paths=[["bin"]],uC.usage=ye.Usage({description:"get the path to a binary script",details:` - 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. - - 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. - `,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});var noe=uC;var gC=class extends Be{constructor(){super(...arguments);this.mirror=Y.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=Y.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r=await Qt.find(e);return(await Fe.start({configuration:e,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&r.mirrorCwd!==null,s=!this.mirror;n&&(await T.removePromise(r.mirrorCwd),await e.triggerHook(o=>o.cleanGlobalArtifacts,e)),s&&await T.removePromise(r.cwd)})).exitCode()}};gC.paths=[["cache","clean"],["cache","clear"]],gC.usage=ye.Usage({description:"remove the shared cache files",details:` - This command will remove all the files from the cache. - `,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});var soe=gC;var ooe=ie(p0()),KN=ie(require("util")),fC=class extends Be{constructor(){super(...arguments);this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=Y.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r=this.name.replace(/[.[].*$/,""),i=this.name.replace(/^[^.[]*/,"");if(typeof e.settings.get(r)=="undefined")throw new me(`Couldn't find a configuration settings named "${r}"`);let s=e.getSpecial(r,{hideSecrets:!this.unsafe,getNativePaths:!0}),o=de.convertMapsToIndexableObjects(s),a=i?(0,ooe.default)(o,i):o,l=await Fe.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async c=>{c.reportJson(a)});if(!this.json){if(typeof a=="string")return this.context.stdout.write(`${a} -`),l.exitCode();KN.inspect.styles.name="cyan",this.context.stdout.write(`${(0,KN.inspect)(a,{depth:Infinity,colors:e.get("enableColors"),compact:!1})} -`)}return l.exitCode()}};fC.paths=[["config","get"]],fC.usage=ye.Usage({description:"read a configuration settings",details:` - This command will print a configuration setting. - - 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. - `,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"]]});var aoe=fC;var Eae=ie(qN()),Iae=ie(p0()),yae=ie(mae()),JN=ie(require("util")),pC=class extends Be{constructor(){super(...arguments);this.json=Y.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=Y.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=Y.String();this.value=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r=()=>{if(!e.projectCwd)throw new me("This command must be run from within a project folder");return e.projectCwd},i=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(i)=="undefined")throw new me(`Couldn't find a configuration settings named "${i}"`);if(i==="enableStrictSettings")throw new me("This setting only affects the file it's in, and thus cannot be set from the CLI");let o=this.json?JSON.parse(this.value):this.value;await(this.home?h=>fe.updateHomeConfiguration(h):h=>fe.updateConfiguration(r(),h))(h=>{if(n){let p=(0,Eae.default)(h);return(0,yae.default)(p,this.name,o),p}else return _(P({},h),{[i]:o})});let c=(await fe.find(this.context.cwd,this.context.plugins)).getSpecial(i,{hideSecrets:!0,getNativePaths:!0}),u=de.convertMapsToIndexableObjects(c),g=n?(0,Iae.default)(u,n):u;return(await Fe.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async h=>{JN.inspect.styles.name="cyan",h.reportInfo(z.UNNAMED,`Successfully set ${this.name} to ${(0,JN.inspect)(g,{depth:Infinity,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}};pC.paths=[["config","set"]],pC.usage=ye.Usage({description:"change a configuration settings",details:` - This command will set a configuration setting. - - When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean). - - When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects. - `,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"`]]});var wae=pC;var Dae=ie(qN()),Rae=ie(Ld()),Fae=ie(Pae()),dC=class extends Be{constructor(){super(...arguments);this.home=Y.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r=()=>{if(!e.projectCwd)throw new me("This command must be run from within a project folder");return e.projectCwd},i=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(i)=="undefined")throw new me(`Couldn't find a configuration settings named "${i}"`);let o=this.home?l=>fe.updateHomeConfiguration(l):l=>fe.updateConfiguration(r(),l);return(await Fe.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async l=>{let c=!1;await o(u=>{if(!(0,Rae.default)(u,this.name))return l.reportWarning(z.UNNAMED,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),c=!0,u;let g=n?(0,Dae.default)(u):P({},u);return(0,Fae.default)(g,this.name),g}),c||l.reportInfo(z.UNNAMED,`Successfully unset ${this.name}`)})).exitCode()}};dC.paths=[["config","unset"]],dC.usage=ye.Usage({description:"unset a configuration setting",details:` - This command will unset a configuration setting. - `,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"]]});var Nae=dC;var WN=ie(require("util")),CC=class extends Be{constructor(){super(...arguments);this.verbose=Y.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=Y.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{if(e.invalid.size>0&&!this.json){for(let[n,s]of e.invalid)i.reportError(z.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${n}" in ${s}`);i.reportSeparator()}if(this.json){let n=de.sortMap(e.settings.keys(),s=>s);for(let s of n){let o=e.settings.get(s),a=e.getSpecial(s,{hideSecrets:!0,getNativePaths:!0}),l=e.sources.get(s);this.verbose?i.reportJson({key:s,effective:a,source:l}):i.reportJson(P({key:s,effective:a,source:l},o))}}else{let n=de.sortMap(e.settings.keys(),a=>a),s=n.reduce((a,l)=>Math.max(a,l.length),0),o={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let a=n.map(c=>{let u=e.settings.get(c);if(!u)throw new Error(`Assertion failed: This settings ("${c}") should have been registered`);let g=this.why?e.sources.get(c)||"":u.description;return[c,g]}),l=a.reduce((c,[,u])=>Math.max(c,u.length),0);for(let[c,u]of a)i.reportInfo(null,`${c.padEnd(s," ")} ${u.padEnd(l," ")} ${(0,WN.inspect)(e.getSpecial(c,{hideSecrets:!0,getNativePaths:!0}),o)}`)}else for(let a of n)i.reportInfo(null,`${a.padEnd(s," ")} ${(0,WN.inspect)(e.getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),o)}`)}})).exitCode()}};CC.paths=[["config"]],CC.usage=ye.Usage({description:"display the current configuration",details:` - This command prints the current active configuration settings. - `,examples:[["Print the active configuration settings","$0 config"]]});var Lae=CC;Ss();var zN={};it(zN,{Strategy:()=>Oc,acceptedStrategies:()=>H4e,dedupe:()=>VN});var Tae=ie(Nn()),Oc;(function(e){e.HIGHEST="highest"})(Oc||(Oc={}));var H4e=new Set(Object.values(Oc)),G4e={highest:async(t,e,{resolver:r,fetcher:i,resolveOptions:n,fetchOptions:s})=>{let o=new Map;for(let[a,l]of t.storedResolutions){let c=t.storedDescriptors.get(a);if(typeof c=="undefined")throw new Error(`Assertion failed: The descriptor (${a}) should have been registered`);de.getSetWithDefault(o,c.identHash).add(l)}return Array.from(t.storedDescriptors.values(),async a=>{if(e.length&&!Tae.default.isMatch(S.stringifyIdent(a),e))return null;let l=t.storedResolutions.get(a.descriptorHash);if(typeof l=="undefined")throw new Error(`Assertion failed: The resolution (${a.descriptorHash}) should have been registered`);let c=t.originalPackages.get(l);if(typeof c=="undefined"||!r.shouldPersistResolution(c,n))return null;let u=o.get(a.identHash);if(typeof u=="undefined")throw new Error(`Assertion failed: The resolutions (${a.identHash}) should have been registered`);if(u.size===1)return null;let g=[...u].map(m=>{let I=t.originalPackages.get(m);if(typeof I=="undefined")throw new Error(`Assertion failed: The package (${m}) should have been registered`);return I.reference}),f=await r.getSatisfying(a,g,n),h=f==null?void 0:f[0];if(typeof h=="undefined")return null;let p=h.locatorHash,d=t.originalPackages.get(p);if(typeof d=="undefined")throw new Error(`Assertion failed: The package (${p}) should have been registered`);return p===l?null:{descriptor:a,currentPackage:c,updatedPackage:d}})}};async function VN(t,{strategy:e,patterns:r,cache:i,report:n}){let{configuration:s}=t,o=new ei,a=s.makeResolver(),l=s.makeFetcher(),c={cache:i,checksums:t.storedChecksums,fetcher:l,project:t,report:o,skipIntegrityCheck:!0,cacheOptions:{skipIntegrityCheck:!0}},u={project:t,resolver:a,report:o,fetchOptions:c};return await n.startTimerPromise("Deduplication step",async()=>{let f=await G4e[e](t,r,{resolver:a,resolveOptions:u,fetcher:l,fetchOptions:c}),h=Xi.progressViaCounter(f.length);n.reportProgress(h);let p=0;await Promise.all(f.map(I=>I.then(B=>{if(B===null)return;p++;let{descriptor:b,currentPackage:R,updatedPackage:H}=B;n.reportInfo(z.UNNAMED,`${S.prettyDescriptor(s,b)} can be deduped from ${S.prettyLocator(s,R)} to ${S.prettyLocator(s,H)}`),n.reportJson({descriptor:S.stringifyDescriptor(b),currentResolution:S.stringifyLocator(R),updatedResolution:S.stringifyLocator(H)}),t.storedResolutions.set(b.descriptorHash,H.locatorHash)}).finally(()=>h.tick())));let d;switch(p){case 0:d="No packages";break;case 1:d="One package";break;default:d=`${p} packages`}let m=ue.pretty(s,e,ue.Type.CODE);return n.reportInfo(z.UNNAMED,`${d} can be deduped using the ${m} strategy`),p})}var mC=class extends Be{constructor(){super(...arguments);this.strategy=Y.String("-s,--strategy",Oc.HIGHEST,{description:"The strategy to use when deduping dependencies",validator:Yi(Oc)});this.check=Y.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=Y.String("--mode",{description:"Change what artifacts installs generate",validator:Yi(li)});this.patterns=Y.Rest()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r}=await Ke.find(e,this.context.cwd),i=await Qt.find(e);await r.restoreInstallState({restoreResolutions:!1});let n=0,s=await Fe.start({configuration:e,includeFooter:!1,stdout:this.context.stdout,json:this.json},async o=>{n=await VN(r,{strategy:this.strategy,patterns:this.patterns,cache:i,report:o})});return s.hasErrors()?s.exitCode():this.check?n?1:0:(await Fe.start({configuration:e,stdout:this.context.stdout,json:this.json},async a=>{await r.install({cache:i,report:a,mode:this.mode})})).exitCode()}};mC.paths=[["dedupe"]],mC.usage=ye.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=` 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 later 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"]]});var Mae=mC;var Y0=class extends Be{async execute(){let{plugins:e}=await fe.find(this.context.cwd,this.context.plugins),r=[];for(let o of e){let{commands:a}=o[1];if(a){let c=oo.from(a).definitions();r.push([o[0],c])}}let i=this.cli.definitions(),n=(o,a)=>o.split(" ").slice(1).join()===a.split(" ").slice(1).join(),s=Kae()["@yarnpkg/builder"].bundles.standard;for(let o of r){let a=o[1];for(let l of a)i.find(c=>n(c.path,l.path)).plugin={name:o[0],isDefault:s.includes(o[0])}}this.context.stdout.write(`${JSON.stringify(i,null,2)} -`)}};Y0.paths=[["--clipanion=definitions"]];var Uae=Y0;var q0=class extends Be{async execute(){this.context.stdout.write(this.cli.usage(null))}};q0.paths=[["help"],["--help"],["-h"]];var Hae=q0;var _N=class extends Be{constructor(){super(...arguments);this.leadingArgument=Y.String();this.args=Y.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!S.tryParseIdent(this.leadingArgument)){let e=v.resolve(this.context.cwd,M.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}},Gae=_N;var J0=class extends Be{async execute(){this.context.stdout.write(`${Zr||""} -`)}};J0.paths=[["-v"],["--version"]];var jae=J0;var EC=class extends Be{constructor(){super(...arguments);this.commandName=Y.String();this.args=Y.Proxy()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,locator:i}=await Ke.find(e,this.context.cwd);return await r.restoreInstallState(),await Kt.executePackageShellcode(i,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:r})}};EC.paths=[["exec"]],EC.usage=ye.Usage({description:"execute a shell script",details:` - This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell. - - 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). - `,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});var Yae=EC;Ss();var IC=class extends Be{constructor(){super(...arguments);this.hash=Y.String({required:!1,validator:fv(gv(),[hv(/^p[0-9a-f]{5}$/)])})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r}=await Ke.find(e,this.context.cwd);return await r.restoreInstallState({restoreResolutions:!1}),await r.applyLightResolution(),typeof this.hash!="undefined"?await j4e(this.hash,r,{stdout:this.context.stdout}):(await Fe.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async n=>{var o;let s=[([,a])=>S.stringifyLocator(r.storedPackages.get(a.subject)),([,a])=>S.stringifyIdent(a.requested)];for(let[a,l]of de.sortMap(r.peerRequirements,s)){let c=r.storedPackages.get(l.subject);if(typeof c=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let u=r.storedPackages.get(l.rootRequester);if(typeof u=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let g=(o=c.dependencies.get(l.requested.identHash))!=null?o:null,f=ue.pretty(e,a,ue.Type.CODE),h=S.prettyLocator(e,c),p=S.prettyIdent(e,l.requested),d=S.prettyIdent(e,u),m=l.allRequesters.length-1,I=`descendant${m===1?"":"s"}`,B=m>0?` and ${m} ${I}`:"",b=g!==null?"provides":"doesn't provide";n.reportInfo(null,`${f} \u2192 ${h} ${b} ${p} to ${d}${B}`)}})).exitCode()}};IC.paths=[["explain","peer-requirements"]],IC.usage=ye.Usage({description:"explain a set of peer requirements",details:` - A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants. - - When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not. - - When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set. - - **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\`). - `,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});var qae=IC;async function j4e(t,e,r){let{configuration:i}=e,n=e.peerRequirements.get(t);if(typeof n=="undefined")throw new Error(`No peerDependency requirements found for hash: "${t}"`);return(await Fe.start({configuration:i,stdout:r.stdout,includeFooter:!1},async o=>{var I,B;let a=e.storedPackages.get(n.subject);if(typeof a=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let l=e.storedPackages.get(n.rootRequester);if(typeof l=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let c=(I=a.dependencies.get(n.requested.identHash))!=null?I:null,u=c!==null?e.storedResolutions.get(c.descriptorHash):null;if(typeof u=="undefined")throw new Error("Assertion failed: Expected the resolution to have been registered");let g=u!==null?e.storedPackages.get(u):null;if(typeof g=="undefined")throw new Error("Assertion failed: Expected the provided package to have been registered");let f=[...n.allRequesters.values()].map(b=>{let R=e.storedPackages.get(b);if(typeof R=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let H=S.devirtualizeLocator(R),L=e.storedPackages.get(H.locatorHash);if(typeof L=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let K=L.peerDependencies.get(n.requested.identHash);if(typeof K=="undefined")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:R,peerDependency:K}});if(g!==null){let b=f.every(({peerDependency:R})=>qt.satisfiesWithPrereleases(g.version,R.range));o.reportInfo(z.UNNAMED,`${S.prettyLocator(i,a)} provides ${S.prettyLocator(i,g)} with version ${S.prettyReference(i,(B=g.version)!=null?B:"")}, which ${b?"satisfies":"doesn't satisfy"} the following requirements:`)}else o.reportInfo(z.UNNAMED,`${S.prettyLocator(i,a)} doesn't provide ${S.prettyIdent(i,n.requested)}, breaking the following requirements:`);o.reportSeparator();let h=ue.mark(i),p=[];for(let{pkg:b,peerDependency:R}of de.sortMap(f,H=>S.stringifyLocator(H.pkg))){let L=(g!==null?qt.satisfiesWithPrereleases(g.version,R.range):!1)?h.Check:h.Cross;p.push({stringifiedLocator:S.stringifyLocator(b),prettyLocator:S.prettyLocator(i,b),prettyRange:S.prettyRange(i,R.range),mark:L})}let d=Math.max(...p.map(({stringifiedLocator:b})=>b.length)),m=Math.max(...p.map(({prettyRange:b})=>b.length));for(let{stringifiedLocator:b,prettyLocator:R,prettyRange:H,mark:L}of de.sortMap(p,({stringifiedLocator:K})=>K))o.reportInfo(null,`${R.padEnd(d+(R.length-b.length)," ")} \u2192 ${H.padEnd(m," ")} ${L}`);p.length>1&&(o.reportSeparator(),o.reportInfo(z.UNNAMED,`Note: these requirements start with ${S.prettyLocator(e.configuration,l)}`))})).exitCode()}var Jae=ie(Nn()),yC=class extends Be{constructor(){super(...arguments);this.all=Y.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=Y.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=Y.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=Y.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=Y.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=Y.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=Y.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=Y.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=Y.Rest()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i&&!this.all)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState();let s=new Set(this.extra);this.cache&&s.add("cache"),this.dependents&&s.add("dependents"),this.manifest&&s.add("manifest");let o=(b,{recursive:R})=>{let H=b.anchoredLocator.locatorHash,L=new Map,K=[H];for(;K.length>0;){let J=K.shift();if(L.has(J))continue;let ne=r.storedPackages.get(J);if(typeof ne=="undefined")throw new Error("Assertion failed: Expected the package to be registered");if(L.set(J,ne),S.isVirtualLocator(ne)&&K.push(S.devirtualizeLocator(ne).locatorHash),!(!R&&J!==H))for(let q of ne.dependencies.values()){let A=r.storedResolutions.get(q.descriptorHash);if(typeof A=="undefined")throw new Error("Assertion failed: Expected the resolution to be registered");K.push(A)}}return L.values()},a=({recursive:b})=>{let R=new Map;for(let H of r.workspaces)for(let L of o(H,{recursive:b}))R.set(L.locatorHash,L);return R.values()},l=({all:b,recursive:R})=>b&&R?r.storedPackages.values():b?a({recursive:R}):o(i,{recursive:R}),c=({all:b,recursive:R})=>{let H=l({all:b,recursive:R}),L=this.patterns.map(ne=>{let q=S.parseLocator(ne),A=Jae.default.makeRe(S.stringifyIdent(q)),V=S.isVirtualLocator(q),W=V?S.devirtualizeLocator(q):q;return X=>{let F=S.stringifyIdent(X);if(!A.test(F))return!1;if(q.reference==="unknown")return!0;let D=S.isVirtualLocator(X),he=D?S.devirtualizeLocator(X):X;return!(V&&D&&q.reference!==X.reference||W.reference!==he.reference)}}),K=de.sortMap([...H],ne=>S.stringifyLocator(ne));return{selection:K.filter(ne=>L.length===0||L.some(q=>q(ne))),sortedLookup:K}},{selection:u,sortedLookup:g}=c({all:this.all,recursive:this.recursive});if(u.length===0)throw new me("No package matched your request");let f=new Map;if(this.dependents)for(let b of g)for(let R of b.dependencies.values()){let H=r.storedResolutions.get(R.descriptorHash);if(typeof H=="undefined")throw new Error("Assertion failed: Expected the resolution to be registered");de.getArrayWithDefault(f,H).push(b)}let h=new Map;for(let b of g){if(!S.isVirtualLocator(b))continue;let R=S.devirtualizeLocator(b);de.getArrayWithDefault(h,R.locatorHash).push(b)}let p={},d={children:p},m=e.makeFetcher(),I={project:r,fetcher:m,cache:n,checksums:r.storedChecksums,report:new ei,cacheOptions:{skipIntegrityCheck:!0},skipIntegrityCheck:!0},B=[async(b,R,H)=>{var J,ne;if(!R.has("manifest"))return;let L=await m.fetch(b,I),K;try{K=await Ze.find(L.prefixPath,{baseFs:L.packageFs})}finally{(J=L.releaseFs)==null||J.call(L)}H("Manifest",{License:ue.tuple(ue.Type.NO_HINT,K.license),Homepage:ue.tuple(ue.Type.URL,(ne=K.raw.homepage)!=null?ne:null)})},async(b,R,H)=>{var A;if(!R.has("cache"))return;let L={mockedPackages:r.disabledLocators,unstablePackages:r.conditionalLocators},K=(A=r.storedChecksums.get(b.locatorHash))!=null?A:null,J=n.getLocatorPath(b,K,L),ne;if(J!==null)try{ne=T.statSync(J)}catch{}let q=typeof ne!="undefined"?[ne.size,ue.Type.SIZE]:void 0;H("Cache",{Checksum:ue.tuple(ue.Type.NO_HINT,K),Path:ue.tuple(ue.Type.PATH,J),Size:q})}];for(let b of u){let R=S.isVirtualLocator(b);if(!this.virtuals&&R)continue;let H={},L={value:[b,ue.Type.LOCATOR],children:H};if(p[S.stringifyLocator(b)]=L,this.nameOnly){delete L.children;continue}let K=h.get(b.locatorHash);typeof K!="undefined"&&(H.Instances={label:"Instances",value:ue.tuple(ue.Type.NUMBER,K.length)}),H.Version={label:"Version",value:ue.tuple(ue.Type.NO_HINT,b.version)};let J=(q,A)=>{let V={};if(H[q]=V,Array.isArray(A))V.children=A.map(W=>({value:W}));else{let W={};V.children=W;for(let[X,F]of Object.entries(A))typeof F!="undefined"&&(W[X]={label:X,value:F})}};if(!R){for(let q of B)await q(b,s,J);await e.triggerHook(q=>q.fetchPackageInfo,b,s,J)}b.bin.size>0&&!R&&J("Exported Binaries",[...b.bin.keys()].map(q=>ue.tuple(ue.Type.PATH,q)));let ne=f.get(b.locatorHash);typeof ne!="undefined"&&ne.length>0&&J("Dependents",ne.map(q=>ue.tuple(ue.Type.LOCATOR,q))),b.dependencies.size>0&&!R&&J("Dependencies",[...b.dependencies.values()].map(q=>{var W;let A=r.storedResolutions.get(q.descriptorHash),V=typeof A!="undefined"&&(W=r.storedPackages.get(A))!=null?W:null;return ue.tuple(ue.Type.RESOLUTION,{descriptor:q,locator:V})})),b.peerDependencies.size>0&&R&&J("Peer dependencies",[...b.peerDependencies.values()].map(q=>{var X,F;let A=b.dependencies.get(q.identHash),V=typeof A!="undefined"&&(X=r.storedResolutions.get(A.descriptorHash))!=null?X:null,W=V!==null&&(F=r.storedPackages.get(V))!=null?F:null;return ue.tuple(ue.Type.RESOLUTION,{descriptor:q,locator:W})}))}Hs.emitTree(d,{configuration:e,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};yC.paths=[["info"]],yC.usage=ye.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"]]});var Wae=yC;var W0=ie(ml());Ss();var wC=class extends Be{constructor(){super(...arguments);this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.immutable=Y.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"});this.immutableCache=Y.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"});this.checkCache=Y.Boolean("--check-cache",!1,{description:"Always refetch the packages and ensure that their checksums are consistent"});this.inlineBuilds=Y.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"});this.mode=Y.String("--mode",{description:"Change what artifacts installs generate",validator:Yi(li)});this.cacheFolder=Y.String("--cache-folder",{hidden:!0});this.frozenLockfile=Y.Boolean("--frozen-lockfile",{hidden:!0});this.ignoreEngines=Y.Boolean("--ignore-engines",{hidden:!0});this.nonInteractive=Y.Boolean("--non-interactive",{hidden:!0});this.preferOffline=Y.Boolean("--prefer-offline",{hidden:!0});this.production=Y.Boolean("--production",{hidden:!0});this.registry=Y.String("--registry",{hidden:!0});this.silent=Y.Boolean("--silent",{hidden:!0});this.networkTimeout=Y.String("--network-timeout",{hidden:!0})}async execute(){var c;let e=await fe.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds!="undefined"&&e.useWithSource("",{enableInlineBuilds:this.inlineBuilds},e.startingCwd,{overwrite:!0});let r=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,i=async(u,{error:g})=>{let f=await Fe.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async h=>{g?h.reportError(z.DEPRECATED_CLI_SETTINGS,u):h.reportWarning(z.DEPRECATED_CLI_SETTINGS,u)});return f.hasErrors()?f.exitCode():null};if(typeof this.ignoreEngines!="undefined"){let u=await i("The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",{error:!W0.default.VERCEL});if(u!==null)return u}if(typeof this.registry!="undefined"){let u=await i("The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file",{error:!1});if(u!==null)return u}if(typeof this.preferOffline!="undefined"){let u=await i("The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",{error:!W0.default.VERCEL});if(u!==null)return u}if(typeof this.production!="undefined"){let u=await i("The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",{error:!0});if(u!==null)return u}if(typeof this.nonInteractive!="undefined"){let u=await i("The --non-interactive option is deprecated",{error:!r});if(u!==null)return u}if(typeof this.frozenLockfile!="undefined"&&(await i("The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",{error:!1}),this.immutable=this.frozenLockfile),typeof this.cacheFolder!="undefined"){let u=await i("The cache-folder option has been deprecated; use rc settings instead",{error:!W0.default.NETLIFY});if(u!==null)return u}let n=(c=this.immutable)!=null?c:e.get("enableImmutableInstalls");if(e.projectCwd!==null){let u=await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout,includeFooter:!1},async g=>{await Y4e(e,n)&&(g.reportInfo(z.AUTOMERGE_SUCCESS,"Automatically fixed merge conflicts \u{1F44D}"),g.reportSeparator())});if(u.hasErrors())return u.exitCode()}if(e.projectCwd!==null&&typeof e.sources.get("nodeLinker")=="undefined"){let u=e.projectCwd,g;try{g=await T.readFilePromise(v.join(u,wt.lockfile),"utf8")}catch{}if(g==null?void 0:g.includes("yarn lockfile v1")){let f=await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout,includeFooter:!1},async h=>{h.reportInfo(z.AUTO_NM_SUCCESS,"Migrating from Yarn 1; automatically enabling the compatibility node-modules linker \u{1F44D}"),h.reportSeparator(),e.use("",{nodeLinker:"node-modules"},u,{overwrite:!0}),await fe.updateConfiguration(u,{nodeLinker:"node-modules"})});if(f.hasErrors())return f.exitCode()}}if(e.projectCwd!==null){let u=await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout,includeFooter:!1},async g=>{var f;((f=fe.telemetry)==null?void 0:f.isNew)&&(g.reportInfo(z.TELEMETRY_NOTICE,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),g.reportInfo(z.TELEMETRY_NOTICE,`Run ${ue.pretty(e,"yarn config set --home enableTelemetry 0",ue.Type.CODE)} to disable`),g.reportSeparator())});if(u.hasErrors())return u.exitCode()}let{project:s,workspace:o}=await Ke.find(e,this.context.cwd),a=await Qt.find(e,{immutable:this.immutableCache,check:this.checkCache});if(!o)throw new rt(s.cwd,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!0},async u=>{await s.install({cache:a,report:u,immutable:n,mode:this.mode})})).exitCode()}};wC.paths=[["install"],ye.Default],wC.usage=ye.Usage({description:"install the project dependencies",details:` - This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics: - - - **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: ). - - - **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). - - - **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). - - - **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. - - 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. - - 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. - - 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). - - 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. - - 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. - - If the \`--mode=\` option is set, Yarn will change which artifacts are generated. The modes currently supported are: - - - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the later 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. - - - \`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. - `,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"]]});var zae=wC,q4e="|||||||",J4e=">>>>>>>",W4e="=======",Vae="<<<<<<<";async function Y4e(t,e){if(!t.projectCwd)return!1;let r=v.join(t.projectCwd,t.get("lockfileFilename"));if(!await T.existsPromise(r))return!1;let i=await T.readFilePromise(r,"utf8");if(!i.includes(Vae))return!1;if(e)throw new nt(z.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");let[n,s]=z4e(i),o,a;try{o=Ii(n),a=Ii(s)}catch(c){throw new nt(z.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}let l=P(P({},o),a);for(let[c,u]of Object.entries(l))typeof u=="string"&&delete l[c];return await T.changeFilePromise(r,Qa(l),{automaticNewlines:!0}),!0}function z4e(t){let e=[[],[]],r=t.split(/\r?\n/g),i=!1;for(;r.length>0;){let n=r.shift();if(typeof n=="undefined")throw new Error("Assertion failed: Some lines should remain");if(n.startsWith(Vae)){for(;r.length>0;){let s=r.shift();if(typeof s=="undefined")throw new Error("Assertion failed: Some lines should remain");if(s===W4e){i=!1;break}else if(i||s.startsWith(q4e)){i=!0;continue}else e[0].push(s)}for(;r.length>0;){let s=r.shift();if(typeof s=="undefined")throw new Error("Assertion failed: Some lines should remain");if(s.startsWith(J4e))break;e[1].push(s)}}else e[0].push(n),e[1].push(n)}return[e[0].join(` -`),e[1].join(` -`)]}var BC=class extends Be{constructor(){super(...arguments);this.all=Y.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target project to the current one"});this.private=Y.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target project to the current one"});this.relative=Y.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destination=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=v.resolve(this.context.cwd,M.toPortablePath(this.destination)),o=await fe.find(s,this.context.plugins,{useRc:!1,strict:!1}),{project:a,workspace:l}=await Ke.find(o,s);if(r.cwd===a.cwd)throw new me("Invalid destination; Can't link the project to itself");if(!l)throw new rt(a.cwd,s);let c=r.topLevelWorkspace,u=[];if(this.all){for(let f of a.workspaces)f.manifest.name&&(!f.manifest.private||this.private)&&u.push(f);if(u.length===0)throw new me("No workspace found to be linked in the target project")}else{if(!l.manifest.name)throw new me("The target workspace doesn't have a name and thus cannot be linked");if(l.manifest.private&&!this.private)throw new me("The target workspace is marked private - use the --private flag to link it anyway");u.push(l)}for(let f of u){let h=S.stringifyIdent(f.locator),p=this.relative?v.relative(r.cwd,f.cwd):f.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${p}`})}return(await Fe.start({configuration:e,stdout:this.context.stdout},async f=>{await r.install({cache:n,report:f})})).exitCode()}};BC.paths=[["link"]],BC.usage=ye.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 a remote workspace for use in the current project","$0 link ~/ts-loader"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});var _ae=BC;var QC=class extends Be{constructor(){super(...arguments);this.args=Y.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};QC.paths=[["node"]],QC.usage=ye.Usage({description:"run node with the hook already setup",details:` - 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). - - 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. - `,examples:[["Run a Node script","$0 node ./my-script.js"]]});var Xae=QC;var lAe=ie(require("os"));var rAe=ie(require("os"));var V4e="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Kc(t){let e=await Zt.get(V4e,{configuration:t});return Ii(e.toString())}var bC=class extends Be{constructor(){super(...arguments);this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins);return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{let n=await Kc(e);for(let s of Object.entries(n)){let[l,o]=s,a=o,{experimental:c}=a,u=qr(a,["experimental"]);let g=l;c&&(g+=" [experimental]"),i.reportJson(P({name:l,experimental:c},u)),i.reportInfo(null,g)}})).exitCode()}};bC.paths=[["plugin","list"]],bC.usage=ye.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"]]});var Zae=bC;var $ae=ie(Or()),vC=class extends Be{constructor(){super(...arguments);this.onlyIfNeeded=Y.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let r=()=>{if(typeof Zr=="undefined")throw new me("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},i;if(this.version==="self")i=r();else if(this.version==="latest"||this.version==="berry"||this.version==="stable")i=`https://repo.yarnpkg.com/${await eAe(e,"stable")}/packages/yarnpkg-cli/bin/yarn.js`;else if(this.version==="canary")i=`https://repo.yarnpkg.com/${await eAe(e,"canary")}/packages/yarnpkg-cli/bin/yarn.js`;else if(this.version==="classic")i="https://nightly.yarnpkg.com/latest.js";else if(this.version.match(/^\.{0,2}[\\/]/)||M.isAbsolute(this.version))i=`file://${M.resolve(this.version)}`;else if(qt.satisfiesWithPrereleases(this.version,">=2.0.0"))i=`https://repo.yarnpkg.com/${this.version}/packages/yarnpkg-cli/bin/yarn.js`;else if(qt.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))i=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`;else if(qt.validRange(this.version))i=`https://repo.yarnpkg.com/${await _4e(e,this.version)}/packages/yarnpkg-cli/bin/yarn.js`;else throw new me(`Invalid version descriptor "${this.version}"`);return(await Fe.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async s=>{let o="file://",a;i.startsWith(o)?(s.reportInfo(z.UNNAMED,`Downloading ${ue.pretty(e,i,ps.URL)}`),a=await T.readFilePromise(M.toPortablePath(i.slice(o.length)))):(s.reportInfo(z.UNNAMED,`Retrieving ${ue.pretty(e,i,ps.PATH)}`),a=await Zt.get(i,{configuration:e})),await XN(e,null,a,{report:s})})).exitCode()}};vC.paths=[["set","version"]],vC.usage=ye.Usage({description:"lock the Yarn version used by the project",details:"\n This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will change the `yarnPath` settings from your project `.yarnrc.yml` file to point to the new file.\n\n A very good use case for this command is to enforce the version of Yarn used by the any single member of your team inside a same project - by doing this you ensure that you have control on 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 a different behavior than you.\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"],["Download the version used to invoke the command","$0 set version self"]]});var tAe=vC;async function _4e(t,e){let i=(await Zt.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0})).tags.filter(n=>qt.satisfiesWithPrereleases(n,e));if(i.length===0)throw new me(`No matching release found for range ${ue.pretty(t,e,ue.Type.RANGE)}.`);return i[0]}async function eAe(t,e){let r=await Zt.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0});if(!r.latest[e])throw new me(`Tag ${ue.pretty(t,e,ue.Type.RANGE)} not found`);return r.latest[e]}async function XN(t,e,r,{report:i}){var g;e===null&&await T.mktempPromise(async f=>{let h=v.join(f,"yarn.cjs");await T.writeFilePromise(h,r);let{stdout:p}=await hr.execvp(process.execPath,[M.fromPortablePath(h),"--version"],{cwd:f,env:_(P({},process.env),{YARN_IGNORE_PATH:"1"})});if(e=p.trim(),!$ae.default.valid(e))throw new Error(`Invalid semver version. ${ue.pretty(t,"yarn --version",ue.Type.CODE)} returned: -${e}`)});let n=(g=t.projectCwd)!=null?g:t.startingCwd,s=v.resolve(n,".yarn/releases"),o=v.resolve(s,`yarn-${e}.cjs`),a=v.relative(t.startingCwd,o),l=v.relative(n,o),c=t.get("yarnPath"),u=c===null||c.startsWith(`${s}/`);if(i.reportInfo(z.UNNAMED,`Saving the new release in ${ue.pretty(t,a,"magenta")}`),await T.removePromise(v.dirname(o)),await T.mkdirPromise(v.dirname(o),{recursive:!0}),await T.writeFilePromise(o,r,{mode:493}),u){await fe.updateConfiguration(n,{yarnPath:l});let f=await Ze.tryFind(n)||new Ze;e&&de.isTaggedYarnVersion(e)&&(f.packageManager=`yarn@${e}`);let h={};f.exportTo(h);let p=v.join(n,Ze.fileName),d=`${JSON.stringify(h,null,f.indent)} -`;await T.changeFilePromise(p,d,{automaticNewlines:!0})}}var X4e=/^[0-9]+$/;function iAe(t){return X4e.test(t)?`pull/${t}/head`:t}var Z4e=({repository:t,branch:e},r)=>[["git","init",M.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin",iAe(e)],["git","reset","--hard","FETCH_HEAD"]],$4e=({branch:t})=>[["git","fetch","origin",iAe(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],eze=({plugins:t,noMinify:e},r)=>[["yarn","build:cli",...new Array().concat(...t.map(i=>["--plugin",v.resolve(r,i)])),...e?["--no-minify"]:[],"|"]],SC=class extends Be{constructor(){super(...arguments);this.installPath=Y.String("--path",{description:"The path where the repository should be cloned to"});this.repository=Y.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=Y.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=Y.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=Y.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=Y.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=Y.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r}=await Ke.find(e,this.context.cwd),i=typeof this.installPath!="undefined"?v.resolve(this.context.cwd,M.toPortablePath(this.installPath)):v.resolve(M.toPortablePath((0,rAe.tmpdir)()),"yarnpkg-sources",mn.makeHash(this.repository).slice(0,6));return(await Fe.start({configuration:e,stdout:this.context.stdout},async s=>{await $N(this,{configuration:e,report:s,target:i}),s.reportSeparator(),s.reportInfo(z.UNNAMED,"Building a fresh bundle"),s.reportSeparator(),await xC(eze(this,i),{configuration:e,context:this.context,target:i}),s.reportSeparator();let o=v.resolve(i,"packages/yarnpkg-cli/bundles/yarn.js"),a=await T.readFilePromise(o);await XN(e,"sources",a,{report:s}),this.skipPlugins||await tze(this,{project:r,report:s,target:i})})).exitCode()}};SC.paths=[["set","version","from","sources"]],SC.usage=ye.Usage({description:"build Yarn from master",details:` - 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. - - 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. - `,examples:[["Build Yarn from master","$0 set version from sources"]]});var nAe=SC;async function xC(t,{configuration:e,context:r,target:i}){for(let[n,...s]of t){let o=s[s.length-1]==="|";if(o&&s.pop(),o)await hr.pipevp(n,s,{cwd:i,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${ue.pretty(e,` $ ${[n,...s].join(" ")}`,"grey")} -`);try{await hr.execvp(n,s,{cwd:i,strict:!0})}catch(a){throw r.stdout.write(a.stdout||a.stack),a}}}}async function $N(t,{configuration:e,report:r,target:i}){let n=!1;if(!t.force&&T.existsSync(v.join(i,".git"))){r.reportInfo(z.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await xC($4e(t),{configuration:e,context:t.context,target:i}),n=!0}catch(s){r.reportSeparator(),r.reportWarning(z.UNNAMED,"Repository update failed; we'll try to regenerate it")}}n||(r.reportInfo(z.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await T.removePromise(i),await T.mkdirPromise(i,{recursive:!0}),await xC(Z4e(t,i),{configuration:e,context:t.context,target:i}))}async function tze(t,{project:e,report:r,target:i}){let n=await Kc(e.configuration),s=new Set(Object.keys(n));for(let o of e.configuration.plugins.keys())!s.has(o)||await ZN(o,t,{project:e,report:r,target:i})}var sAe=ie(Or()),oAe=ie(require("url")),aAe=ie(require("vm"));var kC=class extends Be{constructor(){super(...arguments);this.name=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins);return(await Fe.start({configuration:e,stdout:this.context.stdout},async i=>{let{project:n}=await Ke.find(e,this.context.cwd),s,o;if(this.name.match(/^\.{0,2}[\\/]/)||M.isAbsolute(this.name)){let a=v.resolve(this.context.cwd,M.toPortablePath(this.name));i.reportInfo(z.UNNAMED,`Reading ${ue.pretty(e,a,ue.Type.PATH)}`),s=v.relative(n.cwd,a),o=await T.readFilePromise(a)}else{let a;if(this.name.match(/^https?:/)){try{new oAe.URL(this.name)}catch{throw new nt(z.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}s=this.name,a=this.name}else{let l=S.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(l.reference!=="unknown"&&!sAe.default.valid(l.reference))throw new nt(z.UNNAMED,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let c=S.stringifyIdent(l),u=await Kc(e);if(!Object.prototype.hasOwnProperty.call(u,c))throw new nt(z.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${c}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be referenced by their name; any other plugin will have to be referenced through its public url (for example https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js).`);s=c,a=u[c].url,l.reference!=="unknown"?a=a.replace(/\/master\//,`/${c}/${l.reference}/`):Zr!==null&&(a=a.replace(/\/master\//,`/@yarnpkg/cli/${Zr}/`))}i.reportInfo(z.UNNAMED,`Downloading ${ue.pretty(e,a,"green")}`),o=await Zt.get(a,{configuration:e})}await eL(s,o,{project:n,report:i})})).exitCode()}};kC.paths=[["plugin","import"]],kC.usage=ye.Usage({category:"Plugin-related commands",description:"download a plugin",details:` - This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations. - - Three types of plugin references are accepted: - - - If the plugin is stored within the Yarn repository, it can be referenced by name. - - Third-party plugins can be referenced directly through their public urls. - - Local plugins can be referenced by their path on the disk. - - 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). - `,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"]]});var AAe=kC;async function eL(t,e,{project:r,report:i}){let{configuration:n}=r,s={},o={exports:s};(0,aAe.runInNewContext)(e.toString(),{module:o,exports:s});let a=o.exports.name,l=`.yarn/plugins/${a}.cjs`,c=v.resolve(r.cwd,l);i.reportInfo(z.UNNAMED,`Saving the new plugin in ${ue.pretty(n,l,"magenta")}`),await T.mkdirPromise(v.dirname(c),{recursive:!0}),await T.writeFilePromise(c,e);let u={path:l,spec:t};await fe.updateConfiguration(r.cwd,g=>{let f=[],h=!1;for(let p of g.plugins||[]){let d=typeof p!="string"?p.path:p,m=v.resolve(r.cwd,M.toPortablePath(d)),{name:I}=de.dynamicRequire(m);I!==a?f.push(p):(f.push(u),h=!0)}return h||f.push(u),_(P({},g),{plugins:f})})}var rze=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],PC=class extends Be{constructor(){super(...arguments);this.installPath=Y.String("--path",{description:"The path where the repository should be cloned to"});this.repository=Y.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=Y.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=Y.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=Y.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r=typeof this.installPath!="undefined"?v.resolve(this.context.cwd,M.toPortablePath(this.installPath)):v.resolve(M.toPortablePath((0,lAe.tmpdir)()),"yarnpkg-sources",mn.makeHash(this.repository).slice(0,6));return(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{let{project:s}=await Ke.find(e,this.context.cwd),o=S.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),a=S.stringifyIdent(o),l=await Kc(e);if(!Object.prototype.hasOwnProperty.call(l,a))throw new nt(z.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${a}" 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 c=a;await $N(this,{configuration:e,report:n,target:r}),await ZN(c,this,{project:s,report:n,target:r})})).exitCode()}};PC.paths=[["plugin","import","from","sources"]],PC.usage=ye.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:` - 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. - - The plugins can be referenced by their short name if sourced from the official Yarn repository. - `,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"]]});var cAe=PC;async function ZN(t,{context:e,noMinify:r},{project:i,report:n,target:s}){let o=t.replace(/@yarnpkg\//,""),{configuration:a}=i;n.reportSeparator(),n.reportInfo(z.UNNAMED,`Building a fresh ${o}`),n.reportSeparator(),await xC(rze({pluginName:o,noMinify:r},s),{configuration:a,context:e,target:s}),n.reportSeparator();let l=v.resolve(s,`packages/${o}/bundles/${t}.js`),c=await T.readFilePromise(l);await eL(t,c,{project:i,report:n})}var DC=class extends Be{constructor(){super(...arguments);this.name=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r}=await Ke.find(e,this.context.cwd);return(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{let s=this.name,o=S.parseIdent(s);if(!e.plugins.has(s))throw new me(`${S.prettyIdent(e,o)} isn't referenced by the current configuration`);let a=`.yarn/plugins/${s}.cjs`,l=v.resolve(r.cwd,a);T.existsSync(l)&&(n.reportInfo(z.UNNAMED,`Removing ${ue.pretty(e,a,ue.Type.PATH)}...`),await T.removePromise(l)),n.reportInfo(z.UNNAMED,"Updating the configuration..."),await fe.updateConfiguration(r.cwd,c=>{if(!Array.isArray(c.plugins))return c;let u=c.plugins.filter(g=>g.path!==a);return c.plugins.length===u.length?c:_(P({},c),{plugins:u})})})).exitCode()}};DC.paths=[["plugin","remove"]],DC.usage=ye.Usage({category:"Plugin-related commands",description:"remove a plugin",details:` - This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration. - - **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. - `,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"]]});var uAe=DC;var RC=class extends Be{constructor(){super(...arguments);this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins);return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{for(let n of e.plugins.keys()){let s=this.context.plugins.plugins.has(n),o=n;s&&(o+=" [builtin]"),i.reportJson({name:n,builtin:s}),i.reportInfo(null,`${o}`)}})).exitCode()}};RC.paths=[["plugin","runtime"]],RC.usage=ye.Usage({category:"Plugin-related commands",description:"list the active plugins",details:` - This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins. - `,examples:[["List the currently active plugins","$0 plugin runtime"]]});var gAe=RC;var FC=class extends Be{constructor(){super(...arguments);this.idents=Y.Rest()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);let s=new Set;for(let a of this.idents)s.add(S.parseIdent(a).identHash);if(await r.restoreInstallState({restoreResolutions:!1}),await r.resolveEverything({cache:n,report:new ei}),s.size>0)for(let a of r.storedPackages.values())s.has(a.identHash)&&r.storedBuildState.delete(a.locatorHash);else r.storedBuildState.clear();return(await Fe.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async a=>{await r.install({cache:n,report:a})})).exitCode()}};FC.paths=[["rebuild"]],FC.usage=ye.Usage({description:"rebuild the project's native packages",details:` - This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again. - - 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). - - 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. - `,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});var fAe=FC;var tL=ie(Nn());Ss();var NC=class extends Be{constructor(){super(...arguments);this.all=Y.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=Y.String("--mode",{description:"Change what artifacts installs generate",validator:Yi(li)});this.patterns=Y.Rest()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=this.all?r.workspaces:[i],o=[vr.REGULAR,vr.DEVELOPMENT,vr.PEER],a=[],l=!1,c=[];for(let h of this.patterns){let p=!1,d=S.parseIdent(h);for(let m of s){let I=[...m.manifest.peerDependenciesMeta.keys()];for(let B of(0,tL.default)(I,h))m.manifest.peerDependenciesMeta.delete(B),l=!0,p=!0;for(let B of o){let b=m.manifest.getForScope(B),R=[...b.values()].map(H=>S.stringifyIdent(H));for(let H of(0,tL.default)(R,S.stringifyIdent(d))){let{identHash:L}=S.parseIdent(H),K=b.get(L);if(typeof K=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");m.manifest[B].delete(L),c.push([m,B,K]),l=!0,p=!0}}}p||a.push(h)}let u=a.length>1?"Patterns":"Pattern",g=a.length>1?"don't":"doesn't",f=this.all?"any":"this";if(a.length>0)throw new me(`${u} ${ue.prettyList(e,a,ps.CODE)} ${g} match any packages referenced by ${f} workspace`);return l?(await e.triggerMultipleHooks(p=>p.afterWorkspaceDependencyRemoval,c),(await Fe.start({configuration:e,stdout:this.context.stdout},async p=>{await r.install({cache:n,report:p,mode:this.mode})})).exitCode()):0}};NC.paths=[["remove"]],NC.usage=ye.Usage({description:"remove dependencies from the project",details:` - This command will remove the packages matching the specified patterns from the current workspace. - - If the \`--mode=\` option is set, Yarn will change which artifacts are generated. The modes currently supported are: - - - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the later 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. - - - \`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. - - 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. - `,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}'"]]});var hAe=NC;var pAe=ie(require("util")),z0=class extends Be{async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd);if(!i)throw new rt(r.cwd,this.context.cwd);return(await Fe.start({configuration:e,stdout:this.context.stdout},async s=>{let o=i.manifest.scripts,a=de.sortMap(o.keys(),u=>u),l={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2},c=a.reduce((u,g)=>Math.max(u,g.length),0);for(let[u,g]of o.entries())s.reportInfo(null,`${u.padEnd(c," ")} ${(0,pAe.inspect)(g,l)}`)})).exitCode()}};z0.paths=[["run"]];var dAe=z0;var LC=class extends Be{constructor(){super(...arguments);this.inspect=Y.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=Y.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=Y.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=Y.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.silent=Y.Boolean("--silent",{hidden:!0});this.scriptName=Y.String();this.args=Y.Proxy()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i,locator:n}=await Ke.find(e,this.context.cwd);await r.restoreInstallState();let s=this.topLevel?r.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await Kt.hasPackageScript(s,this.scriptName,{project:r}))return await Kt.executePackageScript(s,this.scriptName,this.args,{project:r,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let o=await Kt.getPackageAccessibleBinaries(s,{project:r});if(o.get(this.scriptName)){let l=[];return this.inspect&&(typeof this.inspect=="string"?l.push(`--inspect=${this.inspect}`):l.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?l.push(`--inspect-brk=${this.inspectBrk}`):l.push("--inspect-brk")),await Kt.executePackageAccessibleBinary(s,this.scriptName,this.args,{cwd:this.context.cwd,project:r,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:l,packageAccessibleBinaries:o})}if(!this.topLevel&&!this.binariesOnly&&i&&this.scriptName.includes(":")){let c=(await Promise.all(r.workspaces.map(async u=>u.manifest.scripts.has(this.scriptName)?u:null))).filter(u=>u!==null);if(c.length===1)return await Kt.executeWorkspaceScript(c[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 me(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${S.prettyLocator(e,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 me(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${S.prettyLocator(e,n)}).`);{if(this.scriptName==="global")throw new me("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let l=[this.scriptName].concat(this.args);for(let[c,u]of Yg)for(let g of u)if(l.length>=g.length&&JSON.stringify(l.slice(0,g.length))===JSON.stringify(g))throw new me(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${c} plugin. You can install it with "yarn plugin import ${c}".`);throw new me(`Couldn't find a script named "${this.scriptName}".`)}}};LC.paths=[["run"]],LC.usage=ye.Usage({description:"run a script defined in the package.json",details:` - This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace: - - - If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed. - - - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed. - - - 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. - - 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). - `,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"]]});var CAe=LC;var TC=class extends Be{constructor(){super(...arguments);this.save=Y.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=Y.String();this.resolution=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(await r.restoreInstallState({restoreResolutions:!1}),!i)throw new rt(r.cwd,this.context.cwd);let s=S.parseDescriptor(this.descriptor,!0),o=S.makeDescriptor(s,this.resolution);return r.storedDescriptors.set(s.descriptorHash,s),r.storedDescriptors.set(o.descriptorHash,o),r.resolutionAliases.set(s.descriptorHash,o.descriptorHash),(await Fe.start({configuration:e,stdout:this.context.stdout},async l=>{await r.install({cache:n,report:l})})).exitCode()}};TC.paths=[["set","resolution"]],TC.usage=ye.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, add the `-s,--save` flag which will also edit the `resolutions` field from 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 1.5.0"]]});var mAe=TC;var EAe=ie(Nn()),MC=class extends Be{constructor(){super(...arguments);this.all=Y.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=Y.Rest()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);let s=r.topLevelWorkspace,o=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:l,reference:c}of s.manifest.resolutions)c.startsWith("portal:")&&o.add(l.descriptor.fullName);if(this.leadingArguments.length>0)for(let l of this.leadingArguments){let c=v.resolve(this.context.cwd,M.toPortablePath(l));if(de.isPathLike(l)){let u=await fe.find(c,this.context.plugins,{useRc:!1,strict:!1}),{project:g,workspace:f}=await Ke.find(u,c);if(!f)throw new rt(g.cwd,c);if(this.all){for(let h of g.workspaces)h.manifest.name&&o.add(S.stringifyIdent(h.locator));if(o.size===0)throw new me("No workspace found to be unlinked in the target project")}else{if(!f.manifest.name)throw new me("The target workspace doesn't have a name and thus cannot be unlinked");o.add(S.stringifyIdent(f.locator))}}else{let u=[...s.manifest.resolutions.map(({pattern:g})=>g.descriptor.fullName)];for(let g of(0,EAe.default)(u,l))o.add(g)}}return s.manifest.resolutions=s.manifest.resolutions.filter(({pattern:l})=>!o.has(l.descriptor.fullName)),(await Fe.start({configuration:e,stdout:this.context.stdout},async l=>{await r.install({cache:n,report:l})})).exitCode()}};MC.paths=[["unlink"]],MC.usage=ye.Usage({description:"disconnect the local project from another one",details:` - This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments. - `,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}'"]]});var IAe=MC;var yAe=ie(aC()),rL=ie(Nn());Ss();var uf=class extends Be{constructor(){super(...arguments);this.interactive=Y.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.exact=Y.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=Y.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=Y.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=Y.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=Y.String("--mode",{description:"Change what artifacts installs generate",validator:Yi(li)});this.patterns=Y.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=[...r.storedDescriptors.values()],o=s.map(u=>S.stringifyIdent(u)),a=new Set;for(let u of this.patterns){if(S.parseDescriptor(u).range!=="unknown")throw new me("Ranges aren't allowed when using --recursive");for(let g of(0,rL.default)(o,u)){let f=S.parseIdent(g);a.add(f.identHash)}}let l=s.filter(u=>a.has(u.identHash));for(let u of l)r.storedDescriptors.delete(u.descriptorHash),r.storedResolutions.delete(u.descriptorHash);return(await Fe.start({configuration:e,stdout:this.context.stdout},async u=>{await r.install({cache:n,report:u})})).exitCode()}async executeUpClassic(){var d;let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=(d=this.interactive)!=null?d:e.get("preferInteractive"),o=AC(this,r),a=s?[Fr.KEEP,Fr.REUSE,Fr.PROJECT,Fr.LATEST]:[Fr.PROJECT,Fr.LATEST],l=[],c=[];for(let m of this.patterns){let I=!1,B=S.parseDescriptor(m);for(let b of r.workspaces)for(let R of[vr.REGULAR,vr.DEVELOPMENT]){let L=[...b.manifest.getForScope(R).values()].map(K=>S.stringifyIdent(K));for(let K of(0,rL.default)(L,S.stringifyIdent(B))){let J=S.parseIdent(K),ne=b.manifest[R].get(J.identHash);if(typeof ne=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");let q=S.makeDescriptor(J,B.range);l.push(Promise.resolve().then(async()=>[b,R,ne,await lC(q,{project:r,workspace:b,cache:n,target:R,modifier:o,strategies:a})])),I=!0}}I||c.push(m)}if(c.length>1)throw new me(`Patterns ${ue.prettyList(e,c,ps.CODE)} don't match any packages referenced by any workspace`);if(c.length>0)throw new me(`Pattern ${ue.prettyList(e,c,ps.CODE)} doesn't match any packages referenced by any workspace`);let u=await Promise.all(l),g=await Fa.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async m=>{for(let[,,I,{suggestions:B,rejections:b}]of u){let R=B.filter(H=>H.descriptor!==null);if(R.length===0){let[H]=b;if(typeof H=="undefined")throw new Error("Assertion failed: Expected an error to have been set");let L=this.cli.error(H);r.configuration.get("enableNetwork")?m.reportError(z.CANT_SUGGEST_RESOLUTIONS,`${S.prettyDescriptor(e,I)} can't be resolved to a satisfying range - -${L}`):m.reportError(z.CANT_SUGGEST_RESOLUTIONS,`${S.prettyDescriptor(e,I)} can't be resolved to a satisfying range (note: network resolution has been disabled) - -${L}`)}else R.length>1&&!s&&m.reportError(z.CANT_SUGGEST_RESOLUTIONS,`${S.prettyDescriptor(e,I)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(g.hasErrors())return g.exitCode();let f=!1,h=[];for(let[m,I,,{suggestions:B}]of u){let b,R=B.filter(J=>J.descriptor!==null),H=R[0].descriptor,L=R.every(J=>S.areDescriptorsEqual(J.descriptor,H));R.length===1||L?b=H:(f=!0,{answer:b}=await(0,yAe.prompt)({type:"select",name:"answer",message:`Which range to you want to use in ${S.prettyWorkspace(e,m)} \u276F ${I}?`,choices:B.map(({descriptor:J,name:ne,reason:q})=>J?{name:ne,hint:q,descriptor:J}:{name:ne,hint:q,disabled:!0}),onCancel:()=>process.exit(130),result(J){return this.find(J,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let K=m.manifest[I].get(b.identHash);if(typeof K=="undefined")throw new Error("Assertion failed: This descriptor should have a matching entry");if(K.descriptorHash!==b.descriptorHash)m.manifest[I].set(b.identHash,b),h.push([m,I,K,b]);else{let J=e.makeResolver(),ne={project:r,resolver:J},q=J.bindDescriptor(K,m.anchoredLocator,ne);r.forgetResolution(q)}}return await e.triggerMultipleHooks(m=>m.afterWorkspaceDependencyReplacement,h),f&&this.context.stdout.write(` -`),(await Fe.start({configuration:e,stdout:this.context.stdout},async m=>{await r.install({cache:n,report:m,mode:this.mode})})).exitCode()}};uf.paths=[["up"]],uf.usage=ye.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=` 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 later 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'"]]}),uf.schema=[pv("recursive",Bl.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];var wAe=uf;var OC=class extends Be{constructor(){super(...arguments);this.recursive=Y.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=Y.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState();let n=S.parseIdent(this.package).identHash,s=this.recursive?nze(r,n,{configuration:e,peers:this.peers}):ize(r,n,{configuration:e,peers:this.peers});Hs.emitTree(s,{configuration:e,stdout:this.context.stdout,json:this.json,separators:1})}};OC.paths=[["why"]],OC.usage=ye.Usage({description:"display the reason why a package is needed",details:` - This command prints the exact reasons why a package appears in the dependency tree. - - 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. - `,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});var BAe=OC;function ize(t,e,{configuration:r,peers:i}){let n=de.sortMap(t.storedPackages.values(),a=>S.stringifyLocator(a)),s={},o={children:s};for(let a of n){let l={},c=null;for(let u of a.dependencies.values()){if(!i&&a.peerDependencies.has(u.identHash))continue;let g=t.storedResolutions.get(u.descriptorHash);if(!g)throw new Error("Assertion failed: The resolution should have been registered");let f=t.storedPackages.get(g);if(!f)throw new Error("Assertion failed: The package should have been registered");if(f.identHash!==e)continue;if(c===null){let p=S.stringifyLocator(a);s[p]={value:[a,ue.Type.LOCATOR],children:l}}let h=S.stringifyLocator(f);l[h]={value:[{descriptor:u,locator:f},ue.Type.DEPENDENT]}}}return o}function nze(t,e,{configuration:r,peers:i}){let n=de.sortMap(t.workspaces,f=>S.stringifyLocator(f.anchoredLocator)),s=new Set,o=new Set,a=f=>{if(s.has(f.locatorHash))return o.has(f.locatorHash);if(s.add(f.locatorHash),f.identHash===e)return o.add(f.locatorHash),!0;let h=!1;f.identHash===e&&(h=!0);for(let p of f.dependencies.values()){if(!i&&f.peerDependencies.has(p.identHash))continue;let d=t.storedResolutions.get(p.descriptorHash);if(!d)throw new Error("Assertion failed: The resolution should have been registered");let m=t.storedPackages.get(d);if(!m)throw new Error("Assertion failed: The package should have been registered");a(m)&&(h=!0)}return h&&o.add(f.locatorHash),h};for(let f of n){let h=t.storedPackages.get(f.anchoredLocator.locatorHash);if(!h)throw new Error("Assertion failed: The package should have been registered");a(h)}let l=new Set,c={},u={children:c},g=(f,h,p)=>{if(!o.has(f.locatorHash))return;let d=p!==null?ue.tuple(ue.Type.DEPENDENT,{locator:f,descriptor:p}):ue.tuple(ue.Type.LOCATOR,f),m={},I={value:d,children:m},B=S.stringifyLocator(f);if(h[B]=I,!l.has(f.locatorHash)&&(l.add(f.locatorHash),!(p!==null&&t.tryWorkspaceByLocator(f))))for(let b of f.dependencies.values()){if(!i&&f.peerDependencies.has(b.identHash))continue;let R=t.storedResolutions.get(b.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let H=t.storedPackages.get(R);if(!H)throw new Error("Assertion failed: The package should have been registered");g(H,m,b)}};for(let f of n){let h=t.storedPackages.get(f.anchoredLocator.locatorHash);if(!h)throw new Error("Assertion failed: The package should have been registered");g(h,c,null)}return u}var fL={};it(fL,{default:()=>wze,gitUtils:()=>Uc});var Uc={};it(Uc,{TreeishProtocols:()=>vn,clone:()=>cL,fetchBase:()=>jAe,fetchChangedFiles:()=>YAe,fetchChangedWorkspaces:()=>Ize,fetchRoot:()=>GAe,isGitUrl:()=>ff,lsRemote:()=>HAe,normalizeLocator:()=>AL,normalizeRepoUrl:()=>KC,resolveUrl:()=>lL,splitRepoUrl:()=>UC});var oL=ie(OAe()),gf=ie(require("querystring")),aL=ie(Or()),KAe=ie(require("url"));function UAe(){return _(P({},process.env),{GIT_SSH_COMMAND:"ssh -o BatchMode=yes"})}var Eze=[/^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\/(.+)?$/],vn;(function(n){n.Commit="commit",n.Head="head",n.Tag="tag",n.Semver="semver"})(vn||(vn={}));function ff(t){return t?Eze.some(e=>!!t.match(e)):!1}function UC(t){t=KC(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:vn.Head,request:"HEAD"},extra:{}};let r=t.slice(0,e),i=t.slice(e+1);if(i.match(/^[a-z]+=/)){let n=gf.default.parse(i);for(let[l,c]of Object.entries(n))if(typeof c!="string")throw new Error(`Assertion failed: The ${l} parameter must be a literal string`);let s=Object.values(vn).find(l=>Object.prototype.hasOwnProperty.call(n,l)),o,a;typeof s!="undefined"?(o=s,a=n[s]):(o=vn.Head,a="HEAD");for(let l of Object.values(vn))delete n[l];return{repo:r,treeish:{protocol:o,request:a},extra:n}}else{let n=i.indexOf(":"),s,o;return n===-1?(s=null,o=i):(s=i.slice(0,n),o=i.slice(n+1)),{repo:r,treeish:{protocol:s,request:o},extra:{}}}}function KC(t,{git:e=!1}={}){var r;if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/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){t=t.replace(/^git\+([^:]+):/,"$1:");let i;try{i=KAe.default.parse(t)}catch{i=null}i&&i.protocol==="ssh:"&&((r=i.path)==null?void 0:r.startsWith("/:"))&&(t=t.replace(/^ssh:\/\//,""))}return t}function AL(t){return S.makeLocator(t,KC(t.reference))}async function HAe(t,e){let r=KC(t,{git:!0});if(!Zt.getNetworkSettings(`https://${(0,oL.default)(r).resource}`,{configuration:e}).enableNetwork)throw new Error(`Request to '${r}' has been blocked because of your configuration settings`);let n;try{n=await hr.execvp("git",["ls-remote",r],{cwd:e.startingCwd,env:UAe(),strict:!0})}catch(l){throw l.message=`Listing the refs for ${t} failed`,l}let s=new Map,o=/^([a-f0-9]{40})\t([^\n]+)/gm,a;for(;(a=o.exec(n.stdout))!==null;)s.set(a[2],a[1]);return s}async function lL(t,e){let{repo:r,treeish:{protocol:i,request:n},extra:s}=UC(t),o=await HAe(r,e),a=(c,u)=>{switch(c){case vn.Commit:{if(!u.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return gf.default.stringify(_(P({},s),{commit:u}))}case vn.Head:{let g=o.get(u==="HEAD"?u:`refs/heads/${u}`);if(typeof g=="undefined")throw new Error(`Unknown head ("${u}")`);return gf.default.stringify(_(P({},s),{commit:g}))}case vn.Tag:{let g=o.get(`refs/tags/${u}`);if(typeof g=="undefined")throw new Error(`Unknown tag ("${u}")`);return gf.default.stringify(_(P({},s),{commit:g}))}case vn.Semver:{let g=qt.validRange(u);if(!g)throw new Error(`Invalid range ("${u}")`);let f=new Map([...o.entries()].filter(([p])=>p.startsWith("refs/tags/")).map(([p,d])=>[aL.default.parse(p.slice(10)),d]).filter(p=>p[0]!==null)),h=aL.default.maxSatisfying([...f.keys()],g);if(h===null)throw new Error(`No matching range ("${u}")`);return gf.default.stringify(_(P({},s),{commit:f.get(h)}))}case null:{let g;if((g=l(vn.Commit,u))!==null||(g=l(vn.Tag,u))!==null||(g=l(vn.Head,u))!==null)return g;throw u.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${u}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${u}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${c}")`)}},l=(c,u)=>{try{return a(c,u)}catch(g){return null}};return`${r}#${a(i,n)}`}async function cL(t,e){return await e.getLimit("cloneConcurrency")(async()=>{let{repo:r,treeish:{protocol:i,request:n}}=UC(t);if(i!=="commit")throw new Error("Invalid treeish protocol when cloning");let s=KC(r,{git:!0});if(Zt.getNetworkSettings(`https://${(0,oL.default)(s).resource}`,{configuration:e}).enableNetwork===!1)throw new Error(`Request to '${s}' has been blocked because of your configuration settings`);let o=await T.mktempPromise(),a={cwd:o,env:UAe(),strict:!0};try{await hr.execvp("git",["clone","-c core.autocrlf=false",s,M.fromPortablePath(o)],a),await hr.execvp("git",["checkout",`${n}`],a)}catch(l){throw l.message=`Repository clone failed: ${l.message}`,l}return o})}async function GAe(t){let e=null,r,i=t;do r=i,await T.existsPromise(v.join(r,".git"))&&(e=r),i=v.dirname(r);while(e===null&&i!==r);return e}async function jAe(t,{baseRefs:e}){if(e.length===0)throw new me("Can't run this command with zero base refs specified.");let r=[];for(let a of e){let{code:l}=await hr.execvp("git",["merge-base",a,"HEAD"],{cwd:t});l===0&&r.push(a)}if(r.length===0)throw new me(`No ancestor could be found between any of HEAD and ${e.join(", ")}`);let{stdout:i}=await hr.execvp("git",["merge-base","HEAD",...r],{cwd:t,strict:!0}),n=i.trim(),{stdout:s}=await hr.execvp("git",["show","--quiet","--pretty=format:%s",n],{cwd:t,strict:!0}),o=s.trim();return{hash:n,title:o}}async function YAe(t,{base:e,project:r}){let i=de.buildIgnorePattern(r.configuration.get("changesetIgnorePatterns")),{stdout:n}=await hr.execvp("git",["diff","--name-only",`${e}`],{cwd:t,strict:!0}),s=n.split(/\r\n|\r|\n/).filter(c=>c.length>0).map(c=>v.resolve(t,M.toPortablePath(c))),{stdout:o}=await hr.execvp("git",["ls-files","--others","--exclude-standard"],{cwd:t,strict:!0}),a=o.split(/\r\n|\r|\n/).filter(c=>c.length>0).map(c=>v.resolve(t,M.toPortablePath(c))),l=[...new Set([...s,...a].sort())];return i?l.filter(c=>!v.relative(r.cwd,c).match(i)):l}async function Ize({ref:t,project:e}){if(e.configuration.projectCwd===null)throw new me("This command can only be run from within a Yarn project");let r=[v.resolve(e.cwd,e.configuration.get("cacheFolder")),v.resolve(e.cwd,e.configuration.get("installStatePath")),v.resolve(e.cwd,e.configuration.get("lockfileFilename")),v.resolve(e.cwd,e.configuration.get("virtualFolder"))];await e.configuration.triggerHook(o=>o.populateYarnPaths,e,o=>{o!=null&&r.push(o)});let i=await GAe(e.configuration.projectCwd);if(i==null)throw new me("This command can only be run on Git repositories");let n=await jAe(i,{baseRefs:typeof t=="string"?[t]:e.configuration.get("changesetBaseRefs")}),s=await YAe(i,{base:n.hash,project:e});return new Set(de.mapAndFilter(s,o=>{let a=e.tryWorkspaceByFilePath(o);return a===null?de.mapAndFilter.skip:r.some(l=>o.startsWith(l))?de.mapAndFilter.skip:a}))}var uL=class{supports(e,r){return ff(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,n=AL(e),s=new Map(r.checksums);s.set(n.locatorHash,i);let o=_(P({},r),{checksums:s}),a=await this.downloadHosted(n,o);if(a!==null)return a;let[l,c,u]=await r.cache.fetchPackageFromCache(e,i,P({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${S.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(n,o),skipIntegrityCheck:r.skipIntegrityCheck},r.cacheOptions));return{packageFs:l,releaseFs:c,prefixPath:S.getIdentVendorPath(e),checksum:u}}async downloadHosted(e,r){return r.project.configuration.reduceHook(i=>i.fetchHostedRepository,null,e,r)}async cloneFromRemote(e,r){let i=await cL(e.reference,r.project.configuration),n=UC(e.reference),s=v.join(i,"package.tgz");await Kt.prepareExternalProject(i,s,{configuration:r.project.configuration,report:r.report,workspace:n.extra.workspace,locator:e});let o=await T.readFilePromise(s);return await de.releaseAfterUseAsync(async()=>await Ai.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:S.getIdentVendorPath(e),stripComponents:1}))}};var gL=class{supportsDescriptor(e,r){return ff(e.range)}supportsLocator(e,r){return ff(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,i){return e}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){let n=await lL(e.range,i.project.configuration);return[S.makeLocator(e,n)]}async getSatisfying(e,r,i){return null}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),n=await de.releaseAfterUseAsync(async()=>await Ze.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return _(P({},e),{version:n.version||"0.0.0",languageName:n.languageName||r.project.configuration.get("defaultLanguageName"),linkType:gt.HARD,conditions:n.getConditions(),dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var yze={configuration:{changesetBaseRefs:{description:"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.",type:ge.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:ge.STRING,default:[],isArray:!0},cloneConcurrency:{description:"Maximal number of concurrent clones",type:ge.NUMBER,default:2}},fetchers:[uL],resolvers:[gL]};var wze=yze;var HC=class extends Be{constructor(){super(...arguments);this.since=Y.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.recursive=Y.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.verbose=Y.Boolean("-v,--verbose",!1,{description:"Also return the cross-dependencies between workspaces"});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r}=await Ke.find(e,this.context.cwd);return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async n=>{let s=this.since?await Uc.fetchChangedWorkspaces({ref:this.since,project:r}):r.workspaces,o=new Set(s);if(this.recursive)for(let a of[...s].map(l=>l.getRecursiveWorkspaceDependents()))for(let l of a)o.add(l);for(let a of o){let{manifest:l}=a,c;if(this.verbose){let u=new Set,g=new Set;for(let f of Ze.hardDependencies)for(let[h,p]of l.getForScope(f)){let d=r.tryWorkspaceByDescriptor(p);d===null?r.workspacesByIdent.has(h)&&g.add(p):u.add(d)}c={workspaceDependencies:Array.from(u).map(f=>f.relativeCwd),mismatchedWorkspaceDependencies:Array.from(g).map(f=>S.stringifyDescriptor(f))}}n.reportInfo(null,`${a.relativeCwd}`),n.reportJson(P({location:a.relativeCwd,name:l.name?S.stringifyIdent(l.name):null},c))}})).exitCode()}};HC.paths=[["workspaces","list"]],HC.usage=ye.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 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 "});var qAe=HC;var GC=class extends Be{constructor(){super(...arguments);this.workspaceName=Y.String();this.commandName=Y.String();this.args=Y.Proxy()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd);if(!i)throw new rt(r.cwd,this.context.cwd);let n=r.workspaces,s=new Map(n.map(a=>{let l=S.convertToIdent(a.locator);return[S.stringifyIdent(l),a]})),o=s.get(this.workspaceName);if(o===void 0){let a=Array.from(s.keys()).sort();throw new me(`Workspace '${this.workspaceName}' not found. Did you mean any of the following: - - ${a.join(` - - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:o.cwd})}};GC.paths=[["workspace"]],GC.usage=ye.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:` - This command will run a given sub-command on a single workspace. - `,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"]]});var JAe=GC;var Bze={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:ge.BOOLEAN,default:WAe.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:ge.STRING,values:["^","~",""],default:Lo.CARET}},commands:[soe,aoe,wae,Nae,mAe,nAe,tAe,qAe,Uae,Hae,Gae,jae,ioe,noe,Lae,Mae,Yae,qae,Wae,zae,_ae,IAe,Xae,cAe,AAe,uAe,Zae,gAe,fAe,hAe,dAe,CAe,wAe,BAe,JAe]},Qze=Bze;var mL={};it(mL,{default:()=>vze});var Me={optional:!0},zAe=[["@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:Me,zenObservable:Me}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Me,zenObservable:Me}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Me}}],["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"]:Me,["postcss-jsx"]:Me,["postcss-less"]:Me,["postcss-markdown"]:Me,["postcss-scss"]:Me}}],["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:Me}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Me}}],["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@*",{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:Me,"vue-template-compiler":Me}}],["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:Me,"utf-8-validate":Me}}],["react-portal@*",{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@*",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@*",{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":Me,"vuetify-loader":Me}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Me}}],["@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":Me}}],["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":Me}}],["consolidate@*",{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:Me,tinyliquid:Me,"liquid-node":Me,jade:Me,"then-jade":Me,dust:Me,"dustjs-helpers":Me,"dustjs-linkedin":Me,swig:Me,"swig-templates":Me,"razor-tmpl":Me,atpl:Me,liquor:Me,twig:Me,ejs:Me,eco:Me,jazz:Me,jqtpl:Me,hamljs:Me,hamlet:Me,whiskers:Me,"haml-coffee":Me,"hogan.js":Me,templayed:Me,handlebars:Me,underscore:Me,lodash:Me,pug:Me,"then-pug":Me,qejs:Me,walrus:Me,mustache:Me,just:Me,ect:Me,mote:Me,toffee:Me,dot:Me,"bracket-template":Me,ractive:Me,nunjucks:Me,htmling:Me,"babel-core":Me,plates:Me,"react-dom":Me,react:Me,"arc-templates":Me,vash:Me,slm:Me,marko:Me,teacup:Me,"coffee-script":Me,squirrelly:Me,twing:Me}}],["vue-loader@<=16.3.1",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",webpack:"^4.1.0 || ^5.0.0-0"}}],["scss-parser@*",{dependencies:{lodash:"^4.17.21"}}],["query-ast@*",{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@*",{dependencies:{"json-parse-even-better-errors":"^2.3.1"}}],["bin-links@*",{dependencies:{"mkdirp-infer-owner":"^1.0.2"}}],["rollup-plugin-polyfill-node@*",{peerDependencies:{rollup:"^1.20.0 || ^2.0.0"}}],["snowpack@*",{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:Me}}],["redux-persist@*",{peerDependencies:{react:">=16"},peerDependenciesMeta:{react:Me}}],["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":Me,"webpack-command":Me}}],["webpack@<5.0.0-beta.23",{peerDependenciesMeta:{"webpack-cli":Me}}],["webpack-dev-server@<3.10.2",{peerDependenciesMeta:{"webpack-cli":Me}}]];var pL;function VAe(){return typeof pL=="undefined"&&(pL=require("zlib").brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2S5tvGrwHBAzdz+s/npQ6tgEvobvxisrPIadkXeUAJotBn5bDZ5kAhcRqsIHe3F75Walet5hNalwgFDtxb0BiDUjiUQkjG0yW2hto9HPgiCkm316d6bC0kST72YN7D7rfkhCE9x4J0XwB0yavalxpUu2t9xszHrmtwalOxT7VslsxWcB1qpqZwERUra4psWhTV8BgwWeizurec82Caf1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LbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),pL}var dL;function _Ae(){return typeof dL=="undefined"&&(dL=require("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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b5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=","base64")).toString()),dL}var CL;function XAe(){return typeof CL=="undefined"&&(CL=require("zlib").brotliDecompressSync(Buffer.from("m3wJE1GkN6sQTGg/U6NIb0aTKMP9bivYNuU6vRmRrSm//3UCehrg5OrrHCrSWkCREhF890RJt8fjR4A2EeX46L4IrTIWP/affkbbukX9rgdYBpRx68FI2tVZV558HxxDbdbwcwWkxS9fTf/18/XcF+clrnTSdsJrlW6VKgApOBTI2YUuI09ioW31NNUEPOEYwiH60pTg2ci7Zluqr7fVRbadjqmOuYgcHJcM4LBSeue6QXpmFJpjz6uvUY+qiVCSyyWXY8pujLb8Gjf4fk5Utq7UVA2mJ3RlmbiNgx50eZC/iKz6+5zWK7EBdVOHtfr7yYnjEryCuaayo/JNKQnrzulnbmJV2VwuioDYlbOf/59vWqYk1hgD7K7EWdmIR0GEwwFlnM2UyaNvvVeP0w4roAGcQQMcw+GsoZF19ape/d8OpJcIynmfREpSBaF8FrfDOEt5UsaYTBsEif5XtbLV8UISsUH42gBo3z5ytsc0jVR051TU7o42iUnOubqQZh0rV0okHHIbi9JVSDNXNJ27WhJJ0UFcOQCkA0A5iJRTrGzicT+2A9iMpBpP9K/HMLPdevu+NgYUUYmgecbBv1vifxR6qHpJYLfJLqGa2UoINqVGZPuVV+svIMHCEHvGtE9vL3s1v0alNAHhhbLgmAxd6s/VspNCKKOK/lVFdCXfzx14GtKyVZdT5m/8pmnQKq6SQOv3ma6/18z+LqQ/ayOsvyZQz599+mevPz784zO+/Nr6RpK55Jt68eAFQw9+E0NaYfv1P/Asy495y4oCw5cxMsZg+QUuLtAaYLSBesyzG3nPFvLjJFex/jgrj/75Kd7Ltk5WUKA7zLy+PAVaBmAze3IiIBde+dQgisrwU+TX12lQVqwPWzmaYmnbCkMSAv6tqiVy8As0b5QOuQp0k259vNcVQ4ApWBJRh4lPrUzRTjU/adf4GdE1oEp/y44CfcDw1N5oEOOyjTLOavMlwX8D7ROLrY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rSbOxeQMoAAwM0WzR/cQAO5uYKcFXG/tR4JoD2lFKvLXK5gqvEaQMWVvwI=","base64")).toString()),CL}var ZAe=new Map([[S.makeIdent(null,"fsevents").identHash,VAe],[S.makeIdent(null,"resolve").identHash,_Ae],[S.makeIdent(null,"typescript").identHash,XAe]]),bze={hooks:{registerPackageExtensions:async(t,e)=>{for(let[r,i]of zAe)e(S.parseDescriptor(r,!0),i)},getBuiltinPatch:async(t,e)=>{var s;let r="compat/";if(!e.startsWith(r))return;let i=S.parseIdent(e.slice(r.length)),n=(s=ZAe.get(i.identHash))==null?void 0:s();return typeof n!="undefined"?n:null},reduceDependency:async(t,e,r,i)=>typeof ZAe.get(t.identHash)=="undefined"?t:S.makeDescriptor(t,S.makeRange({protocol:"patch:",source:S.stringifyDescriptor(t),selector:`~builtin`,params:null}))}},vze=bze;var EL={};it(EL,{default:()=>xze});var V0=class extends Be{constructor(){super(...arguments);this.pkg=Y.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=Y.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=Y.String();this.args=Y.Proxy()}async execute(){let e=[];this.pkg&&e.push("--package",this.pkg),this.quiet&&e.push("--quiet");let r=S.parseIdent(this.command),i=S.makeIdent(r.scope,`create-${r.name}`);return this.cli.run(["dlx",...e,S.stringifyIdent(i),...this.args])}};V0.paths=[["create"]];var $Ae=V0;var jC=class extends Be{constructor(){super(...arguments);this.packages=Y.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=Y.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=Y.String();this.args=Y.Proxy()}async execute(){return fe.telemetry=null,await T.mktempPromise(async e=>{var p;let r=v.join(e,`dlx-${process.pid}`);await T.mkdirPromise(r),await T.writeFilePromise(v.join(r,"package.json"),`{} -`),await T.writeFilePromise(v.join(r,"yarn.lock"),"");let i=v.join(r,".yarnrc.yml"),n=await fe.findProjectCwd(this.context.cwd,wt.lockfile),s=!(await fe.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),o=n!==null?v.join(n,".yarnrc.yml"):null;o!==null&&T.existsSync(o)?(await T.copyFilePromise(o,i),await fe.updateConfiguration(r,d=>{let m=_(P({},d),{enableGlobalCache:s,enableTelemetry:!1});return Array.isArray(d.plugins)&&(m.plugins=d.plugins.map(I=>{let B=typeof I=="string"?I:I.path,b=M.isAbsolute(B)?B:M.resolve(M.fromPortablePath(n),B);return typeof I=="string"?b:{path:b,spec:I.spec}})),m})):await T.writeFilePromise(i,`enableGlobalCache: ${s} -enableTelemetry: false -`);let a=(p=this.packages)!=null?p:[this.command],l=S.parseDescriptor(this.command).name,c=await this.cli.run(["add","--",...a],{cwd:r,quiet:this.quiet});if(c!==0)return c;this.quiet||this.context.stdout.write(` -`);let u=await fe.find(r,this.context.plugins),{project:g,workspace:f}=await Ke.find(u,r);if(f===null)throw new rt(g.cwd,r);await g.restoreInstallState();let h=await Kt.getWorkspaceAccessibleBinaries(f);return h.has(l)===!1&&h.size===1&&typeof this.packages=="undefined"&&(l=Array.from(h)[0][0]),await Kt.executeWorkspaceAccessibleBinary(f,l,this.args,{packageAccessibleBinaries:h,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};jC.paths=[["dlx"]],jC.usage=ye.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!')"`]]});var ele=jC;var Sze={commands:[$Ae,ele]},xze=Sze;var xL={};it(xL,{default:()=>Dze,fileUtils:()=>IL});var hf=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,YC=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Nr="file:";var IL={};it(IL,{makeArchiveFromLocator:()=>_0,makeBufferFromLocator:()=>BL,makeLocator:()=>wL,makeSpec:()=>tle,parseSpec:()=>yL});function yL(t){let{params:e,selector:r}=S.parseRange(t),i=M.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?S.parseLocator(e.locator):null,path:i}}function tle({parentLocator:t,path:e,folderHash:r,protocol:i}){let n=t!==null?{locator:S.stringifyLocator(t)}:{},s=typeof r!="undefined"?{hash:r}:{};return S.makeRange({protocol:i,source:e,selector:e,params:P(P({},s),n)})}function wL(t,{parentLocator:e,path:r,folderHash:i,protocol:n}){return S.makeLocator(t,tle({parentLocator:e,path:r,folderHash:i,protocol:n}))}async function _0(t,{protocol:e,fetchOptions:r,inMemory:i=!1}){let{parentLocator:n,path:s}=S.parseFileStyleRange(t.reference,{protocol:e}),o=v.isAbsolute(s)?{packageFs:new Ft(Se.root),prefixPath:Se.dot,localPath:Se.root}:await r.fetcher.fetch(n,r),a=o.localPath?{packageFs:new Ft(Se.root),prefixPath:v.relative(Se.root,o.localPath)}:o;o!==a&&o.releaseFs&&o.releaseFs();let l=a.packageFs,c=v.join(a.prefixPath,s);return await de.releaseAfterUseAsync(async()=>await Ai.makeArchiveFromDirectory(c,{baseFs:l,prefixPath:S.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:i}),a.releaseFs)}async function BL(t,{protocol:e,fetchOptions:r}){return(await _0(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var QL=class{supports(e,r){return!!e.reference.startsWith(Nr)}getLocalPath(e,r){let{parentLocator:i,path:n}=S.parseFileStyleRange(e.reference,{protocol:Nr});if(v.isAbsolute(n))return n;let s=r.fetcher.getLocalPath(i,r);return s===null?null:v.resolve(s,n)}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,P({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${S.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),skipIntegrityCheck:r.skipIntegrityCheck},r.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:S.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:o}}async fetchFromDisk(e,r){return _0(e,{protocol:Nr,fetchOptions:r})}};var kze=2,bL=class{supportsDescriptor(e,r){return e.range.match(hf)?!0:!!e.range.startsWith(Nr)}supportsLocator(e,r){return!!e.reference.startsWith(Nr)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){return hf.test(e.range)&&(e=S.makeDescriptor(e,`${Nr}${e.range}`)),S.bindDescriptor(e,{locator:S.stringifyLocator(r)})}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){if(!i.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:n,parentLocator:s}=yL(e.range);if(s===null)throw new Error("Assertion failed: The descriptor should have been bound");let o=await BL(S.makeLocator(e,S.makeRange({protocol:Nr,source:n,selector:n,params:{locator:S.stringifyLocator(s)}})),{protocol:Nr,fetchOptions:i.fetchOptions}),a=mn.makeHash(`${kze}`,o).slice(0,6);return[wL(e,{parentLocator:s,path:n,folderHash:a,protocol:Nr})]}async getSatisfying(e,r,i){return null}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),n=await de.releaseAfterUseAsync(async()=>await Ze.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return _(P({},e),{version:n.version||"0.0.0",languageName:n.languageName||r.project.configuration.get("defaultLanguageName"),linkType:gt.HARD,conditions:n.getConditions(),dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var vL=class{supports(e,r){return YC.test(e.reference)?!!e.reference.startsWith(Nr):!1}getLocalPath(e,r){return null}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,P({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${S.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),skipIntegrityCheck:r.skipIntegrityCheck},r.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:S.getIdentVendorPath(e),checksum:o}}async fetchFromDisk(e,r){let{parentLocator:i,path:n}=S.parseFileStyleRange(e.reference,{protocol:Nr}),s=v.isAbsolute(n)?{packageFs:new Ft(Se.root),prefixPath:Se.dot,localPath:Se.root}:await r.fetcher.fetch(i,r),o=s.localPath?{packageFs:new Ft(Se.root),prefixPath:v.relative(Se.root,s.localPath)}:s;s!==o&&s.releaseFs&&s.releaseFs();let a=o.packageFs,l=v.join(o.prefixPath,n),c=await a.readFilePromise(l);return await de.releaseAfterUseAsync(async()=>await Ai.convertToZip(c,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:S.getIdentVendorPath(e),stripComponents:1}),o.releaseFs)}};var SL=class{supportsDescriptor(e,r){return YC.test(e.range)?!!(e.range.startsWith(Nr)||hf.test(e.range)):!1}supportsLocator(e,r){return YC.test(e.reference)?!!e.reference.startsWith(Nr):!1}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,i){return hf.test(e.range)&&(e=S.makeDescriptor(e,`${Nr}${e.range}`)),S.bindDescriptor(e,{locator:S.stringifyLocator(r)})}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){let n=e.range;return n.startsWith(Nr)&&(n=n.slice(Nr.length)),[S.makeLocator(e,`${Nr}${M.toPortablePath(n)}`)]}async getSatisfying(e,r,i){return null}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),n=await de.releaseAfterUseAsync(async()=>await Ze.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return _(P({},e),{version:n.version||"0.0.0",languageName:n.languageName||r.project.configuration.get("defaultLanguageName"),linkType:gt.HARD,conditions:n.getConditions(),dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var Pze={fetchers:[vL,QL],resolvers:[SL,bL]},Dze=Pze;var PL={};it(PL,{default:()=>Nze});var rle=ie(require("querystring")),ile=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];function nle(t){return t?ile.some(e=>!!t.match(e)):!1}function sle(t){let e;for(let a of ile)if(e=t.match(a),e)break;if(!e)throw new Error(Rze(t));let[,r,i,n,s="master"]=e,{commit:o}=rle.default.parse(s);return s=o||s.replace(/[^:]*:/,""),{auth:r,username:i,reponame:n,treeish:s}}function Rze(t){return`Input cannot be parsed as a valid GitHub URL ('${t}').`}var kL=class{supports(e,r){return!!nle(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,P({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${S.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,r),skipIntegrityCheck:r.skipIntegrityCheck},r.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:S.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,r){let i=await Zt.get(this.getLocatorUrl(e,r),{configuration:r.project.configuration});return await T.mktempPromise(async n=>{let s=new Ft(n);await Ai.extractArchiveTo(i,s,{stripComponents:1});let o=Uc.splitRepoUrl(e.reference),a=v.join(n,"package.tgz");await Kt.prepareExternalProject(n,a,{configuration:r.project.configuration,report:r.report,workspace:o.extra.workspace,locator:e});let l=await T.readFilePromise(a);return await Ai.convertToZip(l,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:S.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,r){let{auth:i,username:n,reponame:s,treeish:o}=sle(e.reference);return`https://${i?`${i}@`:""}github.com/${n}/${s}/archive/${o}.tar.gz`}};var Fze={hooks:{async fetchHostedRepository(t,e,r){if(t!==null)return t;let i=new kL;if(!i.supports(e,r))return null;try{return await i.fetch(e,r)}catch(n){return null}}}},Nze=Fze;var FL={};it(FL,{default:()=>Tze});var qC=/^[^?]*\.(?:tar\.gz|tgz)(?:\?.*)?$/,JC=/^https?:/;var DL=class{supports(e,r){return qC.test(e.reference)?!!JC.test(e.reference):!1}getLocalPath(e,r){return null}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,P({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${S.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),skipIntegrityCheck:r.skipIntegrityCheck},r.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:S.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,r){let i=await Zt.get(e.reference,{configuration:r.project.configuration});return await Ai.convertToZip(i,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:S.getIdentVendorPath(e),stripComponents:1})}};var RL=class{supportsDescriptor(e,r){return qC.test(e.range)?!!JC.test(e.range):!1}supportsLocator(e,r){return qC.test(e.reference)?!!JC.test(e.reference):!1}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,i){return e}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){return[S.convertDescriptorToLocator(e)]}async getSatisfying(e,r,i){return null}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),n=await de.releaseAfterUseAsync(async()=>await Ze.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return _(P({},e),{version:n.version||"0.0.0",languageName:n.languageName||r.project.configuration.get("defaultLanguageName"),linkType:gt.HARD,conditions:n.getConditions(),dependencies:n.dependencies,peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var Lze={fetchers:[DL],resolvers:[RL]},Tze=Lze;var ML={};it(ML,{default:()=>M5e});var Rle=ie(Dle()),TL=ie(require("util")),WC=class extends Be{constructor(){super(...arguments);this.private=Y.Boolean("-p,--private",!1,{description:"Initialize a private package"});this.workspace=Y.Boolean("-w,--workspace",!1,{description:"Initialize a workspace root with a `packages/` directory"});this.install=Y.String("-i,--install",!1,{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"});this.usev2=Y.Boolean("-2",!1,{hidden:!0});this.yes=Y.Boolean("-y,--yes",{hidden:!0});this.assumeFreshProject=Y.Boolean("--assume-fresh-project",!1,{hidden:!0})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r=typeof this.install=="string"?this.install:this.usev2||this.install===!0?"latest":null;return r!==null?await this.executeProxy(e,r):await this.executeRegular(e)}async executeProxy(e,r){if(e.projectCwd!==null&&e.projectCwd!==this.context.cwd)throw new me("Cannot use the --install flag from within a project subdirectory");T.existsSync(this.context.cwd)||await T.mkdirPromise(this.context.cwd,{recursive:!0});let i=v.join(this.context.cwd,e.get("lockfileFilename"));T.existsSync(i)||await T.writeFilePromise(i,"");let n=await this.cli.run(["set","version",r],{quiet:!0});if(n!==0)return n;let s=[];return this.private&&s.push("-p"),this.workspace&&s.push("-w"),this.yes&&s.push("-y"),await T.mktempPromise(async o=>{let{code:a}=await hr.pipevp("yarn",["init",...s],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await Kt.makeScriptEnv({binFolder:o})});return a})}async executeRegular(e){var l;let r=null;try{r=(await Ke.find(e,this.context.cwd)).project}catch{r=null}T.existsSync(this.context.cwd)||await T.mkdirPromise(this.context.cwd,{recursive:!0});let i=await Ze.tryFind(this.context.cwd)||new Ze,n=Object.fromEntries(e.get("initFields").entries());i.load(n),i.name=(l=i.name)!=null?l:S.makeIdent(e.get("initScope"),v.basename(this.context.cwd)),i.packageManager=Zr&&de.isTaggedYarnVersion(Zr)?`yarn@${Zr}`:null,typeof i.raw.private=="undefined"&&(this.private||this.workspace&&i.workspaceDefinitions.length===0)&&(i.private=!0),this.workspace&&i.workspaceDefinitions.length===0&&(await T.mkdirPromise(v.join(this.context.cwd,"packages"),{recursive:!0}),i.workspaceDefinitions=[{pattern:"packages/*"}]);let s={};i.exportTo(s),TL.inspect.styles.name="cyan",this.context.stdout.write(`${(0,TL.inspect)(s,{depth:Infinity,colors:!0,compact:!1})} -`);let o=v.join(this.context.cwd,Ze.fileName);await T.changeFilePromise(o,`${JSON.stringify(s,null,2)} -`,{automaticNewlines:!0});let a=v.join(this.context.cwd,"README.md");if(T.existsSync(a)||await T.writeFilePromise(a,`# ${S.stringifyIdent(i.name)} -`),!r||r.cwd===this.context.cwd){let c=v.join(this.context.cwd,wt.lockfile);T.existsSync(c)||await T.writeFilePromise(c,"");let g=["/.yarn/*","!/.yarn/patches","!/.yarn/plugins","!/.yarn/releases","!/.yarn/sdks","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!/.yarn/cache","#/.pnp.*"].map(m=>`${m} -`).join(""),f=v.join(this.context.cwd,".gitignore");T.existsSync(f)||await T.writeFilePromise(f,g);let h={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};(0,Rle.default)(h,e.get("initEditorConfig"));let p=`root = true -`;for(let[m,I]of Object.entries(h)){p+=` -[${m}] -`;for(let[B,b]of Object.entries(I))p+=`${B.replace(/[A-Z]/g,H=>`_${H.toLowerCase()}`)} = ${b} -`}let d=v.join(this.context.cwd,".editorconfig");T.existsSync(d)||await T.writeFilePromise(d,p),T.existsSync(v.join(this.context.cwd,".git"))||await hr.execvp("git",["init"],{cwd:this.context.cwd})}}};WC.paths=[["init"]],WC.usage=ye.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"]]});var Fle=WC;var T5e={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:ge.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:ge.MAP,valueDefinition:{description:"",type:ge.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:ge.MAP,valueDefinition:{description:"",type:ge.ANY}}},commands:[Fle]},M5e=T5e;var GL={};it(GL,{default:()=>K5e});var Ua="portal:",Ha="link:";var OL=class{supports(e,r){return!!e.reference.startsWith(Ua)}getLocalPath(e,r){let{parentLocator:i,path:n}=S.parseFileStyleRange(e.reference,{protocol:Ua});if(v.isAbsolute(n))return n;let s=r.fetcher.getLocalPath(i,r);return s===null?null:v.resolve(s,n)}async fetch(e,r){var c;let{parentLocator:i,path:n}=S.parseFileStyleRange(e.reference,{protocol:Ua}),s=v.isAbsolute(n)?{packageFs:new Ft(Se.root),prefixPath:Se.dot,localPath:Se.root}:await r.fetcher.fetch(i,r),o=s.localPath?{packageFs:new Ft(Se.root),prefixPath:v.relative(Se.root,s.localPath),localPath:Se.root}:s;s!==o&&s.releaseFs&&s.releaseFs();let a=o.packageFs,l=v.resolve((c=o.localPath)!=null?c:o.packageFs.getRealPath(),o.prefixPath,n);return s.localPath?{packageFs:new Ft(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:Se.dot,localPath:l}:{packageFs:new Zo(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:Se.dot}}};var KL=class{supportsDescriptor(e,r){return!!e.range.startsWith(Ua)}supportsLocator(e,r){return!!e.reference.startsWith(Ua)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){return S.bindDescriptor(e,{locator:S.stringifyLocator(r)})}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){let n=e.range.slice(Ua.length);return[S.makeLocator(e,`${Ua}${M.toPortablePath(n)}`)]}async getSatisfying(e,r,i){return null}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),n=await de.releaseAfterUseAsync(async()=>await Ze.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return _(P({},e),{version:n.version||"0.0.0",languageName:n.languageName||r.project.configuration.get("defaultLanguageName"),linkType:gt.SOFT,conditions:n.getConditions(),dependencies:new Map([...n.dependencies]),peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var UL=class{supports(e,r){return!!e.reference.startsWith(Ha)}getLocalPath(e,r){let{parentLocator:i,path:n}=S.parseFileStyleRange(e.reference,{protocol:Ha});if(v.isAbsolute(n))return n;let s=r.fetcher.getLocalPath(i,r);return s===null?null:v.resolve(s,n)}async fetch(e,r){var c;let{parentLocator:i,path:n}=S.parseFileStyleRange(e.reference,{protocol:Ha}),s=v.isAbsolute(n)?{packageFs:new Ft(Se.root),prefixPath:Se.dot,localPath:Se.root}:await r.fetcher.fetch(i,r),o=s.localPath?{packageFs:new Ft(Se.root),prefixPath:v.relative(Se.root,s.localPath),localPath:Se.root}:s;s!==o&&s.releaseFs&&s.releaseFs();let a=o.packageFs,l=v.resolve((c=o.localPath)!=null?c:o.packageFs.getRealPath(),o.prefixPath,n);return s.localPath?{packageFs:new Ft(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:Se.dot,discardFromLookup:!0,localPath:l}:{packageFs:new Zo(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:Se.dot,discardFromLookup:!0}}};var HL=class{supportsDescriptor(e,r){return!!e.range.startsWith(Ha)}supportsLocator(e,r){return!!e.reference.startsWith(Ha)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){return S.bindDescriptor(e,{locator:S.stringifyLocator(r)})}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){let n=e.range.slice(Ha.length);return[S.makeLocator(e,`${Ha}${M.toPortablePath(n)}`)]}async getSatisfying(e,r,i){return null}async resolve(e,r){return _(P({},e),{version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:gt.SOFT,conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map})}};var O5e={fetchers:[UL,OL],resolvers:[HL,KL]},K5e=O5e;var mT={};it(mT,{default:()=>Y6e});var Ga;(function(i){i[i.YES=0]="YES",i[i.NO=1]="NO",i[i.DEPENDS=2]="DEPENDS"})(Ga||(Ga={}));var jL=(t,e)=>`${t}@${e}`,Nle=(t,e)=>{let r=e.indexOf("#"),i=r>=0?e.substring(r+1):e;return jL(t,i)},qs;(function(s){s[s.NONE=-1]="NONE",s[s.PERF=0]="PERF",s[s.CHECK=1]="CHECK",s[s.REASONS=2]="REASONS",s[s.INTENSIVE_CHECK=9]="INTENSIVE_CHECK"})(qs||(qs={}));var Tle=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),i=e.check||r>=9,n=e.hoistingLimits||new Map,s={check:i,debugLevel:r,hoistingLimits:n,fastLookupPossible:!0},o;s.debugLevel>=0&&(o=Date.now());let a=U5e(t,s),l=!1,c=0;do l=YL(a,[a],new Set([a.locator]),new Map,s).anotherRoundNeeded,s.fastLookupPossible=!1,c++;while(l);if(s.debugLevel>=0&&console.log(`hoist time: ${Date.now()-o}ms, rounds: ${c}`),s.debugLevel>=1){let u=zC(a);if(YL(a,[a],new Set([a.locator]),new Map,s).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree: -${u}, next tree: -${zC(a)}`);let f=Lle(a);if(f)throw new Error(`${f}, after hoisting finished: -${zC(a)}`)}return s.debugLevel>=2&&console.log(zC(a)),H5e(a)},G5e=t=>{let e=t[t.length-1],r=new Map,i=new Set,n=s=>{if(!i.has(s)){i.add(s);for(let o of s.hoistedDependencies.values())r.set(o.name,o);for(let o of s.dependencies.values())s.peerNames.has(o.name)||n(o)}};return n(e),r},j5e=t=>{let e=t[t.length-1],r=new Map,i=new Set,n=new Set,s=(o,a)=>{if(i.has(o))return;i.add(o);for(let c of o.hoistedDependencies.values())if(!a.has(c.name)){let u;for(let g of t)u=g.dependencies.get(c.name),u&&r.set(u.name,u)}let l=new Set;for(let c of o.dependencies.values())l.add(c.name);for(let c of o.dependencies.values())o.peerNames.has(c.name)||s(c,l)};return s(e,n),r},Mle=(t,e)=>{if(e.decoupled)return e;let{name:r,references:i,ident:n,locator:s,dependencies:o,originalDependencies:a,hoistedDependencies:l,peerNames:c,reasons:u,isHoistBorder:g,hoistPriority:f,isWorkspace:h,hoistedFrom:p,hoistedTo:d}=e,m={name:r,references:new Set(i),ident:n,locator:s,dependencies:new Map(o),originalDependencies:new Map(a),hoistedDependencies:new Map(l),peerNames:new Set(c),reasons:new Map(u),decoupled:!0,isHoistBorder:g,hoistPriority:f,isWorkspace:h,hoistedFrom:new Map(p),hoistedTo:new Map(d)},I=m.dependencies.get(r);return I&&I.ident==m.ident&&m.dependencies.set(r,m),t.dependencies.set(m.name,m),m},Y5e=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let n of t.dependencies.values())t.peerNames.has(n.name)||r.set(n.name,[n.ident]);let i=Array.from(e.keys());i.sort((n,s)=>{let o=e.get(n),a=e.get(s);return a.hoistPriority!==o.hoistPriority?a.hoistPriority-o.hoistPriority:a.peerDependents.size!==o.peerDependents.size?a.peerDependents.size-o.peerDependents.size:a.dependents.size-o.dependents.size});for(let n of i){let s=n.substring(0,n.indexOf("@",1)),o=n.substring(s.length+1);if(!t.peerNames.has(s)){let a=r.get(s);a||(a=[],r.set(s,a)),a.indexOf(o)<0&&a.push(o)}}return r},qL=t=>{let e=new Set,r=(i,n=new Set)=>{if(!n.has(i)){n.add(i);for(let s of i.peerNames)if(!t.peerNames.has(s)){let o=t.dependencies.get(s);o&&!e.has(o)&&r(o,n)}e.add(i)}};for(let i of t.dependencies.values())t.peerNames.has(i.name)||r(i);return e},YL=(t,e,r,i,n,s=new Set)=>{let o=e[e.length-1];if(s.has(o))return{anotherRoundNeeded:!1,isGraphChanged:!1};s.add(o);let a=J5e(o),l=Y5e(o,a),c=t==o?new Map:n.fastLookupPossible?G5e(e):j5e(e),u,g=!1,f=!1,h=new Map(Array.from(l.entries()).map(([d,m])=>[d,m[0]])),p=new Map;do{let d=q5e(t,e,r,c,h,l,i,p,n);d.isGraphChanged&&(f=!0),d.anotherRoundNeeded&&(g=!0),u=!1;for(let[m,I]of l)I.length>1&&!o.dependencies.has(m)&&(h.delete(m),I.shift(),h.set(m,I[0]),u=!0)}while(u);for(let d of o.dependencies.values())if(!o.peerNames.has(d.name)&&!r.has(d.locator)){r.add(d.locator);let m=YL(t,[...e,d],r,p,n);m.isGraphChanged&&(f=!0),m.anotherRoundNeeded&&(g=!0),r.delete(d.locator)}return{anotherRoundNeeded:g,isGraphChanged:f}},W5e=(t,e,r,i,n,s,o,a,{outputReason:l,fastLookupPossible:c})=>{let u,g=null,f=new Set;l&&(u=`${Array.from(e).map(m=>wi(m)).join("\u2192")}`);let h=r[r.length-1],d=!(i.ident===h.ident);if(l&&!d&&(g="- self-reference"),d&&(d=!i.isWorkspace,l&&!d&&(g="- workspace")),d&&(d=!h.isWorkspace||h.hoistedFrom.has(i.name)||e.size===1,l&&!d&&(g=h.reasons.get(i.name))),d&&(d=!t.peerNames.has(i.name),l&&!d&&(g=`- cannot shadow peer: ${wi(t.originalDependencies.get(i.name).locator)} at ${u}`)),d){let m=!1,I=n.get(i.name);if(m=!I||I.ident===i.ident,l&&!m&&(g=`- filled by: ${wi(I.locator)} at ${u}`),m)for(let B=r.length-1;B>=1;B--){let R=r[B].dependencies.get(i.name);if(R&&R.ident!==i.ident){m=!1;let H=a.get(h);H||(H=new Set,a.set(h,H)),H.add(i.name),l&&(g=`- filled by ${wi(R.locator)} at ${r.slice(0,B).map(L=>wi(L.locator)).join("\u2192")}`);break}}d=m}if(d&&(d=s.get(i.name)===i.ident,l&&!d&&(g=`- filled by: ${wi(o.get(i.name)[0])} at ${u}`)),d){let m=!0,I=new Set(i.peerNames);for(let B=r.length-1;B>=1;B--){let b=r[B];for(let R of I){if(b.peerNames.has(R)&&b.originalDependencies.has(R))continue;let H=b.dependencies.get(R);H&&t.dependencies.get(R)!==H&&(B===r.length-1?f.add(H):(f=null,m=!1,l&&(g=`- peer dependency ${wi(H.locator)} from parent ${wi(b.locator)} was not hoisted to ${u}`))),I.delete(R)}if(!m)break}d=m}if(d&&!c)for(let m of i.hoistedDependencies.values()){let I=n.get(m.name);if(!I||m.ident!==I.ident){d=!1,l&&(g=`- previously hoisted dependency mismatch, needed: ${wi(m.locator)}, available: ${wi(I==null?void 0:I.locator)}`);break}}return f!==null&&f.size>0?{isHoistable:2,dependsOn:f,reason:g}:{isHoistable:d?0:1,reason:g}},q5e=(t,e,r,i,n,s,o,a,l)=>{let c=e[e.length-1],u=new Set,g=!1,f=!1,h=(m,I,B,b)=>{if(u.has(B))return;let R=[...I,B.locator],H=new Map,L=new Map;for(let q of qL(B)){let A=W5e(c,r,[c,...m,B],q,i,n,s,a,{outputReason:l.debugLevel>=2,fastLookupPossible:l.fastLookupPossible});if(L.set(q,A),A.isHoistable===2)for(let V of A.dependsOn){let W=H.get(V.name)||new Set;W.add(q.name),H.set(V.name,W)}}let K=new Set,J=(q,A,V)=>{if(!K.has(q)){K.add(q),L.set(q,{isHoistable:1,reason:V});for(let W of H.get(q.name)||[])J(B.dependencies.get(W),A,l.debugLevel>=2?`- peer dependency ${wi(q.locator)} from parent ${wi(B.locator)} was not hoisted`:"")}};for(let[q,A]of L)A.isHoistable===1&&J(q,A,A.reason);for(let q of L.keys())if(!K.has(q)){f=!0;let A=o.get(B);A&&A.has(q.name)&&(g=!0),B.dependencies.delete(q.name),B.hoistedDependencies.set(q.name,q),B.reasons.delete(q.name);let V=c.dependencies.get(q.name);if(l.debugLevel>=2){let W=Array.from(I).concat([B.locator]).map(F=>wi(F)).join("\u2192"),X=c.hoistedFrom.get(q.name);X||(X=[],c.hoistedFrom.set(q.name,X)),X.push(W),B.hoistedTo.set(q.name,Array.from(e).map(F=>wi(F.locator)).join("\u2192"))}if(!V)c.ident!==q.ident&&(c.dependencies.set(q.name,q),b.add(q));else for(let W of q.references)V.references.add(W)}if(l.check){let q=Lle(t);if(q)throw new Error(`${q}, after hoisting dependencies of ${[c,...m,B].map(A=>wi(A.locator)).join("\u2192")}: -${zC(t)}`)}let ne=qL(B);for(let q of ne)if(K.has(q)){let A=L.get(q);if((n.get(q.name)===q.ident||!B.reasons.has(q.name))&&A.isHoistable!==0&&B.reasons.set(q.name,A.reason),!q.isHoistBorder&&R.indexOf(q.locator)<0){u.add(B);let W=Mle(B,q);h([...m,B],[...I,B.locator],W,d),u.delete(B)}}},p,d=new Set(qL(c));do{p=d,d=new Set;for(let m of p){if(m.locator===c.locator||m.isHoistBorder)continue;let I=Mle(c,m);h([],Array.from(r),I,d)}}while(d.size>0);return{anotherRoundNeeded:g,isGraphChanged:f}},Lle=t=>{let e=[],r=new Set,i=new Set,n=(s,o,a)=>{if(r.has(s)||(r.add(s),i.has(s)))return;let l=new Map(o);for(let c of s.dependencies.values())s.peerNames.has(c.name)||l.set(c.name,c);for(let c of s.originalDependencies.values()){let u=l.get(c.name),g=()=>`${Array.from(i).concat([s]).map(f=>wi(f.locator)).join("\u2192")}`;if(s.peerNames.has(c.name)){let f=o.get(c.name);(f!==u||!f||f.ident!==c.ident)&&e.push(`${g()} - broken peer promise: expected ${c.ident} but found ${f&&f.ident}`)}else{let f=a.hoistedFrom.get(s.name),h=s.hoistedTo.get(c.name),p=`${f?` hoisted from ${f.join(", ")}`:""}`,d=`${h?` hoisted to ${h}`:""}`,m=`${g()}${p}`;u?u.ident!==c.ident&&e.push(`${m} - broken require promise for ${c.name}${d}: expected ${c.ident}, but found: ${u.ident}`):e.push(`${m} - broken require promise: no required dependency ${c.name}${d} found`)}}i.add(s);for(let c of s.dependencies.values())s.peerNames.has(c.name)||n(c,l,s);i.delete(s)};return n(t,t.dependencies,t),e.join(` -`)},U5e=(t,e)=>{let{identName:r,name:i,reference:n,peerNames:s}=t,o={name:i,references:new Set([n]),locator:jL(r,n),ident:Nle(r,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(s),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,isWorkspace:!0,hoistedFrom:new Map,hoistedTo:new Map},a=new Map([[t,o]]),l=(c,u)=>{let g=a.get(c),f=!!g;if(!g){let{name:h,identName:p,reference:d,peerNames:m,hoistPriority:I,isWorkspace:B}=c,b=e.hoistingLimits.get(u.locator);g={name:h,references:new Set([d]),locator:jL(p,d),ident:Nle(p,d),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(m),reasons:new Map,decoupled:!0,isHoistBorder:b?b.has(h):!1,hoistPriority:I||0,isWorkspace:B||!1,hoistedFrom:new Map,hoistedTo:new Map},a.set(c,g)}if(u.dependencies.set(c.name,g),u.originalDependencies.set(c.name,g),f){let h=new Set,p=d=>{if(!h.has(d)){h.add(d),d.decoupled=!1;for(let m of d.dependencies.values())d.peerNames.has(m.name)||p(m)}};p(g)}else for(let h of c.dependencies)l(h,g)};for(let c of t.dependencies)l(c,o);return o},JL=t=>t.substring(0,t.indexOf("@",1)),H5e=t=>{let e={name:t.name,identName:JL(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),i=(n,s,o)=>{let a=r.has(n),l;if(s===n)l=o;else{let{name:c,references:u,locator:g}=n;l={name:c,identName:JL(g),references:u,dependencies:new Set}}if(o.dependencies.add(l),!a){r.add(n);for(let c of n.dependencies.values())n.peerNames.has(c.name)||i(c,n,l);r.delete(n)}};for(let n of t.dependencies.values())i(n,t,e);return e},J5e=t=>{let e=new Map,r=new Set([t]),i=o=>`${o.name}@${o.ident}`,n=o=>{let a=i(o),l=e.get(a);return l||(l={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(a,l)),l},s=(o,a)=>{let l=!!r.has(a);if(n(a).dependents.add(o.ident),!l){r.add(a);for(let u of a.dependencies.values()){let g=n(u);g.hoistPriority=Math.max(g.hoistPriority,u.hoistPriority),a.peerNames.has(u.name)?g.peerDependents.add(a.ident):s(a,u)}}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||s(t,o);return e},wi=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let i=t.substring(e+1);if(i==="workspace:.")return".";if(i){let n=(i.indexOf("#")>0?i.split("#")[1]:i).replace("npm:","");return i.startsWith("virtual")&&(r=`v:${r}`),n.startsWith("workspace")&&(r=`w:${r}`,n=""),`${r}${n?`@${n}`:""}`}else return`${r}`},Ole=5e4,zC=t=>{let e=0,r=(n,s,o="")=>{if(e>Ole||s.has(n))return"";e++;let a=Array.from(n.dependencies.values()).sort((c,u)=>c.name.localeCompare(u.name)),l="";s.add(n);for(let c=0;c":"")+(f!==u.name?`a:${u.name}:`:"")+wi(u.locator)+(g?` ${g}`:"")+(u!==n&&h.length>0?`, hoisted from: ${h.join(", ")}`:"")} -`,l+=r(u,s,`${o}${cOle?` -Tree is too large, part of the tree has been dunped -`:"")};var Js;(function(r){r.HARD="HARD",r.SOFT="SOFT"})(Js||(Js={}));var Sn;(function(i){i.WORKSPACES="workspaces",i.DEPENDENCIES="dependencies",i.NONE="none"})(Sn||(Sn={}));var Kle="node_modules",Hc="$wsroot$";var VC=(t,e)=>{let{packageTree:r,hoistingLimits:i,errors:n,preserveSymlinksRequired:s}=z5e(t,e),o=null;if(n.length===0){let a=Tle(r,{hoistingLimits:i});o=V5e(t,a,e)}return{tree:o,errors:n,preserveSymlinksRequired:s}},ms=t=>`${t.name}@${t.reference}`,WL=t=>{let e=new Map;for(let[r,i]of t.entries())if(!i.dirList){let n=e.get(i.locator);n||(n={target:i.target,linkType:i.linkType,locations:[],aliases:i.aliases},e.set(i.locator,n)),n.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((i,n)=>{let s=i.split(v.delimiter).length,o=n.split(v.delimiter).length;return s!==o?o-s:n.localeCompare(i)});return e},Ule=(t,e)=>{let r=S.isVirtualLocator(t)?S.devirtualizeLocator(t):t,i=S.isVirtualLocator(e)?S.devirtualizeLocator(e):e;return S.areLocatorsEqual(r,i)},zL=(t,e,r,i)=>{if(t.linkType!==Js.SOFT)return!1;let n=M.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return v.contains(i,n)===null},_5e=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 i=M.toPortablePath(e.packageLocation.slice(0,-1)),n=new Map,s={children:new Map},o=t.getDependencyTreeRoots(),a=new Map,l=new Set,c=(f,h)=>{let p=ms(f);if(l.has(p))return;l.add(p);let d=t.getPackageInformation(f);if(d){let m=h?ms(h):"";if(ms(f)!==m&&d.linkType===Js.SOFT&&!zL(d,f,t,i)){let I=Hle(d,f,t);(!a.get(I)||f.reference.startsWith("workspace:"))&&a.set(I,f)}for(let[I,B]of d.packageDependencies)B!==null&&(d.packagePeers.has(I)||c(t.getLocator(I,B),f))}};for(let f of o)c(f,null);let u=i.split(v.sep);for(let f of a.values()){let h=t.getPackageInformation(f),d=M.toPortablePath(h.packageLocation.slice(0,-1)).split(v.sep).slice(u.length),m=s;for(let I of d){let B=m.children.get(I);B||(B={children:new Map},m.children.set(I,B)),m=B}m.workspaceLocator=f}let g=(f,h)=>{if(f.workspaceLocator){let p=ms(h),d=n.get(p);d||(d=new Set,n.set(p,d)),d.add(f.workspaceLocator)}for(let p of f.children.values())g(p,f.workspaceLocator||h)};for(let f of s.children.values())g(f,s.workspaceLocator);return n},z5e=(t,e)=>{let r=[],i=!1,n=new Map,s=_5e(t),o=t.getPackageInformation(t.topLevel);if(o===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let a=t.findPackageLocator(o.packageLocation);if(a===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let l=M.toPortablePath(o.packageLocation.slice(0,-1)),c={name:a.name,identName:a.name,reference:a.reference,peerNames:o.packagePeers,dependencies:new Set,isWorkspace:!0},u=new Map,g=(h,p)=>`${ms(p)}:${h}`,f=(h,p,d,m,I,B,b,R)=>{var X,F;let H=g(h,d),L=u.get(H),K=!!L;!K&&d.name===a.name&&d.reference===a.reference&&(L=c,u.set(H,c));let J=zL(p,d,t,l);if(!L){let D=p.linkType===Js.SOFT&&d.name.endsWith(Hc);L={name:h,identName:d.name,reference:d.reference,dependencies:new Set,peerNames:D?new Set:p.packagePeers,isWorkspace:D},u.set(H,L)}let ne;if(J?ne=2:I.linkType===Js.SOFT?ne=1:ne=0,L.hoistPriority=Math.max(L.hoistPriority||0,ne),R&&!J){let D=ms({name:m.identName,reference:m.reference}),he=n.get(D)||new Set;n.set(D,he),he.add(L.name)}let q=new Map(p.packageDependencies);if(e.project){let D=e.project.workspacesByCwd.get(M.toPortablePath(p.packageLocation.slice(0,-1)));if(D){let he=new Set([...Array.from(D.manifest.peerDependencies.values(),pe=>S.stringifyIdent(pe)),...Array.from(D.manifest.peerDependenciesMeta.keys())]);for(let pe of he)q.has(pe)||(q.set(pe,B.get(pe)||null),L.peerNames.add(pe))}}let A=ms({name:d.name.replace(Hc,""),reference:d.reference}),V=s.get(A);if(V)for(let D of V)q.set(`${D.name}${Hc}`,D.reference);(p!==I||p.linkType!==Js.SOFT||!e.selfReferencesByCwd||e.selfReferencesByCwd.get(b))&&m.dependencies.add(L);let W=d!==a&&p.linkType===Js.SOFT&&!d.name.endsWith(Hc)&&!J;if(!K&&!W){let D=new Map;for(let[he,pe]of q)if(pe!==null){let Ne=t.getLocator(he,pe),Pe=t.getLocator(he.replace(Hc,""),pe),qe=t.getPackageInformation(Pe);if(qe===null)throw new Error("Assertion failed: Expected the package to have been registered");let re=zL(qe,Ne,t,l);if(e.validateExternalSoftLinks&&e.project&&re){qe.packageDependencies.size>0&&(i=!0);for(let[De,$]of qe.packageDependencies)if($!==null){let G=S.parseLocator(Array.isArray($)?`${$[0]}@${$[1]}`:`${De}@${$}`);if(ms(G)!==ms(Ne)){let Ce=q.get(De);if(Ce){let ee=S.parseLocator(Array.isArray(Ce)?`${Ce[0]}@${Ce[1]}`:`${De}@${Ce}`);Ule(ee,G)||r.push({messageName:z.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK,text:`Cannot link ${S.prettyIdent(e.project.configuration,S.parseIdent(Ne.name))} into ${S.prettyLocator(e.project.configuration,S.parseLocator(`${d.name}@${d.reference}`))} dependency ${S.prettyLocator(e.project.configuration,G)} conflicts with parent dependency ${S.prettyLocator(e.project.configuration,ee)}`})}else{let ee=D.get(De);if(ee){let Ue=ee.target,Oe=S.parseLocator(Array.isArray(Ue)?`${Ue[0]}@${Ue[1]}`:`${De}@${Ue}`);Ule(Oe,G)||r.push({messageName:z.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK,text:`Cannot link ${S.prettyIdent(e.project.configuration,S.parseIdent(Ne.name))} into ${S.prettyLocator(e.project.configuration,S.parseLocator(`${d.name}@${d.reference}`))} dependency ${S.prettyLocator(e.project.configuration,G)} conflicts with dependency ${S.prettyLocator(e.project.configuration,Oe)} from sibling portal ${S.prettyIdent(e.project.configuration,S.parseIdent(ee.portal.name))}`})}else D.set(De,{target:G.reference,portal:Ne})}}}}let se=(X=e.hoistingLimitsByCwd)==null?void 0:X.get(b),be=re?b:v.relative(l,M.toPortablePath(qe.packageLocation))||Se.dot,ae=(F=e.hoistingLimitsByCwd)==null?void 0:F.get(be),Ae=se===Sn.DEPENDENCIES||ae===Sn.DEPENDENCIES||ae===Sn.WORKSPACES;f(ms(Ne)===ms(d)?h:he,qe,Ne,L,p,q,be,Ae)}}};return f(a.name,o,a,c,o,o.packageDependencies,Se.dot,!1),{packageTree:c,hoistingLimits:n,errors:r,preserveSymlinksRequired:i}};function Hle(t,e,r){let i=r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation;return M.toPortablePath(i||t.packageLocation)}function X5e(t,e,r){let i=e.getLocator(t.name.replace(Hc,""),t.reference),n=e.getPackageInformation(i);if(n===null)throw new Error("Assertion failed: Expected the package to be registered");let s,o;return r.pnpifyFs?(o=M.toPortablePath(n.packageLocation),s=Js.SOFT):(o=Hle(n,t,e),s=n.linkType),{linkType:s,target:o}}var V5e=(t,e,r)=>{let i=new Map,n=(u,g,f)=>{let{linkType:h,target:p}=X5e(u,t,r);return{locator:ms(u),nodePath:g,target:p,linkType:h,aliases:f}},s=u=>{let[g,f]=u.split("/");return f?{scope:kr(g),name:kr(f)}:{scope:null,name:kr(g)}},o=new Set,a=(u,g,f)=>{if(!o.has(u)){o.add(u);for(let h of u.dependencies){if(h===u)continue;let p=Array.from(h.references).sort(),d={name:h.identName,reference:p[0]},{name:m,scope:I}=s(h.name),B=I?[I,m]:[m],b=v.join(g,Kle),R=v.join(b,...B),H=`${f}/${d.name}`,L=n(d,f,p.slice(1)),K=!1;if(L.linkType===Js.SOFT&&r.project){let J=r.project.workspacesByCwd.get(L.target.slice(0,-1));K=!!(J&&!J.manifest.name)}if(!h.name.endsWith(Hc)&&!K){let J=i.get(R);if(J){if(J.dirList)throw new Error(`Assertion failed: ${R} cannot merge dir node with leaf node`);{let V=S.parseLocator(J.locator),W=S.parseLocator(L.locator);if(J.linkType!==L.linkType)throw new Error(`Assertion failed: ${R} cannot merge nodes with different link types ${J.nodePath}/${S.stringifyLocator(V)} and ${f}/${S.stringifyLocator(W)}`);if(V.identHash!==W.identHash)throw new Error(`Assertion failed: ${R} cannot merge nodes with different idents ${J.nodePath}/${S.stringifyLocator(V)} and ${f}/s${S.stringifyLocator(W)}`);L.aliases=[...L.aliases,...J.aliases,S.parseLocator(J.locator).reference]}}i.set(R,L);let ne=R.split("/"),q=ne.indexOf(Kle),A=ne.length-1;for(;q>=0&&A>q;){let V=M.toPortablePath(ne.slice(0,A).join(v.sep)),W=kr(ne[A]),X=i.get(V);if(!X)i.set(V,{dirList:new Set([W])});else if(X.dirList){if(X.dirList.has(W))break;X.dirList.add(W)}A--}}a(h,L.linkType===Js.SOFT?L.target:R,H)}}},l=n({name:e.name,reference:Array.from(e.references)[0]},"",[]),c=l.target;return i.set(c,l),a(e,c,""),i};var oT={};it(oT,{PnpInstaller:()=>Cf,PnpLinker:()=>jc,default:()=>m6e,getPnpPath:()=>qA,jsInstallUtils:()=>Ws,pnpUtils:()=>nT,quotePathIfNeeded:()=>uce});var lce=ie(Or()),cce=ie(require("url"));var Gle;(function(r){r.HARD="HARD",r.SOFT="SOFT"})(Gle||(Gle={}));var Ht;(function(f){f.DEFAULT="DEFAULT",f.TOP_LEVEL="TOP_LEVEL",f.FALLBACK_EXCLUSION_LIST="FALLBACK_EXCLUSION_LIST",f.FALLBACK_EXCLUSION_ENTRIES="FALLBACK_EXCLUSION_ENTRIES",f.FALLBACK_EXCLUSION_DATA="FALLBACK_EXCLUSION_DATA",f.PACKAGE_REGISTRY_DATA="PACKAGE_REGISTRY_DATA",f.PACKAGE_REGISTRY_ENTRIES="PACKAGE_REGISTRY_ENTRIES",f.PACKAGE_STORE_DATA="PACKAGE_STORE_DATA",f.PACKAGE_STORE_ENTRIES="PACKAGE_STORE_ENTRIES",f.PACKAGE_INFORMATION_DATA="PACKAGE_INFORMATION_DATA",f.PACKAGE_DEPENDENCIES="PACKAGE_DEPENDENCIES",f.PACKAGE_DEPENDENCY="PACKAGE_DEPENDENCY"})(Ht||(Ht={}));var jle={[Ht.DEFAULT]:{collapsed:!1,next:{["*"]:Ht.DEFAULT}},[Ht.TOP_LEVEL]:{collapsed:!1,next:{fallbackExclusionList:Ht.FALLBACK_EXCLUSION_LIST,packageRegistryData:Ht.PACKAGE_REGISTRY_DATA,["*"]:Ht.DEFAULT}},[Ht.FALLBACK_EXCLUSION_LIST]:{collapsed:!1,next:{["*"]:Ht.FALLBACK_EXCLUSION_ENTRIES}},[Ht.FALLBACK_EXCLUSION_ENTRIES]:{collapsed:!0,next:{["*"]:Ht.FALLBACK_EXCLUSION_DATA}},[Ht.FALLBACK_EXCLUSION_DATA]:{collapsed:!0,next:{["*"]:Ht.DEFAULT}},[Ht.PACKAGE_REGISTRY_DATA]:{collapsed:!1,next:{["*"]:Ht.PACKAGE_REGISTRY_ENTRIES}},[Ht.PACKAGE_REGISTRY_ENTRIES]:{collapsed:!0,next:{["*"]:Ht.PACKAGE_STORE_DATA}},[Ht.PACKAGE_STORE_DATA]:{collapsed:!1,next:{["*"]:Ht.PACKAGE_STORE_ENTRIES}},[Ht.PACKAGE_STORE_ENTRIES]:{collapsed:!0,next:{["*"]:Ht.PACKAGE_INFORMATION_DATA}},[Ht.PACKAGE_INFORMATION_DATA]:{collapsed:!1,next:{packageDependencies:Ht.PACKAGE_DEPENDENCIES,["*"]:Ht.DEFAULT}},[Ht.PACKAGE_DEPENDENCIES]:{collapsed:!1,next:{["*"]:Ht.PACKAGE_DEPENDENCY}},[Ht.PACKAGE_DEPENDENCY]:{collapsed:!0,next:{["*"]:Ht.DEFAULT}}};function Z5e(t,e,r){let i="";i+="[";for(let n=0,s=t.length;ns(o)));let n=r.map((s,o)=>o);return n.sort((s,o)=>{for(let a of i){let l=a[s]a[o]?1:0;if(l!==0)return l}return 0}),n.map(s=>r[s])}function r6e(t){let e=new Map,r=_C(t.fallbackExclusionList||[],[({name:i,reference:n})=>i,({name:i,reference:n})=>n]);for(let{name:i,reference:n}of r){let s=e.get(i);typeof s=="undefined"&&e.set(i,s=new Set),s.add(n)}return Array.from(e).map(([i,n])=>[i,Array.from(n)])}function i6e(t){return _C(t.fallbackPool||[],([e])=>e)}function n6e(t){let e=[];for(let[r,i]of _C(t.packageRegistry,([n])=>n===null?"0":`1${n}`)){let n=[];e.push([r,n]);for(let[s,{packageLocation:o,packageDependencies:a,packagePeers:l,linkType:c,discardFromLookup:u}]of _C(i,([g])=>g===null?"0":`1${g}`)){let g=[];r!==null&&s!==null&&!a.has(r)&&g.push([r,s]);for(let[p,d]of _C(a.entries(),([m])=>m))g.push([p,d]);let f=l&&l.size>0?Array.from(l):void 0,h=u||void 0;n.push([s,{packageLocation:o,packageDependencies:g,packagePeers:f,linkType:c,discardFromLookup:h}])}}return e}function XC(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost. We also recommend you not to read","it either without using the @yarnpkg/pnp package, as the data layout","is entirely unspecified and WILL change from a version to another."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:r6e(t),fallbackPool:i6e(t),packageRegistryData:n6e(t)}}var zle=ie(Wle());function Vle(t,e){return[t?`${t} -`:"",`/* eslint-disable */ - -`,`try { -`,` Object.freeze({}).detectStrictMode = true; -`,`} catch (error) { -`," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n",`} -`,` -`,`var __non_webpack_module__ = module; -`,` -`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) { -`,e.replace(/^/gm," "),`} -`,` -`,(0,zle.default)()].join("")}function s6e(t){return JSON.stringify(t,null,2)}function o6e(t){return[`return hydrateRuntimeState(${qle(t)}, {basePath: basePath || __dirname}); -`].join("")}function a6e(t){return[`var path = require('path'); -`,`var dataLocation = path.resolve(__dirname, ${JSON.stringify(t)}); -`,`return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)}); -`].join("")}function _le(t){let e=XC(t),r=o6e(e);return Vle(t.shebang,r)}function Xle(t){let e=XC(t),r=a6e(t.dataLocation),i=Vle(t.shebang,r);return{dataFile:s6e(e),loaderFile:i}}var tce=ie(require("fs")),u6e=ie(require("path")),rce=ie(require("util"));function _L(t,{basePath:e}){let r=M.toPortablePath(e),i=v.resolve(r),n=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,s=new Map,o=new Map(t.packageRegistryData.map(([g,f])=>[g,new Map(f.map(([h,p])=>{var b;if(g===null!=(h===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let d=(b=p.discardFromLookup)!=null?b:!1,m={name:g,reference:h},I=s.get(p.packageLocation);I?(I.discardFromLookup=I.discardFromLookup&&d,d||(I.locator=m)):s.set(p.packageLocation,{locator:m,discardFromLookup:d});let B=null;return[h,{packageDependencies:new Map(p.packageDependencies),packagePeers:new Set(p.packagePeers),linkType:p.linkType,discardFromLookup:d,get packageLocation(){return B||(B=v.join(i,p.packageLocation))}}]}))])),a=new Map(t.fallbackExclusionList.map(([g,f])=>[g,new Set(f)])),l=new Map(t.fallbackPool),c=t.dependencyTreeRoots,u=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:c,enableTopLevelFallback:u,fallbackExclusionList:a,fallbackPool:l,ignorePattern:n,packageLocatorsByLocations:s,packageRegistry:o}}var df=ie(require("module")),ece=ie($le()),ZL=ie(require("util"));var ur;(function(l){l.API_ERROR="API_ERROR",l.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",l.MISSING_DEPENDENCY="MISSING_DEPENDENCY",l.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",l.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",l.INTERNAL="INTERNAL",l.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",l.UNSUPPORTED="UNSUPPORTED"})(ur||(ur={}));var c6e=new Set([ur.BUILTIN_NODE_RESOLUTION_FAILED,ur.MISSING_DEPENDENCY,ur.MISSING_PEER_DEPENDENCY,ur.QUALIFIED_PATH_RESOLUTION_FAILED,ur.UNDECLARED_DEPENDENCY]);function ui(t,e,r={}){let i=c6e.has(t)?"MODULE_NOT_FOUND":t,n={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:_(P({},n),{value:i}),pnpCode:_(P({},n),{value:t}),data:_(P({},n),{value:r})})}function YA(t){return M.normalize(M.fromPortablePath(t))}function $L(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,i=Number(process.env.PNP_DEBUG_LEVEL),n=new Set(df.Module.builtinModules||Object.keys(process.binding("natives"))),s=re=>n.has(re)||re.startsWith("node:"),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,a=/^(\/|\.{1,2}(\/|$))/,l=/\/$/,c=/^\.{0,2}\//,u={name:null,reference:null},g=[],f=new Set;if(t.enableTopLevelFallback===!0&&g.push(u),e.compatibilityMode!==!1)for(let re of["react-scripts","gatsby"]){let se=t.packageRegistry.get(re);if(se)for(let be of se.keys()){if(be===null)throw new Error("Assertion failed: This reference shouldn't be null");g.push({name:re,reference:be})}}let{ignorePattern:h,packageRegistry:p,packageLocatorsByLocations:d}=t;function m(re,se){return{fn:re,args:se,error:null,result:null}}function I(re){var De,$,G,Ce,ee,Ue;let se=(G=($=(De=process.stderr)==null?void 0:De.hasColors)==null?void 0:$.call(De))!=null?G:process.stdout.isTTY,be=(Oe,vt)=>`[${Oe}m${vt}`,ae=re.error;console.error(ae?be("31;1",`\u2716 ${(Ce=re.error)==null?void 0:Ce.message.replace(/\n.*/s,"")}`):be("33;1","\u203C Resolution")),re.args.length>0&&console.error();for(let Oe of re.args)console.error(` ${be("37;1","In \u2190")} ${(0,ZL.inspect)(Oe,{colors:se,compact:!0})}`);re.result&&(console.error(),console.error(` ${be("37;1","Out \u2192")} ${(0,ZL.inspect)(re.result,{colors:se,compact:!0})}`));let Ae=(Ue=(ee=new Error().stack.match(/(?<=^ +)at.*/gm))==null?void 0:ee.slice(2))!=null?Ue:[];if(Ae.length>0){console.error();for(let Oe of Ae)console.error(` ${be("38;5;244",Oe)}`)}console.error()}function B(re,se){if(e.allowDebug===!1)return se;if(Number.isFinite(i)){if(i>=2)return(...be)=>{let ae=m(re,be);try{return ae.result=se(...be)}catch(Ae){throw ae.error=Ae}finally{I(ae)}};if(i>=1)return(...be)=>{try{return se(...be)}catch(ae){let Ae=m(re,be);throw Ae.error=ae,I(Ae),ae}}}return se}function b(re){let se=W(re);if(!se)throw ui(ur.INTERNAL,"Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return se}function R(re){if(re.name===null)return!0;for(let se of t.dependencyTreeRoots)if(se.name===re.name&&se.reference===re.reference)return!0;return!1}let H=new Set(["default","node","require"]);function L(re,se=H){let be=D(v.join(re,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(be===null)throw ui(ur.INTERNAL,`The locator that owns the "${re}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:ae}=b(be),Ae=v.join(ae,wt.manifest);if(!e.fakeFs.existsSync(Ae))return null;let De=JSON.parse(e.fakeFs.readFileSync(Ae,"utf8")),$=v.contains(ae,re);if($===null)throw ui(ur.INTERNAL,"unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");c.test($)||($=`./${$}`);let G=(0,ece.resolve)(De,v.normalize($),{conditions:se,unsafe:!0});return typeof G=="string"?v.join(ae,G):null}function K(re,se,{extensions:be}){let ae;try{se.push(re),ae=e.fakeFs.statSync(re)}catch(Ae){}if(ae&&!ae.isDirectory())return e.fakeFs.realpathSync(re);if(ae&&ae.isDirectory()){let Ae;try{Ae=JSON.parse(e.fakeFs.readFileSync(v.join(re,wt.manifest),"utf8"))}catch($){}let De;if(Ae&&Ae.main&&(De=v.resolve(re,Ae.main)),De&&De!==re){let $=K(De,se,{extensions:be});if($!==null)return $}}for(let Ae=0,De=be.length;Ae{let G=JSON.stringify($.name);if(ae.has(G))return;ae.add(G);let Ce=X($);for(let ee of Ce)if(b(ee).packagePeers.has(re))Ae(ee);else{let Oe=be.get(ee.name);typeof Oe=="undefined"&&be.set(ee.name,Oe=new Set),Oe.add(ee.reference)}};Ae(se);let De=[];for(let $ of[...be.keys()].sort())for(let G of[...be.get($)].sort())De.push({name:$,reference:G});return De}function D(re,{resolveIgnored:se=!1,includeDiscardFromLookup:be=!1}={}){if(q(re)&&!se)return null;let ae=v.relative(t.basePath,re);ae.match(a)||(ae=`./${ae}`),ae.endsWith("/")||(ae=`${ae}/`);do{let Ae=d.get(ae);if(typeof Ae=="undefined"||Ae.discardFromLookup&&!be){ae=ae.substring(0,ae.lastIndexOf("/",ae.length-2)+1);continue}return Ae.locator}while(ae!=="");return null}function he(re,se,{considerBuiltins:be=!0}={}){if(re==="pnpapi")return M.toPortablePath(e.pnpapiResolution);if(be&&s(re))return null;let ae=YA(re),Ae=se&&YA(se);if(se&&q(se)&&(!v.isAbsolute(re)||D(re)===null)){let G=ne(re,se);if(G===!1)throw ui(ur.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) - -Require request: "${ae}" -Required by: ${Ae} -`,{request:ae,issuer:Ae});return M.toPortablePath(G)}let De,$=re.match(o);if($){if(!se)throw ui(ur.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:ae,issuer:Ae});let[,G,Ce]=$,ee=D(se);if(!ee){let yr=ne(re,se);if(yr===!1)throw ui(ur.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). - -Require path: "${ae}" -Required by: ${Ae} -`,{request:ae,issuer:Ae});return M.toPortablePath(yr)}let Oe=b(ee).packageDependencies.get(G),vt=null;if(Oe==null&&ee.name!==null){let yr=t.fallbackExclusionList.get(ee.name);if(!yr||!yr.has(ee.reference)){for(let Qi=0,Go=g.length;QiR(Ki))?dt=ui(ur.MISSING_PEER_DEPENDENCY,`${ee.name} tried to access ${G} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. - -Required package: ${G}${G!==ae?` (via "${ae}")`:""} -Required by: ${ee.name}@${ee.reference} (via ${Ae}) -${yr.map(Ki=>`Ancestor breaking the chain: ${Ki.name}@${Ki.reference} -`).join("")} -`,{request:ae,issuer:Ae,issuerLocator:Object.assign({},ee),dependencyName:G,brokenAncestors:yr}):dt=ui(ur.MISSING_PEER_DEPENDENCY,`${ee.name} tried to access ${G} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. - -Required package: ${G}${G!==ae?` (via "${ae}")`:""} -Required by: ${ee.name}@${ee.reference} (via ${Ae}) - -${yr.map(Ki=>`Ancestor breaking the chain: ${Ki.name}@${Ki.reference} -`).join("")} -`,{request:ae,issuer:Ae,issuerLocator:Object.assign({},ee),dependencyName:G,brokenAncestors:yr})}else Oe===void 0&&(!be&&s(re)?R(ee)?dt=ui(ur.UNDECLARED_DEPENDENCY,`Your application tried to access ${G}. 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 ${G} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. - -Required package: ${G}${G!==ae?` (via "${ae}")`:""} -Required by: ${Ae} -`,{request:ae,issuer:Ae,dependencyName:G}):dt=ui(ur.UNDECLARED_DEPENDENCY,`${ee.name} tried to access ${G}. 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 ${G} isn't otherwise declared in ${ee.name}'s dependencies, this makes the require call ambiguous and unsound. - -Required package: ${G}${G!==ae?` (via "${ae}")`:""} -Required by: ${Ae} -`,{request:ae,issuer:Ae,issuerLocator:Object.assign({},ee),dependencyName:G}):R(ee)?dt=ui(ur.UNDECLARED_DEPENDENCY,`Your application tried to access ${G}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. - -Required package: ${G}${G!==ae?` (via "${ae}")`:""} -Required by: ${Ae} -`,{request:ae,issuer:Ae,dependencyName:G}):dt=ui(ur.UNDECLARED_DEPENDENCY,`${ee.name} tried to access ${G}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. - -Required package: ${G}${G!==ae?` (via "${ae}")`:""} -Required by: ${ee.name}@${ee.reference} (via ${Ae}) -`,{request:ae,issuer:Ae,issuerLocator:Object.assign({},ee),dependencyName:G}));if(Oe==null){if(vt===null||dt===null)throw dt||new Error("Assertion failed: Expected an error to have been set");Oe=vt;let yr=dt.message.replace(/\n.*/g,"");dt.message=yr,!f.has(yr)&&i!==0&&(f.add(yr),process.emitWarning(dt))}let ri=Array.isArray(Oe)?{name:Oe[0],reference:Oe[1]}:{name:G,reference:Oe},ii=b(ri);if(!ii.packageLocation)throw ui(ur.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. - -Required package: ${ri.name}@${ri.reference}${ri.name!==ae?` (via "${ae}")`:""} -Required by: ${ee.name}@${ee.reference} (via ${Ae}) -`,{request:ae,issuer:Ae,dependencyLocator:Object.assign({},ri)});let an=ii.packageLocation;Ce?De=v.join(an,Ce):De=an}else if(v.isAbsolute(re))De=v.normalize(re);else{if(!se)throw ui(ur.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:ae,issuer:Ae});let G=v.resolve(se);se.match(l)?De=v.normalize(v.join(G,re)):De=v.normalize(v.join(v.dirname(G),re))}return v.normalize(De)}function pe(re,se,be=H){if(a.test(re))return se;let ae=L(se,be);return ae?v.normalize(ae):se}function Ne(re,{extensions:se=Object.keys(df.Module._extensions)}={}){let be=[],ae=K(re,be,{extensions:se});if(ae)return v.normalize(ae);{let Ae=YA(re),De=D(re);if(De){let{packageLocation:$}=b(De);if(!e.fakeFs.existsSync($)){let G=$.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 ui(ur.QUALIFIED_PATH_RESOLUTION_FAILED,`${G} - -Missing package: ${De.name}@${De.reference} -Expected package location: ${YA($)} -`,{unqualifiedPath:Ae})}}throw ui(ur.QUALIFIED_PATH_RESOLUTION_FAILED,`Qualified path resolution failed - none of those files can be found on the disk. - -Source path: ${Ae} -${be.map($=>`Not found: ${YA($)} -`).join("")}`,{unqualifiedPath:Ae})}}function Pe(re,se,{considerBuiltins:be,extensions:ae,conditions:Ae}={}){let De=he(re,se,{considerBuiltins:be});if(re==="pnpapi")return De;if(De===null)return null;let $=()=>se!==null?q(se):!1,G=(!be||!s(re))&&!$()?pe(re,De,Ae):De;try{return Ne(G,{extensions:ae})}catch(Ce){throw Ce.pnpCode==="QUALIFIED_PATH_RESOLUTION_FAILED"&&Object.assign(Ce.data,{request:YA(re),issuer:se&&YA(se)}),Ce}}function qe(re){let se=v.normalize(re),be=Pr.resolveVirtual(se);return be!==se?be:null}return{VERSIONS:A,topLevel:V,getLocator:(re,se)=>Array.isArray(se)?{name:se[0],reference:se[1]}:{name:re,reference:se},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let re=[];for(let[se,be]of p)for(let ae of be.keys())se!==null&&ae!==null&&re.push({name:se,reference:ae});return re},getPackageInformation:re=>{let se=W(re);if(se===null)return null;let be=M.fromPortablePath(se.packageLocation);return _(P({},se),{packageLocation:be})},findPackageLocator:re=>D(M.toPortablePath(re)),resolveToUnqualified:B("resolveToUnqualified",(re,se,be)=>{let ae=se!==null?M.toPortablePath(se):null,Ae=he(M.toPortablePath(re),ae,be);return Ae===null?null:M.fromPortablePath(Ae)}),resolveUnqualified:B("resolveUnqualified",(re,se)=>M.fromPortablePath(Ne(M.toPortablePath(re),se))),resolveRequest:B("resolveRequest",(re,se,be)=>{let ae=se!==null?M.toPortablePath(se):null,Ae=Pe(M.toPortablePath(re),ae,be);return Ae===null?null:M.fromPortablePath(Ae)}),resolveVirtual:B("resolveVirtual",re=>{let se=qe(M.toPortablePath(re));return se!==null?M.fromPortablePath(se):null})}}var ISt=(0,rce.promisify)(tce.readFile);var ice=(t,e,r)=>{let i=XC(t),n=_L(i,{basePath:e}),s=M.join(e,wt.pnpCjs);return $L(n,{fakeFs:r,pnpapiResolution:s})};var tT=ie(sce());var Ws={};it(Ws,{checkAndReportManifestCompatibility:()=>oce,extractBuildScripts:()=>Z0,getExtractHint:()=>rT,hasBindingGyp:()=>iT});function oce(t,e,{configuration:r,report:i}){return S.isPackageCompatible(t,{os:[process.platform],cpu:[process.arch]})?!0:(i==null||i.reportWarningOnce(z.INCOMPATIBLE_ARCHITECTURE,`${S.prettyLocator(r,t)} The ${process.platform}-${process.arch} architecture is incompatible with this module, ${e} skipped.`),!1)}function Z0(t,e,r,{configuration:i,report:n}){let s=[];for(let a of["preinstall","install","postinstall"])e.manifest.scripts.has(a)&&s.push([Gn.SCRIPT,a]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&s.push([Gn.SHELLCODE,"node-gyp rebuild"]),s.length===0?[]:t.linkType!==gt.HARD?(n==null||n.reportWarningOnce(z.SOFT_LINK_BUILD,`${S.prettyLocator(i,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?(n==null||n.reportInfoOnce(z.BUILD_DISABLED,`${S.prettyLocator(i,t)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!i.get("enableScripts")&&!r.built?(n==null||n.reportWarningOnce(z.DISABLED_BUILD_SCRIPTS,`${S.prettyLocator(i,t)} lists build scripts, but all build scripts have been disabled.`),[]):oce(t,"build",{configuration:i,report:n})?s:[]}var g6e=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function rT(t){return t.packageFs.getExtractHint({relevantExtensions:g6e})}function iT(t){let e=v.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var nT={};it(nT,{getUnpluggedPath:()=>ZC});function ZC(t,{configuration:e}){return v.resolve(e.get("pnpUnpluggedFolder"),S.slugifyLocator(t))}var f6e=new Set([S.makeIdent(null,"nan").identHash,S.makeIdent(null,"node-gyp").identHash,S.makeIdent(null,"node-pre-gyp").identHash,S.makeIdent(null,"node-addon-api").identHash,S.makeIdent(null,"fsevents").identHash]),jc=class{constructor(){this.mode="strict";this.pnpCache=new Map}supportsPackage(e,r){return!(r.project.configuration.get("nodeLinker")!=="pnp"||r.project.configuration.get("pnpMode")!==this.mode)}async findPackageLocation(e,r){let i=qA(r.project).cjs;if(!T.existsSync(i))throw new me(`The project in ${ue.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ue.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=de.getFactoryWithDefault(this.pnpCache,i,()=>de.dynamicRequire(i,{cachingStrategy:de.CachingStrategy.FsTime})),s={name:S.stringifyIdent(e),reference:e.reference},o=n.getPackageInformation(s);if(!o)throw new me(`Couldn't find ${S.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return M.toPortablePath(o.packageLocation)}async findPackageLocator(e,r){let i=qA(r.project).cjs;if(!T.existsSync(i))return null;let s=de.getFactoryWithDefault(this.pnpCache,i,()=>de.dynamicRequire(i,{cachingStrategy:de.CachingStrategy.FsTime})).findPackageLocator(M.fromPortablePath(e));return s?S.makeLocator(S.parseIdent(s.name),s.reference):null}makeInstaller(e){return new Cf(e)}},Cf=class{constructor(e){this.opts=e;this.mode="strict";this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}getCustomDataKey(){return JSON.stringify({name:"PnpInstaller",version:2})}attachCustomData(e){this.customData=e}async installPackage(e,r){let i=S.stringifyIdent(e),n=e.reference,s=!!this.opts.project.tryWorkspaceByLocator(e),o=S.isVirtualLocator(e),a=e.peerDependencies.size>0&&!o,l=!a&&!s,c=!a&&e.linkType!==gt.SOFT,u,g;if(l||c){let B=o?S.devirtualizeLocator(e):e;u=this.customData.store.get(B.locatorHash),typeof u=="undefined"&&(u=await h6e(r),e.linkType===gt.HARD&&this.customData.store.set(B.locatorHash,u)),u.manifest.type==="module"&&(this.isESMLoaderRequired=!0),g=this.opts.project.getDependencyMeta(B,e.version)}let f=l?Z0(e,u,g,{configuration:this.opts.project.configuration,report:this.opts.report}):[],h=c?await this.unplugPackageIfNeeded(e,u,r,g):r.packageFs;if(v.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let p=v.resolve(h.getRealPath(),r.prefixPath),d=sT(this.opts.project.cwd,p),m=new Map,I=new Set;if(o){for(let B of e.peerDependencies.values())m.set(S.stringifyIdent(B),null),I.add(S.stringifyIdent(B));if(!s){let B=S.devirtualizeLocator(e);this.virtualTemplates.set(B.locatorHash,{location:sT(this.opts.project.cwd,Pr.resolveVirtual(p)),locator:B})}}return de.getMapWithDefault(this.packageRegistry,i).set(n,{packageLocation:d,packageDependencies:m,packagePeers:I,linkType:e.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:p,buildDirective:f.length>0?f:null}}async attachInternalDependencies(e,r){let i=this.getPackageInformation(e);for(let[n,s]of r){let o=S.areIdentsEqual(n,s)?s.reference:[S.stringifyIdent(s),s.reference];i.packageDependencies.set(S.stringifyIdent(n),o)}}async attachExternalDependents(e,r){for(let i of r)this.getDiskInformation(i).packageDependencies.set(S.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;let e=qA(this.opts.project);if(T.existsSync(e.cjsLegacy)&&(this.opts.report.reportWarning(z.UNNAMED,`Removing the old ${ue.pretty(this.opts.project.configuration,wt.pnpJs,ue.Type.PATH)} file. You might need to manually update existing references to reference the new ${ue.pretty(this.opts.project.configuration,wt.pnpCjs,ue.Type.PATH)} file. If you use Editor SDKs, you'll have to rerun ${ue.pretty(this.opts.project.configuration,"yarn sdks",ue.Type.CODE)}.`),await T.removePromise(e.cjsLegacy)),this.isEsmEnabled()||await T.removePromise(e.esmLoader),this.opts.project.configuration.get("nodeLinker")!=="pnp"){await T.removePromise(e.cjs),await T.removePromise(this.opts.project.configuration.get("pnpDataPath")),await T.removePromise(e.esmLoader);return}for(let{locator:u,location:g}of this.virtualTemplates.values())de.getMapWithDefault(this.packageRegistry,S.stringifyIdent(u)).set(u.reference,{packageLocation:g,packageDependencies:new Map,packagePeers:new Set,linkType:gt.SOFT,discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));let r=this.opts.project.configuration.get("pnpFallbackMode"),i=this.opts.project.workspaces.map(({anchoredLocator:u})=>({name:S.stringifyIdent(u),reference:u.reference})),n=r!=="none",s=[],o=new Map,a=de.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),l=this.packageRegistry,c=this.opts.project.configuration.get("pnpShebang");if(r==="dependencies-only")for(let u of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(u)&&s.push({name:S.stringifyIdent(u),reference:u.reference});return await this.finalizeInstallWithPnp({dependencyTreeRoots:i,enableTopLevelFallback:n,fallbackExclusionList:s,fallbackPool:o,ignorePattern:a,packageRegistry:l,shebang:c}),{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=qA(this.opts.project),i=this.opts.project.configuration.get("pnpDataPath"),n=await this.locateNodeModules(e.ignorePattern);if(n.length>0){this.opts.report.reportWarning(z.DANGEROUS_NODE_MODULES,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(let o of n)await T.removePromise(o)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get("pnpEnableInlining")){let o=_le(e);await T.changeFilePromise(r.cjs,o,{automaticNewlines:!0,mode:493}),await T.removePromise(i)}else{let o=v.relative(v.dirname(r.cjs),i),{dataFile:a,loaderFile:l}=Xle(_(P({},e),{dataLocation:o}));await T.changeFilePromise(r.cjs,l,{automaticNewlines:!0,mode:493}),await T.changeFilePromise(i,a,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(z.UNNAMED,"ESM support for PnP uses the experimental loader API and is therefore experimental"),await T.changeFilePromise(r.esmLoader,(0,tT.default)(),{automaticNewlines:!0,mode:420}));let s=this.opts.project.configuration.get("pnpUnpluggedFolder");if(this.unpluggedPaths.size===0)await T.removePromise(s);else for(let o of await T.readdirPromise(s)){let a=v.resolve(s,o);this.unpluggedPaths.has(a)||await T.removePromise(a)}}async locateNodeModules(e){let r=[],i=e?new RegExp(e):null;for(let n of this.opts.project.workspaces){let s=v.join(n.cwd,"node_modules");if(i&&i.test(v.relative(this.opts.project.cwd,n.cwd))||!T.existsSync(s))continue;let o=await T.readdirPromise(s,{withFileTypes:!0}),a=o.filter(l=>!l.isDirectory()||l.name===".bin"||!l.name.startsWith("."));if(a.length===o.length)r.push(s);else for(let l of a)r.push(v.join(s,l.name))}return r}async unplugPackageIfNeeded(e,r,i,n){return this.shouldBeUnplugged(e,r,n)?this.unplugPackage(e,i):i.packageFs}shouldBeUnplugged(e,r,i){return typeof i.unplugged!="undefined"?i.unplugged:f6e.has(e.identHash)||e.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(Z0(e,r,i,{configuration:this.opts.project.configuration}).length>0||r.misc.extractHint)}async unplugPackage(e,r){let i=ZC(e,{configuration:this.opts.project.configuration});if(this.opts.project.disabledLocators.has(e.locatorHash))return new Xo(i,{baseFs:r.packageFs,pathUtils:v});this.unpluggedPaths.add(i);let n=v.join(i,r.prefixPath,".ready");return await T.existsPromise(n)?new Ft(i):(this.opts.project.storedBuildState.delete(e.locatorHash),await T.mkdirPromise(i,{recursive:!0}),await T.copyPromise(i,Se.dot,{baseFs:r.packageFs,overwrite:!1}),await T.writeFilePromise(n,""),new Ft(i))}getPackageInformation(e){let r=S.stringifyIdent(e),i=e.reference,n=this.packageRegistry.get(r);if(!n)throw new Error(`Assertion failed: The package information store should have been available (for ${S.prettyIdent(this.opts.project.configuration,e)})`);let s=n.get(i);if(!s)throw new Error(`Assertion failed: The package information should have been available (for ${S.prettyLocator(this.opts.project.configuration,e)})`);return s}getDiskInformation(e){let r=de.getMapWithDefault(this.packageRegistry,"@@disk"),i=sT(this.opts.project.cwd,e);return de.getFactoryWithDefault(r,i,()=>({packageLocation:i,packageDependencies:new Map,packagePeers:new Set,linkType:gt.SOFT,discardFromLookup:!1}))}};function sT(t,e){let r=v.relative(t,e);return r.match(/^\.{0,2}\//)||(r=`./${r}`),r.replace(/\/?$/,"/")}async function h6e(t){var i;let e=(i=await Ze.tryFind(t.prefixPath,{baseFs:t.packageFs}))!=null?i:new Ze,r=new Set(["preinstall","install","postinstall"]);for(let n of e.scripts.keys())r.has(n)||e.scripts.delete(n);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:rT(t),hasBindingGyp:iT(t)}}}var ace=ie(Nn());var $C=class extends Be{constructor(){super(...arguments);this.all=Y.Boolean("-A,--all",!1,{description:"Unplug direct dependencies from the entire project"});this.recursive=Y.Boolean("-R,--recursive",!1,{description:"Unplug both direct and transitive dependencies"});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=Y.Rest()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);if(e.get("nodeLinker")!=="pnp")throw new me("This command can only be used if the `nodeLinker` option is set to `pnp`");await r.restoreInstallState();let s=new Set(this.patterns),o=this.patterns.map(f=>{let h=S.parseDescriptor(f),p=h.range!=="unknown"?h:S.makeDescriptor(h,"*");if(!qt.validRange(p.range))throw new me(`The range of the descriptor patterns must be a valid semver range (${S.prettyDescriptor(e,p)})`);return d=>{let m=S.stringifyIdent(d);return!ace.default.isMatch(m,S.stringifyIdent(p))||d.version&&!qt.satisfiesWithPrereleases(d.version,p.range)?!1:(s.delete(f),!0)}}),a=()=>{let f=[];for(let h of r.storedPackages.values())!r.tryWorkspaceByLocator(h)&&!S.isVirtualLocator(h)&&o.some(p=>p(h))&&f.push(h);return f},l=f=>{let h=new Set,p=[],d=(m,I)=>{if(!h.has(m.locatorHash)&&(h.add(m.locatorHash),!r.tryWorkspaceByLocator(m)&&o.some(B=>B(m))&&p.push(m),!(I>0&&!this.recursive)))for(let B of m.dependencies.values()){let b=r.storedResolutions.get(B.descriptorHash);if(!b)throw new Error("Assertion failed: The resolution should have been registered");let R=r.storedPackages.get(b);if(!R)throw new Error("Assertion failed: The package should have been registered");d(R,I+1)}};for(let m of f){let I=r.storedPackages.get(m.anchoredLocator.locatorHash);if(!I)throw new Error("Assertion failed: The package should have been registered");d(I,0)}return p},c,u;if(this.all&&this.recursive?(c=a(),u="the project"):this.all?(c=l(r.workspaces),u="any workspace"):(c=l([i]),u="this workspace"),s.size>1)throw new me(`Patterns ${ue.prettyList(e,s,ue.Type.CODE)} don't match any packages referenced by ${u}`);if(s.size>0)throw new me(`Pattern ${ue.prettyList(e,s,ue.Type.CODE)} doesn't match any packages referenced by ${u}`);return c=de.sortMap(c,f=>S.stringifyLocator(f)),(await Fe.start({configuration:e,stdout:this.context.stdout,json:this.json},async f=>{var h;for(let p of c){let d=(h=p.version)!=null?h:"unknown",m=r.topLevelWorkspace.manifest.ensureDependencyMeta(S.makeDescriptor(p,d));m.unplugged=!0,f.reportInfo(z.UNNAMED,`Will unpack ${S.prettyLocator(e,p)} to ${ue.pretty(e,ZC(p,{configuration:e}),ue.Type.PATH)}`),f.reportJson({locator:S.stringifyLocator(p),version:d})}await r.topLevelWorkspace.persistManifest(),f.reportSeparator(),await r.install({cache:n,report:f})})).exitCode()}};$C.paths=[["unplug"]],$C.usage=ye.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 '*'"]]});var Ace=$C;var qA=t=>({cjs:v.join(t.cwd,wt.pnpCjs),cjsLegacy:v.join(t.cwd,wt.pnpJs),esmLoader:v.join(t.cwd,".pnp.loader.mjs")}),uce=t=>/\s/.test(t)?JSON.stringify(t):t;async function p6e(t,e,r){let i=qA(t),n=`--require ${uce(M.fromPortablePath(i.cjs))}`;if(T.existsSync(i.esmLoader)&&(n=`${n} --experimental-loader ${(0,cce.pathToFileURL)(M.fromPortablePath(i.esmLoader)).href}`),i.cjs.includes(" ")&&lce.default.lt(process.versions.node,"12.0.0"))throw new Error(`Expected the build location to not include spaces when using Node < 12.0.0 (${process.versions.node})`);if(T.existsSync(i.cjs)){let s=e.NODE_OPTIONS||"",o=/\s*--require\s+\S*\.pnp\.c?js\s*/g,a=/\s*--experimental-loader\s+\S*\.pnp\.loader\.mjs\s*/;s=s.replace(o," ").replace(a," ").trim(),s=s?`${n} ${s}`:n,e.NODE_OPTIONS=s}}async function d6e(t,e){let r=qA(t);e(r.cjs),e(r.esmLoader),e(t.configuration.get("pnpDataPath")),e(t.configuration.get("pnpUnpluggedFolder"))}var C6e={hooks:{populateYarnPaths:d6e,setupScriptEnvironment:p6e},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "node-modules"',type:ge.STRING,default:"pnp"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:ge.STRING,default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:ge.STRING,default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:ge.STRING,default:[],isArray:!0},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:ge.BOOLEAN,default:!1},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:ge.BOOLEAN,default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:ge.STRING,default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:ge.ABSOLUTE_PATH,default:"./.yarn/unplugged"},pnpDataPath:{description:"Path of the file where the PnP data (used by the loader) must be written",type:ge.ABSOLUTE_PATH,default:"./.pnp.data.json"}},linkers:[jc],commands:[Ace]},m6e=C6e;var Cce=ie(dce());var uT=ie(require("crypto")),mce=ie(require("fs")),Ece=1,gi="node_modules",gT=".bin",Ice=".yarn-state.yml",Bi;(function(i){i.CLASSIC="classic",i.HARDLINKS_LOCAL="hardlinks-local",i.HARDLINKS_GLOBAL="hardlinks-global"})(Bi||(Bi={}));var fT=class{constructor(){this.installStateCache=new Map}supportsPackage(e,r){return r.project.configuration.get("nodeLinker")==="node-modules"}async findPackageLocation(e,r){let i=r.project.tryWorkspaceByLocator(e);if(i)return i.cwd;let n=await de.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await hT(r.project,{unrollAliases:!0}));if(n===null)throw new me("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");let s=n.locatorMap.get(S.stringifyLocator(e));if(!s){let a=new me(`Couldn't find ${S.prettyLocator(r.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw a.code="LOCATOR_NOT_INSTALLED",a}let o=r.project.configuration.startingCwd;return s.locations.find(a=>v.contains(o,a))||s.locations[0]}async findPackageLocator(e,r){let i=await de.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await hT(r.project,{unrollAliases:!0}));if(i===null)return null;let{locationRoot:n,segments:s}=$0(v.resolve(e),{skipPrefix:r.project.cwd}),o=i.locationTree.get(n);if(!o)return null;let a=o.locator;for(let l of s){if(o=o.children.get(l),!o)break;a=o.locator||a}return S.parseLocator(a)}makeInstaller(e){return new yce(e)}},yce=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}getCustomDataKey(){return JSON.stringify({name:"NodeModulesInstaller",version:1})}attachCustomData(e){this.customData=e}async installPackage(e,r){var u;let i=v.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.customData.store.get(e.locatorHash);if(typeof n=="undefined"&&(n=await L6e(e,r),e.linkType===gt.HARD&&this.customData.store.set(e.locatorHash,n)),!Ws.checkAndReportManifestCompatibility(e,"link",{configuration:this.opts.project.configuration,report:this.opts.report}))return{packageLocation:null,buildDirective:null};let s=new Map,o=new Set;s.has(S.stringifyIdent(e))||s.set(S.stringifyIdent(e),e.reference);let a=e;if(S.isVirtualLocator(e)){a=S.devirtualizeLocator(e);for(let g of e.peerDependencies.values())s.set(S.stringifyIdent(g),null),o.add(S.stringifyIdent(g))}let l={packageLocation:`${M.fromPortablePath(i)}/`,packageDependencies:s,packagePeers:o,linkType:e.linkType,discardFromLookup:(u=r.discardFromLookup)!=null?u:!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:n,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:l});let c=r.checksum?r.checksum.substring(r.checksum.indexOf("/")+1):null;return this.realLocatorChecksums.set(a.locatorHash,c),{packageLocation:i,buildDirective:null}}async attachInternalDependencies(e,r){let i=this.localStore.get(e.locatorHash);if(typeof i=="undefined")throw new Error("Assertion failed: Expected information object to have been registered");for(let[n,s]of r){let o=S.areIdentsEqual(n,s)?s.reference:[S.stringifyIdent(s),s.reference];i.pnpNode.packageDependencies.set(S.stringifyIdent(n),o)}}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 Pr({baseFs:new Jn({libzip:await $i(),maxOpenFiles:80,readOnlyArchives:!0})}),r=await hT(this.opts.project),i=this.opts.project.configuration.get("nmMode");(r===null||i!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:i});let n=new Map(this.opts.project.workspaces.map(f=>{var p,d;let h=this.opts.project.configuration.get("nmHoistingLimits");try{h=de.validateEnum(Sn,(d=(p=f.manifest.installConfig)==null?void 0:p.hoistingLimits)!=null?d:h)}catch(m){let I=S.prettyWorkspace(this.opts.project.configuration,f);this.opts.report.reportWarning(z.INVALID_MANIFEST,`${I}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(Sn).join(", ")}, using default: "${h}"`)}return[f.relativeCwd,h]})),s=new Map(this.opts.project.workspaces.map(f=>{var p,d;let h=this.opts.project.configuration.get("nmSelfReferences");return h=(d=(p=f.manifest.installConfig)==null?void 0:p.selfReferences)!=null?d:h,[f.relativeCwd,h]})),o={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(f,h)=>Array.isArray(h)?{name:h[0],reference:h[1]}:{name:f,reference:h},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(f=>{let h=f.anchoredLocator;return{name:S.stringifyIdent(f.locator),reference:h.reference}}),getPackageInformation:f=>{let h=f.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:S.makeLocator(S.parseIdent(f.name),f.reference),p=this.localStore.get(h.locatorHash);if(typeof p=="undefined")throw new Error("Assertion failed: Expected the package reference to have been registered");return p.pnpNode},findPackageLocator:f=>{let h=this.opts.project.tryWorkspaceByCwd(M.toPortablePath(f));if(h!==null){let p=h.anchoredLocator;return{name:S.stringifyIdent(p),reference:p.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:f=>M.fromPortablePath(Pr.resolveVirtual(M.toPortablePath(f)))},{tree:a,errors:l,preserveSymlinksRequired:c}=VC(o,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:n,project:this.opts.project,selfReferencesByCwd:s});if(!a){for(let{messageName:f,text:h}of l)this.opts.report.reportError(f,h);return}let u=WL(a);await T6e(r,u,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async f=>{let h=S.parseLocator(f),p=this.localStore.get(h.locatorHash);if(typeof p=="undefined")throw new Error("Assertion failed: Expected the slot to exist");return p.customPackageData.manifest}});let g=[];for(let[f,h]of u.entries()){if(wce(f))continue;let p=S.parseLocator(f),d=this.localStore.get(p.locatorHash);if(typeof d=="undefined")throw new Error("Assertion failed: Expected the slot to exist");if(this.opts.project.tryWorkspaceByLocator(d.pkg))continue;let m=Ws.extractBuildScripts(d.pkg,d.customPackageData,d.dependencyMeta,{configuration:this.opts.project.configuration,report:this.opts.report});m.length!==0&&g.push({buildLocations:h.locations,locatorHash:p.locatorHash,buildDirective:m})}return c&&this.opts.report.reportWarning(z.NM_PRESERVE_SYMLINKS_REQUIRED,`The application uses portals and that's why ${ue.pretty(this.opts.project.configuration,"--preserve-symlinks",ue.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:g}}};async function L6e(t,e){var n;let r=(n=await Ze.tryFind(e.prefixPath,{baseFs:e.packageFs}))!=null?n:new Ze,i=new Set(["preinstall","install","postinstall"]);for(let s of r.scripts.keys())i.has(s)||r.scripts.delete(s);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{extractHint:Ws.getExtractHint(e),hasBindingGyp:Ws.hasBindingGyp(e)}}}async function M6e(t,e,r,i){let n="";n+=`# Warning: This file is automatically generated. Removing it is fine, but will -`,n+=`# cause your node_modules installation to become invalidated. -`,n+=` -`,n+=`__metadata: -`,n+=` version: ${Ece} -`,n+=` nmMode: ${i.value} -`;let s=Array.from(e.keys()).sort(),o=S.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let c of s){let u=e.get(c);n+=` -`,n+=`${JSON.stringify(c)}: -`,n+=` locations: -`;for(let g of u.locations){let f=v.contains(t.cwd,g);if(f===null)throw new Error(`Assertion failed: Expected the path to be within the project (${g})`);n+=` - ${JSON.stringify(f)} -`}if(u.aliases.length>0){n+=` aliases: -`;for(let g of u.aliases)n+=` - ${JSON.stringify(g)} -`}if(c===o&&r.size>0){n+=` bin: -`;for(let[g,f]of r){let h=v.contains(t.cwd,g);if(h===null)throw new Error(`Assertion failed: Expected the path to be within the project (${g})`);n+=` ${JSON.stringify(h)}: -`;for(let[p,d]of f){let m=v.relative(v.join(g,gi),d);n+=` ${JSON.stringify(p)}: ${JSON.stringify(m)} -`}}}}let a=t.cwd,l=v.join(a,gi,Ice);await T.changeFilePromise(l,n,{automaticNewlines:!0})}async function hT(t,{unrollAliases:e=!1}={}){let r=t.cwd,i=v.join(r,gi,Ice);if(!T.existsSync(i))return null;let n=Ii(await T.readFilePromise(i,"utf8"));if(n.__metadata.version>Ece)return null;let s=n.__metadata.nmMode||Bi.CLASSIC,o=new Map,a=new Map;delete n.__metadata;for(let[l,c]of Object.entries(n)){let u=c.locations.map(f=>v.join(r,f)),g=c.bin;if(g)for(let[f,h]of Object.entries(g)){let p=v.join(r,M.toPortablePath(f)),d=de.getMapWithDefault(a,p);for(let[m,I]of Object.entries(h))d.set(kr(m),M.toPortablePath([p,gi,I].join(v.delimiter)))}if(o.set(l,{target:Se.dot,linkType:gt.HARD,locations:u,aliases:c.aliases||[]}),e&&c.aliases)for(let f of c.aliases){let{scope:h,name:p}=S.parseLocator(l),d=S.makeLocator(S.makeIdent(h,p),f),m=S.stringifyLocator(d);o.set(m,{target:Se.dot,linkType:gt.HARD,locations:u,aliases:[]})}}return{locatorMap:o,binSymlinks:a,locationTree:Bce(o,{skipPrefix:t.cwd}),nmMode:s}}var Ef=async(t,e)=>{if(t.split(v.sep).indexOf(gi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop&&(await T.lstatPromise(t)).isSymbolicLink()){await T.unlinkPromise(t);return}let r=await T.readdirPromise(t,{withFileTypes:!0});for(let i of r){let n=v.join(t,kr(i.name));i.isDirectory()?(i.name!==gi||e&&e.innerLoop)&&await Ef(n,{innerLoop:!0,contentsOnly:!1}):await T.unlinkPromise(n)}e.contentsOnly||await T.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},Qce=4,$0=(t,{skipPrefix:e})=>{let r=v.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let i=r.split(v.sep).filter(l=>l!==""),n=i.indexOf(gi),s=i.slice(0,n).join(v.sep),o=v.join(e,s),a=i.slice(n);return{locationRoot:o,segments:a}},Bce=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let i=()=>({children:new Map,linkType:gt.HARD});for(let[n,s]of t.entries()){if(s.linkType===gt.SOFT&&v.contains(e,s.target)!==null){let a=de.getFactoryWithDefault(r,s.target,i);a.locator=n,a.linkType=s.linkType}for(let o of s.locations){let{locationRoot:a,segments:l}=$0(o,{skipPrefix:e}),c=de.getFactoryWithDefault(r,a,i);for(let u=0;u{let r;try{process.platform==="win32"&&(r=await T.lstatPromise(t))}catch(i){}process.platform=="win32"&&(!r||r.isDirectory())?await T.symlinkPromise(t,e,"junction"):await T.symlinkPromise(v.relative(v.dirname(e),t),e)};async function bce(t,e,r){let i=v.join(t,kr(`${uT.default.randomBytes(16).toString("hex")}.tmp`));try{await T.writeFilePromise(i,r);try{await T.linkPromise(i,e)}catch(n){}}finally{await T.unlinkPromise(i)}}async function O6e({srcPath:t,dstPath:e,srcMode:r,globalHardlinksStore:i,baseFs:n,nmMode:s,digest:o}){if(s.value===Bi.HARDLINKS_GLOBAL&&i&&o){let l=v.join(i,o.substring(0,2),`${o.substring(2)}.dat`),c;try{if(await mn.checksumFile(l,{baseFs:T,algorithm:"sha1"})!==o){let g=v.join(i,kr(`${uT.default.randomBytes(16).toString("hex")}.tmp`));await T.renamePromise(l,g);let f=await n.readFilePromise(t);await T.writeFilePromise(g,f);try{await T.linkPromise(g,l),await T.unlinkPromise(g)}catch(h){}}await T.linkPromise(l,e),c=!0}catch(u){c=!1}if(!c){let u=await n.readFilePromise(t);await bce(i,l,u);try{await T.linkPromise(l,e)}catch(g){g&&g.code&&g.code=="EXDEV"&&(s.value=Bi.HARDLINKS_LOCAL,await n.copyFilePromise(t,e))}}}else await n.copyFilePromise(t,e);let a=r&511;a!==420&&await T.chmodPromise(e,a)}var JA;(function(i){i.FILE="file",i.DIRECTORY="directory",i.SYMLINK="symlink"})(JA||(JA={}));var K6e=async(t,e,{baseFs:r,globalHardlinksStore:i,nmMode:n,packageChecksum:s})=>{await T.mkdirPromise(t,{recursive:!0});let o=async(l=Se.dot)=>{let c=v.join(e,l),u=await r.readdirPromise(c,{withFileTypes:!0}),g=new Map;for(let f of u){let h=v.join(l,f.name),p,d=v.join(c,f.name);if(f.isFile()){if(p={kind:JA.FILE,mode:(await r.lstatPromise(d)).mode},n.value===Bi.HARDLINKS_GLOBAL){let m=await mn.checksumFile(d,{baseFs:r,algorithm:"sha1"});p.digest=m}}else if(f.isDirectory())p={kind:JA.DIRECTORY};else if(f.isSymbolicLink())p={kind:JA.SYMLINK,symlinkTo:await r.readlinkPromise(d)};else throw new Error(`Unsupported file type (file: ${d}, mode: 0o${await r.statSync(d).mode.toString(8).padStart(6,"0")})`);if(g.set(h,p),f.isDirectory()&&h!==gi){let m=await o(h);for(let[I,B]of m)g.set(I,B)}}return g},a;if(n.value===Bi.HARDLINKS_GLOBAL&&i&&s){let l=v.join(i,s.substring(0,2),`${s.substring(2)}.json`);try{a=new Map(Object.entries(JSON.parse(await T.readFilePromise(l,"utf8"))))}catch(c){a=await o(),await bce(i,l,Buffer.from(JSON.stringify(Object.fromEntries(a))))}}else a=await o();for(let[l,c]of a){let u=v.join(e,l),g=v.join(t,l);c.kind===JA.DIRECTORY?await T.mkdirPromise(g,{recursive:!0}):c.kind===JA.FILE?await O6e({srcPath:u,dstPath:g,srcMode:c.mode,digest:c.digest,nmMode:n,baseFs:r,globalHardlinksStore:i}):c.kind===JA.SYMLINK&&await pT(v.resolve(v.dirname(g),c.symlinkTo),g)}};function U6e(t,e){let r=new Map([...t]),i=new Map([...e]);for(let[n,s]of t){let o=v.join(n,gi);if(!T.existsSync(o)){s.children.delete(gi);for(let a of i.keys())v.contains(o,a)!==null&&i.delete(a)}}return{locationTree:r,binSymlinks:i}}function wce(t){let e=S.parseDescriptor(t);return S.isVirtualDescriptor(e)&&(e=S.devirtualizeDescriptor(e)),e.range.startsWith("link:")}async function H6e(t,e,r,{loadManifest:i}){let n=new Map;for(let[a,{locations:l}]of t){let c=wce(a)?null:await i(a,l[0]),u=new Map;if(c)for(let[g,f]of c.bin){let h=v.join(l[0],f);f!==""&&T.existsSync(h)&&u.set(g,f)}n.set(a,u)}let s=new Map,o=(a,l,c)=>{let u=new Map,g=v.contains(r,a);if(c.locator&&g!==null){let f=n.get(c.locator);for(let[h,p]of f){let d=v.join(a,M.toPortablePath(p));u.set(kr(h),d)}for(let[h,p]of c.children){let d=v.join(a,h),m=o(d,d,p);m.size>0&&s.set(a,new Map([...s.get(a)||new Map,...m]))}}else for(let[f,h]of c.children){let p=o(v.join(a,f),l,h);for(let[d,m]of p)u.set(d,m)}return u};for(let[a,l]of e){let c=o(a,a,l);c.size>0&&s.set(a,new Map([...s.get(a)||new Map,...c]))}return s}var vce=(t,e)=>{if(!t||!e)return t===e;let r=S.parseLocator(t);S.isVirtualLocator(r)&&(r=S.devirtualizeLocator(r));let i=S.parseLocator(e);return S.isVirtualLocator(i)&&(i=S.devirtualizeLocator(i)),S.areLocatorsEqual(r,i)};function dT(t){return v.join(t.get("globalFolder"),"store")}async function T6e(t,e,{baseFs:r,project:i,report:n,loadManifest:s,realLocatorChecksums:o}){let a=v.join(i.cwd,gi),{locationTree:l,binSymlinks:c}=U6e(t.locationTree,t.binSymlinks),u=Bce(e,{skipPrefix:i.cwd}),g=[],f=async({srcDir:L,dstDir:K,linkType:J,globalHardlinksStore:ne,nmMode:q,packageChecksum:A})=>{let V=(async()=>{try{J===gt.SOFT?(await T.mkdirPromise(v.dirname(K),{recursive:!0}),await pT(v.resolve(L),K)):await K6e(K,L,{baseFs:r,globalHardlinksStore:ne,nmMode:q,packageChecksum:A})}catch(W){throw W.message=`While persisting ${L} -> ${K} ${W.message}`,W}finally{B.tick()}})().then(()=>g.splice(g.indexOf(V),1));g.push(V),g.length>Qce&&await Promise.race(g)},h=async(L,K,J)=>{let ne=(async()=>{let q=async(A,V,W)=>{try{W.innerLoop||await T.mkdirPromise(V,{recursive:!0});let X=await T.readdirPromise(A,{withFileTypes:!0});for(let F of X){if(!W.innerLoop&&F.name===gT)continue;let D=v.join(A,F.name),he=v.join(V,F.name);F.isDirectory()?(F.name!==gi||W&&W.innerLoop)&&(await T.mkdirPromise(he,{recursive:!0}),await q(D,he,_(P({},W),{innerLoop:!0}))):H.value===Bi.HARDLINKS_LOCAL||H.value===Bi.HARDLINKS_GLOBAL?await T.linkPromise(D,he):await T.copyFilePromise(D,he,mce.default.constants.COPYFILE_FICLONE)}}catch(X){throw W.innerLoop||(X.message=`While cloning ${A} -> ${V} ${X.message}`),X}finally{W.innerLoop||B.tick()}};await q(L,K,J)})().then(()=>g.splice(g.indexOf(ne),1));g.push(ne),g.length>Qce&&await Promise.race(g)},p=async(L,K,J)=>{if(!J)K.children.has(gi)&&await Ef(v.join(L,gi),{contentsOnly:!1}),await Ef(L,{contentsOnly:L===a});else for(let[ne,q]of K.children){let A=J.children.get(ne);await p(v.join(L,ne),q,A)}};for(let[L,K]of l){let J=u.get(L);for(let[ne,q]of K.children){if(ne===".")continue;let A=J&&J.children.get(ne);await p(v.join(L,ne),q,A)}}let d=async(L,K,J)=>{if(!J)K.children.has(gi)&&await Ef(v.join(L,gi),{contentsOnly:!0}),await Ef(L,{contentsOnly:K.linkType===gt.HARD});else{vce(K.locator,J.locator)||await Ef(L,{contentsOnly:K.linkType===gt.HARD});for(let[ne,q]of K.children){let A=J.children.get(ne);await d(v.join(L,ne),q,A)}}};for(let[L,K]of u){let J=l.get(L);for(let[ne,q]of K.children){if(ne===".")continue;let A=J&&J.children.get(ne);await d(v.join(L,ne),q,A)}}let m=new Map,I=[];for(let[L,{locations:K}]of t.locatorMap.entries())for(let J of K){let{locationRoot:ne,segments:q}=$0(J,{skipPrefix:i.cwd}),A=u.get(ne),V=ne;if(A){for(let W of q)if(V=v.join(V,W),A=A.children.get(W),!A)break;if(A){let W=vce(A.locator,L),X=e.get(A.locator),F=X.target,D=V,he=X.linkType;if(W)m.has(F)||m.set(F,D);else if(F!==D){let pe=S.parseLocator(A.locator);S.isVirtualLocator(pe)&&(pe=S.devirtualizeLocator(pe)),I.push({srcDir:F,dstDir:D,linkType:he,realLocatorHash:pe.locatorHash})}}}}for(let[L,{locations:K}]of e.entries())for(let J of K){let{locationRoot:ne,segments:q}=$0(J,{skipPrefix:i.cwd}),A=l.get(ne),V=u.get(ne),W=ne,X=e.get(L),F=S.parseLocator(L);S.isVirtualLocator(F)&&(F=S.devirtualizeLocator(F));let D=F.locatorHash,he=X.target,pe=J;if(he===pe)continue;let Ne=X.linkType;for(let Pe of q)V=V.children.get(Pe);if(!A)I.push({srcDir:he,dstDir:pe,linkType:Ne,realLocatorHash:D});else for(let Pe of q)if(W=v.join(W,Pe),A=A.children.get(Pe),!A){I.push({srcDir:he,dstDir:pe,linkType:Ne,realLocatorHash:D});break}}let B=Xi.progressViaCounter(I.length),b=n.reportProgress(B),R=i.configuration.get("nmMode"),H={value:R};try{let L=H.value===Bi.HARDLINKS_GLOBAL?`${dT(i.configuration)}/v1`:null;if(L&&!await T.existsPromise(L)){await T.mkdirpPromise(L);for(let J=0;J<256;J++)await T.mkdirPromise(v.join(L,J.toString(16).padStart(2,"0")))}for(let J of I)(J.linkType===gt.SOFT||!m.has(J.srcDir))&&(m.set(J.srcDir,J.dstDir),await f(_(P({},J),{globalHardlinksStore:L,nmMode:H,packageChecksum:o.get(J.realLocatorHash)||null})));await Promise.all(g),g.length=0;for(let J of I){let ne=m.get(J.srcDir);J.linkType!==gt.SOFT&&J.dstDir!==ne&&await h(ne,J.dstDir,{nmMode:H})}await Promise.all(g),await T.mkdirPromise(a,{recursive:!0});let K=await H6e(e,u,i.cwd,{loadManifest:s});await G6e(c,K,i.cwd),await M6e(i,e,K,H),R==Bi.HARDLINKS_GLOBAL&&H.value==Bi.HARDLINKS_LOCAL&&n.reportWarningOnce(z.NM_HARDLINKS_MODE_DOWNGRADED,"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices")}finally{b.stop()}}async function G6e(t,e,r){for(let i of t.keys()){if(v.contains(r,i)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${i}`);if(!e.has(i)){let n=v.join(i,gi,gT);await T.removePromise(n)}}for(let[i,n]of e){if(v.contains(r,i)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${i}`);let s=v.join(i,gi,gT),o=t.get(i)||new Map;await T.mkdirPromise(s,{recursive:!0});for(let a of o.keys())n.has(a)||(await T.removePromise(v.join(s,a)),process.platform==="win32"&&await T.removePromise(v.join(s,kr(`${a}.cmd`))));for(let[a,l]of n){let c=o.get(a),u=v.join(s,a);c!==l&&(process.platform==="win32"?await(0,Cce.default)(M.fromPortablePath(l),M.fromPortablePath(u),{createPwshFile:!1}):(await T.removePromise(u),await pT(l,u),v.contains(r,await T.realpathPromise(l))!==null&&await T.chmodPromise(l,493)))}}}var CT=class extends jc{constructor(){super(...arguments);this.mode="loose"}makeInstaller(e){return new Sce(e)}},Sce=class extends Cf{constructor(){super(...arguments);this.mode="loose"}async transformPnpSettings(e){let r=new Pr({baseFs:new Jn({libzip:await $i(),maxOpenFiles:80,readOnlyArchives:!0})}),i=ice(e,this.opts.project.cwd,r),{tree:n,errors:s}=VC(i,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:u,text:g}of s)this.opts.report.reportError(u,g);return}let o=new Map;e.fallbackPool=o;let a=(u,g)=>{let f=S.parseLocator(g.locator),h=S.stringifyIdent(f);h===u?o.set(u,f.reference):o.set(u,[h,f.reference])},l=v.join(this.opts.project.cwd,wt.nodeModules),c=n.get(l);if(typeof c!="undefined"){if("target"in c)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(let u of c.dirList){let g=v.join(l,u),f=n.get(g);if(typeof f=="undefined")throw new Error("Assertion failed: Expected the child to have been registered");if("target"in f)a(u,f);else for(let h of f.dirList){let p=v.join(g,h),d=n.get(p);if(typeof d=="undefined")throw new Error("Assertion failed: Expected the subchild to have been registered");if("target"in d)a(`${u}/${h}`,d);else throw new Error("Assertion failed: Expected the leaf junction to be a package")}}}}};var j6e={hooks:{cleanGlobalArtifacts:async t=>{let e=dT(t);await T.removePromise(e)}},configuration:{nmHoistingLimits:{description:"Prevent packages to be hoisted past specific levels",type:ge.STRING,values:[Sn.WORKSPACES,Sn.DEPENDENCIES,Sn.NONE],default:Sn.NONE},nmMode:{description:'If set to "hardlinks-local" Yarn will utilize hardlinks to reduce disk space consumption inside "node_modules" directories. With "hardlinks-global" Yarn will use global content addressable storage to reduce "node_modules" size across all the projects using this option.',type:ge.STRING,values:[Bi.CLASSIC,Bi.HARDLINKS_LOCAL,Bi.HARDLINKS_GLOBAL],default:Bi.CLASSIC},nmSelfReferences:{description:"If set to 'false' the workspace will not be allowed to require itself and corresponding self-referencing symlink will not be created",type:ge.BOOLEAN,default:!0}},linkers:[fT,CT]},Y6e=j6e;var yM={};it(yM,{default:()=>Z7e,npmConfigUtils:()=>gr,npmHttpUtils:()=>Lt,npmPublishUtils:()=>Rf});var Rce=ie(Or());var ir="npm:";var Lt={};it(Lt,{AuthType:()=>jn,customPackageError:()=>W6e,del:()=>_6e,get:()=>zs,getIdentUrl:()=>zA,handleInvalidAuthenticationError:()=>WA,post:()=>z6e,put:()=>V6e});var Pce=ie(aC()),Dce=ie(require("url"));var gr={};it(gr,{RegistryType:()=>ja,getAuditRegistry:()=>q6e,getAuthConfiguration:()=>IT,getDefaultRegistry:()=>eQ,getPublishRegistry:()=>xce,getRegistryConfiguration:()=>kce,getScopeConfiguration:()=>ET,getScopeRegistry:()=>Ya,normalizeRegistry:()=>To});var ja;(function(i){i.AUDIT_REGISTRY="npmAuditRegistry",i.FETCH_REGISTRY="npmRegistryServer",i.PUBLISH_REGISTRY="npmPublishRegistry"})(ja||(ja={}));function To(t){return t.replace(/\/$/,"")}function q6e(t,{configuration:e}){let r=e.get(ja.AUDIT_REGISTRY);return r!==null?To(r):xce(t,{configuration:e})}function xce(t,{configuration:e}){var r;return((r=t.publishConfig)==null?void 0:r.registry)?To(t.publishConfig.registry):t.name?Ya(t.name.scope,{configuration:e,type:ja.PUBLISH_REGISTRY}):eQ({configuration:e,type:ja.PUBLISH_REGISTRY})}function Ya(t,{configuration:e,type:r=ja.FETCH_REGISTRY}){let i=ET(t,{configuration:e});if(i===null)return eQ({configuration:e,type:r});let n=i.get(r);return n===null?eQ({configuration:e,type:r}):To(n)}function eQ({configuration:t,type:e=ja.FETCH_REGISTRY}){let r=t.get(e);return To(r!==null?r:t.get(ja.FETCH_REGISTRY))}function kce(t,{configuration:e}){let r=e.get("npmRegistries"),i=To(t),n=r.get(i);if(typeof n!="undefined")return n;let s=r.get(i.replace(/^[a-z]+:/,""));return typeof s!="undefined"?s:null}function ET(t,{configuration:e}){if(t===null)return null;let i=e.get("npmScopes").get(t);return i||null}function IT(t,{configuration:e,ident:r}){let i=r&&ET(r.scope,{configuration:e});return(i==null?void 0:i.get("npmAuthIdent"))||(i==null?void 0:i.get("npmAuthToken"))?i:kce(t,{configuration:e})||e}var jn;(function(n){n[n.NO_AUTH=0]="NO_AUTH",n[n.BEST_EFFORT=1]="BEST_EFFORT",n[n.CONFIGURATION=2]="CONFIGURATION",n[n.ALWAYS_AUTH=3]="ALWAYS_AUTH"})(jn||(jn={}));async function WA(t,{attemptedAs:e,registry:r,headers:i,configuration:n}){var s,o;if(((s=t.originalError)==null?void 0:s.name)==="HTTPError"&&((o=t.originalError)==null?void 0:o.response.statusCode)===401)throw new nt(z.AUTHENTICATION_INVALID,`Invalid authentication (${typeof e!="string"?`as ${await J6e(r,i,{configuration:n})}`:`attempted as ${e}`})`)}function W6e(t){var e;return((e=t.response)==null?void 0:e.statusCode)===404?"Package not found":null}function zA(t){return t.scope?`/@${t.scope}%2f${t.name}`:`/${t.name}`}async function zs(t,a){var l=a,{configuration:e,headers:r,ident:i,authType:n,registry:s}=l,o=qr(l,["configuration","headers","ident","authType","registry"]);if(i&&typeof s=="undefined"&&(s=Ya(i.scope,{configuration:e})),i&&i.scope&&typeof n=="undefined"&&(n=1),typeof s!="string")throw new Error("Assertion failed: The registry should be a string");let c=await tQ(s,{authType:n,configuration:e,ident:i});c&&(r=_(P({},r),{authorization:c}));try{return await Zt.get(t.charAt(0)==="/"?`${s}${t}`:t,P({configuration:e,headers:r},o))}catch(u){throw await WA(u,{registry:s,configuration:e,headers:r}),u}}async function z6e(t,e,c){var u=c,{attemptedAs:r,configuration:i,headers:n,ident:s,authType:o=3,registry:a}=u,l=qr(u,["attemptedAs","configuration","headers","ident","authType","registry"]);if(s&&typeof a=="undefined"&&(a=Ya(s.scope,{configuration:i})),typeof a!="string")throw new Error("Assertion failed: The registry should be a string");let g=await tQ(a,{authType:o,configuration:i,ident:s});g&&(n=_(P({},n),{authorization:g}));try{return await Zt.post(a+t,e,P({configuration:i,headers:n},l))}catch(f){if(!wT(f))throw await WA(f,{attemptedAs:r,registry:a,configuration:i,headers:n}),f;let h=await yT(),p=P(P({},n),BT(h));try{return await Zt.post(`${a}${t}`,e,P({configuration:i,headers:p},l))}catch(d){throw await WA(d,{attemptedAs:r,registry:a,configuration:i,headers:n}),d}}}async function V6e(t,e,c){var u=c,{attemptedAs:r,configuration:i,headers:n,ident:s,authType:o=3,registry:a}=u,l=qr(u,["attemptedAs","configuration","headers","ident","authType","registry"]);if(s&&typeof a=="undefined"&&(a=Ya(s.scope,{configuration:i})),typeof a!="string")throw new Error("Assertion failed: The registry should be a string");let g=await tQ(a,{authType:o,configuration:i,ident:s});g&&(n=_(P({},n),{authorization:g}));try{return await Zt.put(a+t,e,P({configuration:i,headers:n},l))}catch(f){if(!wT(f))throw await WA(f,{attemptedAs:r,registry:a,configuration:i,headers:n}),f;let h=await yT(),p=P(P({},n),BT(h));try{return await Zt.put(`${a}${t}`,e,P({configuration:i,headers:p},l))}catch(d){throw await WA(d,{attemptedAs:r,registry:a,configuration:i,headers:n}),d}}}async function _6e(t,l){var c=l,{attemptedAs:e,configuration:r,headers:i,ident:n,authType:s=3,registry:o}=c,a=qr(c,["attemptedAs","configuration","headers","ident","authType","registry"]);if(n&&typeof o=="undefined"&&(o=Ya(n.scope,{configuration:r})),typeof o!="string")throw new Error("Assertion failed: The registry should be a string");let u=await tQ(o,{authType:s,configuration:r,ident:n});u&&(i=_(P({},i),{authorization:u}));try{return await Zt.del(o+t,P({configuration:r,headers:i},a))}catch(g){if(!wT(g))throw await WA(g,{attemptedAs:e,registry:o,configuration:r,headers:i}),g;let f=await yT(),h=P(P({},i),BT(f));try{return await Zt.del(`${o}${t}`,P({configuration:r,headers:h},a))}catch(p){throw await WA(p,{attemptedAs:e,registry:o,configuration:r,headers:i}),p}}}async function tQ(t,{authType:e=2,configuration:r,ident:i}){let n=IT(t,{configuration:r,ident:i}),s=X6e(n,e);if(!s)return null;let o=await r.reduceHook(a=>a.getNpmAuthenticationHeader,void 0,t,{configuration:r,ident:i});if(o)return o;if(n.get("npmAuthToken"))return`Bearer ${n.get("npmAuthToken")}`;if(n.get("npmAuthIdent")){let a=n.get("npmAuthIdent");return a.includes(":")?`Basic ${Buffer.from(a).toString("base64")}`:`Basic ${a}`}if(s&&e!==1)throw new nt(z.AUTHENTICATION_NOT_FOUND,"No authentication configured for request");return null}function X6e(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 J6e(t,e,{configuration:r}){var i;if(typeof e=="undefined"||typeof e.authorization=="undefined")return"an anonymous user";try{return(i=(await Zt.get(new Dce.URL(`${t}/-/whoami`).href,{configuration:r,headers:e,jsonResponse:!0})).username)!=null?i:"an unknown user"}catch{return"an unknown user"}}async function yT(){if(process.env.TEST_ENV)return process.env.TEST_NPM_2FA_TOKEN||"";let{otp:t}=await(0,Pce.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return t}function wT(t){var e,r;if(((e=t.originalError)==null?void 0:e.name)!=="HTTPError")return!1;try{return((r=t.originalError)==null?void 0:r.response.headers["www-authenticate"].split(/,\s*/).map(n=>n.toLowerCase())).includes("otp")}catch(i){return!1}}function BT(t){return{["npm-otp"]:t}}var QT=class{supports(e,r){if(!e.reference.startsWith(ir))return!1;let{selector:i,params:n}=S.parseRange(e.reference);return!(!Rce.default.valid(i)||n===null||typeof n.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,P({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${S.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),skipIntegrityCheck:r.skipIntegrityCheck},r.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:S.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,r){let{params:i}=S.parseRange(e.reference);if(i===null||typeof i.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let n=await zs(i.__archiveUrl,{configuration:r.project.configuration,ident:e});return await Ai.convertToZip(n,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:S.getIdentVendorPath(e),stripComponents:1})}};var bT=class{supportsDescriptor(e,r){return!(!e.range.startsWith(ir)||!S.tryParseDescriptor(e.range.slice(ir.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,i){return e}getResolutionDependencies(e,r){let i=S.parseDescriptor(e.range.slice(ir.length),!0);return r.resolver.getResolutionDependencies(i,r)}async getCandidates(e,r,i){let n=S.parseDescriptor(e.range.slice(ir.length),!0);return await i.resolver.getCandidates(n,r,i)}async getSatisfying(e,r,i){let n=S.parseDescriptor(e.range.slice(ir.length),!0);return i.resolver.getSatisfying(n,r,i)}resolve(e,r){throw new Error("Unreachable")}};var vT=ie(Or()),Fce=ie(require("url"));var Vs=class{supports(e,r){if(!e.reference.startsWith(ir))return!1;let i=new Fce.URL(e.reference);return!(!vT.default.valid(i.pathname)||i.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,P({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${S.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),skipIntegrityCheck:r.skipIntegrityCheck},r.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:S.getIdentVendorPath(e),checksum:o}}async fetchFromNetwork(e,r){let i;try{i=await zs(Vs.getLocatorUrl(e),{configuration:r.project.configuration,ident:e})}catch(n){i=await zs(Vs.getLocatorUrl(e).replace(/%2f/g,"/"),{configuration:r.project.configuration,ident:e})}return await Ai.convertToZip(i,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:S.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:i}){let n=Ya(e.scope,{configuration:i}),s=Vs.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),n=n.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===n+s||r===n+s.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=vT.default.clean(e.reference.slice(ir.length));if(r===null)throw new nt(z.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");return`${zA(e)}/-/${e.name}-${r}.tgz`}};var ST=ie(Or());var rQ=S.makeIdent(null,"node-gyp"),Z6e=/\b(node-gyp|prebuild-install)\b/,xT=class{supportsDescriptor(e,r){return e.range.startsWith(ir)?!!qt.validRange(e.range.slice(ir.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(ir))return!1;let{selector:i}=S.parseRange(e.reference);return!!ST.default.valid(i)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,i){return e}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){let n=qt.validRange(e.range.slice(ir.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(ir.length)}`);let s=await zs(zA(e),{configuration:i.project.configuration,ident:e,jsonResponse:!0}),o=de.mapAndFilter(Object.keys(s.versions),c=>{try{let u=new qt.SemVer(c);if(n.test(u))return u}catch{}return de.mapAndFilter.skip}),a=o.filter(c=>!s.versions[c.raw].deprecated),l=a.length>0?a:o;return l.sort((c,u)=>-c.compare(u)),l.map(c=>{let u=S.makeLocator(e,`${ir}${c.raw}`),g=s.versions[c.raw].dist.tarball;return Vs.isConventionalTarballUrl(u,g,{configuration:i.project.configuration})?u:S.bindLocator(u,{__archiveUrl:g})})}async getSatisfying(e,r,i){let n=qt.validRange(e.range.slice(ir.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(ir.length)}`);return de.mapAndFilter(r,s=>{try{let{selector:o}=S.parseRange(s,{requireProtocol:ir}),a=new qt.SemVer(o);if(n.test(a))return{reference:s,version:a}}catch{}return de.mapAndFilter.skip}).sort((s,o)=>-s.version.compare(o.version)).map(({reference:s})=>S.makeLocator(e,s))}async resolve(e,r){let{selector:i}=S.parseRange(e.reference),n=ST.default.clean(i);if(n===null)throw new nt(z.RESOLVER_NOT_FOUND,"The npm semver resolver got selected, but the version isn't semver");let s=await zs(zA(e),{configuration:r.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(s,"versions"))throw new nt(z.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(!Object.prototype.hasOwnProperty.call(s.versions,n))throw new nt(z.REMOTE_NOT_FOUND,`Registry failed to return reference "${n}"`);let o=new Ze;if(o.load(s.versions[n]),!o.dependencies.has(rQ.identHash)&&!o.peerDependencies.has(rQ.identHash)){for(let a of o.scripts.values())if(a.match(Z6e)){o.dependencies.set(rQ.identHash,S.makeDescriptor(rQ,"latest")),r.report.reportWarningOnce(z.NODE_GYP_INJECTED,`${S.prettyLocator(r.project.configuration,e)}: Implicit dependencies on node-gyp are discouraged`);break}}return typeof o.raw.deprecated=="string"&&r.report.reportWarningOnce(z.DEPRECATED_PACKAGE,`${S.prettyLocator(r.project.configuration,e)} is deprecated: ${o.raw.deprecated}`),_(P({},e),{version:n,languageName:"node",linkType:gt.HARD,conditions:o.getConditions(),dependencies:o.dependencies,peerDependencies:o.peerDependencies,dependenciesMeta:o.dependenciesMeta,peerDependenciesMeta:o.peerDependenciesMeta,bin:o.bin})}};var kT=class{supportsDescriptor(e,r){return!(!e.range.startsWith(ir)||!Rg.test(e.range.slice(ir.length)))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,i){return e}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){let n=e.range.slice(ir.length),s=await zs(zA(e),{configuration:i.project.configuration,ident:e,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(s,"dist-tags"))throw new nt(z.REMOTE_INVALID,'Registry returned invalid data - missing "dist-tags" field');let o=s["dist-tags"];if(!Object.prototype.hasOwnProperty.call(o,n))throw new nt(z.REMOTE_NOT_FOUND,`Registry failed to return tag "${n}"`);let a=o[n],l=S.makeLocator(e,`${ir}${a}`),c=s.versions[a].dist.tarball;return Vs.isConventionalTarballUrl(l,c,{configuration:i.project.configuration})?[l]:[S.bindLocator(l,{__archiveUrl:c})]}async getSatisfying(e,r,i){return null}async resolve(e,r){throw new Error("Unreachable")}};var Rf={};it(Rf,{getGitHead:()=>_7e,makePublishBody:()=>V7e});var CM={};it(CM,{default:()=>D7e,packUtils:()=>za});var za={};it(za,{genPackList:()=>QQ,genPackStream:()=>dM,genPackageManifest:()=>age,hasPackScripts:()=>hM,prepareForPack:()=>pM});var fM=ie(Nn()),sge=ie(nge()),oge=ie(require("zlib")),I7e=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],y7e=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function hM(t){return!!(Kt.hasWorkspaceScript(t,"prepack")||Kt.hasWorkspaceScript(t,"postpack"))}async function pM(t,{report:e},r){await Kt.maybeExecuteWorkspaceLifecycleScript(t,"prepack",{report:e});try{let i=v.join(t.cwd,Ze.fileName);await T.existsPromise(i)&&await t.manifest.loadFile(i,{baseFs:T}),await r()}finally{await Kt.maybeExecuteWorkspaceLifecycleScript(t,"postpack",{report:e})}}async function dM(t,e){var s,o;typeof e=="undefined"&&(e=await QQ(t));let r=new Set;for(let a of(o=(s=t.manifest.publishConfig)==null?void 0:s.executableFiles)!=null?o:new Set)r.add(v.normalize(a));for(let a of t.manifest.bin.values())r.add(v.normalize(a));let i=sge.default.pack();process.nextTick(async()=>{for(let a of e){let l=v.normalize(a),c=v.resolve(t.cwd,l),u=v.join("package",l),g=await T.lstatPromise(c),f={name:u,mtime:new Date(mr.SAFE_TIME*1e3)},h=r.has(l)?493:420,p,d,m=new Promise((B,b)=>{p=B,d=b}),I=B=>{B?d(B):p()};if(g.isFile()){let B;l==="package.json"?B=Buffer.from(JSON.stringify(await age(t),null,2)):B=await T.readFilePromise(c),i.entry(_(P({},f),{mode:h,type:"file"}),B,I)}else g.isSymbolicLink()?i.entry(_(P({},f),{mode:h,type:"symlink",linkname:await T.readlinkPromise(c)}),I):I(new Error(`Unsupported file type ${g.mode} for ${M.fromPortablePath(l)}`));await m}i.finalize()});let n=(0,oge.createGzip)();return i.pipe(n),n}async function age(t){let e=JSON.parse(JSON.stringify(t.manifest.raw));return await t.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,t,e),e}async function QQ(t){var g,f,h,p,d,m,I,B;let e=t.project,r=e.configuration,i={accept:[],reject:[]};for(let b of y7e)i.reject.push(b);for(let b of I7e)i.accept.push(b);i.reject.push(r.get("rcFilename"));let n=b=>{if(b===null||!b.startsWith(`${t.cwd}/`))return;let R=v.relative(t.cwd,b),H=v.resolve(Se.root,R);i.reject.push(H)};n(v.resolve(e.cwd,r.get("lockfileFilename"))),n(r.get("cacheFolder")),n(r.get("globalFolder")),n(r.get("installStatePath")),n(r.get("virtualFolder")),n(r.get("yarnPath")),await r.triggerHook(b=>b.populateYarnPaths,e,b=>{n(b)});for(let b of e.workspaces){let R=v.relative(t.cwd,b.cwd);R!==""&&!R.match(/^(\.\.)?\//)&&i.reject.push(`/${R}`)}let s={accept:[],reject:[]},o=(f=(g=t.manifest.publishConfig)==null?void 0:g.main)!=null?f:t.manifest.main,a=(p=(h=t.manifest.publishConfig)==null?void 0:h.module)!=null?p:t.manifest.module,l=(m=(d=t.manifest.publishConfig)==null?void 0:d.browser)!=null?m:t.manifest.browser,c=(B=(I=t.manifest.publishConfig)==null?void 0:I.bin)!=null?B:t.manifest.bin;o!=null&&s.accept.push(v.resolve(Se.root,o)),a!=null&&s.accept.push(v.resolve(Se.root,a)),typeof l=="string"&&s.accept.push(v.resolve(Se.root,l));for(let b of c.values())s.accept.push(v.resolve(Se.root,b));if(l instanceof Map)for(let[b,R]of l.entries())s.accept.push(v.resolve(Se.root,b)),typeof R=="string"&&s.accept.push(v.resolve(Se.root,R));let u=t.manifest.files!==null;if(u){s.reject.push("/*");for(let b of t.manifest.files)Age(s.accept,b,{cwd:Se.root})}return await w7e(t.cwd,{hasExplicitFileList:u,globalList:i,ignoreList:s})}async function w7e(t,{hasExplicitFileList:e,globalList:r,ignoreList:i}){let n=[],s=new Zo(t),o=[[Se.root,[i]]];for(;o.length>0;){let[a,l]=o.pop(),c=await s.lstatPromise(a);if(!cge(a,{globalList:r,ignoreLists:c.isDirectory()?null:l}))if(c.isDirectory()){let u=await s.readdirPromise(a),g=!1,f=!1;if(!e||a!==Se.root)for(let d of u)g=g||d===".gitignore",f=f||d===".npmignore";let h=f?await lge(s,a,".npmignore"):g?await lge(s,a,".gitignore"):null,p=h!==null?[h].concat(l):l;cge(a,{globalList:r,ignoreLists:l})&&(p=[...l,{accept:[],reject:["**/*"]}]);for(let d of u)o.push([v.resolve(a,d),p])}else(c.isFile()||c.isSymbolicLink())&&n.push(v.relative(Se.root,a))}return n.sort()}async function lge(t,e,r){let i={accept:[],reject:[]},n=await t.readFilePromise(v.join(e,r),"utf8");for(let s of n.split(/\n/g))Age(i.reject,s,{cwd:e});return i}function B7e(t,{cwd:e}){let r=t[0]==="!";return r&&(t=t.slice(1)),t.match(/\.{0,1}\//)&&(t=v.resolve(e,t)),r&&(t=`!${t}`),t}function Age(t,e,{cwd:r}){let i=e.trim();i===""||i[0]==="#"||t.push(B7e(i,{cwd:r}))}function cge(t,{globalList:e,ignoreLists:r}){if(bQ(t,e.accept))return!1;if(bQ(t,e.reject))return!0;if(r!==null)for(let i of r){if(bQ(t,i.accept))return!1;if(bQ(t,i.reject))return!0}return!1}function bQ(t,e){let r=e,i=[];for(let n=0;n{await pM(i,{report:l},async()=>{l.reportJson({base:M.fromPortablePath(i.cwd)});let c=await QQ(i);for(let u of c)l.reportInfo(null,M.fromPortablePath(u)),l.reportJson({location:M.fromPortablePath(u)});if(!this.dryRun){let u=await dM(i,c),g=T.createWriteStream(s);u.pipe(g),await new Promise(f=>{g.on("finish",f)})}}),this.dryRun||(l.reportInfo(z.UNNAMED,`Package archive generated in ${ue.pretty(e,s,ue.Type.PATH)}`),l.reportJson({output:M.fromPortablePath(s)}))})).exitCode()}};fm.paths=[["pack"]],fm.usage=ye.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"]]});var gge=fm;function Q7e(t,{workspace:e}){let r=t.replace("%s",b7e(e)).replace("%v",v7e(e));return M.toPortablePath(r)}function b7e(t){return t.manifest.name!==null?S.slugifyIdent(t.manifest.name):"package"}function v7e(t){return t.manifest.version!==null?t.manifest.version:"unknown"}var S7e=["dependencies","devDependencies","peerDependencies"],x7e="workspace:",k7e=(t,e)=>{var i,n;e.publishConfig&&(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.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let r=t.project;for(let s of S7e)for(let o of t.manifest.getForScope(s).values()){let a=r.tryWorkspaceByDescriptor(o),l=S.parseRange(o.range);if(l.protocol===x7e)if(a===null){if(r.tryWorkspaceByIdent(o)===null)throw new nt(z.WORKSPACE_NOT_FOUND,`${S.prettyDescriptor(r.configuration,o)}: No local workspace found for this range`)}else{let c;S.areDescriptorsEqual(o,a.anchoredDescriptor)||l.selector==="*"?c=(i=a.manifest.version)!=null?i:"0.0.0":l.selector==="~"||l.selector==="^"?c=`${l.selector}${(n=a.manifest.version)!=null?n:"0.0.0"}`:c=l.selector,e[s][S.stringifyIdent(o)]=c}}},P7e={hooks:{beforeWorkspacePacking:k7e},commands:[gge]},D7e=P7e;var yge=ie(require("crypto")),wge=ie(Ige()),Bge=ie(require("url"));async function V7e(t,e,{access:r,tag:i,registry:n,gitHead:s}){let o=t.project.configuration,a=t.manifest.name,l=t.manifest.version,c=S.stringifyIdent(a),u=(0,yge.createHash)("sha1").update(e).digest("hex"),g=wge.default.fromData(e).toString();typeof r=="undefined"&&(t.manifest.publishConfig&&typeof t.manifest.publishConfig.access=="string"?r=t.manifest.publishConfig.access:o.get("npmPublishAccess")!==null?r=o.get("npmPublishAccess"):a.scope?r="restricted":r="public");let f=await za.genPackageManifest(t),h=`${c}-${l}.tgz`,p=new Bge.URL(`${To(n)}/${c}/-/${h}`);return{_id:c,_attachments:{[h]:{content_type:"application/octet-stream",data:e.toString("base64"),length:e.length}},name:c,access:r,["dist-tags"]:{[i]:l},versions:{[l]:_(P({},f),{_id:`${c}@${l}`,name:c,version:l,gitHead:s,dist:{shasum:u,integrity:g,tarball:p.toString()}})}}}async function _7e(t){try{let{stdout:e}=await hr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:t});return e.trim()===""?void 0:e.trim()}catch{return}}var wM={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:ge.BOOLEAN,default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:ge.SECRET,default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:ge.SECRET,default:null}},Qge={npmAuditRegistry:{description:"Registry to query for audit reports",type:ge.STRING,default:null},npmPublishRegistry:{description:"Registry to push packages to",type:ge.STRING,default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:ge.STRING,default:"https://registry.yarnpkg.com"}},X7e={configuration:_(P(P({},wM),Qge),{npmScopes:{description:"Settings per package scope",type:ge.MAP,valueDefinition:{description:"",type:ge.SHAPE,properties:P(P({},wM),Qge)}},npmRegistries:{description:"Settings per registry",type:ge.MAP,normalizeKeys:To,valueDefinition:{description:"",type:ge.SHAPE,properties:P({},wM)}}}),fetchers:[QT,Vs],resolvers:[bT,xT,kT]},Z7e=X7e;var vM={};it(vM,{default:()=>a_e});Ss();var Ho;(function(i){i.All="all",i.Production="production",i.Development="development"})(Ho||(Ho={}));var Xs;(function(s){s.Info="info",s.Low="low",s.Moderate="moderate",s.High="high",s.Critical="critical"})(Xs||(Xs={}));var vQ=[Xs.Info,Xs.Low,Xs.Moderate,Xs.High,Xs.Critical];function bge(t,e){let r=[],i=new Set,n=o=>{i.has(o)||(i.add(o),r.push(o))};for(let o of e)n(o);let s=new Set;for(;r.length>0;){let o=r.shift(),a=t.storedResolutions.get(o);if(typeof a=="undefined")throw new Error("Assertion failed: Expected the resolution to have been registered");let l=t.storedPackages.get(a);if(!!l){s.add(o);for(let c of l.dependencies.values())n(c.descriptorHash)}}return s}function $7e(t,e){return new Set([...t].filter(r=>!e.has(r)))}function e_e(t,e,{all:r}){let i=r?t.workspaces:[e],n=i.map(f=>f.manifest),s=new Set(n.map(f=>[...f.dependencies].map(([h,p])=>h)).flat()),o=new Set(n.map(f=>[...f.devDependencies].map(([h,p])=>h)).flat()),a=i.map(f=>[...f.dependencies.values()]).flat(),l=a.filter(f=>s.has(f.identHash)).map(f=>f.descriptorHash),c=a.filter(f=>o.has(f.identHash)).map(f=>f.descriptorHash),u=bge(t,l),g=bge(t,c);return $7e(g,u)}function vge(t){let e={};for(let r of t)e[S.stringifyIdent(r)]=S.parseRange(r.range).selector;return e}function Sge(t){if(typeof t=="undefined")return new Set;let e=vQ.indexOf(t),r=vQ.slice(e);return new Set(r)}function t_e(t,e){let r=Sge(e),i={};for(let n of r)i[n]=t[n];return i}function xge(t,e){var i;let r=t_e(t,e);for(let n of Object.keys(r))if((i=r[n])!=null?i:0>0)return!0;return!1}function kge(t,e){var s;let r={},i={children:r},n=Object.values(t.advisories);if(e!=null){let o=Sge(e);n=n.filter(a=>o.has(a.severity))}for(let o of de.sortMap(n,a=>a.module_name))r[o.module_name]={label:o.module_name,value:ue.tuple(ue.Type.RANGE,o.findings.map(a=>a.version).join(", ")),children:{Issue:{label:"Issue",value:ue.tuple(ue.Type.NO_HINT,o.title)},URL:{label:"URL",value:ue.tuple(ue.Type.URL,o.url)},Severity:{label:"Severity",value:ue.tuple(ue.Type.NO_HINT,o.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:ue.tuple(ue.Type.RANGE,o.vulnerable_versions)},["Patched Versions"]:{label:"Patched Versions",value:ue.tuple(ue.Type.RANGE,o.patched_versions)},Via:{label:"Via",value:ue.tuple(ue.Type.NO_HINT,Array.from(new Set(o.findings.map(a=>a.paths).flat().map(a=>a.split(">")[0]))).join(", "))},Recommendation:{label:"Recommendation",value:ue.tuple(ue.Type.NO_HINT,(s=o.recommendation)==null?void 0:s.replace(/\n/g," "))}}};return i}function Pge(t,e,{all:r,environment:i}){let n=r?t.workspaces:[e],s=[Ho.All,Ho.Production].includes(i),o=[];if(s)for(let c of n)for(let u of c.manifest.dependencies.values())o.push(u);let a=[Ho.All,Ho.Development].includes(i),l=[];if(a)for(let c of n)for(let u of c.manifest.devDependencies.values())l.push(u);return vge([...o,...l].filter(c=>S.parseRange(c.range).protocol===null))}function Dge(t,e,{all:r}){var s;let i=e_e(t,e,{all:r}),n={};for(let o of t.storedPackages.values())n[S.stringifyIdent(o)]={version:(s=o.version)!=null?s:"0.0.0",integrity:o.identHash,requires:vge(o.dependencies.values()),dev:i.has(S.convertLocatorToDescriptor(o).descriptorHash)};return n}var dm=class extends Be{constructor(){super(...arguments);this.all=Y.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=Y.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=Y.String("--environment",Ho.All,{description:"Which environments to cover",validator:Yi(Ho)});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.severity=Y.String("--severity",Xs.Info,{description:"Minimal severity requested for packages to be displayed",validator:Yi(Xs)})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState();let n=Pge(r,i,{all:this.all,environment:this.environment}),s=Dge(r,i,{all:this.all});if(!this.recursive)for(let f of Object.keys(s))Object.prototype.hasOwnProperty.call(n,f)?s[f].requires={}:delete s[f];let o={requires:n,dependencies:s},a=gr.getAuditRegistry(i.manifest,{configuration:e}),l,c=await Fa.start({configuration:e,stdout:this.context.stdout},async()=>{l=await Lt.post("/-/npm/v1/security/audits/quick",o,{authType:Lt.AuthType.BEST_EFFORT,configuration:e,jsonResponse:!0,registry:a})});if(c.hasErrors())return c.exitCode();let u=xge(l.metadata.vulnerabilities,this.severity);return!this.json&&u?(Hs.emitTree(kge(l,this.severity),{configuration:e,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Fe.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async f=>{f.reportJson(l),u||f.reportInfo(z.EXCEPTION,"No audit suggestions")})).exitCode()}};dm.paths=[["npm","audit"]],dm.usage=ye.Usage({description:"perform a vulnerability audit against the installed packages",details:` - 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). - - 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\`. - - Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${vQ.map(e=>`\`${e}\``).join(", ")}. - - 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. - - To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why \` to get more information as to who depends on them. - `,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"]]});var Rge=dm;var BM=ie(Or()),QM=ie(require("util")),Cm=class extends Be{constructor(){super(...arguments);this.fields=Y.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=Y.Rest()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r}=await Ke.find(e,this.context.cwd),i=typeof this.fields!="undefined"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],s=!1,o=await Fe.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async a=>{for(let l of this.packages){let c;if(l==="."){let b=r.topLevelWorkspace;if(!b.manifest.name)throw new me(`Missing 'name' field in ${M.fromPortablePath(v.join(b.cwd,wt.manifest))}`);c=S.makeDescriptor(b.manifest.name,"unknown")}else c=S.parseDescriptor(l);let u=Lt.getIdentUrl(c),g=bM(await Lt.get(u,{configuration:e,ident:c,jsonResponse:!0,customErrorMessage:Lt.customPackageError})),f=Object.keys(g.versions).sort(BM.default.compareLoose),p=g["dist-tags"].latest||f[f.length-1],d=qt.validRange(c.range);if(d){let b=BM.default.maxSatisfying(f,d);b!==null?p=b:(a.reportWarning(z.UNNAMED,`Unmet range ${S.prettyRange(e,c.range)}; falling back to the latest version`),s=!0)}else c.range!=="unknown"&&(a.reportWarning(z.UNNAMED,`Invalid range ${S.prettyRange(e,c.range)}; falling back to the latest version`),s=!0);let m=g.versions[p],I=_(P(P({},g),m),{version:p,versions:f}),B;if(i!==null){B={};for(let b of i){let R=I[b];if(typeof R!="undefined")B[b]=R;else{a.reportWarning(z.EXCEPTION,`The '${b}' field doesn't exist inside ${S.prettyIdent(e,c)}'s informations`),s=!0;continue}}}else this.json||(delete I.dist,delete I.readme,delete I.users),B=I;a.reportJson(B),this.json||n.push(B)}});QM.inspect.styles.name="cyan";for(let a of n)(a!==n[0]||s)&&this.context.stdout.write(` -`),this.context.stdout.write(`${(0,QM.inspect)(a,{depth:Infinity,colors:!0,compact:!1})} -`);return o.exitCode()}};Cm.paths=[["npm","info"]],Cm.usage=ye.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command will fetch 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 `@` to the package argument to provide information specific to the latest version that satisfies the range. 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 informations.\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 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"]]});var Fge=Cm;function bM(t){if(Array.isArray(t)){let e=[];for(let r of t)r=bM(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 i=bM(t[r]);i&&(e[r]=i)}return e}else return t||null}var Nge=ie(aC()),mm=class extends Be{constructor(){super(...arguments);this.scope=Y.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=Y.Boolean("--publish",!1,{description:"Login to the publish registry"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r=await SQ({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{let s=await i_e({registry:r,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),o=`/-/user/org.couchdb.user:${encodeURIComponent(s.name)}`,a=await Lt.put(o,s,{attemptedAs:s.name,configuration:e,registry:r,jsonResponse:!0,authType:Lt.AuthType.NO_AUTH});return await r_e(r,a.token,{configuration:e,scope:this.scope}),n.reportInfo(z.UNNAMED,"Successfully logged in")})).exitCode()}};mm.paths=[["npm","login"]],mm.usage=ye.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"]]});var Lge=mm;async function SQ({scope:t,publish:e,configuration:r,cwd:i}){return t&&e?gr.getScopeRegistry(t,{configuration:r,type:gr.RegistryType.PUBLISH_REGISTRY}):t?gr.getScopeRegistry(t,{configuration:r}):e?gr.getPublishRegistry((await rf(r,i)).manifest,{configuration:r}):gr.getDefaultRegistry({configuration:r})}async function r_e(t,e,{configuration:r,scope:i}){let n=o=>a=>{let l=de.isIndexableObject(a)?a:{},c=l[o],u=de.isIndexableObject(c)?c:{};return _(P({},l),{[o]:_(P({},u),{npmAuthToken:e})})},s=i?{npmScopes:n(i)}:{npmRegistries:n(t)};return await fe.updateHomeConfiguration(s)}async function i_e({registry:t,report:e,stdin:r,stdout:i}){if(process.env.TEST_ENV)return{name:process.env.TEST_NPM_USER||"",password:process.env.TEST_NPM_PASSWORD||""};e.reportInfo(z.UNNAMED,`Logging in to ${t}`);let n=!1;t.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(e.reportInfo(z.UNNAMED,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),e.reportSeparator();let{username:s,password:o}=await(0,Nge.prompt)([{type:"input",name:"username",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:i},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:r,stdout:i}]);return e.reportSeparator(),{name:s,password:o}}var Ff=new Set(["npmAuthIdent","npmAuthToken"]),Em=class extends Be{constructor(){super(...arguments);this.scope=Y.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=Y.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=Y.Boolean("-A,--all",!1,{description:"Logout of all registries"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r=async()=>{var l;let n=await SQ({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),s=await fe.find(this.context.cwd,this.context.plugins),o=S.makeIdent((l=this.scope)!=null?l:null,"pkg");return!gr.getAuthConfiguration(n,{configuration:s,ident:o}).get("npmAuthToken")};return(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{if(this.all&&(await n_e(),n.reportInfo(z.UNNAMED,"Successfully logged out from everything")),this.scope){await Tge("npmScopes",this.scope),await r()?n.reportInfo(z.UNNAMED,`Successfully logged out from ${this.scope}`):n.reportWarning(z.UNNAMED,"Scope authentication settings removed, but some other ones settings still apply to it");return}let s=await SQ({configuration:e,cwd:this.context.cwd,publish:this.publish});await Tge("npmRegistries",s),await r()?n.reportInfo(z.UNNAMED,`Successfully logged out from ${s}`):n.reportWarning(z.UNNAMED,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}};Em.paths=[["npm","logout"]],Em.usage=ye.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"]]});var Mge=Em;function s_e(t,e){let r=t[e];if(!de.isIndexableObject(r))return!1;let i=new Set(Object.keys(r));if([...Ff].every(s=>!i.has(s)))return!1;for(let s of Ff)i.delete(s);if(i.size===0)return t[e]=void 0,!0;let n=P({},r);for(let s of Ff)delete n[s];return t[e]=n,!0}async function n_e(){let t=e=>{let r=!1,i=de.isIndexableObject(e)?P({},e):{};i.npmAuthToken&&(delete i.npmAuthToken,r=!0);for(let n of Object.keys(i))s_e(i,n)&&(r=!0);if(Object.keys(i).length!==0)return r?i:e};return await fe.updateHomeConfiguration({npmRegistries:t,npmScopes:t})}async function Tge(t,e){return await fe.updateHomeConfiguration({[t]:r=>{let i=de.isIndexableObject(r)?r:{};if(!Object.prototype.hasOwnProperty.call(i,e))return r;let n=i[e],s=de.isIndexableObject(n)?n:{},o=new Set(Object.keys(s));if([...Ff].every(l=>!o.has(l)))return r;for(let l of Ff)o.delete(l);if(o.size===0)return Object.keys(i).length===1?void 0:_(P({},i),{[e]:void 0});let a={};for(let l of Ff)a[l]=void 0;return _(P({},i),{[e]:P(P({},s),a)})}})}var Im=class extends Be{constructor(){super(...arguments);this.access=Y.String("--access",{description:"The access for the published package (public or restricted)"});this.tag=Y.String("--tag","latest",{description:"The tag on the registry that the package should be attached to"});this.tolerateRepublish=Y.Boolean("--tolerate-republish",!1,{description:"Warn and exit when republishing an already existing version of a package"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd);if(!i)throw new rt(r.cwd,this.context.cwd);if(i.manifest.private)throw new me("Private workspaces cannot be published");if(i.manifest.name===null||i.manifest.version===null)throw new me("Workspaces must have valid names and versions to be published on an external registry");await r.restoreInstallState();let n=i.manifest.name,s=i.manifest.version,o=gr.getPublishRegistry(i.manifest,{configuration:e});return(await Fe.start({configuration:e,stdout:this.context.stdout},async l=>{var c,u;if(this.tolerateRepublish)try{let g=await Lt.get(Lt.getIdentUrl(n),{configuration:e,registry:o,ident:n,jsonResponse:!0});if(!Object.prototype.hasOwnProperty.call(g,"versions"))throw new nt(z.REMOTE_INVALID,'Registry returned invalid data for - missing "versions" field');if(Object.prototype.hasOwnProperty.call(g.versions,s)){l.reportWarning(z.UNNAMED,`Registry already knows about version ${s}; skipping.`);return}}catch(g){if(((u=(c=g.originalError)==null?void 0:c.response)==null?void 0:u.statusCode)!==404)throw g}await Kt.maybeExecuteWorkspaceLifecycleScript(i,"prepublish",{report:l}),await za.prepareForPack(i,{report:l},async()=>{let g=await za.genPackList(i);for(let m of g)l.reportInfo(null,m);let f=await za.genPackStream(i,g),h=await de.bufferStream(f),p=await Rf.getGitHead(i.cwd),d=await Rf.makePublishBody(i,h,{access:this.access,tag:this.tag,registry:o,gitHead:p});await Lt.put(Lt.getIdentUrl(n),d,{configuration:e,registry:o,ident:n,jsonResponse:!0})}),l.reportInfo(z.UNNAMED,"Package archive published")})).exitCode()}};Im.paths=[["npm","publish"]],Im.usage=ye.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 overriden 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"]]});var Oge=Im;var Uge=ie(Or());var ym=class extends Be{constructor(){super(...arguments);this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=Y.String({required:!1})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n;if(typeof this.package!="undefined")n=S.parseIdent(this.package);else{if(!i)throw new rt(r.cwd,this.context.cwd);if(!i.manifest.name)throw new me(`Missing 'name' field in ${M.fromPortablePath(v.join(i.cwd,wt.manifest))}`);n=i.manifest.name}let s=await wm(n,e),a={children:de.sortMap(Object.entries(s),([l])=>l).map(([l,c])=>({value:ue.tuple(ue.Type.RESOLUTION,{descriptor:S.makeDescriptor(n,l),locator:S.makeLocator(n,c)})}))};return Hs.emitTree(a,{configuration:e,json:this.json,stdout:this.context.stdout})}};ym.paths=[["npm","tag","list"]],ym.usage=ye.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:` - This command will list all tags of a package from the npm registry. - - If the package is not specified, Yarn will default to the current workspace. - `,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});var Kge=ym;async function wm(t,e){let r=`/-/package${Lt.getIdentUrl(t)}/dist-tags`;return Lt.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:Lt.customPackageError})}var Bm=class extends Be{constructor(){super(...arguments);this.package=Y.String();this.tag=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd);if(!i)throw new rt(r.cwd,this.context.cwd);let n=S.parseDescriptor(this.package,!0),s=n.range;if(!Uge.default.valid(s))throw new me(`The range ${ue.pretty(e,n.range,ue.Type.RANGE)} must be a valid semver version`);let o=gr.getPublishRegistry(i.manifest,{configuration:e}),a=ue.pretty(e,n,ue.Type.IDENT),l=ue.pretty(e,s,ue.Type.RANGE),c=ue.pretty(e,this.tag,ue.Type.CODE);return(await Fe.start({configuration:e,stdout:this.context.stdout},async g=>{let f=await wm(n,e);Object.prototype.hasOwnProperty.call(f,this.tag)&&f[this.tag]===s&&g.reportWarning(z.UNNAMED,`Tag ${c} is already set to version ${l}`);let h=`/-/package${Lt.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Lt.put(h,s,{configuration:e,registry:o,ident:n,jsonRequest:!0,jsonResponse:!0}),g.reportInfo(z.UNNAMED,`Tag ${c} added to version ${l} of package ${a}`)})).exitCode()}};Bm.paths=[["npm","tag","add"]],Bm.usage=ye.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:` - 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. - `,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"]]});var Hge=Bm;var Qm=class extends Be{constructor(){super(...arguments);this.package=Y.String();this.tag=Y.String()}async execute(){if(this.tag==="latest")throw new me("The 'latest' tag cannot be removed.");let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd);if(!i)throw new rt(r.cwd,this.context.cwd);let n=S.parseIdent(this.package),s=gr.getPublishRegistry(i.manifest,{configuration:e}),o=ue.pretty(e,this.tag,ue.Type.CODE),a=ue.pretty(e,n,ue.Type.IDENT),l=await wm(n,e);if(!Object.prototype.hasOwnProperty.call(l,this.tag))throw new me(`${o} is not a tag of package ${a}`);return(await Fe.start({configuration:e,stdout:this.context.stdout},async u=>{let g=`/-/package${Lt.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Lt.del(g,{configuration:e,registry:s,ident:n,jsonResponse:!0}),u.reportInfo(z.UNNAMED,`Tag ${o} removed from package ${a}`)})).exitCode()}};Qm.paths=[["npm","tag","remove"]],Qm.usage=ye.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:` - This command will remove a tag from a package from the npm registry. - `,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});var Gge=Qm;var bm=class extends Be{constructor(){super(...arguments);this.scope=Y.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=Y.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),r;return this.scope&&this.publish?r=gr.getScopeRegistry(this.scope,{configuration:e,type:gr.RegistryType.PUBLISH_REGISTRY}):this.scope?r=gr.getScopeRegistry(this.scope,{configuration:e}):this.publish?r=gr.getPublishRegistry((await rf(e,this.context.cwd)).manifest,{configuration:e}):r=gr.getDefaultRegistry({configuration:e}),(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{var o,a;let s;try{s=await Lt.get("/-/whoami",{configuration:e,registry:r,authType:Lt.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?S.makeIdent(this.scope,""):void 0})}catch(l){if(((o=l.response)==null?void 0:o.statusCode)===401||((a=l.response)==null?void 0:a.statusCode)===403){n.reportError(z.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired");return}else throw l}n.reportInfo(z.UNNAMED,s.username)})).exitCode()}};bm.paths=[["npm","whoami"]],bm.usage=ye.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"]]});var jge=bm;var o_e={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:ge.STRING,default:null}},commands:[Rge,Fge,Lge,Mge,Oge,Hge,Kge,Gge,jge]},a_e=o_e;var NM={};it(NM,{default:()=>B_e,patchUtils:()=>SM});var SM={};it(SM,{applyPatchFile:()=>PQ,diffFolders:()=>DM,extractPackageToDisk:()=>PM,extractPatchFlags:()=>Xge,isParentRequired:()=>kM,loadPatchFiles:()=>km,makeDescriptor:()=>I_e,makeLocator:()=>xM,parseDescriptor:()=>Sm,parseLocator:()=>xm,parsePatchFile:()=>kQ});var vm=class extends Error{constructor(e,r){super(`Cannot apply hunk #${e+1}`);this.hunk=r}};var A_e=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function Nf(t){return v.relative(Se.root,v.resolve(Se.root,M.toPortablePath(t)))}function l_e(t){let e=t.trim().match(A_e);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 c_e=420,u_e=493,Lr;(function(i){i.Context="context",i.Insertion="insertion",i.Deletion="deletion"})(Lr||(Lr={}));var Yge=()=>({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}),g_e=t=>({header:l_e(t),parts:[]}),f_e={["@"]:"header",["-"]:Lr.Deletion,["+"]:Lr.Insertion,[" "]:Lr.Context,["\\"]:"pragma",undefined:Lr.Context};function p_e(t){let e=[],r=Yge(),i="parsing header",n=null,s=null;function o(){n&&(s&&(n.parts.push(s),s=null),r.hunks.push(n),n=null)}function a(){o(),e.push(r),r=Yge()}for(let l=0;l0?"patch":"mode change",B=null;switch(I){case"rename":{if(!u||!g)throw new Error("Bad parser state: rename from & to not given");e.push({type:"rename",semverExclusivity:i,fromPath:Nf(u),toPath:Nf(g)}),B=g}break;case"file deletion":{let b=n||p;if(!b)throw new Error("Bad parse state: no path given for file deletion");e.push({type:"file deletion",semverExclusivity:i,hunk:m&&m[0]||null,path:Nf(b),mode:xQ(l),hash:f})}break;case"file creation":{let b=s||d;if(!b)throw new Error("Bad parse state: no path given for file creation");e.push({type:"file creation",semverExclusivity:i,hunk:m&&m[0]||null,path:Nf(b),mode:xQ(c),hash:h})}break;case"patch":case"mode change":B=d||s;break;default:de.assertNever(I);break}B&&o&&a&&o!==a&&e.push({type:"mode change",semverExclusivity:i,path:Nf(B),oldMode:xQ(o),newMode:xQ(a)}),B&&m&&m.length&&e.push({type:"patch",semverExclusivity:i,path:Nf(B),hunks:m,beforeHash:f,afterHash:h})}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 xQ(t){let e=parseInt(t,8)&511;if(e!==c_e&&e!==u_e)throw new Error(`Unexpected file mode string: ${t}`);return e}function kQ(t){let e=t.split(/\n/g);return e[e.length-1]===""&&e.pop(),d_e(p_e(e))}function h_e(t){let e=0,r=0;for(let{type:i,lines:n}of t.parts)switch(i){case Lr.Context:r+=n.length,e+=n.length;break;case Lr.Deletion:e+=n.length;break;case Lr.Insertion:r+=n.length;break;default:de.assertNever(i);break}if(e!==t.header.original.length||r!==t.header.patched.length){let i=n=>n<0?n:`+${n}`;throw new Error(`hunk header integrity check failed (expected @@ ${i(t.header.original.length)} ${i(t.header.patched.length)} @@, got @@ ${i(e)} ${i(r)} @@)`)}}async function Lf(t,e,r){let i=await t.lstatPromise(e),n=await r();if(typeof n!="undefined"&&(e=n),t.lutimesPromise)await t.lutimesPromise(e,i.atime,i.mtime);else if(!i.isSymbolicLink())await t.utimesPromise(e,i.atime,i.mtime);else throw new Error("Cannot preserve the time values of a symlink")}async function PQ(t,{baseFs:e=new Wt,dryRun:r=!1,version:i=null}={}){for(let n of t)if(!(n.semverExclusivity!==null&&i!==null&&!qt.satisfiesWithPrereleases(i,n.semverExclusivity)))switch(n.type){case"file deletion":if(r){if(!e.existsSync(n.path))throw new Error(`Trying to delete a file that doesn't exist: ${n.path}`)}else await Lf(e,v.dirname(n.path),async()=>{await e.unlinkPromise(n.path)});break;case"rename":if(r){if(!e.existsSync(n.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${n.fromPath}`)}else await Lf(e,v.dirname(n.fromPath),async()=>{await Lf(e,v.dirname(n.toPath),async()=>{await Lf(e,n.fromPath,async()=>(await e.movePromise(n.fromPath,n.toPath),n.toPath))})});break;case"file creation":if(r){if(e.existsSync(n.path))throw new Error(`Trying to create a file that already exists: ${n.path}`)}else{let s=n.hunk?n.hunk.parts[0].lines.join(` -`)+(n.hunk.parts[0].noNewlineAtEndOfFile?"":` -`):"";await e.mkdirpPromise(v.dirname(n.path),{chmod:493,utimes:[mr.SAFE_TIME,mr.SAFE_TIME]}),await e.writeFilePromise(n.path,s,{mode:n.mode}),await e.utimesPromise(n.path,mr.SAFE_TIME,mr.SAFE_TIME)}break;case"patch":await Lf(e,n.path,async()=>{await C_e(n,{baseFs:e,dryRun:r})});break;case"mode change":{let o=(await e.statPromise(n.path)).mode;if(qge(n.newMode)!==qge(o))continue;await Lf(e,n.path,async()=>{await e.chmodPromise(n.path,n.newMode)})}break;default:de.assertNever(n);break}}function qge(t){return(t&64)>0}function Jge(t){return t.replace(/\s+$/,"")}function m_e(t,e){return Jge(t)===Jge(e)}async function C_e({hunks:t,path:e},{baseFs:r,dryRun:i=!1}){let n=await r.statSync(e).mode,o=(await r.readFileSync(e,"utf8")).split(/\n/),a=[],l=0,c=0;for(let g of t){let f=Math.max(c,g.header.patched.start+l),h=Math.max(0,f-c),p=Math.max(0,o.length-f-g.header.original.length),d=Math.max(h,p),m=0,I=0,B=null;for(;m<=d;){if(m<=h&&(I=f-m,B=Wge(g,o,I),B!==null)){m=-m;break}if(m<=p&&(I=f+m,B=Wge(g,o,I),B!==null))break;m+=1}if(B===null)throw new vm(t.indexOf(g),g);a.push(B),l+=m,c=I+g.header.original.length}if(i)return;let u=0;for(let g of a)for(let f of g)switch(f.type){case"splice":{let h=f.index+u;o.splice(h,f.numToDelete,...f.linesToInsert),u+=f.linesToInsert.length-f.numToDelete}break;case"pop":o.pop();break;case"push":o.push(f.line);break;default:de.assertNever(f);break}await r.writeFilePromise(e,o.join(` -`),{mode:n})}function Wge(t,e,r){let i=[];for(let n of t.parts)switch(n.type){case Lr.Context:case Lr.Deletion:{for(let s of n.lines){let o=e[r];if(o==null||!m_e(o,s))return null;r+=1}n.type===Lr.Deletion&&(i.push({type:"splice",index:r-n.lines.length,numToDelete:n.lines.length,linesToInsert:[]}),n.noNewlineAtEndOfFile&&i.push({type:"push",line:""}))}break;case Lr.Insertion:i.push({type:"splice",index:r,numToDelete:0,linesToInsert:n.lines}),n.noNewlineAtEndOfFile&&i.push({type:"pop"});break;default:de.assertNever(n.type);break}return i}var E_e=/^builtin<([^>]+)>$/;function zge(t,e){let{source:r,selector:i,params:n}=S.parseRange(t);if(r===null)throw new Error("Patch locators must explicitly define their source");let s=i?i.split(/&/).map(c=>M.toPortablePath(c)):[],o=n&&typeof n.locator=="string"?S.parseLocator(n.locator):null,a=n&&typeof n.version=="string"?n.version:null,l=e(r);return{parentLocator:o,sourceItem:l,patchPaths:s,sourceVersion:a}}function Sm(t){let i=zge(t.range,S.parseDescriptor),{sourceItem:e}=i,r=qr(i,["sourceItem"]);return _(P({},r),{sourceDescriptor:e})}function xm(t){let i=zge(t.reference,S.parseLocator),{sourceItem:e}=i,r=qr(i,["sourceItem"]);return _(P({},r),{sourceLocator:e})}function Vge({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:i,patchHash:n},s){let o=t!==null?{locator:S.stringifyLocator(t)}:{},a=typeof i!="undefined"?{version:i}:{},l=typeof n!="undefined"?{hash:n}:{};return S.makeRange({protocol:"patch:",source:s(e),selector:r.join("&"),params:P(P(P({},a),l),o)})}function I_e(t,{parentLocator:e,sourceDescriptor:r,patchPaths:i}){return S.makeLocator(t,Vge({parentLocator:e,sourceItem:r,patchPaths:i},S.stringifyDescriptor))}function xM(t,{parentLocator:e,sourcePackage:r,patchPaths:i,patchHash:n}){return S.makeLocator(t,Vge({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:i,patchHash:n},S.stringifyLocator))}function _ge({onAbsolute:t,onRelative:e,onBuiltin:r},i){i.startsWith("~")&&(i=i.slice(1));let s=i.match(E_e);return s!==null?r(s[1]):v.isAbsolute(i)?t(i):e(i)}function Xge(t){let e=t.startsWith("~");return e&&(t=t.slice(1)),{optional:e}}function kM(t){return _ge({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},t)}async function km(t,e,r){let i=t!==null?await r.fetcher.fetch(t,r):null,n=i&&i.localPath?{packageFs:new Ft(Se.root),prefixPath:v.relative(Se.root,i.localPath)}:i;i&&i!==n&&i.releaseFs&&i.releaseFs();let s=await de.releaseAfterUseAsync(async()=>await Promise.all(e.map(async o=>{let a=Xge(o),l=await _ge({onAbsolute:async()=>await T.readFilePromise(o,"utf8"),onRelative:async()=>{if(n===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await n.packageFs.readFilePromise(v.join(n.prefixPath,o),"utf8")},onBuiltin:async c=>await r.project.configuration.firstHook(u=>u.getBuiltinPatch,r.project,c)},o);return _(P({},a),{source:l})})));for(let o of s)typeof o.source=="string"&&(o.source=o.source.replace(/\r\n?/g,` -`));return s}async function PM(t,{cache:e,project:r}){let i=r.storedPackages.get(t.locatorHash);if(typeof i=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let n=r.storedChecksums,s=new ei,o=r.configuration.makeFetcher(),a=await o.fetch(t,{cache:e,project:r,fetcher:o,checksums:n,report:s}),l=await T.mktempPromise(),c=v.join(l,"source"),u=v.join(l,"user"),g=v.join(l,".yarn-patch.json");return await Promise.all([T.copyPromise(c,a.prefixPath,{baseFs:a.packageFs}),T.copyPromise(u,a.prefixPath,{baseFs:a.packageFs}),T.writeJsonPromise(g,{locator:S.stringifyLocator(t),version:i.version})]),T.detachTemp(l),u}async function DM(t,e){let r=M.fromPortablePath(t).replace(/\\/g,"/"),i=M.fromPortablePath(e).replace(/\\/g,"/"),{stdout:n,stderr:s}=await hr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--text",r,i],{cwd:M.toPortablePath(process.cwd()),env:_(P({},process.env),{GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""})});if(s.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH. -The following error was reported by 'git': -${s}`);let o=r.startsWith("/")?a=>a.slice(1):a=>a;return n.replace(new RegExp(`(a|b)(${de.escapeRegExp(`/${o(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${de.escapeRegExp(`/${o(i)}/`)}`,"g"),"$1/").replace(new RegExp(de.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(de.escapeRegExp(`${i}/`),"g"),"")}function Zge(t,{configuration:e,report:r}){for(let i of t.parts)for(let n of i.lines)switch(i.type){case Lr.Context:r.reportInfo(null,` ${ue.pretty(e,n,"grey")}`);break;case Lr.Deletion:r.reportError(z.FROZEN_LOCKFILE_EXCEPTION,`- ${ue.pretty(e,n,ue.Type.REMOVED)}`);break;case Lr.Insertion:r.reportError(z.FROZEN_LOCKFILE_EXCEPTION,`+ ${ue.pretty(e,n,ue.Type.ADDED)}`);break;default:de.assertNever(i.type)}}var RM=class{supports(e,r){return!!e.reference.startsWith("patch:")}getLocalPath(e,r){return null}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,P({onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${S.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),skipIntegrityCheck:r.skipIntegrityCheck},r.cacheOptions));return{packageFs:n,releaseFs:s,prefixPath:S.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:o}}async patchPackage(e,r){let{parentLocator:i,sourceLocator:n,sourceVersion:s,patchPaths:o}=xm(e),a=await km(i,o,r),l=await T.mktempPromise(),c=v.join(l,"current.zip"),u=await r.fetcher.fetch(n,r),g=S.getIdentVendorPath(e),f=await $i(),h=new Jr(c,{libzip:f,create:!0,level:r.project.configuration.get("compressionLevel")});await de.releaseAfterUseAsync(async()=>{await h.copyPromise(g,u.prefixPath,{baseFs:u.packageFs,stableSort:!0})},u.releaseFs),h.saveAndClose();for(let{source:p,optional:d}of a){if(p===null)continue;let m=new Jr(c,{libzip:f,level:r.project.configuration.get("compressionLevel")}),I=new Ft(v.resolve(Se.root,g),{baseFs:m});try{await PQ(kQ(p),{baseFs:I,version:s})}catch(B){if(!(B instanceof vm))throw B;let b=r.project.configuration.get("enableInlineHunks"),R=!b&&!d?" (set enableInlineHunks for details)":"",H=`${S.prettyLocator(r.project.configuration,e)}: ${B.message}${R}`,L=K=>{!b||Zge(B.hunk,{configuration:r.project.configuration,report:K})};if(m.discardAndClose(),d){r.report.reportWarningOnce(z.PATCH_HUNK_FAILED,H,{reportExtra:L});continue}else throw new nt(z.PATCH_HUNK_FAILED,H,L)}m.saveAndClose()}return new Jr(c,{libzip:f,level:r.project.configuration.get("compressionLevel")})}};var y_e=3,FM=class{supportsDescriptor(e,r){return!!e.range.startsWith("patch:")}supportsLocator(e,r){return!!e.reference.startsWith("patch:")}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){let{patchPaths:n}=Sm(e);return n.every(s=>!kM(s))?e:S.bindDescriptor(e,{locator:S.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:i}=Sm(e);return[i]}async getCandidates(e,r,i){if(!i.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:n,sourceDescriptor:s,patchPaths:o}=Sm(e),a=await km(n,o,i.fetchOptions),l=r.get(s.descriptorHash);if(typeof l=="undefined")throw new Error("Assertion failed: The dependency should have been resolved");let c=mn.makeHash(`${y_e}`,...a.map(u=>JSON.stringify(u))).slice(0,6);return[xM(e,{parentLocator:n,sourcePackage:l,patchPaths:o,patchHash:c})]}async getSatisfying(e,r,i){return null}async resolve(e,r){let{sourceLocator:i}=xm(e),n=await r.resolver.resolve(i,r);return P(P({},n),e)}};var Pm=class extends Be{constructor(){super(...arguments);this.save=Y.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState();let n=v.resolve(this.context.cwd,M.toPortablePath(this.patchFolder)),s=v.join(n,"../source"),o=v.join(n,"../.yarn-patch.json");if(!T.existsSync(s))throw new me("The argument folder didn't get created by 'yarn patch'");let a=await DM(s,n),l=await T.readJsonPromise(o),c=S.parseLocator(l.locator,!0);if(!r.storedPackages.has(c.locatorHash))throw new me("No package found in the project for the given locator");if(!this.save){this.context.stdout.write(a);return}let u=e.get("patchFolder"),g=v.join(u,S.slugifyLocator(c));await T.mkdirPromise(u,{recursive:!0}),await T.writeFilePromise(g,a);let f=v.relative(r.cwd,g);r.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:S.stringifyIdent(c),description:l.version}},reference:`patch:${S.stringifyLocator(c)}#${f}`}),await r.persist()}};Pm.paths=[["patch-commit"]],Pm.usage=ye.Usage({description:"generate a patch out of a directory",details:"\n 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 Only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "});var $ge=Pm;var Dm=class extends Be{constructor(){super(...arguments);this.json=Y.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=Y.String()}async execute(){let e=await fe.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ke.find(e,this.context.cwd),n=await Qt.find(e);if(!i)throw new rt(r.cwd,this.context.cwd);await r.restoreInstallState();let s=S.parseLocator(this.package);if(s.reference==="unknown"){let o=de.mapAndFilter([...r.storedPackages.values()],a=>a.identHash!==s.identHash?de.mapAndFilter.skip:S.isVirtualLocator(a)?de.mapAndFilter.skip:a);if(o.length===0)throw new me("No package found in the project for the given locator");if(o.length>1)throw new me(`Multiple candidate packages found; explicitly choose one of them (use \`yarn why \` to get more information as to who depends on them): -${o.map(a=>` -- ${S.prettyLocator(e,a)}`).join("")}`);s=o[0]}if(!r.storedPackages.has(s.locatorHash))throw new me("No package found in the project for the given locator");await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async o=>{let a=await PM(s,{cache:n,project:r});o.reportJson({locator:S.stringifyLocator(s),path:M.fromPortablePath(a)}),o.reportInfo(z.UNNAMED,`Package ${S.prettyLocator(e,s)} got extracted with success!`),o.reportInfo(z.UNNAMED,`You can now edit the following folder: ${ue.pretty(e,M.fromPortablePath(a),"magenta")}`),o.reportInfo(z.UNNAMED,`Once you are done run ${ue.pretty(e,`yarn patch-commit ${process.platform==="win32"?'"':""}${M.fromPortablePath(a)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};Dm.paths=[["patch"]],Dm.usage=ye.Usage({description:"prepare a package for patching",details:'\n This command will cause a package to be extracted in a temporary directory (under a folder named "patch-workdir"). This folder will be editable at will; running `yarn patch` inside it will then cause Yarn to generate a patchfile and register it into your top-level manifest (cf the `patch:` protocol).\n '});var efe=Dm;var w_e={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:ge.BOOLEAN,default:!1},patchFolder:{description:"Folder where the patch files must be written",type:ge.ABSOLUTE_PATH,default:"./.yarn/patches"}},commands:[$ge,efe],fetchers:[RM],resolvers:[FM]},B_e=w_e;var TM={};it(TM,{default:()=>S_e});var tfe=ie(Wp()),LM=class{supportsPackage(e,r){return r.project.configuration.get("nodeLinker")==="pnpm"}async findPackageLocation(e,r){return nfe(e,{project:r.project})}async findPackageLocator(e,r){let i=ife(),n=r.project.installersCustomData.get(i);if(!n)throw new me(`The project in ${ue.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ue.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let s=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(s){let l=n.locatorByPath.get(s[1]);if(l)return l}let o=e,a=e;do{a=o,o=v.dirname(a);let l=n.locatorByPath.get(a);if(l)return l}while(o!==a);return null}makeInstaller(e){return new rfe(e)}},rfe=class{constructor(e){this.opts=e;this.asyncActions=new afe;this.packageLocations=new Map;this.customData={locatorByPath:new Map}}getCustomDataKey(){return ife()}attachCustomData(e){this.customData=e}async installPackage(e,r,i){switch(e.linkType){case gt.SOFT:return this.installPackageSoft(e,r,i);case gt.HARD:return this.installPackageHard(e,r,i)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,i){let n=v.resolve(r.packageFs.getRealPath(),r.prefixPath);return this.packageLocations.set(e.locatorHash,n),{packageLocation:n,buildDirective:null}}async installPackageHard(e,r,i){var u;let n=nfe(e,{project:this.opts.project});this.customData.locatorByPath.set(n,S.stringifyLocator(e)),this.packageLocations.set(e.locatorHash,n),i.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await T.mkdirPromise(n,{recursive:!0}),await T.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1})}));let o=S.isVirtualLocator(e)?S.devirtualizeLocator(e):e,a={manifest:(u=await Ze.tryFind(r.prefixPath,{baseFs:r.packageFs}))!=null?u:new Ze,misc:{hasBindingGyp:Ws.hasBindingGyp(r)}},l=this.opts.project.getDependencyMeta(o,e.version),c=Ws.extractBuildScripts(e,a,l,{configuration:this.opts.project.configuration,report:this.opts.report});return{packageLocation:n,buildDirective:c}}async attachInternalDependencies(e,r){this.opts.project.configuration.get("nodeLinker")==="pnpm"&&(!ofe(e,{project:this.opts.project})||this.asyncActions.reduce(e.locatorHash,async i=>{await i;let n=this.packageLocations.get(e.locatorHash);if(typeof n=="undefined")throw new Error(`Assertion failed: Expected the package to have been registered (${S.stringifyLocator(e)})`);let s=v.join(n,wt.nodeModules);r.length>0&&await T.mkdirpPromise(s);let o=await Q_e(s),a=[];for(let[l,c]of r){let u=c;ofe(c,{project:this.opts.project})||(this.opts.report.reportWarning(z.UNNAMED,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),u=S.devirtualizeLocator(c));let g=this.packageLocations.get(u.locatorHash);if(typeof g=="undefined")throw new Error(`Assertion failed: Expected the package to have been registered (${S.stringifyLocator(c)})`);let f=S.stringifyIdent(l),h=v.join(s,f),p=v.relative(v.dirname(h),g),d=o.get(f);o.delete(f),a.push(Promise.resolve().then(async()=>{if(d){if(d.isSymbolicLink()&&await T.readlinkPromise(h)===p)return;await T.removePromise(h)}await T.mkdirpPromise(v.dirname(h)),process.platform=="win32"?await T.symlinkPromise(g,h,"junction"):await T.symlinkPromise(p,h)}))}for(let l of o.keys())a.push(T.removePromise(v.join(s,l)));await Promise.all(a)}))}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the pnpm linker")}async finalizeInstall(){let e=sfe(this.opts.project),r=new Set;for(let s of this.packageLocations.values())r.add(v.basename(s));let i;try{i=await T.readdirPromise(e)}catch{i=[]}let n=[];for(let s of i)r.has(s)||n.push(T.removePromise(v.join(e,s)));await Promise.all(n),await this.asyncActions.wait()}};function ife(){return JSON.stringify({name:"PnpmInstaller",version:1})}function sfe(t){return v.join(t.cwd,wt.nodeModules,".store")}function nfe(t,{project:e}){let r=S.slugifyLocator(t);return v.join(sfe(e),r)}function ofe(t,{project:e}){return!S.isVirtualLocator(t)||!e.tryWorkspaceByLocator(t)}async function Q_e(t){let e=new Map,r=[];try{r=await T.readdirPromise(t,{withFileTypes:!0})}catch(i){if(i.code!=="ENOENT")throw i}try{for(let i of r)if(!i.name.startsWith("."))if(i.name.startsWith("@"))for(let n of await T.readdirPromise(v.join(t,i.name),{withFileTypes:!0}))e.set(`${i.name}/${n.name}`,n);else e.set(i.name,i)}catch(i){if(i.code!=="ENOENT")throw i}return e}function b_e(){let t,e;return{promise:new Promise((i,n)=>{t=i,e=n}),resolve:t,reject:e}}var afe=class{constructor(){this.deferred=new Map;this.promises=new Map;this.limit=(0,tfe.default)(10)}set(e,r){let i=this.deferred.get(e);typeof i=="undefined"&&this.deferred.set(e,i=b_e());let n=this.limit(()=>r());return this.promises.set(e,n),n.then(()=>{this.promises.get(e)===n&&i.resolve()},s=>{this.promises.get(e)===n&&i.reject(s)}),i.promise}reduce(e,r){var n;let i=(n=this.promises.get(e))!=null?n:Promise.resolve();this.set(e,()=>r(i))}async wait(){await Promise.all(this.promises.values())}};var v_e={linkers:[LM]},S_e=v_e;var F0=()=>({modules:new Map([["@yarnpkg/cli",iC],["@yarnpkg/core",Fd],["@yarnpkg/fslib",ch],["@yarnpkg/libzip",Fp],["@yarnpkg/parsers",Hp],["@yarnpkg/shell",jp],["clipanion",F$(vh)],["semver",x_e],["typanion",lu],["yup",k_e],["@yarnpkg/plugin-essentials",hL],["@yarnpkg/plugin-compat",mL],["@yarnpkg/plugin-dlx",EL],["@yarnpkg/plugin-file",xL],["@yarnpkg/plugin-git",fL],["@yarnpkg/plugin-github",PL],["@yarnpkg/plugin-http",FL],["@yarnpkg/plugin-init",ML],["@yarnpkg/plugin-link",GL],["@yarnpkg/plugin-nm",mT],["@yarnpkg/plugin-npm",yM],["@yarnpkg/plugin-npm-cli",vM],["@yarnpkg/plugin-pack",CM],["@yarnpkg/plugin-patch",NM],["@yarnpkg/plugin-pnp",oT],["@yarnpkg/plugin-pnpm",TM]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@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"])});i0({binaryVersion:Zr||"",pluginConfiguration:F0()});})(); -/*! - * buildToken - * Builds OAuth token prefix (helper function) - * - * @name buildToken - * @function - * @param {GitUrl} obj The parsed Git url object. - * @return {String} token prefix - */ -/*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - */ -/*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - */ -/*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ -/*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - */ -/*! - * is-windows - * - * Copyright © 2015-2018, Jon Schlinkert. - * Released under the MIT License. - */ -/*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - */ diff --git a/.yarn/releases/yarn-3.3.0.cjs b/.yarn/releases/yarn-3.3.0.cjs new file mode 100755 index 000000000000..47f24f66e01a --- /dev/null +++ b/.yarn/releases/yarn-3.3.0.cjs @@ -0,0 +1,807 @@ +#!/usr/bin/env node +/* eslint-disable */ +//prettier-ignore +(()=>{var lfe=Object.create;var GS=Object.defineProperty;var cfe=Object.getOwnPropertyDescriptor;var ufe=Object.getOwnPropertyNames;var gfe=Object.getPrototypeOf,ffe=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ht=(r,e)=>{for(var t in e)GS(r,t,{get:e[t],enumerable:!0})},hfe=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ufe(e))!ffe.call(r,n)&&n!==t&&GS(r,n,{get:()=>e[n],enumerable:!(i=cfe(e,n))||i.enumerable});return r};var ne=(r,e,t)=>(t=r!=null?lfe(gfe(r)):{},hfe(e||!r||!r.__esModule?GS(t,"default",{value:r,enumerable:!0}):t,r));var iU=y((iZe,rU)=>{rU.exports=tU;tU.sync=Lfe;var $1=J("fs");function Nfe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{aU.exports=sU;sU.sync=Tfe;var nU=J("fs");function sU(r,e,t){nU.stat(r,function(i,n){t(i,i?!1:oU(n,e))})}function Tfe(r,e){return oU(nU.statSync(r),e)}function oU(r,e){return r.isFile()&&Ofe(r,e)}function Ofe(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var cU=y((oZe,lU)=>{var sZe=J("fs"),LI;process.platform==="win32"||global.TESTING_WINDOWS?LI=iU():LI=AU();lU.exports=sv;sv.sync=Mfe;function sv(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){sv(r,e||{},function(s,o){s?n(s):i(o)})})}LI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function Mfe(r,e){try{return LI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var CU=y((aZe,dU)=>{var Xg=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",uU=J("path"),Kfe=Xg?";":":",gU=cU(),fU=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),hU=(r,e)=>{let t=e.colon||Kfe,i=r.match(/\//)||Xg&&r.match(/\\/)?[""]:[...Xg?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=Xg?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Xg?n.split(t):[""];return Xg&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},pU=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=hU(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(fU(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=uU.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];gU(c+p,{pathExt:s},(C,w)=>{if(!C&&w)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Ufe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=hU(r,e),s=[];for(let o=0;o{"use strict";var mU=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};ov.exports=mU;ov.exports.default=mU});var BU=y((lZe,wU)=>{"use strict";var IU=J("path"),Hfe=CU(),Gfe=EU();function yU(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=Hfe.sync(r.command,{path:t[Gfe({env:t})],pathExt:e?IU.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=IU.resolve(n?r.options.cwd:"",o)),o}function Yfe(r){return yU(r)||yU(r,!0)}wU.exports=Yfe});var QU=y((cZe,Av)=>{"use strict";var av=/([()\][%!^"`<>&|;, *?])/g;function jfe(r){return r=r.replace(av,"^$1"),r}function qfe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(av,"^$1"),e&&(r=r.replace(av,"^$1")),r}Av.exports.command=jfe;Av.exports.argument=qfe});var SU=y((uZe,bU)=>{"use strict";bU.exports=/^#!(.*)/});var xU=y((gZe,vU)=>{"use strict";var Jfe=SU();vU.exports=(r="")=>{let e=r.match(Jfe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var DU=y((fZe,PU)=>{"use strict";var lv=J("fs"),Wfe=xU();function zfe(r){let t=Buffer.alloc(150),i;try{i=lv.openSync(r,"r"),lv.readSync(i,t,0,150,0),lv.closeSync(i)}catch{}return Wfe(t.toString())}PU.exports=zfe});var NU=y((hZe,FU)=>{"use strict";var Vfe=J("path"),kU=BU(),RU=QU(),Xfe=DU(),_fe=process.platform==="win32",Zfe=/\.(?:com|exe)$/i,$fe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ehe(r){r.file=kU(r);let e=r.file&&Xfe(r.file);return e?(r.args.unshift(r.file),r.command=e,kU(r)):r.file}function the(r){if(!_fe)return r;let e=ehe(r),t=!Zfe.test(e);if(r.options.forceShell||t){let i=$fe.test(e);r.command=Vfe.normalize(r.command),r.command=RU.command(r.command),r.args=r.args.map(s=>RU.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function rhe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:the(i)}FU.exports=rhe});var OU=y((pZe,TU)=>{"use strict";var cv=process.platform==="win32";function uv(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function ihe(r,e){if(!cv)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=LU(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function LU(r,e){return cv&&r===1&&!e.file?uv(e.original,"spawn"):null}function nhe(r,e){return cv&&r===1&&!e.file?uv(e.original,"spawnSync"):null}TU.exports={hookChildProcess:ihe,verifyENOENT:LU,verifyENOENTSync:nhe,notFoundError:uv}});var hv=y((dZe,_g)=>{"use strict";var MU=J("child_process"),gv=NU(),fv=OU();function KU(r,e,t){let i=gv(r,e,t),n=MU.spawn(i.command,i.args,i.options);return fv.hookChildProcess(n,i),n}function she(r,e,t){let i=gv(r,e,t),n=MU.spawnSync(i.command,i.args,i.options);return n.error=n.error||fv.verifyENOENTSync(n.status,i),n}_g.exports=KU;_g.exports.spawn=KU;_g.exports.sync=she;_g.exports._parse=gv;_g.exports._enoent=fv});var HU=y((CZe,UU)=>{"use strict";function ohe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function cc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,cc)}ohe(cc,Error);cc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",re=de(">>",!1),me=">&",tt=de(">&",!1),Rt=">",It=de(">",!1),Kr="<<<",oi=de("<<<",!1),pi="<&",pr=de("<&",!1),di="<",ai=de("<",!1),Os=function(m){return{type:"argument",segments:[].concat(...m)}},dr=function(m){return m},Bi="$'",_n=de("$'",!1),ha="'",mA=de("'",!1),Dg=function(m){return[{type:"text",text:m}]},Zn='""',EA=de('""',!1),pa=function(){return{type:"text",text:""}},jp='"',IA=de('"',!1),yA=function(m){return m},Br=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},zl=function(m){return{type:"shell",shell:m,quoted:!0}},kg=function(m){return{type:"variable",...m,quoted:!0}},Eo=function(m){return{type:"text",text:m}},Rg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},qp=function(m){return{type:"shell",shell:m,quoted:!1}},Jp=function(m){return{type:"variable",...m,quoted:!1}},xr=function(m){return{type:"glob",pattern:m}},oe=/^[^']/,Io=Ye(["'"],!0,!1),kn=function(m){return m.join("")},Fg=/^[^$"]/,Qt=Ye(["$",'"'],!0,!1),Vl=`\\ +`,Rn=de(`\\ +`,!1),$n=function(){return""},es="\\",ut=de("\\",!1),yo=/^[\\$"`]/,at=Ye(["\\","$",'"',"`"],!1,!1),ln=function(m){return m},S="\\a",Tt=de("\\a",!1),Ng=function(){return"a"},Xl="\\b",Wp=de("\\b",!1),zp=function(){return"\b"},Vp=/^[Ee]/,Xp=Ye(["E","e"],!1,!1),_p=function(){return"\x1B"},G="\\f",yt=de("\\f",!1),wA=function(){return"\f"},Wi="\\n",_l=de("\\n",!1),We=function(){return` +`},da="\\r",Lg=de("\\r",!1),lI=function(){return"\r"},Zp="\\t",cI=de("\\t",!1),ar=function(){return" "},Fn="\\v",Zl=de("\\v",!1),$p=function(){return"\v"},Ms=/^[\\'"?]/,Ca=Ye(["\\","'",'"',"?"],!1,!1),cn=function(m){return String.fromCharCode(parseInt(m,16))},De="\\x",Tg=de("\\x",!1),$l="\\u",Ks=de("\\u",!1),ec="\\U",BA=de("\\U",!1),Og=function(m){return String.fromCodePoint(parseInt(m,16))},Mg=/^[0-7]/,ma=Ye([["0","7"]],!1,!1),Ea=/^[0-9a-fA-f]/,$e=Ye([["0","9"],["a","f"],["A","f"]],!1,!1),wo=rt(),QA="-",tc=de("-",!1),Us="+",rc=de("+",!1),uI=".",ed=de(".",!1),Kg=function(m,b,F){return{type:"number",value:(m==="-"?-1:1)*parseFloat(b.join("")+"."+F.join(""))}},td=function(m,b){return{type:"number",value:(m==="-"?-1:1)*parseInt(b.join(""))}},gI=function(m){return{type:"variable",...m}},ic=function(m){return{type:"variable",name:m}},fI=function(m){return m},Ug="*",bA=de("*",!1),Fr="/",hI=de("/",!1),Hs=function(m,b,F){return{type:b==="*"?"multiplication":"division",right:F}},Gs=function(m,b){return b.reduce((F,U)=>({left:F,...U}),m)},Hg=function(m,b,F){return{type:b==="+"?"addition":"subtraction",right:F}},SA="$((",R=de("$((",!1),q="))",pe=de("))",!1),Ne=function(m){return m},xe="$(",qe=de("$(",!1),dt=function(m){return m},Ft="${",Nn=de("${",!1),bS=":-",s1=de(":-",!1),o1=function(m,b){return{name:m,defaultValue:b}},SS=":-}",a1=de(":-}",!1),A1=function(m){return{name:m,defaultValue:[]}},vS=":+",l1=de(":+",!1),c1=function(m,b){return{name:m,alternativeValue:b}},xS=":+}",u1=de(":+}",!1),g1=function(m){return{name:m,alternativeValue:[]}},PS=function(m){return{name:m}},f1="$",h1=de("$",!1),p1=function(m){return e.isGlobPattern(m)},d1=function(m){return m},DS=/^[a-zA-Z0-9_]/,kS=Ye([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),RS=function(){return O()},FS=/^[$@*?#a-zA-Z0-9_\-]/,NS=Ye(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),C1=/^[(){}<>$|&; \t"']/,Gg=Ye(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),LS=/^[<>&; \t"']/,TS=Ye(["<",">","&",";"," "," ",'"',"'"],!1,!1),pI=/^[ \t]/,dI=Ye([" "," "],!1,!1),Q=0,Re=0,vA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function O(){return r.substring(Re,Q)}function X(){return Et(Re,Q)}function te(m,b){throw b=b!==void 0?b:Et(Re,Q),Fi([At(m)],r.substring(Re,Q),b)}function ye(m,b){throw b=b!==void 0?b:Et(Re,Q),Ln(m,b)}function de(m,b){return{type:"literal",text:m,ignoreCase:b}}function Ye(m,b,F){return{type:"class",parts:m,inverted:b,ignoreCase:F}}function rt(){return{type:"any"}}function wt(){return{type:"end"}}function At(m){return{type:"other",description:m}}function et(m){var b=vA[m],F;if(b)return b;for(F=m-1;!vA[F];)F--;for(b=vA[F],b={line:b.line,column:b.column};Fd&&(d=Q,E=[]),E.push(m))}function Ln(m,b){return new cc(m,null,null,b)}function Fi(m,b,F){return new cc(cc.buildMessage(m,b),m,b,F)}function xA(){var m,b;return m=Q,b=Ur(),b===t&&(b=null),b!==t&&(Re=m,b=s(b)),m=b,m}function Ur(){var m,b,F,U,ce;if(m=Q,b=Hr(),b!==t){for(F=[],U=Me();U!==t;)F.push(U),U=Me();F!==t?(U=Ia(),U!==t?(ce=ts(),ce===t&&(ce=null),ce!==t?(Re=m,b=o(b,U,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;if(m===t)if(m=Q,b=Hr(),b!==t){for(F=[],U=Me();U!==t;)F.push(U),U=Me();F!==t?(U=Ia(),U===t&&(U=null),U!==t?(Re=m,b=a(b,U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;return m}function ts(){var m,b,F,U,ce;for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t)if(F=Ur(),F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=m,b=l(F),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;return m}function Ia(){var m;return r.charCodeAt(Q)===59?(m=c,Q++):(m=t,I===0&&Be(u)),m===t&&(r.charCodeAt(Q)===38?(m=g,Q++):(m=t,I===0&&Be(f))),m}function Hr(){var m,b,F;return m=Q,b=m1(),b!==t?(F=Jge(),F===t&&(F=null),F!==t?(Re=m,b=h(b,F),m=b):(Q=m,m=t)):(Q=m,m=t),m}function Jge(){var m,b,F,U,ce,be,ft;for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t)if(F=Wge(),F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Hr(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=m,b=p(F,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;return m}function Wge(){var m;return r.substr(Q,2)===C?(m=C,Q+=2):(m=t,I===0&&Be(w)),m===t&&(r.substr(Q,2)===B?(m=B,Q+=2):(m=t,I===0&&Be(v))),m}function m1(){var m,b,F;return m=Q,b=Xge(),b!==t?(F=zge(),F===t&&(F=null),F!==t?(Re=m,b=D(b,F),m=b):(Q=m,m=t)):(Q=m,m=t),m}function zge(){var m,b,F,U,ce,be,ft;for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t)if(F=Vge(),F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=m1(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=m,b=L(F,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;return m}function Vge(){var m;return r.substr(Q,2)===H?(m=H,Q+=2):(m=t,I===0&&Be(j)),m===t&&(r.charCodeAt(Q)===124?(m=$,Q++):(m=t,I===0&&Be(V))),m}function CI(){var m,b,F,U,ce,be;if(m=Q,b=D1(),b!==t)if(r.charCodeAt(Q)===61?(F=W,Q++):(F=t,I===0&&Be(Z)),F!==t)if(U=y1(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(Re=m,b=A(b,U),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;else Q=m,m=t;if(m===t)if(m=Q,b=D1(),b!==t)if(r.charCodeAt(Q)===61?(F=W,Q++):(F=t,I===0&&Be(Z)),F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=m,b=ae(b),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t;return m}function Xge(){var m,b,F,U,ce,be,ft,Bt,Vr,Ci,rs;for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t)if(r.charCodeAt(Q)===40?(F=ge,Q++):(F=t,I===0&&Be(_)),F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Ur(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();if(be!==t)if(r.charCodeAt(Q)===41?(ft=T,Q++):(ft=t,I===0&&Be(N)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=rd();Ci!==t;)Vr.push(Ci),Ci=rd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Re=m,b=ue(ce,Vr),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;if(m===t){for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t)if(r.charCodeAt(Q)===123?(F=we,Q++):(F=t,I===0&&Be(Le)),F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t)if(ce=Ur(),ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();if(be!==t)if(r.charCodeAt(Q)===125?(ft=Pe,Q++):(ft=t,I===0&&Be(Te)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=rd();Ci!==t;)Vr.push(Ci),Ci=rd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Re=m,b=se(ce,Vr),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;else Q=m,m=t;if(m===t){for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t){for(F=[],U=CI();U!==t;)F.push(U),U=CI();if(F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();if(U!==t){if(ce=[],be=I1(),be!==t)for(;be!==t;)ce.push(be),be=I1();else ce=t;if(ce!==t){for(be=[],ft=Me();ft!==t;)be.push(ft),ft=Me();be!==t?(Re=m,b=Ae(F,ce),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t}else Q=m,m=t;if(m===t){for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t){if(F=[],U=CI(),U!==t)for(;U!==t;)F.push(U),U=CI();else F=t;if(F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=m,b=Qe(F),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t}}}return m}function E1(){var m,b,F,U,ce;for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t){if(F=[],U=mI(),U!==t)for(;U!==t;)F.push(U),U=mI();else F=t;if(F!==t){for(U=[],ce=Me();ce!==t;)U.push(ce),ce=Me();U!==t?(Re=m,b=fe(F),m=b):(Q=m,m=t)}else Q=m,m=t}else Q=m,m=t;return m}function I1(){var m,b,F;for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();if(b!==t?(F=rd(),F!==t?(Re=m,b=le(F),m=b):(Q=m,m=t)):(Q=m,m=t),m===t){for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();b!==t?(F=mI(),F!==t?(Re=m,b=le(F),m=b):(Q=m,m=t)):(Q=m,m=t)}return m}function rd(){var m,b,F,U,ce;for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();return b!==t?(Ge.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(ie)),F===t&&(F=null),F!==t?(U=_ge(),U!==t?(ce=mI(),ce!==t?(Re=m,b=Y(F,U,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function _ge(){var m;return r.substr(Q,2)===he?(m=he,Q+=2):(m=t,I===0&&Be(re)),m===t&&(r.substr(Q,2)===me?(m=me,Q+=2):(m=t,I===0&&Be(tt)),m===t&&(r.charCodeAt(Q)===62?(m=Rt,Q++):(m=t,I===0&&Be(It)),m===t&&(r.substr(Q,3)===Kr?(m=Kr,Q+=3):(m=t,I===0&&Be(oi)),m===t&&(r.substr(Q,2)===pi?(m=pi,Q+=2):(m=t,I===0&&Be(pr)),m===t&&(r.charCodeAt(Q)===60?(m=di,Q++):(m=t,I===0&&Be(ai))))))),m}function mI(){var m,b,F;for(m=Q,b=[],F=Me();F!==t;)b.push(F),F=Me();return b!==t?(F=y1(),F!==t?(Re=m,b=le(F),m=b):(Q=m,m=t)):(Q=m,m=t),m}function y1(){var m,b,F;if(m=Q,b=[],F=w1(),F!==t)for(;F!==t;)b.push(F),F=w1();else b=t;return b!==t&&(Re=m,b=Os(b)),m=b,m}function w1(){var m,b;return m=Q,b=Zge(),b!==t&&(Re=m,b=dr(b)),m=b,m===t&&(m=Q,b=$ge(),b!==t&&(Re=m,b=dr(b)),m=b,m===t&&(m=Q,b=efe(),b!==t&&(Re=m,b=dr(b)),m=b,m===t&&(m=Q,b=tfe(),b!==t&&(Re=m,b=dr(b)),m=b))),m}function Zge(){var m,b,F,U;return m=Q,r.substr(Q,2)===Bi?(b=Bi,Q+=2):(b=t,I===0&&Be(_n)),b!==t?(F=nfe(),F!==t?(r.charCodeAt(Q)===39?(U=ha,Q++):(U=t,I===0&&Be(mA)),U!==t?(Re=m,b=Dg(F),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function $ge(){var m,b,F,U;return m=Q,r.charCodeAt(Q)===39?(b=ha,Q++):(b=t,I===0&&Be(mA)),b!==t?(F=rfe(),F!==t?(r.charCodeAt(Q)===39?(U=ha,Q++):(U=t,I===0&&Be(mA)),U!==t?(Re=m,b=Dg(F),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function efe(){var m,b,F,U;if(m=Q,r.substr(Q,2)===Zn?(b=Zn,Q+=2):(b=t,I===0&&Be(EA)),b!==t&&(Re=m,b=pa()),m=b,m===t)if(m=Q,r.charCodeAt(Q)===34?(b=jp,Q++):(b=t,I===0&&Be(IA)),b!==t){for(F=[],U=B1();U!==t;)F.push(U),U=B1();F!==t?(r.charCodeAt(Q)===34?(U=jp,Q++):(U=t,I===0&&Be(IA)),U!==t?(Re=m,b=yA(F),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;return m}function tfe(){var m,b,F;if(m=Q,b=[],F=Q1(),F!==t)for(;F!==t;)b.push(F),F=Q1();else b=t;return b!==t&&(Re=m,b=yA(b)),m=b,m}function B1(){var m,b;return m=Q,b=x1(),b!==t&&(Re=m,b=Br(b)),m=b,m===t&&(m=Q,b=P1(),b!==t&&(Re=m,b=zl(b)),m=b,m===t&&(m=Q,b=US(),b!==t&&(Re=m,b=kg(b)),m=b,m===t&&(m=Q,b=ife(),b!==t&&(Re=m,b=Eo(b)),m=b))),m}function Q1(){var m,b;return m=Q,b=x1(),b!==t&&(Re=m,b=Rg(b)),m=b,m===t&&(m=Q,b=P1(),b!==t&&(Re=m,b=qp(b)),m=b,m===t&&(m=Q,b=US(),b!==t&&(Re=m,b=Jp(b)),m=b,m===t&&(m=Q,b=afe(),b!==t&&(Re=m,b=xr(b)),m=b,m===t&&(m=Q,b=ofe(),b!==t&&(Re=m,b=Eo(b)),m=b)))),m}function rfe(){var m,b,F;for(m=Q,b=[],oe.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(Io));F!==t;)b.push(F),oe.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(Io));return b!==t&&(Re=m,b=kn(b)),m=b,m}function ife(){var m,b,F;if(m=Q,b=[],F=b1(),F===t&&(Fg.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(Qt))),F!==t)for(;F!==t;)b.push(F),F=b1(),F===t&&(Fg.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(Qt)));else b=t;return b!==t&&(Re=m,b=kn(b)),m=b,m}function b1(){var m,b,F;return m=Q,r.substr(Q,2)===Vl?(b=Vl,Q+=2):(b=t,I===0&&Be(Rn)),b!==t&&(Re=m,b=$n()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(yo.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(at)),F!==t?(Re=m,b=ln(F),m=b):(Q=m,m=t)):(Q=m,m=t)),m}function nfe(){var m,b,F;for(m=Q,b=[],F=S1(),F===t&&(oe.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(Io)));F!==t;)b.push(F),F=S1(),F===t&&(oe.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(Io)));return b!==t&&(Re=m,b=kn(b)),m=b,m}function S1(){var m,b,F;return m=Q,r.substr(Q,2)===S?(b=S,Q+=2):(b=t,I===0&&Be(Tt)),b!==t&&(Re=m,b=Ng()),m=b,m===t&&(m=Q,r.substr(Q,2)===Xl?(b=Xl,Q+=2):(b=t,I===0&&Be(Wp)),b!==t&&(Re=m,b=zp()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(Vp.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(Xp)),F!==t?(Re=m,b=_p(),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===G?(b=G,Q+=2):(b=t,I===0&&Be(yt)),b!==t&&(Re=m,b=wA()),m=b,m===t&&(m=Q,r.substr(Q,2)===Wi?(b=Wi,Q+=2):(b=t,I===0&&Be(_l)),b!==t&&(Re=m,b=We()),m=b,m===t&&(m=Q,r.substr(Q,2)===da?(b=da,Q+=2):(b=t,I===0&&Be(Lg)),b!==t&&(Re=m,b=lI()),m=b,m===t&&(m=Q,r.substr(Q,2)===Zp?(b=Zp,Q+=2):(b=t,I===0&&Be(cI)),b!==t&&(Re=m,b=ar()),m=b,m===t&&(m=Q,r.substr(Q,2)===Fn?(b=Fn,Q+=2):(b=t,I===0&&Be(Zl)),b!==t&&(Re=m,b=$p()),m=b,m===t&&(m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(Ms.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(Ca)),F!==t?(Re=m,b=ln(F),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=sfe()))))))))),m}function sfe(){var m,b,F,U,ce,be,ft,Bt,Vr,Ci,rs,HS;return m=Q,r.charCodeAt(Q)===92?(b=es,Q++):(b=t,I===0&&Be(ut)),b!==t?(F=OS(),F!==t?(Re=m,b=cn(F),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===De?(b=De,Q+=2):(b=t,I===0&&Be(Tg)),b!==t?(F=Q,U=Q,ce=OS(),ce!==t?(be=Tn(),be!==t?(ce=[ce,be],U=ce):(Q=U,U=t)):(Q=U,U=t),U===t&&(U=OS()),U!==t?F=r.substring(F,Q):F=U,F!==t?(Re=m,b=cn(F),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===$l?(b=$l,Q+=2):(b=t,I===0&&Be(Ks)),b!==t?(F=Q,U=Q,ce=Tn(),ce!==t?(be=Tn(),be!==t?(ft=Tn(),ft!==t?(Bt=Tn(),Bt!==t?(ce=[ce,be,ft,Bt],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?F=r.substring(F,Q):F=U,F!==t?(Re=m,b=cn(F),m=b):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===ec?(b=ec,Q+=2):(b=t,I===0&&Be(BA)),b!==t?(F=Q,U=Q,ce=Tn(),ce!==t?(be=Tn(),be!==t?(ft=Tn(),ft!==t?(Bt=Tn(),Bt!==t?(Vr=Tn(),Vr!==t?(Ci=Tn(),Ci!==t?(rs=Tn(),rs!==t?(HS=Tn(),HS!==t?(ce=[ce,be,ft,Bt,Vr,Ci,rs,HS],U=ce):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t)):(Q=U,U=t),U!==t?F=r.substring(F,Q):F=U,F!==t?(Re=m,b=Og(F),m=b):(Q=m,m=t)):(Q=m,m=t)))),m}function OS(){var m;return Mg.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Be(ma)),m}function Tn(){var m;return Ea.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Be($e)),m}function ofe(){var m,b,F,U,ce;if(m=Q,b=[],F=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Be(ut)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(wo)),ce!==t?(Re=F,U=ln(ce),F=U):(Q=F,F=t)):(Q=F,F=t),F===t&&(F=Q,U=Q,I++,ce=k1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(wo)),ce!==t?(Re=F,U=ln(ce),F=U):(Q=F,F=t)):(Q=F,F=t)),F!==t)for(;F!==t;)b.push(F),F=Q,r.charCodeAt(Q)===92?(U=es,Q++):(U=t,I===0&&Be(ut)),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(wo)),ce!==t?(Re=F,U=ln(ce),F=U):(Q=F,F=t)):(Q=F,F=t),F===t&&(F=Q,U=Q,I++,ce=k1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(wo)),ce!==t?(Re=F,U=ln(ce),F=U):(Q=F,F=t)):(Q=F,F=t));else b=t;return b!==t&&(Re=m,b=kn(b)),m=b,m}function MS(){var m,b,F,U,ce,be;if(m=Q,r.charCodeAt(Q)===45?(b=QA,Q++):(b=t,I===0&&Be(tc)),b===t&&(r.charCodeAt(Q)===43?(b=Us,Q++):(b=t,I===0&&Be(rc))),b===t&&(b=null),b!==t){if(F=[],Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie)),U!==t)for(;U!==t;)F.push(U),Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie));else F=t;if(F!==t)if(r.charCodeAt(Q)===46?(U=uI,Q++):(U=t,I===0&&Be(ed)),U!==t){if(ce=[],Ge.test(r.charAt(Q))?(be=r.charAt(Q),Q++):(be=t,I===0&&Be(ie)),be!==t)for(;be!==t;)ce.push(be),Ge.test(r.charAt(Q))?(be=r.charAt(Q),Q++):(be=t,I===0&&Be(ie));else ce=t;ce!==t?(Re=m,b=Kg(b,F,ce),m=b):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;if(m===t){if(m=Q,r.charCodeAt(Q)===45?(b=QA,Q++):(b=t,I===0&&Be(tc)),b===t&&(r.charCodeAt(Q)===43?(b=Us,Q++):(b=t,I===0&&Be(rc))),b===t&&(b=null),b!==t){if(F=[],Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie)),U!==t)for(;U!==t;)F.push(U),Ge.test(r.charAt(Q))?(U=r.charAt(Q),Q++):(U=t,I===0&&Be(ie));else F=t;F!==t?(Re=m,b=td(b,F),m=b):(Q=m,m=t)}else Q=m,m=t;if(m===t&&(m=Q,b=US(),b!==t&&(Re=m,b=gI(b)),m=b,m===t&&(m=Q,b=nc(),b!==t&&(Re=m,b=ic(b)),m=b,m===t)))if(m=Q,r.charCodeAt(Q)===40?(b=ge,Q++):(b=t,I===0&&Be(_)),b!==t){for(F=[],U=Me();U!==t;)F.push(U),U=Me();if(F!==t)if(U=v1(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(r.charCodeAt(Q)===41?(be=T,Q++):(be=t,I===0&&Be(N)),be!==t?(Re=m,b=fI(U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t}return m}function KS(){var m,b,F,U,ce,be,ft,Bt;if(m=Q,b=MS(),b!==t){for(F=[],U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===42?(be=Ug,Q++):(be=t,I===0&&Be(bA)),be===t&&(r.charCodeAt(Q)===47?(be=Fr,Q++):(be=t,I===0&&Be(hI))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=MS(),Bt!==t?(Re=U,ce=Hs(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(F.push(U),U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===42?(be=Ug,Q++):(be=t,I===0&&Be(bA)),be===t&&(r.charCodeAt(Q)===47?(be=Fr,Q++):(be=t,I===0&&Be(hI))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=MS(),Bt!==t?(Re=U,ce=Hs(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}F!==t?(Re=m,b=Gs(b,F),m=b):(Q=m,m=t)}else Q=m,m=t;return m}function v1(){var m,b,F,U,ce,be,ft,Bt;if(m=Q,b=KS(),b!==t){for(F=[],U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===43?(be=Us,Q++):(be=t,I===0&&Be(rc)),be===t&&(r.charCodeAt(Q)===45?(be=QA,Q++):(be=t,I===0&&Be(tc))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=KS(),Bt!==t?(Re=U,ce=Hg(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t;for(;U!==t;){for(F.push(U),U=Q,ce=[],be=Me();be!==t;)ce.push(be),be=Me();if(ce!==t)if(r.charCodeAt(Q)===43?(be=Us,Q++):(be=t,I===0&&Be(rc)),be===t&&(r.charCodeAt(Q)===45?(be=QA,Q++):(be=t,I===0&&Be(tc))),be!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=KS(),Bt!==t?(Re=U,ce=Hg(b,be,Bt),U=ce):(Q=U,U=t)):(Q=U,U=t)}else Q=U,U=t;else Q=U,U=t}F!==t?(Re=m,b=Gs(b,F),m=b):(Q=m,m=t)}else Q=m,m=t;return m}function x1(){var m,b,F,U,ce,be;if(m=Q,r.substr(Q,3)===SA?(b=SA,Q+=3):(b=t,I===0&&Be(R)),b!==t){for(F=[],U=Me();U!==t;)F.push(U),U=Me();if(F!==t)if(U=v1(),U!==t){for(ce=[],be=Me();be!==t;)ce.push(be),be=Me();ce!==t?(r.substr(Q,2)===q?(be=q,Q+=2):(be=t,I===0&&Be(pe)),be!==t?(Re=m,b=Ne(U),m=b):(Q=m,m=t)):(Q=m,m=t)}else Q=m,m=t;else Q=m,m=t}else Q=m,m=t;return m}function P1(){var m,b,F,U;return m=Q,r.substr(Q,2)===xe?(b=xe,Q+=2):(b=t,I===0&&Be(qe)),b!==t?(F=Ur(),F!==t?(r.charCodeAt(Q)===41?(U=T,Q++):(U=t,I===0&&Be(N)),U!==t?(Re=m,b=dt(F),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m}function US(){var m,b,F,U,ce,be;return m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Nn)),b!==t?(F=nc(),F!==t?(r.substr(Q,2)===bS?(U=bS,Q+=2):(U=t,I===0&&Be(s1)),U!==t?(ce=E1(),ce!==t?(r.charCodeAt(Q)===125?(be=Pe,Q++):(be=t,I===0&&Be(Te)),be!==t?(Re=m,b=o1(F,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Nn)),b!==t?(F=nc(),F!==t?(r.substr(Q,3)===SS?(U=SS,Q+=3):(U=t,I===0&&Be(a1)),U!==t?(Re=m,b=A1(F),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Nn)),b!==t?(F=nc(),F!==t?(r.substr(Q,2)===vS?(U=vS,Q+=2):(U=t,I===0&&Be(l1)),U!==t?(ce=E1(),ce!==t?(r.charCodeAt(Q)===125?(be=Pe,Q++):(be=t,I===0&&Be(Te)),be!==t?(Re=m,b=c1(F,ce),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Nn)),b!==t?(F=nc(),F!==t?(r.substr(Q,3)===xS?(U=xS,Q+=3):(U=t,I===0&&Be(u1)),U!==t?(Re=m,b=g1(F),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.substr(Q,2)===Ft?(b=Ft,Q+=2):(b=t,I===0&&Be(Nn)),b!==t?(F=nc(),F!==t?(r.charCodeAt(Q)===125?(U=Pe,Q++):(U=t,I===0&&Be(Te)),U!==t?(Re=m,b=PS(F),m=b):(Q=m,m=t)):(Q=m,m=t)):(Q=m,m=t),m===t&&(m=Q,r.charCodeAt(Q)===36?(b=f1,Q++):(b=t,I===0&&Be(h1)),b!==t?(F=nc(),F!==t?(Re=m,b=PS(F),m=b):(Q=m,m=t)):(Q=m,m=t)))))),m}function afe(){var m,b,F;return m=Q,b=Afe(),b!==t?(Re=Q,F=p1(b),F?F=void 0:F=t,F!==t?(Re=m,b=d1(b),m=b):(Q=m,m=t)):(Q=m,m=t),m}function Afe(){var m,b,F,U,ce;if(m=Q,b=[],F=Q,U=Q,I++,ce=R1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(wo)),ce!==t?(Re=F,U=ln(ce),F=U):(Q=F,F=t)):(Q=F,F=t),F!==t)for(;F!==t;)b.push(F),F=Q,U=Q,I++,ce=R1(),I--,ce===t?U=void 0:(Q=U,U=t),U!==t?(r.length>Q?(ce=r.charAt(Q),Q++):(ce=t,I===0&&Be(wo)),ce!==t?(Re=F,U=ln(ce),F=U):(Q=F,F=t)):(Q=F,F=t);else b=t;return b!==t&&(Re=m,b=kn(b)),m=b,m}function D1(){var m,b,F;if(m=Q,b=[],DS.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(kS)),F!==t)for(;F!==t;)b.push(F),DS.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(kS));else b=t;return b!==t&&(Re=m,b=RS()),m=b,m}function nc(){var m,b,F;if(m=Q,b=[],FS.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(NS)),F!==t)for(;F!==t;)b.push(F),FS.test(r.charAt(Q))?(F=r.charAt(Q),Q++):(F=t,I===0&&Be(NS));else b=t;return b!==t&&(Re=m,b=RS()),m=b,m}function k1(){var m;return C1.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Be(Gg)),m}function R1(){var m;return LS.test(r.charAt(Q))?(m=r.charAt(Q),Q++):(m=t,I===0&&Be(TS)),m}function Me(){var m,b;if(m=[],pI.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Be(dI)),b!==t)for(;b!==t;)m.push(b),pI.test(r.charAt(Q))?(b=r.charAt(Q),Q++):(b=t,I===0&&Be(dI));else m=t;return m}if(k=n(),k!==t&&Q===r.length)return k;throw k!==t&&Q{"use strict";function Ahe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function gc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,gc)}Ahe(gc,Error);gc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ie))}function Te(ie,Y){return new gc(ie,null,null,Y)}function se(ie,Y,he){return new gc(gc.buildMessage(ie,Y),ie,Y,he)}function Ae(){var ie,Y,he,re;return ie=v,Y=Qe(),Y!==t?(r.charCodeAt(v)===47?(he=s,v++):(he=t,$===0&&Pe(o)),he!==t?(re=Qe(),re!==t?(D=ie,Y=a(Y,re),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=Qe(),Y!==t&&(D=ie,Y=l(Y)),ie=Y),ie}function Qe(){var ie,Y,he,re;return ie=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(he=c,v++):(he=t,$===0&&Pe(u)),he!==t?(re=Ge(),re!==t?(D=ie,Y=g(Y,re),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=fe(),Y!==t&&(D=ie,Y=f(Y)),ie=Y),ie}function fe(){var ie,Y,he,re,me;return ie=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Pe(u)),Y!==t?(he=le(),he!==t?(r.charCodeAt(v)===47?(re=s,v++):(re=t,$===0&&Pe(o)),re!==t?(me=le(),me!==t?(D=ie,Y=h(),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=le(),Y!==t&&(D=ie,Y=h()),ie=Y),ie}function le(){var ie,Y,he;if(ie=v,Y=[],p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(C)),he!==t)for(;he!==t;)Y.push(he),p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(C));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}function Ge(){var ie,Y,he;if(ie=v,Y=[],w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B)),he!==t)for(;he!==t;)Y.push(he),w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function JU(r){return typeof r>"u"||r===null}function che(r){return typeof r=="object"&&r!==null}function uhe(r){return Array.isArray(r)?r:JU(r)?[]:[r]}function ghe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function dd(r,e){Error.call(this),this.name="YAMLException",this.reason=r,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||""}dd.prototype=Object.create(Error.prototype);dd.prototype.constructor=dd;dd.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};WU.exports=dd});var XU=y((LZe,VU)=>{"use strict";var zU=hc();function Iv(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}Iv.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r +\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),zU.repeat(" ",e)+i+a+s+` +`+zU.repeat(" ",e+this.position-n+i.length)+"^"};Iv.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: +`+t)),i};VU.exports=Iv});var Ai=y((TZe,ZU)=>{"use strict";var _U=ef(),phe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],dhe=["scalar","sequence","mapping"];function Che(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function mhe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(phe.indexOf(t)===-1)throw new _U('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=Che(e.styleAliases||null),dhe.indexOf(this.kind)===-1)throw new _U('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}ZU.exports=mhe});var pc=y((OZe,e2)=>{"use strict";var $U=hc(),GI=ef(),Ehe=Ai();function yv(r,e,t){var i=[];return r.include.forEach(function(n){t=yv(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function Ihe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var yhe=Ai();t2.exports=new yhe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var n2=y((KZe,i2)=>{"use strict";var whe=Ai();i2.exports=new whe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var o2=y((UZe,s2)=>{"use strict";var Bhe=Ai();s2.exports=new Bhe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var YI=y((HZe,a2)=>{"use strict";var Qhe=pc();a2.exports=new Qhe({explicit:[r2(),n2(),o2()]})});var l2=y((GZe,A2)=>{"use strict";var bhe=Ai();function She(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function vhe(){return null}function xhe(r){return r===null}A2.exports=new bhe("tag:yaml.org,2002:null",{kind:"scalar",resolve:She,construct:vhe,predicate:xhe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var u2=y((YZe,c2)=>{"use strict";var Phe=Ai();function Dhe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function khe(r){return r==="true"||r==="True"||r==="TRUE"}function Rhe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}c2.exports=new Phe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Dhe,construct:khe,predicate:Rhe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var f2=y((jZe,g2)=>{"use strict";var Fhe=hc(),Nhe=Ai();function Lhe(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function The(r){return 48<=r&&r<=55}function Ohe(r){return 48<=r&&r<=57}function Mhe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var d2=y((qZe,p2)=>{"use strict";var h2=hc(),Hhe=Ai(),Ghe=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 Yhe(r){return!(r===null||!Ghe.test(r)||r[r.length-1]==="_")}function jhe(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var qhe=/^[-+]?[0-9]+e/;function Jhe(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(h2.isNegativeZero(r))return"-0.0";return t=r.toString(10),qhe.test(t)?t.replace("e",".e"):t}function Whe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||h2.isNegativeZero(r))}p2.exports=new Hhe("tag:yaml.org,2002:float",{kind:"scalar",resolve:Yhe,construct:jhe,predicate:Whe,represent:Jhe,defaultStyle:"lowercase"})});var wv=y((JZe,C2)=>{"use strict";var zhe=pc();C2.exports=new zhe({include:[YI()],implicit:[l2(),u2(),f2(),d2()]})});var Bv=y((WZe,m2)=>{"use strict";var Vhe=pc();m2.exports=new Vhe({include:[wv()]})});var w2=y((zZe,y2)=>{"use strict";var Xhe=Ai(),E2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),I2=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 _he(r){return r===null?!1:E2.exec(r)!==null||I2.exec(r)!==null}function Zhe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=E2.exec(r),e===null&&(e=I2.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function $he(r){return r.toISOString()}y2.exports=new Xhe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_he,construct:Zhe,instanceOf:Date,represent:$he})});var Q2=y((VZe,B2)=>{"use strict";var epe=Ai();function tpe(r){return r==="<<"||r===null}B2.exports=new epe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:tpe})});var v2=y((XZe,S2)=>{"use strict";var dc;try{b2=J,dc=b2("buffer").Buffer}catch{}var b2,rpe=Ai(),Qv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function ipe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=Qv;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8===0}function npe(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=Qv,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),dc?dc.from?dc.from(a):new dc(a):a}function spe(r){var e="",t=0,i,n,s=r.length,o=Qv;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function ope(r){return dc&&dc.isBuffer(r)}S2.exports=new rpe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ipe,construct:npe,predicate:ope,represent:spe})});var P2=y((_Ze,x2)=>{"use strict";var ape=Ai(),Ape=Object.prototype.hasOwnProperty,lpe=Object.prototype.toString;function cpe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var gpe=Ai(),fpe=Object.prototype.toString;function hpe(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var dpe=Ai(),Cpe=Object.prototype.hasOwnProperty;function mpe(r){if(r===null)return!0;var e,t=r;for(e in t)if(Cpe.call(t,e)&&t[e]!==null)return!1;return!0}function Epe(r){return r!==null?r:{}}R2.exports=new dpe("tag:yaml.org,2002:set",{kind:"mapping",resolve:mpe,construct:Epe})});var rf=y((e$e,N2)=>{"use strict";var Ipe=pc();N2.exports=new Ipe({include:[Bv()],implicit:[w2(),Q2()],explicit:[v2(),P2(),k2(),F2()]})});var T2=y((t$e,L2)=>{"use strict";var ype=Ai();function wpe(){return!0}function Bpe(){}function Qpe(){return""}function bpe(r){return typeof r>"u"}L2.exports=new ype("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:wpe,construct:Bpe,predicate:bpe,represent:Qpe})});var M2=y((r$e,O2)=>{"use strict";var Spe=Ai();function vpe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function xpe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function Ppe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function Dpe(r){return Object.prototype.toString.call(r)==="[object RegExp]"}O2.exports=new Spe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:vpe,construct:xpe,predicate:Dpe,represent:Ppe})});var H2=y((i$e,U2)=>{"use strict";var jI;try{K2=J,jI=K2("esprima")}catch{typeof window<"u"&&(jI=window.esprima)}var K2,kpe=Ai();function Rpe(r){if(r===null)return!1;try{var e="("+r+")",t=jI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Fpe(r){var e="("+r+")",t=jI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function Npe(r){return r.toString()}function Lpe(r){return Object.prototype.toString.call(r)==="[object Function]"}U2.exports=new kpe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Rpe,construct:Fpe,predicate:Lpe,represent:Npe})});var Cd=y((n$e,Y2)=>{"use strict";var G2=pc();Y2.exports=G2.DEFAULT=new G2({include:[rf()],explicit:[T2(),M2(),H2()]})});var AH=y((s$e,md)=>{"use strict";var Qa=hc(),X2=ef(),Tpe=XU(),_2=rf(),Ope=Cd(),FA=Object.prototype.hasOwnProperty,qI=1,Z2=2,$2=3,JI=4,bv=1,Mpe=2,j2=3,Kpe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Upe=/[\x85\u2028\u2029]/,Hpe=/[,\[\]\{\}]/,eH=/^(?:!|!!|![a-z\-]+!)$/i,tH=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function q2(r){return Object.prototype.toString.call(r)}function So(r){return r===10||r===13}function mc(r){return r===9||r===32}function fn(r){return r===9||r===32||r===10||r===13}function nf(r){return r===44||r===91||r===93||r===123||r===125}function Gpe(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function Ype(r){return r===120?2:r===117?4:r===85?8:0}function jpe(r){return 48<=r&&r<=57?r-48:-1}function J2(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` +`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function qpe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var rH=new Array(256),iH=new Array(256);for(Cc=0;Cc<256;Cc++)rH[Cc]=J2(Cc)?1:0,iH[Cc]=J2(Cc);var Cc;function Jpe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||Ope,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=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function nH(r,e){return new X2(e,new Tpe(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function gt(r,e){throw nH(r,e)}function WI(r,e){r.onWarning&&r.onWarning.call(null,nH(r,e))}var W2={YAML:function(e,t,i){var n,s,o;e.version!==null&>(e,"duplication of %YAML directive"),i.length!==1&>(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&>(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&>(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&WI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&>(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],eH.test(n)||gt(e,"ill-formed tag handle (first argument) of the TAG directive"),FA.call(e.tagMap,n)&>(e,'there is a previously declared suffix for "'+n+'" tag handle'),tH.test(s)||gt(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function RA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=Qa.repeat(` +`,e-1))}function Wpe(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),fn(h)||nf(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),fn(n)||t&&nf(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),fn(n)||t&&nf(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),fn(i))break}else{if(r.position===r.lineStart&&zI(r)||t&&nf(h))break;if(So(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,_r(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(RA(r,s,o,!1),vv(r,r.line-l),s=o=r.position,a=!1),mc(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return RA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function zpe(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(RA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else So(t)?(RA(r,i,n,!0),vv(r,_r(r,!1,e)),i=n=r.position):r.position===r.lineStart&&zI(r)?gt(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);gt(r,"unexpected end of the stream within a single quoted scalar")}function Vpe(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return RA(r,t,r.position,!0),r.position++,!0;if(a===92){if(RA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),So(a))_r(r,!1,e);else if(a<256&&rH[a])r.result+=iH[a],r.position++;else if((o=Ype(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=Gpe(a))>=0?s=(s<<4)+o:gt(r,"expected hexadecimal character");r.result+=qpe(s),r.position++}else gt(r,"unknown escape sequence");t=i=r.position}else So(a)?(RA(r,t,i,!0),vv(r,_r(r,!1,e)),t=i=r.position):r.position===r.lineStart&&zI(r)?gt(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}gt(r,"unexpected end of the stream within a double quoted scalar")}function Xpe(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,C,w;if(w=r.input.charCodeAt(r.position),w===91)l=93,g=!1,s=[];else if(w===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),w=r.input.charCodeAt(++r.position);w!==0;){if(_r(r,!0,e),w=r.input.charCodeAt(r.position),w===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||gt(r,"missed comma between flow collection entries"),p=h=C=null,c=u=!1,w===63&&(a=r.input.charCodeAt(r.position+1),fn(a)&&(c=u=!0,r.position++,_r(r,!0,e))),i=r.line,of(r,e,qI,!1,!0),p=r.tag,h=r.result,_r(r,!0,e),w=r.input.charCodeAt(r.position),(u||r.line===i)&&w===58&&(c=!0,w=r.input.charCodeAt(++r.position),_r(r,!0,e),of(r,e,qI,!1,!0),C=r.result),g?sf(r,s,f,p,h,C):c?s.push(sf(r,null,f,p,h,C)):s.push(h),_r(r,!0,e),w=r.input.charCodeAt(r.position),w===44?(t=!0,w=r.input.charCodeAt(++r.position)):t=!1}gt(r,"unexpected end of the stream within a flow collection")}function _pe(r,e){var t,i,n=bv,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)bv===n?n=g===43?j2:Mpe:gt(r,"repeat of a chomping mode identifier");else if((u=jpe(g))>=0)u===0?gt(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?gt(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(mc(g)){do g=r.input.charCodeAt(++r.position);while(mc(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!So(g)&&g!==0)}for(;g!==0;){for(Sv(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),So(g)){l++;continue}if(r.lineIndente)&&l!==0)gt(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(of(r,e,JI,!0,n)&&(p?f=r.result:h=r.result),p||(sf(r,c,u,g,f,h,s,o),g=f=h=null),_r(r,!0,-1),w=r.input.charCodeAt(r.position)),r.lineIndent>e&&w!==0)gt(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):gt(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):gt(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function rde(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(_r(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&>(r,"directive name must not be less than one character in length");o!==0;){for(;mc(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!So(o));break}if(So(o))break;for(t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&Sv(r),FA.call(W2,i)?W2[i](r,i,n):WI(r,'unknown document directive "'+i+'"')}if(_r(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,_r(r,!0,-1)):s&>(r,"directives end mark is expected"),of(r,r.lineIndent-1,JI,!1,!0),_r(r,!0,-1),r.checkLineBreaks&&Upe.test(r.input.slice(e,r.position))&&WI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&zI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,_r(r,!0,-1));return}if(r.position"u"&&(t=e,e=null);var i=sH(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n"u"&&(t=e,e=null),oH(r,e,Qa.extend({schema:_2},t))}function nde(r,e){return aH(r,Qa.extend({schema:_2},e))}md.exports.loadAll=oH;md.exports.load=aH;md.exports.safeLoadAll=ide;md.exports.safeLoad=nde});var kH=y((o$e,kv)=>{"use strict";var Id=hc(),yd=ef(),sde=Cd(),ode=rf(),dH=Object.prototype.toString,CH=Object.prototype.hasOwnProperty,ade=9,Ed=10,Ade=13,lde=32,cde=33,ude=34,mH=35,gde=37,fde=38,hde=39,pde=42,EH=44,dde=45,IH=58,Cde=61,mde=62,Ede=63,Ide=64,yH=91,wH=93,yde=96,BH=123,wde=124,QH=125,Li={};Li[0]="\\0";Li[7]="\\a";Li[8]="\\b";Li[9]="\\t";Li[10]="\\n";Li[11]="\\v";Li[12]="\\f";Li[13]="\\r";Li[27]="\\e";Li[34]='\\"';Li[92]="\\\\";Li[133]="\\N";Li[160]="\\_";Li[8232]="\\L";Li[8233]="\\P";var Bde=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Qde(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&uH(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!af(o))return VI;a=s>0?r.charCodeAt(s-1):null,f=f&&uH(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?SH:vH:t>9&&bH(r)?VI:c?PH:xH}function Dde(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&Bde.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return Sde(r,l)}switch(Pde(e,o,r.indent,s,a)){case SH:return e;case vH:return"'"+e.replace(/'/g,"''")+"'";case xH:return"|"+gH(e,r.indent)+fH(cH(e,n));case PH:return">"+gH(e,r.indent)+fH(cH(kde(e,s),n));case VI:return'"'+Rde(e,s)+'"';default:throw new yd("impossible error: invalid scalar style")}}()}function gH(r,e){var t=bH(r)?String(e):"",i=r[r.length-1]===` +`,n=i&&(r[r.length-2]===` +`||r===` +`),s=n?"+":i?"":"-";return t+s+` +`}function fH(r){return r[r.length-1]===` +`?r.slice(0,-1):r}function kde(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` +`);return c=c!==-1?c:r.length,t.lastIndex=c,hH(r.slice(0,c),e)}(),n=r[0]===` +`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` +`:"")+hH(l,e),n=s}return i}function hH(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` +`+r.slice(n,s),n=s+1),o=a;return l+=` +`,r.length-n>e&&o>n?l+=r.slice(n,o)+` +`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function Rde(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=lH((t-55296)*1024+i-56320+65536),s++;continue}n=Li[t],e+=!n&&af(t)?r[s]:n||lH(t)}return e}function Fde(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Ec(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function Tde(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new yd("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&Ed===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=xv(r,e)),Ec(r,e+1,u,!0,g)&&(r.dump&&Ed===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function pH(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function Ec(r,e,t,i,n,s){r.tag=null,r.dump=t,pH(r,t,!1)||pH(r,t,!0);var o=dH.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(Tde(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Lde(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(Nde(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Fde(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&Dde(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new yd("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function Ode(r,e){var t=[],i=[],n,s;for(Pv(r,t,i),n=0,s=i.length;n{"use strict";var XI=AH(),RH=kH();function _I(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Lr.exports.Type=Ai();Lr.exports.Schema=pc();Lr.exports.FAILSAFE_SCHEMA=YI();Lr.exports.JSON_SCHEMA=wv();Lr.exports.CORE_SCHEMA=Bv();Lr.exports.DEFAULT_SAFE_SCHEMA=rf();Lr.exports.DEFAULT_FULL_SCHEMA=Cd();Lr.exports.load=XI.load;Lr.exports.loadAll=XI.loadAll;Lr.exports.safeLoad=XI.safeLoad;Lr.exports.safeLoadAll=XI.safeLoadAll;Lr.exports.dump=RH.dump;Lr.exports.safeDump=RH.safeDump;Lr.exports.YAMLException=ef();Lr.exports.MINIMAL_SCHEMA=YI();Lr.exports.SAFE_SCHEMA=rf();Lr.exports.DEFAULT_SCHEMA=Cd();Lr.exports.scan=_I("scan");Lr.exports.parse=_I("parse");Lr.exports.compose=_I("compose");Lr.exports.addConstructor=_I("addConstructor")});var LH=y((A$e,NH)=>{"use strict";var Kde=FH();NH.exports=Kde});var OH=y((l$e,TH)=>{"use strict";function Ude(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function Ic(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ic)}Ude(Ic,Error);Ic.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[Ne]:pe})))},H=function(R){return R},j=function(R){return R},$=Ms("correct indentation"),V=" ",W=ar(" ",!1),Z=function(R){return R.length===SA*Hg},A=function(R){return R.length===(SA+1)*Hg},ae=function(){return SA++,!0},ge=function(){return SA--,!0},_=function(){return Lg()},T=Ms("pseudostring"),N=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,ue=Fn(["\r",` +`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),we=/^[^\r\n\t ,\][{}:#"']/,Le=Fn(["\r",` +`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Pe=function(){return Lg().replace(/^ *| *$/g,"")},Te="--",se=ar("--",!1),Ae=/^[a-zA-Z\/0-9]/,Qe=Fn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),fe=/^[^\r\n\t :,]/,le=Fn(["\r",` +`," "," ",":",","],!0,!1),Ge="null",ie=ar("null",!1),Y=function(){return null},he="true",re=ar("true",!1),me=function(){return!0},tt="false",Rt=ar("false",!1),It=function(){return!1},Kr=Ms("string"),oi='"',pi=ar('"',!1),pr=function(){return""},di=function(R){return R},ai=function(R){return R.join("")},Os=/^[^"\\\0-\x1F\x7F]/,dr=Fn(['"',"\\",["\0",""],"\x7F"],!0,!1),Bi='\\"',_n=ar('\\"',!1),ha=function(){return'"'},mA="\\\\",Dg=ar("\\\\",!1),Zn=function(){return"\\"},EA="\\/",pa=ar("\\/",!1),jp=function(){return"/"},IA="\\b",yA=ar("\\b",!1),Br=function(){return"\b"},zl="\\f",kg=ar("\\f",!1),Eo=function(){return"\f"},Rg="\\n",qp=ar("\\n",!1),Jp=function(){return` +`},xr="\\r",oe=ar("\\r",!1),Io=function(){return"\r"},kn="\\t",Fg=ar("\\t",!1),Qt=function(){return" "},Vl="\\u",Rn=ar("\\u",!1),$n=function(R,q,pe,Ne){return String.fromCharCode(parseInt(`0x${R}${q}${pe}${Ne}`))},es=/^[0-9a-fA-F]/,ut=Fn([["0","9"],["a","f"],["A","F"]],!1,!1),yo=Ms("blank space"),at=/^[ \t]/,ln=Fn([" "," "],!1,!1),S=Ms("white space"),Tt=/^[ \t\n\r]/,Ng=Fn([" "," ",` +`,"\r"],!1,!1),Xl=`\r +`,Wp=ar(`\r +`,!1),zp=` +`,Vp=ar(` +`,!1),Xp="\r",_p=ar("\r",!1),G=0,yt=0,wA=[{line:1,column:1}],Wi=0,_l=[],We=0,da;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function Lg(){return r.substring(yt,G)}function lI(){return cn(yt,G)}function Zp(R,q){throw q=q!==void 0?q:cn(yt,G),$l([Ms(R)],r.substring(yt,G),q)}function cI(R,q){throw q=q!==void 0?q:cn(yt,G),Tg(R,q)}function ar(R,q){return{type:"literal",text:R,ignoreCase:q}}function Fn(R,q,pe){return{type:"class",parts:R,inverted:q,ignoreCase:pe}}function Zl(){return{type:"any"}}function $p(){return{type:"end"}}function Ms(R){return{type:"other",description:R}}function Ca(R){var q=wA[R],pe;if(q)return q;for(pe=R-1;!wA[pe];)pe--;for(q=wA[pe],q={line:q.line,column:q.column};peWi&&(Wi=G,_l=[]),_l.push(R))}function Tg(R,q){return new Ic(R,null,null,q)}function $l(R,q,pe){return new Ic(Ic.buildMessage(R,q),R,q,pe)}function Ks(){var R;return R=Og(),R}function ec(){var R,q,pe;for(R=G,q=[],pe=BA();pe!==t;)q.push(pe),pe=BA();return q!==t&&(yt=R,q=s(q)),R=q,R}function BA(){var R,q,pe,Ne,xe;return R=G,q=Ea(),q!==t?(r.charCodeAt(G)===45?(pe=o,G++):(pe=t,We===0&&De(a)),pe!==t?(Ne=Fr(),Ne!==t?(xe=ma(),xe!==t?(yt=R,q=l(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R}function Og(){var R,q,pe;for(R=G,q=[],pe=Mg();pe!==t;)q.push(pe),pe=Mg();return q!==t&&(yt=R,q=c(q)),R=q,R}function Mg(){var R,q,pe,Ne,xe,qe,dt,Ft,Nn;if(R=G,q=Fr(),q===t&&(q=null),q!==t){if(pe=G,r.charCodeAt(G)===35?(Ne=u,G++):(Ne=t,We===0&&De(g)),Ne!==t){if(xe=[],qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&De(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t),qe!==t)for(;qe!==t;)xe.push(qe),qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&De(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t);else xe=t;xe!==t?(Ne=[Ne,xe],pe=Ne):(G=pe,pe=t)}else G=pe,pe=t;if(pe===t&&(pe=null),pe!==t){if(Ne=[],xe=Hs(),xe!==t)for(;xe!==t;)Ne.push(xe),xe=Hs();else Ne=t;Ne!==t?(yt=R,q=h(),R=q):(G=R,R=t)}else G=R,R=t}else G=R,R=t;if(R===t&&(R=G,q=Ea(),q!==t?(pe=tc(),pe!==t?(Ne=Fr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&De(C)),xe!==t?(qe=Fr(),qe===t&&(qe=null),qe!==t?(dt=ma(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Ea(),q!==t?(pe=Us(),pe!==t?(Ne=Fr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&De(C)),xe!==t?(qe=Fr(),qe===t&&(qe=null),qe!==t?(dt=ma(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))){if(R=G,q=Ea(),q!==t)if(pe=Us(),pe!==t)if(Ne=Fr(),Ne!==t)if(xe=uI(),xe!==t){if(qe=[],dt=Hs(),dt!==t)for(;dt!==t;)qe.push(dt),dt=Hs();else qe=t;qe!==t?(yt=R,q=w(pe,xe),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;else G=R,R=t;else G=R,R=t;if(R===t)if(R=G,q=Ea(),q!==t)if(pe=Us(),pe!==t){if(Ne=[],xe=G,qe=Fr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&De(v)),dt!==t?(Ft=Fr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Us(),Nn!==t?(yt=xe,qe=D(pe,Nn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t),xe!==t)for(;xe!==t;)Ne.push(xe),xe=G,qe=Fr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&De(v)),dt!==t?(Ft=Fr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Us(),Nn!==t?(yt=xe,qe=D(pe,Nn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t);else Ne=t;Ne!==t?(xe=Fr(),xe===t&&(xe=null),xe!==t?(r.charCodeAt(G)===58?(qe=p,G++):(qe=t,We===0&&De(C)),qe!==t?(dt=Fr(),dt===t&&(dt=null),dt!==t?(Ft=ma(),Ft!==t?(yt=R,q=L(pe,Ne,Ft),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)}else G=R,R=t;else G=R,R=t}return R}function ma(){var R,q,pe,Ne,xe,qe,dt;if(R=G,q=G,We++,pe=G,Ne=Gs(),Ne!==t?(xe=$e(),xe!==t?(r.charCodeAt(G)===45?(qe=o,G++):(qe=t,We===0&&De(a)),qe!==t?(dt=Fr(),dt!==t?(Ne=[Ne,xe,qe,dt],pe=Ne):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t),We--,pe!==t?(G=q,q=void 0):q=t,q!==t?(pe=Hs(),pe!==t?(Ne=wo(),Ne!==t?(xe=ec(),xe!==t?(qe=QA(),qe!==t?(yt=R,q=H(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Gs(),q!==t?(pe=wo(),pe!==t?(Ne=Og(),Ne!==t?(xe=QA(),xe!==t?(yt=R,q=H(Ne),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))if(R=G,q=rc(),q!==t){if(pe=[],Ne=Hs(),Ne!==t)for(;Ne!==t;)pe.push(Ne),Ne=Hs();else pe=t;pe!==t?(yt=R,q=j(q),R=q):(G=R,R=t)}else G=R,R=t;return R}function Ea(){var R,q,pe;for(We++,R=G,q=[],r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&De(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&De(W));return q!==t?(yt=G,pe=Z(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),We--,R===t&&(q=t,We===0&&De($)),R}function $e(){var R,q,pe;for(R=G,q=[],r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&De(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&De(W));return q!==t?(yt=G,pe=A(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),R}function wo(){var R;return yt=G,R=ae(),R?R=void 0:R=t,R}function QA(){var R;return yt=G,R=ge(),R?R=void 0:R=t,R}function tc(){var R;return R=ic(),R===t&&(R=ed()),R}function Us(){var R,q,pe;if(R=ic(),R===t){if(R=G,q=[],pe=Kg(),pe!==t)for(;pe!==t;)q.push(pe),pe=Kg();else q=t;q!==t&&(yt=R,q=_()),R=q}return R}function rc(){var R;return R=td(),R===t&&(R=gI(),R===t&&(R=ic(),R===t&&(R=ed()))),R}function uI(){var R;return R=td(),R===t&&(R=ic(),R===t&&(R=Kg())),R}function ed(){var R,q,pe,Ne,xe,qe;if(We++,R=G,N.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(ue)),q!==t){for(pe=[],Ne=G,xe=Fr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&De(Le)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Fr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&De(Le)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;return We--,R===t&&(q=t,We===0&&De(T)),R}function Kg(){var R,q,pe,Ne,xe;if(R=G,r.substr(G,2)===Te?(q=Te,G+=2):(q=t,We===0&&De(se)),q===t&&(q=null),q!==t)if(Ae.test(r.charAt(G))?(pe=r.charAt(G),G++):(pe=t,We===0&&De(Qe)),pe!==t){for(Ne=[],fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&De(le));xe!==t;)Ne.push(xe),fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&De(le));Ne!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;return R}function td(){var R,q;return R=G,r.substr(G,4)===Ge?(q=Ge,G+=4):(q=t,We===0&&De(ie)),q!==t&&(yt=R,q=Y()),R=q,R}function gI(){var R,q;return R=G,r.substr(G,4)===he?(q=he,G+=4):(q=t,We===0&&De(re)),q!==t&&(yt=R,q=me()),R=q,R===t&&(R=G,r.substr(G,5)===tt?(q=tt,G+=5):(q=t,We===0&&De(Rt)),q!==t&&(yt=R,q=It()),R=q),R}function ic(){var R,q,pe,Ne;return We++,R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&De(pi)),q!==t?(r.charCodeAt(G)===34?(pe=oi,G++):(pe=t,We===0&&De(pi)),pe!==t?(yt=R,q=pr(),R=q):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&De(pi)),q!==t?(pe=fI(),pe!==t?(r.charCodeAt(G)===34?(Ne=oi,G++):(Ne=t,We===0&&De(pi)),Ne!==t?(yt=R,q=di(pe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)),We--,R===t&&(q=t,We===0&&De(Kr)),R}function fI(){var R,q,pe;if(R=G,q=[],pe=Ug(),pe!==t)for(;pe!==t;)q.push(pe),pe=Ug();else q=t;return q!==t&&(yt=R,q=ai(q)),R=q,R}function Ug(){var R,q,pe,Ne,xe,qe;return Os.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&De(dr)),R===t&&(R=G,r.substr(G,2)===Bi?(q=Bi,G+=2):(q=t,We===0&&De(_n)),q!==t&&(yt=R,q=ha()),R=q,R===t&&(R=G,r.substr(G,2)===mA?(q=mA,G+=2):(q=t,We===0&&De(Dg)),q!==t&&(yt=R,q=Zn()),R=q,R===t&&(R=G,r.substr(G,2)===EA?(q=EA,G+=2):(q=t,We===0&&De(pa)),q!==t&&(yt=R,q=jp()),R=q,R===t&&(R=G,r.substr(G,2)===IA?(q=IA,G+=2):(q=t,We===0&&De(yA)),q!==t&&(yt=R,q=Br()),R=q,R===t&&(R=G,r.substr(G,2)===zl?(q=zl,G+=2):(q=t,We===0&&De(kg)),q!==t&&(yt=R,q=Eo()),R=q,R===t&&(R=G,r.substr(G,2)===Rg?(q=Rg,G+=2):(q=t,We===0&&De(qp)),q!==t&&(yt=R,q=Jp()),R=q,R===t&&(R=G,r.substr(G,2)===xr?(q=xr,G+=2):(q=t,We===0&&De(oe)),q!==t&&(yt=R,q=Io()),R=q,R===t&&(R=G,r.substr(G,2)===kn?(q=kn,G+=2):(q=t,We===0&&De(Fg)),q!==t&&(yt=R,q=Qt()),R=q,R===t&&(R=G,r.substr(G,2)===Vl?(q=Vl,G+=2):(q=t,We===0&&De(Rn)),q!==t?(pe=bA(),pe!==t?(Ne=bA(),Ne!==t?(xe=bA(),xe!==t?(qe=bA(),qe!==t?(yt=R,q=$n(pe,Ne,xe,qe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)))))))))),R}function bA(){var R;return es.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&De(ut)),R}function Fr(){var R,q;if(We++,R=[],at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(ln)),q!==t)for(;q!==t;)R.push(q),at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(ln));else R=t;return We--,R===t&&(q=t,We===0&&De(yo)),R}function hI(){var R,q;if(We++,R=[],Tt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(Ng)),q!==t)for(;q!==t;)R.push(q),Tt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&De(Ng));else R=t;return We--,R===t&&(q=t,We===0&&De(S)),R}function Hs(){var R,q,pe,Ne,xe,qe;if(R=G,q=Gs(),q!==t){for(pe=[],Ne=G,xe=Fr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Fr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(q=[q,pe],R=q):(G=R,R=t)}else G=R,R=t;return R}function Gs(){var R;return r.substr(G,2)===Xl?(R=Xl,G+=2):(R=t,We===0&&De(Wp)),R===t&&(r.charCodeAt(G)===10?(R=zp,G++):(R=t,We===0&&De(Vp)),R===t&&(r.charCodeAt(G)===13?(R=Xp,G++):(R=t,We===0&&De(_p)))),R}let Hg=2,SA=0;if(da=n(),da!==t&&G===r.length)return da;throw da!==t&&G{"use strict";var Jde=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=Jde(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};Fv.exports=GH;Fv.exports.default=GH});var jH=y((p$e,Wde)=>{Wde.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:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{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:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{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:"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:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{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",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{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"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var yc=y(Mn=>{"use strict";var JH=jH(),vo=process.env;Object.defineProperty(Mn,"_vendors",{value:JH.map(function(r){return r.constant})});Mn.name=null;Mn.isPR=null;JH.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return qH(i)});if(Mn[r.constant]=t,t)switch(Mn.name=r.name,typeof r.pr){case"string":Mn.isPR=!!vo[r.pr];break;case"object":"env"in r.pr?Mn.isPR=r.pr.env in vo&&vo[r.pr.env]!==r.pr.ne:"any"in r.pr?Mn.isPR=r.pr.any.some(function(i){return!!vo[i]}):Mn.isPR=qH(r.pr);break;default:Mn.isPR=null}});Mn.isCI=!!(vo.CI||vo.CONTINUOUS_INTEGRATION||vo.BUILD_NUMBER||vo.RUN_ID||Mn.name);function qH(r){return typeof r=="string"?!!vo[r]:Object.keys(r).every(function(e){return vo[e]===r[e]})}});var ey=y(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});var zde=0,Vde=1,Xde=2,_de="",Zde="\0",$de=-1,eCe=/^(-h|--help)(?:=([0-9]+))?$/,tCe=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,rCe=/^-[a-zA-Z]{2,}$/,iCe=/^([^=]+)=([\s\S]*)$/,nCe=process.env.DEBUG_CLI==="1";Kn.BATCH_REGEX=rCe;Kn.BINDING_REGEX=iCe;Kn.DEBUG=nCe;Kn.END_OF_INPUT=Zde;Kn.HELP_COMMAND_INDEX=$de;Kn.HELP_REGEX=eCe;Kn.NODE_ERRORED=Xde;Kn.NODE_INITIAL=zde;Kn.NODE_SUCCESS=Vde;Kn.OPTION_REGEX=tCe;Kn.START_OF_INPUT=_de});var ty=y(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});var sCe=ey(),Nv=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},Lv=class extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,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(i=>i.reason!==null&&i.reason===t[0].reason)){let[{reason:i}]=this.candidates;this.message=`${i} + +${this.candidates.map(({usage:n})=>`$ ${n}`).join(` +`)}`}else if(this.candidates.length===1){let[{usage:i}]=this.candidates;this.message=`Command not found; did you mean: + +$ ${i} +${Ov(e)}`}else this.message=`Command not found; did you mean one of: + +${this.candidates.map(({usage:i},n)=>`${`${n}.`.padStart(4)} ${i}`).join(` +`)} + +${Ov(e)}`}},Tv=class extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: + +${this.usages.map((i,n)=>`${`${n}.`.padStart(4)} ${i}`).join(` +`)} + +${Ov(e)}`}},Ov=r=>`While running ${r.filter(e=>e!==sCe.END_OF_INPUT).map(e=>{let t=JSON.stringify(e);return e.match(/\s/)||e.length===0||t!==`"${e}"`?t:e}).join(" ")}`;Bd.AmbiguousSyntaxError=Tv;Bd.UnknownSyntaxError=Lv;Bd.UsageError=Nv});var Sa=y(NA=>{"use strict";Object.defineProperty(NA,"__esModule",{value:!0});var WH=ty(),zH=Symbol("clipanion/isOption");function oCe(r){return{...r,[zH]:!0}}function aCe(r,e){return typeof r>"u"?[r,e]:typeof r=="object"&&r!==null&&!Array.isArray(r)?[void 0,r]:[r,e]}function Mv(r,e=!1){let t=r.replace(/^\.: /,"");return e&&(t=t[0].toLowerCase()+t.slice(1)),t}function VH(r,e){return e.length===1?new WH.UsageError(`${r}: ${Mv(e[0],!0)}`):new WH.UsageError(`${r}: +${e.map(t=>` +- ${Mv(t)}`).join("")}`)}function ACe(r,e,t){if(typeof t>"u")return e;let i=[],n=[],s=a=>{let l=e;return e=a,s.bind(null,l)};if(!t(e,{errors:i,coercions:n,coercion:s}))throw VH(`Invalid value for ${r}`,i);for(let[,a]of n)a();return e}NA.applyValidator=ACe;NA.cleanValidationError=Mv;NA.formatError=VH;NA.isOptionSymbol=zH;NA.makeCommandOption=oCe;NA.rerouteArguments=aCe});var ns=y(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});var XH=/^[a-zA-Z_][a-zA-Z0-9_]*$/,_H=/^#[0-9a-f]{6}$/i,ZH=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,$H=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,eG=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,Kv=/^(?:[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)?)$/,tG=r=>()=>r;function bt({test:r}){return tG(r)()}function Zr(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function LA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:XH.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function wc(r,e){return t=>{let i=r[e];return r[e]=t,wc(r,e).bind(null,i)}}function rG(r,e){return t=>{r[e]=t}}function ry(r,e,t){return r===1?e:t}function pt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}var iG=()=>bt({test:(r,e)=>!0});function lCe(r){return bt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Zr(r)})`):!0})}var cCe=()=>bt({test:(r,e)=>typeof r!="string"?pt(e,`Expected a string (got ${Zr(r)})`):!0});function uCe(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return bt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Zr(i)})`)})}var gCe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),fCe=()=>bt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i=gCe.get(r);if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a boolean (got ${Zr(r)})`)}return!0}}),hCe=()=>bt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return pt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a number (got ${Zr(r)})`)}return!0}}),pCe=()=>bt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"&&Kv.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch{}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return pt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a date (got ${Zr(r)})`)}return!0}}),dCe=(r,{delimiter:e}={})=>bt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e<"u"&&typeof(i==null?void 0:i.coercions)<"u"){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return pt(i,`Expected an array (got ${Zr(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=nG(r.length);return bt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e<"u"&&typeof(n==null?void 0:n.coercions)<"u"){if(typeof(n==null?void 0:n.coercion)>"u")return pt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return pt(n,`Expected a tuple (got ${Zr(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;abt({test:(t,i)=>{if(typeof t!="object"||t===null)return pt(i,`Expected an object (got ${Zr(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return bt({test:(i,n)=>{if(typeof i!="object"||i===null)return pt(n,`Expected an object (got ${Zr(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=pt(Object.assign(Object.assign({},n),{p:LA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c<"u"?a=c(u,Object.assign(Object.assign({},n),{p:LA(n,l),coercion:wc(i,l)}))&&a:e===null?a=pt(Object.assign(Object.assign({},n),{p:LA(n,l)}),`Extraneous property (got ${Zr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:rG(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},ICe=r=>bt({test:(e,t)=>e instanceof r?!0:pt(t,`Expected an instance of ${r.name} (got ${Zr(e)})`)}),yCe=(r,{exclusive:e=!1}={})=>bt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)<"u"?[]:void 0;for(let c=0,u=r.length;c1?pt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),wCe=(r,e)=>bt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)<"u"?wc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)<"u"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l<"u")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)<"u"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),BCe=r=>bt({test:(e,t)=>typeof e>"u"?!0:r(e,t)}),QCe=r=>bt({test:(e,t)=>e===null?!0:r(e,t)}),bCe=r=>bt({test:(e,t)=>e.length>=r?!0:pt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),SCe=r=>bt({test:(e,t)=>e.length<=r?!0:pt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),nG=r=>bt({test:(e,t)=>e.length!==r?pt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),vCe=({map:r}={})=>bt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sbt({test:(r,e)=>r<=0?!0:pt(e,`Expected to be negative (got ${r})`)}),PCe=()=>bt({test:(r,e)=>r>=0?!0:pt(e,`Expected to be positive (got ${r})`)}),DCe=r=>bt({test:(e,t)=>e>=r?!0:pt(t,`Expected to be at least ${r} (got ${e})`)}),kCe=r=>bt({test:(e,t)=>e<=r?!0:pt(t,`Expected to be at most ${r} (got ${e})`)}),RCe=(r,e)=>bt({test:(t,i)=>t>=r&&t<=e?!0:pt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),FCe=(r,e)=>bt({test:(t,i)=>t>=r&&tbt({test:(e,t)=>e!==Math.round(e)?pt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:pt(t,`Expected to be a safe integer (got ${e})`)}),LCe=r=>bt({test:(e,t)=>r.test(e)?!0:pt(t,`Expected to match the pattern ${r.toString()} (got ${Zr(e)})`)}),TCe=()=>bt({test:(r,e)=>r!==r.toLowerCase()?pt(e,`Expected to be all-lowercase (got ${r})`):!0}),OCe=()=>bt({test:(r,e)=>r!==r.toUpperCase()?pt(e,`Expected to be all-uppercase (got ${r})`):!0}),MCe=()=>bt({test:(r,e)=>eG.test(r)?!0:pt(e,`Expected to be a valid UUID v4 (got ${Zr(r)})`)}),KCe=()=>bt({test:(r,e)=>Kv.test(r)?!1:pt(e,`Expected to be a valid ISO 8601 date string (got ${Zr(r)})`)}),UCe=({alpha:r=!1})=>bt({test:(e,t)=>(r?_H.test(e):ZH.test(e))?!0:pt(t,`Expected to be a valid hexadecimal color string (got ${Zr(e)})`)}),HCe=()=>bt({test:(r,e)=>$H.test(r)?!0:pt(e,`Expected to be a valid base 64 string (got ${Zr(r)})`)}),GCe=(r=iG())=>bt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch{return pt(t,`Expected to be a valid JSON string (got ${Zr(e)})`)}return r(i,t)}}),YCe=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?pt(i,`Missing required ${ry(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},jCe=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?pt(i,`Forbidden ${ry(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},qCe=r=>{let e=new Set(r);return bt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?pt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(st.KeyRelationship||(st.KeyRelationship={}));var JCe={[st.KeyRelationship.Forbids]:{expect:!1,message:"forbids using"},[st.KeyRelationship.Requires]:{expect:!0,message:"requires using"}},WCe=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=JCe[e];return bt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?pt(l,`Property "${r}" ${o.message} ${ry(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})};st.applyCascade=wCe;st.base64RegExp=$H;st.colorStringAlphaRegExp=ZH;st.colorStringRegExp=_H;st.computeKey=LA;st.getPrintable=Zr;st.hasExactLength=nG;st.hasForbiddenKeys=jCe;st.hasKeyRelationship=WCe;st.hasMaxLength=SCe;st.hasMinLength=bCe;st.hasMutuallyExclusiveKeys=qCe;st.hasRequiredKeys=YCe;st.hasUniqueItems=vCe;st.isArray=dCe;st.isAtLeast=DCe;st.isAtMost=kCe;st.isBase64=HCe;st.isBoolean=fCe;st.isDate=pCe;st.isDict=mCe;st.isEnum=uCe;st.isHexColor=UCe;st.isISO8601=KCe;st.isInExclusiveRange=FCe;st.isInInclusiveRange=RCe;st.isInstanceOf=ICe;st.isInteger=NCe;st.isJSON=GCe;st.isLiteral=lCe;st.isLowerCase=TCe;st.isNegative=xCe;st.isNullable=QCe;st.isNumber=hCe;st.isObject=ECe;st.isOneOf=yCe;st.isOptional=BCe;st.isPositive=PCe;st.isString=cCe;st.isTuple=CCe;st.isUUID4=MCe;st.isUnknown=iG;st.isUpperCase=OCe;st.iso8601RegExp=Kv;st.makeCoercionFn=wc;st.makeSetter=rG;st.makeTrait=tG;st.makeValidator=bt;st.matchesRegExp=LCe;st.plural=ry;st.pushError=pt;st.simpleKeyRegExp=XH;st.uuid4RegExp=eG});var Bc=y(Uv=>{"use strict";Object.defineProperty(Uv,"__esModule",{value:!0});var sG=Sa();function zCe(r){if(r&&r.__esModule)return r;var e=Object.create(null);return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:function(){return r[t]}})}}),e.default=r,Object.freeze(e)}var Qd=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let t=this.constructor.schema;if(Array.isArray(t)){let{isDict:n,isUnknown:s,applyCascade:o}=await Promise.resolve().then(function(){return zCe(ns())}),a=o(n(s()),t),l=[],c=[];if(!a(this,{errors:l,coercions:c}))throw sG.formatError("Invalid option schema",l);for(let[,g]of c)g()}else if(t!=null)throw new Error("Invalid command schema");let i=await this.execute();return typeof i<"u"?i:0}};Qd.isOption=sG.isOptionSymbol;Qd.Default=[];Uv.Command=Qd});var Gv=y(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var oG=80,Hv=Array(oG).fill("\u2501");for(let r=0;r<=24;++r)Hv[Hv.length-r]=`\x1B[38;5;${232+r}m\u2501`;var VCe={header:r=>`\x1B[1m\u2501\u2501\u2501 ${r}${r.length`\x1B[1m${r}\x1B[22m`,error:r=>`\x1B[31m\x1B[1m${r}\x1B[22m\x1B[39m`,code:r=>`\x1B[36m${r}\x1B[39m`},XCe={header:r=>r,bold:r=>r,error:r=>r,code:r=>r};function _Ce(r){let e=r.split(` +`),t=e.filter(n=>n.match(/\S/)),i=t.length>0?t.reduce((n,s)=>Math.min(n,s.length-s.trimStart().length),Number.MAX_VALUE):0;return e.map(n=>n.slice(i).trimRight()).join(` +`)}function ZCe(r,{format:e,paragraphs:t}){return r=r.replace(/\r\n?/g,` +`),r=_Ce(r),r=r.replace(/^\n+|\n+$/g,""),r=r.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 + +`),r=r.replace(/\n(\n)?\n*/g,"$1"),t&&(r=r.split(/\n/).map(i=>{let n=i.match(/^\s*[*-][\t ]+(.*)/);if(!n)return i.match(/(.{1,80})(?: |$)/g).join(` +`);let s=i.length-i.trimStart().length;return n[1].match(new RegExp(`(.{1,${78-s}})(?: |$)`,"g")).map((o,a)=>" ".repeat(s)+(a===0?"- ":" ")+o).join(` +`)}).join(` + +`)),r=r.replace(/(`+)((?:.|[\n])*?)\1/g,(i,n,s)=>e.code(n+s+n)),r=r.replace(/(\*\*)((?:.|[\n])*?)\1/g,(i,n,s)=>e.bold(n+s+n)),r?`${r} +`:""}bd.formatMarkdownish=ZCe;bd.richFormat=VCe;bd.textFormat=XCe});var ay=y(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});var lt=ey(),sy=ty();function Vi(r){lt.DEBUG&&console.log(r)}var aG={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:lt.HELP_COMMAND_INDEX};function Yv(){return{nodes:[Ti(),Ti(),Ti()]}}function AG(r){let e=Yv(),t=[],i=e.nodes.length;for(let n of r){t.push(i);for(let s=0;s{if(e.has(i))return;e.add(i);let n=r.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)t(a);for(let[,{to:o}]of n.dynamics)t(o);for(let{to:o}of n.shortcuts)t(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=r.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};t(lt.NODE_INITIAL)}function cG(r,{prefix:e=""}={}){if(lt.DEBUG){Vi(`${e}Nodes are:`);for(let t=0;tl!==lt.NODE_ERRORED).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===lt.NODE_ERRORED))throw new sy.UnknownSyntaxError(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=uG(a)}if(i.length>0){Vi(" Results:");for(let s of i)Vi(` - ${s.node} -> ${JSON.stringify(s.state)}`)}else Vi(" No results");return i}function $Ce(r,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(r.statics,lt.END_OF_INPUT)){for(let{to:t}of r.statics[lt.END_OF_INPUT])if(t===lt.NODE_SUCCESS)return!0}return!1}function eme(r,e,t){let i=t&&e.length>0?[""]:[],n=jv(r,e,t),s=[],o=new Set,a=(l,c,u=!0)=>{let g=[c];for(;g.length>0;){let h=g;g=[];for(let p of h){let C=r.nodes[p],w=Object.keys(C.statics);for(let B of Object.keys(C.statics)){let v=w[0];for(let{to:D,reducer:L}of C.statics[v])L==="pushPath"&&(u||l.push(v),g.push(D))}}u=!1}let f=JSON.stringify(l);o.has(f)||(s.push(l),o.add(f))};for(let{node:l,state:c}of n){if(c.remainder!==null){a([c.remainder],l);continue}let u=r.nodes[l],g=$Ce(u,c);for(let[f,h]of Object.entries(u.statics))(g&&f!==lt.END_OF_INPUT||!f.startsWith("-")&&h.some(({reducer:p})=>p==="pushPath"))&&a([...i,f],l);if(!!g)for(let[f,{to:h}]of u.dynamics){if(h===lt.NODE_ERRORED)continue;let p=dG(f,c);if(p!==null)for(let C of p)a([...i,C],l)}}return[...s].sort()}function tme(r,e){let t=jv(r,[...e,lt.END_OF_INPUT]);return gG(e,t.map(({state:i})=>i))}function uG(r){let e=0;for(let{state:t}of r)t.path.length>e&&(e=t.path.length);return r.filter(({state:t})=>t.path.length===e)}function gG(r,e){let t=e.filter(g=>g.selectedIndex!==null);if(t.length===0)throw new Error;let i=t.filter(g=>g.requiredOptions.every(f=>f.some(h=>g.options.find(p=>p.name===h))));if(i.length===0)throw new sy.UnknownSyntaxError(r,t.map(g=>({usage:g.candidateUsage,reason:null})));let n=0;for(let g of i)g.path.length>n&&(n=g.path.length);let s=i.filter(g=>g.path.length===n),o=g=>g.positionals.filter(({extra:f})=>!f).length+g.options.length,a=s.map(g=>({state:g,positionalCount:o(g)})),l=0;for(let{positionalCount:g}of a)g>l&&(l=g);let c=a.filter(({positionalCount:g})=>g===l).map(({state:g})=>g),u=fG(c);if(u.length>1)throw new sy.AmbiguousSyntaxError(r,u.map(g=>g.candidateUsage));return u[0]}function fG(r){let e=[],t=[];for(let i of r)i.selectedIndex===lt.HELP_COMMAND_INDEX?t.push(i):e.push(i);return t.length>0&&e.push({...aG,path:hG(...t.map(i=>i.path)),options:t.reduce((i,n)=>i.concat(n.options),[])}),e}function hG(r,e,...t){return e===void 0?Array.from(r):hG(r.filter((i,n)=>i===e[n]),...t)}function Ti(){return{dynamics:[],shortcuts:[],statics:{}}}function qv(r){return r===lt.NODE_SUCCESS||r===lt.NODE_ERRORED}function iy(r,e=0){return{to:qv(r.to)?r.to:r.to>2?r.to+e-2:r.to+e,reducer:r.reducer}}function pG(r,e=0){let t=Ti();for(let[i,n]of r.dynamics)t.dynamics.push([i,iy(n,e)]);for(let i of r.shortcuts)t.shortcuts.push(iy(i,e));for(let[i,n]of Object.entries(r.statics))t.statics[i]=n.map(s=>iy(s,e));return t}function Ei(r,e,t,i,n){r.nodes[e].dynamics.push([t,{to:i,reducer:n}])}function Qc(r,e,t,i){r.nodes[e].shortcuts.push({to:t,reducer:i})}function xo(r,e,t,i,n){(Object.prototype.hasOwnProperty.call(r.nodes[e].statics,t)?r.nodes[e].statics[t]:r.nodes[e].statics[t]=[]).push({to:i,reducer:n})}function Sd(r,e,t,i){if(Array.isArray(e)){let[n,...s]=e;return r[n](t,i,...s)}else return r[e](t,i)}function dG(r,e){let t=Array.isArray(r)?vd[r[0]]:vd[r];if(typeof t.suggest>"u")return null;let i=Array.isArray(r)?r.slice(1):[];return t.suggest(e,...i)}var vd={always:()=>!0,isOptionLike:(r,e)=>!r.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(r,e)=>r.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(r,e,t,i)=>!r.ignoreOptions&&e===t,isBatchOption:(r,e,t)=>!r.ignoreOptions&<.BATCH_REGEX.test(e)&&[...e.slice(1)].every(i=>t.includes(`-${i}`)),isBoundOption:(r,e,t,i)=>{let n=e.match(lt.BINDING_REGEX);return!r.ignoreOptions&&!!n&<.OPTION_REGEX.test(n[1])&&t.includes(n[1])&&i.filter(s=>s.names.includes(n[1])).every(s=>s.allowBinding)},isNegatedOption:(r,e,t)=>!r.ignoreOptions&&e===`--no-${t.slice(2)}`,isHelp:(r,e)=>!r.ignoreOptions&<.HELP_REGEX.test(e),isUnsupportedOption:(r,e,t)=>!r.ignoreOptions&&e.startsWith("-")&<.OPTION_REGEX.test(e)&&!t.includes(e),isInvalidOption:(r,e)=>!r.ignoreOptions&&e.startsWith("-")&&!lt.OPTION_REGEX.test(e)};vd.isOption.suggest=(r,e,t=!0)=>t?null:[e];var ny={setCandidateState:(r,e,t)=>({...r,...t}),setSelectedIndex:(r,e,t)=>({...r,selectedIndex:t}),pushBatch:(r,e)=>({...r,options:r.options.concat([...e.slice(1)].map(t=>({name:`-${t}`,value:!0})))}),pushBound:(r,e)=>{let[,t,i]=e.match(lt.BINDING_REGEX);return{...r,options:r.options.concat({name:t,value:i})}},pushPath:(r,e)=>({...r,path:r.path.concat(e)}),pushPositional:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!1})}),pushExtra:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!0})}),pushExtraNoLimits:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:Po})}),pushTrue:(r,e,t=e)=>({...r,options:r.options.concat({name:e,value:!0})}),pushFalse:(r,e,t=e)=>({...r,options:r.options.concat({name:t,value:!1})}),pushUndefined:(r,e)=>({...r,options:r.options.concat({name:e,value:void 0})}),pushStringValue:(r,e)=>{var t;let i={...r,options:[...r.options]},n=r.options[r.options.length-1];return n.value=((t=n.value)!==null&&t!==void 0?t:[]).concat([e]),i},setStringValue:(r,e)=>{let t={...r,options:[...r.options]},i=r.options[r.options.length-1];return i.value=e,t},inhibateOptions:r=>({...r,ignoreOptions:!0}),useHelp:(r,e,t)=>{let[,,i]=e.match(lt.HELP_REGEX);return typeof i<"u"?{...r,options:[{name:"-c",value:String(t)},{name:"-i",value:i}]}:{...r,options:[{name:"-c",value:String(t)}]}},setError:(r,e,t)=>e===lt.END_OF_INPUT?{...r,errorMessage:`${t}.`}:{...r,errorMessage:`${t} ("${e}").`},setOptionArityError:(r,e)=>{let t=r.options[r.options.length-1];return{...r,errorMessage:`Not enough arguments to option ${t.name}.`}}},Po=Symbol(),oy=class{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:i=this.arity.extra,proxy:n=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:i,proxy:n})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===Po)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!t&&this.arity.extra!==Po?this.arity.extra.push(e):this.arity.extra!==Po&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===Po)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 i=0;i1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(i))throw new Error(`The arity must be an integer, got ${i}`);if(i<0)throw new Error(`The arity must be positive, got ${i}`);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:i,hidden:n,required:s,allowBinding:o})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){let i=[this.cliOpts.binaryName],n=[];if(this.paths.length>0&&i.push(...this.paths[0]),e){for(let{names:o,arity:a,hidden:l,description:c,required:u}of this.options){if(l)continue;let g=[];for(let h=0;h`:`[${f}]`)}i.push(...this.arity.leading.map(o=>`<${o}>`)),this.arity.extra===Po?i.push("..."):i.push(...this.arity.extra.map(o=>`[${o}]`)),i.push(...this.arity.trailing.map(o=>`<${o}>`))}return{usage:i.join(" "),options:n}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=Yv(),t=lt.NODE_INITIAL,i=this.usage().usage,n=this.options.filter(a=>a.required).map(a=>a.names);t=ss(e,Ti()),xo(e,lt.NODE_INITIAL,lt.START_OF_INPUT,t,["setCandidateState",{candidateUsage:i,requiredOptions:n}]);let s=this.arity.proxy?"always":"isNotOptionLike",o=this.paths.length>0?this.paths:[[]];for(let a of o){let l=t;if(a.length>0){let f=ss(e,Ti());Qc(e,l,f),this.registerOptions(e,f),l=f}for(let f=0;f0||!this.arity.proxy){let f=ss(e,Ti());Ei(e,l,"isHelp",f,["useHelp",this.cliIndex]),xo(e,f,lt.END_OF_INPUT,lt.NODE_SUCCESS,["setSelectedIndex",lt.HELP_COMMAND_INDEX]),this.registerOptions(e,l)}this.arity.leading.length>0&&xo(e,l,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let c=l;for(let f=0;f0||f+1!==this.arity.leading.length)&&xo(e,h,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]),Ei(e,c,"isNotOptionLike",h,"pushPositional"),c=h}let u=c;if(this.arity.extra===Po||this.arity.extra.length>0){let f=ss(e,Ti());if(Qc(e,c,f),this.arity.extra===Po){let h=ss(e,Ti());this.arity.proxy||this.registerOptions(e,h),Ei(e,c,s,h,"pushExtraNoLimits"),Ei(e,h,s,h,"pushExtraNoLimits"),Qc(e,h,f)}else for(let h=0;h0&&xo(e,u,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let g=u;for(let f=0;fo.length>s.length?o:s,"");if(i.arity===0)for(let s of i.names)Ei(e,t,["isOption",s,i.hidden||s!==n],t,"pushTrue"),s.startsWith("--")&&!s.startsWith("--no-")&&Ei(e,t,["isNegatedOption",s],t,["pushFalse",s]);else{let s=ss(e,Ti());for(let o of i.names)Ei(e,t,["isOption",o,i.hidden||o!==n],s,"pushUndefined");for(let o=0;o=0&&etme(i,n),suggest:(n,s)=>eme(i,n,s)}}};Ar.CliBuilder=xd;Ar.CommandBuilder=oy;Ar.NoLimits=Po;Ar.aggregateHelpStates=fG;Ar.cloneNode=pG;Ar.cloneTransition=iy;Ar.debug=Vi;Ar.debugMachine=cG;Ar.execute=Sd;Ar.injectNode=ss;Ar.isTerminalNode=qv;Ar.makeAnyOfMachine=AG;Ar.makeNode=Ti;Ar.makeStateMachine=Yv;Ar.reducers=ny;Ar.registerDynamic=Ei;Ar.registerShortcut=Qc;Ar.registerStatic=xo;Ar.runMachineInternal=jv;Ar.selectBestState=gG;Ar.simplifyMachine=lG;Ar.suggest=dG;Ar.tests=vd;Ar.trimSmallerBranches=uG});var CG=y(Jv=>{"use strict";Object.defineProperty(Jv,"__esModule",{value:!0});var rme=Bc(),Pd=class extends rme.Command{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,t){let i=new Pd(t);i.path=e.path;for(let n of e.options)switch(n.name){case"-c":i.commands.push(Number(n.value));break;case"-i":i.index=Number(n.value);break}return i}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: +`),this.context.stdout.write(` +`);let t=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${t++}. `.padStart(5)}));this.context.stdout.write(` +`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. +`)}}};Jv.HelpCommand=Pd});var BG=y(Wv=>{"use strict";Object.defineProperty(Wv,"__esModule",{value:!0});var ime=ey(),mG=Bc(),nme=J("tty"),sme=ay(),hn=Gv(),ome=CG();function ame(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var EG=ame(nme),IG=Symbol("clipanion/errorCommand");function Ame(){return process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}var TA=class{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:i,enableCapture:n=!1,enableColors:s}={}){this.registrations=new Map,this.builder=new sme.CliBuilder({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=i,this.enableCapture=n,this.enableColors=s}static from(e,t={}){let i=new TA(t);for(let n of e)i.register(n);return i}register(e){var t;let i=new Map,n=new e;for(let l in n){let c=n[l];typeof c=="object"&&c!==null&&c[mG.Command.isOption]&&i.set(l,c)}let s=this.builder.command(),o=s.cliIndex,a=(t=e.paths)!==null&&t!==void 0?t:n.paths;if(typeof a<"u")for(let l of a)s.addPath(l);this.registrations.set(e,{specs:i,builder:s,index:o});for(let[l,{definition:c}]of i.entries())c(s,l);s.setContext({commandClass:e})}process(e){let{contexts:t,process:i}=this.builder.compile(),n=i(e);switch(n.selectedIndex){case ime.HELP_COMMAND_INDEX:return ome.HelpCommand.from(n,t);default:{let{commandClass:s}=t[n.selectedIndex],o=this.registrations.get(s);if(typeof o>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let a=new s;a.path=n.path;try{for(let[l,{transformer:c}]of o.specs.entries())a[l]=c(o.builder,l,n);return a}catch(l){throw l[IG]=a,l}}break}}async run(e,t){var i;let n,s={...TA.defaultContext,...t},o=(i=this.enableColors)!==null&&i!==void 0?i:s.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e)}catch(c){return s.stdout.write(this.error(c,{colored:o})),1}if(n.help)return s.stdout.write(this.usage(n,{colored:o,detailed:!0})),0;n.context=s,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(c,u)=>this.error(c,u),format:c=>this.format(c),process:c=>this.process(c),run:(c,u)=>this.run(c,{...s,...u}),usage:(c,u)=>this.usage(c,u)};let a=this.enableCapture?lme(s):wG,l;try{l=await a(()=>n.validateAndExecute().catch(c=>n.catch(c).then(()=>0)))}catch(c){return s.stdout.write(this.error(c,{colored:o,command:n})),1}return l}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){let{suggest:i}=this.builder.compile();return i(e,t)}definitions({colored:e=!1}={}){let t=[];for(let[i,{index:n}]of this.registrations){if(typeof i.usage>"u")continue;let{usage:s}=this.getUsageByIndex(n,{detailed:!1}),{usage:o,options:a}=this.getUsageByIndex(n,{detailed:!0,inlineOptions:!1}),l=typeof i.usage.category<"u"?hn.formatMarkdownish(i.usage.category,{format:this.format(e),paragraphs:!1}):void 0,c=typeof i.usage.description<"u"?hn.formatMarkdownish(i.usage.description,{format:this.format(e),paragraphs:!1}):void 0,u=typeof i.usage.details<"u"?hn.formatMarkdownish(i.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=typeof i.usage.examples<"u"?i.usage.examples.map(([f,h])=>[hn.formatMarkdownish(f,{format:this.format(e),paragraphs:!1}),h.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:s,usage:o,category:l,description:c,details:u,examples:g,options:a})}return t}usage(e=null,{colored:t,detailed:i=!1,prefix:n="$ "}={}){var s;if(e===null){for(let l of this.registrations.keys()){let c=l.paths,u=typeof l.usage<"u";if(!c||c.length===0||c.length===1&&c[0].length===0||((s=c==null?void 0:c.some(h=>h.length===0))!==null&&s!==void 0?s:!1))if(e){e=null;break}else e=l;else if(u){e=null;continue}}e&&(i=!0)}let o=e!==null&&e instanceof mG.Command?e.constructor:e,a="";if(o)if(i){let{description:l="",details:c="",examples:u=[]}=o.usage||{};l!==""&&(a+=hn.formatMarkdownish(l,{format:this.format(t),paragraphs:!1}).replace(/^./,h=>h.toUpperCase()),a+=` +`),(c!==""||u.length>0)&&(a+=`${this.format(t).header("Usage")} +`,a+=` +`);let{usage:g,options:f}=this.getUsageByRegistration(o,{inlineOptions:!1});if(a+=`${this.format(t).bold(n)}${g} +`,f.length>0){a+=` +`,a+=`${hn.richFormat.header("Options")} +`;let h=f.reduce((p,C)=>Math.max(p,C.definition.length),0);a+=` +`;for(let{definition:p,description:C}of f)a+=` ${this.format(t).bold(p.padEnd(h))} ${hn.formatMarkdownish(C,{format:this.format(t),paragraphs:!1})}`}if(c!==""&&(a+=` +`,a+=`${this.format(t).header("Details")} +`,a+=` +`,a+=hn.formatMarkdownish(c,{format:this.format(t),paragraphs:!0})),u.length>0){a+=` +`,a+=`${this.format(t).header("Examples")} +`;for(let[h,p]of u)a+=` +`,a+=hn.formatMarkdownish(h,{format:this.format(t),paragraphs:!1}),a+=`${p.replace(/^/m,` ${this.format(t).bold(n)}`).replace(/\$0/g,this.binaryName)} +`}}else{let{usage:l}=this.getUsageByRegistration(o);a+=`${this.format(t).bold(n)}${l} +`}else{let l=new Map;for(let[f,{index:h}]of this.registrations.entries()){if(typeof f.usage>"u")continue;let p=typeof f.usage.category<"u"?hn.formatMarkdownish(f.usage.category,{format:this.format(t),paragraphs:!1}):null,C=l.get(p);typeof C>"u"&&l.set(p,C=[]);let{usage:w}=this.getUsageByIndex(h);C.push({commandClass:f,usage:w})}let c=Array.from(l.keys()).sort((f,h)=>f===null?-1:h===null?1:f.localeCompare(h,"en",{usage:"sort",caseFirst:"upper"})),u=typeof this.binaryLabel<"u",g=typeof this.binaryVersion<"u";u||g?(u&&g?a+=`${this.format(t).header(`${this.binaryLabel} - ${this.binaryVersion}`)} + +`:u?a+=`${this.format(t).header(`${this.binaryLabel}`)} +`:a+=`${this.format(t).header(`${this.binaryVersion}`)} +`,a+=` ${this.format(t).bold(n)}${this.binaryName} +`):a+=`${this.format(t).bold(n)}${this.binaryName} +`;for(let f of c){let h=l.get(f).slice().sort((C,w)=>C.usage.localeCompare(w.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=` +`,a+=`${this.format(t).header(`${p}`)} +`;for(let{commandClass:C,usage:w}of h){let B=C.usage.description||"undocumented";a+=` +`,a+=` ${this.format(t).bold(w)} +`,a+=` ${hn.formatMarkdownish(B,{format:this.format(t),paragraphs:!1})}`}}a+=` +`,a+=hn.formatMarkdownish("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(t),paragraphs:!0})}return a}error(e,t){var i,{colored:n,command:s=(i=e[IG])!==null&&i!==void 0?i:null}=t===void 0?{}:t;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}: ${e.message} +`;let l=e.clipanion;return typeof l<"u"?l.type==="usage"&&(o+=` +`,o+=this.usage(s)):e.stack&&(o+=`${e.stack.replace(/^.*\n/,"")} +`),o}format(e){var t;return((t=e!=null?e:this.enableColors)!==null&&t!==void 0?t:TA.defaultContext.colorDepth>1)?hn.richFormat:hn.textFormat}getUsageByRegistration(e,t){let i=this.registrations.get(e);if(typeof i>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(i.index,t)}getUsageByIndex(e,t){return this.builder.getBuilderByIndex(e).usage(t)}};TA.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:"getColorDepth"in EG.default.WriteStream.prototype?EG.default.WriteStream.prototype.getColorDepth():Ame()};var yG;function lme(r){let e=yG;if(typeof e>"u"){if(r.stdout===process.stdout&&r.stderr===process.stderr)return wG;let{AsyncLocalStorage:t}=J("async_hooks");e=yG=new t;let i=process.stdout._write;process.stdout._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?i.call(this,s,o,a):l.stdout.write(s,o,a)};let n=process.stderr._write;process.stderr._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?n.call(this,s,o,a):l.stderr.write(s,o,a)}}return t=>e.run(r,t)}function wG(r){return r()}Wv.Cli=TA});var QG=y(zv=>{"use strict";Object.defineProperty(zv,"__esModule",{value:!0});var cme=Bc(),Ay=class extends cme.Command{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} +`)}};Ay.paths=[["--clipanion=definitions"]];zv.DefinitionsCommand=Ay});var bG=y(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});var ume=Bc(),ly=class extends ume.Command{async execute(){this.context.stdout.write(this.cli.usage())}};ly.paths=[["-h"],["--help"]];Vv.HelpCommand=ly});var SG=y(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});var gme=Bc(),cy=class extends gme.Command{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} +`)}};cy.paths=[["-v"],["--version"]];Xv.VersionCommand=cy});var vG=y(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});var fme=QG(),hme=bG(),pme=SG();Dd.DefinitionsCommand=fme.DefinitionsCommand;Dd.HelpCommand=hme.HelpCommand;Dd.VersionCommand=pme.VersionCommand});var PG=y(_v=>{"use strict";Object.defineProperty(_v,"__esModule",{value:!0});var xG=Sa();function dme(r,e,t){let[i,n]=xG.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return xG.makeCommandOption({definition(l){l.addOption({names:o,arity:s,hidden:n==null?void 0:n.hidden,description:n==null?void 0:n.description,required:n.required})},transformer(l,c,u){let g=typeof i<"u"?[...i]:void 0;for(let{name:f,value:h}of u.options)!a.has(f)||(g=g!=null?g:[],g.push(h));return g}})}_v.Array=dme});var kG=y(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});var DG=Sa();function Cme(r,e,t){let[i,n]=DG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return DG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u=f);return u}})}Zv.Boolean=Cme});var FG=y($v=>{"use strict";Object.defineProperty($v,"__esModule",{value:!0});var RG=Sa();function mme(r,e,t){let[i,n]=RG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return RG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u!=null||(u=0),f?u+=1:u=0);return u}})}$v.Counter=mme});var NG=y(ex=>{"use strict";Object.defineProperty(ex,"__esModule",{value:!0});var Eme=Sa();function Ime(r={}){return Eme.makeCommandOption({definition(e,t){var i;e.addProxy({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){return i.positionals.map(({value:n})=>n)}})}ex.Proxy=Ime});var LG=y(tx=>{"use strict";Object.defineProperty(tx,"__esModule",{value:!0});var yme=Sa(),wme=ay();function Bme(r={}){return yme.makeCommandOption({definition(e,t){var i;e.addRest({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){let n=o=>{let a=i.positionals[o];return a.extra===wme.NoLimits||a.extra===!1&&oo)}})}tx.Rest=Bme});var TG=y(rx=>{"use strict";Object.defineProperty(rx,"__esModule",{value:!0});var kd=Sa(),Qme=ay();function bme(r,e,t){let[i,n]=kd.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return kd.makeCommandOption({definition(l){l.addOption({names:o,arity:n.tolerateBoolean?0:s,hidden:n.hidden,description:n.description,required:n.required})},transformer(l,c,u){let g,f=i;for(let{name:h,value:p}of u.options)!a.has(h)||(g=h,f=p);return typeof f=="string"?kd.applyValidator(g!=null?g:c,f,n.validator):f}})}function Sme(r={}){let{required:e=!0}=r;return kd.makeCommandOption({definition(t,i){var n;t.addPositional({name:(n=r.name)!==null&&n!==void 0?n:i,required:r.required})},transformer(t,i,n){var s;for(let o=0;o{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var Af=Sa(),xme=PG(),Pme=kG(),Dme=FG(),kme=NG(),Rme=LG(),Fme=TG();pn.applyValidator=Af.applyValidator;pn.cleanValidationError=Af.cleanValidationError;pn.formatError=Af.formatError;pn.isOptionSymbol=Af.isOptionSymbol;pn.makeCommandOption=Af.makeCommandOption;pn.rerouteArguments=Af.rerouteArguments;pn.Array=xme.Array;pn.Boolean=Pme.Boolean;pn.Counter=Dme.Counter;pn.Proxy=kme.Proxy;pn.Rest=Rme.Rest;pn.String=Fme.String});var Xe=y(OA=>{"use strict";Object.defineProperty(OA,"__esModule",{value:!0});var Nme=ty(),Lme=Bc(),Tme=Gv(),Ome=BG(),Mme=vG(),Kme=OG();OA.UsageError=Nme.UsageError;OA.Command=Lme.Command;OA.formatMarkdownish=Tme.formatMarkdownish;OA.Cli=Ome.Cli;OA.Builtins=Mme;OA.Option=Kme});var KG=y((M$e,MG)=>{"use strict";MG.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var lf=y((K$e,ix)=>{"use strict";var Ume=KG(),UG=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=Ume(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};ix.exports=UG;ix.exports.default=UG});var Rd=y((H$e,HG)=>{var Hme="2.0.0",Gme=Number.MAX_SAFE_INTEGER||9007199254740991,Yme=16;HG.exports={SEMVER_SPEC_VERSION:Hme,MAX_LENGTH:256,MAX_SAFE_INTEGER:Gme,MAX_SAFE_COMPONENT_LENGTH:Yme}});var Fd=y((G$e,GG)=>{var jme=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};GG.exports=jme});var bc=y((KA,YG)=>{var{MAX_SAFE_COMPONENT_LENGTH:nx}=Rd(),qme=Fd();KA=YG.exports={};var Jme=KA.re=[],_e=KA.src=[],Ze=KA.t={},Wme=0,St=(r,e,t)=>{let i=Wme++;qme(i,e),Ze[r]=i,_e[i]=e,Jme[i]=new RegExp(e,t?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","[0-9]+");St("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");St("MAINVERSION",`(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${_e[Ze.NUMERICIDENTIFIER]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${_e[Ze.NUMERICIDENTIFIERLOOSE]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASE",`(?:-(${_e[Ze.PRERELEASEIDENTIFIER]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${_e[Ze.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER","[0-9A-Za-z-]+");St("BUILD",`(?:\\+(${_e[Ze.BUILDIDENTIFIER]}(?:\\.${_e[Ze.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${_e[Ze.MAINVERSION]}${_e[Ze.PRERELEASE]}?${_e[Ze.BUILD]}?`);St("FULL",`^${_e[Ze.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${_e[Ze.MAINVERSIONLOOSE]}${_e[Ze.PRERELEASELOOSE]}?${_e[Ze.BUILD]}?`);St("LOOSE",`^${_e[Ze.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${_e[Ze.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${_e[Ze.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:${_e[Ze.PRERELEASE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:${_e[Ze.PRERELEASELOOSE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COERCE",`(^|[^\\d])(\\d{1,${nx}})(?:\\.(\\d{1,${nx}}))?(?:\\.(\\d{1,${nx}}))?(?:$|[^\\d])`);St("COERCERTL",_e[Ze.COERCE],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${_e[Ze.LONETILDE]}\\s+`,!0);KA.tildeTrimReplace="$1~";St("TILDE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${_e[Ze.LONECARET]}\\s+`,!0);KA.caretTrimReplace="$1^";St("CARET",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]}|${_e[Ze.XRANGEPLAIN]})`,!0);KA.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${_e[Ze.XRANGEPLAIN]})\\s+-\\s+(${_e[Ze.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${_e[Ze.XRANGEPLAINLOOSE]})\\s+-\\s+(${_e[Ze.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0.0.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var Nd=y((Y$e,jG)=>{var zme=["includePrerelease","loose","rtl"],Vme=r=>r?typeof r!="object"?{loose:!0}:zme.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};jG.exports=Vme});var gy=y((j$e,WG)=>{var qG=/^[0-9]+$/,JG=(r,e)=>{let t=qG.test(r),i=qG.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:rJG(e,r);WG.exports={compareIdentifiers:JG,rcompareIdentifiers:Xme}});var Oi=y((q$e,_G)=>{var fy=Fd(),{MAX_LENGTH:zG,MAX_SAFE_INTEGER:hy}=Rd(),{re:VG,t:XG}=bc(),_me=Nd(),{compareIdentifiers:Ld}=gy(),Un=class{constructor(e,t){if(t=_me(t),e instanceof Un){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>zG)throw new TypeError(`version is longer than ${zG} characters`);fy("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?VG[XG.LOOSE]:VG[XG.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>hy||this.major<0)throw new TypeError("Invalid major version");if(this.minor>hy||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>hy||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};_G.exports=Un});var Sc=y((J$e,tY)=>{var{MAX_LENGTH:Zme}=Rd(),{re:ZG,t:$G}=bc(),eY=Oi(),$me=Nd(),eEe=(r,e)=>{if(e=$me(e),r instanceof eY)return r;if(typeof r!="string"||r.length>Zme||!(e.loose?ZG[$G.LOOSE]:ZG[$G.FULL]).test(r))return null;try{return new eY(r,e)}catch{return null}};tY.exports=eEe});var iY=y((W$e,rY)=>{var tEe=Sc(),rEe=(r,e)=>{let t=tEe(r,e);return t?t.version:null};rY.exports=rEe});var sY=y((z$e,nY)=>{var iEe=Sc(),nEe=(r,e)=>{let t=iEe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};nY.exports=nEe});var aY=y((V$e,oY)=>{var sEe=Oi(),oEe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new sEe(r,t).inc(e,i).version}catch{return null}};oY.exports=oEe});var os=y((X$e,lY)=>{var AY=Oi(),aEe=(r,e,t)=>new AY(r,t).compare(new AY(e,t));lY.exports=aEe});var py=y((_$e,cY)=>{var AEe=os(),lEe=(r,e,t)=>AEe(r,e,t)===0;cY.exports=lEe});var fY=y((Z$e,gY)=>{var uY=Sc(),cEe=py(),uEe=(r,e)=>{if(cEe(r,e))return null;{let t=uY(r),i=uY(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};gY.exports=uEe});var pY=y(($$e,hY)=>{var gEe=Oi(),fEe=(r,e)=>new gEe(r,e).major;hY.exports=fEe});var CY=y((eet,dY)=>{var hEe=Oi(),pEe=(r,e)=>new hEe(r,e).minor;dY.exports=pEe});var EY=y((tet,mY)=>{var dEe=Oi(),CEe=(r,e)=>new dEe(r,e).patch;mY.exports=CEe});var yY=y((ret,IY)=>{var mEe=Sc(),EEe=(r,e)=>{let t=mEe(r,e);return t&&t.prerelease.length?t.prerelease:null};IY.exports=EEe});var BY=y((iet,wY)=>{var IEe=os(),yEe=(r,e,t)=>IEe(e,r,t);wY.exports=yEe});var bY=y((net,QY)=>{var wEe=os(),BEe=(r,e)=>wEe(r,e,!0);QY.exports=BEe});var dy=y((set,vY)=>{var SY=Oi(),QEe=(r,e,t)=>{let i=new SY(r,t),n=new SY(e,t);return i.compare(n)||i.compareBuild(n)};vY.exports=QEe});var PY=y((oet,xY)=>{var bEe=dy(),SEe=(r,e)=>r.sort((t,i)=>bEe(t,i,e));xY.exports=SEe});var kY=y((aet,DY)=>{var vEe=dy(),xEe=(r,e)=>r.sort((t,i)=>vEe(i,t,e));DY.exports=xEe});var Td=y((Aet,RY)=>{var PEe=os(),DEe=(r,e,t)=>PEe(r,e,t)>0;RY.exports=DEe});var Cy=y((cet,FY)=>{var kEe=os(),REe=(r,e,t)=>kEe(r,e,t)<0;FY.exports=REe});var sx=y((uet,NY)=>{var FEe=os(),NEe=(r,e,t)=>FEe(r,e,t)!==0;NY.exports=NEe});var my=y((get,LY)=>{var LEe=os(),TEe=(r,e,t)=>LEe(r,e,t)>=0;LY.exports=TEe});var Ey=y((fet,TY)=>{var OEe=os(),MEe=(r,e,t)=>OEe(r,e,t)<=0;TY.exports=MEe});var ox=y((het,OY)=>{var KEe=py(),UEe=sx(),HEe=Td(),GEe=my(),YEe=Cy(),jEe=Ey(),qEe=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return KEe(r,t,i);case"!=":return UEe(r,t,i);case">":return HEe(r,t,i);case">=":return GEe(r,t,i);case"<":return YEe(r,t,i);case"<=":return jEe(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};OY.exports=qEe});var KY=y((pet,MY)=>{var JEe=Oi(),WEe=Sc(),{re:Iy,t:yy}=bc(),zEe=(r,e)=>{if(r instanceof JEe)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(Iy[yy.COERCE]);else{let i;for(;(i=Iy[yy.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),Iy[yy.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;Iy[yy.COERCERTL].lastIndex=-1}return t===null?null:WEe(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};MY.exports=zEe});var HY=y((det,UY)=>{"use strict";UY.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Od=y((Cet,GY)=>{"use strict";GY.exports=Ht;Ht.Node=vc;Ht.create=Ht;function Ht(r){var e=this;if(e instanceof Ht||(e=new Ht),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Ht.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Ht.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ht.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ht.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ht;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Ht.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var ZEe=Od(),xc=Symbol("max"),xa=Symbol("length"),cf=Symbol("lengthCalculator"),Kd=Symbol("allowStale"),Pc=Symbol("maxAge"),va=Symbol("dispose"),YY=Symbol("noDisposeOnSet"),Ii=Symbol("lruList"),zs=Symbol("cache"),qY=Symbol("updateAgeOnGet"),ax=()=>1,lx=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 t=this[xc]=e.max||1/0,i=e.length||ax;if(this[cf]=typeof i!="function"?ax:i,this[Kd]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Pc]=e.maxAge||0,this[va]=e.dispose,this[YY]=e.noDisposeOnSet||!1,this[qY]=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[xc]=e||1/0,Md(this)}get max(){return this[xc]}set allowStale(e){this[Kd]=!!e}get allowStale(){return this[Kd]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Pc]=e,Md(this)}get maxAge(){return this[Pc]}set lengthCalculator(e){typeof e!="function"&&(e=ax),e!==this[cf]&&(this[cf]=e,this[xa]=0,this[Ii].forEach(t=>{t.length=this[cf](t.value,t.key),this[xa]+=t.length})),Md(this)}get lengthCalculator(){return this[cf]}get length(){return this[xa]}get itemCount(){return this[Ii].length}rforEach(e,t){t=t||this;for(let i=this[Ii].tail;i!==null;){let n=i.prev;jY(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[Ii].head;i!==null;){let n=i.next;jY(this,e,i,t),i=n}}keys(){return this[Ii].toArray().map(e=>e.key)}values(){return this[Ii].toArray().map(e=>e.value)}reset(){this[va]&&this[Ii]&&this[Ii].length&&this[Ii].forEach(e=>this[va](e.key,e.value)),this[zs]=new Map,this[Ii]=new ZEe,this[xa]=0}dump(){return this[Ii].map(e=>wy(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ii]}set(e,t,i){if(i=i||this[Pc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[cf](t,e);if(this[zs].has(e)){if(s>this[xc])return uf(this,this[zs].get(e)),!1;let l=this[zs].get(e).value;return this[va]&&(this[YY]||this[va](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[xa]+=s-l.length,l.length=s,this.get(e),Md(this),!0}let o=new cx(e,t,s,n,i);return o.length>this[xc]?(this[va]&&this[va](e,t),!1):(this[xa]+=o.length,this[Ii].unshift(o),this[zs].set(e,this[Ii].head),Md(this),!0)}has(e){if(!this[zs].has(e))return!1;let t=this[zs].get(e).value;return!wy(this,t)}get(e){return Ax(this,e,!0)}peek(e){return Ax(this,e,!1)}pop(){let e=this[Ii].tail;return e?(uf(this,e),e.value):null}del(e){uf(this,this[zs].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[zs].forEach((e,t)=>Ax(this,t,!1))}},Ax=(r,e,t)=>{let i=r[zs].get(e);if(i){let n=i.value;if(wy(r,n)){if(uf(r,i),!r[Kd])return}else t&&(r[qY]&&(i.value.now=Date.now()),r[Ii].unshiftNode(i));return n.value}},wy=(r,e)=>{if(!e||!e.maxAge&&!r[Pc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Pc]&&t>r[Pc]},Md=r=>{if(r[xa]>r[xc])for(let e=r[Ii].tail;r[xa]>r[xc]&&e!==null;){let t=e.prev;uf(r,e),e=t}},uf=(r,e)=>{if(e){let t=e.value;r[va]&&r[va](t.key,t.value),r[xa]-=t.length,r[zs].delete(t.key),r[Ii].removeNode(e)}},cx=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},jY=(r,e,t,i)=>{let n=t.value;wy(r,n)&&(uf(r,t),r[Kd]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};JY.exports=lx});var as=y((Eet,_Y)=>{var Dc=class{constructor(e,t){if(t=eIe(t),e instanceof Dc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Dc(e.raw,t);if(e instanceof ux)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!VY(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&sIe(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=zY.get(i);if(n)return n;let s=this.options.loose,o=s?Mi[bi.HYPHENRANGELOOSE]:Mi[bi.HYPHENRANGE];e=e.replace(o,pIe(this.options.includePrerelease)),jr("hyphen replace",e),e=e.replace(Mi[bi.COMPARATORTRIM],rIe),jr("comparator trim",e,Mi[bi.COMPARATORTRIM]),e=e.replace(Mi[bi.TILDETRIM],iIe),e=e.replace(Mi[bi.CARETTRIM],nIe),e=e.split(/\s+/).join(" ");let a=s?Mi[bi.COMPARATORLOOSE]:Mi[bi.COMPARATOR],l=e.split(" ").map(f=>oIe(f,this.options)).join(" ").split(/\s+/).map(f=>hIe(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new ux(f,this.options)),c=l.length,u=new Map;for(let f of l){if(VY(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return zY.set(i,g),g}intersects(e,t){if(!(e instanceof Dc))throw new TypeError("a Range is required");return this.set.some(i=>XY(i,t)&&e.set.some(n=>XY(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new tIe(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",sIe=r=>r.value==="",XY=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},oIe=(r,e)=>(jr("comp",r,e),r=lIe(r,e),jr("caret",r),r=aIe(r,e),jr("tildes",r),r=uIe(r,e),jr("xrange",r),r=fIe(r,e),jr("stars",r),r),Xi=r=>!r||r.toLowerCase()==="x"||r==="*",aIe=(r,e)=>r.trim().split(/\s+/).map(t=>AIe(t,e)).join(" "),AIe=(r,e)=>{let t=e.loose?Mi[bi.TILDELOOSE]:Mi[bi.TILDE];return r.replace(t,(i,n,s,o,a)=>{jr("tilde",r,i,n,s,o,a);let l;return Xi(n)?l="":Xi(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Xi(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(jr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,jr("tilde return",l),l})},lIe=(r,e)=>r.trim().split(/\s+/).map(t=>cIe(t,e)).join(" "),cIe=(r,e)=>{jr("caret",r,e);let t=e.loose?Mi[bi.CARETLOOSE]:Mi[bi.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{jr("caret",r,n,s,o,a,l);let c;return Xi(s)?c="":Xi(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Xi(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(jr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(jr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),jr("caret return",c),c})},uIe=(r,e)=>(jr("replaceXRanges",r,e),r.split(/\s+/).map(t=>gIe(t,e)).join(" ")),gIe=(r,e)=>{r=r.trim();let t=e.loose?Mi[bi.XRANGELOOSE]:Mi[bi.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{jr("xRange",r,i,n,s,o,a,l);let c=Xi(s),u=c||Xi(o),g=u||Xi(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),jr("xRange return",i),i})},fIe=(r,e)=>(jr("replaceStars",r,e),r.trim().replace(Mi[bi.STAR],"")),hIe=(r,e)=>(jr("replaceGTE0",r,e),r.trim().replace(Mi[e.includePrerelease?bi.GTE0PRE:bi.GTE0],"")),pIe=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>(Xi(i)?t="":Xi(n)?t=`>=${i}.0.0${r?"-0":""}`:Xi(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Xi(c)?l="":Xi(u)?l=`<${+c+1}.0.0-0`:Xi(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),dIe=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Ud=y((Iet,rj)=>{var Hd=Symbol("SemVer ANY"),gf=class{static get ANY(){return Hd}constructor(e,t){if(t=CIe(t),e instanceof gf){if(e.loose===!!t.loose)return e;e=e.value}fx("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Hd?this.value="":this.value=this.operator+this.semver.version,fx("comp",this)}parse(e){let t=this.options.loose?ZY[$Y.COMPARATORLOOSE]:ZY[$Y.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new ej(i[2],this.options.loose):this.semver=Hd}toString(){return this.value}test(e){if(fx("Comparator.test",e,this.options.loose),this.semver===Hd||e===Hd)return!0;if(typeof e=="string")try{e=new ej(e,this.options)}catch{return!1}return gx(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof gf))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new tj(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new tj(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=gx(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=gx(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};rj.exports=gf;var CIe=Nd(),{re:ZY,t:$Y}=bc(),gx=ox(),fx=Fd(),ej=Oi(),tj=as()});var Gd=y((yet,ij)=>{var mIe=as(),EIe=(r,e,t)=>{try{e=new mIe(e,t)}catch{return!1}return e.test(r)};ij.exports=EIe});var sj=y((wet,nj)=>{var IIe=as(),yIe=(r,e)=>new IIe(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));nj.exports=yIe});var aj=y((Bet,oj)=>{var wIe=Oi(),BIe=as(),QIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new BIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new wIe(i,t))}),i};oj.exports=QIe});var lj=y((Qet,Aj)=>{var bIe=Oi(),SIe=as(),vIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new SIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new bIe(i,t))}),i};Aj.exports=vIe});var gj=y((bet,uj)=>{var hx=Oi(),xIe=as(),cj=Td(),PIe=(r,e)=>{r=new xIe(r,e);let t=new hx("0.0.0");if(r.test(t)||(t=new hx("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new hx(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||cj(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||cj(t,s))&&(t=s)}return t&&r.test(t)?t:null};uj.exports=PIe});var hj=y((vet,fj)=>{var DIe=as(),kIe=(r,e)=>{try{return new DIe(r,e).range||"*"}catch{return null}};fj.exports=kIe});var By=y((xet,mj)=>{var RIe=Oi(),Cj=Ud(),{ANY:FIe}=Cj,NIe=as(),LIe=Gd(),pj=Td(),dj=Cy(),TIe=Ey(),OIe=my(),MIe=(r,e,t,i)=>{r=new RIe(r,i),e=new NIe(e,i);let n,s,o,a,l;switch(t){case">":n=pj,s=TIe,o=dj,a=">",l=">=";break;case"<":n=dj,s=OIe,o=pj,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(LIe(r,e,i))return!1;for(let c=0;c{h.semver===FIe&&(h=new Cj(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};mj.exports=MIe});var Ij=y((Pet,Ej)=>{var KIe=By(),UIe=(r,e,t)=>KIe(r,e,">",t);Ej.exports=UIe});var wj=y((Det,yj)=>{var HIe=By(),GIe=(r,e,t)=>HIe(r,e,"<",t);yj.exports=GIe});var bj=y((ket,Qj)=>{var Bj=as(),YIe=(r,e,t)=>(r=new Bj(r,t),e=new Bj(e,t),r.intersects(e));Qj.exports=YIe});var vj=y((Ret,Sj)=>{var jIe=Gd(),qIe=os();Sj.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>qIe(u,g,t));for(let u of o)jIe(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var xj=as(),Qy=Ud(),{ANY:px}=Qy,Yd=Gd(),dx=os(),JIe=(r,e,t={})=>{if(r===e)return!0;r=new xj(r,t),e=new xj(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=WIe(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},WIe=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===px){if(e.length===1&&e[0].semver===px)return!0;t.includePrerelease?r=[new Qy(">=0.0.0-0")]:r=[new Qy(">=0.0.0")]}if(e.length===1&&e[0].semver===px){if(t.includePrerelease)return!0;e=[new Qy(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=Pj(n,h,t):h.operator==="<"||h.operator==="<="?s=Dj(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=dx(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!Yd(h,String(n),t)||s&&!Yd(h,String(s),t))return null;for(let p of e)if(!Yd(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=Pj(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!Yd(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=Dj(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!Yd(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},Pj=(r,e,t)=>{if(!r)return e;let i=dx(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},Dj=(r,e,t)=>{if(!r)return e;let i=dx(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};kj.exports=JIe});var $r=y((Net,Fj)=>{var Cx=bc();Fj.exports={re:Cx.re,src:Cx.src,tokens:Cx.t,SEMVER_SPEC_VERSION:Rd().SEMVER_SPEC_VERSION,SemVer:Oi(),compareIdentifiers:gy().compareIdentifiers,rcompareIdentifiers:gy().rcompareIdentifiers,parse:Sc(),valid:iY(),clean:sY(),inc:aY(),diff:fY(),major:pY(),minor:CY(),patch:EY(),prerelease:yY(),compare:os(),rcompare:BY(),compareLoose:bY(),compareBuild:dy(),sort:PY(),rsort:kY(),gt:Td(),lt:Cy(),eq:py(),neq:sx(),gte:my(),lte:Ey(),cmp:ox(),coerce:KY(),Comparator:Ud(),Range:as(),satisfies:Gd(),toComparators:sj(),maxSatisfying:aj(),minSatisfying:lj(),minVersion:gj(),validRange:hj(),outside:By(),gtr:Ij(),ltr:wj(),intersects:bj(),simplifyRange:vj(),subset:Rj()}});var mx=y(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});by.VERSION=void 0;by.VERSION="9.1.0"});var Gt=y((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof Sy=="object"&&Sy.exports?Sy.exports=e():r.regexpToAst=e()})(typeof self<"u"?self:Nj,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var C=this.disjunction();this.consumeChar("/");for(var w={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(w,"global");break;case"i":o(w,"ignoreCase");break;case"m":o(w,"multiLine");break;case"u":o(w,"unicode");break;case"y":o(w,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:w,value:C,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],C=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(C)}},r.prototype.alternative=function(){for(var p=[],C=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(C)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var C;switch(this.popChar()){case"=":C="Lookahead";break;case"!":C="NegativeLookahead";break}a(C);var w=this.disjunction();return this.consumeChar(")"),{type:C,value:w,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var C,w=this.idx;switch(this.popChar()){case"*":C={atLeast:0,atMost:1/0};break;case"+":C={atLeast:1,atMost:1/0};break;case"?":C={atLeast:0,atMost:1};break;case"{":var B=this.integerIncludingZero();switch(this.popChar()){case"}":C={atLeast:B,atMost:B};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),C={atLeast:B,atMost:v}):C={atLeast:B,atMost:1/0},this.consumeChar("}");break}if(p===!0&&C===void 0)return;a(C);break}if(!(p===!0&&C===void 0))return a(C),this.peekChar(0)==="?"?(this.consumeChar("?"),C.greedy=!1):C.greedy=!0,C.type="Quantifier",C.loc=this.loc(w),C},r.prototype.atom=function(){var p,C=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(C),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` +`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,C=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,C=!0;break;case"s":p=f;break;case"S":p=f,C=!0;break;case"w":p=g;break;case"W":p=g,C=!0;break}return a(p),{type:"Set",value:p,complement:C}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` +`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var C=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:C}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],C=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),C=!0);this.isClassAtom();){var w=this.classAtom(),B=w.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,C){p.length!==void 0?p.forEach(function(w){C.push(w)}):C.push(p)}function o(p,C){if(p[C]===!0)throw"duplicate flag "+C;p[C]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` +`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var C in p){var w=p[C];p.hasOwnProperty(C)&&(w.type!==void 0?this.visit(w):Array.isArray(w)&&w.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var Py=y(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.clearRegExpParserCache=ff.getRegExpAst=void 0;var zIe=vy(),xy={},VIe=new zIe.RegExpParser;function XIe(r){var e=r.toString();if(xy.hasOwnProperty(e))return xy[e];var t=VIe.pattern(e);return xy[e]=t,t}ff.getRegExpAst=XIe;function _Ie(){xy={}}ff.clearRegExpParserCache=_Ie});var Kj=y(dn=>{"use strict";var ZIe=dn&&dn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dn,"__esModule",{value:!0});dn.canMatchCharCode=dn.firstCharOptimizedIndices=dn.getOptimizedStartCodesIndices=dn.failedOptimizationPrefixMsg=void 0;var Tj=vy(),As=Gt(),Oj=Py(),Pa=Ix(),Mj="Complement Sets are not supported for first char optimization";dn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: +`;function $Ie(r,e){e===void 0&&(e=!1);try{var t=(0,Oj.getRegExpAst)(r),i=ky(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===Mj)e&&(0,As.PRINT_WARNING)(""+dn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > +`)+` Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,As.PRINT_ERROR)(dn.failedOptimizationPrefixMsg+` +`+(" Failed parsing: < "+r.toString()+` > +`)+(" Using the regexp-to-ast library version: "+Tj.VERSION+` +`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}dn.getOptimizedStartCodesIndices=$Ie;function ky(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=Pa.minOptimizationVal)for(var f=u.from>=Pa.minOptimizationVal?u.from:Pa.minOptimizationVal,h=u.to,p=(0,Pa.charCodeToOptimizedIndex)(f),C=(0,Pa.charCodeToOptimizedIndex)(h),w=p;w<=C;w++)e[w]=w}}});break;case"Group":ky(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&Ex(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,As.values)(e)}dn.firstCharOptimizedIndices=ky;function Dy(r,e,t){var i=(0,Pa.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&eye(r,e)}function eye(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,Pa.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,Pa.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function Lj(r,e){return(0,As.find)(r.value,function(t){if(typeof t=="number")return(0,As.contains)(e,t);var i=t;return(0,As.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function Ex(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,As.isArray)(r.value)?(0,As.every)(r.value,Ex):Ex(r.value):!1}var tye=function(r){ZIe(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,As.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?Lj(t,this.targetCharCodes)===void 0&&(this.found=!0):Lj(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(Tj.BaseRegExpVisitor);function rye(r,e){if(e instanceof RegExp){var t=(0,Oj.getRegExpAst)(e),i=new tye(r);return i.visit(t),i.found}else return(0,As.find)(e,function(n){return(0,As.contains)(r,n.charCodeAt(0))})!==void 0}dn.canMatchCharCode=rye});var Ix=y(Je=>{"use strict";var Uj=Je&&Je.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Je,"__esModule",{value:!0});Je.charCodeToOptimizedIndex=Je.minOptimizationVal=Je.buildLineBreakIssueMessage=Je.LineTerminatorOptimizedTester=Je.isShortPattern=Je.isCustomPattern=Je.cloneEmptyGroups=Je.performWarningRuntimeChecks=Je.performRuntimeChecks=Je.addStickyFlag=Je.addStartOfInput=Je.findUnreachablePatterns=Je.findModesThatDoNotExist=Je.findInvalidGroupType=Je.findDuplicatePatterns=Je.findUnsupportedFlags=Je.findStartOfInputAnchor=Je.findEmptyMatchRegExps=Je.findEndOfInputAnchor=Je.findInvalidPatterns=Je.findMissingPatterns=Je.validatePatterns=Je.analyzeTokenTypes=Je.enableSticky=Je.disableSticky=Je.SUPPORT_STICKY=Je.MODES=Je.DEFAULT_MODE=void 0;var Hj=vy(),ir=jd(),Se=Gt(),hf=Kj(),Gj=Py(),Do="PATTERN";Je.DEFAULT_MODE="defaultMode";Je.MODES="modes";Je.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function iye(){Je.SUPPORT_STICKY=!1}Je.disableSticky=iye;function nye(){Je.SUPPORT_STICKY=!0}Je.enableSticky=nye;function sye(r,e){e=(0,Se.defaults)(e,{useSticky:Je.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:function(v,D){return D()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){pye()});var i;t("Reject Lexer.NA",function(){i=(0,Se.reject)(r,function(v){return v[Do]===ir.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,Se.map)(i,function(v){var D=v[Do];if((0,Se.isRegExp)(D)){var L=D.source;return L.length===1&&L!=="^"&&L!=="$"&&L!=="."&&!D.ignoreCase?L:L.length===2&&L[0]==="\\"&&!(0,Se.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],L[1])?L[1]:e.useSticky?Bx(D):wx(D)}else{if((0,Se.isFunction)(D))return n=!0,{exec:D};if((0,Se.has)(D,"exec"))return n=!0,D;if(typeof D=="string"){if(D.length===1)return D;var H=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(H);return e.useSticky?Bx(j):wx(j)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,Se.map)(i,function(v){return v.tokenTypeIdx}),a=(0,Se.map)(i,function(v){var D=v.GROUP;if(D!==ir.Lexer.SKIPPED){if((0,Se.isString)(D))return D;if((0,Se.isUndefined)(D))return!1;throw Error("non exhaustive match")}}),l=(0,Se.map)(i,function(v){var D=v.LONGER_ALT;if(D){var L=(0,Se.isArray)(D)?(0,Se.map)(D,function(H){return(0,Se.indexOf)(i,H)}):[(0,Se.indexOf)(i,D)];return L}}),c=(0,Se.map)(i,function(v){return v.PUSH_MODE}),u=(0,Se.map)(i,function(v){return(0,Se.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=rq(e.lineTerminatorCharacters);g=(0,Se.map)(i,function(D){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,Se.map)(i,function(D){if((0,Se.has)(D,"LINE_BREAKS"))return D.LINE_BREAKS;if(eq(D,v)===!1)return(0,hf.canMatchCharCode)(v,D.PATTERN)}))});var f,h,p,C;t("Misc Mapping #2",function(){f=(0,Se.map)(i,bx),h=(0,Se.map)(s,$j),p=(0,Se.reduce)(i,function(v,D){var L=D.GROUP;return(0,Se.isString)(L)&&L!==ir.Lexer.SKIPPED&&(v[L]=[]),v},{}),C=(0,Se.map)(s,function(v,D){return{pattern:s[D],longerAlt:l[D],canLineTerminator:g[D],isCustom:f[D],short:h[D],group:a[D],push:c[D],pop:u[D],tokenTypeIdx:o[D],tokenType:i[D]}})});var w=!0,B=[];return e.safeMode||t("First Char Optimization",function(){B=(0,Se.reduce)(i,function(v,D,L){if(typeof D.PATTERN=="string"){var H=D.PATTERN.charCodeAt(0),j=Qx(H);yx(v,j,C[L])}else if((0,Se.isArray)(D.START_CHARS_HINT)){var $;(0,Se.forEach)(D.START_CHARS_HINT,function(W){var Z=typeof W=="string"?W.charCodeAt(0):W,A=Qx(Z);$!==A&&($=A,yx(v,A,C[L]))})}else if((0,Se.isRegExp)(D.PATTERN))if(D.PATTERN.unicode)w=!1,e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+hf.failedOptimizationPrefixMsg+(" Unable to analyze < "+D.PATTERN.toString()+` > pattern. +`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var V=(0,hf.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,Se.isEmpty)(V)&&(w=!1),(0,Se.forEach)(V,function(W){yx(v,W,C[L])})}else e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+hf.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing parameter. +`)+` This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),w=!1;return v},[])}),t("ArrayPacking",function(){B=(0,Se.packArray)(B)}),{emptyGroups:p,patternIdxToConfig:C,charCodeToPatternIdxToConfig:B,hasCustom:n,canBeOptimized:w}}Je.analyzeTokenTypes=sye;function oye(r,e){var t=[],i=Yj(r);t=t.concat(i.errors);var n=jj(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(aye(s)),t=t.concat(Xj(s)),t=t.concat(_j(s,e)),t=t.concat(Zj(s)),t}Je.validatePatterns=oye;function aye(r){var e=[],t=(0,Se.filter)(r,function(i){return(0,Se.isRegExp)(i[Do])});return e=e.concat(qj(t)),e=e.concat(Wj(t)),e=e.concat(zj(t)),e=e.concat(Vj(t)),e=e.concat(Jj(t)),e}function Yj(r){var e=(0,Se.filter)(r,function(n){return!(0,Se.has)(n,Do)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:ir.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findMissingPatterns=Yj;function jj(r){var e=(0,Se.filter)(r,function(n){var s=n[Do];return!(0,Se.isRegExp)(s)&&!(0,Se.isFunction)(s)&&!(0,Se.has)(s,"exec")&&!(0,Se.isString)(s)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ir.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findInvalidPatterns=jj;var Aye=/[^\\][\$]/;function qj(r){var e=function(n){Uj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(Hj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Do];try{var o=(0,Gj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return Aye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findEndOfInputAnchor=qj;function Jj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n.test("")}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:ir.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Je.findEmptyMatchRegExps=Jj;var lye=/[^\\[][\^]|^\^/;function Wj(r){var e=function(n){Uj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(Hj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Do];try{var o=(0,Gj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return lye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: + Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findStartOfInputAnchor=Wj;function zj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Je.findUnsupportedFlags=zj;function Vj(r){var e=[],t=(0,Se.map)(r,function(s){return(0,Se.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,Se.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,Se.compact)(t);var i=(0,Se.filter)(t,function(s){return s.length>1}),n=(0,Se.map)(i,function(s){var o=(0,Se.map)(s,function(l){return l.name}),a=(0,Se.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Je.findDuplicatePatterns=Vj;function Xj(r){var e=(0,Se.filter)(r,function(i){if(!(0,Se.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,Se.isString)(n)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Je.findInvalidGroupType=Xj;function _j(r,e){var t=(0,Se.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,Se.contains)(e,n.PUSH_MODE)}),i=(0,Se.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Je.findModesThatDoNotExist=_j;function Zj(r){var e=[],t=(0,Se.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,Se.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,Se.isRegExp)(o)&&uye(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,Se.forEach)(r,function(i,n){(0,Se.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ir.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Je.findUnreachablePatterns=Zj;function cye(r,e){if((0,Se.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,Se.isFunction)(e))return e(r,0,[],{});if((0,Se.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function uye(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,Se.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function wx(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Je.addStartOfInput=wx;function Bx(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Je.addStickyFlag=Bx;function gye(r,e,t){var i=[];return(0,Se.has)(r,Je.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.DEFAULT_MODE+`> property in its definition +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Se.has)(r,Je.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.MODES+`> property in its definition +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Se.has)(r,Je.MODES)&&(0,Se.has)(r,Je.DEFAULT_MODE)&&!(0,Se.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Je.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist +`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Se.has)(r,Je.MODES)&&(0,Se.forEach)(r.modes,function(n,s){(0,Se.forEach)(n,function(o,a){(0,Se.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> +`),type:ir.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Je.performRuntimeChecks=gye;function fye(r,e,t){var i=[],n=!1,s=(0,Se.compact)((0,Se.flatten)((0,Se.mapValues)(r.modes,function(l){return l}))),o=(0,Se.reject)(s,function(l){return l[Do]===ir.Lexer.NA}),a=rq(t);return e&&(0,Se.forEach)(o,function(l){var c=eq(l,a);if(c!==!1){var u=tq(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,Se.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,hf.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:ir.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Je.performWarningRuntimeChecks=fye;function hye(r){var e={},t=(0,Se.keys)(r);return(0,Se.forEach)(t,function(i){var n=r[i];if((0,Se.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Je.cloneEmptyGroups=hye;function bx(r){var e=r.PATTERN;if((0,Se.isRegExp)(e))return!1;if((0,Se.isFunction)(e))return!0;if((0,Se.has)(e,"exec"))return!0;if((0,Se.isString)(e))return!1;throw Error("non exhaustive match")}Je.isCustomPattern=bx;function $j(r){return(0,Se.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Je.isShortPattern=$j;Je.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type +`)+(" Root cause: "+e.errMsg+`. +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. +`+(" The problem is in the <"+r.name+`> Token Type +`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Je.buildLineBreakIssueMessage=tq;function rq(r){var e=(0,Se.map)(r,function(t){return(0,Se.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function yx(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Je.minOptimizationVal=256;var Ry=[];function Qx(r){return r255?255+~~(r/255):r}}});var pf=y(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isTokenType=Nt.hasExtendingTokensTypesMapProperty=Nt.hasExtendingTokensTypesProperty=Nt.hasCategoriesProperty=Nt.hasShortKeyProperty=Nt.singleAssignCategoriesToksMap=Nt.assignCategoriesMapProp=Nt.assignCategoriesTokensProp=Nt.assignTokenDefaultProps=Nt.expandCategories=Nt.augmentTokenTypes=Nt.tokenIdxToClass=Nt.tokenShortNameIdx=Nt.tokenStructuredMatcherNoCategories=Nt.tokenStructuredMatcher=void 0;var ei=Gt();function dye(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Nt.tokenStructuredMatcher=dye;function Cye(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Nt.tokenStructuredMatcherNoCategories=Cye;Nt.tokenShortNameIdx=1;Nt.tokenIdxToClass={};function mye(r){var e=iq(r);nq(e),oq(e),sq(e),(0,ei.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Nt.augmentTokenTypes=mye;function iq(r){for(var e=(0,ei.cloneArr)(r),t=r,i=!0;i;){t=(0,ei.compact)((0,ei.flatten)((0,ei.map)(t,function(s){return s.CATEGORIES})));var n=(0,ei.difference)(t,e);e=e.concat(n),(0,ei.isEmpty)(n)?i=!1:t=n}return e}Nt.expandCategories=iq;function nq(r){(0,ei.forEach)(r,function(e){aq(e)||(Nt.tokenIdxToClass[Nt.tokenShortNameIdx]=e,e.tokenTypeIdx=Nt.tokenShortNameIdx++),Sx(e)&&!(0,ei.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Sx(e)||(e.CATEGORIES=[]),Aq(e)||(e.categoryMatches=[]),lq(e)||(e.categoryMatchesMap={})})}Nt.assignTokenDefaultProps=nq;function sq(r){(0,ei.forEach)(r,function(e){e.categoryMatches=[],(0,ei.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Nt.tokenIdxToClass[i].tokenTypeIdx)})})}Nt.assignCategoriesTokensProp=sq;function oq(r){(0,ei.forEach)(r,function(e){vx([],e)})}Nt.assignCategoriesMapProp=oq;function vx(r,e){(0,ei.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,ei.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,ei.contains)(i,t)||vx(i,t)})}Nt.singleAssignCategoriesToksMap=vx;function aq(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.hasShortKeyProperty=aq;function Sx(r){return(0,ei.has)(r,"CATEGORIES")}Nt.hasCategoriesProperty=Sx;function Aq(r){return(0,ei.has)(r,"categoryMatches")}Nt.hasExtendingTokensTypesProperty=Aq;function lq(r){return(0,ei.has)(r,"categoryMatchesMap")}Nt.hasExtendingTokensTypesMapProperty=lq;function Eye(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.isTokenType=Eye});var xx=y(Fy=>{"use strict";Object.defineProperty(Fy,"__esModule",{value:!0});Fy.defaultLexerErrorProvider=void 0;Fy.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var jd=y(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.Lexer=kc.LexerDefinitionErrorType=void 0;var Vs=Ix(),nr=Gt(),Iye=pf(),yye=xx(),wye=Py(),Bye;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(Bye=kc.LexerDefinitionErrorType||(kc.LexerDefinitionErrorType={}));var qd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:yye.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(qd);var Qye=function(){function r(e,t){var i=this;if(t===void 0&&(t=qd),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=(0,nr.merge)(qd,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===qd.lineTerminatorsPattern)i.config.lineTerminatorsPattern=Vs.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===qd.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,nr.isArray)(e)?(s={modes:{}},s.modes[Vs.DEFAULT_MODE]=(0,nr.cloneArr)(e),s[Vs.DEFAULT_MODE]=Vs.DEFAULT_MODE):(o=!1,s=(0,nr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,Vs.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,nr.forEach)(s.modes,function(u,g){s.modes[g]=(0,nr.reject)(u,function(f){return(0,nr.isUndefined)(f)})});var a=(0,nr.keys)(s.modes);if((0,nr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.validatePatterns)(u,a))}),(0,nr.isEmpty)(i.lexerDefinitionErrors)){(0,Iye.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,Vs.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,nr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,nr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,nr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+c)}(0,nr.forEach)(i.lexerDefinitionWarning,function(u){(0,nr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(Vs.SUPPORT_STICKY?(i.chopInput=nr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=nr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=nr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=nr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=nr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,nr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,nr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,wye.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,nr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,nr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,nr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,C,w,B,v,D,L=e,H=L.length,j=0,$=0,V=this.hasCustom?0:Math.floor(e.length/10),W=new Array(V),Z=[],A=this.trackStartLines?1:void 0,ae=this.trackStartLines?1:void 0,ge=(0,Vs.cloneEmptyGroups)(this.emptyGroups),_=this.trackStartLines,T=this.config.lineTerminatorsPattern,N=0,ue=[],we=[],Le=[],Pe=[];Object.freeze(Pe);var Te=void 0;function se(){return ue}function Ae(dr){var Bi=(0,Vs.charCodeToOptimizedIndex)(dr),_n=we[Bi];return _n===void 0?Pe:_n}var Qe=function(dr){if(Le.length===1&&dr.tokenType.PUSH_MODE===void 0){var Bi=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(dr);Z.push({offset:dr.startOffset,line:dr.startLine!==void 0?dr.startLine:void 0,column:dr.startColumn!==void 0?dr.startColumn:void 0,length:dr.image.length,message:Bi})}else{Le.pop();var _n=(0,nr.last)(Le);ue=i.patternIdxToConfig[_n],we=i.charCodeToPatternIdxToConfig[_n],N=ue.length;var ha=i.canModeBeOptimized[_n]&&i.config.safeMode===!1;we&&ha?Te=Ae:Te=se}};function fe(dr){Le.push(dr),we=this.charCodeToPatternIdxToConfig[dr],ue=this.patternIdxToConfig[dr],N=ue.length,N=ue.length;var Bi=this.canModeBeOptimized[dr]&&this.config.safeMode===!1;we&&Bi?Te=Ae:Te=se}fe.call(this,t);for(var le;jc.length){c=a,u=g,le=tt;break}}}break}}if(c!==null){if(f=c.length,h=le.group,h!==void 0&&(p=le.tokenTypeIdx,C=this.createTokenInstance(c,j,p,le.tokenType,A,ae,f),this.handlePayload(C,u),h===!1?$=this.addToken(W,$,C):ge[h].push(C)),e=this.chopInput(e,f),j=j+f,ae=this.computeNewColumn(ae,f),_===!0&&le.canLineTerminator===!0){var It=0,Kr=void 0,oi=void 0;T.lastIndex=0;do Kr=T.test(c),Kr===!0&&(oi=T.lastIndex-1,It++);while(Kr===!0);It!==0&&(A=A+It,ae=f-oi,this.updateTokenEndLineColumnLocation(C,h,oi,It,A,ae,f))}this.handleModes(le,Qe,fe,C)}else{for(var pi=j,pr=A,di=ae,ai=!1;!ai&&j <"+e+">");var n=(0,nr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();kc.Lexer=Qye});var UA=y(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.tokenMatcher=Si.createTokenInstance=Si.EOF=Si.createToken=Si.hasTokenLabel=Si.tokenName=Si.tokenLabel=void 0;var Xs=Gt(),bye=jd(),Px=pf();function Sye(r){return mq(r)?r.LABEL:r.name}Si.tokenLabel=Sye;function vye(r){return r.name}Si.tokenName=vye;function mq(r){return(0,Xs.isString)(r.LABEL)&&r.LABEL!==""}Si.hasTokenLabel=mq;var xye="parent",cq="categories",uq="label",gq="group",fq="push_mode",hq="pop_mode",pq="longer_alt",dq="line_breaks",Cq="start_chars_hint";function Eq(r){return Pye(r)}Si.createToken=Eq;function Pye(r){var e=r.pattern,t={};if(t.name=r.name,(0,Xs.isUndefined)(e)||(t.PATTERN=e),(0,Xs.has)(r,xye))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Xs.has)(r,cq)&&(t.CATEGORIES=r[cq]),(0,Px.augmentTokenTypes)([t]),(0,Xs.has)(r,uq)&&(t.LABEL=r[uq]),(0,Xs.has)(r,gq)&&(t.GROUP=r[gq]),(0,Xs.has)(r,hq)&&(t.POP_MODE=r[hq]),(0,Xs.has)(r,fq)&&(t.PUSH_MODE=r[fq]),(0,Xs.has)(r,pq)&&(t.LONGER_ALT=r[pq]),(0,Xs.has)(r,dq)&&(t.LINE_BREAKS=r[dq]),(0,Xs.has)(r,Cq)&&(t.START_CHARS_HINT=r[Cq]),t}Si.EOF=Eq({name:"EOF",pattern:bye.Lexer.NA});(0,Px.augmentTokenTypes)([Si.EOF]);function Dye(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}Si.createTokenInstance=Dye;function kye(r,e){return(0,Px.tokenStructuredMatcher)(r,e)}Si.tokenMatcher=kye});var Cn=y(Wt=>{"use strict";var Da=Wt&&Wt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.serializeProduction=Wt.serializeGrammar=Wt.Terminal=Wt.Alternation=Wt.RepetitionWithSeparator=Wt.Repetition=Wt.RepetitionMandatoryWithSeparator=Wt.RepetitionMandatory=Wt.Option=Wt.Alternative=Wt.Rule=Wt.NonTerminal=Wt.AbstractProduction=void 0;var lr=Gt(),Rye=UA(),ko=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,lr.forEach)(this.definition,function(t){t.accept(e)})},r}();Wt.AbstractProduction=ko;var Iq=function(r){Da(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(ko);Wt.NonTerminal=Iq;var yq=function(r){Da(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Rule=yq;var wq=function(r){Da(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Alternative=wq;var Bq=function(r){Da(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Option=Bq;var Qq=function(r){Da(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionMandatory=Qq;var bq=function(r){Da(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionMandatoryWithSeparator=bq;var Sq=function(r){Da(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Repetition=Sq;var vq=function(r){Da(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionWithSeparator=vq;var xq=function(r){Da(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(ko);Wt.Alternation=xq;var Ny=function(){function r(e){this.idx=1,(0,lr.assign)(this,(0,lr.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();Wt.Terminal=Ny;function Fye(r){return(0,lr.map)(r,Jd)}Wt.serializeGrammar=Fye;function Jd(r){function e(s){return(0,lr.map)(s,Jd)}if(r instanceof Iq){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,lr.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof wq)return{type:"Alternative",definition:e(r.definition)};if(r instanceof Bq)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof Qq)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof bq)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:Jd(new Ny({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof vq)return{type:"RepetitionWithSeparator",idx:r.idx,separator:Jd(new Ny({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof Sq)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof xq)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof Ny){var i={type:"Terminal",name:r.terminalType.name,label:(0,Rye.tokenLabel)(r.terminalType),idx:r.idx};(0,lr.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,lr.isRegExp)(n)?n.source:n),i}else{if(r instanceof yq)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}Wt.serializeProduction=Jd});var Ty=y(Ly=>{"use strict";Object.defineProperty(Ly,"__esModule",{value:!0});Ly.RestWalker=void 0;var Dx=Gt(),mn=Cn(),Nye=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,Dx.forEach)(e.definition,function(n,s){var o=(0,Dx.drop)(e.definition,s+1);if(n instanceof mn.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof mn.Terminal)i.walkTerminal(n,o,t);else if(n instanceof mn.Alternative)i.walkFlat(n,o,t);else if(n instanceof mn.Option)i.walkOption(n,o,t);else if(n instanceof mn.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof mn.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof mn.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof mn.Repetition)i.walkMany(n,o,t);else if(n instanceof mn.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=Pq(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=Pq(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,Dx.forEach)(e.definition,function(o){var a=new mn.Alternative({definition:[o]});n.walk(a,s)})},r}();Ly.RestWalker=Nye;function Pq(r,e,t){var i=[new mn.Option({definition:[new mn.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var df=y(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});Oy.GAstVisitor=void 0;var Ro=Cn(),Lye=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case Ro.NonTerminal:return this.visitNonTerminal(t);case Ro.Alternative:return this.visitAlternative(t);case Ro.Option:return this.visitOption(t);case Ro.RepetitionMandatory:return this.visitRepetitionMandatory(t);case Ro.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case Ro.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case Ro.Repetition:return this.visitRepetition(t);case Ro.Alternation:return this.visitAlternation(t);case Ro.Terminal:return this.visitTerminal(t);case Ro.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();Oy.GAstVisitor=Lye});var zd=y(Ki=>{"use strict";var Tye=Ki&&Ki.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ki,"__esModule",{value:!0});Ki.collectMethods=Ki.DslMethodsCollectorVisitor=Ki.getProductionDslName=Ki.isBranchingProd=Ki.isOptionalProd=Ki.isSequenceProd=void 0;var Wd=Gt(),Qr=Cn(),Oye=df();function Mye(r){return r instanceof Qr.Alternative||r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionMandatory||r instanceof Qr.RepetitionMandatoryWithSeparator||r instanceof Qr.RepetitionWithSeparator||r instanceof Qr.Terminal||r instanceof Qr.Rule}Ki.isSequenceProd=Mye;function kx(r,e){e===void 0&&(e=[]);var t=r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionWithSeparator;return t?!0:r instanceof Qr.Alternation?(0,Wd.some)(r.definition,function(i){return kx(i,e)}):r instanceof Qr.NonTerminal&&(0,Wd.contains)(e,r)?!1:r instanceof Qr.AbstractProduction?(r instanceof Qr.NonTerminal&&e.push(r),(0,Wd.every)(r.definition,function(i){return kx(i,e)})):!1}Ki.isOptionalProd=kx;function Kye(r){return r instanceof Qr.Alternation}Ki.isBranchingProd=Kye;function Uye(r){if(r instanceof Qr.NonTerminal)return"SUBRULE";if(r instanceof Qr.Option)return"OPTION";if(r instanceof Qr.Alternation)return"OR";if(r instanceof Qr.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof Qr.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof Qr.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof Qr.Repetition)return"MANY";if(r instanceof Qr.Terminal)return"CONSUME";throw Error("non exhaustive match")}Ki.getProductionDslName=Uye;var Dq=function(r){Tye(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Wd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Wd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(Oye.GAstVisitor);Ki.DslMethodsCollectorVisitor=Dq;var My=new Dq;function Hye(r){My.reset(),r.accept(My);var e=My.dslMethods;return My.reset(),e}Ki.collectMethods=Hye});var Fx=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.firstForTerminal=Fo.firstForBranching=Fo.firstForSequence=Fo.first=void 0;var Ky=Gt(),kq=Cn(),Rx=zd();function Uy(r){if(r instanceof kq.NonTerminal)return Uy(r.referencedRule);if(r instanceof kq.Terminal)return Nq(r);if((0,Rx.isSequenceProd)(r))return Rq(r);if((0,Rx.isBranchingProd)(r))return Fq(r);throw Error("non exhaustive match")}Fo.first=Uy;function Rq(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,Rx.isOptionalProd)(s),e=e.concat(Uy(s)),i=i+1,n=t.length>i;return(0,Ky.uniq)(e)}Fo.firstForSequence=Rq;function Fq(r){var e=(0,Ky.map)(r.definition,function(t){return Uy(t)});return(0,Ky.uniq)((0,Ky.flatten)(e))}Fo.firstForBranching=Fq;function Nq(r){return[r.terminalType]}Fo.firstForTerminal=Nq});var Nx=y(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});Hy.IN=void 0;Hy.IN="_~IN~_"});var Kq=y(ls=>{"use strict";var Gye=ls&&ls.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(ls,"__esModule",{value:!0});ls.buildInProdFollowPrefix=ls.buildBetweenProdsFollowPrefix=ls.computeAllProdsFollows=ls.ResyncFollowsWalker=void 0;var Yye=Ty(),jye=Fx(),Lq=Gt(),Tq=Nx(),qye=Cn(),Oq=function(r){Gye(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=Mq(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new qye.Alternative({definition:o}),l=(0,jye.first)(a);this.follows[s]=l},e}(Yye.RestWalker);ls.ResyncFollowsWalker=Oq;function Jye(r){var e={};return(0,Lq.forEach)(r,function(t){var i=new Oq(t).startWalking();(0,Lq.assign)(e,i)}),e}ls.computeAllProdsFollows=Jye;function Mq(r,e){return r.name+e+Tq.IN}ls.buildBetweenProdsFollowPrefix=Mq;function Wye(r){var e=r.terminalType.name;return e+r.idx+Tq.IN}ls.buildInProdFollowPrefix=Wye});var Vd=y(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.defaultGrammarValidatorErrorProvider=ka.defaultGrammarResolverErrorProvider=ka.defaultParserErrorProvider=void 0;var Cf=UA(),zye=Gt(),_s=Gt(),Lx=Cn(),Uq=zd();ka.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,Cf.hasTokenLabel)(e),o=s?"--> "+(0,Cf.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,_s.first)(t).image,l=` +but found: '`+a+"'";if(n)return o+n+l;var c=(0,_s.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,_s.map)(c,function(h){return"["+(0,_s.map)(h,function(p){return(0,Cf.tokenLabel)(p)}).join(", ")+"]"}),g=(0,_s.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: +`+g.join(` +`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,_s.first)(t).image,a=` +but found: '`+o+"'";if(i)return s+i+a;var l=(0,_s.map)(e,function(u){return"["+(0,_s.map)(u,function(g){return(0,Cf.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: + `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(ka.defaultParserErrorProvider);ka.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+r.name+"<-";return t}};ka.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof Lx.Terminal?u.terminalType.name:u instanceof Lx.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,_s.first)(e),s=n.idx,o=(0,Uq.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` + appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` +`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. +`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. +`)+`To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,Cf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix +`+("in inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,Cf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, +`)+("<"+e+`> may appears as a prefix path in all these alternatives. +`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,Uq.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. +This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. +`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: +`+(" inside <"+r.topLevelRule.name+`> Rule. + has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=zye.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. +`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) +`)+(`without consuming any Tokens. The grammar path that causes this is: + `+i+` +`)+` To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Lx.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Yq=y(HA=>{"use strict";var Vye=HA&&HA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(HA,"__esModule",{value:!0});HA.GastRefResolverVisitor=HA.resolveGrammar=void 0;var Xye=Hn(),Hq=Gt(),_ye=df();function Zye(r,e){var t=new Gq(r,e);return t.resolveRefs(),t.errors}HA.resolveGrammar=Zye;var Gq=function(r){Vye(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,Hq.forEach)((0,Hq.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:Xye.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(_ye.GAstVisitor);HA.GastRefResolverVisitor=Gq});var _d=y(Tr=>{"use strict";var Rc=Tr&&Tr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Tr,"__esModule",{value:!0});Tr.nextPossibleTokensAfter=Tr.possiblePathsFrom=Tr.NextTerminalAfterAtLeastOneSepWalker=Tr.NextTerminalAfterAtLeastOneWalker=Tr.NextTerminalAfterManySepWalker=Tr.NextTerminalAfterManyWalker=Tr.AbstractNextTerminalAfterProductionWalker=Tr.NextAfterTokenWalker=Tr.AbstractNextPossibleTokensWalker=void 0;var jq=Ty(),Kt=Gt(),$ye=Fx(),Dt=Cn(),qq=function(r){Rc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Kt.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Kt.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Kt.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(jq.RestWalker);Tr.AbstractNextPossibleTokensWalker=qq;var ewe=function(r){Rc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new Dt.Alternative({definition:s});this.possibleTokTypes=(0,$ye.first)(o),this.found=!0}},e}(qq);Tr.NextAfterTokenWalker=ewe;var Xd=function(r){Rc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(jq.RestWalker);Tr.AbstractNextTerminalAfterProductionWalker=Xd;var twe=function(r){Rc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(Xd);Tr.NextTerminalAfterManyWalker=twe;var rwe=function(r){Rc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(Xd);Tr.NextTerminalAfterManySepWalker=rwe;var iwe=function(r){Rc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(Xd);Tr.NextTerminalAfterAtLeastOneWalker=iwe;var nwe=function(r){Rc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Kt.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(Xd);Tr.NextTerminalAfterAtLeastOneSepWalker=nwe;function Jq(r,e,t){t===void 0&&(t=[]),t=(0,Kt.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Kt.drop)(r,n+1))}function o(c){var u=Jq(s(c),e,t);return i.concat(u)}for(;t.length=0;ge--){var _=B.definition[ge],T={idx:p,def:_.definition.concat((0,Kt.drop)(h)),ruleStack:C,occurrenceStack:w};g.push(T),g.push(o)}else if(B instanceof Dt.Alternative)g.push({idx:p,def:B.definition.concat((0,Kt.drop)(h)),ruleStack:C,occurrenceStack:w});else if(B instanceof Dt.Rule)g.push(owe(B,p,C,w));else throw Error("non exhaustive match")}}return u}Tr.nextPossibleTokensAfter=swe;function owe(r,e,t,i){var n=(0,Kt.cloneArr)(t);n.push(r.name);var s=(0,Kt.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var Zd=y(_t=>{"use strict";var Vq=_t&&_t.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(_t,"__esModule",{value:!0});_t.areTokenCategoriesNotUsed=_t.isStrictPrefixOfPath=_t.containsPath=_t.getLookaheadPathsForOptionalProd=_t.getLookaheadPathsForOr=_t.lookAheadSequenceFromAlternatives=_t.buildSingleAlternativeLookaheadFunction=_t.buildAlternativesLookAheadFunc=_t.buildLookaheadFuncForOptionalProd=_t.buildLookaheadFuncForOr=_t.getProdType=_t.PROD_TYPE=void 0;var sr=Gt(),Wq=_d(),awe=Ty(),Gy=pf(),GA=Cn(),Awe=df(),li;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(li=_t.PROD_TYPE||(_t.PROD_TYPE={}));function lwe(r){if(r instanceof GA.Option)return li.OPTION;if(r instanceof GA.Repetition)return li.REPETITION;if(r instanceof GA.RepetitionMandatory)return li.REPETITION_MANDATORY;if(r instanceof GA.RepetitionMandatoryWithSeparator)return li.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof GA.RepetitionWithSeparator)return li.REPETITION_WITH_SEPARATOR;if(r instanceof GA.Alternation)return li.ALTERNATION;throw Error("non exhaustive match")}_t.getProdType=lwe;function cwe(r,e,t,i,n,s){var o=_q(r,e,t),a=Mx(o)?Gy.tokenStructuredMatcherNoCategories:Gy.tokenStructuredMatcher;return s(o,i,a,n)}_t.buildLookaheadFuncForOr=cwe;function uwe(r,e,t,i,n,s){var o=Zq(r,e,n,t),a=Mx(o)?Gy.tokenStructuredMatcherNoCategories:Gy.tokenStructuredMatcher;return s(o[0],a,i)}_t.buildLookaheadFuncForOptionalProd=uwe;function gwe(r,e,t,i){var n=r.length,s=(0,sr.every)(r,function(l){return(0,sr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,sr.map)(l,function(D){return D.GATE}),u=0;u{"use strict";var Kx=zt&&zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(zt,"__esModule",{value:!0});zt.checkPrefixAlternativesAmbiguities=zt.validateSomeNonEmptyLookaheadPath=zt.validateTooManyAlts=zt.RepetionCollector=zt.validateAmbiguousAlternationAlternatives=zt.validateEmptyOrAlternative=zt.getFirstNoneTerminal=zt.validateNoLeftRecursion=zt.validateRuleIsOverridden=zt.validateRuleDoesNotAlreadyExist=zt.OccurrenceValidationCollector=zt.identifyProductionForDuplicates=zt.validateGrammar=void 0;var er=Gt(),br=Gt(),No=Hn(),Ux=zd(),mf=Zd(),Cwe=_d(),Zs=Cn(),Hx=df();function mwe(r,e,t,i,n){var s=er.map(r,function(h){return Ewe(h,i)}),o=er.map(r,function(h){return Gx(h,h,i)}),a=[],l=[],c=[];(0,br.every)(o,br.isEmpty)&&(a=(0,br.map)(r,function(h){return nJ(h,i)}),l=(0,br.map)(r,function(h){return sJ(h,e,i)}),c=AJ(r,e,i));var u=wwe(r,t,i),g=(0,br.map)(r,function(h){return aJ(h,i)}),f=(0,br.map)(r,function(h){return iJ(h,r,n,i)});return er.flatten(s.concat(c,o,a,l,u,g,f))}zt.validateGrammar=mwe;function Ewe(r,e){var t=new rJ;r.accept(t);var i=t.allProductions,n=er.groupBy(i,eJ),s=er.pick(n,function(a){return a.length>1}),o=er.map(er.values(s),function(a){var l=er.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,Ux.getProductionDslName)(l),g={message:c,type:No.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=tJ(l);return f&&(g.parameter=f),g});return o}function eJ(r){return(0,Ux.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+tJ(r)}zt.identifyProductionForDuplicates=eJ;function tJ(r){return r instanceof Zs.Terminal?r.terminalType.name:r instanceof Zs.NonTerminal?r.nonTerminalName:""}var rJ=function(r){Kx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(Hx.GAstVisitor);zt.OccurrenceValidationCollector=rJ;function iJ(r,e,t,i){var n=[],s=(0,br.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:No.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}zt.validateRuleDoesNotAlreadyExist=iJ;function Iwe(r,e,t){var i=[],n;return er.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:No.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}zt.validateRuleIsOverridden=Iwe;function Gx(r,e,t,i){i===void 0&&(i=[]);var n=[],s=$d(e.definition);if(er.isEmpty(s))return[];var o=r.name,a=er.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:No.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=er.difference(s,i.concat([r])),c=er.map(l,function(u){var g=er.cloneArr(i);return g.push(u),Gx(r,u,t,g)});return n.concat(er.flatten(c))}zt.validateNoLeftRecursion=Gx;function $d(r){var e=[];if(er.isEmpty(r))return e;var t=er.first(r);if(t instanceof Zs.NonTerminal)e.push(t.referencedRule);else if(t instanceof Zs.Alternative||t instanceof Zs.Option||t instanceof Zs.RepetitionMandatory||t instanceof Zs.RepetitionMandatoryWithSeparator||t instanceof Zs.RepetitionWithSeparator||t instanceof Zs.Repetition)e=e.concat($d(t.definition));else if(t instanceof Zs.Alternation)e=er.flatten(er.map(t.definition,function(o){return $d(o.definition)}));else if(!(t instanceof Zs.Terminal))throw Error("non exhaustive match");var i=(0,Ux.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=er.drop(r);return e.concat($d(s))}else return e}zt.getFirstNoneTerminal=$d;var Yx=function(r){Kx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(Hx.GAstVisitor);function nJ(r,e){var t=new Yx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){var a=er.dropRight(o.definition),l=er.map(a,function(c,u){var g=(0,Cwe.nextPossibleTokensAfter)([c],[],null,1);return er.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:No.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(er.compact(l))},[]);return n}zt.validateEmptyOrAlternative=nJ;function sJ(r,e,t){var i=new Yx;r.accept(i);var n=i.alternations;n=(0,br.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=er.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,mf.getLookaheadPathsForOr)(l,r,c,a),g=ywe(u,a,r,t),f=lJ(u,a,r,t);return o.concat(g,f)},[]);return s}zt.validateAmbiguousAlternationAlternatives=sJ;var oJ=function(r){Kx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(Hx.GAstVisitor);zt.RepetionCollector=oJ;function aJ(r,e){var t=new Yx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:No.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}zt.validateTooManyAlts=aJ;function AJ(r,e,t){var i=[];return(0,br.forEach)(r,function(n){var s=new oJ;n.accept(s);var o=s.allProductions;(0,br.forEach)(o,function(a){var l=(0,mf.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,mf.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,br.isEmpty)((0,br.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:No.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}zt.validateSomeNonEmptyLookaheadPath=AJ;function ywe(r,e,t,i){var n=[],s=(0,br.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,br.forEach)(l,function(u){var g=[c];(0,br.forEach)(r,function(f,h){c!==h&&(0,mf.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,mf.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=er.map(s,function(a){var l=(0,br.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:No.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function lJ(r,e,t,i){var n=[],s=(0,br.reduce)(r,function(o,a,l){var c=(0,br.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,br.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,br.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.validateGrammar=Ef.resolveGrammar=void 0;var qx=Gt(),Bwe=Yq(),Qwe=jx(),cJ=Vd();function bwe(r){r=(0,qx.defaults)(r,{errMsgProvider:cJ.defaultGrammarResolverErrorProvider});var e={};return(0,qx.forEach)(r.rules,function(t){e[t.name]=t}),(0,Bwe.resolveGrammar)(e,r.errMsgProvider)}Ef.resolveGrammar=bwe;function Swe(r){return r=(0,qx.defaults)(r,{errMsgProvider:cJ.defaultGrammarValidatorErrorProvider}),(0,Qwe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}Ef.validateGrammar=Swe});var If=y(En=>{"use strict";var eC=En&&En.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(En,"__esModule",{value:!0});En.EarlyExitException=En.NotAllInputParsedException=En.NoViableAltException=En.MismatchedTokenException=En.isRecognitionException=void 0;var vwe=Gt(),gJ="MismatchedTokenException",fJ="NoViableAltException",hJ="EarlyExitException",pJ="NotAllInputParsedException",dJ=[gJ,fJ,hJ,pJ];Object.freeze(dJ);function xwe(r){return(0,vwe.contains)(dJ,r.name)}En.isRecognitionException=xwe;var Yy=function(r){eC(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),Pwe=function(r){eC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=gJ,s}return e}(Yy);En.MismatchedTokenException=Pwe;var Dwe=function(r){eC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=fJ,s}return e}(Yy);En.NoViableAltException=Dwe;var kwe=function(r){eC(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=pJ,n}return e}(Yy);En.NotAllInputParsedException=kwe;var Rwe=function(r){eC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=hJ,s}return e}(Yy);En.EarlyExitException=Rwe});var Wx=y(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.attemptInRepetitionRecovery=Ui.Recoverable=Ui.InRuleRecoveryException=Ui.IN_RULE_RECOVERY_EXCEPTION=Ui.EOF_FOLLOW_KEY=void 0;var jy=UA(),cs=Gt(),Fwe=If(),Nwe=Nx(),Lwe=Hn();Ui.EOF_FOLLOW_KEY={};Ui.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function Jx(r){this.name=Ui.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Ui.InRuleRecoveryException=Jx;Jx.prototype=Error.prototype;var Twe=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,cs.has)(e,"recoveryEnabled")?e.recoveryEnabled:Lwe.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=CJ)},r.prototype.getTokenToInsert=function(e){var t=(0,jy.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),C=new Fwe.MismatchedTokenException(p,u,s.LA(0));C.resyncedTokens=(0,cs.dropRight)(l),s.SAVE_ERROR(C)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new Jx("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,cs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,cs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,cs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,cs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ui.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,cs.map)(t,function(n,s){return s===0?Ui.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,cs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,cs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Ui.EOF_FOLLOW_KEY)return[jy.EOF];var t=e.ruleName+e.idxInCallingRule+Nwe.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,jy.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,cs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,cs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,cs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Ui.Recoverable=Twe;function CJ(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=jy.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Ui.attemptInRepetitionRecovery=CJ});var qy=y(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.getKeyForAutomaticLookahead=qt.AT_LEAST_ONE_SEP_IDX=qt.MANY_SEP_IDX=qt.AT_LEAST_ONE_IDX=qt.MANY_IDX=qt.OPTION_IDX=qt.OR_IDX=qt.BITS_FOR_ALT_IDX=qt.BITS_FOR_RULE_IDX=qt.BITS_FOR_OCCURRENCE_IDX=qt.BITS_FOR_METHOD_TYPE=void 0;qt.BITS_FOR_METHOD_TYPE=4;qt.BITS_FOR_OCCURRENCE_IDX=8;qt.BITS_FOR_RULE_IDX=12;qt.BITS_FOR_ALT_IDX=8;qt.OR_IDX=1<{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});Jy.LooksAhead=void 0;var Ra=Zd(),$s=Gt(),mJ=Hn(),Fa=qy(),Fc=zd(),Mwe=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,$s.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:mJ.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,$s.has)(e,"maxLookahead")?e.maxLookahead:mJ.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,$s.isES2015MapSupported)()?new Map:[],(0,$s.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,$s.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Fc.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,$s.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,Fc.getProductionDslName)(g)+f,function(){var h=(0,Ra.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,Fa.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],Fa.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,$s.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,Fa.MANY_IDX,Ra.PROD_TYPE.REPETITION,g.maxLookahead,(0,Fc.getProductionDslName)(g))}),(0,$s.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,Fa.OPTION_IDX,Ra.PROD_TYPE.OPTION,g.maxLookahead,(0,Fc.getProductionDslName)(g))}),(0,$s.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,Fa.AT_LEAST_ONE_IDX,Ra.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Fc.getProductionDslName)(g))}),(0,$s.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,Fa.AT_LEAST_ONE_SEP_IDX,Ra.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Fc.getProductionDslName)(g))}),(0,$s.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,Fa.MANY_SEP_IDX,Ra.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Fc.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,Ra.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,Fa.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,Ra.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,Ra.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,Fa.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();Jy.LooksAhead=Mwe});var IJ=y(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});Lo.addNoneTerminalToCst=Lo.addTerminalToCst=Lo.setNodeLocationFull=Lo.setNodeLocationOnlyOffset=void 0;function Kwe(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(YA,"__esModule",{value:!0});YA.defineNameProp=YA.functionName=YA.classNameFromInstance=void 0;var Ywe=Gt();function jwe(r){return wJ(r.constructor)}YA.classNameFromInstance=jwe;var yJ="name";function wJ(r){var e=r.name;return e||"anonymous"}YA.functionName=wJ;function qwe(r,e){var t=Object.getOwnPropertyDescriptor(r,yJ);return(0,Ywe.isUndefined)(t)||t.configurable?(Object.defineProperty(r,yJ,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}YA.defineNameProp=qwe});var vJ=y(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.validateRedundantMethods=vi.validateMissingCstMethods=vi.validateVisitor=vi.CstVisitorDefinitionError=vi.createBaseVisitorConstructorWithDefaults=vi.createBaseSemanticVisitorConstructor=vi.defaultVisit=void 0;var us=Gt(),tC=zx();function BJ(r,e){for(var t=(0,us.keys)(r),i=t.length,n=0;n: + `+(""+s.join(` + +`).replace(/\n/g,` + `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}vi.createBaseSemanticVisitorConstructor=Jwe;function Wwe(r,e,t){var i=function(){};(0,tC.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,us.forEach)(e,function(s){n[s]=BJ}),i.prototype=n,i.prototype.constructor=i,i}vi.createBaseVisitorConstructorWithDefaults=Wwe;var Vx;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(Vx=vi.CstVisitorDefinitionError||(vi.CstVisitorDefinitionError={}));function QJ(r,e){var t=bJ(r,e),i=SJ(r,e);return t.concat(i)}vi.validateVisitor=QJ;function bJ(r,e){var t=(0,us.map)(e,function(i){if(!(0,us.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,tC.functionName)(r.constructor)+" CST Visitor.",type:Vx.MISSING_METHOD,methodName:i}});return(0,us.compact)(t)}vi.validateMissingCstMethods=bJ;var zwe=["constructor","visit","validateVisitor"];function SJ(r,e){var t=[];for(var i in r)(0,us.isFunction)(r[i])&&!(0,us.contains)(zwe,i)&&!(0,us.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,tC.functionName)(r.constructor)+` CST Visitor +There is no Grammar Rule corresponding to this method's name. +`,type:Vx.REDUNDANT_METHOD,methodName:i});return t}vi.validateRedundantMethods=SJ});var PJ=y(Wy=>{"use strict";Object.defineProperty(Wy,"__esModule",{value:!0});Wy.TreeBuilder=void 0;var yf=IJ(),ti=Gt(),xJ=vJ(),Vwe=Hn(),Xwe=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,ti.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:Vwe.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ti.NOOP,this.cstFinallyStateUpdate=ti.NOOP,this.cstPostTerminal=ti.NOOP,this.cstPostNonTerminal=ti.NOOP,this.cstPostRule=ti.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=yf.setNodeLocationFull,this.setNodeLocationFromNode=yf.setNodeLocationFull,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=yf.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=yf.setNodeLocationOnlyOffset,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=ti.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,yf.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,yf.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,ti.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,xJ.createBaseSemanticVisitorConstructor)(this.className,(0,ti.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,ti.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,xJ.createBaseVisitorConstructorWithDefaults)(this.className,(0,ti.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();Wy.TreeBuilder=Xwe});var kJ=y(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.LexerAdapter=void 0;var DJ=Hn(),_we=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):DJ.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?DJ.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();zy.LexerAdapter=_we});var FJ=y(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});Vy.RecognizerApi=void 0;var RJ=Gt(),Zwe=If(),Xx=Hn(),$we=Vd(),eBe=jx(),tBe=Cn(),rBe=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=Xx.DEFAULT_RULE_CONFIG),(0,RJ.contains)(this.definedRulesNames,e)){var n=$we.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:Xx.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=Xx.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,eBe.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,Zwe.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,tBe.serializeGrammar)((0,RJ.values)(this.gastProductionsCache))},r}();Vy.RecognizerApi=rBe});var OJ=y(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.RecognizerEngine=void 0;var Dr=Gt(),Gn=qy(),Xy=If(),NJ=Zd(),wf=_d(),LJ=Hn(),iBe=Wx(),TJ=UA(),rC=pf(),nBe=zx(),sBe=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,nBe.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=rC.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,Dr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if((0,Dr.isArray)(e)){if((0,Dr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if((0,Dr.isArray)(e))this.tokensMap=(0,Dr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,Dr.has)(e,"modes")&&(0,Dr.every)((0,Dr.flatten)((0,Dr.values)(e.modes)),rC.isTokenType)){var i=(0,Dr.flatten)((0,Dr.values)(e.modes)),n=(0,Dr.uniq)(i);this.tokensMap=(0,Dr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,Dr.isObject)(e))this.tokensMap=(0,Dr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=TJ.EOF;var s=(0,Dr.every)((0,Dr.values)(e),function(o){return(0,Dr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?rC.tokenStructuredMatcherNoCategories:rC.tokenStructuredMatcher,(0,rC.augmentTokenTypes)((0,Dr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,Dr.has)(i,"resyncEnabled")?i.resyncEnabled:LJ.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,Dr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:LJ.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(Gn.OR_IDX,t),n=(0,Dr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Xy.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,Xy.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Xy.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===iBe.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,Dr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),TJ.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();_y.RecognizerEngine=sBe});var KJ=y(Zy=>{"use strict";Object.defineProperty(Zy,"__esModule",{value:!0});Zy.ErrorHandler=void 0;var _x=If(),Zx=Gt(),MJ=Zd(),oBe=Hn(),aBe=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,Zx.has)(e,"errorMessageProvider")?e.errorMessageProvider:oBe.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,_x.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,Zx.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,Zx.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,MJ.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new _x.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,MJ.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new _x.NoViableAltException(c,this.LA(1),l))},r}();Zy.ErrorHandler=aBe});var GJ=y($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.ContentAssist=void 0;var UJ=_d(),HJ=Gt(),ABe=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,HJ.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,UJ.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,HJ.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new UJ.NextAfterTokenWalker(n,e).startWalking();return s},r}();$y.ContentAssist=ABe});var XJ=y(rw=>{"use strict";Object.defineProperty(rw,"__esModule",{value:!0});rw.GastRecorder=void 0;var In=Gt(),To=Cn(),lBe=jd(),JJ=pf(),WJ=UA(),cBe=Hn(),uBe=qy(),tw={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(tw);var YJ=!0,jJ=Math.pow(2,uBe.BITS_FOR_OCCURRENCE_IDX)-1,zJ=(0,WJ.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:lBe.Lexer.NA});(0,JJ.augmentTokenTypes)([zJ]);var VJ=(0,WJ.createTokenInstance)(zJ,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(VJ);var gBe={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},fBe=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return cBe.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new To.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return iC.call(this,To.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){iC.call(this,To.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){iC.call(this,To.RepetitionMandatoryWithSeparator,t,e,YJ)},r.prototype.manyInternalRecord=function(e,t){iC.call(this,To.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){iC.call(this,To.RepetitionWithSeparator,t,e,YJ)},r.prototype.orInternalRecord=function(e,t){return hBe.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(ew(t),!e||(0,In.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=e.ruleName,a=new To.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?gBe:tw},r.prototype.consumeInternalRecord=function(e,t,i){if(ew(t),!(0,JJ.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` + inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=new To.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),VJ},r}();rw.GastRecorder=fBe;function iC(r,e,t,i){i===void 0&&(i=!1),ew(t);var n=(0,In.peek)(this.recordingProdStack),s=(0,In.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,In.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),tw}function hBe(r,e){var t=this;ew(e);var i=(0,In.peek)(this.recordingProdStack),n=(0,In.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new To.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,In.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,In.some)(s,function(l){return(0,In.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,In.forEach)(s,function(l){var c=new To.Alternative({definition:[]});o.definition.push(c),(0,In.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,In.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),tw}function qJ(r){return r===0?"":""+r}function ew(r){if(r<0||r>jJ){var e=new Error("Invalid DSL Method idx value: <"+r+`> + `+("Idx value must be a none negative value smaller than "+(jJ+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var ZJ=y(iw=>{"use strict";Object.defineProperty(iw,"__esModule",{value:!0});iw.PerformanceTracer=void 0;var _J=Gt(),pBe=Hn(),dBe=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,_J.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=pBe.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,_J.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();iw.PerformanceTracer=dBe});var $J=y(nw=>{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});nw.applyMixins=void 0;function CBe(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}nw.applyMixins=CBe});var Hn=y(Cr=>{"use strict";var rW=Cr&&Cr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.EmbeddedActionsParser=Cr.CstParser=Cr.Parser=Cr.EMPTY_ALT=Cr.ParserDefinitionErrorType=Cr.DEFAULT_RULE_CONFIG=Cr.DEFAULT_PARSER_CONFIG=Cr.END_OF_FILE=void 0;var _i=Gt(),mBe=Kq(),eW=UA(),iW=Vd(),tW=uJ(),EBe=Wx(),IBe=EJ(),yBe=PJ(),wBe=kJ(),BBe=FJ(),QBe=OJ(),bBe=KJ(),SBe=GJ(),vBe=XJ(),xBe=ZJ(),PBe=$J();Cr.END_OF_FILE=(0,eW.createTokenInstance)(eW.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Cr.END_OF_FILE);Cr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:iW.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});Cr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var DBe;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(DBe=Cr.ParserDefinitionErrorType||(Cr.ParserDefinitionErrorType={}));function kBe(r){return r===void 0&&(r=void 0),function(){return r}}Cr.EMPTY_ALT=kBe;var sw=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,_i.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=(0,_i.has)(t,"skipValidations")?t.skipValidations:Cr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,_i.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,_i.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,tW.resolveGrammar)({rules:(0,_i.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,_i.isEmpty)(n)&&e.skipValidations===!1){var s=(0,tW.validateGrammar)({rules:(0,_i.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,_i.values)(e.tokensMap),errMsgProvider:iW.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,_i.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,mBe.computeAllProdsFollows)((0,_i.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,_i.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,_i.isEmpty)(e.definitionErrors))throw t=(0,_i.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: + `+t.join(` +------------------------------- +`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();Cr.Parser=sw;(0,PBe.applyMixins)(sw,[EBe.Recoverable,IBe.LooksAhead,yBe.TreeBuilder,wBe.LexerAdapter,QBe.RecognizerEngine,BBe.RecognizerApi,bBe.ErrorHandler,SBe.ContentAssist,vBe.GastRecorder,xBe.PerformanceTracer]);var RBe=function(r){rW(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(sw);Cr.CstParser=RBe;var FBe=function(r){rW(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(sw);Cr.EmbeddedActionsParser=FBe});var sW=y(ow=>{"use strict";Object.defineProperty(ow,"__esModule",{value:!0});ow.createSyntaxDiagramsCode=void 0;var nW=mx();function NBe(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+nW.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+nW.VERSION+"/diagrams/diagrams.css":s,a=` + + + + + +`,l=` + +`,c=` + - - - - - `); - }); - - it('should generate ArgTypes', async () => { - const doc = await svelteDoc.parse({ fileContent: content, version: 3 }); - - const results = createArgTypes(doc); - - expect(results).toMatchInlineSnapshot(` - Object { - "event_afterUpdate": Object { - "description": "After Update", - "name": "afterUpdate", - "table": Object { - "category": "events", - }, - "type": Object { - "name": "other", - "value": "void", - }, - }, - "event_click": Object { - "description": "Click Event", - "name": "click", - "table": Object { - "category": "events", - }, - "type": Object { - "name": "other", - "value": "void", - }, - }, - "rounded": Object { - "control": Object { - "type": "boolean", - }, - "description": null, - "name": "rounded", - "table": Object { - "category": "properties", - "defaultValue": Object { - "summary": true, - }, - "type": Object { - "summary": "boolean", - }, - }, - "type": Object { - "name": "boolean", - "required": false, - }, - }, - "slot_default": Object { - "description": "Default Slot - - \`{rounded}\`", - "name": "default", - "table": Object { - "category": "slots", - }, - "type": Object { - "name": "other", - "value": "void", - }, - }, - "text": Object { - "control": Object { - "type": "text", - }, - "description": null, - "name": "text", - "table": Object { - "category": "properties", - "defaultValue": Object { - "summary": "", - }, - "type": Object { - "summary": "string", - }, - }, - "type": Object { - "name": "string", - "required": false, - }, - }, - } - `); - }); -}); diff --git a/app/svelte/src/client/docs/extractArgTypes.ts b/app/svelte/src/client/docs/extractArgTypes.ts deleted file mode 100644 index 91e28729c1af..000000000000 --- a/app/svelte/src/client/docs/extractArgTypes.ts +++ /dev/null @@ -1,116 +0,0 @@ -import type { SBScalarType, StrictArgTypes } from '@storybook/csf'; -import { logger } from '@storybook/client-logger'; -import type { - SvelteComponentDoc, - JSDocType, - JSDocKeyword, - JSDocTypeConst, -} from 'sveltedoc-parser/typings'; - -import type { ArgTypesExtractor } from '@storybook/docs-tools'; - -type ComponentWithDocgen = { - __docgen: SvelteComponentDoc; -}; - -function hasKeyword(keyword: string, keywords: JSDocKeyword[]): boolean { - return keywords ? keywords.find((k) => k.name === keyword) != null : false; -} - -export const extractArgTypes: ArgTypesExtractor = (component: ComponentWithDocgen) => { - try { - // eslint-disable-next-line no-underscore-dangle - const docgen = component.__docgen; - if (docgen) { - return createArgTypes(docgen); - } - } catch (err) { - logger.log(`Error extracting argTypes: ${err}`); - } - return {}; -}; - -export const createArgTypes = (docgen: SvelteComponentDoc) => { - const results: StrictArgTypes = {}; - docgen.data.forEach((item) => { - results[item.name] = { - control: parseTypeToControl(item.type), - name: item.name, - description: item.description, - type: { - required: hasKeyword('required', item.keywords), - name: item.type?.text as SBScalarType['name'], - }, - table: { - type: { - summary: item.type?.text, - }, - defaultValue: { - summary: item.defaultValue, - }, - category: 'properties', - }, - }; - }); - - docgen.events.forEach((item) => { - results[`event_${item.name}`] = { - name: item.name, - description: item.description, - type: { name: 'other', value: 'void' }, - table: { - category: 'events', - }, - }; - }); - - docgen.slots.forEach((item) => { - results[`slot_${item.name}`] = { - name: item.name, - description: [item.description, item.params?.map((p) => `\`${p.name}\``).join(' ')] - .filter((p) => p) - .join('\n\n'), - type: { name: 'other', value: 'void' }, - table: { - category: 'slots', - }, - }; - }); - - return results; -}; - -/** - * Function to convert the type from sveltedoc-parser to a storybook type - * @param typeName - * @returns string - */ -const parseTypeToControl = (type: JSDocType): any => { - if (!type) { - return null; - } - - if (type.kind === 'type') { - switch (type.type) { - case 'string': - return { type: 'text' }; - - case 'enum': - return { type: 'radio' }; - case 'any': - return { type: 'object' }; - default: - return { type: type.type }; - } - } else if (type.kind === 'union') { - // @ts-ignore TODO: fix, this seems like a broke in package update - if (Array.isArray(type.type) && !type.type.find((t) => t.type !== 'string')) { - return { - type: 'radio', - options: type.type.filter((t) => t.kind === 'const').map((t: JSDocTypeConst) => t.value), - }; - } - } - - return null; -}; diff --git a/app/svelte/src/client/docs/extractComponentDescription.ts b/app/svelte/src/client/docs/extractComponentDescription.ts deleted file mode 100644 index d2213c8ee4a1..000000000000 --- a/app/svelte/src/client/docs/extractComponentDescription.ts +++ /dev/null @@ -1,10 +0,0 @@ -type Component = any; - -export function extractComponentDescription(component?: Component): string { - if (!component) { - return null; - } - - const { __docgen = {} } = component; - return __docgen.description; -} diff --git a/app/svelte/src/client/docs/prepareForInline.ts b/app/svelte/src/client/docs/prepareForInline.ts deleted file mode 100644 index d78914ded676..000000000000 --- a/app/svelte/src/client/docs/prepareForInline.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -import { AnyFramework, StoryFn } from '@storybook/csf'; - -import React from 'react'; - -import HOC from '@storybook/svelte/templates/HOC.svelte'; - -export const prepareForInline = (storyFn: StoryFn) => { - const el = React.useRef(null); - React.useEffect(() => { - const root = new HOC({ - target: el.current, - props: { - storyFn, - }, - }); - return () => root.$destroy(); - }); - - return React.createElement('div', { ref: el }); -}; diff --git a/app/svelte/src/client/docs/sourceDecorator.test.ts b/app/svelte/src/client/docs/sourceDecorator.test.ts deleted file mode 100644 index 006a7bb4de05..000000000000 --- a/app/svelte/src/client/docs/sourceDecorator.test.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { Args } from '@storybook/api'; -import { generateSvelteSource } from './sourceDecorator'; - -expect.addSnapshotSerializer({ - print: (val: any) => val, - test: (val) => typeof val === 'string', -}); - -function generateForArgs(args: Args, slotProperty: string = null) { - return generateSvelteSource({ name: 'Component' }, args, {}, slotProperty); -} - -describe('generateSvelteSource', () => { - test('boolean true', () => { - expect(generateForArgs({ bool: true })).toMatchInlineSnapshot(``); - }); - test('boolean false', () => { - expect(generateForArgs({ bool: false })).toMatchInlineSnapshot(``); - }); - test('null property', () => { - expect(generateForArgs({ propnull: null })).toMatchInlineSnapshot(``); - }); - test('string property', () => { - expect(generateForArgs({ str: 'mystr' })).toMatchInlineSnapshot(``); - }); - test('number property', () => { - expect(generateForArgs({ count: 42 })).toMatchInlineSnapshot(``); - }); - test('object property', () => { - expect(generateForArgs({ obj: { x: true } })).toMatchInlineSnapshot( - `` - ); - }); - test('multiple properties', () => { - expect(generateForArgs({ a: 1, b: 2 })).toMatchInlineSnapshot(``); - }); - test('slot property', () => { - expect(generateForArgs({ content: 'xyz', myProp: 'abc' }, 'content')).toMatchInlineSnapshot(` - - xyz - - `); - }); - test('component is not set', () => { - expect(generateSvelteSource(null, null, null, null)).toBeNull(); - }); -}); diff --git a/app/svelte/src/client/docs/sourceDecorator.ts b/app/svelte/src/client/docs/sourceDecorator.ts deleted file mode 100644 index 11bbeffaec02..000000000000 --- a/app/svelte/src/client/docs/sourceDecorator.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { addons, useEffect } from '@storybook/addons'; -import { once } from '@storybook/client-logger'; -import type { ArgTypes, Args, StoryContext, AnyFramework } from '@storybook/csf'; - -import { SourceType, SNIPPET_RENDERED } from '@storybook/docs-tools'; - -/** - * Check if the sourcecode should be generated. - * - * @param context StoryContext - */ -const skipSourceRender = (context: StoryContext) => { - const sourceParams = context?.parameters.docs?.source; - const isArgsStory = context?.parameters.__isArgsStory; - - // always render if the user forces it - if (sourceParams?.type === SourceType.DYNAMIC) { - return false; - } - - // never render if the user is forcing the block to render code, or - // if the user provides code, or if it's not an args story. - return !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE; -}; - -/** - * Transform a key/value to a svelte declaration as string. - * - * Default values are ommited - * - * @param key Key - * @param value Value - * @param argTypes Component ArgTypes - */ -function toSvelteProperty(key: string, value: any, argTypes: ArgTypes): string { - if (value === undefined || value === null) { - return null; - } - - // default value ? - if (argTypes[key] && argTypes[key].defaultValue === value) { - return null; - } - - if (value === true) { - return key; - } - - if (typeof value === 'string') { - return `${key}=${JSON.stringify(value)}`; - } - - return `${key}={${JSON.stringify(value)}}`; -} - -/** - * Extract a component name. - * - * @param component Component - */ -function getComponentName(component: any): string { - if (component == null) { - return null; - } - - const { __docgen = {} } = component; - let { name } = __docgen; - - if (!name) { - return component.name; - } - - if (name.endsWith('.svelte')) { - name = name.substring(0, name.length - 7); - } - return name; -} - -/** - * Generate a svelte template. - * - * @param component Component - * @param args Args - * @param argTypes ArgTypes - * @param slotProperty Property used to simulate a slot - */ -export function generateSvelteSource( - component: any, - args: Args, - argTypes: ArgTypes, - slotProperty: string -): string { - const name = getComponentName(component); - - if (!name) { - return null; - } - - const props = Object.entries(args) - .filter(([k]) => k !== slotProperty) - .map(([k, v]) => toSvelteProperty(k, v, argTypes)) - .filter((p) => p) - .join(' '); - - const slotValue = slotProperty ? args[slotProperty] : null; - - if (slotValue) { - return `<${name} ${props}>\n ${slotValue}\n`; - } - - return `<${name} ${props}/>`; -} - -/** - * Check if the story component is a wrapper to the real component. - * - * A component can be annoted with @wrapper to indicate that - * it's just a wrapper for the real tested component. If it's the case - * then the code generated references the real component, not the wrapper. - * - * moreover, a wrapper can annotate a property with @slot : this property - * is then assumed to be an alias to the default slot. - * - * @param component Component - */ -function getWrapperProperties(component: any) { - const { __docgen } = component; - if (!__docgen) { - return { wrapper: false }; - } - - // the component should be declared as a wrapper - if (!__docgen.keywords.find((kw: any) => kw.name === 'wrapper')) { - return { wrapper: false }; - } - - const slotProp = __docgen.data.find((prop: any) => - prop.keywords.find((kw: any) => kw.name === 'slot') - ); - return { wrapper: true, slotProperty: slotProp?.name as string }; -} - -/** - * Svelte source decorator. - * @param storyFn Fn - * @param context StoryContext - */ -export const sourceDecorator = (storyFn: any, context: StoryContext) => { - const channel = addons.getChannel(); - const skip = skipSourceRender(context); - const story = storyFn(); - - let source: string; - useEffect(() => { - if (!skip && source) { - channel.emit(SNIPPET_RENDERED, (context || {}).id, source); - } - }); - - if (skip) { - return story; - } - - const { parameters = {}, args = {}, component: ctxtComponent } = context || {}; - let { Component: component = {} } = story; - - const { wrapper, slotProperty } = getWrapperProperties(component); - if (wrapper) { - if (parameters.component) { - once.warn('parameters.component is deprecated. Using context.component instead.'); - } - - component = ctxtComponent; - } - - source = generateSvelteSource(component, args, context?.argTypes, slotProperty); - - return story; -}; diff --git a/app/svelte/src/client/index.ts b/app/svelte/src/client/index.ts deleted file mode 100644 index 8034a9d6433d..000000000000 --- a/app/svelte/src/client/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export { - storiesOf, - setAddon, - addDecorator, - addParameters, - configure, - getStorybook, - forceReRender, - raw, -} from './preview'; - -if (module && module.hot && module.hot.decline) { - module.hot.decline(); -} diff --git a/app/svelte/src/client/preview/config.ts b/app/svelte/src/client/preview/config.ts deleted file mode 100644 index 88c2fe7b5a53..000000000000 --- a/app/svelte/src/client/preview/config.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { render, renderToDOM } from './render'; -export { decorateStory } from './decorators'; - -export const parameters = { framework: 'svelte' }; diff --git a/app/svelte/src/client/preview/decorators.ts b/app/svelte/src/client/preview/decorators.ts deleted file mode 100644 index 09165817a17a..000000000000 --- a/app/svelte/src/client/preview/decorators.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { DecoratorFunction, StoryContext, LegacyStoryFn } from '@storybook/csf'; -import { sanitizeStoryContextUpdate } from '@storybook/store'; -// eslint-disable-next-line import/no-extraneous-dependencies -import SlotDecorator from '@storybook/svelte/templates/SlotDecorator.svelte'; -import { SvelteFramework } from './types'; - -/** - * Check if an object is a svelte component. - * @param obj Object - */ -function isSvelteComponent(obj: any) { - return obj.prototype && obj.prototype.$destroy !== undefined; -} - -/** - * Handle component loaded with esm or cjs. - * @param obj object - */ -function unWrap(obj: any) { - return obj && obj.default ? obj.default : obj; -} - -/** - * Transform a story to be compatible with the PreviewRender component. - * - * - `() => MyComponent` is translated to `() => ({ Component: MyComponent })` - * - `() => ({})` is translated to `() => ({ Component: })` - * - A decorator component is wrapped with SlotDecorator. The decorated component is inject through - * a - * - * @param context StoryContext - * @param story the current story - * @param originalStory the story decorated by the current story - */ -function prepareStory(context: StoryContext, story: any, originalStory?: any) { - let result = unWrap(story); - if (isSvelteComponent(result)) { - // wrap the component - result = { - Component: result, - }; - } - - if (originalStory) { - // inject the new story as a wrapper of the original story - result = { - Component: SlotDecorator, - props: { - decorator: unWrap(result.Component), - decoratorProps: result.props, - component: unWrap(originalStory.Component), - props: originalStory.props, - on: originalStory.on, - }, - }; - } else { - let cpn = result.Component; - if (!cpn) { - // if the component is not defined, get it the context - cpn = context.component; - } - result.Component = unWrap(cpn); - } - return result; -} - -export function decorateStory(storyFn: any, decorators: any[]) { - return decorators.reduce( - ( - previousStoryFn: LegacyStoryFn, - decorator: DecoratorFunction - ) => - (context: StoryContext) => { - let story; - const decoratedStory = decorator((update) => { - story = previousStoryFn({ - ...context, - ...sanitizeStoryContextUpdate(update), - }); - return story; - }, context); - - if (!story) { - story = previousStoryFn(context); - } - - if (!decoratedStory || decoratedStory === story) { - return story; - } - - return prepareStory(context, decoratedStory, story); - }, - (context: StoryContext) => prepareStory(context, storyFn(context)) - ); -} diff --git a/app/svelte/src/client/preview/globals.ts b/app/svelte/src/client/preview/globals.ts deleted file mode 100644 index a2fb5c9dad10..000000000000 --- a/app/svelte/src/client/preview/globals.ts +++ /dev/null @@ -1,5 +0,0 @@ -import global from 'global'; - -const { window: globalWindow } = global; - -globalWindow.STORYBOOK_ENV = 'svelte'; diff --git a/app/svelte/src/client/preview/index.ts b/app/svelte/src/client/preview/index.ts deleted file mode 100644 index 3c9f195dd5ee..000000000000 --- a/app/svelte/src/client/preview/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { start } from '@storybook/core'; -import { decorateStory } from './decorators'; - -import './globals'; -import { render, renderToDOM } from './render'; - -const { - configure: coreConfigure, - clientApi, - forceReRender, -} = start(renderToDOM, { - decorateStory, - render, -}); - -export const { setAddon, addDecorator, addParameters, clearDecorators, getStorybook, raw } = - clientApi; - -const framework = 'svelte'; -export const storiesOf = (kind: string, m: any) => - clientApi.storiesOf(kind, m).addParameters({ framework }); -export const configure = (loadable: any, m: any) => coreConfigure(framework, loadable, m); - -export { forceReRender }; diff --git a/app/svelte/src/client/preview/render.ts b/app/svelte/src/client/preview/render.ts deleted file mode 100644 index bb21b56f8221..000000000000 --- a/app/svelte/src/client/preview/render.ts +++ /dev/null @@ -1,52 +0,0 @@ -import global from 'global'; -import type { ArgsStoryFn } from '@storybook/csf'; -import type { RenderContext } from '@storybook/store'; -// eslint-disable-next-line import/no-extraneous-dependencies -import PreviewRender from '@storybook/svelte/templates/PreviewRender.svelte'; -import { SvelteFramework } from './types'; - -const { document } = global; - -let previousComponent: SvelteFramework['component'] = null; - -function cleanUpPreviousStory() { - if (!previousComponent) { - return; - } - previousComponent.$destroy(); - previousComponent = null; -} - -export function renderToDOM( - { storyFn, kind, name, showMain, showError }: RenderContext, - domElement: HTMLElement -) { - cleanUpPreviousStory(); - - const target = document.getElementById('root'); - - target.innerHTML = ''; - - previousComponent = new PreviewRender({ - target, - props: { - storyFn, - name, - kind, - showError, - }, - }); - - showMain(); -} - -export const render: ArgsStoryFn = (args, context) => { - const { id, component: Component } = context; - if (!Component) { - throw new Error( - `Unable to render story ${id} as the component annotation is missing from the default export` - ); - } - - return { Component, props: args }; -}; diff --git a/app/svelte/src/client/preview/types.ts b/app/svelte/src/client/preview/types.ts deleted file mode 100644 index f5607a2bcae2..000000000000 --- a/app/svelte/src/client/preview/types.ts +++ /dev/null @@ -1,30 +0,0 @@ -export type { RenderContext } from '@storybook/core'; - -export interface ShowErrorArgs { - title: string; - description: string; -} - -export interface MountViewArgs { - Component: any; - target: any; - props: MountProps; - on: any; - Wrapper: any; - WrapperData: any; -} - -interface MountProps { - rounded: boolean; - text: string; -} - -interface WrapperData { - innerStyle: string; - style: string; -} - -export type SvelteFramework = { - component: any; - storyResult: any; -}; diff --git a/app/svelte/src/server/build.ts b/app/svelte/src/server/build.ts deleted file mode 100755 index d8abf06a4396..000000000000 --- a/app/svelte/src/server/build.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { buildStatic } from '@storybook/core/server'; -import options from './options'; - -buildStatic(options); diff --git a/app/svelte/src/server/framework-preset-svelte-docs.ts b/app/svelte/src/server/framework-preset-svelte-docs.ts deleted file mode 100644 index 4160fc5d40db..000000000000 --- a/app/svelte/src/server/framework-preset-svelte-docs.ts +++ /dev/null @@ -1,22 +0,0 @@ -import path from 'path'; - -import { findDistEsm, Options, StorybookConfig } from '@storybook/core-common'; - -type Configuration = any; - -export async function webpackFinal(webpackConfig: Configuration, options: Options) { - const svelteOptions = await options.presets.apply('svelteOptions', {} as any, options); - - webpackConfig.module.rules.push({ - test: /\.svelte$/, - loader: path.resolve(`${__dirname}/svelte-docgen-loader`), - enforce: 'post', - options: svelteOptions, - }); - - return webpackConfig; -} - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = []) => { - return [...entry, findDistEsm(__dirname, 'client/docs/config')]; -}; diff --git a/app/svelte/src/server/framework-preset-svelte.ts b/app/svelte/src/server/framework-preset-svelte.ts deleted file mode 100644 index c3cf144bc72e..000000000000 --- a/app/svelte/src/server/framework-preset-svelte.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { findDistEsm } from '@storybook/core-common'; -import type { Options, StorybookConfig } from '@storybook/core-common'; -import type { Configuration } from 'webpack'; -import type { TransformOptions } from '@babel/core'; - -export async function webpack(config: Configuration, options: Options): Promise { - const { preprocess = undefined, loader = {} } = await options.presets.apply( - 'svelteOptions', - {} as any, - options - ); - - const mainFields = (config.resolve.mainFields as string[]) || ['browser', 'module', 'main']; - - return { - ...config, - module: { - ...config.module, - rules: [ - ...config.module.rules, - { - test: /\.(svelte|html)$/, - loader: require.resolve('svelte-loader'), - options: { preprocess, ...loader }, - }, - ], - }, - resolve: { - ...config.resolve, - extensions: [...config.resolve.extensions, '.svelte'], - alias: config.resolve.alias, - mainFields: ['svelte', ...mainFields], - }, - }; -} - -export async function babelDefault(config: TransformOptions): Promise { - return { - ...config, - presets: [...(config?.presets || [])], - plugins: [...(config?.plugins || [])], - }; -} - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = []) => { - return [...entry, findDistEsm(__dirname, 'client/preview/config')]; -}; diff --git a/app/svelte/src/server/index.ts b/app/svelte/src/server/index.ts deleted file mode 100755 index 774d96025a84..000000000000 --- a/app/svelte/src/server/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { buildDev } from '@storybook/core/server'; -import options from './options'; - -buildDev(options); diff --git a/app/svelte/src/server/options.ts b/app/svelte/src/server/options.ts deleted file mode 100644 index b32f7018ea24..000000000000 --- a/app/svelte/src/server/options.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { sync } from 'read-pkg-up'; -import { LoadOptions } from '@storybook/core-common'; - -export default { - packageJson: sync({ cwd: __dirname }).packageJson, - framework: 'svelte', - frameworkPresets: [require.resolve('./preset.js')], -} as LoadOptions; diff --git a/app/svelte/src/server/preset.ts b/app/svelte/src/server/preset.ts deleted file mode 100644 index 5746855d89a0..000000000000 --- a/app/svelte/src/server/preset.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { StorybookConfig } from '@storybook/core-common'; - -export const addons: StorybookConfig['addons'] = [ - require.resolve('./framework-preset-svelte'), - require.resolve('./framework-preset-svelte-docs'), -]; diff --git a/app/svelte/src/typings.d.ts b/app/svelte/src/typings.d.ts deleted file mode 100644 index 153074abe8ca..000000000000 --- a/app/svelte/src/typings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module 'global'; -declare module '@storybook/svelte/templates/SlotDecorator.svelte'; -declare module '@storybook/svelte/templates/PreviewRender.svelte'; -declare module '@storybook/svelte/templates/HOC.svelte'; diff --git a/app/svelte/standalone.js b/app/svelte/standalone.js deleted file mode 100644 index d11a82f79957..000000000000 --- a/app/svelte/standalone.js +++ /dev/null @@ -1,8 +0,0 @@ -const build = require('@storybook/core/standalone'); -const frameworkOptions = require('./dist/cjs/server/options').default; - -async function buildStandalone(options) { - return build(options, frameworkOptions); -} - -module.exports = buildStandalone; diff --git a/app/svelte/templates/PreviewRender.svelte b/app/svelte/templates/PreviewRender.svelte deleted file mode 100644 index 40c027d6c803..000000000000 --- a/app/svelte/templates/PreviewRender.svelte +++ /dev/null @@ -1,37 +0,0 @@ - - \ No newline at end of file diff --git a/app/svelte/tsconfig.json b/app/svelte/tsconfig.json deleted file mode 100644 index ea47a78eb476..000000000000 --- a/app/svelte/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "./src", - "types": [ - "webpack-env", - "node" - ], - "resolveJsonModule": true - }, - "include": [ - "src/**/*" - ], - "exclude": [ - "src/**/*.test.*" - ] -} \ No newline at end of file diff --git a/app/vue/README.md b/app/vue/README.md deleted file mode 100644 index 33ae491f8f41..000000000000 --- a/app/vue/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# Storybook for Vue - -Storybook for Vue is a UI development environment for your Vue components. -With it, you can visualize different states of your UI components and develop them interactively. - -![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) - -Storybook runs outside of your app. -So you can develop UI components in isolation without worrying about app specific dependencies and requirements. - -## Getting Started - -```sh -cd my-vue-app -npx sb init -``` - -For more information visit: [storybook.js.org](https://storybook.js.org) - -## Starter Storybook-for-Vue Boilerplate project with [Vuetify](https://github.com/vuetifyjs/vuetify) Material Component Framework - - - ---- - -Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. -You can also build a [static version](https://storybook.js.org/docs/vue/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. - -## Vue Notes - -- When using global custom components or extensions (e.g., `Vue.use`). You will need to declare those in the `./storybook/preview.js`. - -## Known Limitations - -In Storybook story and decorator components, you can not access the Vue instance -in factory functions for default prop values: - -```js -{ - props: { - foo: { - default() { - return this.bar; // does not work! - } - } - } -} -``` diff --git a/app/vue/bin/build.js b/app/vue/bin/build.js deleted file mode 100755 index 6ef07a26a9fc..000000000000 --- a/app/vue/bin/build.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node - -process.env.NODE_ENV = process.env.NODE_ENV || 'production'; -require('../dist/cjs/server/build'); diff --git a/app/vue/bin/index.js b/app/vue/bin/index.js deleted file mode 100755 index 8aab7bbceb2b..000000000000 --- a/app/vue/bin/index.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../dist/cjs/server'); diff --git a/app/vue/package.json b/app/vue/package.json deleted file mode 100644 index 1a1646d70965..000000000000 --- a/app/vue/package.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "name": "@storybook/vue", - "version": "6.5.0-rc.1", - "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", - "keywords": [ - "storybook" - ], - "homepage": "https://github.com/storybookjs/storybook/tree/main/app/vue", - "bugs": { - "url": "https://github.com/storybookjs/storybook/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/storybookjs/storybook.git", - "directory": "app/vue" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "license": "MIT", - "main": "dist/cjs/client/index.js", - "module": "dist/esm/client/index.js", - "types": "dist/ts3.9/client/index.d.ts", - "typesVersions": { - "<3.8": { - "dist/ts3.9/*": [ - "dist/ts3.4/*" - ] - } - }, - "bin": { - "build-storybook": "./bin/build.js", - "start-storybook": "./bin/index.js", - "storybook-server": "./bin/index.js" - }, - "files": [ - "bin/**/*", - "dist/**/*", - "README.md", - "*.js", - "*.d.ts" - ], - "scripts": { - "prepare": "node ../../scripts/prepare.js" - }, - "dependencies": { - "@storybook/addons": "6.5.0-rc.1", - "@storybook/client-logger": "6.5.0-rc.1", - "@storybook/core": "6.5.0-rc.1", - "@storybook/core-common": "6.5.0-rc.1", - "@storybook/csf": "0.0.2--canary.4566f4d.1", - "@storybook/docs-tools": "6.5.0-rc.1", - "@storybook/store": "6.5.0-rc.1", - "@types/node": "^14.14.20 || ^16.0.0", - "@types/webpack-env": "^1.16.0", - "core-js": "^3.8.2", - "global": "^4.4.0", - "react": "16.14.0", - "react-dom": "16.14.0", - "read-pkg-up": "^7.0.1", - "regenerator-runtime": "^0.13.7", - "ts-dedent": "^2.0.0", - "ts-loader": "^8.0.14", - "vue-docgen-api": "^4.44.15", - "vue-docgen-loader": "^1.5.0", - "webpack": ">=4.0.0 <6.0.0" - }, - "devDependencies": { - "vue": "^2.6.12", - "vue-loader": "^15.9.6", - "vue-template-compiler": "^2.6.12", - "webpack": "4" - }, - "peerDependencies": { - "@babel/core": "*", - "babel-loader": "^7.0.0 || ^8.0.0", - "css-loader": "*", - "vue": "^2.6.8", - "vue-loader": "^15.7.0", - "vue-template-compiler": "^2.6.8" - }, - "engines": { - "node": ">=10.13.0" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "3f09d4e6b0c655a092dc812488ef2c7ed3808401", - "sbmodern": "dist/modern/client/index.js" -} diff --git a/app/vue/preset.js b/app/vue/preset.js deleted file mode 100644 index f09c6698e046..000000000000 --- a/app/vue/preset.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/cjs/server/preset'); diff --git a/app/vue/src/client/docs/config.ts b/app/vue/src/client/docs/config.ts deleted file mode 100644 index 537773e4dfb6..000000000000 --- a/app/vue/src/client/docs/config.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { extractComponentDescription, enhanceArgTypes } from '@storybook/docs-tools'; -import { extractArgTypes } from './extractArgTypes'; -import { prepareForInline } from './prepareForInline'; -import { sourceDecorator } from './sourceDecorator'; - -export const parameters = { - docs: { - inlineStories: true, - iframeHeight: 120, - prepareForInline, - extractArgTypes, - extractComponentDescription, - }, -}; - -export const decorators = [sourceDecorator]; - -export const argTypesEnhancers = [enhanceArgTypes]; diff --git a/app/vue/src/client/docs/extractArgTypes.ts b/app/vue/src/client/docs/extractArgTypes.ts deleted file mode 100644 index 92a9f113e9c0..000000000000 --- a/app/vue/src/client/docs/extractArgTypes.ts +++ /dev/null @@ -1,86 +0,0 @@ -import type { StrictArgTypes } from '@storybook/csf'; -import type { ArgTypesExtractor, DocgenInfo, PropDef } from '@storybook/docs-tools'; -import { hasDocgen, extractComponentProps, convert } from '@storybook/docs-tools'; - -const SECTIONS = ['props', 'events', 'slots', 'methods']; - -/** - * Check if "@values" tag is defined within docgenInfo. - * If true, then propDef is mutated. - */ -function isEnum(propDef: PropDef, docgenInfo: DocgenInfo): false | PropDef { - // cast as any, since "values" doesn't exist in DocgenInfo type - const { type, values } = docgenInfo as any; - const matched = Array.isArray(values) && values.length && type.name !== 'enum'; - - if (!matched) return false; - - const enumString = values.join(', '); - let { summary } = propDef.type; - summary = summary ? `${summary}: ${enumString}` : enumString; - - Object.assign(propDef.type, { - ...propDef.type, - name: 'enum', - value: values, - summary, - }); - return propDef; -} - -/** - * @returns {Array} result - * @returns {PropDef} result.def - propDef - * @returns {boolean} result.isChanged - flag whether propDef is mutated or not. - * this is needed to prevent sbType from performing convert(docgenInfo). - */ -function verifyPropDef(propDef: PropDef, docgenInfo: DocgenInfo): [PropDef, boolean] { - let def = propDef; - let isChanged = false; - - // another callback can be added here. - // callback is mutually exclusive from each other. - const callbacks = [isEnum]; - for (let i = 0, len = callbacks.length; i < len; i += 1) { - const matched = callbacks[i](propDef, docgenInfo); - if (matched) { - def = matched; - isChanged = true; - } - } - - return [def, isChanged]; -} - -export const extractArgTypes: ArgTypesExtractor = (component) => { - if (!hasDocgen(component)) { - return null; - } - const results: StrictArgTypes = {}; - SECTIONS.forEach((section) => { - const props = extractComponentProps(component, section); - props.forEach(({ propDef, docgenInfo, jsDocTags }) => { - const [result, isPropDefChanged] = verifyPropDef(propDef, docgenInfo); - const { name, type, description, defaultValue: defaultSummary, required } = result; - - let sbType; - if (isPropDefChanged) { - sbType = type; - } else { - sbType = section === 'props' ? convert(docgenInfo) : { name: 'void' }; - } - results[name] = { - name, - description, - type: { required, ...sbType }, - table: { - type, - jsDocTags, - defaultValue: defaultSummary, - category: section, - }, - }; - }); - }); - return results; -}; diff --git a/app/vue/src/client/docs/prepareForInline.ts b/app/vue/src/client/docs/prepareForInline.ts deleted file mode 100644 index f9c4fa176456..000000000000 --- a/app/vue/src/client/docs/prepareForInline.ts +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import Vue from 'vue'; -import type { StoryContext, PartialStoryFn } from '@storybook/csf'; -import type { VueFramework } from '../preview/types-6-0'; - -// Inspired by https://github.com/egoist/vue-to-react, -// modified to store args as props in the root store - -// FIXME get this from @storybook/vue -const COMPONENT = 'STORYBOOK_COMPONENT'; -const VALUES = 'STORYBOOK_VALUES'; - -export const prepareForInline = ( - storyFn: PartialStoryFn, - { args }: StoryContext -) => { - const component = storyFn(); - const el = React.useRef(null); - - // FIXME: This recreates the Vue instance every time, which should be optimized - React.useEffect(() => { - const root = new Vue({ - el: el.current, - data() { - return { - [COMPONENT]: component, - [VALUES]: args, - }; - }, - render(h) { - const children = this[COMPONENT] ? [h(this[COMPONENT])] : undefined; - return h('div', { attrs: { id: 'root' } }, children); - }, - }); - return () => root.$destroy(); - }); - - return React.createElement('div', null, React.createElement('div', { ref: el })); -}; diff --git a/app/vue/src/client/docs/sourceDecorator.test.ts b/app/vue/src/client/docs/sourceDecorator.test.ts deleted file mode 100644 index 699295e9748a..000000000000 --- a/app/vue/src/client/docs/sourceDecorator.test.ts +++ /dev/null @@ -1,196 +0,0 @@ -/* eslint no-underscore-dangle: ["error", { "allow": ["_vnode"] }] */ - -import { ComponentOptions } from 'vue'; -import Vue from 'vue/dist/vue'; -import { vnodeToString } from './sourceDecorator'; - -expect.addSnapshotSerializer({ - print: (val: any) => val, - test: (val) => typeof val === 'string', -}); - -const getVNode = (Component: ComponentOptions) => { - const vm = new Vue({ - render(h: (c: any) => unknown) { - return h(Component); - }, - }).$mount(); - - return vm.$children[0]._vnode; -}; - -describe('vnodeToString', () => { - it('basic', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('static class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('string dynamic class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('non-string dynamic class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('array dynamic class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('object dynamic class', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('merge dynamic and static classes', () => { - expect( - vnodeToString( - getVNode({ - template: ``, - }) - ) - ).toMatchInlineSnapshot(``); - }); - - it('attributes', () => { - const MyComponent: ComponentOptions = { - props: ['propA', 'propB', 'propC', 'propD', 'propE', 'propF', 'propG'], - template: '
', - }; - - expect( - vnodeToString( - getVNode({ - components: { MyComponent }, - data(): { props: Record } { - return { - props: { - propA: 'propA', - propB: 1, - propC: null, - propD: { - foo: 'bar', - }, - propE: true, - propF() { - const foo = 'bar'; - - return foo; - }, - propG: undefined, - }, - }; - }, - template: ``, - }) - ) - ).toMatchInlineSnapshot( - `` - ); - }); - - it('children', () => { - expect( - vnodeToString( - getVNode({ - template: ` -
-
- -
-
`, - }) - ) - ).toMatchInlineSnapshot(`
`); - }); - - it('empty tag', () => { - expect( - vnodeToString( - getVNode({ - template: ` -
-
`, - }) - ) - ).toMatchInlineSnapshot(`
`); - }); - - it('tag in text', () => { - expect( - vnodeToString( - getVNode({ - template: ` -
- <> -
`, - }) - ) - ).toMatchInlineSnapshot(` -
{{\` - <> - \`}}
- `); - }); - - it('component element with children', () => { - const MyComponent: ComponentOptions = { - props: ['propA'], - template: '
', - }; - - expect( - vnodeToString( - getVNode({ - components: { MyComponent }, - data(): { props: Record } { - return { - props: { - propA: 'propA', - }, - }; - }, - template: `
`, - }) - ) - ).toMatchInlineSnapshot(`
`); - }); -}); diff --git a/app/vue/src/client/docs/sourceDecorator.ts b/app/vue/src/client/docs/sourceDecorator.ts deleted file mode 100644 index 3104f70abee9..000000000000 --- a/app/vue/src/client/docs/sourceDecorator.ts +++ /dev/null @@ -1,224 +0,0 @@ -/* eslint no-underscore-dangle: ["error", { "allow": ["_vnode"] }] */ - -import type { StoryContext } from '@storybook/csf'; -import { addons } from '@storybook/addons'; -import { logger } from '@storybook/client-logger'; -import type Vue from 'vue'; - -import { SourceType, SNIPPET_RENDERED } from '@storybook/docs-tools'; -import type { VueFramework } from '../preview/types-6-0'; - -export const skipSourceRender = (context: StoryContext) => { - const sourceParams = context?.parameters.docs?.source; - const isArgsStory = context?.parameters.__isArgsStory; - - // always render if the user forces it - if (sourceParams?.type === SourceType.DYNAMIC) { - return false; - } - - // never render if the user is forcing the block to render code, or - // if the user provides code, or if it's not an args story. - return !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE; -}; - -export const sourceDecorator = (storyFn: any, context: StoryContext) => { - const story = storyFn(); - - // See ../react/jsxDecorator.tsx - if (skipSourceRender(context)) { - return story; - } - - const channel = addons.getChannel(); - - const storyComponent = getStoryComponent(story.options.STORYBOOK_WRAPS); - - return { - components: { - Story: story, - }, - // We need to wait until the wrapper component to be mounted so Vue runtime - // struct VNode tree. We get `this._vnode == null` if switch to `created` - // lifecycle hook. - mounted() { - // Theoretically this does not happens but we need to check it. - if (!this._vnode) { - return; - } - - try { - const storyNode = lookupStoryInstance(this, storyComponent); - - const code = vnodeToString(storyNode._vnode); - - channel.emit(SNIPPET_RENDERED, (context || {}).id, ``, 'vue'); - } catch (e) { - logger.warn(`Failed to generate dynamic story source: ${e}`); - } - }, - template: '', - }; -}; - -export function vnodeToString(vnode: Vue.VNode): string { - const attrString = [ - ...(vnode.data?.slot ? ([['slot', vnode.data.slot]] as [string, any][]) : []), - ['class', stringifyClassAttribute(vnode)], - ...(vnode.componentOptions?.propsData ? Object.entries(vnode.componentOptions.propsData) : []), - ...(vnode.data?.attrs ? Object.entries(vnode.data.attrs) : []), - ] - .filter(([name], index, list) => list.findIndex((item) => item[0] === name) === index) - .map(([name, value]) => stringifyAttr(name, value)) - .filter(Boolean) - .join(' '); - - if (!vnode.componentOptions) { - // Non-component elements (div, span, etc...) - if (vnode.tag) { - if (!vnode.children) { - return `<${vnode.tag} ${attrString}/>`; - } - - return `<${vnode.tag} ${attrString}>${vnode.children.map(vnodeToString).join('')}`; - } - - // TextNode - if (vnode.text) { - if (/[<>"&]/.test(vnode.text)) { - return `{{\`${vnode.text.replace(/`/g, '\\`')}\`}}`; - } - - return vnode.text; - } - - // Unknown - return ''; - } - - // Probably users never see the "unknown-component". It seems that vnode.tag - // is always set. - const tag = vnode.componentOptions.tag || vnode.tag || 'unknown-component'; - - if (!vnode.componentOptions.children) { - return `<${tag} ${attrString}/>`; - } - - return `<${tag} ${attrString}>${vnode.componentOptions.children - .map(vnodeToString) - .join('')}`; -} - -function stringifyClassAttribute(vnode: Vue.VNode): string | undefined { - if (!vnode.data || (!vnode.data.staticClass && !vnode.data.class)) { - return undefined; - } - - return ( - [...(vnode.data.staticClass?.split(' ') ?? []), ...normalizeClassBinding(vnode.data.class)] - .filter(Boolean) - .join(' ') || undefined - ); -} - -// https://vuejs.org/v2/guide/class-and-style.html#Binding-HTML-Classes -function normalizeClassBinding(binding: unknown): readonly string[] { - if (!binding) { - return []; - } - - if (typeof binding === 'string') { - return [binding]; - } - - if (binding instanceof Array) { - // To handle an object-in-array binding smartly, we use recursion - return binding.map(normalizeClassBinding).reduce((a, b) => [...a, ...b], []); - } - - if (typeof binding === 'object') { - return Object.entries(binding) - .filter(([, active]) => !!active) - .map(([className]) => className); - } - - // Unknown class binding - return []; -} - -function stringifyAttr(attrName: string, value?: any): string | null { - if (typeof value === 'undefined' || typeof value === 'function') { - return null; - } - - if (value === true) { - return attrName; - } - - if (typeof value === 'string') { - return `${attrName}=${quote(value)}`; - } - - // TODO: Better serialization (unquoted object key, Symbol/Classes, etc...) - // Seems like Prettier don't format JSON-look object (= when keys are quoted) - return `:${attrName}=${quote(JSON.stringify(value))}`; -} - -function quote(value: string) { - return value.includes(`"`) && !value.includes(`'`) - ? `'${value}'` - : `"${value.replace(/"/g, '"')}"`; -} - -/** - * Skip decorators and grab a story component itself. - * https://github.com/pocka/storybook-addon-vue-info/pull/113 - */ -function getStoryComponent(w: any) { - let matched = w; - - while ( - matched && - matched.options && - matched.options.components && - matched.options.components.story && - matched.options.components.story.options && - matched.options.components.story.options.STORYBOOK_WRAPS - ) { - matched = matched.options.components.story.options.STORYBOOK_WRAPS; - } - return matched; -} - -interface VueInternal { - // We need to access this private property, in order to grab the vnode of the - // component instead of the "vnode of the parent of the component". - // Probably it's safe to rely on this because vm.$vnode is a reference for this. - // https://github.com/vuejs/vue/issues/6070#issuecomment-314389883 - _vnode: Vue.VNode; -} - -/** - * Find the story's instance from VNode tree. - */ -function lookupStoryInstance(instance: Vue, storyComponent: any): (Vue & VueInternal) | null { - if ( - instance.$vnode && - instance.$vnode.componentOptions && - instance.$vnode.componentOptions.Ctor === storyComponent - ) { - return instance as Vue & VueInternal; - } - - for (let i = 0, l = instance.$children.length; i < l; i += 1) { - const found = lookupStoryInstance(instance.$children[i], storyComponent); - - if (found) { - return found; - } - } - - return null; -} diff --git a/app/vue/src/client/index.ts b/app/vue/src/client/index.ts deleted file mode 100644 index 620f2fae5cd0..000000000000 --- a/app/vue/src/client/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -export { - storiesOf, - setAddon, - addDecorator, - addParameters, - configure, - getStorybook, - forceReRender, - raw, -} from './preview'; - -export * from './preview/types-6-0'; - -if (module && module.hot && module.hot.decline) { - module.hot.decline(); -} diff --git a/app/vue/src/client/preview/config.ts b/app/vue/src/client/preview/config.ts deleted file mode 100644 index 759c77b9abeb..000000000000 --- a/app/vue/src/client/preview/config.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { render, renderToDOM } from './render'; -export { decorateStory as applyDecorators } from './decorateStory'; - -export const parameters = { framework: 'vue' }; diff --git a/app/vue/src/client/preview/decorateStory.ts b/app/vue/src/client/preview/decorateStory.ts deleted file mode 100644 index 490df79b9ea0..000000000000 --- a/app/vue/src/client/preview/decorateStory.ts +++ /dev/null @@ -1,83 +0,0 @@ -import Vue, { VueConstructor, ComponentOptions } from 'vue'; -import type { DecoratorFunction, StoryContext, LegacyStoryFn } from '@storybook/csf'; -import { sanitizeStoryContextUpdate } from '@storybook/store'; - -import type { StoryFnVueReturnType } from './types'; -import type { VueFramework } from './types-6-0'; -import { extractProps } from './util'; -import { VALUES } from './render'; - -export const WRAPS = 'STORYBOOK_WRAPS'; - -function prepare( - rawStory: StoryFnVueReturnType, - innerStory?: VueConstructor -): VueConstructor | null { - let story: ComponentOptions | VueConstructor; - - if (typeof rawStory === 'string') { - story = { template: rawStory }; - } else if (rawStory != null) { - story = rawStory as ComponentOptions; - } else { - return null; - } - - // @ts-ignore - // eslint-disable-next-line no-underscore-dangle - if (!story._isVue) { - if (innerStory) { - story.components = { ...(story.components || {}), story: innerStory }; - } - story = Vue.extend(story); - // @ts-ignore // https://github.com/storybookjs/storybook/pull/7578#discussion_r307984824 - } else if (story.options[WRAPS]) { - return story as VueConstructor; - } - - return Vue.extend({ - // @ts-ignore // https://github.com/storybookjs/storybook/pull/7578#discussion_r307985279 - [WRAPS]: story, - // @ts-ignore // https://github.com/storybookjs/storybook/pull/7578#discussion_r307984824 - [VALUES]: { ...(innerStory ? innerStory.options[VALUES] : {}), ...extractProps(story) }, - functional: true, - render(h, { data, parent, children }) { - return h( - story, - { - ...data, - // @ts-ignore // https://github.com/storybookjs/storybook/pull/7578#discussion_r307986196 - props: { ...(data.props || {}), ...parent.$root[VALUES] }, - }, - children - ); - }, - }); -} - -export function decorateStory( - storyFn: LegacyStoryFn, - decorators: DecoratorFunction[] -): LegacyStoryFn { - return decorators.reduce( - (decorated: LegacyStoryFn, decorator) => (context: StoryContext) => { - let story; - - const decoratedStory = decorator((update) => { - story = decorated({ ...context, ...sanitizeStoryContextUpdate(update) }); - return story; - }, context); - - if (!story) { - story = decorated(context); - } - - if (decoratedStory === story) { - return story; - } - - return prepare(decoratedStory, story as any); - }, - (context) => prepare(storyFn(context)) - ); -} diff --git a/app/vue/src/client/preview/globals.ts b/app/vue/src/client/preview/globals.ts deleted file mode 100644 index 29010d515f81..000000000000 --- a/app/vue/src/client/preview/globals.ts +++ /dev/null @@ -1,6 +0,0 @@ -import global from 'global'; - -const { window: globalWindow } = global; - -globalWindow.STORYBOOK_REACT_CLASSES = {}; -globalWindow.STORYBOOK_ENV = 'vue'; diff --git a/app/vue/src/client/preview/index.ts b/app/vue/src/client/preview/index.ts deleted file mode 100644 index 0d894499697c..000000000000 --- a/app/vue/src/client/preview/index.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* eslint-disable prefer-destructuring */ -import { start } from '@storybook/core'; -import type { ClientStoryApi, Loadable } from '@storybook/addons'; - -import './globals'; -import type { IStorybookSection } from './types'; -import type { VueFramework } from './types-6-0'; -import { renderToDOM, render } from './render'; -import { decorateStory } from './decorateStory'; - -const framework = 'vue'; - -interface ClientApi extends ClientStoryApi { - setAddon(addon: any): void; - configure(loader: Loadable, module: NodeModule): void; - getStorybook(): IStorybookSection[]; - clearDecorators(): void; - forceReRender(): void; - raw: () => any; // todo add type - load: (...args: any[]) => void; -} - -const api = start(renderToDOM, { decorateStory, render }); - -export const storiesOf: ClientApi['storiesOf'] = (kind, m) => { - return (api.clientApi.storiesOf(kind, m) as ReturnType).addParameters({ - framework, - }); -}; - -export const configure: ClientApi['configure'] = (...args) => api.configure(framework, ...args); -export const addDecorator: ClientApi['addDecorator'] = api.clientApi - .addDecorator as ClientApi['addDecorator']; -export const addParameters: ClientApi['addParameters'] = api.clientApi - .addParameters as ClientApi['addParameters']; -export const clearDecorators: ClientApi['clearDecorators'] = api.clientApi.clearDecorators; -export const setAddon: ClientApi['setAddon'] = api.clientApi.setAddon; -export const forceReRender: ClientApi['forceReRender'] = api.forceReRender; -export const getStorybook: ClientApi['getStorybook'] = api.clientApi.getStorybook; -export const raw: ClientApi['raw'] = api.clientApi.raw; diff --git a/app/vue/src/client/preview/render.ts b/app/vue/src/client/preview/render.ts deleted file mode 100644 index 0df15a39b692..000000000000 --- a/app/vue/src/client/preview/render.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* eslint-disable no-underscore-dangle */ -import dedent from 'ts-dedent'; -import Vue from 'vue'; -import type { RenderContext } from '@storybook/store'; -import type { ArgsStoryFn } from '@storybook/csf'; -import type { VueFramework } from './types-6-0'; - -export const COMPONENT = 'STORYBOOK_COMPONENT'; -export const VALUES = 'STORYBOOK_VALUES'; - -const root = new Vue({ - data() { - return { - [COMPONENT]: undefined, - [VALUES]: {}, - }; - }, - render(h) { - const children = this[COMPONENT] ? [h(this[COMPONENT])] : undefined; - return h('div', { attrs: { id: 'root' } }, children); - }, -}); - -export const render: ArgsStoryFn = (props, context) => { - const { id, component: Component, argTypes } = context; - const component = Component as VueFramework['component'] & { - __docgenInfo?: { displayName: string }; - props: Record; - }; - - if (!component) { - throw new Error( - `Unable to render story ${id} as the component annotation is missing from the default export` - ); - } - - let componentName = 'component'; - - // if there is a name property, we either use it or preprend with sb- in case it's an invalid name - if (component.name) { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore isReservedTag is an internal function from Vue, might be changed in future releases - const isReservedTag = Vue.config.isReservedTag && Vue.config.isReservedTag(component.name); - - componentName = isReservedTag ? `sb-${component.name}` : component.name; - } else if (component.__docgenInfo?.displayName) { - // otherwise, we use the displayName from docgen, if present - componentName = component.__docgenInfo?.displayName; - } - - return { - props: Object.keys(argTypes), - components: { [componentName]: component }, - template: `<${componentName} v-bind="$props" />`, - }; -}; - -export function renderToDOM( - { - title, - name, - storyFn, - storyContext: { args }, - showMain, - showError, - showException, - forceRemount, - }: RenderContext, - domElement: HTMLElement -) { - Vue.config.errorHandler = showException; - - // FIXME: move this into root[COMPONENT] = element - // once we get rid of knobs so we don't have to re-create - // a new component each time - const element = storyFn(); - - if (!element) { - showError({ - title: `Expecting a Vue component from the story: "${name}" of "${title}".`, - description: dedent` - Did you forget to return the Vue component from the story? - Use "() => ({ template: '' })" or "() => ({ components: MyComp, template: '' })" when defining the story. - `, - }); - return; - } - - showMain(); - - // at component creation || refresh by HMR or switching stories - if (!root[COMPONENT] || forceRemount) { - root[COMPONENT] = element; - } - - // @ts-ignore https://github.com/storybookjs/storrybook/pull/7578#discussion_r307986139 - root[VALUES] = { ...element.options[VALUES], ...args }; - - if (!root.$el) { - root.$mount(domElement); - } -} diff --git a/app/vue/src/client/preview/types-6-0.ts b/app/vue/src/client/preview/types-6-0.ts deleted file mode 100644 index dcd515791c01..000000000000 --- a/app/vue/src/client/preview/types-6-0.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { Component, AsyncComponent } from 'vue'; -import type { - Args, - ComponentAnnotations, - StoryAnnotations, - AnnotatedStoryFn, -} from '@storybook/csf'; -import type { StoryFnVueReturnType } from './types'; - -export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf'; - -export type VueFramework = { - component: Component | AsyncComponent; - storyResult: StoryFnVueReturnType; -}; - -/** - * Metadata to configure the stories for a component. - * - * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export) - */ -export type Meta = ComponentAnnotations; - -/** - * Story function that represents a CSFv2 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type StoryFn = AnnotatedStoryFn; - -/** - * Story function that represents a CSFv3 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type StoryObj = StoryAnnotations; - -/** - * Story function that represents a CSFv2 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - * - * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type. - * - */ -export type Story = StoryFn; diff --git a/app/vue/src/client/preview/types-7-0.ts b/app/vue/src/client/preview/types-7-0.ts deleted file mode 100644 index d897ad97a81a..000000000000 --- a/app/vue/src/client/preview/types-7-0.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Args } from '@storybook/csf'; - -import type { StoryObj } from './types-6-0'; - -export type { StoryFn, StoryObj, Meta } from './types-6-0'; - -// NOTE these types are reversed from the way they are in types-6-0 and types-6-3 - -/** - * Story function that represents a CSFv3 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type Story = StoryObj; diff --git a/app/vue/src/client/preview/types.ts b/app/vue/src/client/preview/types.ts deleted file mode 100644 index 750260ba95db..000000000000 --- a/app/vue/src/client/preview/types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component } from 'vue'; - -export type { RenderContext } from '@storybook/core'; - -export interface ShowErrorArgs { - title: string; - description: string; -} - -// TODO: some vue expert needs to look at this -export type StoryFnVueReturnType = string | Component; - -export interface IStorybookStory { - name: string; - render: (context: any) => any; -} - -export interface IStorybookSection { - kind: string; - stories: IStorybookStory[]; -} diff --git a/app/vue/src/client/preview/util.ts b/app/vue/src/client/preview/util.ts deleted file mode 100644 index b44667add416..000000000000 --- a/app/vue/src/client/preview/util.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { VueConstructor } from 'vue'; - -function getType(fn: Function) { - const match = fn && fn.toString().match(/^\s*function (\w+)/); - return match ? match[1] : ''; -} - -// https://github.com/vuejs/vue/blob/dev/src/core/util/props.js#L92 -function resolveDefault({ type, default: def }: any) { - if (typeof def === 'function' && getType(type) !== 'Function') { - // known limitation: we don't have the component instance to pass - return def.call(); - } - - return def; -} - -export function extractProps(component: VueConstructor) { - // @ts-ignore this options business seems not good according to the types - return Object.entries(component.options.props || {}) - .map(([name, prop]) => ({ [name]: resolveDefault(prop) })) - .reduce((wrap, prop) => ({ ...wrap, ...prop }), {}); -} diff --git a/app/vue/src/server/build.ts b/app/vue/src/server/build.ts deleted file mode 100755 index d8abf06a4396..000000000000 --- a/app/vue/src/server/build.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { buildStatic } from '@storybook/core/server'; -import options from './options'; - -buildStatic(options); diff --git a/app/vue/src/server/framework-preset-vue-docs.ts b/app/vue/src/server/framework-preset-vue-docs.ts deleted file mode 100644 index 984fa07c49c5..000000000000 --- a/app/vue/src/server/framework-preset-vue-docs.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { findDistEsm, Options, StorybookConfig } from '@storybook/core-common'; -import { hasDocsOrControls } from '@storybook/docs-tools'; - -export function webpackFinal(webpackConfig: any = {}, options: Options) { - if (!hasDocsOrControls(options)) return webpackConfig; - - let vueDocgenOptions = {}; - - options.presetsList?.forEach((preset) => { - if (preset.name.includes('addon-docs') && preset.options.vueDocgenOptions) { - const appendableOptions = preset.options.vueDocgenOptions; - vueDocgenOptions = { - ...vueDocgenOptions, - ...appendableOptions, - }; - } - }); - - webpackConfig.module.rules.push({ - test: /\.vue$/, - loader: require.resolve('vue-docgen-loader', { paths: [require.resolve('@storybook/vue')] }), - enforce: 'post', - options: { - docgenOptions: { - alias: webpackConfig.resolve.alias, - ...vueDocgenOptions, - }, - }, - }); - return webpackConfig; -} - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = [], options) => { - if (!hasDocsOrControls(options)) return entry; - return [...entry, findDistEsm(__dirname, 'client/docs/config')]; -}; diff --git a/app/vue/src/server/framework-preset-vue.ts b/app/vue/src/server/framework-preset-vue.ts deleted file mode 100644 index 8656d8d35060..000000000000 --- a/app/vue/src/server/framework-preset-vue.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* eslint-disable no-param-reassign */ -import { VueLoaderPlugin } from 'vue-loader'; -import { findDistEsm } from '@storybook/core-common'; - -import type { Configuration } from 'webpack'; -import type { Options, TypescriptConfig, StorybookConfig } from '@storybook/core-common'; - -export async function webpack(config: Configuration, { presets }: Options) { - const typescriptOptions = await presets.apply('typescript', {} as any); - - config.plugins.push(new VueLoaderPlugin()); - config.module.rules.push({ - test: /\.vue$/, - loader: require.resolve('vue-loader'), - options: {}, - }); - config.module.rules.push({ - test: /\.ts$/, - use: [ - { - loader: require.resolve('ts-loader'), - options: { - transpileOnly: !typescriptOptions.check, - appendTsSuffixTo: [/\.vue$/], - }, - }, - ], - }); - config.module.rules.push({ - test: /\.tsx$/, - use: [ - { - loader: require.resolve('ts-loader'), - options: { - transpileOnly: true, - appendTsxSuffixTo: [/\.vue$/], - }, - }, - ], - }); - - config.resolve.extensions.push('.vue'); - config.resolve.alias = { ...config.resolve.alias, vue$: require.resolve('vue/dist/vue.esm.js') }; - - return config; -} - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = []) => { - return [...entry, findDistEsm(__dirname, 'client/preview/config')]; -}; diff --git a/app/vue/src/server/index.ts b/app/vue/src/server/index.ts deleted file mode 100755 index 774d96025a84..000000000000 --- a/app/vue/src/server/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { buildDev } from '@storybook/core/server'; -import options from './options'; - -buildDev(options); diff --git a/app/vue/src/server/options.ts b/app/vue/src/server/options.ts deleted file mode 100644 index 6cd7efb1f6a8..000000000000 --- a/app/vue/src/server/options.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { sync } from 'read-pkg-up'; -import { LoadOptions } from '@storybook/core-common'; - -export default { - packageJson: sync({ cwd: __dirname }).packageJson, - framework: 'vue', - frameworkPresets: [require.resolve('./preset.js')], -} as LoadOptions; diff --git a/app/vue/src/server/preset.ts b/app/vue/src/server/preset.ts deleted file mode 100644 index 89288293223c..000000000000 --- a/app/vue/src/server/preset.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { StorybookConfig } from '@storybook/core-common'; - -export const addons: StorybookConfig['addons'] = [ - require.resolve('./framework-preset-vue'), - require.resolve('./framework-preset-vue-docs'), -]; diff --git a/app/vue/src/typings.d.ts b/app/vue/src/typings.d.ts deleted file mode 100644 index 4f4eff6c31cd..000000000000 --- a/app/vue/src/typings.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module 'global'; - -declare module 'vue-loader/lib/plugin'; \ No newline at end of file diff --git a/app/vue/standalone.js b/app/vue/standalone.js deleted file mode 100644 index d11a82f79957..000000000000 --- a/app/vue/standalone.js +++ /dev/null @@ -1,8 +0,0 @@ -const build = require('@storybook/core/standalone'); -const frameworkOptions = require('./dist/cjs/server/options').default; - -async function buildStandalone(options) { - return build(options, frameworkOptions); -} - -module.exports = buildStandalone; diff --git a/app/vue/tsconfig.json b/app/vue/tsconfig.json deleted file mode 100644 index ea47a78eb476..000000000000 --- a/app/vue/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "./src", - "types": [ - "webpack-env", - "node" - ], - "resolveJsonModule": true - }, - "include": [ - "src/**/*" - ], - "exclude": [ - "src/**/*.test.*" - ] -} \ No newline at end of file diff --git a/app/vue/types-6-0.d.ts b/app/vue/types-6-0.d.ts deleted file mode 100644 index b5946b39a8d8..000000000000 --- a/app/vue/types-6-0.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/ts3.9/client/preview/types-6-0.d'; diff --git a/app/vue/types-7-0.d.ts b/app/vue/types-7-0.d.ts deleted file mode 100644 index a6080e072100..000000000000 --- a/app/vue/types-7-0.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/ts3.9/client/preview/types-7-0.d'; diff --git a/app/vue3/README.md b/app/vue3/README.md deleted file mode 100644 index b0fafaff0295..000000000000 --- a/app/vue3/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Storybook for Vue 3 - -Storybook for Vue 3 is a UI development environment for your Vue 3 components. -With it, you can visualize different states of your UI components and develop them interactively. - -![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) - -Storybook runs outside of your app. -So you can develop UI components in isolation without worrying about app specific dependencies and requirements. - -## Getting Started - -```sh -cd my-vue3-app -npx sb init -``` - -For more information visit: [storybook.js.org](https://storybook.js.org) - ---- - -Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. -You can also build a [static version](https://storybook.js.org/docs/vue/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. - -## Extending the Vue application - -Storybook creates a [Vue 3 application](https://v3.vuejs.org/api/application-api.html#application-api) for your component preview which can be imported as `import { app } from '@storybook/vue3'`. - -When using global custom components (`app.component`), directives (`app.directive`), extensions (`app.use`), or other application methods, you will need to configure those in the `./storybook/preview.js` file. - -For example: - -```js -// .storybook/preview.js - -import { app } from '@storybook/vue3'; - -app.use(MyPlugin); -app.component('my-component', MyComponent); -app.mixin({ - /* My mixin */ -}); -``` diff --git a/app/vue3/bin/build.js b/app/vue3/bin/build.js deleted file mode 100755 index 6ef07a26a9fc..000000000000 --- a/app/vue3/bin/build.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node - -process.env.NODE_ENV = process.env.NODE_ENV || 'production'; -require('../dist/cjs/server/build'); diff --git a/app/vue3/bin/index.js b/app/vue3/bin/index.js deleted file mode 100755 index 8aab7bbceb2b..000000000000 --- a/app/vue3/bin/index.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../dist/cjs/server'); diff --git a/app/vue3/package.json b/app/vue3/package.json deleted file mode 100644 index 37912dd5606d..000000000000 --- a/app/vue3/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "@storybook/vue3", - "version": "6.5.0-rc.1", - "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", - "keywords": [ - "storybook" - ], - "homepage": "https://github.com/storybookjs/storybook/tree/main/app/vue3", - "bugs": { - "url": "https://github.com/storybookjs/storybook/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/storybookjs/storybook.git", - "directory": "app/vue3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "license": "MIT", - "main": "dist/cjs/client/index.js", - "module": "dist/esm/client/index.js", - "types": "dist/ts3.9/client/index.d.ts", - "typesVersions": { - "<3.8": { - "dist/ts3.9/*": [ - "dist/ts3.4/*" - ] - } - }, - "bin": { - "build-storybook": "./bin/build.js", - "start-storybook": "./bin/index.js", - "storybook-server": "./bin/index.js" - }, - "files": [ - "bin/**/*", - "dist/**/*", - "README.md", - "*.js", - "*.d.ts" - ], - "scripts": { - "prepare": "node ../../scripts/prepare.js" - }, - "dependencies": { - "@storybook/addons": "6.5.0-rc.1", - "@storybook/core": "6.5.0-rc.1", - "@storybook/core-common": "6.5.0-rc.1", - "@storybook/csf": "0.0.2--canary.4566f4d.1", - "@storybook/docs-tools": "6.5.0-rc.1", - "@storybook/store": "6.5.0-rc.1", - "@types/node": "^14.14.20 || ^16.0.0", - "@types/webpack-env": "^1.16.0", - "core-js": "^3.8.2", - "global": "^4.4.0", - "react": "16.14.0", - "react-dom": "16.14.0", - "read-pkg-up": "^7.0.1", - "regenerator-runtime": "^0.13.7", - "ts-dedent": "^2.0.0", - "ts-loader": "^8.0.14", - "vue-docgen-api": "^4.44.15", - "vue-docgen-loader": "^1.5.0", - "vue-loader": "^16.4.1", - "webpack": ">=4.0.0 <6.0.0" - }, - "devDependencies": { - "@vue/compiler-sfc": "3.0.0", - "vue": "3.0.0", - "webpack": "4" - }, - "peerDependencies": { - "@babel/core": "*", - "@vue/compiler-sfc": "^3.0.0", - "babel-loader": "^7.0.0 || ^8.0.0", - "vue": "^3.0.0" - }, - "engines": { - "node": ">=10.13.0" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "3f09d4e6b0c655a092dc812488ef2c7ed3808401", - "sbmodern": "dist/modern/client/index.js" -} diff --git a/app/vue3/preset.js b/app/vue3/preset.js deleted file mode 100644 index f09c6698e046..000000000000 --- a/app/vue3/preset.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/cjs/server/preset'); diff --git a/app/vue3/src/client/docs/config.ts b/app/vue3/src/client/docs/config.ts deleted file mode 100644 index dd87a14d1a7e..000000000000 --- a/app/vue3/src/client/docs/config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { extractComponentDescription, enhanceArgTypes } from '@storybook/docs-tools'; -import { extractArgTypes } from './extractArgTypes'; -import { prepareForInline } from './prepareForInline'; - -export const parameters = { - docs: { - inlineStories: true, - prepareForInline, - extractArgTypes, - extractComponentDescription, - }, -}; - -export const argTypesEnhancers = [enhanceArgTypes]; diff --git a/app/vue3/src/client/docs/extractArgTypes.ts b/app/vue3/src/client/docs/extractArgTypes.ts deleted file mode 100644 index 9a26e308afc8..000000000000 --- a/app/vue3/src/client/docs/extractArgTypes.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { StrictArgTypes } from '@storybook/csf'; -import type { ArgTypesExtractor } from '@storybook/docs-tools'; -import { hasDocgen, extractComponentProps, convert } from '@storybook/docs-tools'; - -const SECTIONS = ['props', 'events', 'slots', 'methods']; - -export const extractArgTypes: ArgTypesExtractor = (component) => { - if (!hasDocgen(component)) { - return null; - } - const results: StrictArgTypes = {}; - SECTIONS.forEach((section) => { - const props = extractComponentProps(component, section); - props.forEach(({ propDef, docgenInfo, jsDocTags }) => { - const { name, type, description, defaultValue: defaultSummary, required } = propDef; - const sbType = section === 'props' ? convert(docgenInfo) : { name: 'void' }; - - results[name] = { - name, - description, - type: { required, ...sbType }, - table: { - type, - jsDocTags, - defaultValue: defaultSummary, - category: section, - }, - }; - }); - }); - return results; -}; diff --git a/app/vue3/src/client/docs/prepareForInline.ts b/app/vue3/src/client/docs/prepareForInline.ts deleted file mode 100644 index 155f9253b83d..000000000000 --- a/app/vue3/src/client/docs/prepareForInline.ts +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import * as Vue from 'vue'; -import { StoryContext, PartialStoryFn } from '@storybook/csf'; -import { app, VueFramework } from '../index'; - -// This is cast as `any` to workaround type errors caused by Vue 2 types -const { render, h } = Vue as any; - -export const prepareForInline = ( - storyFn: PartialStoryFn, - { args }: StoryContext -) => { - const component = storyFn(); - - const vnode = h(component, args); - // By attaching the app context from `@storybook/vue3` to the vnode - // like this, these stoeis are able to access any app config stuff - // the end-user set inside `.storybook/preview.js` - vnode.appContext = app._context; // eslint-disable-line no-underscore-dangle - - return React.createElement('div', { - ref: (node?: HTMLDivElement): void => (node ? render(vnode, node) : null), - }); -}; diff --git a/app/vue3/src/client/index.ts b/app/vue3/src/client/index.ts deleted file mode 100644 index de13a1bc49ff..000000000000 --- a/app/vue3/src/client/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -export { - storiesOf, - setAddon, - addDecorator, - addParameters, - configure, - getStorybook, - forceReRender, - raw, - app, - activeStoryComponent, -} from './preview'; - -export * from './preview/types-6-0'; - -if (module && module.hot && module.hot.decline) { - module.hot.decline(); -} diff --git a/app/vue3/src/client/preview/config.ts b/app/vue3/src/client/preview/config.ts deleted file mode 100644 index 589efca6a13f..000000000000 --- a/app/vue3/src/client/preview/config.ts +++ /dev/null @@ -1,4 +0,0 @@ -export { render, renderToDOM } from './render'; -export { decorateStory as applyDecorators } from './decorateStory'; - -export const parameters = { framework: 'vue3' }; diff --git a/app/vue3/src/client/preview/decorateStory.ts b/app/vue3/src/client/preview/decorateStory.ts deleted file mode 100644 index 22fc50e6bbf9..000000000000 --- a/app/vue3/src/client/preview/decorateStory.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { ConcreteComponent, Component, ComponentOptions } from 'vue'; -import { h } from 'vue'; -import type { DecoratorFunction, StoryContext, LegacyStoryFn } from '@storybook/csf'; -import { sanitizeStoryContextUpdate } from '@storybook/store'; - -import type { VueFramework } from './types-6-0'; - -/* - This normalizes a functional component into a render method in ComponentOptions. - - The concept is taken from Vue 3's `defineComponent` but changed from creating a `setup` - method on the ComponentOptions so end-users don't need to specify a "thunk" as a decorator. - */ -function normalizeFunctionalComponent(options: ConcreteComponent): ComponentOptions { - return typeof options === 'function' ? { render: options, name: options.name } : options; -} - -function prepare( - rawStory: VueFramework['storyResult'], - innerStory?: ConcreteComponent -): Component | null { - const story = rawStory as ComponentOptions; - - if (story == null) { - return null; - } - - if (innerStory) { - return { - // Normalize so we can always spread an object - ...normalizeFunctionalComponent(story), - components: { ...(story.components || {}), story: innerStory }, - }; - } - - return { - render() { - return h(story); - }, - }; -} - -export function decorateStory( - storyFn: LegacyStoryFn, - decorators: DecoratorFunction[] -): LegacyStoryFn { - return decorators.reduce( - (decorated: LegacyStoryFn, decorator) => (context: StoryContext) => { - let story: VueFramework['storyResult']; - - const decoratedStory: VueFramework['storyResult'] = decorator((update) => { - story = decorated({ ...context, ...sanitizeStoryContextUpdate(update) }); - return story; - }, context); - - if (!story) { - story = decorated(context); - } - - if (decoratedStory === story) { - return story; - } - - return prepare(decoratedStory, story) as VueFramework['storyResult']; - }, - (context) => prepare(storyFn(context)) as LegacyStoryFn - ); -} diff --git a/app/vue3/src/client/preview/globals.ts b/app/vue3/src/client/preview/globals.ts deleted file mode 100644 index 33ee3fbb8f91..000000000000 --- a/app/vue3/src/client/preview/globals.ts +++ /dev/null @@ -1,6 +0,0 @@ -import global from 'global'; - -const { window: globalWindow } = global; - -globalWindow.STORYBOOK_REACT_CLASSES = {}; -globalWindow.STORYBOOK_ENV = 'vue3'; diff --git a/app/vue3/src/client/preview/index.ts b/app/vue3/src/client/preview/index.ts deleted file mode 100644 index 912dc4bf7919..000000000000 --- a/app/vue3/src/client/preview/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { App } from 'vue'; -import { start } from '@storybook/core'; -import type { ClientStoryApi, Loadable } from '@storybook/addons'; - -import './globals'; -import type { IStorybookSection } from './types'; -import type { VueFramework } from './types-6-0'; -import { decorateStory } from './decorateStory'; - -import { render, renderToDOM, storybookApp } from './render'; - -const framework = 'vue3'; - -interface ClientApi extends ClientStoryApi { - setAddon(addon: any): void; - configure(loader: Loadable, module: NodeModule): void; - getStorybook(): IStorybookSection[]; - clearDecorators(): void; - forceReRender(): void; - raw: () => any; // todo add type - load: (...args: any[]) => void; - app: App; -} - -const api = start(renderToDOM, { decorateStory, render }); - -export const storiesOf: ClientApi['storiesOf'] = (kind, m) => { - return (api.clientApi.storiesOf(kind, m) as ReturnType).addParameters({ - framework, - }); -}; - -export const configure: ClientApi['configure'] = (...args) => api.configure(framework, ...args); -export const { addDecorator } = api.clientApi; -export const { addParameters } = api.clientApi; -export const { clearDecorators } = api.clientApi; -export const { setAddon } = api.clientApi; -export const { forceReRender } = api; -export const { getStorybook } = api.clientApi; -export const { raw } = api.clientApi; -export const app: ClientApi['app'] = storybookApp; -export { activeStoryComponent } from './render'; diff --git a/app/vue3/src/client/preview/render.ts b/app/vue3/src/client/preview/render.ts deleted file mode 100644 index a9d3b2020f47..000000000000 --- a/app/vue3/src/client/preview/render.ts +++ /dev/null @@ -1,66 +0,0 @@ -import dedent from 'ts-dedent'; -import { createApp, h, shallowRef, ComponentPublicInstance } from 'vue'; -import type { RenderContext } from '@storybook/store'; -import type { ArgsStoryFn } from '@storybook/csf'; - -import { StoryFnVueReturnType } from './types'; -import { VueFramework } from './types-6-0'; - -export const render: ArgsStoryFn = (props, context) => { - const { id, component: Component } = context; - if (!Component) { - throw new Error( - `Unable to render story ${id} as the component annotation is missing from the default export` - ); - } - - // TODO remove this hack - return h(Component as Parameters[0], props); -}; - -export const activeStoryComponent = shallowRef(null); - -let root: ComponentPublicInstance | null = null; - -export const storybookApp = createApp({ - // If an end-user calls `unmount` on the app, we need to clear our root variable - unmounted() { - root = null; - }, - - setup() { - return () => { - if (!activeStoryComponent.value) - throw new Error('No Vue 3 Story available. Was it set correctly?'); - return h(activeStoryComponent.value); - }; - }, -}); - -export function renderToDOM( - { title, name, storyFn, showMain, showError, showException }: RenderContext, - domElement: HTMLElement -) { - storybookApp.config.errorHandler = showException; - - const element: StoryFnVueReturnType = storyFn(); - - if (!element) { - showError({ - title: `Expecting a Vue component from the story: "${name}" of "${title}".`, - description: dedent` - Did you forget to return the Vue component from the story? - Use "() => ({ template: '' })" or "() => ({ components: MyComp, template: '' })" when defining the story. - `, - }); - return; - } - - showMain(); - - activeStoryComponent.value = element; - - if (!root) { - root = storybookApp.mount(domElement); - } -} diff --git a/app/vue3/src/client/preview/types-6-0.ts b/app/vue3/src/client/preview/types-6-0.ts deleted file mode 100644 index 741a1e50fae3..000000000000 --- a/app/vue3/src/client/preview/types-6-0.ts +++ /dev/null @@ -1,46 +0,0 @@ -import type { ConcreteComponent } from 'vue'; -import type { - Args, - ComponentAnnotations, - StoryAnnotations, - AnnotatedStoryFn, -} from '@storybook/csf'; -import type { StoryFnVueReturnType } from './types'; - -export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf'; - -export type VueFramework = { - component: ConcreteComponent; - storyResult: StoryFnVueReturnType; -}; - -/** - * Metadata to configure the stories for a component. - * - * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export) - */ -export type Meta = ComponentAnnotations; - -/** - * Story function that represents a CSFv2 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type StoryFn = AnnotatedStoryFn; - -/** - * Story function that represents a CSFv3 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type StoryObj = StoryAnnotations; - -/** - * Story function that represents a CSFv2 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - * - * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type. - * - */ -export type Story = StoryFn; diff --git a/app/vue3/src/client/preview/types-7-0.ts b/app/vue3/src/client/preview/types-7-0.ts deleted file mode 100644 index d897ad97a81a..000000000000 --- a/app/vue3/src/client/preview/types-7-0.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Args } from '@storybook/csf'; - -import type { StoryObj } from './types-6-0'; - -export type { StoryFn, StoryObj, Meta } from './types-6-0'; - -// NOTE these types are reversed from the way they are in types-6-0 and types-6-3 - -/** - * Story function that represents a CSFv3 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type Story = StoryObj; diff --git a/app/vue3/src/client/preview/types.ts b/app/vue3/src/client/preview/types.ts deleted file mode 100644 index e613aa482d74..000000000000 --- a/app/vue3/src/client/preview/types.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ConcreteComponent } from 'vue'; - -export type { RenderContext } from '@storybook/core'; - -export interface ShowErrorArgs { - title: string; - description: string; -} - -export type StoryFnVueReturnType = ConcreteComponent; - -export interface IStorybookStory { - name: string; - render: (context: any) => any; -} - -export interface IStorybookSection { - kind: string; - stories: IStorybookStory[]; -} diff --git a/app/vue3/src/server/build.ts b/app/vue3/src/server/build.ts deleted file mode 100755 index d8abf06a4396..000000000000 --- a/app/vue3/src/server/build.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { buildStatic } from '@storybook/core/server'; -import options from './options'; - -buildStatic(options); diff --git a/app/vue3/src/server/framework-preset-vue3-docs.ts b/app/vue3/src/server/framework-preset-vue3-docs.ts deleted file mode 100644 index b97af76f15ff..000000000000 --- a/app/vue3/src/server/framework-preset-vue3-docs.ts +++ /dev/null @@ -1,37 +0,0 @@ -import type { Options, StorybookConfig } from '@storybook/core-common'; -import { findDistEsm } from '@storybook/core-common'; -import { hasDocsOrControls } from '@storybook/docs-tools'; - -export function webpackFinal(webpackConfig: any = {}, options: Options) { - if (!hasDocsOrControls(options)) return webpackConfig; - - let vueDocgenOptions = {}; - - options.presetsList?.forEach((preset) => { - if (preset.name.includes('addon-docs') && preset.options.vueDocgenOptions) { - const appendableOptions = preset.options.vueDocgenOptions; - vueDocgenOptions = { - ...vueDocgenOptions, - ...appendableOptions, - }; - } - }); - - webpackConfig.module.rules.push({ - test: /\.vue$/, - loader: require.resolve('vue-docgen-loader', { paths: [require.resolve('@storybook/vue3')] }), - enforce: 'post', - options: { - docgenOptions: { - alias: webpackConfig.resolve.alias, - ...vueDocgenOptions, - }, - }, - }); - return webpackConfig; -} - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = [], options) => { - if (!hasDocsOrControls(options)) return entry; - return [...entry, findDistEsm(__dirname, 'client/docs/config')]; -}; diff --git a/app/vue3/src/server/index.ts b/app/vue3/src/server/index.ts deleted file mode 100755 index 774d96025a84..000000000000 --- a/app/vue3/src/server/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { buildDev } from '@storybook/core/server'; -import options from './options'; - -buildDev(options); diff --git a/app/vue3/src/server/options.ts b/app/vue3/src/server/options.ts deleted file mode 100644 index ce5415ddde88..000000000000 --- a/app/vue3/src/server/options.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { sync } from 'read-pkg-up'; -import type { LoadOptions } from '@storybook/core-common'; - -export default { - packageJson: sync({ cwd: __dirname }).packageJson, - framework: 'vue3', - frameworkPresets: [require.resolve('./preset')], -} as LoadOptions; diff --git a/app/vue3/src/server/preset.ts b/app/vue3/src/server/preset.ts deleted file mode 100644 index 16c9fbcfde38..000000000000 --- a/app/vue3/src/server/preset.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { StorybookConfig } from '@storybook/core-common'; - -export const addons: StorybookConfig['addons'] = [ - require.resolve('./framework-preset-vue3'), - require.resolve('./framework-preset-vue3-docs'), -]; diff --git a/app/vue3/src/typings.d.ts b/app/vue3/src/typings.d.ts deleted file mode 100644 index 4dd567187328..000000000000 --- a/app/vue3/src/typings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare module 'global'; - -declare module 'vue-loader' { - export const VueLoaderPlugin: any -} diff --git a/app/vue3/standalone.js b/app/vue3/standalone.js deleted file mode 100644 index d11a82f79957..000000000000 --- a/app/vue3/standalone.js +++ /dev/null @@ -1,8 +0,0 @@ -const build = require('@storybook/core/standalone'); -const frameworkOptions = require('./dist/cjs/server/options').default; - -async function buildStandalone(options) { - return build(options, frameworkOptions); -} - -module.exports = buildStandalone; diff --git a/app/vue3/tsconfig.json b/app/vue3/tsconfig.json deleted file mode 100644 index 5b0f285df93d..000000000000 --- a/app/vue3/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "./src", - "types": [ - "webpack-env", - "node" - ], - "resolveJsonModule": true, - "skipLibCheck": true - }, - "include": [ - "src/**/*" - ], - "exclude": [ - "src/**/*.test.*" - ] -} \ No newline at end of file diff --git a/app/vue3/types-6-0.d.ts b/app/vue3/types-6-0.d.ts deleted file mode 100644 index b5946b39a8d8..000000000000 --- a/app/vue3/types-6-0.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/ts3.9/client/preview/types-6-0.d'; diff --git a/app/vue3/types-7-0.d.ts b/app/vue3/types-7-0.d.ts deleted file mode 100644 index a6080e072100..000000000000 --- a/app/vue3/types-7-0.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/ts3.9/client/preview/types-7-0.d'; diff --git a/app/web-components/README.md b/app/web-components/README.md deleted file mode 100644 index e07aad25f2bb..000000000000 --- a/app/web-components/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Storybook for web-components - ---- - -Storybook for web-components is a UI development environment for your plain web-component snippets. -With it, you can visualize different states of your UI components and develop them interactively. - -![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) - -Storybook runs outside of your app. -So you can develop UI components in isolation without worrying about app specific dependencies and requirements. - -## Getting Started - -```sh -cd my-app -npx sb init -t web_components -``` - -For more information visit: [storybook.js.org](https://storybook.js.org) - ---- - -Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. -You can also build a [static version](https://storybook.js.org/docs/web-components/sharing/publish-storybook) of your storybook and deploy it anywhere you want. - -# Hot Module Reloading (HMR) - -As web components register on a global registry which only accepts a certain name/class once it can lead to errors when using classical HMR. There are ideas on how to archive HMR with a static registry but there is no proven solution yet. Therefore the best approach for now is to do full page reloads. If you keep your stories to specific states of components (which we would recommend anyways) this usually means it is fast. - -# Setup es6/7 dependencies - -By default storybook only works with precompiled ES5 code but as most web components themselves and their libs are distributed as ES2017 you will need to manually mark those packages as "needs transpilation". - -For example if you have a library called `my-library` which is in ES2017 then you can add it like so - -```js -// .storybook/main.js - -module.exports = { - webpackFinal: async (config) => { - // find web-components rule for extra transpilation - const webComponentsRule = config.module.rules.find( - (rule) => rule.use && rule.use.options && rule.use.options.babelrc === false - ); - // add your own `my-library` - webComponentsRule.test.push(new RegExp(`node_modules(\\/|\\\\)my-library(.*)\\.js$`)); - - return config; - }, -}; -``` - -By default the following folders are included - -- `src/*.js` -- `packages/*/src/*.js` -- `node_modules/lit-html/*.js` -- `node_modules/lit-element/*.js` -- `node_modules/@open-wc/*.js` -- `node_modules/@polymer/*.js` -- `node_modules/@vaadin/*.js` - -As you can see the `src` folder is also included. -The reason for that is as it has some extra configuration to allow for example `import.meta`. -If you use a different folder you will need to make sure webpack/babel can handle it. - -# FAQ - -- While working on my component I get the error `Failed to execute 'define' on 'CustomElementRegistry': the name "..." has already been used with this registry` - => please see Setup page reload via HMR diff --git a/app/web-components/bin/build.js b/app/web-components/bin/build.js deleted file mode 100755 index 6ef07a26a9fc..000000000000 --- a/app/web-components/bin/build.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node - -process.env.NODE_ENV = process.env.NODE_ENV || 'production'; -require('../dist/cjs/server/build'); diff --git a/app/web-components/bin/index.js b/app/web-components/bin/index.js deleted file mode 100755 index 8aab7bbceb2b..000000000000 --- a/app/web-components/bin/index.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -require('../dist/cjs/server'); diff --git a/app/web-components/package.json b/app/web-components/package.json deleted file mode 100644 index 8ee26167c130..000000000000 --- a/app/web-components/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "name": "@storybook/web-components", - "version": "6.5.0-rc.1", - "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", - "keywords": [ - "lit-html", - "storybook", - "web-components" - ], - "homepage": "https://github.com/storybookjs/storybook/tree/main/app/web-components", - "bugs": { - "url": "https://github.com/storybookjs/storybook/issues" - }, - "repository": { - "type": "git", - "url": "https://github.com/storybookjs/storybook.git", - "directory": "app/web-components" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/storybook" - }, - "license": "MIT", - "main": "dist/cjs/client/index.js", - "module": "dist/esm/client/index.js", - "types": "dist/ts3.9/client/index.d.ts", - "typesVersions": { - "<3.8": { - "dist/ts3.9/*": [ - "dist/ts3.4/*" - ] - } - }, - "bin": { - "build-storybook": "./bin/build.js", - "start-storybook": "./bin/index.js", - "storybook-server": "./bin/index.js" - }, - "files": [ - "bin/**/*", - "dist/**/*", - "README.md", - "*.js", - "*.d.ts" - ], - "scripts": { - "prepare": "node ../../scripts/prepare.js" - }, - "dependencies": { - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/preset-env": "^7.12.11", - "@storybook/addons": "6.5.0-rc.1", - "@storybook/client-api": "6.5.0-rc.1", - "@storybook/client-logger": "6.5.0-rc.1", - "@storybook/core": "6.5.0-rc.1", - "@storybook/core-common": "6.5.0-rc.1", - "@storybook/csf": "0.0.2--canary.4566f4d.1", - "@storybook/docs-tools": "6.5.0-rc.1", - "@storybook/preview-web": "6.5.0-rc.1", - "@storybook/store": "6.5.0-rc.1", - "@types/node": "^14.14.20 || ^16.0.0", - "@types/webpack-env": "^1.16.0", - "babel-plugin-bundled-import-meta": "^0.3.1", - "core-js": "^3.8.2", - "global": "^4.4.0", - "react": "16.14.0", - "react-dom": "16.14.0", - "read-pkg-up": "^7.0.1", - "regenerator-runtime": "^0.13.7", - "ts-dedent": "^2.0.0" - }, - "devDependencies": { - "lit-html": "2.0.2" - }, - "peerDependencies": { - "lit-html": "^1.4.1 || ^2.0.0" - }, - "engines": { - "node": ">=10.13.0" - }, - "publishConfig": { - "access": "public" - }, - "gitHead": "3f09d4e6b0c655a092dc812488ef2c7ed3808401", - "sbmodern": "dist/modern/client/index.js" -} diff --git a/app/web-components/preset.js b/app/web-components/preset.js deleted file mode 100644 index f09c6698e046..000000000000 --- a/app/web-components/preset.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/cjs/server/preset'); diff --git a/app/web-components/src/client/customElements.ts b/app/web-components/src/client/customElements.ts deleted file mode 100644 index a72b94cbcef2..000000000000 --- a/app/web-components/src/client/customElements.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* eslint-disable no-underscore-dangle */ -/* global window */ - -export function isValidComponent(tagName: string) { - if (!tagName) { - return false; - } - if (typeof tagName === 'string') { - return true; - } - throw new Error('Provided component needs to be a string. e.g. component: "my-element"'); -} - -export function isValidMetaData(customElements: any) { - if (!customElements) { - return false; - } - - if ( - (customElements.tags && Array.isArray(customElements.tags)) || - (customElements.modules && Array.isArray(customElements.modules)) - ) { - return true; - } - throw new Error(`You need to setup valid meta data in your config.js via setCustomElements(). - See the readme of addon-docs for web components for more details.`); -} - -/** - * @param customElements any for now as spec is not super stable yet - */ -export function setCustomElements(customElements: any) { - // @ts-ignore - window.__STORYBOOK_CUSTOM_ELEMENTS__ = customElements; -} - -export function setCustomElementsManifest(customElements: any) { - // @ts-ignore - window.__STORYBOOK_CUSTOM_ELEMENTS_MANIFEST__ = customElements; -} - -export function getCustomElements() { - // @ts-ignore - return window.__STORYBOOK_CUSTOM_ELEMENTS__ || window.__STORYBOOK_CUSTOM_ELEMENTS_MANIFEST__; -} diff --git a/app/web-components/src/client/docs/__testfixtures__/lit-element-demo-card/input.js b/app/web-components/src/client/docs/__testfixtures__/lit-element-demo-card/input.js deleted file mode 100644 index 8ac6852e9117..000000000000 --- a/app/web-components/src/client/docs/__testfixtures__/lit-element-demo-card/input.js +++ /dev/null @@ -1,199 +0,0 @@ -/* eslint-disable import/no-unresolved */ -import global from 'global'; -import { LitElement, html, css } from 'lit-element'; - -const { CustomEvent } = global; - -const demoWcCardStyle = css` - :host { - display: block; - position: relative; - width: 250px; - height: 200px; - border-radius: 10px; - transform-style: preserve-3d; - transition: all 0.8s ease; - } - - .header { - font-weight: bold; - font-size: var(--demo-wc-card-header-font-size, 16px); - text-align: center; - } - - .content { - padding: 20px 10px 0 10px; - flex-grow: 1; - } - - .footer { - display: flex; - } - - dl { - margin: 0; - text-align: left; - } - - dd { - margin-left: 15px; - } - - button { - border-radius: 15px; - width: 30px; - height: 30px; - background: #fff; - border: 1px solid #ccc; - color: #000; - font-size: 21px; - line-height: 27px; - font-weight: bold; - cursor: pointer; - margin: 5px; - } - - .note { - flex-grow: 1; - color: #666; - font-size: 16px; - font-weight: bold; - text-align: left; - padding-top: 15px; - } - - :host([back-side]) { - transform: rotateY(180deg); - } - - #front, - #back { - position: absolute; - width: 250px; - box-sizing: border-box; - box-shadow: #ccc 3px 3px 2px 1px; - padding: 10px; - display: flex; - flex-flow: column; - top: 0; - left: 0; - height: 100%; - border-radius: 10px; - backface-visibility: hidden; - overflow: hidden; - } - - #front { - background: linear-gradient(141deg, #aaa 25%, #eee 40%, #ddd 55%); - color: var(--demo-wc-card-front-color, #000); - } - - #back { - background: linear-gradient(141deg, #333 25%, #aaa 40%, #666 55%); - color: var(--demo-wc-card-back-color, #fff); - text-align: center; - transform: rotateY(180deg) translate3d(0px, 0, 1px); - } - - #back .note { - color: #fff; - } -`; - -/** - * This is a container looking like a card with a back and front side you can switch - * - * @slot - This is an unnamed slot (the default slot) - * @fires side-changed - Fires whenever it switches between front/back - * @cssprop --demo-wc-card-header-font-size - Header font size - * @cssprop --demo-wc-card-front-color - Font color for front - * @cssprop --demo-wc-card-back-color - Font color for back - * @csspart front - Front of the card - * @csspart back - Back of the card - */ -export class DemoWcCard extends LitElement { - static get properties() { - return { - backSide: { - type: Boolean, - reflect: true, - attribute: 'back-side', - }, - header: { type: String }, - rows: { type: Object }, - }; - } - - static get styles() { - return demoWcCardStyle; - } - - constructor() { - super(); - - /** - * Indicates that the back of the card is shown - */ - this.backSide = false; - - /** - * Header message - */ - this.header = 'Your Message'; - - /** - * Data rows - */ - this.rows = []; - } - - toggle() { - this.backSide = !this.backSide; - } - - render() { - return html` -
-
${this.header}
-
- -
- -
-
-
${this.header}
- -
- ${this.rows.length === 0 - ? html`` - : html` -
- ${this.rows.map( - (row) => html` -
${row.header}
-
${row.value}
- ` - )} -
- `} -
- -
- `; - } - - updated(changedProperties) { - if (changedProperties.has('backSide') && changedProperties.get('backSide') !== undefined) { - this.dispatchEvent(new CustomEvent('side-changed')); - } - } -} - -// eslint-disable-next-line no-undef -customElements.define('input', DemoWcCard); diff --git a/app/web-components/src/client/docs/config.ts b/app/web-components/src/client/docs/config.ts deleted file mode 100644 index e0363ff66646..000000000000 --- a/app/web-components/src/client/docs/config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { SourceType, enhanceArgTypes } from '@storybook/docs-tools'; -import { extractArgTypes, extractComponentDescription } from './custom-elements'; -import { sourceDecorator } from './sourceDecorator'; -import { prepareForInline } from './prepareForInline'; - -export const decorators = [sourceDecorator]; - -export const parameters = { - docs: { - extractArgTypes, - extractComponentDescription, - inlineStories: true, - prepareForInline, - source: { - type: SourceType.DYNAMIC, - language: 'html', - }, - }, -}; - -export const argTypesEnhancers = [enhanceArgTypes]; diff --git a/app/web-components/src/client/docs/prepareForInline.ts b/app/web-components/src/client/docs/prepareForInline.ts deleted file mode 100644 index b501854839ed..000000000000 --- a/app/web-components/src/client/docs/prepareForInline.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { PartialStoryFn } from '@storybook/csf'; -import React from 'react'; -import { render } from 'lit-html'; - -import { WebComponentsFramework } from '..'; - -export const prepareForInline = (storyFn: PartialStoryFn) => { - class Story extends React.Component { - wrapperRef = React.createRef(); - - componentDidMount(): void { - render(storyFn(), this.wrapperRef.current); - } - - render(): React.ReactElement { - return React.createElement('div', { ref: this.wrapperRef }); - } - } - - return React.createElement(Story) as unknown as React.CElement<{}, React.Component>; -}; diff --git a/app/web-components/src/client/docs/sourceDecorator.test.ts b/app/web-components/src/client/docs/sourceDecorator.test.ts deleted file mode 100644 index 2612be374199..000000000000 --- a/app/web-components/src/client/docs/sourceDecorator.test.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { html } from 'lit-html'; -import { styleMap } from 'lit-html/directives/style-map'; -import { addons, useEffect } from '@storybook/addons'; -import { SNIPPET_RENDERED } from '@storybook/docs-tools'; -import type { StoryContext, WebComponentsFramework } from '..'; -import { sourceDecorator } from './sourceDecorator'; - -jest.mock('@storybook/addons'); -const mockedAddons = addons as jest.Mocked; -const mockedUseEffect = useEffect as jest.Mock; - -expect.addSnapshotSerializer({ - print: (val: any) => val, - test: (val) => typeof val === 'string', -}); - -const tick = () => new Promise((r) => setTimeout(r, 0)); - -const makeContext = ( - name: string, - parameters: any, - args: any, - extra?: Partial> -) => - ({ - id: `lit-test--${name}`, - kind: 'js-text', - name, - parameters, - args, - argTypes: {}, - globals: {}, - ...extra, - } as StoryContext); - -describe('sourceDecorator', () => { - let mockChannel: { on: jest.Mock; emit?: jest.Mock }; - beforeEach(() => { - mockedAddons.getChannel.mockReset(); - mockedUseEffect.mockImplementation((cb) => setTimeout(cb, 0)); - - mockChannel = { on: jest.fn(), emit: jest.fn() }; - mockedAddons.getChannel.mockReturnValue(mockChannel as any); - }); - - it('should render dynamically for args stories', async () => { - const storyFn = (args: any) => html`
args story
`; - const context = makeContext('args', { __isArgsStory: true }, {}); - sourceDecorator(storyFn, context); - await tick(); - expect(mockChannel.emit).toHaveBeenCalledWith( - SNIPPET_RENDERED, - 'lit-test--args', - '
args story
' - ); - }); - - it('should skip dynamic rendering for no-args stories', async () => { - const storyFn = () => html`
classic story
`; - const context = makeContext('classic', {}, {}); - sourceDecorator(storyFn, context); - await tick(); - expect(mockChannel.emit).not.toHaveBeenCalled(); - }); - - it('should use the originalStoryFn if excludeDecorators is set', async () => { - const storyFn = (args: any) => html`
args story
`; - const decoratedStoryFn = (args: any) => html` -
${storyFn(args)}
- `; - const context = makeContext( - 'args', - { - __isArgsStory: true, - docs: { - source: { - excludeDecorators: true, - }, - }, - }, - {}, - { originalStoryFn: storyFn } - ); - sourceDecorator(decoratedStoryFn, context); - await tick(); - expect(mockChannel.emit).toHaveBeenCalledWith( - SNIPPET_RENDERED, - 'lit-test--args', - '
args story
' - ); - }); - - it('allows the snippet output to be modified by transformSource', async () => { - const storyFn = (args: any) => html`
args story
`; - const transformSource = (dom: string) => `

${dom}

`; - const docs = { transformSource }; - const context = makeContext('args', { __isArgsStory: true, docs }, {}); - sourceDecorator(storyFn, context); - await tick(); - expect(mockChannel.emit).toHaveBeenCalledWith( - SNIPPET_RENDERED, - 'lit-test--args', - '

args story

' - ); - }); - - it('provides the story context to transformSource', () => { - const storyFn = (args: any) => html`
args story
`; - const transformSource = jest.fn((x) => x); - const docs = { transformSource }; - const context = makeContext('args', { __isArgsStory: true, docs }, {}); - sourceDecorator(storyFn, context); - expect(transformSource).toHaveBeenCalledWith('
args story
', context); - }); - - it('should clean lit expression comments', async () => { - const storyFn = (args: any) => html`
${args.slot}
`; - const context = makeContext( - 'args', - { __isArgsStory: true }, - { slot: 'some content' }, - { originalStoryFn: storyFn } - ); - // bind args to storyFn, as it's done in Storybook - const boundStoryFn = storyFn.bind(null, context.args); - sourceDecorator(boundStoryFn, context); - await tick(); - expect(mockChannel.emit).toHaveBeenCalledWith( - SNIPPET_RENDERED, - 'lit-test--args', - '
some content
' - ); - }); -}); diff --git a/app/web-components/src/client/docs/sourceDecorator.ts b/app/web-components/src/client/docs/sourceDecorator.ts deleted file mode 100644 index 0b4b01f25f85..000000000000 --- a/app/web-components/src/client/docs/sourceDecorator.ts +++ /dev/null @@ -1,57 +0,0 @@ -/* global window */ -import { render } from 'lit-html'; -import type { ArgsStoryFn, PartialStoryFn, StoryContext } from '@storybook/csf'; -import { addons, useEffect } from '@storybook/addons'; -import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools'; - -import type { WebComponentsFramework } from '..'; - -// Taken from https://github.com/lit/lit/blob/main/packages/lit-html/src/test/test-utils/strip-markers.ts -const LIT_EXPRESSION_COMMENTS = /|/g; - -function skipSourceRender(context: StoryContext) { - const sourceParams = context?.parameters.docs?.source; - const isArgsStory = context?.parameters.__isArgsStory; - - // always render if the user forces it - if (sourceParams?.type === SourceType.DYNAMIC) { - return false; - } - - // never render if the user is forcing the block to render code, or - // if the user provides code, or if it's not an args story. - return !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE; -} - -function applyTransformSource( - source: string, - context: StoryContext -): string { - const { transformSource } = context.parameters.docs ?? {}; - if (typeof transformSource !== 'function') return source; - return transformSource(source, context); -} - -export function sourceDecorator( - storyFn: PartialStoryFn, - context: StoryContext -): WebComponentsFramework['storyResult'] { - const story = context?.parameters.docs?.source?.excludeDecorators - ? (context.originalStoryFn as ArgsStoryFn)(context.args, context) - : storyFn(); - - let source: string; - useEffect(() => { - if (source) addons.getChannel().emit(SNIPPET_RENDERED, context.id, source); - }); - if (!skipSourceRender(context)) { - const container = window.document.createElement('div'); - render(story, container); - source = applyTransformSource( - container.innerHTML.replace(LIT_EXPRESSION_COMMENTS, ''), - context - ); - } - - return story; -} diff --git a/app/web-components/src/client/index.ts b/app/web-components/src/client/index.ts deleted file mode 100644 index d43a49b2fa31..000000000000 --- a/app/web-components/src/client/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -import global from 'global'; - -const { window, EventSource } = global; - -export { - storiesOf, - setAddon, - addDecorator, - addParameters, - configure, - getStorybook, - forceReRender, - raw, -} from './preview'; - -export { - getCustomElements, - setCustomElements, - setCustomElementsManifest, - isValidComponent, - isValidMetaData, -} from './customElements'; - -export * from './preview/types-6-0'; - -// TODO: disable HMR and do full page loads because of customElements.define -if (module && module.hot && module.hot.decline) { - module.hot.decline(); - - // forcing full reloads for customElements as elements can only be defined once per page - const hmr = new EventSource('__webpack_hmr'); - hmr.addEventListener('message', function fullPageReload(event: { data: string }) { - try { - // Only care for built events. Heartbeats are not parsable so we ignore those - const { action } = JSON.parse(event.data); - if (action === 'built') { - window.location.reload(); - } - } catch (error) { - // Most part we only get here from the data in the server-sent event not being parsable which is ok - } - }); -} diff --git a/app/web-components/src/client/preview/config.ts b/app/web-components/src/client/preview/config.ts deleted file mode 100644 index a8f16dae7703..000000000000 --- a/app/web-components/src/client/preview/config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { renderToDOM } from './render'; - -export const parameters = { framework: 'web-components' }; diff --git a/app/web-components/src/client/preview/globals.ts b/app/web-components/src/client/preview/globals.ts deleted file mode 100644 index 3a96cebeb784..000000000000 --- a/app/web-components/src/client/preview/globals.ts +++ /dev/null @@ -1,5 +0,0 @@ -import global from 'global'; - -const { window: globalWindow } = global; - -globalWindow.STORYBOOK_ENV = 'web-components'; diff --git a/app/web-components/src/client/preview/index.ts b/app/web-components/src/client/preview/index.ts deleted file mode 100644 index ef8fe1cc37e4..000000000000 --- a/app/web-components/src/client/preview/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* eslint-disable prefer-destructuring */ -import { start } from '@storybook/core'; -import type { ClientStoryApi, Loadable } from '@storybook/addons'; - -import './globals'; -import { renderToDOM } from './render'; -import type { IStorybookSection } from './types'; -import type { WebComponentsFramework } from './types-6-0'; - -const framework = 'web-components'; - -interface ClientApi extends ClientStoryApi { - setAddon(addon: any): void; - configure(loader: Loadable, module: NodeModule): void; - getStorybook(): IStorybookSection[]; - clearDecorators(): void; - forceReRender(): void; - raw: () => any; // todo add type -} - -const api = start(renderToDOM); - -export const storiesOf: ClientApi['storiesOf'] = (kind, m) => { - return (api.clientApi.storiesOf(kind, m) as ReturnType).addParameters({ - framework, - }); -}; - -export const configure: ClientApi['configure'] = (...args) => api.configure(framework, ...args); -export const addDecorator: ClientApi['addDecorator'] = api.clientApi - .addDecorator as ClientApi['addDecorator']; -export const addParameters: ClientApi['addParameters'] = api.clientApi - .addParameters as ClientApi['addParameters']; -export const clearDecorators: ClientApi['clearDecorators'] = api.clientApi.clearDecorators; -export const setAddon: ClientApi['setAddon'] = api.clientApi.setAddon; -export const forceReRender: ClientApi['forceReRender'] = api.forceReRender; -export const getStorybook: ClientApi['getStorybook'] = api.clientApi.getStorybook; -export const raw: ClientApi['raw'] = api.clientApi.raw; diff --git a/app/web-components/src/client/preview/render.ts b/app/web-components/src/client/preview/render.ts deleted file mode 100644 index 86a44c81b9d0..000000000000 --- a/app/web-components/src/client/preview/render.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* eslint-disable no-param-reassign */ -import global from 'global'; -import dedent from 'ts-dedent'; -import { render } from 'lit-html'; -// Keep `.js` extension to avoid issue with Webpack (related to export map?) -// eslint-disable-next-line import/extensions -import { isTemplateResult } from 'lit-html/directive-helpers.js'; -import { simulatePageLoad, simulateDOMContentLoaded } from '@storybook/preview-web'; -import { RenderContext } from '@storybook/store'; -import { WebComponentsFramework } from './types-6-0'; - -const { Node } = global; - -export function renderToDOM( - { storyFn, kind, name, showMain, showError, forceRemount }: RenderContext, - domElement: HTMLElement -) { - const element = storyFn(); - - showMain(); - if (isTemplateResult(element)) { - // `render` stores the TemplateInstance in the Node and tries to update based on that. - // Since we reuse `domElement` for all stories, remove the stored instance first. - // But forceRemount means that it's the same story, so we want too keep the state in that case. - if (forceRemount || !domElement.querySelector('[id="root-inner"]')) { - domElement.innerHTML = '
'; - } - const renderTo = domElement.querySelector('[id="root-inner"]'); - - render(element, renderTo as HTMLElement); - simulatePageLoad(domElement); - } else if (typeof element === 'string') { - domElement.innerHTML = element; - simulatePageLoad(domElement); - } else if (element instanceof Node) { - // Don't re-mount the element if it didn't change and neither did the story - if (domElement.firstChild === element && !forceRemount) { - return; - } - - domElement.innerHTML = ''; - domElement.appendChild(element); - simulateDOMContentLoaded(); - } else { - showError({ - title: `Expecting an HTML snippet or DOM node from the story: "${name}" of "${kind}".`, - description: dedent` - Did you forget to return the HTML snippet from the story? - Use "() => " or when defining the story. - `, - }); - } -} diff --git a/app/web-components/src/client/preview/types-6-0.ts b/app/web-components/src/client/preview/types-6-0.ts deleted file mode 100644 index 901b73c907b7..000000000000 --- a/app/web-components/src/client/preview/types-6-0.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { - Args, - ComponentAnnotations, - StoryAnnotations, - AnnotatedStoryFn, -} from '@storybook/csf'; -import type { StoryFnHtmlReturnType } from './types'; - -export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf'; - -export type WebComponentsFramework = { - component: string; - storyResult: StoryFnHtmlReturnType; -}; - -/** - * Metadata to configure the stories for a component. - * - * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export) - */ -export type Meta = ComponentAnnotations; - -/** - * Story function that represents a CSFv2 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type StoryFn = AnnotatedStoryFn; - -/** - * Story function that represents a CSFv3 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type StoryObj = StoryAnnotations; - -/** - * Story function that represents a CSFv2 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - * - * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type. - * - */ -export type Story = StoryFn; diff --git a/app/web-components/src/client/preview/types-7-0.ts b/app/web-components/src/client/preview/types-7-0.ts deleted file mode 100644 index d897ad97a81a..000000000000 --- a/app/web-components/src/client/preview/types-7-0.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { Args } from '@storybook/csf'; - -import type { StoryObj } from './types-6-0'; - -export type { StoryFn, StoryObj, Meta } from './types-6-0'; - -// NOTE these types are reversed from the way they are in types-6-0 and types-6-3 - -/** - * Story function that represents a CSFv3 component example. - * - * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) - */ -export type Story = StoryObj; diff --git a/app/web-components/src/client/preview/types.ts b/app/web-components/src/client/preview/types.ts deleted file mode 100644 index 04cbf9a47e62..000000000000 --- a/app/web-components/src/client/preview/types.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { TemplateResult, SVGTemplateResult } from 'lit-html'; - -export type { RenderContext } from '@storybook/core'; -export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/addons'; - -export type StoryFnHtmlReturnType = string | Node | TemplateResult | SVGTemplateResult; - -export interface IStorybookStory { - name: string; - render: (context: any) => any; -} - -export interface IStorybookSection { - kind: string; - stories: IStorybookStory[]; -} - -export interface ShowErrorArgs { - title: string; - description: string; -} diff --git a/app/web-components/src/server/build.ts b/app/web-components/src/server/build.ts deleted file mode 100755 index d8abf06a4396..000000000000 --- a/app/web-components/src/server/build.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { buildStatic } from '@storybook/core/server'; -import options from './options'; - -buildStatic(options); diff --git a/app/web-components/src/server/framework-preset-web-components-docs.ts b/app/web-components/src/server/framework-preset-web-components-docs.ts deleted file mode 100644 index 31ccb922f3f1..000000000000 --- a/app/web-components/src/server/framework-preset-web-components-docs.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { findDistEsm, StorybookConfig } from '@storybook/core-common'; -import { hasDocsOrControls } from '@storybook/docs-tools'; - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = [], options) => { - if (!hasDocsOrControls(options)) return entry; - return [...entry, findDistEsm(__dirname, 'client/docs/config')]; -}; diff --git a/app/web-components/src/server/framework-preset-web-components.ts b/app/web-components/src/server/framework-preset-web-components.ts deleted file mode 100644 index 19c537420947..000000000000 --- a/app/web-components/src/server/framework-preset-web-components.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { findDistEsm } from '@storybook/core-common'; - -import type { Options, StorybookConfig } from '@storybook/core-common'; -import type { Configuration } from 'webpack'; - -export function webpack(config: Configuration, options: Options) { - const babelrcOptions = options.features?.babelModeV7 ? null : { babelrc: false }; - config.module.rules.push({ - test: [ - new RegExp(`src(.*)\\.js$`), - new RegExp(`packages(\\/|\\\\)*(\\/|\\\\)src(\\/|\\\\)(.*)\\.js$`), - new RegExp(`node_modules(\\/|\\\\)lit-html(.*)\\.js$`), - new RegExp(`node_modules(\\/|\\\\)lit-element(.*)\\.js$`), - new RegExp(`node_modules(\\/|\\\\)@open-wc(.*)\\.js$`), - new RegExp(`node_modules(\\/|\\\\)@polymer(.*)\\.js$`), - new RegExp(`node_modules(\\/|\\\\)@vaadin(.*)\\.js$`), - ], - use: { - loader: require.resolve('babel-loader'), - options: { - plugins: [ - require.resolve('@babel/plugin-syntax-dynamic-import'), - require.resolve('@babel/plugin-syntax-import-meta'), - // webpack does not support import.meta.url yet, so we rewrite them in babel - [require.resolve('babel-plugin-bundled-import-meta'), { importStyle: 'baseURI' }], - ], - presets: [ - [ - require.resolve('@babel/preset-env'), - { - useBuiltIns: 'entry', - corejs: 3, - }, - ], - ], - ...babelrcOptions, - }, - }, - }); - - return config; -} - -export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = []) => { - return [...entry, findDistEsm(__dirname, 'client/preview/config')]; -}; diff --git a/app/web-components/src/server/index.ts b/app/web-components/src/server/index.ts deleted file mode 100755 index 774d96025a84..000000000000 --- a/app/web-components/src/server/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { buildDev } from '@storybook/core/server'; -import options from './options'; - -buildDev(options); diff --git a/app/web-components/src/server/options.ts b/app/web-components/src/server/options.ts deleted file mode 100644 index b94cf9009d76..000000000000 --- a/app/web-components/src/server/options.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { sync } from 'read-pkg-up'; -import type { LoadOptions } from '@storybook/core-common'; - -export default { - packageJson: sync({ cwd: __dirname }).packageJson, - framework: 'web-components', - frameworkPresets: [require.resolve('./preset')], -} as LoadOptions; diff --git a/app/web-components/src/server/preset.ts b/app/web-components/src/server/preset.ts deleted file mode 100644 index 2b8b5f434f7c..000000000000 --- a/app/web-components/src/server/preset.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { StorybookConfig } from '@storybook/core-common'; - -export const addons: StorybookConfig['addons'] = [ - require.resolve('./framework-preset-web-components'), - require.resolve('./framework-preset-web-components-docs'), -]; diff --git a/app/web-components/src/typings.d.ts b/app/web-components/src/typings.d.ts deleted file mode 100644 index d8f7c6f660ad..000000000000 --- a/app/web-components/src/typings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module 'global'; - -// will be provided by the webpack define plugin -declare var NODE_ENV: string | undefined; diff --git a/app/web-components/standalone.js b/app/web-components/standalone.js deleted file mode 100644 index d11a82f79957..000000000000 --- a/app/web-components/standalone.js +++ /dev/null @@ -1,8 +0,0 @@ -const build = require('@storybook/core/standalone'); -const frameworkOptions = require('./dist/cjs/server/options').default; - -async function buildStandalone(options) { - return build(options, frameworkOptions); -} - -module.exports = buildStandalone; diff --git a/app/web-components/tsconfig.json b/app/web-components/tsconfig.json deleted file mode 100644 index a7b3b6102f4c..000000000000 --- a/app/web-components/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "rootDir": "./src", - "types": ["webpack-env", "node"] - }, - "include": ["src/**/*"], - "exclude": ["src/**/*.test.*", "src/__tests__/**/*"] -} diff --git a/app/web-components/types-6-0.d.ts b/app/web-components/types-6-0.d.ts deleted file mode 100644 index b5946b39a8d8..000000000000 --- a/app/web-components/types-6-0.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/ts3.9/client/preview/types-6-0.d'; diff --git a/app/web-components/types-7-0.d.ts b/app/web-components/types-7-0.d.ts deleted file mode 100644 index a6080e072100..000000000000 --- a/app/web-components/types-7-0.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './dist/ts3.9/client/preview/types-7-0.d'; diff --git a/.editorconfig b/code/.editorconfig similarity index 100% rename from .editorconfig rename to code/.editorconfig diff --git a/code/.eslintignore b/code/.eslintignore new file mode 100644 index 000000000000..69b8bfb98ce3 --- /dev/null +++ b/code/.eslintignore @@ -0,0 +1,21 @@ +dist +build +coverage +node_modules +docs/public +storybook-static +built-storybooks +lib/codemod/src/transforms/__testfixtures__ +scripts/storage +scripts/repros-generator +*.bundle.js +*.js.map +ember-output +.yarn +!.remarkrc.js +!.babelrc.js +!.eslintrc.js +!.eslintrc-markdown.js +!.jest.config.js +!.storybook + diff --git a/code/.eslintrc.js b/code/.eslintrc.js new file mode 100644 index 000000000000..9ce44395500f --- /dev/null +++ b/code/.eslintrc.js @@ -0,0 +1,168 @@ +const path = require('path'); + +const scriptPath = path.join(__dirname, '..', 'scripts'); + +module.exports = { + root: true, + extends: [path.join(scriptPath, '.eslintrc.js')], + parserOptions: { + tsconfigRootDir: __dirname, + project: ['./tsconfig.json'], + }, + rules: { + 'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }], + 'eslint-comments/no-unused-disable': 'error', + 'react-hooks/rules-of-hooks': 'off', + 'import/extensions': 'off', // for mjs, we sometimes need extensions + 'jest/no-done-callback': 'off', + '@typescript-eslint/dot-notation': [ + 'error', + { + allowIndexSignaturePropertyAccess: true, + }, + ], + }, + overrides: [ + { + // this package depends on a lot of peerDependencies we don't want to specify, because npm would install them + files: ['**/frameworks/angular/template/**/*'], + rules: { + '@typescript-eslint/no-useless-constructor': 'off', + '@typescript-eslint/dot-notation': 'off', + }, + }, + { + // this package depends on a lot of peerDependencies we don't want to specify, because npm would install them + files: ['**/addons/docs/**/*'], + rules: { + 'import/no-extraneous-dependencies': 'off', + }, + }, + { + files: [ + '*.js', + '*.jsx', + '*.json', + '*.html', + '**/.storybook/*.ts', + '**/.storybook/*.tsx', + 'setup-jest.ts', + ], + parserOptions: { + project: null, + }, + rules: { + // '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/dot-notation': 'off', + '@typescript-eslint/no-implied-eval': 'off', + '@typescript-eslint/no-throw-literal': 'off', + '@typescript-eslint/return-await': 'off', + }, + }, + { + // this package depends on a lot of peerDependencies we don't want to specify, because npm would install them + files: ['**/*.ts', '**/*.tsx'], + rules: { + 'no-shadow': 'off', + '@typescript-eslint/ban-types': 'warn', // should become error, in the future + }, + }, + { + // these packages use pre-bundling, dependencies will be bundled, and will be in devDepenencies + files: ['addons/**/*', 'frameworks/**/*', 'lib/**/*', 'renderers/**/*', 'ui/**/*'], + excludedFiles: ['frameworks/angular/**/*', 'frameworks/ember/**/*', 'lib/core-server/**/*'], + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { bundledDependencies: false, devDependencies: true }, + ], + }, + }, + { + files: ['**/ui/*', '**/ui/.storybook/*'], + rules: { + 'import/no-extraneous-dependencies': ['error', { packageDir: __dirname }], + }, + }, + { + files: [ + '**/__tests__/**', + '**/__testfixtures__/**', + '**/*.test.*', + '**/*.stories.*', + '**/storyshots-*/**/stories/**', + ], + rules: { + '@typescript-eslint/no-empty-function': 'off', + 'import/no-extraneous-dependencies': 'off', + }, + }, + { + files: ['**/__testfixtures__/**'], + rules: { + 'react/forbid-prop-types': 'off', + 'react/no-unused-prop-types': 'off', + 'react/require-default-props': 'off', + }, + }, + { files: '**/.storybook/config.js', rules: { 'global-require': 'off' } }, + { + files: ['**/*.stories.*'], + rules: { + 'no-console': 'off', + }, + }, + { + files: ['**/*.tsx', '**/*.ts'], + rules: { + 'react/require-default-props': 'off', + 'react/prop-types': 'off', // we should use types + 'react/forbid-prop-types': 'off', // we should use types + 'no-dupe-class-members': 'off', // this is called overloads in typescript + 'react/no-unused-prop-types': 'off', // we should use types + 'react/default-props-match-prop-types': 'off', // we should use types + 'import/no-named-as-default': 'warn', + 'import/no-named-as-default-member': 'warn', + 'react/destructuring-assignment': 'warn', + + // This warns about importing interfaces and types in a normal import, it's arguably better to import with the `type` prefix separate from the runtime imports, + // I leave this as a warning right now because we haven't really decided yet, and the codebase is riddled with errors if I set to 'error'. + // It IS set to 'error' for JS files. + 'import/named': 'warn', + }, + }, + { + files: ['**/*.d.ts'], + rules: { + 'vars-on-top': 'off', + 'no-var': 'off', // this is how typescript works + 'spaced-comment': 'off', + }, + }, + { + files: ['**/mithril/**/*'], + rules: { + 'react/no-unknown-property': 'off', // Need to deactivate otherwise eslint replaces some unknown properties with React ones + }, + }, + { + files: ['**/e2e-tests/**/*'], + rules: { + 'jest/no-test-callback': 'off', // These aren't jest tests + }, + }, + { + files: ['**/builder-vite/input/iframe.html'], + rules: { + 'no-undef': 'off', // ignore "window" undef errors + }, + }, + { + // Because those templates reference css files in other directory. + files: ['**/template/cli/**/*'], + rules: { + 'import/no-unresolved': 'off', + }, + }, + ], +}; diff --git a/code/.gitignore b/code/.gitignore new file mode 100644 index 000000000000..2a1fc46598f8 --- /dev/null +++ b/code/.gitignore @@ -0,0 +1,43 @@ +node_modules +*.log +.idea +*.iml +*.sw* +!.swcrc +npm-shrinkwrap.json +dist +.tern-port +*.DS_Store +.cache +.parcel-cache +coverage/ +*.lerna_backup +build +/**/LICENSE +docs/public +package-lock.json +.nvmrc +storybook-static +.jest-test-results.json +lib/*.jar +/false +/addons/docs/common/config-* +built-storybooks +.verdaccio-cache +tsconfig.tsbuildinfo +junit.xml +.next + +/test-results/ +/playwright-results/ +/playwright-report/ +/playwright/.cache/ + + +# Yarn stuff +/**/.yarn/* +!/**/.yarn/releases +!/**/.yarn/plugins +!/**/.yarn/sdks +!/**/.yarn/versions +/**/.pnp.* diff --git a/code/.prettierignore b/code/.prettierignore new file mode 100644 index 000000000000..1b9355bd30fa --- /dev/null +++ b/code/.prettierignore @@ -0,0 +1 @@ +*.mdx diff --git a/.remarkignore b/code/.remarkignore similarity index 100% rename from .remarkignore rename to code/.remarkignore diff --git a/code/.remarkrc.js b/code/.remarkrc.js new file mode 100644 index 000000000000..738218a6db8b --- /dev/null +++ b/code/.remarkrc.js @@ -0,0 +1 @@ +module.exports = require('@storybook/linter-config/remark.config'); diff --git a/code/.swcrc b/code/.swcrc new file mode 100644 index 000000000000..0f49911d3870 --- /dev/null +++ b/code/.swcrc @@ -0,0 +1,24 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "jsc": { + "parser": { + "syntax": "typescript", + "tsx": true + }, + "transform": { + "react": { + "runtime": "classic", + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + "throwIfNamespace": false, + "development": false + } + }, + "target": "es2020", + "loose": false, + "externalHelpers": false, + // Requires v1.2.50 or upper and requires target to be es2016 or upper. + "keepClassNames": false + }, + "minify": false +} \ No newline at end of file diff --git a/code/.vscode/settings.json b/code/.vscode/settings.json new file mode 100644 index 000000000000..bcff3a4a9451 --- /dev/null +++ b/code/.vscode/settings.json @@ -0,0 +1,20 @@ +{ + "eslint.workingDirectories": [".", "../scripts"], + "typescript.tsdk": "node_modules/typescript/lib", + "[javascript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.formatOnSave": true + }, + "[javascriptreact]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.formatOnSave": true + }, + "[typescript]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.formatOnSave": true + }, + "[typescriptreact]": { + "editor.defaultFormatter": "dbaeumer.vscode-eslint", + "editor.formatOnSave": true + } +} diff --git a/code/.yarnrc.yml b/code/.yarnrc.yml new file mode 100644 index 000000000000..cad1ac0f3bf7 --- /dev/null +++ b/code/.yarnrc.yml @@ -0,0 +1,31 @@ +compressionLevel: 0 + +enableGlobalCache: true + +logFilters: + - code: YN0005 + level: discard + - code: YN0076 + level: discard + - level: discard + pattern: '@storybook/root@workspace:.' + - level: discard + pattern: '@workspace:addons/storyshots-*/' + +nodeLinker: node-modules + +npmRegistryServer: 'https://registry.yarnpkg.com' + +plugins: + - path: ../.yarn/plugins/@yarnpkg/plugin-typescript.cjs + spec: '@yarnpkg/plugin-typescript' + - path: ../.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs + spec: '@yarnpkg/plugin-interactive-tools' + - path: ../.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs + spec: '@yarnpkg/plugin-workspace-tools' + +unsafeHttpWhitelist: + - localhost + +yarnPath: ../.yarn/releases/yarn-3.3.0.cjs +installStatePath: '../.yarn/code-install-state.gz' diff --git a/__mocks__/fileMock.js b/code/__mocks__/fileMock.js similarity index 100% rename from __mocks__/fileMock.js rename to code/__mocks__/fileMock.js diff --git a/__mocks__/fs-extra.js b/code/__mocks__/fs-extra.js similarity index 92% rename from __mocks__/fs-extra.js rename to code/__mocks__/fs-extra.js index ebe0d6c11d36..8ec82c844bd6 100644 --- a/__mocks__/fs-extra.js +++ b/code/__mocks__/fs-extra.js @@ -5,7 +5,7 @@ const fs = jest.createMockFromModule('fs-extra'); // `fs` APIs are used. let mockFiles = Object.create(null); -// eslint-disable-next-line no-underscore-dangle +// eslint-disable-next-line no-underscore-dangle, @typescript-eslint/naming-convention function __setMockFiles(newMockFiles) { mockFiles = newMockFiles; } diff --git a/__mocks__/fs.js b/code/__mocks__/fs.js similarity index 90% rename from __mocks__/fs.js rename to code/__mocks__/fs.js index 851b85ee1b83..18710b4986d5 100644 --- a/__mocks__/fs.js +++ b/code/__mocks__/fs.js @@ -5,7 +5,7 @@ const fs = jest.createMockFromModule('fs'); // `fs` APIs are used. let mockFiles = Object.create(null); -// eslint-disable-next-line no-underscore-dangle +// eslint-disable-next-line no-underscore-dangle, @typescript-eslint/naming-convention function __setMockFiles(newMockFiles) { mockFiles = newMockFiles; } diff --git a/__mocks__/htmlMock.js b/code/__mocks__/htmlMock.js similarity index 100% rename from __mocks__/htmlMock.js rename to code/__mocks__/htmlMock.js diff --git a/__mocks__/inject-decorator.angular-stories.txt b/code/__mocks__/inject-decorator.angular-stories.txt similarity index 100% rename from __mocks__/inject-decorator.angular-stories.txt rename to code/__mocks__/inject-decorator.angular-stories.txt diff --git a/__mocks__/inject-decorator.flow-stories.txt b/code/__mocks__/inject-decorator.flow-stories.txt similarity index 100% rename from __mocks__/inject-decorator.flow-stories.txt rename to code/__mocks__/inject-decorator.flow-stories.txt diff --git a/__mocks__/inject-decorator.no-stories.txt b/code/__mocks__/inject-decorator.no-stories.txt similarity index 100% rename from __mocks__/inject-decorator.no-stories.txt rename to code/__mocks__/inject-decorator.no-stories.txt diff --git a/__mocks__/inject-decorator.stories.txt b/code/__mocks__/inject-decorator.stories.txt similarity index 92% rename from __mocks__/inject-decorator.stories.txt rename to code/__mocks__/inject-decorator.stories.txt index a8eb61d2f221..0b3ba7747b1c 100644 --- a/__mocks__/inject-decorator.stories.txt +++ b/code/__mocks__/inject-decorator.stories.txt @@ -1,7 +1,6 @@ import React from 'react'; import { storiesOf } from '@storybook/react'; import { withInfo } from '@storybook/addon-info'; -import { action } from '@storybook/addon-actions'; import { DocgenButton } from '../components/DocgenButton'; import FlowTypeButton from '../components/FlowTypeButton'; @@ -13,19 +12,19 @@ storiesOf('Addons|Info.React Docgen', module) 'Comments from PropType declarations', withInfo( 'Comments above the PropType declarations should be extracted from the React component file itself and rendered in the Info Addon prop table' - )(() => ) + )(() => ) ) .add( 'Comments from Flow declarations', withInfo( 'Comments above the Flow declarations should be extracted from the React component file itself and rendered in the Info Addon prop table' - )(() => ) + )(() => ) ) .add( 'Comments from component declaration', withInfo( 'Comments above the component declaration should be extracted from the React component file itself and rendered below the Info Addon heading' - )(() => ) + )(() => ) ); const markdownDescription = ` @@ -41,7 +40,7 @@ Maybe include a [link](http://storybook.js.org) to your project as well. storiesOf('Addons|Info.Markdown', module).add( 'Displays Markdown in description', - withInfo(markdownDescription)(() => ) + withInfo(markdownDescription)(() => ) ); storiesOf('Addons|Info.Options.inline', module).add( diff --git a/__mocks__/inject-decorator.ts.csf.txt b/code/__mocks__/inject-decorator.ts.csf.txt similarity index 100% rename from __mocks__/inject-decorator.ts.csf.txt rename to code/__mocks__/inject-decorator.ts.csf.txt diff --git a/__mocks__/inject-decorator.ts.txt b/code/__mocks__/inject-decorator.ts.txt similarity index 100% rename from __mocks__/inject-decorator.ts.txt rename to code/__mocks__/inject-decorator.ts.txt diff --git a/__mocks__/inject-decorator.ts.ugly-comments-stories.txt b/code/__mocks__/inject-decorator.ts.ugly-comments-stories.txt similarity index 97% rename from __mocks__/inject-decorator.ts.ugly-comments-stories.txt rename to code/__mocks__/inject-decorator.ts.ugly-comments-stories.txt index ea3a9450889d..b1f6925fba78 100644 --- a/__mocks__/inject-decorator.ts.ugly-comments-stories.txt +++ b/code/__mocks__/inject-decorator.ts.ugly-comments-stories.txt @@ -1,4 +1,3 @@ -/* global window */ /* eslint-disable global-require, import/no-dynamic-require */ import React from 'react'; diff --git a/__mocks__/inject-decorator.ugly-comments-stories.txt b/code/__mocks__/inject-decorator.ugly-comments-stories.txt similarity index 95% rename from __mocks__/inject-decorator.ugly-comments-stories.txt rename to code/__mocks__/inject-decorator.ugly-comments-stories.txt index 926e8cd5e97a..93f2875cc1c2 100644 --- a/__mocks__/inject-decorator.ugly-comments-stories.txt +++ b/code/__mocks__/inject-decorator.ugly-comments-stories.txt @@ -1,4 +1,3 @@ -/* global window */ /* eslint-disable global-require, import/no-dynamic-require */ import React from 'react'; diff --git a/__mocks__/inject-parameters.ts.csf.txt b/code/__mocks__/inject-parameters.ts.csf.txt similarity index 100% rename from __mocks__/inject-parameters.ts.csf.txt rename to code/__mocks__/inject-parameters.ts.csf.txt diff --git a/__mocks__/styleMock.js b/code/__mocks__/styleMock.js similarity index 100% rename from __mocks__/styleMock.js rename to code/__mocks__/styleMock.js diff --git a/code/addons/a11y/README.md b/code/addons/a11y/README.md new file mode 100755 index 000000000000..a5c0375ba85f --- /dev/null +++ b/code/addons/a11y/README.md @@ -0,0 +1,202 @@ +# storybook-addon-a11y + +This Storybook addon can be helpful to make your UI components more accessible. + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +![Screenshot](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/a11y/docs/screenshot.png) + +## Getting started + +First, install the addon. + +```sh +$ yarn add @storybook/addon-a11y --dev +``` + +Add this line to your `main.js` file (create this file inside your Storybook config directory if needed). + +```js +module.exports = { + addons: ['@storybook/addon-a11y'], +}; +``` + +And here's a sample story file to test the addon: + +```js +import React from 'react'; + +export default { + title: 'button', +}; + +export const Accessible = () => ; + +export const Inaccessible = () => ( + +); +``` + +## Handling failing rules + +When Axe reports accessibility violations in stories, there are multiple ways to handle these failures depending on your needs. + +### Story-level overrides + +At the Story level, override rules using `parameters.a11y.config.rules`. + +```js +export const InputWithoutAutofill = () => ; + +InputWithoutAutofill.parameters = { + a11y: { + // Avoid doing this, as it will fully disable all accessibility checks for this story. + disable: true, + + // Instead, override rules 👇 + // axe-core configurationOptions (https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#parameters-1) + config: { + rules: [ + { + // You can exclude some elements from failing a specific rule: + id: 'autocomplete-valid', + selector: '*:not([autocomplete="nope"])', + }, + { + // You can also signify that a violation will need to be fixed in the future + // by overriding the result of a rule to return "Needs Review" + // rather than "Violation" if the rule fails: + id: 'landmark-complementary-is-top-level', + reviewOnFail: true, + }, + ], + }, + }, +}; +``` + +Alternatively, you can disable specific rules in a Story: + +```js +export const Inaccessible = () => ( + +); +Inaccessible.parameters = { + a11y: { + config: { + rules: [{ id: 'color-contrast', enabled: false }], + }, + }, +}; +``` + +Tip: clearly explain in a comment why a rule was overridden, it’ll help you and your team trace back why certain violations aren’t being reported or need to be addressed. For example: + +```js +MyStory.parameters = { + a11y: { + config: { + rules: [ + { + // Allow `autocomplete="nope"` on form elements, + // a workaround to disable autofill in Chrome. + // @link https://bugs.chromium.org/p/chromium/issues/detail?id=468153 + id: 'autocomplete-valid', + selector: '*:not([autocomplete="nope"])', + }, + { + // @fixme Color contrast of subdued text fails, as raised in issue #123. + id: 'color-contrast', + reviewOnFail: true, + }, + ], + }, + }, +}; +``` + +### Global overrides + +When you want to ignore an accessibility rule or change its settings across all stories, set `parameters.a11y.config.rules` in your Storybook’s `preview.ts` file. This can be particularly useful for ignoring false positives commonly reported by Axe. + +```ts +// .storybook/preview.ts + +export const parameters = { + a11y: { + config: { + rules: [ + { + // This tells Axe to run the 'autocomplete-valid' rule on selectors + // that match '*:not([autocomplete="nope"])' (all elements except [autocomplete="nope"]). + // This is the safest way of ignoring a violation across all stories, + // as Axe will only ignore very specific elements and keep reporting + // violations on other elements of this rule. + id: 'autocomplete-valid', + selector: '*:not([autocomplete="nope"])', + }, + { + // To disable a rule across all stories, set `enabled` to `false`. + // Use with caution: all violations of this rule will be ignored! + id: 'autocomplete-valid', + enabled: false, + }, + ], + }, + }, +}; +``` + +### Disabling checks + +If you wish to entirely disable `a11y` checks for a subset of stories, you can control this with story parameters: + +```js +export const MyNonCheckedStory = () => ; +MyNonCheckedStory.parameters = { + // Avoid doing this, as it fully disables all accessibility checks for this story, + // and consider the techniques described above. + a11y: { disable: true }, +}; +``` + +## Parameters + +For more customizability use parameters to configure [aXe options](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure). +You can override these options [at story level too](https://storybook.js.org/docs/react/configure/features-and-behavior#per-story-options). + +```js +import React from 'react'; +import { storiesOf, addDecorator, addParameters } from '@storybook/react'; + +export default { + title: 'button', + parameters: { + a11y: { + // optional selector which element to inspect + element: '#storybook-root', + // axe-core configurationOptions (https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#parameters-1) + config: {}, + // axe-core optionsParameter (https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter) + options: {}, + // optional flag to prevent the automatic check + manual: true, + }, + }, +}; + +export const accessible = () => ; + +export const inaccessible = () => ( + +); +``` + +## Roadmap + +- Make UI accessible +- Show in story where violations are. +- Add more example tests +- Add tests +- Make CI integration possible diff --git a/addons/a11y/docs/screenshot.png b/code/addons/a11y/docs/screenshot.png similarity index 100% rename from addons/a11y/docs/screenshot.png rename to code/addons/a11y/docs/screenshot.png diff --git a/code/addons/a11y/jest.config.js b/code/addons/a11y/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/a11y/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/a11y/manager.js b/code/addons/a11y/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/a11y/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/a11y/package.json b/code/addons/a11y/package.json new file mode 100644 index 000000000000..4f75bbdf293b --- /dev/null +++ b/code/addons/a11y/package.json @@ -0,0 +1,115 @@ +{ + "name": "@storybook/addon-a11y", + "version": "7.0.0-beta.25", + "description": "Test component compliance with web accessibility standards", + "keywords": [ + "a11y", + "accessibility", + "addon", + "storybook", + "valid", + "verify", + "test" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/a11y", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/a11y" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./register": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/addon-highlight": "7.0.0-beta.25", + "@storybook/channels": "7.0.0-beta.25", + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "axe-core": "^4.2.0", + "lodash": "^4.17.21", + "react-resize-detector": "^7.1.2" + }, + "devDependencies": { + "@testing-library/react": "^11.2.2", + "resize-observer-polyfill": "^1.5.1", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx", + "./src/preview.tsx" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Accessibility", + "icon": "https://user-images.githubusercontent.com/263385/101991665-47042f80-3c7c-11eb-8f00-64b5a18f498a.png", + "unsupportedFrameworks": [ + "react-native" + ] + } +} diff --git a/code/addons/a11y/preview.js b/code/addons/a11y/preview.js new file mode 100644 index 000000000000..8de14d30fdfa --- /dev/null +++ b/code/addons/a11y/preview.js @@ -0,0 +1 @@ +import './dist/preview'; diff --git a/addons/a11y/src/a11yRunner.test.ts b/code/addons/a11y/src/a11yRunner.test.ts similarity index 89% rename from addons/a11y/src/a11yRunner.test.ts rename to code/addons/a11y/src/a11yRunner.test.ts index 47d9dac7d209..c1662d39369b 100644 --- a/addons/a11y/src/a11yRunner.test.ts +++ b/code/addons/a11y/src/a11yRunner.test.ts @@ -1,7 +1,7 @@ -import { addons } from '@storybook/addons'; +import { addons } from '@storybook/preview-api'; import { EVENTS } from './constants'; -jest.mock('@storybook/addons'); +jest.mock('@storybook/preview-api'); const mockedAddons = addons as jest.Mocked; describe('a11yRunner', () => { diff --git a/addons/a11y/src/a11yRunner.ts b/code/addons/a11y/src/a11yRunner.ts similarity index 84% rename from addons/a11y/src/a11yRunner.ts rename to code/addons/a11y/src/a11yRunner.ts index 1f4fd7ddeab6..5a71adee35e1 100644 --- a/addons/a11y/src/a11yRunner.ts +++ b/code/addons/a11y/src/a11yRunner.ts @@ -1,7 +1,7 @@ -import global from 'global'; -import { addons } from '@storybook/addons'; +import { global } from '@storybook/global'; +import { addons } from '@storybook/preview-api'; import { EVENTS } from './constants'; -import { A11yParameters } from './params'; +import type { A11yParameters } from './params'; const { document, window: globalWindow } = global; @@ -36,8 +36,13 @@ const run = async (storyId: string) => { channel.emit(EVENTS.RUNNING); const axe = (await import('axe-core')).default; - const { element = '#root', config, options = {} } = input; - const htmlElement = document.querySelector(element); + const { element = '#storybook-root', config, options = {} } = input; + const htmlElement = document.querySelector(element as string); + + if (!htmlElement) { + return; + } + axe.reset(); if (config) { axe.configure(config); @@ -69,9 +74,7 @@ const getParams = async (storyId: string): Promise => { return ( parameters.a11y || { config: {}, - options: { - restoreScroll: true, - }, + options: {}, } ); }; diff --git a/addons/a11y/src/components/A11YPanel.test.tsx b/code/addons/a11y/src/components/A11YPanel.test.tsx similarity index 78% rename from addons/a11y/src/components/A11YPanel.test.tsx rename to code/addons/a11y/src/components/A11YPanel.test.tsx index 7c366377b12d..cb1be531cad3 100644 --- a/addons/a11y/src/components/A11YPanel.test.tsx +++ b/code/addons/a11y/src/components/A11YPanel.test.tsx @@ -2,12 +2,15 @@ import React from 'react'; import { render, waitFor, fireEvent, act } from '@testing-library/react'; import { ThemeProvider, themes, convert } from '@storybook/theming'; -import * as api from '@storybook/api'; +import * as api from '@storybook/manager-api'; import { A11YPanel } from './A11YPanel'; import { EVENTS } from '../constants'; -jest.mock('@storybook/api'); +jest.mock('@storybook/manager-api'); + +global.ResizeObserver = require('resize-observer-polyfill'); + const mockedApi = api as jest.Mocked; const axeResult = { @@ -100,29 +103,27 @@ describe('A11YPanel', () => { }); }); - describe('running', () => { - it('should handle "running" status', async () => { - const emit = jest.fn(); - mockedApi.useChannel.mockReturnValue(emit); - mockedApi.useParameter.mockReturnValue({ manual: true }); - const { getByRole, getByText } = render(); - await waitFor(() => { - const button = getByRole('button', { name: 'Run test' }); - fireEvent.click(button); - }); - await waitFor(() => { - expect(getByText(/Please wait while the accessibility scan is running/)).toBeTruthy(); - expect(emit).toHaveBeenCalledWith(EVENTS.MANUAL, 'jest'); - }); + it('should handle "running" status', async () => { + const emit = jest.fn(); + mockedApi.useChannel.mockReturnValue(emit); + mockedApi.useParameter.mockReturnValue({ manual: true }); + const { getByRole, getByText } = render(); + await waitFor(() => { + const button = getByRole('button', { name: 'Run test' }); + fireEvent.click(button); + }); + await waitFor(() => { + expect(getByText(/Please wait while the accessibility scan is running/)).toBeTruthy(); + expect(emit).toHaveBeenCalledWith(EVENTS.MANUAL, 'jest'); }); + }); - it('should set running status on event', async () => { - const { getByText } = render(); - const useChannelArgs = mockedApi.useChannel.mock.calls[0][0]; - act(() => useChannelArgs[EVENTS.RUNNING]()); - await waitFor(() => { - expect(getByText(/Please wait while the accessibility scan is running/)).toBeTruthy(); - }); + it('should set running status on event', async () => { + const { getByText } = render(); + const useChannelArgs = mockedApi.useChannel.mock.calls[0][0]; + act(() => useChannelArgs[EVENTS.RUNNING]()); + await waitFor(() => { + expect(getByText(/Please wait while the accessibility scan is running/)).toBeTruthy(); }); }); diff --git a/addons/a11y/src/components/A11YPanel.tsx b/code/addons/a11y/src/components/A11YPanel.tsx similarity index 87% rename from addons/a11y/src/components/A11YPanel.tsx rename to code/addons/a11y/src/components/A11YPanel.tsx index 41173cb2afa9..7855cd9396ac 100644 --- a/addons/a11y/src/components/A11YPanel.tsx +++ b/code/addons/a11y/src/components/A11YPanel.tsx @@ -4,14 +4,16 @@ import { styled } from '@storybook/theming'; import { ActionBar, Icons, ScrollArea } from '@storybook/components'; -import { AxeResults } from 'axe-core'; -import { useChannel, useParameter, useStorybookState } from '@storybook/api'; +import type { AxeResults } from 'axe-core'; +import { useChannel, useParameter, useStorybookState } from '@storybook/manager-api'; + import { Report } from './Report'; + import { Tabs } from './Tabs'; import { useA11yContext } from './A11yContext'; import { EVENTS } from '../constants'; -import { A11yParameters } from '../params'; +import type { A11yParameters } from '../params'; export enum RuleType { VIOLATION, @@ -25,23 +27,23 @@ const Icon = styled(Icons)({ marginRight: 4, }); -const RotatingIcon = styled(Icon)<{}>(({ theme }) => ({ +const RotatingIcon = styled(Icon)(({ theme }) => ({ animation: `${theme.animation.rotate360} 1s linear infinite;`, })); -const Passes = styled.span<{}>(({ theme }) => ({ - color: theme.color.positive, +const Passes = styled.span(({ theme }) => ({ + color: theme.color.positiveText, })); -const Violations = styled.span<{}>(({ theme }) => ({ - color: theme.color.negative, +const Violations = styled.span(({ theme }) => ({ + color: theme.color.negativeText, })); -const Incomplete = styled.span<{}>(({ theme }) => ({ - color: theme.color.warning, +const Incomplete = styled.span(({ theme }) => ({ + color: theme.color.warningText, })); -const Centered = styled.span<{}>({ +const Centered = styled.span({ display: 'flex', alignItems: 'center', justifyContent: 'center', @@ -106,7 +108,7 @@ export const A11YPanel: React.FC = () => { 'Rerun tests' ) : ( <> - Tests completed + Tests completed ), onClick: handleManual, @@ -162,8 +164,7 @@ export const A11YPanel: React.FC = () => { )} {status === 'running' && ( - Please wait while the accessibility scan is running - ... + Please wait while the accessibility scan is running ... )} {(status === 'ready' || status === 'ran') && ( diff --git a/addons/a11y/src/components/A11yContext.test.tsx b/code/addons/a11y/src/components/A11yContext.test.tsx similarity index 90% rename from addons/a11y/src/components/A11yContext.test.tsx rename to code/addons/a11y/src/components/A11yContext.test.tsx index a70ced0368a6..0d7db6e8de46 100644 --- a/addons/a11y/src/components/A11yContext.test.tsx +++ b/code/addons/a11y/src/components/A11yContext.test.tsx @@ -1,13 +1,14 @@ import * as React from 'react'; -import { AxeResults } from 'axe-core'; +import type { AxeResults } from 'axe-core'; import { render, act } from '@testing-library/react'; -import * as api from '@storybook/api'; +import * as api from '@storybook/manager-api'; import { STORY_CHANGED } from '@storybook/core-events'; +import { HIGHLIGHT } from '@storybook/addon-highlight'; import { A11yContextProvider, useA11yContext } from './A11yContext'; import { EVENTS } from '../constants'; -jest.mock('@storybook/api'); +jest.mock('@storybook/manager-api'); const mockedApi = api as jest.Mocked; const storyId = 'jest'; @@ -50,16 +51,16 @@ const axeResult: Partial = { }; describe('A11YPanel', () => { + const getCurrentStoryData = jest.fn(); beforeEach(() => { mockedApi.useChannel.mockReset(); - mockedApi.useStorybookState.mockReset(); + mockedApi.useStorybookApi.mockReset(); mockedApi.useAddonState.mockReset(); mockedApi.useAddonState.mockImplementation((_, defaultState) => React.useState(defaultState)); mockedApi.useChannel.mockReturnValue(jest.fn()); - const storyState: Partial = { storyId }; - // Lazy to mock entire state - mockedApi.useStorybookState.mockReturnValue(storyState as any); + getCurrentStoryData.mockReset().mockReturnValue({ id: storyId, type: 'story' }); + mockedApi.useStorybookApi.mockReturnValue({ getCurrentStoryData } as any); }); it('should render children', () => { @@ -97,7 +98,7 @@ describe('A11YPanel', () => { const { rerender } = render(); rerender(); expect(emit).toHaveBeenLastCalledWith( - EVENTS.HIGHLIGHT, + HIGHLIGHT, expect.objectContaining({ color: expect.any(String), elements: [], diff --git a/addons/a11y/src/components/A11yContext.tsx b/code/addons/a11y/src/components/A11yContext.tsx similarity index 84% rename from addons/a11y/src/components/A11yContext.tsx rename to code/addons/a11y/src/components/A11yContext.tsx index 723b4e8962c7..fcd2523164bd 100644 --- a/addons/a11y/src/components/A11yContext.tsx +++ b/code/addons/a11y/src/components/A11yContext.tsx @@ -1,8 +1,9 @@ import * as React from 'react'; import { themes, convert } from '@storybook/theming'; -import { Result } from 'axe-core'; -import { useChannel, useStorybookState, useAddonState } from '@storybook/api'; +import type { Result } from 'axe-core'; +import { useChannel, useAddonState, useStorybookApi } from '@storybook/manager-api'; import { STORY_CHANGED, STORY_RENDERED } from '@storybook/core-events'; +import { HIGHLIGHT } from '@storybook/addon-highlight'; import { ADDON_ID, EVENTS } from '../constants'; export interface Results { @@ -55,7 +56,8 @@ export const A11yContextProvider: React.FC = ({ active const [results, setResults] = useAddonState(ADDON_ID, defaultResult); const [tab, setTab] = React.useState(0); const [highlighted, setHighlighted] = React.useState([]); - const { storyId } = useStorybookState(); + const api = useStorybookApi(); + const storyEntry = api.getCurrentStoryData(); const handleToggleHighlight = React.useCallback((target: string[], highlight: boolean) => { setHighlighted((prevHighlighted) => @@ -76,7 +78,7 @@ export const A11yContextProvider: React.FC = ({ active const handleReset = React.useCallback(() => { setTab(0); setResults(defaultResult); - // Highlights is cleared by a11yHighlights.ts + // Highlights is cleared by addon-highlight }, []); const emit = useChannel({ @@ -85,16 +87,16 @@ export const A11yContextProvider: React.FC = ({ active }); React.useEffect(() => { - emit(EVENTS.HIGHLIGHT, { elements: highlighted, color: colorsByType[tab] }); + emit(HIGHLIGHT, { elements: highlighted, color: colorsByType[tab] }); }, [highlighted, tab]); React.useEffect(() => { - if (active) { - handleRun(storyId); + if (active && storyEntry?.type === 'story') { + handleRun(storyEntry.id); } else { handleClearHighlights(); } - }, [active, handleClearHighlights, emit, storyId]); + }, [active, handleClearHighlights, emit, storyEntry]); if (!active) return null; diff --git a/addons/a11y/src/components/ColorFilters.tsx b/code/addons/a11y/src/components/ColorFilters.tsx similarity index 87% rename from addons/a11y/src/components/ColorFilters.tsx rename to code/addons/a11y/src/components/ColorFilters.tsx index 04c34088b7fd..24c82e9f95cb 100644 --- a/addons/a11y/src/components/ColorFilters.tsx +++ b/code/addons/a11y/src/components/ColorFilters.tsx @@ -52,13 +52,6 @@ export const Filters: React.FC> = (props) => ( values="0.299, 0.587, 0.114, 0, 0 0.299, 0.587, 0.114, 0, 0 0.299, 0.587, 0.114, 0, 0 0, 0, 0, 1, 0" /> - - - ); diff --git a/addons/a11y/src/components/Report/Elements.tsx b/code/addons/a11y/src/components/Report/Elements.tsx similarity index 79% rename from addons/a11y/src/components/Report/Elements.tsx rename to code/addons/a11y/src/components/Report/Elements.tsx index b307ddab62de..d886ff1de323 100644 --- a/addons/a11y/src/components/Report/Elements.tsx +++ b/code/addons/a11y/src/components/Report/Elements.tsx @@ -1,17 +1,19 @@ -import React, { FunctionComponent } from 'react'; +import type { FC } from 'react'; +import React from 'react'; import { styled } from '@storybook/theming'; -import { NodeResult } from 'axe-core'; +import type { NodeResult } from 'axe-core'; import { Rules } from './Rules'; -import { RuleType } from '../A11YPanel'; + +import type { RuleType } from '../A11YPanel'; import HighlightToggle from './HighlightToggle'; const Item = styled.li({ fontWeight: 600, }); -const ItemTitle = styled.span<{}>(({ theme }) => ({ +const ItemTitle = styled.span(({ theme }) => ({ borderBottom: `1px solid ${theme.appBorderColor}`, width: '100%', display: 'flex', @@ -35,7 +37,7 @@ interface ElementProps { type: RuleType; } -const Element: FunctionComponent = ({ element, type }) => { +const Element: FC = ({ element, type }) => { const { any, all, none } = element; const rules = [...any, ...all, ...none]; const highlightToggleId = `${type}-${element.target[0]}`; @@ -58,7 +60,7 @@ interface ElementsProps { type: RuleType; } -export const Elements: FunctionComponent = ({ elements, type }) => ( +export const Elements: FC = ({ elements, type }) => (
    {elements.map((element, index) => ( // eslint-disable-next-line react/no-array-index-key diff --git a/code/addons/a11y/src/components/Report/HighlightToggle.test.tsx b/code/addons/a11y/src/components/Report/HighlightToggle.test.tsx new file mode 100644 index 000000000000..9bda14726da1 --- /dev/null +++ b/code/addons/a11y/src/components/Report/HighlightToggle.test.tsx @@ -0,0 +1,97 @@ +import React from 'react'; +import { render, fireEvent } from '@testing-library/react'; +import type { NodeResult } from 'axe-core'; +import HighlightToggle from './HighlightToggle'; +import { A11yContext } from '../A11yContext'; + +const nodeResult = (target: string): NodeResult => ({ + html: '', + target: [target], + any: [], + all: [], + none: [], +}); + +const defaultProviderValue = { + results: { + passes: [], + incomplete: [], + violations: [], + }, + setResults: jest.fn(), + highlighted: [], + toggleHighlight: jest.fn(), + clearHighlights: jest.fn(), + tab: 0, + setTab: jest.fn(), +}; + +describe('', () => { + it('should render', () => { + const { container } = render( + + ); + expect(container.firstChild).toBeTruthy(); + }); + + it('should be checked when all targets are highlighted', () => { + const { getByRole } = render( + + + + ); + const checkbox = getByRole('checkbox') as HTMLInputElement; + expect(checkbox.checked).toBeTruthy(); + }); + + it('should be mixed when some targets are highlighted', () => { + const { getByRole } = render( + + + + ); + const checkbox = getByRole('checkbox') as HTMLInputElement; + expect(checkbox.indeterminate).toBeTruthy(); + }); + + describe('toggleHighlight', () => { + it.each` + highlighted | elementsToHighlight | expected + ${[]} | ${['#storybook-root']} | ${true} + ${['#storybook-root']} | ${['#storybook-root']} | ${false} + ${['#storybook-root']} | ${['#storybook-root', '#storybook-root1']} | ${true} + `( + 'should be triggered with $expected when highlighted is $highlighted and elementsToHighlight is $elementsToHighlight', + ({ highlighted, elementsToHighlight, expected }) => { + const { getByRole } = render( + + + + ); + const checkbox = getByRole('checkbox') as HTMLInputElement; + fireEvent.click(checkbox); + expect(defaultProviderValue.toggleHighlight).toHaveBeenCalledWith( + elementsToHighlight, + expected + ); + } + ); + }); +}); diff --git a/addons/a11y/src/components/Report/HighlightToggle.tsx b/code/addons/a11y/src/components/Report/HighlightToggle.tsx similarity index 97% rename from addons/a11y/src/components/Report/HighlightToggle.tsx rename to code/addons/a11y/src/components/Report/HighlightToggle.tsx index 7697e0bce891..1c8a1c2f887b 100644 --- a/addons/a11y/src/components/Report/HighlightToggle.tsx +++ b/code/addons/a11y/src/components/Report/HighlightToggle.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { styled } from '@storybook/theming'; -import { NodeResult } from 'axe-core'; +import type { NodeResult } from 'axe-core'; import { useA11yContext } from '../A11yContext'; interface ToggleProps { diff --git a/addons/a11y/src/components/Report/Info.tsx b/code/addons/a11y/src/components/Report/Info.tsx similarity index 77% rename from addons/a11y/src/components/Report/Info.tsx rename to code/addons/a11y/src/components/Report/Info.tsx index 0a8434e96dbf..f6b476715edf 100644 --- a/addons/a11y/src/components/Report/Info.tsx +++ b/code/addons/a11y/src/components/Report/Info.tsx @@ -1,7 +1,8 @@ -import React, { FunctionComponent } from 'react'; +import type { FC } from 'react'; +import React from 'react'; import { styled } from '@storybook/theming'; -import { Result } from 'axe-core'; +import type { Result } from 'axe-core'; const Wrapper = styled.div({ padding: 12, @@ -21,7 +22,7 @@ interface InfoProps { item: Result; } -export const Info: FunctionComponent = ({ item }) => { +export const Info: FC = ({ item }) => { return ( {item.description} diff --git a/addons/a11y/src/components/Report/Item.tsx b/code/addons/a11y/src/components/Report/Item.tsx similarity index 87% rename from addons/a11y/src/components/Report/Item.tsx rename to code/addons/a11y/src/components/Report/Item.tsx index d00cffda1ce2..94a92f26a0ff 100644 --- a/addons/a11y/src/components/Report/Item.tsx +++ b/code/addons/a11y/src/components/Report/Item.tsx @@ -3,14 +3,16 @@ import React, { Fragment, useState } from 'react'; import { styled } from '@storybook/theming'; import { Icons } from '@storybook/components'; -import { Result } from 'axe-core'; +import type { Result } from 'axe-core'; import { Info } from './Info'; + import { Elements } from './Elements'; import { Tags } from './Tags'; -import { RuleType } from '../A11YPanel'; + +import type { RuleType } from '../A11YPanel'; import HighlightToggle from './HighlightToggle'; -const Wrapper = styled.div<{}>(({ theme }) => ({ +const Wrapper = styled.div(({ theme }) => ({ display: 'flex', width: '100%', borderBottom: `1px solid ${theme.appBorderColor}`, @@ -19,18 +21,18 @@ const Wrapper = styled.div<{}>(({ theme }) => ({ }, })); -const Icon = styled(Icons)(({ theme }) => ({ +const Icon = styled(Icons)(({ theme }) => ({ height: 10, width: 10, minWidth: 10, - color: theme.color.mediumdark, + color: theme.textMutedColor, marginRight: 10, transition: 'transform 0.1s ease-in-out', alignSelf: 'center', display: 'inline-flex', })); -const HeaderBar = styled.div<{}>(({ theme }) => ({ +const HeaderBar = styled.div(({ theme }) => ({ padding: theme.layoutMargin, paddingLeft: theme.layoutMargin - 3, lineHeight: '20px', @@ -75,8 +77,7 @@ export const Item = (props: ItemProps) => { onToggle(!open)} role="button"> { return severity.charAt(0).toUpperCase().concat(severity.slice(1)); }; -const Rule: FunctionComponent = ({ rule }) => { +const Rule: FC = ({ rule }) => { + const { ref, width } = useResizeDetector({ + refreshMode: 'debounce', + handleHeight: false, + handleWidth: true, + }); let badgeType: any = null; switch (rule.impact) { case ImpactValue.CRITICAL: @@ -70,14 +76,10 @@ const Rule: FunctionComponent = ({ rule }) => { break; } return ( - - {({ size }) => ( - - {formatSeverityText(rule.impact)} - {rule.message} - - )} - + + {formatSeverityText(rule.impact)} + {rule.message} + ); }; @@ -85,7 +87,7 @@ interface RulesProps { rules: CheckResult[]; } -export const Rules: FunctionComponent = ({ rules }) => { +export const Rules: FC = ({ rules }) => { return ( {rules.map((rule, index) => ( diff --git a/code/addons/a11y/src/components/Report/Tags.tsx b/code/addons/a11y/src/components/Report/Tags.tsx new file mode 100644 index 000000000000..95f08a08a097 --- /dev/null +++ b/code/addons/a11y/src/components/Report/Tags.tsx @@ -0,0 +1,32 @@ +import type { FC } from 'react'; +import React from 'react'; + +import { styled } from '@storybook/theming'; +import type { TagValue } from 'axe-core'; + +const Wrapper = styled.div({ + display: 'flex', + flexWrap: 'wrap', + margin: '12px 0', +}); + +const Item = styled.div(({ theme }) => ({ + margin: '0 6px', + padding: 5, + border: `1px solid ${theme.appBorderColor}`, + borderRadius: theme.appBorderRadius, +})); + +interface TagsProps { + tags: TagValue[]; +} + +export const Tags: FC = ({ tags }) => { + return ( + + {tags.map((tag) => ( + {tag} + ))} + + ); +}; diff --git a/code/addons/a11y/src/components/Report/index.tsx b/code/addons/a11y/src/components/Report/index.tsx new file mode 100644 index 000000000000..d231cc4cf0e2 --- /dev/null +++ b/code/addons/a11y/src/components/Report/index.tsx @@ -0,0 +1,24 @@ +import type { FC } from 'react'; +import React, { Fragment } from 'react'; +import { Placeholder } from '@storybook/components'; +import type { Result } from 'axe-core'; + +import { Item } from './Item'; + +import type { RuleType } from '../A11YPanel'; + +export interface ReportProps { + items: Result[]; + empty: string; + type: RuleType; +} + +export const Report: FC = ({ items, empty, type }) => ( + + {items && items.length ? ( + items.map((item) => ) + ) : ( + {empty} + )} + +); diff --git a/code/addons/a11y/src/components/Tabs.tsx b/code/addons/a11y/src/components/Tabs.tsx new file mode 100644 index 000000000000..ba4a1fb8689a --- /dev/null +++ b/code/addons/a11y/src/components/Tabs.tsx @@ -0,0 +1,147 @@ +import * as React from 'react'; + +import { styled } from '@storybook/theming'; +import type { NodeResult, Result } from 'axe-core'; +import { useResizeDetector } from 'react-resize-detector'; +import HighlightToggle from './Report/HighlightToggle'; + +import type { RuleType } from './A11YPanel'; +import { useA11yContext } from './A11yContext'; + +// TODO: reuse the Tabs component from @storybook/theming instead of re-building identical functionality + +const Container = styled.div({ + width: '100%', + position: 'relative', + minHeight: '100%', +}); + +const HighlightToggleLabel = styled.label(({ theme }) => ({ + cursor: 'pointer', + userSelect: 'none', + color: theme.color.dark, +})); + +const GlobalToggle = styled.div<{ elementWidth: number }>(({ elementWidth, theme }) => { + const maxWidthBeforeBreak = 450; + return { + cursor: 'pointer', + fontSize: 13, + lineHeight: '20px', + padding: elementWidth > maxWidthBeforeBreak ? '10px 15px 10px 0' : '10px 0px 10px 15px', + height: '40px', + border: 'none', + marginTop: elementWidth > maxWidthBeforeBreak ? -40 : 0, + float: elementWidth > maxWidthBeforeBreak ? 'right' : 'left', + display: 'flex', + alignItems: 'center', + width: elementWidth > maxWidthBeforeBreak ? 'auto' : '100%', + borderBottom: elementWidth > maxWidthBeforeBreak ? 'none' : `1px solid ${theme.appBorderColor}`, + + input: { + marginLeft: 10, + marginRight: 0, + marginTop: -1, + marginBottom: 0, + }, + }; +}); + +const Item = styled.button<{ active?: boolean }>( + ({ theme }) => ({ + textDecoration: 'none', + padding: '10px 15px', + cursor: 'pointer', + fontWeight: theme.typography.weight.bold, + fontSize: theme.typography.size.s2 - 1, + lineHeight: 1, + height: 40, + border: 'none', + borderTop: '3px solid transparent', + borderBottom: '3px solid transparent', + background: 'transparent', + + '&:focus': { + outline: '0 none', + borderBottom: `3px solid ${theme.color.secondary}`, + }, + }), + ({ active, theme }) => + active + ? { + opacity: 1, + borderBottom: `3px solid ${theme.color.secondary}`, + } + : {} +); + +const TabsWrapper = styled.div({}); + +const List = styled.div(({ theme }) => ({ + boxShadow: `${theme.appBorderColor} 0 -1px 0 0 inset`, + background: theme.background.app, + display: 'flex', + justifyContent: 'space-between', + whiteSpace: 'nowrap', +})); + +interface TabsProps { + tabs: { + label: JSX.Element; + panel: JSX.Element; + items: Result[]; + type: RuleType; + }[]; +} + +function retrieveAllNodesFromResults(items: Result[]): NodeResult[] { + return items.reduce((acc, item) => acc.concat(item.nodes), [] as NodeResult[]); +} + +export const Tabs: React.FC = ({ tabs }) => { + const { ref, width } = useResizeDetector({ + refreshMode: 'debounce', + handleHeight: false, + handleWidth: true, + }); + const { tab: activeTab, setTab } = useA11yContext(); + + const handleToggle = React.useCallback( + (event: React.SyntheticEvent) => { + setTab(parseInt(event.currentTarget.getAttribute('data-index') || '', 10)); + }, + [setTab] + ); + + const highlightToggleId = `${tabs[activeTab].type}-global-checkbox`; + const highlightLabel = `Highlight results`; + return ( + + + + {tabs.map((tab, index) => ( + + {tab.label} + + ))} + + + {tabs[activeTab].items.length > 0 ? ( + + {highlightLabel} + + + ) : null} + {tabs[activeTab].panel} + + ); +}; diff --git a/addons/a11y/src/components/VisionSimulator.test.tsx b/code/addons/a11y/src/components/VisionSimulator.test.tsx similarity index 94% rename from addons/a11y/src/components/VisionSimulator.test.tsx rename to code/addons/a11y/src/components/VisionSimulator.test.tsx index 9191e058db6f..7c66fb762b64 100644 --- a/addons/a11y/src/components/VisionSimulator.test.tsx +++ b/code/addons/a11y/src/components/VisionSimulator.test.tsx @@ -4,11 +4,13 @@ import userEvent from '@testing-library/user-event'; import { ThemeProvider, themes, convert } from '@storybook/theming'; import { VisionSimulator, baseList } from './VisionSimulator'; -const getOptionByNameAndPercentage = (option: string, percentage: number) => +const getOptionByNameAndPercentage = (option: string, percentage?: number) => screen.getByText( (content, element) => content !== '' && + // @ts-expect-error (TODO) element.textContent === option && + // @ts-expect-error (TODO) (percentage === undefined || element.nextSibling.textContent === `${percentage}% of users`) ); @@ -56,14 +58,15 @@ describe('Vision Simulator', () => { fireEvent.click(screen.getByText('blurred vision')); // then - // eslint-disable-next-line no-undef const rule = Object.values(document.styleSheets) .filter(({ cssRules }) => cssRules) .map(({ cssRules }) => Object.values(cssRules)) .flat() + // @ts-expect-error (TODO) .find((cssRule: CSSRule) => cssRule.selectorText === '#storybook-preview-iframe'); expect(rule).toBeDefined(); + // @ts-expect-error (TODO) expect(rule.style.filter).toBe('blur(2px)'); }); }); diff --git a/addons/a11y/src/components/VisionSimulator.tsx b/code/addons/a11y/src/components/VisionSimulator.tsx similarity index 97% rename from addons/a11y/src/components/VisionSimulator.tsx rename to code/addons/a11y/src/components/VisionSimulator.tsx index 050c9392ecaa..77c8b2bccea0 100644 --- a/addons/a11y/src/components/VisionSimulator.tsx +++ b/code/addons/a11y/src/components/VisionSimulator.tsx @@ -1,4 +1,5 @@ -import React, { ReactNode, useState } from 'react'; +import type { ReactNode } from 'react'; +import React, { useState } from 'react'; import { Global, styled } from '@storybook/theming'; import { Icons, IconButton, WithTooltip, TooltipLinkList } from '@storybook/components'; @@ -19,7 +20,6 @@ export const baseList = [ { name: 'protanopia', percentage: 0.59 }, { name: 'tritanomaly', percentage: 0.01 }, { name: 'tritanopia', percentage: 0.016 }, - { name: 'achromatomaly', percentage: 0.00001 }, { name: 'achromatopsia', percentage: 0.0001 }, { name: 'grayscale' }, ] as Option[]; diff --git a/code/addons/a11y/src/constants.ts b/code/addons/a11y/src/constants.ts new file mode 100755 index 000000000000..11c307c18f86 --- /dev/null +++ b/code/addons/a11y/src/constants.ts @@ -0,0 +1,10 @@ +export const ADDON_ID = 'storybook/a11y'; +export const PANEL_ID = `${ADDON_ID}/panel`; +export const PARAM_KEY = `a11y`; +const RESULT = `${ADDON_ID}/result`; +const REQUEST = `${ADDON_ID}/request`; +const RUNNING = `${ADDON_ID}/running`; +const ERROR = `${ADDON_ID}/error`; +const MANUAL = `${ADDON_ID}/manual`; + +export const EVENTS = { RESULT, REQUEST, RUNNING, ERROR, MANUAL }; diff --git a/code/addons/a11y/src/index.ts b/code/addons/a11y/src/index.ts new file mode 100644 index 000000000000..2e1faac38ebb --- /dev/null +++ b/code/addons/a11y/src/index.ts @@ -0,0 +1,8 @@ +/// + +export { PARAM_KEY } from './constants'; +export * from './params'; + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} diff --git a/addons/a11y/src/manager.test.tsx b/code/addons/a11y/src/manager.test.tsx similarity index 81% rename from addons/a11y/src/manager.test.tsx rename to code/addons/a11y/src/manager.test.tsx index 92ef7866313d..be9f23541285 100644 --- a/addons/a11y/src/manager.test.tsx +++ b/code/addons/a11y/src/manager.test.tsx @@ -1,13 +1,11 @@ -import { addons } from '@storybook/addons'; -import * as api from '@storybook/api'; +import * as api from '@storybook/manager-api'; import { PANEL_ID } from './constants'; import './manager'; -jest.mock('@storybook/api'); -jest.mock('@storybook/addons'); +jest.mock('@storybook/manager-api'); const mockedApi = api as unknown as jest.Mocked; mockedApi.getAddonState = jest.fn(); -const mockedAddons = addons as jest.Mocked; +const mockedAddons = api.addons as jest.Mocked; const registrationImpl = mockedAddons.register.mock.calls[0][1]; describe('A11yManager', () => { @@ -35,7 +33,7 @@ describe('A11yManager', () => { registrationImpl(api as unknown as api.API); const title = mockedAddons.add.mock.calls .map(([_, def]) => def) - .find(({ type }) => type === 'panel').title as Function; + .find(({ type }) => type === 'panel')?.title as Function; // when / then expect(title()).toBe('Accessibility'); @@ -47,7 +45,7 @@ describe('A11yManager', () => { registrationImpl(mockedApi); const title = mockedAddons.add.mock.calls .map(([_, def]) => def) - .find(({ type }) => type === 'panel').title as Function; + .find(({ type }) => type === 'panel')?.title as Function; // when / then expect(title()).toBe('Accessibility (3)'); diff --git a/code/addons/a11y/src/manager.tsx b/code/addons/a11y/src/manager.tsx new file mode 100644 index 000000000000..718766ab07b8 --- /dev/null +++ b/code/addons/a11y/src/manager.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import { addons, types } from '@storybook/manager-api'; +import { ADDON_ID, PANEL_ID, PARAM_KEY } from './constants'; +import { VisionSimulator } from './components/VisionSimulator'; +import { A11YPanel } from './components/A11YPanel'; +import type { Results } from './components/A11yContext'; +import { A11yContextProvider } from './components/A11yContext'; + +addons.register(ADDON_ID, (api) => { + addons.add(PANEL_ID, { + title: '', + type: types.TOOL, + match: ({ viewMode }) => viewMode === 'story', + render: () => , + }); + + addons.add(PANEL_ID, { + title() { + const addonState: Results = api?.getAddonState(ADDON_ID); + const violationsNb = addonState?.violations?.length || 0; + const incompleteNb = addonState?.incomplete?.length || 0; + const totalNb = violationsNb + incompleteNb; + return totalNb !== 0 ? `Accessibility (${totalNb})` : 'Accessibility'; + }, + type: types.PANEL, + render: ({ active = true, key }) => ( + + + + ), + paramKey: PARAM_KEY, + }); +}); diff --git a/addons/a11y/src/params.ts b/code/addons/a11y/src/params.ts similarity index 77% rename from addons/a11y/src/params.ts rename to code/addons/a11y/src/params.ts index fb439ae3f342..4d529eac8503 100644 --- a/addons/a11y/src/params.ts +++ b/code/addons/a11y/src/params.ts @@ -1,4 +1,4 @@ -import { ElementContext, Spec, RunOptions } from 'axe-core'; +import type { ElementContext, Spec, RunOptions } from 'axe-core'; export interface Setup { element?: ElementContext; diff --git a/code/addons/a11y/src/preview.tsx b/code/addons/a11y/src/preview.tsx new file mode 100644 index 000000000000..1325793c119a --- /dev/null +++ b/code/addons/a11y/src/preview.tsx @@ -0,0 +1 @@ +import './a11yRunner'; diff --git a/code/addons/a11y/src/typings.d.ts b/code/addons/a11y/src/typings.d.ts new file mode 100644 index 000000000000..f2db962c4d60 --- /dev/null +++ b/code/addons/a11y/src/typings.d.ts @@ -0,0 +1,2 @@ +/* eslint-disable @typescript-eslint/naming-convention */ +declare var __STORYBOOK_STORY_STORE__: any; diff --git a/code/addons/a11y/template/stories/parameters.stories.ts b/code/addons/a11y/template/stories/parameters.stories.ts new file mode 100644 index 000000000000..0b7f5dcad5b9 --- /dev/null +++ b/code/addons/a11y/template/stories/parameters.stories.ts @@ -0,0 +1,63 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Html, + args: { + content: '', + }, + parameters: { + chromatic: { disable: true }, + }, +}; + +export const Options = { + args: { + content: + '', + }, + parameters: { + a11y: { + config: {}, + options: { + checks: { + 'color-contrast': { enabled: false }, + }, + }, + }, + }, +}; + +export const Config = { + args: { + content: + '', + }, + parameters: { + a11y: { + config: { + rules: [{ id: 'avoid-inline-spacing', options: {} }], + disableOtherRules: true, + }, + options: {}, + }, + }, +}; + +export const Targetted = { + args: { + content: '', + }, + parameters: { + a11y: { + element: '.custom-target', + }, + }, +}; + +export const Disabled = { + parameters: { + a11y: { + disable: true, + }, + }, +}; diff --git a/code/addons/a11y/template/stories/tests.stories.ts b/code/addons/a11y/template/stories/tests.stories.ts new file mode 100644 index 000000000000..407c77bd19f8 --- /dev/null +++ b/code/addons/a11y/template/stories/tests.stories.ts @@ -0,0 +1,65 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Html, + args: { + content: '', + }, + parameters: { + chromatic: { disable: true }, + }, +}; + +export const Violations = { + args: { + content: ` +
    +

    empty heading

    +

    +
    +
    +

    empty button

    + +
    +
    +

    low contrast

    + +
    +
    +

    missing label

    + +
    +
    +

    missing alt

    + +
    + `, + }, +}; + +export const Passes = { + args: { + content: ` +
    +

    heading

    +

    heading 1

    +
    +
    +

    button

    + +
    +
    +

    contrast

    + +
    +
    +

    label

    + +
    +
    +

    alt

    + placeholder +
    + `, + }, +}; diff --git a/code/addons/a11y/tsconfig.json b/code/addons/a11y/tsconfig.json new file mode 100644 index 000000000000..0535ece33606 --- /dev/null +++ b/code/addons/a11y/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "types": ["jest", "@testing-library/jest-dom"], + "strict": true + }, + "include": ["src/**/*"] +} diff --git a/addons/actions/ADVANCED.md b/code/addons/actions/ADVANCED.md similarity index 100% rename from addons/actions/ADVANCED.md rename to code/addons/actions/ADVANCED.md diff --git a/code/addons/actions/README.md b/code/addons/actions/README.md new file mode 100644 index 000000000000..9d78378eb2a8 --- /dev/null +++ b/code/addons/actions/README.md @@ -0,0 +1,27 @@ +# Storybook Addon Actions + +Storybook Addon Actions can be used to display data received by event handlers in [Storybook](https://storybook.js.org). + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +![Screenshot](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/actions/docs/screenshot.png) + +## Installation + +Actions is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run: + +```sh +npm i -D @storybook/addon-actions +``` + +Then, add following content to [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project): + +```js +module.exports = { + addons: ['@storybook/addon-actions'], +}; +``` + +## Usage + +The basic usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/actions). For legacy usage, see the [advanced README](./ADVANCED.md). diff --git a/addons/actions/docs/screenshot.png b/code/addons/actions/docs/screenshot.png similarity index 100% rename from addons/actions/docs/screenshot.png rename to code/addons/actions/docs/screenshot.png diff --git a/code/addons/actions/jest.config.js b/code/addons/actions/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/actions/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/actions/manager.js b/code/addons/actions/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/actions/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/actions/package.json b/code/addons/actions/package.json new file mode 100644 index 000000000000..93a9722f990d --- /dev/null +++ b/code/addons/actions/package.json @@ -0,0 +1,132 @@ +{ + "name": "@storybook/addon-actions", + "version": "7.0.0-beta.25", + "description": "Get UI feedback when an action is performed on an interactive element", + "keywords": [ + "storybook", + "essentials", + "data-state" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/actions", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/actions" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./decorator": { + "require": "./dist/decorator.js", + "import": "./dist/decorator.mjs", + "types": "./dist/decorator.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./register.js": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "dequal": "^2.0.2", + "lodash": "^4.17.21", + "polished": "^4.2.2", + "prop-types": "^15.7.2", + "react-inspector": "^6.0.0", + "telejson": "^7.0.3", + "ts-dedent": "^2.0.0", + "uuid-browser": "^3.1.0" + }, + "devDependencies": { + "@types/lodash": "^4.14.167", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/decorator.ts", + "./src/manager.tsx", + "./src/preview.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Actions", + "unsupportedFrameworks": [ + "react-native" + ], + "icon": "https://user-images.githubusercontent.com/263385/101991666-479cc600-3c7c-11eb-837b-be4e5ffa1bb8.png" + } +} diff --git a/code/addons/actions/preview.js b/code/addons/actions/preview.js new file mode 100644 index 000000000000..49ad602f79f4 --- /dev/null +++ b/code/addons/actions/preview.js @@ -0,0 +1 @@ +export * from './dist/preview'; diff --git a/code/addons/actions/src/addArgs.ts b/code/addons/actions/src/addArgs.ts new file mode 100644 index 000000000000..5742bd8627c0 --- /dev/null +++ b/code/addons/actions/src/addArgs.ts @@ -0,0 +1,7 @@ +import type { ArgsEnhancer } from '@storybook/types'; +import { addActionsFromArgTypes, inferActionsFromArgTypesRegex } from './addArgsHelpers'; + +export const argsEnhancers: ArgsEnhancer[] = [ + addActionsFromArgTypes, + inferActionsFromArgTypesRegex, +]; diff --git a/addons/actions/src/preset/addArgsHelpers.test.ts b/code/addons/actions/src/addArgsHelpers.test.ts similarity index 98% rename from addons/actions/src/preset/addArgsHelpers.test.ts rename to code/addons/actions/src/addArgsHelpers.test.ts index 487dab330305..46318534b132 100644 --- a/addons/actions/src/preset/addArgsHelpers.test.ts +++ b/code/addons/actions/src/addArgsHelpers.test.ts @@ -1,4 +1,4 @@ -import type { StoryContext } from '@storybook/addons'; +import type { StoryContext } from '@storybook/types'; import { inferActionsFromArgTypesRegex, addActionsFromArgTypes } from './addArgsHelpers'; describe('actions parameter enhancers', () => { diff --git a/code/addons/actions/src/addArgsHelpers.ts b/code/addons/actions/src/addArgsHelpers.ts new file mode 100644 index 000000000000..7f56922d3962 --- /dev/null +++ b/code/addons/actions/src/addArgsHelpers.ts @@ -0,0 +1,63 @@ +import type { Args, Renderer, ArgsEnhancer } from '@storybook/types'; +import { action } from './runtime/action'; + +// interface ActionsParameter { +// disable?: boolean; +// argTypesRegex?: RegExp; +// } + +const isInInitialArgs = (name: string, initialArgs: Args) => + typeof initialArgs[name] === 'undefined' && !(name in initialArgs); + +/** + * Automatically add action args for argTypes whose name + * matches a regex, such as `^on.*` for react-style `onClick` etc. + */ + +export const inferActionsFromArgTypesRegex: ArgsEnhancer = (context) => { + const { + initialArgs, + argTypes, + parameters: { actions }, + } = context; + if (!actions || actions.disable || !actions.argTypesRegex || !argTypes) { + return {}; + } + + const argTypesRegex = new RegExp(actions.argTypesRegex); + const argTypesMatchingRegex = Object.entries(argTypes).filter( + ([name]) => !!argTypesRegex.test(name) + ); + + return argTypesMatchingRegex.reduce((acc, [name, argType]) => { + if (isInInitialArgs(name, initialArgs)) { + acc[name] = action(name); + } + return acc; + }, {} as Args); +}; + +/** + * Add action args for list of strings. + */ +export const addActionsFromArgTypes: ArgsEnhancer = (context) => { + const { + initialArgs, + argTypes, + parameters: { actions }, + } = context; + if (actions?.disable || !argTypes) { + return {}; + } + + const argTypesWithAction = Object.entries(argTypes).filter( + ([name, argType]) => !!argType['action'] + ); + + return argTypesWithAction.reduce((acc, [name, argType]) => { + if (isInInitialArgs(name, initialArgs)) { + acc[name] = action(typeof argType['action'] === 'string' ? argType['action'] : name); + } + return acc; + }, {} as Args); +}; diff --git a/code/addons/actions/src/components/ActionLogger/index.tsx b/code/addons/actions/src/components/ActionLogger/index.tsx new file mode 100644 index 000000000000..f4231a8474ff --- /dev/null +++ b/code/addons/actions/src/components/ActionLogger/index.tsx @@ -0,0 +1,59 @@ +import type { FC } from 'react'; +import React, { Fragment } from 'react'; +import { styled, withTheme } from '@storybook/theming'; +import type { Theme } from '@storybook/theming'; + +import { Inspector } from 'react-inspector'; +import { ActionBar, ScrollArea } from '@storybook/components'; + +import { Action, InspectorContainer, Counter } from './style'; +import type { ActionDisplay } from '../../models'; + +const UnstyledWrapped: FC<{ className?: string }> = ({ children, className }) => ( + + {children} + +); +export const Wrapper = styled(UnstyledWrapped)({ + margin: 0, + padding: '10px 5px 20px', +}); + +interface InspectorProps { + theme: Theme & { addonActionsTheme?: string }; + sortObjectKeys: boolean; + showNonenumerable: boolean; + name: any; + data: any; +} + +const ThemedInspector = withTheme(({ theme, ...props }: InspectorProps) => ( + +)); + +interface ActionLoggerProps { + actions: ActionDisplay[]; + onClear: () => void; +} + +export const ActionLogger = ({ actions, onClear }: ActionLoggerProps) => ( + + + {actions.map((action: ActionDisplay) => ( + + {action.count > 1 && {action.count}} + + + + + ))} + + + + +); diff --git a/addons/actions/src/components/ActionLogger/style.tsx b/code/addons/actions/src/components/ActionLogger/style.tsx similarity index 92% rename from addons/actions/src/components/ActionLogger/style.tsx rename to code/addons/actions/src/components/ActionLogger/style.tsx index 4ffe870286c8..76c00e73bcf2 100644 --- a/addons/actions/src/components/ActionLogger/style.tsx +++ b/code/addons/actions/src/components/ActionLogger/style.tsx @@ -11,7 +11,7 @@ export const Action = styled.div({ whiteSpace: 'pre', }); -export const Counter = styled.div<{}>(({ theme }) => ({ +export const Counter = styled.div(({ theme }) => ({ backgroundColor: opacify(0.5, theme.appBorderColor), color: theme.color.inverseText, fontSize: theme.typography.size.s1, diff --git a/addons/actions/src/constants.ts b/code/addons/actions/src/constants.ts similarity index 100% rename from addons/actions/src/constants.ts rename to code/addons/actions/src/constants.ts diff --git a/code/addons/actions/src/containers/ActionLogger/index.tsx b/code/addons/actions/src/containers/ActionLogger/index.tsx new file mode 100644 index 000000000000..5f3a07941a89 --- /dev/null +++ b/code/addons/actions/src/containers/ActionLogger/index.tsx @@ -0,0 +1,92 @@ +import React, { Component } from 'react'; +import { dequal as deepEqual } from 'dequal'; + +import type { API } from '@storybook/manager-api'; +import { STORY_CHANGED } from '@storybook/core-events'; + +import { ActionLogger as ActionLoggerComponent } from '../../components/ActionLogger'; +import { EVENT_ID } from '../..'; +import type { ActionDisplay } from '../../models'; + +interface ActionLoggerProps { + active: boolean; + api: API; +} + +interface ActionLoggerState { + actions: ActionDisplay[]; +} + +const safeDeepEqual = (a: any, b: any): boolean => { + try { + return deepEqual(a, b); + } catch (e) { + return false; + } +}; + +export default class ActionLogger extends Component { + // @ts-expect-error Unused, possibly remove, leaving, because it could be accessed even though it is private + private mounted: boolean; + + constructor(props: ActionLoggerProps) { + super(props); + + this.mounted = false; + + this.state = { actions: [] }; + } + + override componentDidMount() { + this.mounted = true; + const { api } = this.props; + + api.on(EVENT_ID, this.addAction); + api.on(STORY_CHANGED, this.handleStoryChange); + } + + override componentWillUnmount() { + this.mounted = false; + const { api } = this.props; + + api.off(STORY_CHANGED, this.handleStoryChange); + api.off(EVENT_ID, this.addAction); + } + + handleStoryChange = () => { + const { actions } = this.state; + if (actions.length > 0 && actions[0].options.clearOnStoryChange) { + this.clearActions(); + } + }; + + addAction = (action: ActionDisplay) => { + this.setState((prevState: ActionLoggerState) => { + const actions = [...prevState.actions]; + const previous = actions.length && actions[0]; + if (previous && safeDeepEqual(previous.data, action.data)) { + // eslint-disable-next-line no-plusplus + previous.count++; + } else { + // eslint-disable-next-line no-param-reassign + action.count = 1; + actions.unshift(action); + } + return { actions: actions.slice(0, action.options.limit) }; + }); + }; + + clearActions = () => { + this.setState({ actions: [] }); + }; + + override render() { + const { actions = [] } = this.state; + const { active } = this.props; + const props = { + actions, + onClear: this.clearActions, + }; + return active ? : null; + } +} diff --git a/code/addons/actions/src/decorator.ts b/code/addons/actions/src/decorator.ts new file mode 100644 index 000000000000..4851a1bfad85 --- /dev/null +++ b/code/addons/actions/src/decorator.ts @@ -0,0 +1,65 @@ +import { global } from '@storybook/global'; +import { useEffect, makeDecorator } from '@storybook/preview-api'; +import { actions } from './runtime/actions'; + +import { PARAM_KEY } from './constants'; + +const { document, Element } = global; + +const delegateEventSplitter = /^(\S+)\s*(.*)$/; + +const isIE = Element != null && !Element.prototype.matches; +const matchesMethod = isIE ? 'msMatchesSelector' : 'matches'; + +const hasMatchInAncestry = (element: any, selector: any): boolean => { + if (element[matchesMethod](selector)) { + return true; + } + const parent = element.parentElement; + if (!parent) { + return false; + } + return hasMatchInAncestry(parent, selector); +}; + +const createHandlers = (actionsFn: (...arg: any[]) => object, ...handles: any[]) => { + const actionsObject = actionsFn(...handles); + return Object.entries(actionsObject).map(([key, action]) => { + // eslint-disable-next-line @typescript-eslint/naming-convention + const [_, eventName, selector] = key.match(delegateEventSplitter) || []; + return { + eventName, + handler: (e: { target: any }) => { + if (!selector || hasMatchInAncestry(e.target, selector)) { + action(e); + } + }, + }; + }); +}; + +const applyEventHandlers = (actionsFn: any, ...handles: any[]) => { + const root = document && document.getElementById('storybook-root'); + useEffect(() => { + if (root != null) { + const handlers = createHandlers(actionsFn, ...handles); + handlers.forEach(({ eventName, handler }) => root.addEventListener(eventName, handler)); + return () => + handlers.forEach(({ eventName, handler }) => root.removeEventListener(eventName, handler)); + } + return undefined; + }, [root, actionsFn, handles]); +}; + +export const withActions = makeDecorator({ + name: 'withActions', + parameterName: PARAM_KEY, + skipIfNoParametersOrOptions: true, + wrapper: (getStory, context, { parameters }) => { + if (parameters?.['handles']) { + applyEventHandlers(actions, ...parameters['handles']); + } + + return getStory(context); + }, +}); diff --git a/code/addons/actions/src/index.ts b/code/addons/actions/src/index.ts new file mode 100644 index 000000000000..af315cb75436 --- /dev/null +++ b/code/addons/actions/src/index.ts @@ -0,0 +1,9 @@ +/// + +export * from './constants'; +export * from './models'; +export * from './runtime'; + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} diff --git a/code/addons/actions/src/manager.tsx b/code/addons/actions/src/manager.tsx new file mode 100644 index 000000000000..147968d2860a --- /dev/null +++ b/code/addons/actions/src/manager.tsx @@ -0,0 +1,29 @@ +import React, { useState, useEffect } from 'react'; +import { addons, types } from '@storybook/manager-api'; +import { STORY_CHANGED } from '@storybook/core-events'; +import ActionLogger from './containers/ActionLogger'; +import { ADDON_ID, EVENT_ID, PANEL_ID, PARAM_KEY } from './constants'; + +addons.register(ADDON_ID, (api) => { + addons.addPanel(PANEL_ID, { + title() { + const [actionsCount, setActionsCount] = useState(0); + const onEvent = () => setActionsCount((previous) => previous + 1); + const onChange = () => setActionsCount(0); + + useEffect(() => { + api.on(EVENT_ID, onEvent); + api.on(STORY_CHANGED, onChange); + return () => { + api.off(EVENT_ID, onEvent); + api.off(STORY_CHANGED, onChange); + }; + }); + const suffix = actionsCount === 0 ? '' : ` (${actionsCount})`; + return `Actions${suffix}`; + }, + type: types.PANEL, + render: ({ active, key }) => , + paramKey: PARAM_KEY, + }); +}); diff --git a/code/addons/actions/src/models/ActionDisplay.ts b/code/addons/actions/src/models/ActionDisplay.ts new file mode 100644 index 000000000000..356b2127c3b6 --- /dev/null +++ b/code/addons/actions/src/models/ActionDisplay.ts @@ -0,0 +1,11 @@ +import type { ActionOptions } from './ActionOptions'; + +export interface ActionDisplay { + id: string; + data: { + name: string; + args: any[]; + }; + count: number; + options: ActionOptions; +} diff --git a/addons/actions/src/models/ActionOptions.ts b/code/addons/actions/src/models/ActionOptions.ts similarity index 100% rename from addons/actions/src/models/ActionOptions.ts rename to code/addons/actions/src/models/ActionOptions.ts diff --git a/addons/actions/src/models/ActionsFunction.ts b/code/addons/actions/src/models/ActionsFunction.ts similarity index 94% rename from addons/actions/src/models/ActionsFunction.ts rename to code/addons/actions/src/models/ActionsFunction.ts index 8c870cdf5ad1..476c8d91c3fa 100644 --- a/addons/actions/src/models/ActionsFunction.ts +++ b/code/addons/actions/src/models/ActionsFunction.ts @@ -1,5 +1,5 @@ -import { ActionOptions } from './ActionOptions'; -import { ActionsMap } from './ActionsMap'; +import type { ActionOptions } from './ActionOptions'; +import type { ActionsMap } from './ActionsMap'; export interface ActionsFunction { (handlerMap: Record, options?: ActionOptions): ActionsMap; diff --git a/code/addons/actions/src/models/ActionsMap.ts b/code/addons/actions/src/models/ActionsMap.ts new file mode 100644 index 000000000000..962f3bb01104 --- /dev/null +++ b/code/addons/actions/src/models/ActionsMap.ts @@ -0,0 +1,3 @@ +import type { HandlerFunction } from './HandlerFunction'; + +export type ActionsMap = Record; diff --git a/addons/actions/src/models/DecoratorFunction.ts b/code/addons/actions/src/models/DecoratorFunction.ts similarity index 100% rename from addons/actions/src/models/DecoratorFunction.ts rename to code/addons/actions/src/models/DecoratorFunction.ts diff --git a/addons/actions/src/models/HandlerFunction.ts b/code/addons/actions/src/models/HandlerFunction.ts similarity index 100% rename from addons/actions/src/models/HandlerFunction.ts rename to code/addons/actions/src/models/HandlerFunction.ts diff --git a/addons/actions/src/models/index.ts b/code/addons/actions/src/models/index.ts similarity index 100% rename from addons/actions/src/models/index.ts rename to code/addons/actions/src/models/index.ts diff --git a/code/addons/actions/src/preview.ts b/code/addons/actions/src/preview.ts new file mode 100644 index 000000000000..7a06751b46dd --- /dev/null +++ b/code/addons/actions/src/preview.ts @@ -0,0 +1 @@ +export * from './addArgs'; diff --git a/addons/actions/src/preview/__tests__/action.test.js b/code/addons/actions/src/runtime/__tests__/action.test.js similarity index 97% rename from addons/actions/src/preview/__tests__/action.test.js rename to code/addons/actions/src/runtime/__tests__/action.test.js index d89b120476b9..4f8f86761065 100644 --- a/addons/actions/src/preview/__tests__/action.test.js +++ b/code/addons/actions/src/runtime/__tests__/action.test.js @@ -1,7 +1,7 @@ -import { addons } from '@storybook/addons'; +import { addons } from '@storybook/preview-api'; import { action, configureActions } from '../..'; -jest.mock('@storybook/addons'); +jest.mock('@storybook/preview-api'); const createChannel = () => { const channel = { emit: jest.fn() }; diff --git a/addons/actions/src/preview/__tests__/actions.test.js b/code/addons/actions/src/runtime/__tests__/actions.test.js similarity index 97% rename from addons/actions/src/preview/__tests__/actions.test.js rename to code/addons/actions/src/runtime/__tests__/actions.test.js index a9cd65c80ed8..b3e1ae2779ad 100644 --- a/addons/actions/src/preview/__tests__/actions.test.js +++ b/code/addons/actions/src/runtime/__tests__/actions.test.js @@ -1,7 +1,7 @@ -import { addons } from '@storybook/addons'; +import { addons } from '@storybook/preview-api'; import { actions } from '../..'; -jest.mock('@storybook/addons'); +jest.mock('@storybook/preview-api'); const createChannel = () => { const channel = { emit: jest.fn() }; diff --git a/addons/actions/src/preview/__tests__/configureActions.test.js b/code/addons/actions/src/runtime/__tests__/configureActions.test.js similarity index 100% rename from addons/actions/src/preview/__tests__/configureActions.test.js rename to code/addons/actions/src/runtime/__tests__/configureActions.test.js diff --git a/addons/actions/src/preview/action.ts b/code/addons/actions/src/runtime/action.ts similarity index 91% rename from addons/actions/src/preview/action.ts rename to code/addons/actions/src/runtime/action.ts index c8af13de05d1..3a0fc25e9cd2 100644 --- a/addons/actions/src/preview/action.ts +++ b/code/addons/actions/src/runtime/action.ts @@ -1,7 +1,7 @@ import uuidv4 from 'uuid-browser/v4'; -import { addons } from '@storybook/addons'; +import { addons } from '@storybook/preview-api'; import { EVENT_ID } from '../constants'; -import { ActionDisplay, ActionOptions, HandlerFunction } from '../models'; +import type { ActionDisplay, ActionOptions, HandlerFunction } from '../models'; import { config } from './configureActions'; type SyntheticEvent = any; // import('react').SyntheticEvent; @@ -20,6 +20,7 @@ const isReactSyntheticEvent = (e: unknown): e is SyntheticEvent => const serializeArg = (a: T) => { if (isReactSyntheticEvent(a)) { const e: SyntheticEvent = Object.create( + // @ts-expect-error (Converted from ts-ignore) a.constructor.prototype, Object.getOwnPropertyDescriptors(a) ); @@ -63,6 +64,7 @@ export function action(name: string, options: ActionOptions = {}): HandlerFuncti }; channel.emit(EVENT_ID, actionDisplayToEmit); }; + handler.isAction = true; return handler; } diff --git a/addons/actions/src/preview/actions.ts b/code/addons/actions/src/runtime/actions.ts similarity index 92% rename from addons/actions/src/preview/actions.ts rename to code/addons/actions/src/runtime/actions.ts index 9e595ed7a151..3deeb185e641 100644 --- a/addons/actions/src/preview/actions.ts +++ b/code/addons/actions/src/runtime/actions.ts @@ -1,5 +1,5 @@ import { action } from './action'; -import { ActionsFunction, ActionOptions, ActionsMap } from '../models'; +import type { ActionsFunction, ActionOptions, ActionsMap } from '../models'; import { config } from './configureActions'; export const actions: ActionsFunction = (...args: any[]) => { diff --git a/addons/actions/src/preview/configureActions.ts b/code/addons/actions/src/runtime/configureActions.ts similarity index 81% rename from addons/actions/src/preview/configureActions.ts rename to code/addons/actions/src/runtime/configureActions.ts index 24a31b5d60b1..60bcc01baef5 100644 --- a/addons/actions/src/preview/configureActions.ts +++ b/code/addons/actions/src/runtime/configureActions.ts @@ -1,4 +1,4 @@ -import { ActionOptions } from '../models'; +import type { ActionOptions } from '../models'; export const config: ActionOptions = { depth: 10, diff --git a/code/addons/actions/src/runtime/index.ts b/code/addons/actions/src/runtime/index.ts new file mode 100644 index 000000000000..2edbd87475e9 --- /dev/null +++ b/code/addons/actions/src/runtime/index.ts @@ -0,0 +1,3 @@ +export * from './action'; +export * from './actions'; +export * from './configureActions'; diff --git a/code/addons/actions/src/typings.d.ts b/code/addons/actions/src/typings.d.ts new file mode 100644 index 000000000000..331fb83df5f4 --- /dev/null +++ b/code/addons/actions/src/typings.d.ts @@ -0,0 +1,2 @@ +// TODO: following packages need definition files or a TS migration +declare module 'uuid-browser/v4'; diff --git a/code/addons/actions/template/stories/argtype.stories.ts b/code/addons/actions/template/stories/argtype.stories.ts new file mode 100644 index 000000000000..352bc74f1311 --- /dev/null +++ b/code/addons/actions/template/stories/argtype.stories.ts @@ -0,0 +1,26 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + argTypes: { + onClick: {}, + }, + parameters: { + chromatic: { disable: true }, + actions: { argTypesRegex: '^on.*' }, + }, +}; + +export const String = { + argTypes: { + onClick: { action: 'clicked!' }, + }, +}; +export const Boolean = { + argTypes: { + onClick: { action: true }, + }, +}; diff --git a/code/addons/actions/template/stories/basics.stories.ts b/code/addons/actions/template/stories/basics.stories.ts new file mode 100644 index 000000000000..4b6eba0ae430 --- /dev/null +++ b/code/addons/actions/template/stories/basics.stories.ts @@ -0,0 +1,99 @@ +import { global as globalThis } from '@storybook/global'; + +import { action } from '@storybook/addon-actions'; + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + parameters: { + chromatic: { disable: true }, + }, +}; + +export const Basic = { + args: { onClick: action('onClick') }, +}; + +export const TypeString = { + args: { onClick: () => action('onClick')('string') }, +}; +export const TypeBoolean = { + args: { onClick: () => action('onClick')(false) }, +}; +export const TypeObject = { + args: { onClick: () => action('onClick')({}) }, +}; +export const TypeNull = { + args: { onClick: () => action('onClick')(null) }, +}; +export const TypeUndefined = { + args: { onClick: () => action('onClick')(undefined) }, +}; +export const TypeNaN = { + args: { onClick: () => action('onClick')(NaN) }, +}; +export const TypeInfinity = { + args: { onClick: () => action('onClick')(Infinity) }, +}; +export const TypeMinusInfinity = { + args: { onClick: () => action('onClick')(-Infinity) }, +}; +export const TypeNumber = { + args: { onClick: () => action('onClick')(10000) }, +}; +export const TypeGlobal = { + args: { onClick: () => action('onClick')(globalThis) }, +}; +export const TypeSymbol = { + args: { onClick: () => action('onClick')(Symbol('MySymbol')) }, +}; +export const TypeRegExp = { + args: { onClick: () => action('onClick')(new RegExp('MyRegExp')) }, +}; +export const TypeArray = { + args: { onClick: () => action('onClick')(['a', 'b', 'c']) }, +}; +export const TypeClass = { + args: { onClick: () => action('onClick')(class MyClass {}) }, +}; +export const TypeFunction = { + args: { onClick: () => action('onClick')(function MyFunction() {}) }, +}; +export const TypeMultiple = { + args: { onClick: () => action('onClick')('string', true, false, null, undefined, [], {}) }, +}; + +export const Cyclical = { + args: { + onClick: () => + action('onClick')( + (() => { + const cyclical: Record = {}; + cyclical.cyclical = cyclical; + return cyclical; + })() + ), + }, +}; + +export const Reserved = { + args: { onClick: action('delete') }, +}; + +export const OptionPersist = { + args: { onClick: action('onClick', { clearOnStoryChange: false }) }, +}; +export const OptionDepth = { + args: { onClick: action('onClick', { depth: 2 }) }, +}; + +export const Disabled = { + args: { onClick: action('onCLick') }, + parameters: { + actions: { + disabled: true, + }, + }, +}; diff --git a/code/addons/actions/template/stories/configs.stories.ts b/code/addons/actions/template/stories/configs.stories.ts new file mode 100644 index 000000000000..e52c17606bb6 --- /dev/null +++ b/code/addons/actions/template/stories/configs.stories.ts @@ -0,0 +1,36 @@ +import { global as globalThis } from '@storybook/global'; + +import { actions, configureActions } from '@storybook/addon-actions'; + +const configs = actions('actionA', 'actionB', 'actionC'); + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + parameters: { + chromatic: { disable: true }, + }, +}; + +export const ActionA = { + args: { onClick: configs.actionA }, +}; +export const ActionB = { + args: { onClick: configs.actionB }, +}; +export const ActionC = { + args: { onClick: configs.actionC }, +}; + +export const ConfigureActions = { + args: { onClick: configs.actionA }, + decorators: [ + (storyFn: any) => { + configureActions({ depth: 2 }); + + return storyFn(); + }, + ], +}; diff --git a/code/addons/actions/template/stories/parameters.stories.ts b/code/addons/actions/template/stories/parameters.stories.ts new file mode 100644 index 000000000000..e4a5bf0ef9dd --- /dev/null +++ b/code/addons/actions/template/stories/parameters.stories.ts @@ -0,0 +1,19 @@ +import { global as globalThis } from '@storybook/global'; +import { withActions } from '@storybook/addon-actions/decorator'; + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + parameters: { + chromatic: { disable: true }, + }, +}; + +export const Basic = { + parameters: { + handles: [{ click: 'clicked', contextmenu: 'right clicked' }], + }, + decorators: [withActions], +}; diff --git a/code/addons/actions/tsconfig.json b/code/addons/actions/tsconfig.json new file mode 100644 index 000000000000..a4429176e35f --- /dev/null +++ b/code/addons/actions/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true + }, + "include": ["src/**/*"] +} diff --git a/code/addons/backgrounds/README.md b/code/addons/backgrounds/README.md new file mode 100644 index 000000000000..d261edfcb94a --- /dev/null +++ b/code/addons/backgrounds/README.md @@ -0,0 +1,29 @@ +# Storybook Addon Backgrounds + +Storybook Addon Backgrounds can be used to change background colors inside the preview in [Storybook](https://storybook.js.org). + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +![React Storybook Screenshot](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/backgrounds/docs/addon-backgrounds.gif) + +## Installation + +Backgrounds is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run: + +```sh +npm i -D @storybook/addon-backgrounds +``` + +## Configuration + +Then, add following content to [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project): + +```js +module.exports = { + addons: ['@storybook/addon-backgrounds'], +}; +``` + +## Usage + +The usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/backgrounds). diff --git a/addons/backgrounds/docs/addon-backgrounds.gif b/code/addons/backgrounds/docs/addon-backgrounds.gif similarity index 100% rename from addons/backgrounds/docs/addon-backgrounds.gif rename to code/addons/backgrounds/docs/addon-backgrounds.gif diff --git a/code/addons/backgrounds/jest.config.js b/code/addons/backgrounds/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/backgrounds/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/backgrounds/manager.js b/code/addons/backgrounds/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/backgrounds/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/backgrounds/package.json b/code/addons/backgrounds/package.json new file mode 100644 index 000000000000..0cd6b18e5d67 --- /dev/null +++ b/code/addons/backgrounds/package.json @@ -0,0 +1,123 @@ +{ + "name": "@storybook/addon-backgrounds", + "version": "7.0.0-beta.25", + "description": "Switch backgrounds to view components in different settings", + "keywords": [ + "addon", + "background", + "react", + "storybook", + "essentials", + "design" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/backgrounds", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/backgrounds" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "author": "jbaxleyiii", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./register": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "memoizerific": "^1.11.3", + "ts-dedent": "^2.0.0" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx", + "./src/preview.tsx" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Backgrounds", + "icon": "https://user-images.githubusercontent.com/263385/101991667-479cc600-3c7c-11eb-96d3-410e936252e7.png", + "unsupportedFrameworks": [ + "react-native" + ] + } +} diff --git a/code/addons/backgrounds/preview.js b/code/addons/backgrounds/preview.js new file mode 100644 index 000000000000..49ad602f79f4 --- /dev/null +++ b/code/addons/backgrounds/preview.js @@ -0,0 +1 @@ +export * from './dist/preview'; diff --git a/addons/backgrounds/src/components/ColorIcon.tsx b/code/addons/backgrounds/src/components/ColorIcon.tsx similarity index 100% rename from addons/backgrounds/src/components/ColorIcon.tsx rename to code/addons/backgrounds/src/components/ColorIcon.tsx diff --git a/addons/backgrounds/src/constants.ts b/code/addons/backgrounds/src/constants.ts similarity index 100% rename from addons/backgrounds/src/constants.ts rename to code/addons/backgrounds/src/constants.ts diff --git a/addons/backgrounds/src/containers/BackgroundSelector.tsx b/code/addons/backgrounds/src/containers/BackgroundSelector.tsx similarity index 90% rename from addons/backgrounds/src/containers/BackgroundSelector.tsx rename to code/addons/backgrounds/src/containers/BackgroundSelector.tsx index 269b7fed32a7..ef1d9c1caed5 100644 --- a/addons/backgrounds/src/containers/BackgroundSelector.tsx +++ b/code/addons/backgrounds/src/containers/BackgroundSelector.tsx @@ -1,13 +1,19 @@ -import React, { FunctionComponent, Fragment, useCallback, useMemo, memo } from 'react'; +import type { FC } from 'react'; +import React, { Fragment, useCallback, useMemo, memo } from 'react'; import memoize from 'memoizerific'; -import { useParameter, useGlobals } from '@storybook/api'; +import { useParameter, useGlobals } from '@storybook/manager-api'; import { logger } from '@storybook/client-logger'; import { Icons, IconButton, WithTooltip, TooltipLinkList } from '@storybook/components'; import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants'; import { ColorIcon } from '../components/ColorIcon'; -import { BackgroundSelectorItem, Background, BackgroundsParameter, GlobalState } from '../types'; +import type { + BackgroundSelectorItem, + Background, + BackgroundsParameter, + GlobalState, +} from '../types'; import { getBackgroundColorByName } from '../helpers'; const createBackgroundSelectorItem = memoize(1000)( @@ -71,7 +77,7 @@ const DEFAULT_BACKGROUNDS_CONFIG: BackgroundsParameter = { values: [], }; -export const BackgroundSelector: FunctionComponent = memo(() => { +export const BackgroundSelector: FC = memo(function BackgroundSelector() { const backgroundsConfig = useParameter( BACKGROUNDS_PARAM_KEY, DEFAULT_BACKGROUNDS_CONFIG diff --git a/addons/backgrounds/src/containers/GridSelector.tsx b/code/addons/backgrounds/src/containers/GridSelector.tsx similarity index 78% rename from addons/backgrounds/src/containers/GridSelector.tsx rename to code/addons/backgrounds/src/containers/GridSelector.tsx index 5ab21e54ffc3..80d6477884b4 100644 --- a/addons/backgrounds/src/containers/GridSelector.tsx +++ b/code/addons/backgrounds/src/containers/GridSelector.tsx @@ -1,11 +1,12 @@ -import React, { FunctionComponent, memo } from 'react'; +import type { FC } from 'react'; +import React, { memo } from 'react'; -import { useGlobals, useParameter } from '@storybook/api'; +import { useGlobals, useParameter } from '@storybook/manager-api'; import { Icons, IconButton } from '@storybook/components'; import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants'; -export const GridSelector: FunctionComponent = memo(() => { +export const GridSelector: FC = memo(function GridSelector() { const [globals, updateGlobals] = useGlobals(); const { grid } = useParameter(BACKGROUNDS_PARAM_KEY, { diff --git a/addons/backgrounds/src/decorators/withBackground.ts b/code/addons/backgrounds/src/decorators/withBackground.ts similarity index 88% rename from addons/backgrounds/src/decorators/withBackground.ts rename to code/addons/backgrounds/src/decorators/withBackground.ts index 391ecb0e28a2..10d2df3a8a28 100644 --- a/addons/backgrounds/src/decorators/withBackground.ts +++ b/code/addons/backgrounds/src/decorators/withBackground.ts @@ -1,5 +1,5 @@ -import { useMemo, useEffect } from '@storybook/addons'; -import type { AnyFramework, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/csf'; +import { useMemo, useEffect } from '@storybook/preview-api'; +import type { Renderer, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/types'; import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants'; import { @@ -10,8 +10,8 @@ import { } from '../helpers'; export const withBackground = ( - StoryFn: StoryFunction, - context: StoryContext + StoryFn: StoryFunction, + context: StoryContext ) => { const { globals, parameters } = context; const globalsBackgroundColor = globals[BACKGROUNDS_PARAM_KEY]?.value; diff --git a/code/addons/backgrounds/src/decorators/withGrid.ts b/code/addons/backgrounds/src/decorators/withGrid.ts new file mode 100644 index 000000000000..e262c847727b --- /dev/null +++ b/code/addons/backgrounds/src/decorators/withGrid.ts @@ -0,0 +1,60 @@ +import { useMemo, useEffect } from '@storybook/preview-api'; +import type { Renderer, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/types'; + +import { clearStyles, addGridStyle } from '../helpers'; +import { PARAM_KEY as BACKGROUNDS_PARAM_KEY } from '../constants'; + +export const withGrid = (StoryFn: StoryFunction, context: StoryContext) => { + const { globals, parameters } = context; + const gridParameters = parameters[BACKGROUNDS_PARAM_KEY].grid; + const isActive = globals[BACKGROUNDS_PARAM_KEY]?.grid === true && gridParameters.disable !== true; + const { cellAmount, cellSize, opacity } = gridParameters; + const isInDocs = context.viewMode === 'docs'; + + const isLayoutPadded = parameters.layout === undefined || parameters.layout === 'padded'; + // 16px offset in the grid to account for padded layout + const defaultOffset = isLayoutPadded ? 16 : 0; + const offsetX = gridParameters.offsetX ?? (isInDocs ? 20 : defaultOffset); + const offsetY = gridParameters.offsetY ?? (isInDocs ? 20 : defaultOffset); + + const gridStyles = useMemo(() => { + const selector = + context.viewMode === 'docs' ? `#anchor--${context.id} .docs-story` : '.sb-show-main'; + + const backgroundSize = [ + `${cellSize * cellAmount}px ${cellSize * cellAmount}px`, + `${cellSize * cellAmount}px ${cellSize * cellAmount}px`, + `${cellSize}px ${cellSize}px`, + `${cellSize}px ${cellSize}px`, + ].join(', '); + + return ` + ${selector} { + background-size: ${backgroundSize} !important; + background-position: ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px, ${offsetX}px ${offsetY}px !important; + background-blend-mode: difference !important; + background-image: linear-gradient(rgba(130, 130, 130, ${opacity}) 1px, transparent 1px), + linear-gradient(90deg, rgba(130, 130, 130, ${opacity}) 1px, transparent 1px), + linear-gradient(rgba(130, 130, 130, ${opacity / 2}) 1px, transparent 1px), + linear-gradient(90deg, rgba(130, 130, 130, ${ + opacity / 2 + }) 1px, transparent 1px) !important; + } + `; + }, [cellSize]); + + useEffect(() => { + const selectorId = + context.viewMode === 'docs' + ? `addon-backgrounds-grid-docs-${context.id}` + : `addon-backgrounds-grid`; + if (!isActive) { + clearStyles(selectorId); + return; + } + + addGridStyle(selectorId, gridStyles); + }, [isActive, gridStyles, context]); + + return StoryFn(); +}; diff --git a/code/addons/backgrounds/src/helpers/index.ts b/code/addons/backgrounds/src/helpers/index.ts new file mode 100644 index 000000000000..39065eec6648 --- /dev/null +++ b/code/addons/backgrounds/src/helpers/index.ts @@ -0,0 +1,93 @@ +import { global } from '@storybook/global'; +import { dedent } from 'ts-dedent'; + +import { logger } from '@storybook/client-logger'; + +import type { Background } from '../types'; + +const { document, window } = global; + +export const isReduceMotionEnabled = () => { + const prefersReduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)'); + return prefersReduceMotion.matches; +}; + +export const getBackgroundColorByName = ( + currentSelectedValue: string, + backgrounds: Background[] = [], + defaultName: string +): string => { + if (currentSelectedValue === 'transparent') { + return 'transparent'; + } + + if (backgrounds.find((background) => background.value === currentSelectedValue)) { + return currentSelectedValue; + } + + const defaultBackground = backgrounds.find((background) => background.name === defaultName); + if (defaultBackground) { + return defaultBackground.value; + } + + if (defaultName) { + const availableColors = backgrounds.map((background) => background.name).join(', '); + logger.warn( + dedent` + Backgrounds Addon: could not find the default color "${defaultName}". + These are the available colors for your story based on your configuration: + ${availableColors}. + ` + ); + } + + return 'transparent'; +}; + +export const clearStyles = (selector: string | string[]) => { + const selectors = Array.isArray(selector) ? selector : [selector]; + selectors.forEach(clearStyle); +}; + +const clearStyle = (selector: string) => { + const element = document.getElementById(selector) as HTMLElement; + if (element) { + element.parentElement.removeChild(element); + } +}; + +export const addGridStyle = (selector: string, css: string) => { + const existingStyle = document.getElementById(selector) as HTMLElement; + if (existingStyle) { + if (existingStyle.innerHTML !== css) { + existingStyle.innerHTML = css; + } + } else { + const style = document.createElement('style') as HTMLElement; + style.setAttribute('id', selector); + style.innerHTML = css; + document.head.appendChild(style); + } +}; + +export const addBackgroundStyle = (selector: string, css: string, storyId: string) => { + const existingStyle = document.getElementById(selector) as HTMLElement; + if (existingStyle) { + if (existingStyle.innerHTML !== css) { + existingStyle.innerHTML = css; + } + } else { + const style = document.createElement('style') as HTMLElement; + style.setAttribute('id', selector); + style.innerHTML = css; + + const gridStyleSelector = `addon-backgrounds-grid${storyId ? `-docs-${storyId}` : ''}`; + // If grids already exist, we want to add the style tag BEFORE it so the background doesn't override grid + const existingGridStyle = document.getElementById(gridStyleSelector) as HTMLElement; + if (existingGridStyle) { + existingGridStyle.parentElement.insertBefore(style, existingGridStyle); + } else { + document.head.appendChild(style); + } + } +}; diff --git a/code/addons/backgrounds/src/index.ts b/code/addons/backgrounds/src/index.ts new file mode 100644 index 000000000000..d6968d6ab3e3 --- /dev/null +++ b/code/addons/backgrounds/src/index.ts @@ -0,0 +1,8 @@ +/// + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} + +// make it work with --isolatedModules +export default {}; diff --git a/code/addons/backgrounds/src/manager.tsx b/code/addons/backgrounds/src/manager.tsx new file mode 100644 index 000000000000..ecd36b0bb618 --- /dev/null +++ b/code/addons/backgrounds/src/manager.tsx @@ -0,0 +1,20 @@ +import React, { Fragment } from 'react'; +import { addons, types } from '@storybook/manager-api'; + +import { ADDON_ID } from './constants'; +import { BackgroundSelector } from './containers/BackgroundSelector'; +import { GridSelector } from './containers/GridSelector'; + +addons.register(ADDON_ID, () => { + addons.add(ADDON_ID, { + title: 'Backgrounds', + type: types.TOOL, + match: ({ viewMode }) => !!(viewMode && viewMode.match(/^(story|docs)$/)), + render: () => ( + + + + + ), + }); +}); diff --git a/code/addons/backgrounds/src/preview.tsx b/code/addons/backgrounds/src/preview.tsx new file mode 100644 index 000000000000..de7da3b0ced0 --- /dev/null +++ b/code/addons/backgrounds/src/preview.tsx @@ -0,0 +1,22 @@ +import { withBackground } from './decorators/withBackground'; +import { withGrid } from './decorators/withGrid'; +import { PARAM_KEY } from './constants'; + +export const decorators = [withGrid, withBackground]; +export const parameters = { + [PARAM_KEY]: { + grid: { + cellSize: 20, + opacity: 0.5, + cellAmount: 5, + }, + values: [ + { name: 'light', value: '#F8F8F8' }, + { name: 'dark', value: '#333333' }, + ], + }, +}; + +export const globals = { + [PARAM_KEY]: null as any, +}; diff --git a/code/addons/backgrounds/src/types/index.ts b/code/addons/backgrounds/src/types/index.ts new file mode 100644 index 000000000000..f1f0285ac319 --- /dev/null +++ b/code/addons/backgrounds/src/types/index.ts @@ -0,0 +1,33 @@ +import type { ReactElement } from 'react'; + +export interface GlobalState { + name: string | undefined; + selected: string | undefined; +} + +export interface BackgroundSelectorItem { + id: string; + title: string; + onClick: () => void; + value: string; + active: boolean; + right?: ReactElement; +} + +export interface Background { + name: string; + value: string; +} + +export interface BackgroundsParameter { + default?: string; + disable?: boolean; + values: Background[]; +} + +export interface BackgroundsConfig { + backgrounds: Background[] | null; + selectedBackgroundName: string | null; + defaultBackgroundName: string | null; + disable: boolean; +} diff --git a/code/addons/backgrounds/template/stories/grid.stories.ts b/code/addons/backgrounds/template/stories/grid.stories.ts new file mode 100644 index 000000000000..361c18752ebb --- /dev/null +++ b/code/addons/backgrounds/template/stories/grid.stories.ts @@ -0,0 +1,51 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + parameters: { + backgrounds: { + grid: { + cellSize: 10, + cellAmount: 4, + opacity: 0.2, + }, + }, + chromatic: { disable: true }, + }, +}; + +export const Basic = { + parameters: {}, +}; + +export const Custom = { + parameters: { + backgrounds: { + grid: { + cellSize: 100, + cellAmount: 10, + opacity: 0.8, + }, + }, + }, +}; + +// Grid should have an offset of 0 when in fullscreen +export const Fullscreen = { + parameters: { + layout: 'fullscreen', + }, +}; + +export const Disabled = { + parameters: { + backgrounds: { + grid: { + disable: true, + }, + }, + }, +}; diff --git a/code/addons/backgrounds/template/stories/parameters.stories.ts b/code/addons/backgrounds/template/stories/parameters.stories.ts new file mode 100644 index 000000000000..e6085424b99e --- /dev/null +++ b/code/addons/backgrounds/template/stories/parameters.stories.ts @@ -0,0 +1,87 @@ +import { global as globalThis } from '@storybook/global'; + +const COLORS = [ + { name: 'red', value: '#FB001D' }, + { name: 'orange', value: '#FB8118' }, + { name: 'yellow', value: '#FCFF0C' }, + { name: 'green', value: '#1AB408' }, + { name: 'blue', value: '#0F0084' }, + { name: 'purple', value: '#620073' }, +]; + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + parameters: { + backgrounds: { + values: COLORS, + }, + chromatic: { disable: true }, + }, +}; + +export const Basic = { + parameters: {}, +}; + +export const Default = { + parameters: { + backgrounds: { + default: COLORS[0].name, + }, + }, +}; + +export const StorySpecific = { + parameters: { + backgrounds: { + default: 'white', + values: [ + { name: 'white', value: '#F9F5F1' }, + { name: 'pink', value: '#F99CB4' }, + { name: 'teal', value: '#67CDE8' }, + { name: 'brown', value: '#4D2C10' }, + { name: 'black', value: '#000400' }, + ], + }, + }, +}; + +export const Gradient = { + parameters: { + backgrounds: { + default: 'gradient', + values: [ + { + name: 'gradient', + value: 'linear-gradient(90deg, #CA005E 0%, #863783 50%, #112396)', + }, + ], + }, + }, +}; + +const img = + 'PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNTkwIDQ3NSIgZmlsbD0ibm9uZSI+CiAgPGcgaWQ9ImNvbXBvbmVudC1jb21wb3NpdGlvbiI+CiAgICA8bWFzayBpZD0iY29tcG9uZW50cyIgd2lkdGg9IjcxMSIgaGVpZ2h0PSI2NjciIHg9Ii01MiIgeT0iLTg2IiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KICAgICAgPHBhdGggZmlsbD0iI2ZmZiIgZD0iTTY1OC4wMiAxODEuNDAzbC00NC4zMTItLjAwMS0uMDAxIDEzMi4xODVoNDQuMzEzdjQ1LjA2NmgtNDQuMzEybC0uMDAxIDEzMi45MzktODguNjI1LS4wMDEtLjAwMSA4OC42MjZoLTQ1LjA2NnYtNDQuMzEybC00NC4zMTItLjAwMXYtNDQuMzEzaC04Ny44NzJsLS4wMDEgNDQuMzEzLTQ0LjMxMi4wMDF2NDQuMzEyaC00NS4wNjZ2LTQ0LjMxM2gtNDQuMzEzdi00NC4zMTJsLTQzLjU1OC0uMDAxLS4wMDIgNDQuMzEzaC00NS4wNjZsLjAwMS00NC4zMTMtNDMuNTYuMDAxdjQ0LjMxMkgzNi44ODh2LTQ0LjMxM2wtNDMuNTYuMDAxdjg4LjYyNWgtNDUuMDY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AgPC9kZWZzPgo8L3N2Zz4K'; + +export const Image = { + parameters: { + backgrounds: { + default: 'component-driven', + values: [ + { + name: 'component-driven', + value: `#000 center / cover no-repeat url(data:image/svg+xml;base64,${img})`, + }, + ], + }, + }, +}; + +export const Disabled = { + parameters: { + backgrounds: { disable: true }, + }, +}; diff --git a/code/addons/backgrounds/tsconfig.json b/code/addons/backgrounds/tsconfig.json new file mode 100644 index 000000000000..52d43eaaa9b9 --- /dev/null +++ b/code/addons/backgrounds/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/code/addons/controls/README.md b/code/addons/controls/README.md new file mode 100644 index 000000000000..1778633fe659 --- /dev/null +++ b/code/addons/controls/README.md @@ -0,0 +1,213 @@ +# Storybook Controls Addon + +[Storybook](https://storybook.js.org) Controls gives you a graphical UI to interact with a component's arguments dynamically, without needing to code. It creates an addon panel next to your component examples ("stories"), so you can edit them live. + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +![Screenshot](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/controls/docs/media/addon-controls-hero.gif) + +## Installation + +Controls is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run: + +```sh +npm i -D @storybook/addon-controls +``` + +Then, add following content to [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project): + +```js +module.exports = { + addons: ['@storybook/addon-controls'], +}; +``` + +## Usage + +The usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/controls). + +## FAQs + +- [Storybook Controls Addon](#storybook-controls-addon) + - [Installation](#installation) + - [Usage](#usage) + - [FAQs](#faqs) + - [How will this replace addon-knobs?](#how-will-this-replace-addon-knobs) + - [How do I migrate from addon-knobs?](#how-do-i-migrate-from-addon-knobs) + - [My controls aren't being auto-generated. What should I do?](#my-controls-arent-being-auto-generated-what-should-i-do) + - [How can I disable controls for certain fields on a particular story?](#how-can-i-disable-controls-for-certain-fields-on-a-particular-story) + - [How do controls work with MDX?](#how-do-controls-work-with-mdx) + +### How will this replace addon-knobs? + +Addon-knobs is one of Storybook's most popular addons with over 1M weekly downloads, so we know lots of users will be affected by this change. Knobs is also a mature addon, with various options that are not available in addon-controls. + +Therefore, rather than deprecating addon-knobs immediately, we will continue to release knobs with the Storybook core distribution until 7.0. This will give us time to improve Controls based on user feedback, and also give knobs users ample time to migrate. + +If you are somehow tied to knobs or prefer the knobs interface, we are happy to take on maintainers for the knobs project. If this interests you, hop on our [Discord](https://discord.gg/storybook). + +### How do I migrate from addon-knobs? + +If you're already using [Storybook Knobs](https://github.com/storybookjs/addon-knobs) you should consider migrating to Controls. + +You're probably using it for something that can be satisfied by one of the cases [described above](#writing-stories). + +Let's walk through two examples: migrating [knobs to auto-generated args](#knobs-to-custom-args) and [knobs to custom args](#knobs-to-custom-args). + +

    Knobs to auto-generated args

    + +First, let's consider a knobs version of a basic story that fills in the props for a component: + +```jsx +import { text } from '@storybook/addon-knobs'; +import { Button } from './Button'; + +export const Basic = () => + + +## ArgsTable + + +``` + +## Inline stories + +Storybook Docs renders all React stories inline by default. + +However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter. + +To do so for all stories, update `.storybook/preview.js`: + +```js +export const parameters = { docs: { inlineStories: false } }; +``` + +## TypeScript props with `react-docgen` + +If you're using TypeScript, there are two different options for generating props: `react-docgen-typescript` (default) or `react-docgen`. + +You can add the following lines to your `.storybook/main.js` to switch between the two (or disable docgen): + +```js +module.exports = { + typescript: { + // also valid 'react-docgen-typescript' | false + reactDocgen: 'react-docgen', + }, +}; +``` + +Neither option is perfect, so here's everything you should know if you're thinking about using `react-docgen` for TypeScript. + +| | `react-docgen-typescript` | `react-docgen` | +| --------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| **Features** | **Great**. The analysis produces great results which gives the best props table experience. | **OK**. React-docgen produces basic results that are fine for most use cases. | +| **Performance** | **Slow**. It's doing a lot more work to produce those results, and may also have an inefficient implementation. | **Blazing fast**. Adding it to your project increases build time negligibly. | +| **Bugs** | **Many**. There are a lot of corner cases that are not handled properly, and are annoying for developers. | **Few**. But there's a dealbreaker, which is lack for imported types (see below). | +| **SB docs** | **Good**. Our prop tables have supported `react-docgen-typescript` results from the beginning, so it's relatively stable. | **OK**. There are some obvious improvements to fully support `react-docgen`, and they're coming soon. | + +**Performance** is a common question, so here are build times from a random project to quantify. Your mileage may vary: + +| Docgen | Build time | +| ----------------------- | ---------- | +| react-docgen-typescript | 33s | +| react-docgen | 29s | +| none | 28s | + +The biggest limitation of `react-docgen` is lack of support for imported types. What that means is that when a component uses a type defined in another file or package, `react-docgen` is unable to extract props information for that type. + +```tsx +import React, { FC } from 'react'; +import SomeType from './someFile'; + +type NewType = SomeType & { foo: string }; +const MyComponent: FC = ... +``` + +So in the previous example, `SomeType` would simply be ignored! There's an [open PR for this in the `react-docgen` repo](https://github.com/reactjs/react-docgen/pull/352) which you can upvote if it affects you. + +Another common pitfall when switching to `react-docgen` is [lack of support for `React.FC`](https://github.com/reactjs/react-docgen/issues/387). This means that the following common pattern **DOESN'T WORK**: + +```tsx +import React, { FC } from 'react'; +interface IProps { ... }; +const MyComponent: FC = ({ ... }) => ... +``` + +Fortunately, the following workaround works: + +```tsx +const MyComponent: FC = ({ ... }: IProps) => ... +``` + +Please upvote [the issue](https://github.com/reactjs/react-docgen/issues/387) if this is affecting your productivity, or better yet, submit a fix! + +## More resources + +Want to learn more? Here are some more articles on Storybook Docs: + +- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md) +- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) +- Example: [Storybook Design System](https://github.com/storybookjs/design-system) diff --git a/code/addons/docs/src/DocsRenderer.tsx b/code/addons/docs/src/DocsRenderer.tsx new file mode 100644 index 000000000000..6c02b09e974f --- /dev/null +++ b/code/addons/docs/src/DocsRenderer.tsx @@ -0,0 +1,48 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import type { Renderer, Parameters, DocsContextProps, DocsRenderFunction } from '@storybook/types'; +import { Docs, CodeOrSourceMdx, AnchorMdx, HeadersMdx } from '@storybook/blocks'; + +// TS doesn't like that we export a component with types that it doesn't know about (TS4203) +export const defaultComponents: Record = { + code: CodeOrSourceMdx, + a: AnchorMdx, + ...HeadersMdx, +}; + +export class DocsRenderer { + public render: DocsRenderFunction; + + public unmount: (element: HTMLElement) => void; + + constructor() { + this.render = ( + context: DocsContextProps, + docsParameter: Parameters, + element: HTMLElement, + callback: () => void + ): void => { + // Use a random key to force the container to re-render each time we call `renderDocs` + // TODO: do we still need this? It was needed for angular (legacy) inline rendering: + // https://github.com/storybookjs/storybook/pull/16149 + const components = { + ...defaultComponents, + ...docsParameter?.components, + }; + + import('@mdx-js/react').then(({ MDXProvider }) => { + ReactDOM.render( + + + , + element, + callback + ); + }); + }; + + this.unmount = (element: HTMLElement) => { + ReactDOM.unmountComponentAtNode(element); + }; + } +} diff --git a/code/addons/docs/src/blocks.ts b/code/addons/docs/src/blocks.ts new file mode 100644 index 000000000000..34260b6785cf --- /dev/null +++ b/code/addons/docs/src/blocks.ts @@ -0,0 +1,7 @@ +import { deprecate } from '@storybook/client-logger'; + +deprecate( + "Import from '@storybook/addon-docs/blocks' is deprecated. Please import from '@storybook/blocks' instead." +); + +export * from '@storybook/blocks'; diff --git a/code/addons/docs/src/ensure-react-peer-deps.ts b/code/addons/docs/src/ensure-react-peer-deps.ts new file mode 100644 index 000000000000..6958b7e40653 --- /dev/null +++ b/code/addons/docs/src/ensure-react-peer-deps.ts @@ -0,0 +1,39 @@ +import { logger } from '@storybook/node-logger'; +import dedent from 'ts-dedent'; + +export function ensureReactPeerDeps() { + try { + require.resolve('react'); + require.resolve('react-dom'); + } catch (e) { + logger.error(dedent` + Starting in 7.0, react and react-dom are now required peer dependencies of Storybook. + https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-peer-dependencies-required + + It seems that you haven't run Storybook's CLI to upgrade to the latest version. + The upgrade command will install the required peer dependencies for you and will take + care of other important auto migrations as well. + + If you want to upgrade to the latest prerelease version, please run: + + $ npx storybook@next upgrade --prerelease + + Otherwise, please run: + + $ npx storybook upgrade + + If you do not want to use the upgrade commands, + please install react and react-dom in your project manually. + + npm: + $ npm add react react-dom --dev + + yarn: + $ yarn add react react-dom --dev + + pnpm: + $ pnpm add react react-dom --dev + `); + process.exit(1); + } +} diff --git a/code/addons/docs/src/index.ts b/code/addons/docs/src/index.ts new file mode 100644 index 000000000000..b74399955f12 --- /dev/null +++ b/code/addons/docs/src/index.ts @@ -0,0 +1,2 @@ +export * from '@storybook/blocks'; +export { DocsRenderer } from './DocsRenderer'; diff --git a/code/addons/docs/src/preset.ts b/code/addons/docs/src/preset.ts new file mode 100644 index 000000000000..3b7ac4a87a7a --- /dev/null +++ b/code/addons/docs/src/preset.ts @@ -0,0 +1,170 @@ +import fs from 'fs-extra'; +import remarkSlug from 'remark-slug'; +import remarkExternalLinks from 'remark-external-links'; +import { dedent } from 'ts-dedent'; + +import type { IndexerOptions, StoryIndexer, DocsOptions, Options } from '@storybook/types'; +import type { CsfPluginOptions } from '@storybook/csf-plugin'; +import type { JSXOptions } from '@storybook/mdx2-csf'; +import { loadCsf } from '@storybook/csf-tools'; +import { ensureReactPeerDeps } from './ensure-react-peer-deps'; + +async function webpack( + webpackConfig: any = {}, + options: Options & { + /** + * @deprecated + * Use `jsxOptions` to customize options used by @babel/preset-react + */ + configureJsx: boolean; + /** + * @deprecated + * Use `jsxOptions` to customize options used by @babel/preset-react + */ + mdxBabelOptions?: any; + /** @deprecated */ + sourceLoaderOptions: any; + csfPluginOptions: CsfPluginOptions | null; + transcludeMarkdown: boolean; + jsxOptions?: JSXOptions; + } /* & Parameters< + typeof createCompiler + >[0] */ +) { + const { module = {} } = webpackConfig; + + // it will reuse babel options that are already in use in storybook + // also, these babel options are chained with other presets. + const { + csfPluginOptions = {}, + jsxOptions = {}, + transcludeMarkdown = false, + sourceLoaderOptions = null, + configureJsx, + mdxBabelOptions, + } = options; + + const mdxLoaderOptions = await options.presets.apply('mdxLoaderOptions', { + skipCsf: true, + mdxCompileOptions: { + providerImportSource: '@storybook/addon-docs/mdx-react-shim', + remarkPlugins: [remarkSlug, remarkExternalLinks], + }, + jsxOptions, + }); + + if (sourceLoaderOptions) { + throw new Error(dedent` + Addon-docs no longer uses source-loader in 7.0. + + To update your configuration, please see migration instructions here: + + https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropped-source-loader--storiesof-static-snippets + `); + } + + if (mdxBabelOptions || configureJsx) { + throw new Error(dedent` + Addon-docs no longer uses configureJsx or mdxBabelOptions in 7.0. + + To update your configuration, please see migration instructions here: + + https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropped-addon-docs-manual-babel-configuration + `); + } + + const mdxLoader = require.resolve('@storybook/mdx2-csf/loader'); + + let rules = module.rules || []; + if (transcludeMarkdown) { + rules = [ + ...rules.filter((rule: any) => rule.test?.toString() !== '/\\.md$/'), + { + test: /\.md$/, + use: [ + { + loader: mdxLoader, + options: mdxLoaderOptions, + }, + ], + }, + ]; + } + + const result = { + ...webpackConfig, + plugins: [ + ...(webpackConfig.plugins || []), + // eslint-disable-next-line global-require + ...(csfPluginOptions ? [require('@storybook/csf-plugin').webpack(csfPluginOptions)] : []), + ], + + module: { + ...module, + rules: [ + ...rules, + { + test: /(stories|story)\.mdx$/, + use: [ + { + loader: mdxLoader, + options: { + ...mdxLoaderOptions, + skipCsf: false, + }, + }, + ], + }, + { + test: /\.mdx$/, + exclude: /(stories|story)\.mdx$/, + use: [ + { + loader: mdxLoader, + options: mdxLoaderOptions, + }, + ], + }, + ], + }, + }; + + return result; +} + +const storyIndexers = (indexers: StoryIndexer[] | null) => { + const mdxIndexer = async (fileName: string, opts: IndexerOptions) => { + let code = (await fs.readFile(fileName, 'utf-8')).toString(); + const { compile } = await import('@storybook/mdx2-csf'); + code = await compile(code, {}); + return loadCsf(code, { ...opts, fileName }).parse(); + }; + return [ + { + test: /(stories|story)\.mdx$/, + indexer: mdxIndexer, + }, + ...(indexers || []), + ]; +}; + +const docs = (docsOptions: DocsOptions) => { + return { + ...docsOptions, + disable: false, + defaultName: 'Docs', + autodocs: 'tag', + }; +}; + +/* + * This is a workaround for https://github.com/Swatinem/rollup-plugin-dts/issues/162 + * something down the dependency chain is using typescript namespaces, which are not supported by rollup-plugin-dts + */ +const webpackX = webpack as any; +const storyIndexersX = storyIndexers as any; +const docsX = docs as any; + +ensureReactPeerDeps(); + +export { webpackX as webpack, storyIndexersX as storyIndexers, docsX as docs }; diff --git a/code/addons/docs/src/preview.ts b/code/addons/docs/src/preview.ts new file mode 100644 index 000000000000..0d1183bd0cf1 --- /dev/null +++ b/code/addons/docs/src/preview.ts @@ -0,0 +1,8 @@ +export const parameters: any = { + docs: { + renderer: async () => { + const { DocsRenderer } = (await import('./DocsRenderer')) as any; + return new DocsRenderer(); + }, + }, +}; diff --git a/code/addons/docs/src/shims/mdx-react-shim.ts b/code/addons/docs/src/shims/mdx-react-shim.ts new file mode 100644 index 000000000000..c30b52ef0db8 --- /dev/null +++ b/code/addons/docs/src/shims/mdx-react-shim.ts @@ -0,0 +1 @@ +export * from '@mdx-js/react'; diff --git a/code/addons/docs/src/typings.d.ts b/code/addons/docs/src/typings.d.ts new file mode 100644 index 000000000000..5528b7d9f1c6 --- /dev/null +++ b/code/addons/docs/src/typings.d.ts @@ -0,0 +1,10 @@ +declare module '@egoist/vue-to-react'; +declare module 'remark-slug'; +declare module 'remark-external-links'; +declare module 'babel-plugin-react-docgen'; +declare module 'acorn-jsx'; +declare module 'vue/dist/vue'; + +declare module 'sveltedoc-parser' { + export function parse(options: any): Promise; +} diff --git a/addons/docs/svelte/HOC.svelte b/code/addons/docs/svelte/HOC.svelte similarity index 100% rename from addons/docs/svelte/HOC.svelte rename to code/addons/docs/svelte/HOC.svelte diff --git a/code/addons/docs/template/stories/docs2/MetaOf.mdx b/code/addons/docs/template/stories/docs2/MetaOf.mdx new file mode 100644 index 000000000000..7bb445673c5c --- /dev/null +++ b/code/addons/docs/template/stories/docs2/MetaOf.mdx @@ -0,0 +1,12 @@ +import { Meta, Story, Stories } from '@storybook/addon-docs'; +import * as ButtonStories from './button.stories.ts'; + + + +# Docs with of + +hello docs + + + + diff --git a/code/addons/docs/template/stories/docs2/NoTitle.mdx b/code/addons/docs/template/stories/docs2/NoTitle.mdx new file mode 100644 index 000000000000..35afd95fa3e6 --- /dev/null +++ b/code/addons/docs/template/stories/docs2/NoTitle.mdx @@ -0,0 +1,3 @@ +# Docs with no title + +hello docs diff --git a/code/addons/docs/template/stories/docs2/Title.mdx b/code/addons/docs/template/stories/docs2/Title.mdx new file mode 100644 index 000000000000..08d1de73a4a7 --- /dev/null +++ b/code/addons/docs/template/stories/docs2/Title.mdx @@ -0,0 +1,7 @@ +import { Meta } from '@storybook/addon-docs'; + + + +# Docs with title + +hello docs diff --git a/code/addons/docs/template/stories/docs2/button.stories.ts b/code/addons/docs/template/stories/docs2/button.stories.ts new file mode 100644 index 000000000000..14f45cee42df --- /dev/null +++ b/code/addons/docs/template/stories/docs2/button.stories.ts @@ -0,0 +1,21 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Button, + args: { onClick: () => console.log('clicked!') }, + parameters: { + chromatic: { disable: true }, + }, +}; + +export const Basic = { + args: { label: 'Basic' }, +}; + +export const One = { + args: { label: 'One' }, +}; + +export const Two = { + args: { label: 'Two' }, +}; diff --git a/code/addons/docs/template/stories/docspage/autoplay.stories.ts b/code/addons/docs/template/stories/docspage/autoplay.stories.ts new file mode 100644 index 000000000000..7f32348bc00c --- /dev/null +++ b/code/addons/docs/template/stories/docspage/autoplay.stories.ts @@ -0,0 +1,33 @@ +import { global as globalThis } from '@storybook/global'; +import { expect } from '@storybook/jest'; +import { within } from '@storybook/testing-library'; + +export default { + component: globalThis.Components.Pre, + tags: ['autodocs'], + args: { text: 'Play has not run' }, + parameters: { chromatic: { disable: true } }, +}; + +// Should not autoplay +export const NoAutoplay = { + play: async ({ viewMode, canvasElement }) => { + const pre = await within(canvasElement).findByText('Play has not run'); + if (viewMode === 'docs') { + pre.innerText = 'Play should not have run!'; + // Sort of pointless + expect(viewMode).not.toBe('docs'); + } else { + pre.innerText = 'Play has run'; + } + }, +}; + +// Should autoplay +export const Autoplay = { + parameters: { docs: { autoplay: true } }, + play: async ({ canvasElement }) => { + const pre = await within(canvasElement).findByText('Play has not run'); + pre.innerText = 'Play has run'; + }, +}; diff --git a/code/addons/docs/template/stories/docspage/basic.stories.ts b/code/addons/docs/template/stories/docspage/basic.stories.ts new file mode 100644 index 000000000000..72d1059758d7 --- /dev/null +++ b/code/addons/docs/template/stories/docspage/basic.stories.ts @@ -0,0 +1,30 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Button, + tags: ['autodocs'], + args: { label: 'Click Me!' }, + parameters: { chromatic: { disable: true } }, +}; + +/** + * A basic button + */ +export const Basic = { + args: { label: 'Basic' }, +}; + +/** + * Won't show up in DocsPage + */ +export const Disabled = { + args: { label: 'Disabled in DocsPage' }, + parameters: { docs: { disable: true } }, +}; + +/** + * Another button, just to show multiple stories + */ +export const Another = { + args: { label: 'Another' }, +}; diff --git a/code/addons/docs/template/stories/docspage/description.stories.ts b/code/addons/docs/template/stories/docspage/description.stories.ts new file mode 100644 index 000000000000..f42edc5901c3 --- /dev/null +++ b/code/addons/docs/template/stories/docspage/description.stories.ts @@ -0,0 +1,31 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Button, + // FIXME: remove array subcomponents in 7.0? + subcomponents: { + Pre: globalThis.Components.Pre, + }, + tags: ['autodocs'], + args: { label: 'Click Me!' }, + parameters: { + docs: { + description: { + component: '**Component** description', + }, + }, + chromatic: { disable: true }, + }, +}; + +export const Basic = {}; + +export const CustomDescription = { + parameters: { + docs: { + description: { + story: '**Story** description', + }, + }, + }, +}; diff --git a/code/addons/docs/template/stories/docspage/extract-description.stories.ts b/code/addons/docs/template/stories/docspage/extract-description.stories.ts new file mode 100644 index 000000000000..cb5986ac7dbe --- /dev/null +++ b/code/addons/docs/template/stories/docspage/extract-description.stories.ts @@ -0,0 +1,18 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Button, + tags: ['autodocs'], + args: { label: 'Click Me!' }, + parameters: { + docs: { + // FIXME: this is typically provided by the renderer preset to extract + // the description automatically based on docgen info. including here + // for documentation purposes only. + extractComponentDescription: () => 'component description', + }, + chromatic: { disable: true }, + }, +}; + +export const Basic = {}; diff --git a/code/addons/docs/template/stories/docspage/iframe.stories.ts b/code/addons/docs/template/stories/docspage/iframe.stories.ts new file mode 100644 index 000000000000..80cff47272c8 --- /dev/null +++ b/code/addons/docs/template/stories/docspage/iframe.stories.ts @@ -0,0 +1,13 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Button, + tags: ['autodocs'], + args: { label: 'Rendered in iframe' }, + parameters: { + chromatic: { disable: true }, + docs: { iframeHeight: 120, inlineStories: true }, + }, +}; + +export const Basic = {}; diff --git a/code/addons/docs/template/stories/docspage/overflow.stories.ts b/code/addons/docs/template/stories/docspage/overflow.stories.ts new file mode 100644 index 000000000000..71893031af5b --- /dev/null +++ b/code/addons/docs/template/stories/docspage/overflow.stories.ts @@ -0,0 +1,13 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Pre, + tags: ['autodocs'], + args: { + text: 'Demonstrates overflow', + style: { width: 2000, height: 500, background: 'hotpink' }, + }, + parameters: { chromatic: { disable: true } }, +}; + +export const Basic = {}; diff --git a/code/addons/docs/template/stories/docspage/override.stories.ts b/code/addons/docs/template/stories/docspage/override.stories.ts new file mode 100644 index 000000000000..18d2d4e5e25c --- /dev/null +++ b/code/addons/docs/template/stories/docspage/override.stories.ts @@ -0,0 +1,26 @@ +import { global as globalThis } from '@storybook/global'; + +// FIXME: do this using basic React functions for multi-framework +// once sandbox linking is working +// +// import { createElement } from 'react'; +// import { Title, Primary } from '@storybook/addon-docs'; +// +// const Override = () => +// createElement('div', { style: { border: '10px solid green', padding: '100px' } }, [ +// createElement(Title), +// createElement(Primary), +// ]); +const Override = () => 'overridden'; + +export default { + component: globalThis.Components.Button, + tags: ['autodocs'], + args: { label: 'Click Me!' }, + parameters: { + chromatic: { disable: true }, + docs: { page: Override }, + }, +}; + +export const Basic = {}; diff --git a/code/addons/docs/template/stories/docspage/source.stories.ts b/code/addons/docs/template/stories/docspage/source.stories.ts new file mode 100644 index 000000000000..9d30522758d2 --- /dev/null +++ b/code/addons/docs/template/stories/docspage/source.stories.ts @@ -0,0 +1,44 @@ +import { global as globalThis } from '@storybook/global'; + +export default { + component: globalThis.Components.Button, + tags: ['autodocs'], + args: { label: 'Click Me!' }, + parameters: { chromatic: { disable: true } }, +}; + +export const Auto = {}; + +export const Disabled = { + parameters: { + docs: { + source: { code: null }, + }, + }, +}; + +export const Code = { + parameters: { + docs: { + source: { type: 'code' }, + }, + }, +}; + +export const Custom = { + parameters: { + docs: { + source: { code: 'custom source' }, + }, + }, +}; + +export const Transform = { + parameters: { + docs: { + transformSource(src: string) { + return `// We transformed this!\nconst example = (\n${src}\n);`; + }, + }, + }, +}; diff --git a/code/addons/docs/template/stories/stories-mdx/basic.stories.mdx b/code/addons/docs/template/stories/stories-mdx/basic.stories.mdx new file mode 100644 index 000000000000..7aec7745397d --- /dev/null +++ b/code/addons/docs/template/stories/stories-mdx/basic.stories.mdx @@ -0,0 +1,22 @@ +import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'; +import { global as globalThis } from '@storybook/global'; + + + +# MDX Stories + +This file demonstrates defining stories inside MDX. + + + + + + + + + + + + +
    Non-story content
    +
    diff --git a/code/addons/docs/template/stories/stories-mdx/csf-in-mdx.stories.js b/code/addons/docs/template/stories/stories-mdx/csf-in-mdx.stories.js new file mode 100644 index 000000000000..6e6ff8f58ed8 --- /dev/null +++ b/code/addons/docs/template/stories/stories-mdx/csf-in-mdx.stories.js @@ -0,0 +1,20 @@ +/* eslint-disable storybook/default-exports */ +// NOTE: commented out default since these stories are re-exported +// in the primary file './csf-docs-with-mdx-docs.stories.mdx' +// +// export default { +// title: 'Addons/Docs/csf-with-mdx-docs', +// component: Button, +// }; + +export const Primary = { + args: { label: 'Primary' }, +}; + +export const Secondary = { + args: { label: 'Secondary' }, +}; + +export const ImplicitName = { + args: { label: 'Implicit Name' }, +}; diff --git a/code/addons/docs/template/stories/stories-mdx/csf-in-mdx.stories.mdx b/code/addons/docs/template/stories/stories-mdx/csf-in-mdx.stories.mdx new file mode 100644 index 000000000000..fda87f38fd6b --- /dev/null +++ b/code/addons/docs/template/stories/stories-mdx/csf-in-mdx.stories.mdx @@ -0,0 +1,29 @@ +import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'; +import { global as globalThis } from '@storybook/global'; +import * as Csf from './csf-in-mdx.stories.js'; + + + +# Legacy CSF in MDX Stories + +This file demonstrates legacy reuse of CSF stories inside MDX. This mechanism has been +overhauled and improved in 7.0, and the legacy mode is now deprecated and will be +removed in 8.0. + + + + + + + + + + + +## Duplicate stories + +Reference story by ID to show it multiple times in a page. + + + + diff --git a/code/addons/docs/template/stories/stories-mdx/iframe.stories.mdx b/code/addons/docs/template/stories/stories-mdx/iframe.stories.mdx new file mode 100644 index 000000000000..f947df3b35cf --- /dev/null +++ b/code/addons/docs/template/stories/stories-mdx/iframe.stories.mdx @@ -0,0 +1,18 @@ +import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'; +import { global as globalThis } from '@storybook/global'; + + + +# MDX Stories + +This file demonstrates rendering iframe stories in MDX. + + + + + + + + + + diff --git a/code/addons/docs/template/stories/stories-mdx/play-functions.stories.mdx b/code/addons/docs/template/stories/stories-mdx/play-functions.stories.mdx new file mode 100644 index 000000000000..aef8fe5df0ba --- /dev/null +++ b/code/addons/docs/template/stories/stories-mdx/play-functions.stories.mdx @@ -0,0 +1,16 @@ +import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs'; +import { global as globalThis } from '@storybook/global'; + + console.log('component play')} /> + +# MDX Play function Stories + +This file demonstrates defining stories inside MDX. + + + + + + + console.log('story play')} /> + diff --git a/code/addons/docs/tsconfig.json b/code/addons/docs/tsconfig.json new file mode 100644 index 000000000000..cf1e09965901 --- /dev/null +++ b/code/addons/docs/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "skipLibCheck": true + }, + "include": ["src/**/*"] +} diff --git a/code/addons/docs/vue/README.md b/code/addons/docs/vue/README.md new file mode 100644 index 000000000000..77068ad69412 --- /dev/null +++ b/code/addons/docs/vue/README.md @@ -0,0 +1,152 @@ +
    + +
    + +

    Storybook Docs for Vue

    + +> migration guide: This page documents the method to configure storybook introduced recently in 5.3.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring storybook. + +Storybook Docs transforms your Storybook stories into world-class component documentation. Storybook Docs for Vue supports [DocsPage](../docs/docspage.md) for auto-generated docs, and [MDX](../docs/mdx.md) for rich long-form docs. + +To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Vue specifics, read on! + +- [Installation](#installation) +- [Preset options](#preset-options) +- [DocsPage](#docspage) +- [Props tables](#props-tables) +- [MDX](#mdx) +- [Inline Stories](#inline-stories) +- [More resources](#more-resources) + +## Installation + +First add the package. Make sure that the versions for your `@storybook/*` packages match: + +```sh +yarn add -D @storybook/addon-docs@next +``` + +Then add the following to your `.storybook/main.js` addons: + +```js +module.exports = { + addons: ['@storybook/addon-docs'], +}; +``` + +## Preset options + +The `addon-docs` preset for Vue has a configuration option that can be used to configure [`vue-docgen-api`](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api), a tool which extracts information from Vue components. Here's an example of how to use the preset with options for Vue app: + +```js +const path = require('path'); + +module.exports = { + addons: [ + { + name: '@storybook/addon-docs', + options: { + vueDocgenOptions: { + alias: { + '@': path.resolve(__dirname, '../'), + }, + }, + }, + }, + ], +}; +``` + +The `vueDocgenOptions` is an object for configuring `vue-docgen-api`. See [`vue-docgen-api`'s docs](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api#options-docgenoptions) for available configuration options. + +## DocsPage + +When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI. + +## Props tables + +Getting [Props tables](../docs/props-tables.md) for your components requires a few more steps. Docs for Vue relies on [`vue-docgen-loader`](https://github.com/pocka/vue-docgen-loader). It supports `props`, `events`, and `slots` as first class prop types. + +Finally, be sure to fill in the `component` field in your story metadata: + +```ts +import { InfoButton } from './InfoButton.vue'; + +export default { + title: 'InfoButton', + component: InfoButton, +}; +``` + +If you haven't upgraded from `storiesOf`, you can use a parameter to do the same thing: + +```ts +import { storiesOf } from '@storybook/vue'; +import { InfoButton } from './InfoButton.vue'; + +storiesOf('InfoButton', module) + .addParameters({ component: InfoButton }) + .add( ... ); +``` + +## MDX + +[MDX](../docs/mdx.md) is a convenient way to document your components in Markdown and embed documentation components, such as stories and props tables, inline. + +Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well: + +```sh +yarn add -D react +``` + +Then update your `.storybook/main.js` to make sure you load MDX files: + +```js +module.exports = { + stories: ['../src/stories/**/*.stories.@(js|mdx)'], +}; +``` + +Finally, you can create MDX files like this: + +```md +import { Meta, Story, ArgsTable } from '@storybook/addon-docs'; +import { InfoButton } from './InfoButton.vue'; + + + +# InfoButton + +Some **markdown** description, or whatever you want. + +{{ + components: { InfoButton }, + template: '', +}} + +## ArgsTable + + +``` + +Yes, it's redundant to declare `component` twice. [Coming soon](https://github.com/storybookjs/storybook/issues/8685). + +## Inline Stories + +Storybook Docs renders all Vue stories inline by default. + +However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter. + +To do so for all stories, update `.storybook/preview.js`: + +```js +export const parameters = { docs: { inlineStories: false } }; +``` + +## More resources + +Want to learn more? Here are some more articles on Storybook Docs: + +- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md) +- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) +- Example: [Storybook Design System](https://github.com/storybookjs/design-system) diff --git a/code/addons/docs/vue3/README.md b/code/addons/docs/vue3/README.md new file mode 100644 index 000000000000..f11ce2f14596 --- /dev/null +++ b/code/addons/docs/vue3/README.md @@ -0,0 +1,152 @@ +
    + +
    + +

    Storybook Docs for Vue 3

    + +> migration guide: This page documents the method to configure storybook introduced recently in 5.3.0, consult the [migration guide](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md) if you want to migrate to this format of configuring storybook. + +Storybook Docs transforms your Storybook stories into world-class component documentation. Storybook Docs for Vue 3 supports [DocsPage](../docs/docspage.md) for auto-generated docs, and [MDX](../docs/mdx.md) for rich long-form docs. + +To learn more about Storybook Docs, read the [general documentation](../README.md). To learn the Vue 3 specifics, read on! + +- [Installation](#installation) +- [Preset options](#preset-options) +- [DocsPage](#docspage) +- [Props tables](#props-tables) +- [MDX](#mdx) +- [Inline Stories](#inline-stories) +- [More resources](#more-resources) + +## Installation + +First add the package. Make sure that the versions for your `@storybook/*` packages match: + +```sh +yarn add -D @storybook/addon-docs@next +``` + +Then add the following to your `.storybook/main.js` addons: + +```js +module.exports = { + addons: ['@storybook/addon-docs'], +}; +``` + +## Preset options + +The `addon-docs` preset for Vue has a configuration option that can be used to configure [`vue-docgen-api`](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api), a tool which extracts information from Vue components. Here's an example of how to use the preset with options for Vue app: + +```js +const path = require('path'); + +module.exports = { + addons: [ + { + name: '@storybook/addon-docs', + options: { + vueDocgenOptions: { + alias: { + '@': path.resolve(__dirname, '../'), + }, + }, + }, + }, + ], +}; +``` + +The `vueDocgenOptions` is an object for configuring `vue-docgen-api`. See [`vue-docgen-api`'s docs](https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api#options-docgenoptions) for available configuration options. + +## DocsPage + +When you [install docs](#installation) you should get basic [DocsPage](../docs/docspage.md) documentation automagically for all your stories, available in the `Docs` tab of the Storybook UI. + +## Props tables + +Getting [Props tables](../docs/props-tables.md) for your components requires a few more steps. Docs for Vue relies on [`vue-docgen-loader`](https://github.com/pocka/vue-docgen-loader). It supports `props`, `events`, and `slots` as first class prop types. + +Finally, be sure to fill in the `component` field in your story metadata: + +```ts +import { InfoButton } from './InfoButton.vue'; + +export default { + title: 'InfoButton', + component: InfoButton, +}; +``` + +If you haven't upgraded from `storiesOf`, you can use a parameter to do the same thing: + +```ts +import { storiesOf } from '@storybook/vue'; +import { InfoButton } from './InfoButton.vue'; + +storiesOf('InfoButton', module) + .addParameters({ component: InfoButton }) + .add( ... ); +``` + +## MDX + +[MDX](../docs/mdx.md) is a convenient way to document your components in Markdown and embed documentation components, such as stories and props tables, inline. + +Docs has peer dependencies on `react`. If you want to write stories in MDX, you may need to add this dependency as well: + +```sh +yarn add -D react +``` + +Then update your `.storybook/main.js` to make sure you load MDX files: + +```js +module.exports = { + stories: ['../src/stories/**/*.stories.@(js|mdx)'], +}; +``` + +Finally, you can create MDX files like this: + +```md +import { Meta, Story, ArgsTable } from '@storybook/addon-docs'; +import { InfoButton } from './InfoButton.vue'; + + + +# InfoButton + +Some **markdown** description, or whatever you want. + +{{ + components: { InfoButton }, + template: '', +}} + +## ArgsTable + + +``` + +Yes, it's redundant to declare `component` twice. [Coming soon](https://github.com/storybookjs/storybook/issues/8685). + +## Inline Stories + +Storybook Docs renders all Vue stories inline by default. + +However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter. + +To do so for all stories, update `.storybook/preview.js`: + +```js +export const parameters = { docs: { inlineStories: false } }; +``` + +## More resources + +Want to learn more? Here are some more articles on Storybook Docs: + +- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md) +- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) +- Example: [Storybook Design System](https://github.com/storybookjs/design-system) diff --git a/code/addons/docs/web-components/README.md b/code/addons/docs/web-components/README.md new file mode 100644 index 000000000000..3677a30e1cce --- /dev/null +++ b/code/addons/docs/web-components/README.md @@ -0,0 +1,131 @@ +

    Storybook Docs for Web Components

    + +- [Installation](#installation) +- [Props tables](#props-tables) +- [Stories not inline](#stories-not-inline) +- [More resources](#more-resources) + +## Installation + +- Be sure to check the [installation section of the general addon-docs page](../README.md) before proceeding. +- Be sure to have a [custom-elements.json](./#custom-elementsjson) file. +- Add to your `.storybook/preview.js` + + ```js + import { setCustomElementsManifest } from '@storybook/web-components'; + import customElements from '../custom-elements.json'; + + setCustomElementsManifest(customElements); + ``` + +- Add to your story files + + ```js + export default { + title: 'Demo Card', + component: 'your-component-name', // which is also found in the `custom-elements.json` + }; + ``` + +## Props tables + +In order to get [Props tables](..docs/../../docs/props-tables.md) documentation for web-components you will need to have a [custom-elements.json](https://github.com/webcomponents/custom-elements-json) file. + +You can hand write it or better generate it. Depending on the web components sugar you are choosing your milage may vary. + +Known analyzers that output `custom-elements.json` v1.0.0: + +- [@custom-elements-manifest/analyzer](https://github.com/open-wc/custom-elements-manifest) + - Supports Vanilla, LitElement, FASTElement, Stencil, Catalyst, Atomico + +Known analyzers that output older versions of `custom-elements.json`: + +- [web-component-analyzer](https://github.com/runem/web-component-analyzer) + - Supports LitElement, Polymer, Vanilla, (Stencil) +- [stenciljs](https://stenciljs.com/) + - Supports Stencil (but does not have all metadata) + +To generate this file with Stencil, add `docs-vscode` to outputTargets in `stencil.config.ts`: + +``` +{ + type: 'docs-vscode', + file: 'custom-elements.json' +}, +``` + +The file looks something like this: + +```json +{ + "schemaVersion": "1.0.0", + "readme": "", + "modules": [ + { + "kind": "javascript-module", + "path": "src/my-element.js", + "declarations": [ + { + "kind": "class", + "description": "", + "name": "MyElement", + "members": [ + { + "kind": "field", + "name": "disabled" + }, + { + "kind": "method", + "name": "fire" + } + ], + "events": [ + { + "name": "disabled-changed", + "type": { + "text": "Event" + } + } + ], + "superclass": { + "name": "HTMLElement" + }, + "tagName": "my-element" + } + ], + "exports": [ + { + "kind": "custom-element-definition", + "name": "my-element", + "declaration": { + "name": "MyElement", + "module": "src/my-element.js" + } + } + ] + } + ] +} +``` + +For a full example see the [web-components-kitchen-sink/custom-elements.json](../../../examples/web-components-kitchen-sink/custom-elements.json). + +## Stories not inline + +Storybook Docs renders all web components stories inline by default. + +However, you can render stories in an iframe, with a default height of `60px` (configurable using the `docs.iframeHeight` story parameter), by using the `docs.inlineStories` parameter. + +To do so for all stories, update `.storybook/preview.js`: + +```js +export const parameters = { docs: { inlineStories: false } }; +``` + +## More resources + +Want to learn more? Here are some more articles on Storybook Docs: + +- References: [DocsPage](../docs/docspage.md) / [MDX](../docs/mdx.md) / [FAQ](../docs/faq.md) / [Recipes](../docs/recipes.md) / [Theming](../docs/theming.md) / [Props](../docs/props-tables.md) +- Announcements: [Vision](https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a) / [DocsPage](https://medium.com/storybookjs/storybook-docspage-e185bc3622bf) / [MDX](https://medium.com/storybookjs/rich-docs-with-storybook-mdx-61bc145ae7bc) / [Framework support](https://medium.com/storybookjs/storybook-docs-for-new-frameworks-b1f6090ee0ea) +- Example: [Storybook Design System](https://github.com/storybookjs/design-system) diff --git a/addons/docs/web-components/index.js b/code/addons/docs/web-components/index.js similarity index 100% rename from addons/docs/web-components/index.js rename to code/addons/docs/web-components/index.js diff --git a/code/addons/essentials/README.md b/code/addons/essentials/README.md new file mode 100644 index 000000000000..80d038134f73 --- /dev/null +++ b/code/addons/essentials/README.md @@ -0,0 +1,57 @@ +# Storybook Essentials + +Storybook Essentials is a curated collection of addons to bring out the best of Storybook. + +Each addon is documented and maintained by the core team and will be upgraded alongside Storybook as the platform evolves. We will also do our best to maintain [framework support](https://storybook.js.org/docs/react/api/frameworks-feature-support) for all of the officially supported frameworks. + +## Contents + +Storybook essentials includes the following addons. Addons can be disabled and re-configured as [described below](#configuration): + +- [Actions](https://github.com/storybookjs/storybook/tree/next/code/addons/actions) +- [Backgrounds](https://github.com/storybookjs/storybook/tree/next/code/addons/backgrounds) +- [Controls](https://github.com/storybookjs/storybook/tree/next/code/addons/controls) +- [Docs](https://github.com/storybookjs/storybook/tree/next/code/addons/docs) +- [Viewport](https://github.com/storybookjs/storybook/tree/next/code/addons/viewport) +- [Toolbars](https://github.com/storybookjs/storybook/tree/next/code/addons/toolbars) +- [Measure](https://github.com/storybookjs/storybook/tree/next/code/addons/measure) +- [Outline](https://github.com/storybookjs/storybook/tree/next/code/addons/outline) + +## Installation + +You can add Essentials to your project with: + +``` +npm install --save-dev @storybook/addon-essentials +``` + +And then add the following line to your `.storybook/main.js`: + +```js +module.exports = { + addons: ['@storybook/addon-essentials'], +}; +``` + +## Configuration + +Essentials is "zero config." That means that comes with a recommended configuration out of the box. + +If you want to reconfigure an addon, simply install that addon per that addon's installation instructions and configure it as normal. Essentials scans your project's `main.js` on startup and if detects one of its addons is already configured in the `addons` field, it will skip that addon's configuration entirely. + +## Disabling addons + +You can disable any of Essential's addons using the following configuration scheme in `.storybook/main.js`: + +```js +module.exports = { + addons: [{ + name: '@storybook/addon-essentials', + options: { + : false, + } + }] +}; +``` + +Valid addon keys include: `actions`, `backgrounds`, `controls`, `docs`, `viewport`, `toolbars`. diff --git a/code/addons/essentials/jest.config.js b/code/addons/essentials/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/essentials/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/essentials/package.json b/code/addons/essentials/package.json new file mode 100644 index 000000000000..22bd84648310 --- /dev/null +++ b/code/addons/essentials/package.json @@ -0,0 +1,170 @@ +{ + "name": "@storybook/addon-essentials", + "version": "7.0.0-beta.25", + "description": "Curated addons to bring out the best of Storybook", + "keywords": [ + "addon", + "essentials", + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/essentials", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/essentials" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./actions/preview": { + "require": "./dist/actions/preview.js", + "import": "./dist/actions/preview.mjs", + "types": "./dist/actions/preview.d.ts" + }, + "./actions/manager": { + "require": "./dist/actions/manager.js", + "import": "./dist/actions/manager.mjs", + "types": "./dist/actions/manager.d.ts" + }, + "./backgrounds/preview": { + "require": "./dist/backgrounds/preview.js", + "import": "./dist/backgrounds/preview.mjs", + "types": "./dist/backgrounds/preview.d.ts" + }, + "./backgrounds/manager": { + "require": "./dist/backgrounds/manager.js", + "import": "./dist/backgrounds/manager.mjs", + "types": "./dist/backgrounds/manager.d.ts" + }, + "./controls/manager": { + "require": "./dist/controls/manager.js", + "import": "./dist/controls/manager.mjs", + "types": "./dist/controls/manager.d.ts" + }, + "./docs/preview": { + "require": "./dist/docs/preview.js", + "import": "./dist/docs/preview.mjs", + "types": "./dist/docs/preview.d.ts" + }, + "./docs/preset": { + "require": "./dist/docs/preset.js", + "import": "./dist/docs/preset.mjs", + "types": "./dist/docs/preset.d.ts" + }, + "./docs/mdx-react-shim": { + "require": "./dist/docs/mdx-react-shim.js", + "import": "./dist/docs/mdx-react-shim.mjs", + "types": "./dist/docs/mdx-react-shim.d.ts" + }, + "./highlight/preview": { + "require": "./dist/highlight/preview.js", + "import": "./dist/highlight/preview.mjs", + "types": "./dist/highlight/preview.d.ts" + }, + "./measure/preview": { + "require": "./dist/measure/preview.js", + "import": "./dist/measure/preview.mjs", + "types": "./dist/measure/preview.d.ts" + }, + "./measure/manager": { + "require": "./dist/measure/manager.js", + "import": "./dist/measure/manager.mjs", + "types": "./dist/measure/manager.d.ts" + }, + "./outline/preview": { + "require": "./dist/outline/preview.js", + "import": "./dist/outline/preview.mjs", + "types": "./dist/outline/preview.d.ts" + }, + "./outline/manager": { + "require": "./dist/outline/manager.js", + "import": "./dist/outline/manager.mjs", + "types": "./dist/outline/manager.d.ts" + }, + "./toolbars/manager": { + "require": "./dist/toolbars/manager.js", + "import": "./dist/toolbars/manager.mjs", + "types": "./dist/toolbars/manager.d.ts" + }, + "./viewport/manager": { + "require": "./dist/viewport/manager.js", + "import": "./dist/viewport/manager.mjs", + "types": "./dist/viewport/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/addon-actions": "7.0.0-beta.25", + "@storybook/addon-backgrounds": "7.0.0-beta.25", + "@storybook/addon-controls": "7.0.0-beta.25", + "@storybook/addon-docs": "7.0.0-beta.25", + "@storybook/addon-highlight": "7.0.0-beta.25", + "@storybook/addon-measure": "7.0.0-beta.25", + "@storybook/addon-outline": "7.0.0-beta.25", + "@storybook/addon-toolbars": "7.0.0-beta.25", + "@storybook/addon-viewport": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "ts-dedent": "^2.0.0" + }, + "devDependencies": { + "@storybook/vue": "7.0.0-beta.25", + "typescript": "^4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/actions/preview.ts", + "./src/actions/manager.ts", + "./src/backgrounds/preview.ts", + "./src/backgrounds/manager.ts", + "./src/controls/manager.ts", + "./src/docs/preview.ts", + "./src/docs/preset.ts", + "./src/docs/mdx-react-shim.ts", + "./src/highlight/preview.ts", + "./src/measure/preview.ts", + "./src/measure/manager.ts", + "./src/outline/preview.ts", + "./src/outline/manager.ts", + "./src/toolbars/manager.ts", + "./src/viewport/manager.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/addons/essentials/src/actions/manager.ts b/code/addons/essentials/src/actions/manager.ts new file mode 100644 index 000000000000..7e125b743169 --- /dev/null +++ b/code/addons/essentials/src/actions/manager.ts @@ -0,0 +1,2 @@ +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-actions/manager'; diff --git a/code/addons/essentials/src/actions/preview.ts b/code/addons/essentials/src/actions/preview.ts new file mode 100644 index 000000000000..86c6d5f2e656 --- /dev/null +++ b/code/addons/essentials/src/actions/preview.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +export * from '@storybook/addon-actions/preview'; diff --git a/code/addons/essentials/src/backgrounds/manager.ts b/code/addons/essentials/src/backgrounds/manager.ts new file mode 100644 index 000000000000..bc51f1b22b4e --- /dev/null +++ b/code/addons/essentials/src/backgrounds/manager.ts @@ -0,0 +1,2 @@ +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-backgrounds/manager'; diff --git a/code/addons/essentials/src/backgrounds/preview.ts b/code/addons/essentials/src/backgrounds/preview.ts new file mode 100644 index 000000000000..5e56121e4a03 --- /dev/null +++ b/code/addons/essentials/src/backgrounds/preview.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +export * from '@storybook/addon-backgrounds/preview'; diff --git a/code/addons/essentials/src/controls/manager.ts b/code/addons/essentials/src/controls/manager.ts new file mode 100644 index 000000000000..49e403523565 --- /dev/null +++ b/code/addons/essentials/src/controls/manager.ts @@ -0,0 +1,2 @@ +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-controls/manager'; diff --git a/code/addons/essentials/src/docs/mdx-react-shim.ts b/code/addons/essentials/src/docs/mdx-react-shim.ts new file mode 100644 index 000000000000..cd32a7670059 --- /dev/null +++ b/code/addons/essentials/src/docs/mdx-react-shim.ts @@ -0,0 +1 @@ +export * from '@storybook/addon-docs/dist/shims/mdx-react-shim'; diff --git a/code/addons/essentials/src/docs/preset.ts b/code/addons/essentials/src/docs/preset.ts new file mode 100644 index 000000000000..af022cfece92 --- /dev/null +++ b/code/addons/essentials/src/docs/preset.ts @@ -0,0 +1,8 @@ +/* eslint-disable import/export */ +export * from '@storybook/addon-docs/dist/preset'; + +export const mdxLoaderOptions = async (config: any) => { + // eslint-disable-next-line no-param-reassign + config.mdxCompileOptions.providerImportSource = '@storybook/addon-essentials/docs/mdx-react-shim'; + return config; +}; diff --git a/code/addons/essentials/src/docs/preview.ts b/code/addons/essentials/src/docs/preview.ts new file mode 100644 index 000000000000..82789638faf8 --- /dev/null +++ b/code/addons/essentials/src/docs/preview.ts @@ -0,0 +1,2 @@ +// eslint-disable-next-line import/export +export * from '@storybook/addon-docs/dist/preview'; diff --git a/code/addons/essentials/src/highlight/preview.ts b/code/addons/essentials/src/highlight/preview.ts new file mode 100644 index 000000000000..ffcf62555af2 --- /dev/null +++ b/code/addons/essentials/src/highlight/preview.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +export * from '@storybook/addon-highlight/preview'; diff --git a/code/addons/essentials/src/index.ts b/code/addons/essentials/src/index.ts new file mode 100644 index 000000000000..96fd171146bb --- /dev/null +++ b/code/addons/essentials/src/index.ts @@ -0,0 +1,57 @@ +import path from 'path'; +import { logger } from '@storybook/node-logger'; +import { serverRequire } from '@storybook/core-common'; + +interface PresetOptions { + configDir: string; + docs?: boolean; + controls?: boolean; + actions?: boolean; + backgrounds?: boolean; + viewport?: boolean; + toolbars?: boolean; + measure?: boolean; + outline?: boolean; +} + +const requireMain = (configDir: string) => { + const absoluteConfigDir = path.isAbsolute(configDir) + ? configDir + : path.join(process.cwd(), configDir); + const mainFile = path.join(absoluteConfigDir, 'main'); + + return serverRequire(mainFile) ?? {}; +}; + +export function addons(options: PresetOptions) { + const checkInstalled = (addonName: string, main: any) => { + const addon = `@storybook/addon-${addonName}`; + const existingAddon = main.addons?.find((entry: string | { name: string }) => { + const name = typeof entry === 'string' ? entry : entry.name; + return name?.startsWith(addon); + }); + if (existingAddon) { + logger.info(`Found existing addon ${JSON.stringify(existingAddon)}, skipping.`); + } + return !!existingAddon; + }; + + const main = requireMain(options.configDir); + return [ + 'docs', + 'controls', + 'actions', + 'backgrounds', + 'viewport', + 'toolbars', + 'measure', + 'outline', + 'highlight', + ] + .filter((key) => (options as any)[key] !== false) + .filter((addon) => !checkInstalled(addon, main)) + .map((addon) => { + // We point to the re-export from addon-essentials to support yarn pnp and pnpm. + return `@storybook/addon-essentials/${addon}`; + }); +} diff --git a/code/addons/essentials/src/measure/manager.ts b/code/addons/essentials/src/measure/manager.ts new file mode 100644 index 000000000000..cf95d95a76da --- /dev/null +++ b/code/addons/essentials/src/measure/manager.ts @@ -0,0 +1,2 @@ +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-measure/manager'; diff --git a/code/addons/essentials/src/measure/preview.ts b/code/addons/essentials/src/measure/preview.ts new file mode 100644 index 000000000000..f18769ff001a --- /dev/null +++ b/code/addons/essentials/src/measure/preview.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +export * from '@storybook/addon-measure/preview'; diff --git a/code/addons/essentials/src/outline/manager.ts b/code/addons/essentials/src/outline/manager.ts new file mode 100644 index 000000000000..07a0a1e4879a --- /dev/null +++ b/code/addons/essentials/src/outline/manager.ts @@ -0,0 +1,2 @@ +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-outline/manager'; diff --git a/code/addons/essentials/src/outline/preview.ts b/code/addons/essentials/src/outline/preview.ts new file mode 100644 index 000000000000..1cc44b9689a8 --- /dev/null +++ b/code/addons/essentials/src/outline/preview.ts @@ -0,0 +1,4 @@ +/* eslint-disable import/export */ +// TODO: We need to configure an eslint-import typescript resolver for export maps to be considered + +export * from '@storybook/addon-outline/preview'; diff --git a/code/addons/essentials/src/toolbars/manager.ts b/code/addons/essentials/src/toolbars/manager.ts new file mode 100644 index 000000000000..8c4868b1e254 --- /dev/null +++ b/code/addons/essentials/src/toolbars/manager.ts @@ -0,0 +1,2 @@ +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-toolbars/manager'; diff --git a/addons/essentials/src/typings.d.ts b/code/addons/essentials/src/typings.d.ts similarity index 100% rename from addons/essentials/src/typings.d.ts rename to code/addons/essentials/src/typings.d.ts diff --git a/code/addons/essentials/src/viewport/manager.ts b/code/addons/essentials/src/viewport/manager.ts new file mode 100644 index 000000000000..7c052f303800 --- /dev/null +++ b/code/addons/essentials/src/viewport/manager.ts @@ -0,0 +1,2 @@ +// @ts-expect-error The generated definition file is empty. https://github.com/egoist/tsup/issues/762 +export * from '@storybook/addon-viewport/manager'; diff --git a/code/addons/essentials/tsconfig.json b/code/addons/essentials/tsconfig.json new file mode 100644 index 000000000000..a4429176e35f --- /dev/null +++ b/code/addons/essentials/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true + }, + "include": ["src/**/*"] +} diff --git a/code/addons/highlight/README.md b/code/addons/highlight/README.md new file mode 100644 index 000000000000..b881349ef6f0 --- /dev/null +++ b/code/addons/highlight/README.md @@ -0,0 +1,64 @@ +# Storybook Addon Highlight + +Storybook addon allows for highlighting specific DOM nodes within your story. + +Use it to call attention to particular parts of the story. Or use it to enhance other addons that you might be building. For example, [Accessibility](https://storybook.js.org/addons/@storybook/addon-a11y/) addon uses it to highlight DOM nodes that are failing accessibility checks. + +![](https://user-images.githubusercontent.com/42671/160146801-179eaa79-fff8-4bff-b17c-9262fdc94918.png) + +## Usage + +This addon requires Storybook 6.5 or later. Highlight is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run: + +```sh +npm i -D @storybook/addon-highlight +``` + +Add `"@storybook/addon-highlight"` to the addons array in your `.storybook/main.js`: + +```js +module.exports = { + addons: ['@storybook/addon-highlight'], +}; +``` + +### Apply or clear highlights + +Highlight DOM nodes by emitting the `HIGHLIGHT` event from within a story or an addon. The event payload must contain a list of selectors you want to highlight. + +```js +import React, { useEffect } from 'react'; +import { useChannel } from '@storybook/preview-api'; +import { HIGHLIGHT, RESET_HIGHLIGHT } from '@storybook/addon-highlight'; +import { MyComponent } form './MyComponent'; + +export default { component: MyComponent }; + +export const MyStory = () => { + const emit = useChannel({}); + + useEffect(() => { + emit(HIGHLIGHT, { + elements: ['.title', '.subtitle'], + }); + }, []); + + return ; +}; +``` + +Highlights are automatically cleared when the story changes. You can also manually clear them by emitting the `RESET_HIGHLIGHT` event. + +```js +emit(RESET_HIGHLIGHT); +``` + +### Customize style + +```js +emit(HIGHLIGHT, { + elements: ['.title', '.subtitle'], + color: 'red', + style: 'solid', // 'dotted' | 'dashed' | 'solid' | 'double' +}); +``` diff --git a/code/addons/highlight/jest.config.js b/code/addons/highlight/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/highlight/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/highlight/package.json b/code/addons/highlight/package.json new file mode 100644 index 000000000000..2da45cddcc25 --- /dev/null +++ b/code/addons/highlight/package.json @@ -0,0 +1,90 @@ +{ + "name": "@storybook/addon-highlight", + "version": "7.0.0-beta.25", + "description": "Highlight DOM nodes within your stories", + "keywords": [ + "storybook-addons", + "essentials", + "style", + "appearance" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/highlight", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/highlight" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "author": "winkerVSbecks", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/preview-api": "7.0.0-beta.25" + }, + "devDependencies": { + "@types/webpack-env": "^1.16.0", + "typescript": "~4.9.3" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preview.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "sbmodern": "dist/modern/index.js", + "storybook": { + "displayName": "Highlight", + "unsupportedFrameworks": [ + "react-native" + ], + "icon": "https://user-images.githubusercontent.com/42671/162045505-9d06fe2e-8fcb-4c41-9486-e0553bce10cc.png" + } +} diff --git a/code/addons/highlight/preview.js b/code/addons/highlight/preview.js new file mode 100644 index 000000000000..49ad602f79f4 --- /dev/null +++ b/code/addons/highlight/preview.js @@ -0,0 +1 @@ +export * from './dist/preview'; diff --git a/code/addons/highlight/src/constants.ts b/code/addons/highlight/src/constants.ts new file mode 100644 index 000000000000..cbbdbd6bf1a1 --- /dev/null +++ b/code/addons/highlight/src/constants.ts @@ -0,0 +1,5 @@ +export const ADDON_ID = 'storybook/highlight'; +export const HIGHLIGHT_STYLE_ID = 'storybookHighlight'; + +export const HIGHLIGHT = `${ADDON_ID}/add`; +export const RESET_HIGHLIGHT = `${ADDON_ID}/reset`; diff --git a/code/addons/highlight/src/index.ts b/code/addons/highlight/src/index.ts new file mode 100644 index 000000000000..0dba067511ec --- /dev/null +++ b/code/addons/highlight/src/index.ts @@ -0,0 +1,8 @@ +export { HIGHLIGHT, RESET_HIGHLIGHT } from './constants'; + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} + +// make it work with --isolatedModules +export default {}; diff --git a/code/addons/highlight/src/preview.ts b/code/addons/highlight/src/preview.ts new file mode 100644 index 000000000000..9b90e6224122 --- /dev/null +++ b/code/addons/highlight/src/preview.ts @@ -0,0 +1,66 @@ +/* eslint-env browser */ +import { global } from '@storybook/global'; +import { addons } from '@storybook/preview-api'; +import { STORY_CHANGED } from '@storybook/core-events'; +import { HIGHLIGHT, RESET_HIGHLIGHT, HIGHLIGHT_STYLE_ID } from './constants'; + +const { document } = global; + +type OutlineStyle = 'dotted' | 'dashed' | 'solid' | 'double'; + +export const highlightStyle = (color = '#FF4785', style: OutlineStyle = 'dashed') => ` + outline: 2px ${style} ${color}; + outline-offset: 2px; + box-shadow: 0 0 0 6px rgba(255,255,255,0.6); +`; + +export const highlightObject = (color: string) => ({ + outline: `2px dashed ${color}`, + outlineOffset: 2, + boxShadow: '0 0 0 6px rgba(255,255,255,0.6)', +}); + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} + +interface HighlightInfo { + /** html selector of the element */ + elements: string[]; + color: string; + style: OutlineStyle; +} + +const channel = addons.getChannel(); + +const highlight = (infos: HighlightInfo) => { + const id = HIGHLIGHT_STYLE_ID; + resetHighlight(); + + // Make sure there are no duplicated selectors + const elements = Array.from(new Set(infos.elements)); + + const sheet = document.createElement('style'); + sheet.setAttribute('id', id); + sheet.innerHTML = elements + .map( + (target) => + `${target}{ + ${highlightStyle(infos.color, infos.style)} + }` + ) + .join(' '); + document.head.appendChild(sheet); +}; + +const resetHighlight = () => { + const id = HIGHLIGHT_STYLE_ID; + const sheetToBeRemoved = document.getElementById(id); + if (sheetToBeRemoved) { + sheetToBeRemoved.parentNode.removeChild(sheetToBeRemoved); + } +}; + +channel.on(STORY_CHANGED, resetHighlight); +channel.on(RESET_HIGHLIGHT, resetHighlight); +channel.on(HIGHLIGHT, highlight); diff --git a/code/addons/highlight/tsconfig.json b/code/addons/highlight/tsconfig.json new file mode 100644 index 000000000000..c94fb6fc9dd5 --- /dev/null +++ b/code/addons/highlight/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["webpack-env"] + }, + "include": ["src/**/*"] +} diff --git a/addons/interactions/README.md b/code/addons/interactions/README.md similarity index 100% rename from addons/interactions/README.md rename to code/addons/interactions/README.md diff --git a/code/addons/interactions/jest.config.js b/code/addons/interactions/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/interactions/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/interactions/manager.js b/code/addons/interactions/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/interactions/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/interactions/package.json b/code/addons/interactions/package.json new file mode 100644 index 000000000000..6be96a9b430b --- /dev/null +++ b/code/addons/interactions/package.json @@ -0,0 +1,129 @@ +{ + "name": "@storybook/addon-interactions", + "version": "7.0.0-beta.25", + "description": "Automate, test and debug user interactions", + "keywords": [ + "storybook-addons", + "data-state", + "test" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/interactions", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/interactions" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./register.js": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/instrumenter": "7.0.0-beta.25", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "jest-mock": "^27.0.6", + "polished": "^4.2.2", + "ts-dedent": "^2.2.0" + }, + "devDependencies": { + "@devtools-ds/object-inspector": "^1.1.2", + "@storybook/jest": "next", + "@storybook/testing-library": "next", + "@types/node": "^16.0.0", + "formik": "^2.2.9", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx", + "./src/preview.ts", + "./src/preset/checkActionsLoaded.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Interactions", + "unsupportedFrameworks": [ + "react-native" + ], + "icon": "https://user-images.githubusercontent.com/263385/101991666-479cc600-3c7c-11eb-837b-be4e5ffa1bb8.png" + } +} diff --git a/code/addons/interactions/preset.js b/code/addons/interactions/preset.js new file mode 100644 index 000000000000..6f2756ea9960 --- /dev/null +++ b/code/addons/interactions/preset.js @@ -0,0 +1,10 @@ +const { checkActionsLoaded } = require('./dist/preset/checkActionsLoaded'); + +function previewAnnotations(entry = [], options) { + checkActionsLoaded(options.configDir); + return entry; +} + +module.exports = { + previewAnnotations, +}; diff --git a/code/addons/interactions/preview.js b/code/addons/interactions/preview.js new file mode 100644 index 000000000000..49ad602f79f4 --- /dev/null +++ b/code/addons/interactions/preview.js @@ -0,0 +1 @@ +export * from './dist/preview'; diff --git a/code/addons/interactions/src/Panel.test.ts b/code/addons/interactions/src/Panel.test.ts new file mode 100644 index 000000000000..869b64b8bb0d --- /dev/null +++ b/code/addons/interactions/src/Panel.test.ts @@ -0,0 +1,288 @@ +import { type Call, CallStates, type LogItem } from '@storybook/instrumenter'; +import { getInteractions } from './Panel'; + +describe('Panel', () => { + describe('getInteractions', () => { + const log: LogItem[] = [ + { + callId: 'story--id [4] findByText', + status: CallStates.DONE, + ancestors: [], + }, + { + callId: 'story--id [5] click', + status: CallStates.DONE, + ancestors: [], + }, + { + callId: 'story--id [6] waitFor', + status: CallStates.DONE, + ancestors: [], + }, + { + callId: 'story--id [6] waitFor [2] toHaveBeenCalledWith', + status: CallStates.DONE, + ancestors: ['story--id [6] waitFor'], + }, + ]; + const calls = new Map( + [ + { + id: 'story--id [0] action', + storyId: 'story--id', + ancestors: [], + cursor: 0, + path: [], + method: 'action', + args: [{ __function__: { name: 'onSubmit' } }], + interceptable: false, + retain: true, + }, + { + id: 'story--id [1] action', + storyId: 'story--id', + ancestors: [], + cursor: 1, + path: [], + method: 'action', + args: [{ __function__: { name: 'onTransactionStart' } }], + interceptable: false, + retain: true, + }, + { + id: 'story--id [2] action', + storyId: 'story--id', + ancestors: [], + cursor: 2, + path: [], + method: 'action', + args: [{ __function__: { name: 'onTransactionEnd' } }], + interceptable: false, + retain: true, + }, + { + id: 'story--id [3] within', + storyId: 'story--id', + ancestors: [], + cursor: 3, + path: [], + method: 'within', + args: [{ __element__: { localName: 'div', id: 'root', innerText: 'Click' } }], + interceptable: false, + retain: false, + }, + { + id: 'story--id [4] findByText', + storyId: 'story--id', + ancestors: [], + cursor: 4, + path: [{ __callId__: 'story--id [3] within' }], + method: 'findByText', + args: ['Click'], + interceptable: true, + retain: false, + }, + { + id: 'story--id [5] click', + storyId: 'story--id', + ancestors: [], + cursor: 5, + path: ['userEvent'], + method: 'click', + args: [{ __element__: { localName: 'button', innerText: 'Click' } }], + interceptable: true, + retain: false, + }, + { + id: 'story--id [6] waitFor [0] expect', + storyId: 'story--id', + ancestors: ['story--id [6] waitFor'], + cursor: 0, + path: [], + method: 'expect', + args: [{ __callId__: 'story--id [0] action', retain: true }], + interceptable: true, + retain: false, + }, + { + id: 'story--id [6] waitFor [1] stringMatching', + storyId: 'story--id', + ancestors: ['story--id [6] waitFor'], + cursor: 1, + path: ['expect'], + method: 'stringMatching', + args: [{ __regexp__: { flags: 'gi', source: '([A-Z])\\w+' } }], + interceptable: false, + retain: false, + }, + { + id: 'story--id [6] waitFor [2] toHaveBeenCalledWith', + storyId: 'story--id', + ancestors: ['story--id [6] waitFor'], + cursor: 2, + path: [{ __callId__: 'story--id [6] waitFor [0] expect' }], + method: 'toHaveBeenCalledWith', + args: [{ __callId__: 'story--id [6] waitFor [1] stringMatching', retain: false }], + interceptable: true, + retain: false, + }, + { + id: 'story--id [6] waitFor', + storyId: 'story--id', + ancestors: [], + cursor: 6, + path: [], + method: 'waitFor', + args: [{ __function__: { name: '' } }], + interceptable: true, + retain: false, + }, + ].map((v) => [v.id, v]) + ); + const collapsed = new Set(); + const setCollapsed = () => {}; + + it('returns list of interactions', () => { + expect(getInteractions({ log, calls, collapsed, setCollapsed })).toEqual([ + { + ...calls.get('story--id [4] findByText'), + status: CallStates.DONE, + childCallIds: undefined, + isHidden: false, + isCollapsed: false, + toggleCollapsed: expect.any(Function), + }, + { + ...calls.get('story--id [5] click'), + status: CallStates.DONE, + childCallIds: undefined, + isHidden: false, + isCollapsed: false, + toggleCollapsed: expect.any(Function), + }, + { + ...calls.get('story--id [6] waitFor'), + status: CallStates.DONE, + childCallIds: ['story--id [6] waitFor [2] toHaveBeenCalledWith'], + isHidden: false, + isCollapsed: false, + toggleCollapsed: expect.any(Function), + }, + { + ...calls.get('story--id [6] waitFor [2] toHaveBeenCalledWith'), + status: CallStates.DONE, + childCallIds: undefined, + isHidden: false, + isCollapsed: false, + toggleCollapsed: expect.any(Function), + }, + ]); + }); + + it('hides calls for which the parent is collapsed', () => { + const withCollapsed = new Set(['story--id [6] waitFor']); + + expect(getInteractions({ log, calls, collapsed: withCollapsed, setCollapsed })).toEqual([ + expect.objectContaining({ + ...calls.get('story--id [4] findByText'), + childCallIds: undefined, + isCollapsed: false, + isHidden: false, + }), + expect.objectContaining({ + ...calls.get('story--id [5] click'), + childCallIds: undefined, + isCollapsed: false, + isHidden: false, + }), + expect.objectContaining({ + ...calls.get('story--id [6] waitFor'), + childCallIds: ['story--id [6] waitFor [2] toHaveBeenCalledWith'], + isCollapsed: true, + isHidden: false, + }), + expect.objectContaining({ + ...calls.get('story--id [6] waitFor [2] toHaveBeenCalledWith'), + childCallIds: undefined, + isCollapsed: false, + isHidden: true, + }), + ]); + }); + + it('uses status from log', () => { + const withError = log.slice(0, 3).concat({ ...log[3], status: CallStates.ERROR }); + + expect(getInteractions({ log: withError, calls, collapsed, setCollapsed })).toEqual([ + expect.objectContaining({ + id: 'story--id [4] findByText', + status: CallStates.DONE, + }), + expect.objectContaining({ + id: 'story--id [5] click', + status: CallStates.DONE, + }), + expect.objectContaining({ + id: 'story--id [6] waitFor', + status: CallStates.DONE, + }), + expect.objectContaining({ + id: 'story--id [6] waitFor [2] toHaveBeenCalledWith', + status: CallStates.ERROR, + }), + ]); + }); + + it('keeps status active for errored child calls while parent is active', () => { + const withActiveError = log.slice(0, 2).concat([ + { ...log[2], status: CallStates.ACTIVE }, + { ...log[3], status: CallStates.ERROR }, + ]); + + expect(getInteractions({ log: withActiveError, calls, collapsed, setCollapsed })).toEqual([ + expect.objectContaining({ + id: 'story--id [4] findByText', + status: CallStates.DONE, + }), + expect.objectContaining({ + id: 'story--id [5] click', + status: CallStates.DONE, + }), + expect.objectContaining({ + id: 'story--id [6] waitFor', + status: CallStates.ACTIVE, + }), + expect.objectContaining({ + id: 'story--id [6] waitFor [2] toHaveBeenCalledWith', + status: CallStates.ACTIVE, // not ERROR + }), + ]); + }); + + it('does not override child status other than error for active parent', () => { + const withActiveWaiting = log.slice(0, 2).concat([ + { ...log[2], status: CallStates.ACTIVE }, + { ...log[3], status: CallStates.WAITING }, + ]); + + expect(getInteractions({ log: withActiveWaiting, calls, collapsed, setCollapsed })).toEqual([ + expect.objectContaining({ + id: 'story--id [4] findByText', + status: CallStates.DONE, + }), + expect.objectContaining({ + id: 'story--id [5] click', + status: CallStates.DONE, + }), + expect.objectContaining({ + id: 'story--id [6] waitFor', + status: CallStates.ACTIVE, + }), + expect.objectContaining({ + id: 'story--id [6] waitFor [2] toHaveBeenCalledWith', + status: CallStates.WAITING, + }), + ]); + }); + }); +}); diff --git a/code/addons/interactions/src/Panel.tsx b/code/addons/interactions/src/Panel.tsx new file mode 100644 index 000000000000..b0eaf8c1d093 --- /dev/null +++ b/code/addons/interactions/src/Panel.tsx @@ -0,0 +1,207 @@ +import { global } from '@storybook/global'; +import * as React from 'react'; +import { useChannel, useParameter } from '@storybook/manager-api'; +import { + FORCE_REMOUNT, + IGNORED_EXCEPTION, + STORY_RENDER_PHASE_CHANGED, + STORY_THREW_EXCEPTION, + PLAY_FUNCTION_THREW_EXCEPTION, +} from '@storybook/core-events'; +import { + EVENTS, + type Call, + CallStates, + type ControlStates, + type LogItem, +} from '@storybook/instrumenter'; + +import type { StoryId } from '@storybook/types'; +import { InteractionsPanel } from './components/InteractionsPanel'; +import { TabIcon, TabStatus } from './components/TabStatus'; + +interface Interaction extends Call { + status: Call['status']; + childCallIds: Call['id'][]; + isHidden: boolean; + isCollapsed: boolean; + toggleCollapsed: () => void; +} + +const INITIAL_CONTROL_STATES = { + debugger: false, + start: false, + back: false, + goto: false, + next: false, + end: false, +}; + +export const getInteractions = ({ + log, + calls, + collapsed, + setCollapsed, +}: { + log: LogItem[]; + calls: Map; + collapsed: Set; + setCollapsed: React.Dispatch>>; +}) => { + const callsById = new Map(); + const childCallMap = new Map(); + return log + .map(({ callId, ancestors, status }) => { + let isHidden = false; + ancestors.forEach((ancestor) => { + if (collapsed.has(ancestor)) isHidden = true; + childCallMap.set(ancestor, (childCallMap.get(ancestor) || []).concat(callId)); + }); + return { ...calls.get(callId), status, isHidden }; + }) + .map((call) => { + const status = + call.status === CallStates.ERROR && + callsById.get(call.ancestors.slice(-1)[0])?.status === CallStates.ACTIVE + ? CallStates.ACTIVE + : call.status; + callsById.set(call.id, { ...call, status }); + return { + ...call, + status, + childCallIds: childCallMap.get(call.id), + isCollapsed: collapsed.has(call.id), + toggleCollapsed: () => + setCollapsed((ids) => { + if (ids.has(call.id)) ids.delete(call.id); + else ids.add(call.id); + return new Set(ids); + }), + }; + }); +}; + +export const Panel: React.FC<{ active: boolean }> = (props) => { + const [storyId, setStoryId] = React.useState(); + const [controlStates, setControlStates] = React.useState(INITIAL_CONTROL_STATES); + const [pausedAt, setPausedAt] = React.useState(); + const [isErrored, setErrored] = React.useState(false); + const [isPlaying, setPlaying] = React.useState(false); + const [isRerunAnimating, setIsRerunAnimating] = React.useState(false); + const [scrollTarget, setScrollTarget] = React.useState(); + const [collapsed, setCollapsed] = React.useState>(new Set()); + const [caughtException, setCaughtException] = React.useState(); + const [interactions, setInteractions] = React.useState([]); + const [interactionsCount, setInteractionsCount] = React.useState(); + + // Log and calls are tracked in a ref so we don't needlessly rerender. + const log = React.useRef([]); + const calls = React.useRef>>(new Map()); + const setCall = ({ status, ...call }: Call) => calls.current.set(call.id, call); + + const endRef = React.useRef(); + React.useEffect(() => { + let observer: IntersectionObserver; + if (global.IntersectionObserver) { + observer = new global.IntersectionObserver( + ([end]: any) => setScrollTarget(end.isIntersecting ? undefined : end.target), + { root: global.document.querySelector('#panel-tab-content') } + ); + if (endRef.current) observer.observe(endRef.current); + } + return () => observer?.disconnect(); + }, []); + + const emit = useChannel( + { + [EVENTS.CALL]: setCall, + [EVENTS.SYNC]: (payload) => { + setControlStates(payload.controlStates); + setPausedAt(payload.pausedAt); + setInteractions( + getInteractions({ log: payload.logItems, calls: calls.current, collapsed, setCollapsed }) + ); + log.current = payload.logItems; + }, + [STORY_RENDER_PHASE_CHANGED]: (event) => { + setStoryId(event.storyId); + setPlaying(event.newPhase === 'playing'); + setPausedAt(undefined); + if (event.newPhase === 'rendering') { + setErrored(false); + setCaughtException(undefined); + } + }, + [STORY_THREW_EXCEPTION]: () => { + setErrored(true); + }, + [PLAY_FUNCTION_THREW_EXCEPTION]: (e) => { + if (e?.message !== IGNORED_EXCEPTION.message) setCaughtException(e); + else setCaughtException(undefined); + }, + }, + [collapsed] + ); + + React.useEffect(() => { + setInteractions( + getInteractions({ log: log.current, calls: calls.current, collapsed, setCollapsed }) + ); + }, [collapsed]); + + React.useEffect(() => { + if (isPlaying || isRerunAnimating) return; + setInteractionsCount(interactions.filter(({ method }) => method !== 'step').length); + }, [interactions, isPlaying, isRerunAnimating]); + + const controls = React.useMemo( + () => ({ + start: () => emit(EVENTS.START, { storyId }), + back: () => emit(EVENTS.BACK, { storyId }), + goto: (callId: string) => emit(EVENTS.GOTO, { storyId, callId }), + next: () => emit(EVENTS.NEXT, { storyId }), + end: () => emit(EVENTS.END, { storyId }), + rerun: () => { + setIsRerunAnimating(true); + emit(FORCE_REMOUNT, { storyId }); + }, + }), + [storyId] + ); + + const storyFilePath = useParameter('fileName', ''); + const [fileName] = storyFilePath.toString().split('/').slice(-1); + const scrollToTarget = () => scrollTarget?.scrollIntoView({ behavior: 'smooth', block: 'end' }); + + const showStatus = interactionsCount > 0 || !!caughtException || isRerunAnimating; + const hasException = !!caughtException || interactions.some((v) => v.status === CallStates.ERROR); + + if (isErrored) { + return ; + } + + return ( + + + {showStatus && + (hasException ? : ` (${interactionsCount})`)} + + + + ); +}; diff --git a/addons/interactions/src/components/Interaction/Interaction.stories.tsx b/code/addons/interactions/src/components/Interaction.stories.tsx similarity index 82% rename from addons/interactions/src/components/Interaction/Interaction.stories.tsx rename to code/addons/interactions/src/components/Interaction.stories.tsx index 2089cef4a2a0..ea03a78431d5 100644 --- a/addons/interactions/src/components/Interaction/Interaction.stories.tsx +++ b/code/addons/interactions/src/components/Interaction.stories.tsx @@ -1,11 +1,11 @@ -import { ComponentStoryObj, ComponentMeta } from '@storybook/react'; +import type { ComponentStoryObj, ComponentMeta } from '@storybook/react'; import { expect } from '@storybook/jest'; import { CallStates } from '@storybook/instrumenter'; import { userEvent, within } from '@storybook/testing-library'; -import { getCalls } from '../../mocks'; +import { getCalls } from '../mocks'; import { Interaction } from './Interaction'; -import SubnavStories from '../Subnav/Subnav.stories'; +import SubnavStories from './Subnav.stories'; type Story = ComponentStoryObj; @@ -45,7 +45,7 @@ export const Done: Story = { export const WithParent: Story = { args: { - call: { ...getCalls(CallStates.DONE).slice(-1)[0], parentId: 'parent-id' }, + call: { ...getCalls(CallStates.DONE).slice(-1)[0], ancestors: ['parent-id'] }, }, }; @@ -62,6 +62,6 @@ export const Hovered: Story = { play: async ({ canvasElement }) => { const canvas = within(canvasElement); await userEvent.hover(canvas.getByRole('button')); - await expect(canvas.getByTestId('icon-active')).not.toBeNull(); + await expect(canvas.getByTestId('icon-active')).toBeInTheDocument(); }, }; diff --git a/addons/interactions/src/components/Interaction/Interaction.tsx b/code/addons/interactions/src/components/Interaction.tsx similarity index 79% rename from addons/interactions/src/components/Interaction/Interaction.tsx rename to code/addons/interactions/src/components/Interaction.tsx index 30922f8dc908..bacaea0fe358 100644 --- a/addons/interactions/src/components/Interaction/Interaction.tsx +++ b/code/addons/interactions/src/components/Interaction.tsx @@ -1,13 +1,14 @@ import * as React from 'react'; import { IconButton, Icons, TooltipNote, WithTooltip } from '@storybook/components'; -import { Call, CallStates, ControlStates } from '@storybook/instrumenter'; +import { type Call, CallStates, type ControlStates } from '@storybook/instrumenter'; import { styled, typography } from '@storybook/theming'; import { transparentize } from 'polished'; -import { MatcherResult } from '../MatcherResult'; -import { MethodCall } from '../MethodCall'; -import { StatusIcon } from '../StatusIcon/StatusIcon'; -import { Controls } from '../../Panel'; +import { MatcherResult } from './MatcherResult'; +import { MethodCall } from './MethodCall'; +import { StatusIcon } from './StatusIcon'; + +import type { Controls } from './InteractionsPanel'; const MethodCallWrapper = styled.div(() => ({ fontFamily: typography.fonts.mono, @@ -17,7 +18,7 @@ const MethodCallWrapper = styled.div(() => ({ })); const RowContainer = styled('div', { - shouldForwardProp: (prop) => !['call', 'pausedAt'].includes(prop), + shouldForwardProp: (prop) => !['call', 'pausedAt'].includes(prop.toString()), })<{ call: Call; pausedAt: Call['id'] }>( ({ theme, call }) => ({ position: 'relative', @@ -32,7 +33,7 @@ const RowContainer = styled('div', { ? transparentize(0.93, theme.color.negative) : theme.background.warning, }), - paddingLeft: call.parentId ? 20 : 0, + paddingLeft: call.ancestors.length * 20, }), ({ theme, call, pausedAt }) => pausedAt === call.id && { @@ -56,14 +57,14 @@ const RowContainer = styled('div', { } ); -const RowHeader = styled.div<{ disabled: boolean }>(({ theme, disabled }) => ({ +const RowHeader = styled.div<{ isInteractive: boolean }>(({ theme, isInteractive }) => ({ display: 'flex', - '&:hover': disabled ? {} : { background: theme.background.hoverable }, + '&:hover': isInteractive ? {} : { background: theme.background.hoverable }, })); -const RowLabel = styled('button', { shouldForwardProp: (prop) => !['call'].includes(prop) })< - React.ButtonHTMLAttributes & { call: Call } ->(({ theme, disabled, call }) => ({ +const RowLabel = styled('button', { + shouldForwardProp: (prop) => !['call'].includes(prop.toString()), +}) & { call: Call }>(({ theme, disabled, call }) => ({ flex: 1, display: 'grid', background: 'none', @@ -87,12 +88,12 @@ const RowLabel = styled('button', { shouldForwardProp: (prop) => !['call'].inclu }, })); -const RowActions = styled.div(({ theme }) => ({ +const RowActions = styled.div({ padding: 6, -})); +}); export const StyledIconButton = styled(IconButton as any)(({ theme }) => ({ - color: theme.color.mediumdark, + color: theme.textMutedColor, margin: '0 3px', })); @@ -103,13 +104,11 @@ const Note = styled(TooltipNote)(({ theme }) => ({ const RowMessage = styled('div')(({ theme }) => ({ padding: '8px 10px 8px 36px', fontSize: typography.size.s1, + color: theme.color.defaultText, pre: { margin: 0, padding: 0, }, - p: { - color: theme.color.dark, - }, })); const Exception = ({ exception }: { exception: Call['exception'] }) => { @@ -132,6 +131,7 @@ export const Interaction = ({ controls, controlStates, childCallIds, + isHidden, isCollapsed, toggleCollapsed, pausedAt, @@ -141,18 +141,24 @@ export const Interaction = ({ controls: Controls; controlStates: ControlStates; childCallIds?: Call['id'][]; + isHidden: boolean; isCollapsed: boolean; toggleCollapsed: () => void; pausedAt?: Call['id']; }) => { const [isHovered, setIsHovered] = React.useState(false); + const isInteractive = !controlStates.goto || !call.interceptable || !!call.ancestors.length; + + if (isHidden) return null; + return ( - + controls.goto(call.id)} - disabled={!controlStates.goto || !call.interceptable || !!call.parentId} + disabled={isInteractive} onMouseEnter={() => controlStates.goto && setIsHovered(true)} onMouseLeave={() => controlStates.goto && setIsHovered(false)} > @@ -165,11 +171,7 @@ export const Interaction = ({ {childCallIds?.length > 0 && ( - } + tooltip={} > diff --git a/code/addons/interactions/src/components/InteractionsPanel.stories.tsx b/code/addons/interactions/src/components/InteractionsPanel.stories.tsx new file mode 100644 index 000000000000..179023b84906 --- /dev/null +++ b/code/addons/interactions/src/components/InteractionsPanel.stories.tsx @@ -0,0 +1,141 @@ +import React from 'react'; +import type { StoryObj, Meta } from '@storybook/react'; +import { CallStates } from '@storybook/instrumenter'; +import { styled } from '@storybook/theming'; +import { userEvent, within, waitFor } from '@storybook/testing-library'; +import { expect } from '@storybook/jest'; +import isChromatic from 'chromatic/isChromatic'; + +import { getCalls, getInteractions } from '../mocks'; +import { InteractionsPanel } from './InteractionsPanel'; +import SubnavStories from './Subnav.stories'; + +const StyledWrapper = styled.div(({ theme }) => ({ + backgroundColor: theme.background.content, + color: theme.color.defaultText, + display: 'block', + height: '100%', + position: 'absolute', + left: 0, + right: 0, + bottom: 0, + overflow: 'auto', +})); + +const interactions = getInteractions(CallStates.DONE); + +const meta = { + title: 'Addons/Interactions/InteractionsPanel', + component: InteractionsPanel, + decorators: [ + (Story: any) => ( + + + + ), + ], + parameters: { + layout: 'fullscreen', + theme: 'light', // stacked will break interactions + }, + args: { + calls: new Map(getCalls(CallStates.DONE).map((call) => [call.id, call])), + controls: SubnavStories.args.controls, + controlStates: SubnavStories.args.controlStates, + interactions, + fileName: 'addon-interactions.stories.tsx', + hasException: false, + isPlaying: false, + onScrollToEnd: () => {}, + endRef: null, + // prop for the AddonPanel used as wrapper of Panel + active: true, + }, +} as Meta; + +export default meta; + +type Story = StoryObj; + +export const Passing: Story = { + args: { + interactions: getInteractions(CallStates.DONE), + }, +}; +Passing.play = async ({ args, canvasElement }) => { + if (isChromatic()) return; + const canvas = within(canvasElement); + + await waitFor(async () => { + await userEvent.click(canvas.getByLabelText('Go to start')); + await expect(args.controls.start).toHaveBeenCalled(); + }); + + await waitFor(async () => { + await userEvent.click(canvas.getByLabelText('Go back')); + await expect(args.controls.back).toHaveBeenCalled(); + }); + + await waitFor(async () => { + await userEvent.click(canvas.getByLabelText('Go forward')); + await expect(args.controls.next).not.toHaveBeenCalled(); + }); + + await waitFor(async () => { + await userEvent.click(canvas.getByLabelText('Go to end')); + await expect(args.controls.end).not.toHaveBeenCalled(); + }); + + await waitFor(async () => { + await userEvent.click(canvas.getByLabelText('Rerun')); + await expect(args.controls.rerun).toHaveBeenCalled(); + }); +}; + +export const Paused: Story = { + args: { + isPlaying: true, + interactions: getInteractions(CallStates.WAITING), + controlStates: { + debugger: true, + start: false, + back: false, + goto: true, + next: true, + end: true, + }, + pausedAt: interactions[interactions.length - 1].id, + }, +}; + +export const Playing: Story = { + args: { + isPlaying: true, + interactions: getInteractions(CallStates.ACTIVE), + }, +}; + +export const Failed: Story = { + args: { + hasException: true, + interactions: getInteractions(CallStates.ERROR), + }, +}; + +export const NoDebugger: Story = { + args: { controlStates: { ...SubnavStories.args.controlStates, debugger: false } }, +}; + +export const NoInteractions: Story = { + args: { + interactions: [], + }, +}; + +export const CaughtException: Story = { + args: { + hasException: true, + interactions: [], + caughtException: new TypeError("Cannot read properties of undefined (reading 'args')"), + }, +}; diff --git a/code/addons/interactions/src/components/InteractionsPanel.tsx b/code/addons/interactions/src/components/InteractionsPanel.tsx new file mode 100644 index 000000000000..c1a523cf2b38 --- /dev/null +++ b/code/addons/interactions/src/components/InteractionsPanel.tsx @@ -0,0 +1,163 @@ +import * as React from 'react'; +import { AddonPanel, Link, Placeholder } from '@storybook/components'; +import { type Call, CallStates, type ControlStates } from '@storybook/instrumenter'; +import { styled } from '@storybook/theming'; +import { transparentize } from 'polished'; + +import { Subnav } from './Subnav'; + +import { Interaction } from './Interaction'; + +export interface Controls { + start: (args: any) => void; + back: (args: any) => void; + goto: (args: any) => void; + next: (args: any) => void; + end: (args: any) => void; + rerun: (args: any) => void; +} + +interface InteractionsPanelProps { + active: boolean; + controls: Controls; + controlStates: ControlStates; + interactions: (Call & { + status?: CallStates; + childCallIds: Call['id'][]; + isHidden: boolean; + isCollapsed: boolean; + toggleCollapsed: () => void; + })[]; + fileName?: string; + hasException?: boolean; + caughtException?: Error; + isPlaying?: boolean; + pausedAt?: Call['id']; + calls: Map; + endRef?: React.Ref; + onScrollToEnd?: () => void; + isRerunAnimating: boolean; + setIsRerunAnimating: React.Dispatch>; +} + +const Container = styled.div<{ withException: boolean }>(({ theme, withException }) => ({ + minHeight: '100%', + background: theme.background.content, + ...(withException && { + backgroundColor: + theme.base === 'dark' ? transparentize(0.93, theme.color.negative) : theme.background.warning, + }), +})); + +const CaughtException = styled.div(({ theme }) => ({ + padding: 15, + fontSize: theme.typography.size.s2 - 1, + lineHeight: '19px', +})); +const CaughtExceptionCode = styled.code(({ theme }) => ({ + margin: '0 1px', + padding: 3, + fontSize: theme.typography.size.s1 - 1, + lineHeight: 1, + verticalAlign: 'top', + background: 'rgba(0, 0, 0, 0.05)', + border: `1px solid ${theme.appBorderColor}`, + borderRadius: 3, +})); +const CaughtExceptionTitle = styled.div({ + paddingBottom: 4, + fontWeight: 'bold', +}); +const CaughtExceptionDescription = styled.p({ + margin: 0, + padding: '0 0 20px', +}); +const CaughtExceptionStack = styled.pre(({ theme }) => ({ + margin: 0, + padding: 0, + fontSize: theme.typography.size.s1 - 1, +})); + +export const InteractionsPanel: React.FC = React.memo( + function InteractionsPanel({ + calls, + controls, + controlStates, + interactions, + fileName, + hasException, + caughtException, + isPlaying, + pausedAt, + onScrollToEnd, + endRef, + isRerunAnimating, + setIsRerunAnimating, + ...panelProps + }) { + return ( + + + {controlStates.debugger && + (interactions.length > 0 || hasException || isRerunAnimating) && ( + + )} +
    + {interactions.map((call) => ( + + ))} +
    + {caughtException && !caughtException.message?.startsWith('ignoredException') && ( + + + Caught exception in play function + + + This story threw an error after it finished rendering which means your interactions + couldn' t be run.Go to this story' s play function in {fileName} to fix. + + + {caughtException.stack || `${caughtException.name}: ${caughtException.message}`} + + + )} +
    + {!isPlaying && !caughtException && interactions.length === 0 && ( + + No interactions found + + Learn how to add interactions to your story + + + )} + + + ); + } +); diff --git a/addons/interactions/src/components/List.tsx b/code/addons/interactions/src/components/List.tsx similarity index 93% rename from addons/interactions/src/components/List.tsx rename to code/addons/interactions/src/components/List.tsx index d2b365fdeb93..8c420d37102a 100644 --- a/addons/interactions/src/components/List.tsx +++ b/code/addons/interactions/src/components/List.tsx @@ -1,6 +1,6 @@ import React, { Fragment, useState } from 'react'; import { styled, themes, convert } from '@storybook/theming'; -import { Icons, IconsProps } from '@storybook/components'; +import { Icons, type IconsProps } from '@storybook/components'; const ListWrapper = styled.ul({ listStyle: 'none', @@ -22,7 +22,7 @@ const Icon = styled(Icons)({ height: 10, width: 10, minWidth: 10, - color: convert(themes.light).color.mediumdark, + color: convert(themes.light).textMutedColor, marginRight: 10, transition: 'transform 0.1s ease-in-out', alignSelf: 'center', @@ -68,7 +68,7 @@ export const ListItem: React.FC = ({ item }) => { onToggle(!open)} role="button"> { }; const StyledExpected = styled.span(({ theme }) => ({ - color: theme.color.positive, + color: theme.base === 'light' ? theme.color.positiveText : theme.color.positive, })); const StyledReceived = styled.span(({ theme }) => ({ - color: theme.color.negative, + color: theme.base === 'light' ? theme.color.negativeText : theme.color.negative, })); export const Received = ({ value, parsed }: { value: any; parsed?: boolean }) => diff --git a/addons/interactions/src/components/MethodCall.stories.tsx b/code/addons/interactions/src/components/MethodCall.stories.tsx similarity index 90% rename from addons/interactions/src/components/MethodCall.stories.tsx rename to code/addons/interactions/src/components/MethodCall.stories.tsx index b65001b4e1cb..05b920a05cd2 100644 --- a/addons/interactions/src/components/MethodCall.stories.tsx +++ b/code/addons/interactions/src/components/MethodCall.stories.tsx @@ -1,4 +1,4 @@ -import { Call } from '@storybook/instrumenter'; +import type { Call } from '@storybook/instrumenter'; import React from 'react'; import { styled, typography } from '@storybook/theming'; import { Node, MethodCall } from './MethodCall'; @@ -57,6 +57,7 @@ export const Args = () => ( /> + @@ -99,6 +100,7 @@ const calls: Call[] = [ { cursor: 0, id: '1', + ancestors: [], path: ['screen'], method: 'getByText', storyId: 'kind--story', @@ -109,6 +111,7 @@ const calls: Call[] = [ { cursor: 1, id: '2', + ancestors: [], path: ['userEvent'], method: 'click', storyId: 'kind--story', @@ -119,6 +122,7 @@ const calls: Call[] = [ { cursor: 2, id: '3', + ancestors: [], path: [], method: 'expect', storyId: 'kind--story', @@ -129,6 +133,7 @@ const calls: Call[] = [ { cursor: 3, id: '4', + ancestors: [], path: [{ __callId__: '3' }, 'not'], method: 'toBe', storyId: 'kind--story', @@ -139,6 +144,7 @@ const calls: Call[] = [ { cursor: 4, id: '5', + ancestors: [], path: ['jest'], method: 'fn', storyId: 'kind--story', @@ -149,6 +155,7 @@ const calls: Call[] = [ { cursor: 5, id: '6', + ancestors: [], path: [], method: 'expect', storyId: 'kind--story', @@ -159,6 +166,7 @@ const calls: Call[] = [ { cursor: 6, id: '7', + ancestors: [], path: ['expect'], method: 'stringMatching', storyId: 'kind--story', @@ -169,6 +177,7 @@ const calls: Call[] = [ { cursor: 7, id: '8', + ancestors: [], path: [{ __callId__: '6' }, 'not'], method: 'toHaveBeenCalledWith', storyId: 'kind--story', @@ -182,6 +191,17 @@ const calls: Call[] = [ interceptable: false, retain: false, }, + { + cursor: 8, + id: '9', + ancestors: [], + path: [], + method: 'step', + storyId: 'kind--story', + args: ['Custom step label', { __function__: { name: '' } }], + interceptable: true, + retain: false, + }, ]; const callsById = calls.reduce((acc, call) => { @@ -189,6 +209,7 @@ const callsById = calls.reduce((acc, call) => { return acc; }, new Map()); +export const Step = () => ; export const Simple = () => ; export const Nested = () => ; export const Chained = () => ; diff --git a/addons/interactions/src/components/MethodCall.tsx b/code/addons/interactions/src/components/MethodCall.tsx similarity index 95% rename from addons/interactions/src/components/MethodCall.tsx rename to code/addons/interactions/src/components/MethodCall.tsx index 871068cea0ef..7bb2f6503916 100644 --- a/addons/interactions/src/components/MethodCall.tsx +++ b/code/addons/interactions/src/components/MethodCall.tsx @@ -1,7 +1,8 @@ import { ObjectInspector } from '@devtools-ds/object-inspector'; -import { Call, CallRef, ElementRef } from '@storybook/instrumenter'; +import type { Call, CallRef, ElementRef } from '@storybook/instrumenter'; import { useTheme } from '@storybook/theming'; -import React, { Fragment, ReactElement } from 'react'; +import type { ReactElement } from 'react'; +import React, { Fragment } from 'react'; const colorsLight = { base: '#444', @@ -383,17 +384,35 @@ export const OtherNode = ({ value }: { value: any }) => { return {stringify(value)}; }; +export const StepNode = ({ label }: { label: string }) => { + const colors = useThemeColors(); + const { typography } = useTheme(); + return ( + + {label} + + ); +}; + export const MethodCall = ({ call, callsById, }: { - call: Call; + call?: Call; callsById: Map; }) => { // Call might be undefined during initial render, can be safely ignored. if (!call) return null; - const colors = useThemeColors(); + if (call.method === 'step' && call.path.length === 0) { + return ; + } const path = call.path.flatMap((elem, index) => { // eslint-disable-next-line no-underscore-dangle @@ -416,6 +435,7 @@ export const MethodCall = ({ : [node]; }); + const colors = useThemeColors(); return ( <> {path} diff --git a/addons/interactions/src/components/StatusBadge/StatusBadge.stories.tsx b/code/addons/interactions/src/components/StatusBadge.stories.tsx similarity index 100% rename from addons/interactions/src/components/StatusBadge/StatusBadge.stories.tsx rename to code/addons/interactions/src/components/StatusBadge.stories.tsx diff --git a/addons/interactions/src/components/StatusBadge/StatusBadge.tsx b/code/addons/interactions/src/components/StatusBadge.tsx similarity index 84% rename from addons/interactions/src/components/StatusBadge/StatusBadge.tsx rename to code/addons/interactions/src/components/StatusBadge.tsx index 4c28636166f3..49066d93dc5a 100644 --- a/addons/interactions/src/components/StatusBadge/StatusBadge.tsx +++ b/code/addons/interactions/src/components/StatusBadge.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Call, CallStates } from '@storybook/instrumenter'; +import { type Call, CallStates } from '@storybook/instrumenter'; import { styled, typography } from '@storybook/theming'; export interface StatusBadgeProps { @@ -35,5 +35,9 @@ export const StatusBadge: React.FC = ({ status }) => { [CallStates.ACTIVE]: 'Runs', [CallStates.WAITING]: 'Runs', }[status]; - return {badgeText}; + return ( + + {badgeText} + + ); }; diff --git a/addons/interactions/src/components/StatusIcon/StatusIcon.stories.tsx b/code/addons/interactions/src/components/StatusIcon.stories.tsx similarity index 85% rename from addons/interactions/src/components/StatusIcon/StatusIcon.stories.tsx rename to code/addons/interactions/src/components/StatusIcon.stories.tsx index 07c6cdd2d420..082f9c6c2312 100644 --- a/addons/interactions/src/components/StatusIcon/StatusIcon.stories.tsx +++ b/code/addons/interactions/src/components/StatusIcon.stories.tsx @@ -10,6 +10,10 @@ export const Pending = { args: { status: CallStates.WAITING }, }; +export const Active = { + args: { status: CallStates.ACTIVE }, +}; + export const Error = { args: { status: CallStates.ERROR }, }; diff --git a/addons/interactions/src/components/StatusIcon/StatusIcon.tsx b/code/addons/interactions/src/components/StatusIcon.tsx similarity index 80% rename from addons/interactions/src/components/StatusIcon/StatusIcon.tsx rename to code/addons/interactions/src/components/StatusIcon.tsx index d26d7bd493bc..a563f6df1521 100644 --- a/addons/interactions/src/components/StatusIcon/StatusIcon.tsx +++ b/code/addons/interactions/src/components/StatusIcon.tsx @@ -1,13 +1,15 @@ import React from 'react'; -import { Icons, IconsProps } from '@storybook/components'; -import { Call, CallStates } from '@storybook/instrumenter'; +import { Icons, type IconsProps } from '@storybook/components'; +import { type Call, CallStates } from '@storybook/instrumenter'; import { styled } from '@storybook/theming'; import { transparentize } from 'polished'; -import localTheme from '../../theme'; +import localTheme from '../theme'; -export interface StatusIconProps extends IconsProps { +export interface StatusIconProps { status: Call['status']; + useSymbol?: IconsProps['useSymbol']; + className?: string; } const { diff --git a/addons/interactions/src/components/Subnav/Subnav.stories.tsx b/code/addons/interactions/src/components/Subnav.stories.tsx similarity index 100% rename from addons/interactions/src/components/Subnav/Subnav.stories.tsx rename to code/addons/interactions/src/components/Subnav.stories.tsx diff --git a/addons/interactions/src/components/Subnav/Subnav.tsx b/code/addons/interactions/src/components/Subnav.tsx similarity index 77% rename from addons/interactions/src/components/Subnav/Subnav.tsx rename to code/addons/interactions/src/components/Subnav.tsx index 9b371cce947c..cb211e73e536 100644 --- a/addons/interactions/src/components/Subnav/Subnav.tsx +++ b/code/addons/interactions/src/components/Subnav.tsx @@ -1,4 +1,5 @@ -import React, { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import { Button, IconButton, @@ -9,11 +10,13 @@ import { WithTooltip, Bar, } from '@storybook/components'; -import { Call, CallStates, ControlStates } from '@storybook/instrumenter'; +import type { Call, ControlStates } from '@storybook/instrumenter'; +import { CallStates } from '@storybook/instrumenter'; import { styled } from '@storybook/theming'; -import { StatusBadge } from '../StatusBadge/StatusBadge'; -import { Controls } from '../../Panel'; +import { StatusBadge } from './StatusBadge'; + +import type { Controls } from './InteractionsPanel'; const SubnavWrapper = styled.div(({ theme }) => ({ background: theme.background.app, @@ -57,7 +60,7 @@ const Note = styled(TooltipNote)(({ theme }) => ({ })); export const StyledIconButton = styled(IconButton as any)(({ theme }) => ({ - color: theme.color.mediumdark, + color: theme.textMutedColor, margin: '0 3px', })); @@ -130,32 +133,52 @@ export const Subnav: React.FC = ({ }> - + }> - + }> - + }> - + }> setIsRerunAnimating(false)} diff --git a/code/addons/interactions/src/components/TabStatus.tsx b/code/addons/interactions/src/components/TabStatus.tsx new file mode 100644 index 000000000000..66116985c7dd --- /dev/null +++ b/code/addons/interactions/src/components/TabStatus.tsx @@ -0,0 +1,13 @@ +import { styled } from '@storybook/theming'; +import ReactDOM from 'react-dom'; + +import { StatusIcon } from './StatusIcon'; + +export const TabStatus = ({ children }: { children: React.ReactChild }) => { + const container = global.document.getElementById('tabbutton-interactions'); + return container && ReactDOM.createPortal(children, container); +}; + +export const TabIcon = styled(StatusIcon)({ + marginLeft: 5, +}); diff --git a/addons/interactions/src/constants.ts b/code/addons/interactions/src/constants.ts similarity index 100% rename from addons/interactions/src/constants.ts rename to code/addons/interactions/src/constants.ts diff --git a/addons/interactions/src/index.ts b/code/addons/interactions/src/index.ts similarity index 100% rename from addons/interactions/src/index.ts rename to code/addons/interactions/src/index.ts diff --git a/code/addons/interactions/src/manager.tsx b/code/addons/interactions/src/manager.tsx new file mode 100644 index 000000000000..909eeb3b8e6d --- /dev/null +++ b/code/addons/interactions/src/manager.tsx @@ -0,0 +1,13 @@ +import { addons, types } from '@storybook/manager-api'; + +import { ADDON_ID, PANEL_ID } from './constants'; +import { Panel } from './Panel'; + +addons.register(ADDON_ID, () => { + addons.add(PANEL_ID, { + type: types.PANEL, + title: 'Interactions', + match: ({ viewMode }) => viewMode === 'story', + render: Panel, + }); +}); diff --git a/code/addons/interactions/src/mocks/index.ts b/code/addons/interactions/src/mocks/index.ts new file mode 100644 index 000000000000..cffabc3352bc --- /dev/null +++ b/code/addons/interactions/src/mocks/index.ts @@ -0,0 +1,148 @@ +import { CallStates, type Call } from '@storybook/instrumenter'; + +export const getCalls = (finalStatus: CallStates) => { + const calls: Call[] = [ + { + id: 'story--id [3] step', + storyId: 'story--id', + cursor: 1, + ancestors: [], + path: [], + method: 'step', + args: ['Click button', { __function__: { name: '' } }], + interceptable: true, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [3] step [1] within', + storyId: 'story--id', + cursor: 3, + ancestors: ['story--id [3] step'], + path: [], + method: 'within', + args: [{ __element__: { localName: 'div', id: 'root' } }], + interceptable: false, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [3] step [2] findByText', + storyId: 'story--id', + cursor: 4, + ancestors: ['story--id [3] step'], + path: [{ __callId__: 'story--id [3] step [1] within' }], + method: 'findByText', + args: ['Click'], + interceptable: true, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [3] step [3] click', + storyId: 'story--id', + cursor: 5, + ancestors: ['story--id [3] step'], + path: ['userEvent'], + method: 'click', + args: [{ __element__: { localName: 'button', innerText: 'Click' } }], + interceptable: true, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [6] waitFor', + storyId: 'story--id', + cursor: 6, + ancestors: [], + path: [], + method: 'waitFor', + args: [{ __function__: { name: '' } }], + interceptable: true, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [6] waitFor [0] expect', + storyId: 'story--id', + cursor: 1, + ancestors: ['story--id [6] waitFor'], + path: [], + method: 'expect', + args: [{ __function__: { name: 'handleSubmit' } }], + interceptable: false, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [6] waitFor [1] stringMatching', + storyId: 'story--id', + cursor: 2, + ancestors: ['story--id [6] waitFor'], + path: ['expect'], + method: 'stringMatching', + args: [{ __regexp__: { flags: 'gi', source: '([A-Z])w+' } }], + interceptable: false, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [6] waitFor [2] toHaveBeenCalledWith', + storyId: 'story--id', + cursor: 3, + ancestors: ['story--id [6] waitFor'], + path: [{ __callId__: 'story--id [6] waitFor [0] expect' }], + method: 'toHaveBeenCalledWith', + args: [{ __callId__: 'story--id [6] waitFor [1] stringMatching', retain: false }], + interceptable: true, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [7] expect', + storyId: 'story--id', + cursor: 7, + ancestors: [], + path: [], + method: 'expect', + args: [{ __function__: { name: 'handleReset' } }], + interceptable: false, + retain: false, + status: CallStates.DONE, + }, + { + id: 'story--id [8] toHaveBeenCalled', + storyId: 'story--id', + cursor: 8, + ancestors: [], + path: [{ __callId__: 'story--id [7] expect' }, 'not'], + method: 'toHaveBeenCalled', + args: [], + interceptable: true, + retain: false, + status: finalStatus, + }, + ]; + + if (finalStatus === CallStates.ERROR) { + calls[calls.length - 1].exception = { + name: 'Error', + stack: '', + message: 'Oops!', + callId: calls[calls.length - 1].id, + }; + } + + return calls; +}; + +export const getInteractions = (finalStatus: CallStates) => + getCalls(finalStatus) + .filter((call) => call.interceptable) + .map((call) => ({ + ...call, + childCallIds: [], + isCollapsed: false, + isHidden: false, + toggleCollapsed: () => {}, + })); diff --git a/addons/interactions/src/preset/checkActionsLoaded.ts b/code/addons/interactions/src/preset/checkActionsLoaded.ts similarity index 100% rename from addons/interactions/src/preset/checkActionsLoaded.ts rename to code/addons/interactions/src/preset/checkActionsLoaded.ts diff --git a/code/addons/interactions/src/preview.ts b/code/addons/interactions/src/preview.ts new file mode 100644 index 000000000000..3c653ff51710 --- /dev/null +++ b/code/addons/interactions/src/preview.ts @@ -0,0 +1,70 @@ +/// + +import { addons } from '@storybook/preview-api'; +import { FORCE_REMOUNT, STORY_RENDER_PHASE_CHANGED } from '@storybook/core-events'; +import type { + Renderer, + ArgsEnhancer, + PlayFunction, + PlayFunctionContext, + StepLabel, +} from '@storybook/types'; +import { instrument } from '@storybook/instrumenter'; +import { ModuleMocker } from 'jest-mock'; + +const JestMock = new ModuleMocker(global); +const fn = JestMock.fn.bind(JestMock); + +// Aliasing `fn` to `action` here, so we get a more descriptive label in the UI. +const { action } = instrument({ action: fn }, { retain: true }); +const channel = addons.getChannel(); +const seen = new Set(); +const spies: any[] = []; + +channel.on(FORCE_REMOUNT, () => spies.forEach((mock) => mock?.mockClear?.())); +channel.on(STORY_RENDER_PHASE_CHANGED, ({ newPhase }) => { + if (newPhase === 'loading') spies.forEach((mock) => mock?.mockClear?.()); +}); + +const addSpies = (id: string, val: any, key?: string): any => { + if (seen.has(val)) return val; + seen.add(val); + try { + if (Object.prototype.toString.call(val) === '[object Object]') { + // We have to mutate the original object for this to survive HMR. + // eslint-disable-next-line no-restricted-syntax, no-param-reassign + for (const [k, v] of Object.entries(val)) val[k] = addSpies(id, v, k); + return val; + } + if (Array.isArray(val)) { + return val.map((item, index) => addSpies(id, item, `${key}[${index}]`)); + } + if (typeof val === 'function' && val.isAction) { + Object.defineProperty(val, 'name', { value: key, writable: false }); + Object.defineProperty(val, '__storyId__', { value: id, writable: false }); + const spy = action(val); + spies.push(spy); + return spy; + } + } catch (e) { + // ignore + } + return val; +}; + +const addActionsFromArgTypes: ArgsEnhancer = ({ id, initialArgs }) => + addSpies(id, initialArgs); + +export const argsEnhancers = [addActionsFromArgTypes]; + +export const { step: runStep } = instrument( + { + step: (label: StepLabel, play: PlayFunction, context: PlayFunctionContext) => + play(context), + }, + { intercept: true } +); + +export const parameters = { + throwPlayFunctionExceptions: false, +}; diff --git a/addons/interactions/src/theme.ts b/code/addons/interactions/src/theme.ts similarity index 100% rename from addons/interactions/src/theme.ts rename to code/addons/interactions/src/theme.ts diff --git a/code/addons/interactions/template/stories/basics.stories.ts b/code/addons/interactions/template/stories/basics.stories.ts new file mode 100644 index 000000000000..c8ddea0b6ea3 --- /dev/null +++ b/code/addons/interactions/template/stories/basics.stories.ts @@ -0,0 +1,98 @@ +import { global as globalThis } from '@storybook/global'; +import { + within, + waitFor, + fireEvent, + userEvent, + waitForElementToBeRemoved, +} from '@storybook/testing-library'; +import { expect } from '@storybook/jest'; + +export default { + component: globalThis.Components.Form, + argTypes: { + onSuccess: { type: 'function' }, + }, +}; + +export const Type = { + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + await userEvent.type(canvas.getByTestId('value'), 'test'); + }, +}; + +export const Step = { + play: async ({ step }) => { + await step('Enter value', Type.play); + }, +}; + +export const TypeAndClear = { + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + // TODO: seems like userEvent.type + userEvent.clear + userEvent.type is not working for Svelte and Vue2/3. We should probably investigate, might be a bug in userEvent or in our implementation. + await fireEvent.input(canvas.getByTestId('value'), { target: { value: 'initial value' } }); + await fireEvent.input(canvas.getByTestId('value'), { target: { value: '' } }); + await fireEvent.input(canvas.getByTestId('value'), { target: { value: 'final value' } }); + }, +}; + +export const Callback = { + play: async ({ args, canvasElement, step }) => { + const canvas = within(canvasElement); + await step('Enter value', Type.play); + + await step('Submit', async () => { + await fireEvent.click(canvas.getByRole('button')); + }); + + await expect(args.onSuccess).toHaveBeenCalled(); + }, +}; + +// NOTE: of course you can use `findByText()` to implicitly waitFor, but we want +// an explicit test here +export const SyncWaitFor = { + play: async ({ canvasElement, step }) => { + const canvas = within(canvasElement); + await step('Submit form', Callback.play); + await waitFor(() => canvas.getByText('Completed!!')); + }, +}; + +export const AsyncWaitFor = { + play: async ({ canvasElement, step }) => { + const canvas = within(canvasElement); + await step('Submit form', Callback.play); + await waitFor(async () => canvas.getByText('Completed!!')); + }, +}; + +export const WaitForElementToBeRemoved = { + play: async ({ canvasElement, step }) => { + const canvas = within(canvasElement); + await step('SyncWaitFor play fn', SyncWaitFor.play); + await waitForElementToBeRemoved(() => canvas.queryByText('Completed!!'), { + timeout: 2000, + }); + }, +}; + +export const WithLoaders = { + loaders: [async () => new Promise((resolve) => setTimeout(resolve, 2000))], + play: async ({ step }) => { + await step('Submit form', Callback.play); + }, +}; + +export const Validation = { + play: async (context) => { + const { args, canvasElement, step } = context; + const canvas = within(canvasElement); + + await step('Submit', async () => fireEvent.click(canvas.getByRole('button'))); + + await expect(args.onSuccess).not.toHaveBeenCalled(); + }, +}; diff --git a/code/addons/interactions/tsconfig.json b/code/addons/interactions/tsconfig.json new file mode 100644 index 000000000000..c96838beabc1 --- /dev/null +++ b/code/addons/interactions/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "types": ["testing-library__jest-dom"] + }, + "include": ["src/**/*"] +} diff --git a/code/addons/jest/README.md b/code/addons/jest/README.md new file mode 100644 index 000000000000..87444270ff3c --- /dev/null +++ b/code/addons/jest/README.md @@ -0,0 +1,269 @@ +# Storybook addon Jest + +Storybook addon for inspecting Jest unit test results. + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +[![Storybook Jest Addon Demo](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/jest/docs/storybook-addon-jest.gif)](http://storybooks-official.netlify.com/?selectedKind=Addons%7Cjest&selectedStory=withTests&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Ftests%2Fpanel) + +> Check out the above [Live Storybook](http://storybooks-official.netlify.com/?selectedKind=Addons%7Cjest&selectedStory=withTests&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Ftests%2Fpanel). + +## Installation + +Install this addon by adding the `@storybook/addon-jest` as a development dependency with: + +`npm install --save-dev @storybook/addon-jest` + +Or if you're using yarn as a package manager: + +`yarn add --dev @storybook/addon-jest` + +## Configuration + +Register the addon in your [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project): + +```js +module.exports = { + addons: ['@storybook/addon-jest'], +}; +``` + +## Jest Configuration + +When running **Jest**, be sure to save the results in a JSON file: + +```js +"scripts": { + "test:generate-output": "jest --json --outputFile=.jest-test-results.json" +} +``` + +You may want to add the result file to `.gitignore`, since it's a generated file: + +``` +.jest-test-results.json +``` + +But much like lockfiles and snapshots, checking-in generated files can have certain advantages as well. It's up to you. +We recommend to **do** check in the test results file so starting Storybook from a clean git clone doesn't require running all tests first, +but this can mean you'll encounter merge conflicts on this file in the future (_re-generating this file is very similar to re-generating lockfiles and snapshots_). + +### Generating the test results + +Ensure the generated test-results file exists before you start Storybook. During development, you will likely start Jest in watch-mode and so the JSON file will be re-generated every time code or tests change. + +```sh +npm run test:generate-output -- --watch +``` + +And in the jest config, add `jest-test-results.json` to `modulePathIgnorePatterns` to avoid an infinite loop. + +```js +modulePathIgnorePatterns: ['node_modules', 'jest-test-results.json'], +``` + +This change will then be HMR (hot module reloaded) using webpack and displayed by this addon. + +If you want to pre-run Jest automatically during development or a static build, you may need to consider that if your tests fail, the script receives a non-0 exit code and will exit. +You could create a `prebuild:storybook` npm script, which will never fail by appending `|| true`: + +```json +"scripts": { + "test:generate-output": "jest --json --outputFile=.jest-test-results.json || true", + "test": "jest", + "prebuild:storybook": "npm run test:generate-output", + "build:storybook": "build-storybook -c .storybook -o build/", + "predeploy": "npm run build:storybook", + "deploy": "gh-pages -d build/", +} +``` + +## Usage + +Assuming that you have already created a test file for your component (e.g., `MyComponent.test.js`). + +### Story-level + +In your story file, add a [decorator](https://storybook.js.org/docs/react/writing-stories/decorators) to your story's default export to display the results: + +```js +// MyComponent.stories.js|jsx + +import MyComponent from './MyComponent'; + +import results from '../.jest-test-results.json'; + +import { withTests } from '@storybook/addon-jest'; + +export default { + component: MyComponent, + title: 'MyComponent', + decorators: [withTests({ results })], +}; +``` + +You can also add multiple tests results within your story by including the `jest` [parameter](https://storybook.js.org/docs/react/writing-stories/parameters), for example: + +```js +// MyComponent.stories.js|jsx + +import MyComponent from './MyComponent'; + +import results from '../.jest-test-results.json'; + +import { withTests } from '@storybook/addon-jest'; + +export default { + component: MyComponent, + title: 'MyComponent', + decorators: [withTests({ results })], +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); +Default.args = { + text: 'Jest results in Storybook', +}; +Default.parameters = { + jest: ['MyComponent.test.js', 'MyOtherComponent.test.js'] +}; +``` + +### Global level + +To avoid importing the results of the tests in each story, you can update +your [`.storybook/preview.js`](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering) and include a decorator allowing you to display the results only for the stories that have the `jest` parameter defined: + +```js +// .storybook/preview.js + +import { withTests } from '@storybook/addon-jest'; + +import results from '../.jest-test-results.json'; + +export const decorators = [ + withTests({ + results, + }), +]; +``` + +Then in your story file: + +```js +// MyComponent.stories.js|jsx + +import MyComponent from './MyComponent'; + +export default { + component: MyComponent, + title: 'MyComponent', +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); +Default.args={ + text: 'Jest results in Storybook', +}; +Default.parameters = { + jest: 'MyComponent.test.js', +}; +``` + +The `jest` parameter will default to inferring from your story file name if not provided. For example, if your story file is `MyComponent.stories.js`, +then "MyComponent" will be used to find your test file results. It currently doesn't work in production environments. + +### Disabling + +You can disable the addon for a single story by setting the `jest` parameter to `{disable: true}`: + +```js +// MyComponent.stories.js|jsx + +import MyComponent from './MyComponent'; + +export default { + component: MyComponent, + title: 'MyComponent', +}; + +const Template = (args) => ; + +export const Default = Template.bind({}); + +Default.args = { + text: 'Jest results in Storybook', +}; +Default.parameters = { + jest: { disable: true }, +}; +``` + +## Usage with Angular + +Using this addon with Angular will require some additional configuration. You'll need to install and configure Jest with [jest-preset-angular](https://www.npmjs.com/package/jest-preset-angular). + +Then, in your `.storybook/preview.js`, you'll need to add a decorator with the following: + +```js +// .storybook/preview.js + +import { withTests } from '@storybook/addon-jest'; + +import results from '../.jest-test-results.json'; + +export const decorators = [ + withTests({ + results, + filesExt: '((\\.specs?)|(\\.tests?))?(\\.ts)?$', + }), +]; +``` + +Finally, in your story, you'll need to include the following: + +```ts +// MyComponent.stories.ts + +import type { Meta, StoryFn } from '@storybook/angular'; + +import MyComponent from './MyComponent.component'; + +export default { + component: MyComponent, + title: 'MyComponent', +} as Meta; + +const Template: StoryFn = (args: MyComponent) => ({ + props: args, +}); + +export const Default = Template.bind({}); +Default.parameters = { + jest: 'MyComponent.component', +}; +``` + +## Available options + +- **options.results**: OBJECT jest output results. _mandatory_ +- **filesExt**: STRING test file extension. _optional_. This allows you to write "MyComponent" and not "MyComponent.test.js". It will be used as regex to find your file results. Default value is `((\\.specs?)|(\\.tests?))?(\\.js)?$`. That means it will match: MyComponent.js, MyComponent.test.js, MyComponent.tests.js, MyComponent.spec.js, MyComponent.specs.js... + +## TODO + +- [ ] Add coverage +- [ ] Display nested test better (describe) +- [ ] Display the date of the test +- [ ] Add unit tests +- [ ] Add linting +- [ ] Split + +## Contributing + +All ideas and contributions are welcome. + +## Licence + +MIT © 2017-present Renaud Tertrais diff --git a/addons/jest/docs/storybook-addon-jest.gif b/code/addons/jest/docs/storybook-addon-jest.gif similarity index 100% rename from addons/jest/docs/storybook-addon-jest.gif rename to code/addons/jest/docs/storybook-addon-jest.gif diff --git a/code/addons/jest/jest.config.js b/code/addons/jest/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/jest/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/jest/manager.js b/code/addons/jest/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/jest/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/jest/package.json b/code/addons/jest/package.json new file mode 100644 index 000000000000..1a2a0261464a --- /dev/null +++ b/code/addons/jest/package.json @@ -0,0 +1,116 @@ +{ + "name": "@storybook/addon-jest", + "version": "7.0.0-beta.25", + "description": "React storybook addon that show component jest report", + "keywords": [ + "addon", + "jest", + "react", + "report", + "results", + "storybook", + "unit-testing", + "test" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/jest", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/jest" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "author": "Renaud Tertrais (https://github.com/renaudtertrais)", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./register": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "react-resize-detector": "^7.1.2", + "upath": "^1.2.0" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx" + ], + "platform": "browser" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Jest", + "icon": "https://pbs.twimg.com/profile_images/821713465245102080/mMtKIMax_400x400.jpg", + "unsupportedFrameworks": [ + "react-native" + ] + } +} diff --git a/addons/jest/src/components/Message.tsx b/code/addons/jest/src/components/Message.tsx similarity index 94% rename from addons/jest/src/components/Message.tsx rename to code/addons/jest/src/components/Message.tsx index d58451260d02..507e1c7c3c21 100644 --- a/addons/jest/src/components/Message.tsx +++ b/code/addons/jest/src/components/Message.tsx @@ -1,4 +1,5 @@ -import React, { Fragment, FunctionComponent } from 'react'; +import type { FC } from 'react'; +import React, { Fragment } from 'react'; import { styled } from '@storybook/theming'; const positiveConsoleRegex = /\[32m(.*?)\[39m/; @@ -20,7 +21,7 @@ class TestDetail { stackTrace: string; } -const StackTrace = styled.pre<{}>(({ theme }) => ({ +const StackTrace = styled.pre(({ theme }) => ({ background: theme.color.lighter, paddingTop: 4, paddingBottom: 4, @@ -37,7 +38,7 @@ const Results = styled.div({ marginRight: 30, }); -const Description = styled.div<{}>(({ theme }) => ({ +const Description = styled.div(({ theme }) => ({ paddingBottom: 10, paddingTop: 10, borderBottom: theme.appBorderColor, @@ -136,7 +137,7 @@ interface MessageProps { msg: string; } -export const Message: FunctionComponent = (props) => { +export const Message: FC = (props) => { const { msg } = props; const detail: TestDetail = getTestDetail(msg); diff --git a/code/addons/jest/src/components/Panel.tsx b/code/addons/jest/src/components/Panel.tsx new file mode 100644 index 000000000000..ce7ee16c70f8 --- /dev/null +++ b/code/addons/jest/src/components/Panel.tsx @@ -0,0 +1,293 @@ +import type { FC } from 'react'; +import React, { Fragment } from 'react'; +import { styled, themes, convert } from '@storybook/theming'; +import { ScrollArea, TabsState, Link, Placeholder } from '@storybook/components'; +import { useResizeDetector } from 'react-resize-detector'; +import { Result } from './Result'; +import type { Test } from '../hoc/provideJestResult'; +import { provideTests as provideJestResult } from '../hoc/provideJestResult'; + +const StatusTypes = { + PASSED_TYPE: 'passed', + FAILED_TYPE: 'failed', + PENDING_TYPE: 'pending', + TODO_TYPE: 'todo', +}; + +const List = styled.ul({ + listStyle: 'none', + fontSize: 14, + padding: 0, + margin: 0, +}); + +const Item = styled.li({ + display: 'block', + padding: 0, +}); + +const ProgressWrapper = styled.div({ + position: 'relative', + height: 10, + width: 30, + display: 'flex', + top: -2, +}); + +const SuiteHead = styled.div({ + display: 'flex', + alignItems: 'baseline', + position: 'absolute', + zIndex: 2, + right: 20, + marginTop: 15, +}); + +const UnstyledSuiteTotals: FC<{ + result: Test['result']; + className?: string; + width: number; +}> = ({ result, className, width }) => ( +
    + + {width > 325 && result.assertionResults ? ( +
    + {result.assertionResults.length} {result.assertionResults.length > 1 ? `tests` : `test`} +
    + ) : null} + {width > 280 && result.endTime && result.startTime ? ( +
    + {result.endTime - result.startTime} + ms +
    + ) : null} +
    +
    +); +const SuiteTotals = styled(UnstyledSuiteTotals)(({ theme }) => ({ + display: 'flex', + alignItems: 'center', + color: theme.color.dark, + fontSize: '14px', + marginTop: -5, + '& > *': { + marginRight: 10, + }, +})); + +const SuiteProgressPortion = styled.div<{ color: any; progressPercent: number }>( + ({ color, progressPercent }) => ({ + height: 6, + top: 3, + width: `${progressPercent}%`, + backgroundColor: color, + }) +); + +interface ContentProps { + tests: Test[]; + className?: string; +} + +const getTestsByTypeMap = (result: any) => { + const testsByType: Map = new Map(); + result.assertionResults.forEach((assertion: any) => { + testsByType.set( + assertion.status, + testsByType.get(assertion.status) + ? testsByType.get(assertion.status).concat(assertion) + : [assertion] + ); + }); + return testsByType; +}; + +const getColorByType = (type: string) => { + // using switch to allow for new types to be added + switch (type) { + case StatusTypes.PASSED_TYPE: + return convert(themes.light).color.positive; + case StatusTypes.FAILED_TYPE: + return convert(themes.light).color.negative; + case StatusTypes.PENDING_TYPE: + return convert(themes.light).color.warning; + case StatusTypes.TODO_TYPE: + return convert(themes.light).color.purple; + default: + return null; + } +}; + +const TestPanel: FC<{ test: Test }> = ({ test }) => { + const { ref, width } = useResizeDetector(); + const { result } = test; + if (!result || !result.assertionResults) { + return This story has tests configured, but no file was found; + } + + const testsByType: Map = getTestsByTypeMap(result); + const entries: any = testsByType.entries(); + const sortedTestsByCount = [...entries].sort((a, b) => a[1].length - b[1].length); + + return ( +
    + + + {width > 240 ? ( + + {sortedTestsByCount.map((entry: any) => { + return ( + + ); + })} + + ) : null} + + +
    + + {testsByType.get(StatusTypes.FAILED_TYPE) ? ( + testsByType.get(StatusTypes.FAILED_TYPE).map((res: any) => ( + + + + )) + ) : ( + + This story has no failing tests. + + )} + +
    +
    + + {testsByType.get(StatusTypes.PASSED_TYPE) ? ( + testsByType.get(StatusTypes.PASSED_TYPE).map((res: any) => ( + + + + )) + ) : ( + + This story has no passing tests. + + )} + +
    +
    + + {testsByType.get(StatusTypes.PENDING_TYPE) ? ( + testsByType.get(StatusTypes.PENDING_TYPE).map((res: any) => ( + + + + )) + ) : ( + + This story has no pending tests. + + )} + +
    +
    + + {testsByType.get(StatusTypes.TODO_TYPE) ? ( + testsByType.get(StatusTypes.TODO_TYPE).map((res: any) => ( + + + + )) + ) : ( + + This story has no tests todo. + + )} + +
    +
    +
    + ); +}; + +const Content = styled(({ tests, className }: ContentProps) => ( +
    + {tests.map((test) => ( + + ))} +
    +))({ + flex: '1 1 0%', +}); + +interface PanelProps { + tests: null | Test[]; +} + +const Panel = ({ tests }: PanelProps) => ( + + {tests ? ( + + ) : ( + + No tests found + + Learn how to  + + add Jest test results to your story + + + + )} + +); + +Panel.defaultProps = { + tests: null, +}; + +export default provideJestResult(Panel); diff --git a/addons/jest/src/components/Result.tsx b/code/addons/jest/src/components/Result.tsx similarity index 90% rename from addons/jest/src/components/Result.tsx rename to code/addons/jest/src/components/Result.tsx index 6313e2d41ca5..c40d15b522d7 100644 --- a/addons/jest/src/components/Result.tsx +++ b/code/addons/jest/src/components/Result.tsx @@ -29,11 +29,11 @@ const HeaderBar = styled.div<{ status: string }>(({ theme, status }) => ({ }, })); -const Icon = styled(Icons)(({ theme }) => ({ +const Icon = styled(Icons)(({ theme }) => ({ height: 10, width: 10, minWidth: 10, - color: theme.color.mediumdark, + color: theme.textMutedColor, marginRight: 10, transition: 'transform 0.1s ease-in-out', alignSelf: 'center', @@ -65,9 +65,8 @@ export function Result(props: ResultProps) { {status === `failed` ? ( ); } - -export default Result; diff --git a/addons/jest/src/hoc/provideJestResult.tsx b/code/addons/jest/src/hoc/provideJestResult.tsx similarity index 85% rename from addons/jest/src/hoc/provideJestResult.tsx rename to code/addons/jest/src/hoc/provideJestResult.tsx index 873274ab9f60..d1cad23b25fc 100644 --- a/addons/jest/src/hoc/provideJestResult.tsx +++ b/code/addons/jest/src/hoc/provideJestResult.tsx @@ -1,6 +1,7 @@ -import React, { Component as ReactComponent, ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React, { Component as ReactComponent } from 'react'; import { STORY_CHANGED } from '@storybook/core-events'; -import { API } from '@storybook/api'; +import type { API } from '@storybook/manager-api'; import { ADD_TESTS } from '../shared'; // TODO: import type from @types/jest @@ -15,6 +16,8 @@ export interface Test { name: string; result: { status: string; + startTime?: number; + endTime?: number; assertionResults: AssertionResult[]; }; } @@ -34,7 +37,7 @@ export interface HocState { tests?: Test[]; } -const provideTests = (Component: ComponentType) => +export const provideTests = (Component: ComponentType) => class TestProvider extends ReactComponent { state: HocState = {}; @@ -79,5 +82,3 @@ const provideTests = (Component: ComponentType) => return active ? : null; } }; - -export default provideTests; diff --git a/code/addons/jest/src/index.ts b/code/addons/jest/src/index.ts new file mode 100644 index 000000000000..5b68c9d9a9a2 --- /dev/null +++ b/code/addons/jest/src/index.ts @@ -0,0 +1,68 @@ +/// + +import { addons } from '@storybook/preview-api'; +import { normalize, sep } from 'upath'; +import { ADD_TESTS, defineJestParameter } from './shared'; + +const findTestResults = ( + testFiles: string[], + jestTestResults: { testResults: { name: string }[] }, + jestTestFilesExt: string +) => + Object.values(testFiles).map((name) => { + const fileName = `${sep}${name}${jestTestFilesExt}`; + + if (jestTestResults && jestTestResults.testResults) { + const fileNamePattern = new RegExp(fileName); + + return { + fileName, + name, + result: jestTestResults.testResults.find((test) => + Boolean(normalize(test.name).match(fileNamePattern)) + ), + }; + } + + return { fileName, name }; + }); + +interface EmitAddTestsArg { + kind: string; + story: () => void; + testFiles: string[]; + options: { + results: { testResults: { name: string }[] }; + filesExt: string; + }; +} + +const emitAddTests = ({ kind, story, testFiles, options }: EmitAddTestsArg) => { + addons.getChannel().emit(ADD_TESTS, { + kind, + storyName: story, + tests: findTestResults(testFiles, options.results, options.filesExt), + }); +}; + +export const withTests = (userOptions: { results: any; filesExt?: string }) => { + const defaultOptions = { + filesExt: '((\\.specs?)|(\\.tests?))?(\\.[jt]sx?)?$', + }; + const options = { ...defaultOptions, ...userOptions }; + + return (...args: any[]) => { + const [storyFn, { kind, parameters = {} }] = args; + const testFiles = defineJestParameter(parameters); + + if (testFiles !== null) { + emitAddTests({ kind, story: storyFn, testFiles, options }); + } + + return storyFn(); + }; +}; + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} diff --git a/code/addons/jest/src/manager.tsx b/code/addons/jest/src/manager.tsx new file mode 100644 index 000000000000..dbf43e9eb1f0 --- /dev/null +++ b/code/addons/jest/src/manager.tsx @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { addons } from '@storybook/manager-api'; +import { ADDON_ID, PANEL_ID, PARAM_KEY } from './shared'; + +import Panel from './components/Panel'; + +addons.register(ADDON_ID, (api) => { + addons.addPanel(PANEL_ID, { + title: 'Tests', + render: ({ active, key }) => , + paramKey: PARAM_KEY, + }); +}); diff --git a/addons/jest/src/shared.test.ts b/code/addons/jest/src/shared.test.ts similarity index 89% rename from addons/jest/src/shared.test.ts rename to code/addons/jest/src/shared.test.ts index db9ab09050c4..ddc3a0c71b17 100644 --- a/addons/jest/src/shared.test.ts +++ b/code/addons/jest/src/shared.test.ts @@ -27,7 +27,7 @@ describe('defineJestParameter', () => { }); test('returns null if filename is a module ID that cannot be inferred from', () => { - // @ts-ignore + // @ts-expect-error Storybook's fileName type is string, but according to this test it could be number in case it is a module id. expect(defineJestParameter({ fileName: 1234 })).toBeNull(); }); }); diff --git a/code/addons/jest/src/shared.ts b/code/addons/jest/src/shared.ts new file mode 100644 index 000000000000..ef078b7af8a8 --- /dev/null +++ b/code/addons/jest/src/shared.ts @@ -0,0 +1,31 @@ +import type { StorybookInternalParameters } from '@storybook/types'; + +// addons, panels and events get unique names using a prefix +export const PARAM_KEY = 'test'; +export const ADDON_ID = 'storybookjs/test'; +export const PANEL_ID = `${ADDON_ID}/panel`; + +export const ADD_TESTS = `${ADDON_ID}/add_tests`; + +interface AddonParameters extends StorybookInternalParameters { + jest?: string | string[] | { disabled: true }; +} + +export function defineJestParameter(parameters: AddonParameters): string[] | null { + const { jest, fileName: filePath } = parameters; + + if (typeof jest === 'string') { + return [jest]; + } + + if (jest && Array.isArray(jest)) { + return jest; + } + + if (jest === undefined && typeof filePath === 'string') { + const fileName = filePath.split('/').pop().split('.')[0]; + return [fileName]; + } + + return null; +} diff --git a/code/addons/jest/tsconfig.json b/code/addons/jest/tsconfig.json new file mode 100644 index 000000000000..73a65ef2ef6e --- /dev/null +++ b/code/addons/jest/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": {}, + "include": ["src/**/*"] +} diff --git a/addons/links/README.md b/code/addons/links/README.md similarity index 100% rename from addons/links/README.md rename to code/addons/links/README.md diff --git a/code/addons/links/jest.config.js b/code/addons/links/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/links/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/links/manager.js b/code/addons/links/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/links/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/links/package.json b/code/addons/links/package.json new file mode 100644 index 000000000000..81c78bbde726 --- /dev/null +++ b/code/addons/links/package.json @@ -0,0 +1,126 @@ +{ + "name": "@storybook/addon-links", + "version": "7.0.0-beta.25", + "description": "Link stories together to build demos and prototypes with your UI components", + "keywords": [ + "addon", + "storybook", + "organize" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/links", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/links" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./react": { + "require": "./dist/react/index.js", + "import": "./dist/react/index.mjs", + "types": "./dist/react/index.d.ts" + }, + "./register": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/csf": "next", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/router": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "prop-types": "^15.7.2", + "ts-dedent": "^2.0.0" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.ts", + "./src/preview.ts", + "./src/react/index.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Links", + "icon": "https://user-images.githubusercontent.com/263385/101991673-48355c80-3c7c-11eb-9b6e-b627c96a75f6.png", + "unsupportedFrameworks": [ + "marko", + "react-native" + ] + } +} diff --git a/code/addons/links/preview.js b/code/addons/links/preview.js new file mode 100644 index 000000000000..49ad602f79f4 --- /dev/null +++ b/code/addons/links/preview.js @@ -0,0 +1 @@ +export * from './dist/preview'; diff --git a/code/addons/links/react.d.ts b/code/addons/links/react.d.ts new file mode 100644 index 000000000000..bdca492fe003 --- /dev/null +++ b/code/addons/links/react.d.ts @@ -0,0 +1,2 @@ +export * from './dist/react'; +export { default } from './dist/react'; diff --git a/code/addons/links/react.js b/code/addons/links/react.js new file mode 100644 index 000000000000..685845b5dceb --- /dev/null +++ b/code/addons/links/react.js @@ -0,0 +1,3 @@ +import LinkTo from './dist/react'; + +export default LinkTo; diff --git a/addons/links/src/constants.ts b/code/addons/links/src/constants.ts similarity index 100% rename from addons/links/src/constants.ts rename to code/addons/links/src/constants.ts diff --git a/code/addons/links/src/index.ts b/code/addons/links/src/index.ts new file mode 100644 index 000000000000..071b1de97b79 --- /dev/null +++ b/code/addons/links/src/index.ts @@ -0,0 +1,23 @@ +/// + +import { dedent } from 'ts-dedent'; + +let hasWarned = false; + +export function LinkTo(): null { + if (!hasWarned) { + // eslint-disable-next-line no-console + console.error(dedent` + LinkTo has moved to addon-links/react: + import LinkTo from '@storybook/addon-links/react'; + `); + hasWarned = true; + } + return null; +} + +export { linkTo, hrefTo, withLinks, navigate } from './utils'; + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} diff --git a/code/addons/links/src/manager.ts b/code/addons/links/src/manager.ts new file mode 100644 index 000000000000..9107c8c61904 --- /dev/null +++ b/code/addons/links/src/manager.ts @@ -0,0 +1,12 @@ +import { addons } from '@storybook/manager-api'; + +import EVENTS, { ADDON_ID } from './constants'; + +addons.register(ADDON_ID, (api) => { + const channel = addons.getChannel(); + + channel.on(EVENTS.REQUEST, ({ kind, name }) => { + const id = api.storyId(kind, name); + api.emit(EVENTS.RECEIVE, id); + }); +}); diff --git a/addons/links/src/preview.ts b/code/addons/links/src/preview.ts similarity index 100% rename from addons/links/src/preview.ts rename to code/addons/links/src/preview.ts diff --git a/addons/links/src/react/components/RoutedLink.tsx b/code/addons/links/src/react/components/RoutedLink.tsx similarity index 89% rename from addons/links/src/react/components/RoutedLink.tsx rename to code/addons/links/src/react/components/RoutedLink.tsx index 7fbf75157ba4..cfe6f4901cfa 100644 --- a/addons/links/src/react/components/RoutedLink.tsx +++ b/code/addons/links/src/react/components/RoutedLink.tsx @@ -1,6 +1,6 @@ import React from 'react'; -// NOTE: this is a copy of `lib/components/src/navigation/RoutedLink.tsx`. +// NOTE: this is a copy of `code/ui/components/src/navigation/RoutedLink.tsx`. // It's duplicated here because that copy has an explicit dependency on // React 16.3+, which breaks older versions of React running in the preview. // The proper DRY solution is to create a new package that doesn't depend @@ -18,7 +18,9 @@ const RoutedLink: React.FC< const handleClick = (e: React.MouseEvent) => { if (isPlainLeftClick(e)) { e.preventDefault(); - onClick(e); + if (onClick) { + onClick(e); + } } }; diff --git a/code/addons/links/src/react/components/link.test.tsx b/code/addons/links/src/react/components/link.test.tsx new file mode 100644 index 000000000000..b5d444a5ffc6 --- /dev/null +++ b/code/addons/links/src/react/components/link.test.tsx @@ -0,0 +1,86 @@ +import React from 'react'; +import { addons } from '@storybook/preview-api'; +import { render, screen, waitFor } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import { SELECT_STORY } from '@storybook/core-events'; +import LinkTo from './link'; + +jest.mock('@storybook/preview-api'); +jest.mock('@storybook/global', () => ({ + global: { + document: { + location: { + origin: 'origin', + pathname: 'pathname', + search: 'search', + }, + }, + window: global, + __STORYBOOK_STORY_STORE__: { + fromId: jest.fn(() => ({})), + }, + }, +})); + +const mockChannel = () => { + return { + emit: jest.fn(), + on: jest.fn(), + once: jest.fn(), + }; +}; +const mockAddons = addons as unknown as jest.Mocked; + +describe('LinkTo', () => { + describe('render', () => { + it('should render a link', async () => { + const channel = mockChannel() as any; + mockAddons.getChannel.mockReturnValue(channel); + + const { container } = render( + + link + + ); + + await waitFor(() => { + expect(screen.getByText('link')).toHaveAttribute( + 'href', + 'originpathname?search=&id=foo--bar' + ); + }); + expect(container.firstChild).toMatchInlineSnapshot(` + + link + + `); + }); + }); + + describe('events', () => { + it('should select the kind and story on click', () => { + const channel = { + emit: jest.fn(), + on: jest.fn(), + } as any; + mockAddons.getChannel.mockReturnValue(channel); + + render( + + link + + ); + userEvent.click(screen.getByText('link')); + + expect(channel.emit).toHaveBeenLastCalledWith( + SELECT_STORY, + expect.objectContaining({ + kind: 'foo', + story: 'bar', + }) + ); + }); + }); +}); diff --git a/code/addons/links/src/react/components/link.tsx b/code/addons/links/src/react/components/link.tsx new file mode 100644 index 000000000000..2bcf838dc33c --- /dev/null +++ b/code/addons/links/src/react/components/link.tsx @@ -0,0 +1,80 @@ +import type { MouseEvent, ReactNode } from 'react'; +import React, { PureComponent } from 'react'; + +import { navigate, hrefTo } from '../../utils'; + +// FIXME: copied from Typography.Link. Code is duplicated to +// avoid emotion dependency which breaks React 15.x back-compat + +// Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks +const LEFT_BUTTON = 0; + +const isPlainLeftClick = (e: MouseEvent) => + e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey; + +const cancelled = (e: MouseEvent, cb = (_e: any) => {}) => { + if (isPlainLeftClick(e)) { + e.preventDefault(); + cb(e); + } +}; + +interface Props { + kind: string | null; + story: string | null; + children: ReactNode; +} + +interface State { + href: string; +} + +export default class LinkTo extends PureComponent { + static defaultProps: Props = { + kind: null, + story: null, + children: undefined, + }; + + state: State = { + href: '/', + }; + + componentDidMount() { + this.updateHref(); + } + + componentDidUpdate(prevProps: Props) { + const { kind, story } = this.props; + + if (prevProps.kind !== kind || prevProps.story !== story) { + this.updateHref(); + } + } + + updateHref = async () => { + const { kind, story } = this.props; + if (kind && story) { + const href = await hrefTo(kind, story); + this.setState({ href }); + } + }; + + handleClick = () => { + const { kind, story } = this.props; + if (kind && story) { + navigate({ kind, story }); + } + }; + + render() { + const { kind, story, children, ...rest } = this.props; + const { href } = this.state; + + return ( + cancelled(e, this.handleClick)} {...rest}> + {children} + + ); + } +} diff --git a/addons/links/src/react/index.ts b/code/addons/links/src/react/index.ts similarity index 100% rename from addons/links/src/react/index.ts rename to code/addons/links/src/react/index.ts diff --git a/code/addons/links/src/utils.test.ts b/code/addons/links/src/utils.test.ts new file mode 100644 index 000000000000..1adbdf329aed --- /dev/null +++ b/code/addons/links/src/utils.test.ts @@ -0,0 +1,85 @@ +import { addons } from '@storybook/preview-api'; +import { SELECT_STORY } from '@storybook/core-events'; + +import { linkTo, hrefTo } from './utils'; + +jest.mock('@storybook/preview-api'); +jest.mock('@storybook/global', () => ({ + global: { + document: global.document, + window: global, + }, +})); + +const mockAddons = addons as unknown as jest.Mocked; + +describe('preview', () => { + const channel = { emit: jest.fn() }; + beforeAll(() => { + mockAddons.getChannel.mockReturnValue(channel as any); + }); + beforeEach(channel.emit.mockReset); + describe('linkTo()', () => { + it('should select the title and name provided', () => { + const handler = linkTo('title', 'name'); + handler(); + + expect(channel.emit).toHaveBeenCalledWith(SELECT_STORY, { + kind: 'title', + story: 'name', + }); + }); + + it('should select the title (only) provided', () => { + const handler = linkTo('title'); + handler(); + + expect(channel.emit).toHaveBeenCalledWith(SELECT_STORY, { + kind: 'title', + }); + }); + + it('should select the story (only) provided', () => { + // simulate a currently selected, but not found as ID + // @ts-expect-error (not strict) + const handler = linkTo(undefined, 'name'); + handler(); + + expect(channel.emit).toHaveBeenCalledWith(SELECT_STORY, { + story: 'name', + }); + }); + + it('should select the id provided', () => { + const handler = linkTo('title--name'); + handler(); + + expect(channel.emit).toHaveBeenCalledWith(SELECT_STORY, { + storyId: 'title--name', + }); + }); + + it('should handle functions returning strings', () => { + const handler = linkTo( + (a, b) => a + b, + (a, b) => b + a + ); + handler('title', 'name'); + + expect(channel.emit.mock.calls).toContainEqual([ + SELECT_STORY, + { + kind: 'titlename', + story: 'nametitle', + }, + ]); + }); + }); + + describe('hrefTo()', () => { + it('should return promise resolved with story href', async () => { + const href = await hrefTo('title', 'name'); + expect(href).toContain('?id=title--name'); + }); + }); +}); diff --git a/code/addons/links/src/utils.ts b/code/addons/links/src/utils.ts new file mode 100644 index 000000000000..21c04a469ae2 --- /dev/null +++ b/code/addons/links/src/utils.ts @@ -0,0 +1,112 @@ +import { global } from '@storybook/global'; +import { addons, makeDecorator } from '@storybook/preview-api'; +import { STORY_CHANGED, SELECT_STORY } from '@storybook/core-events'; +import type { StoryId, StoryName, ComponentTitle } from '@storybook/types'; +import { toId } from '@storybook/csf'; +import { PARAM_KEY } from './constants'; + +const { document, HTMLElement } = global; + +interface ParamsId { + storyId: StoryId; +} +interface ParamsCombo { + kind?: ComponentTitle; + story?: StoryName; +} + +function parseQuery(queryString: string) { + const query: Record = {}; + const pairs = (queryString[0] === '?' ? queryString.substring(1) : queryString) + .split('&') + .filter(Boolean); + + // eslint-disable-next-line no-plusplus + for (let i = 0; i < pairs.length; i++) { + const pair = pairs[i].split('='); + query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || ''); + } + return query; +} + +export const navigate = (params: ParamsId | ParamsCombo) => + addons.getChannel().emit(SELECT_STORY, params); + +export const hrefTo = (title: ComponentTitle, name: StoryName): Promise => { + return new Promise((resolve) => { + const { location } = document; + const query = parseQuery(location.search); + // @ts-expect-error (Converted from ts-ignore) + const existingId = [].concat(query.id)[0]; + // @ts-expect-error (Converted from ts-ignore) + const titleToLink = title || existingId.split('--', 2)[0]; + const id = toId(titleToLink, name); + const url = `${location.origin + location.pathname}?${Object.entries({ ...query, id }) + .map((item) => `${item[0]}=${item[1]}`) + .join('&')}`; + + resolve(url); + }); +}; + +const valueOrCall = (args: string[]) => (value: string | ((...args: string[]) => string)) => + typeof value === 'function' ? value(...args) : value; + +export const linkTo = + ( + idOrTitle: string | ((...args: any[]) => string), + nameInput?: string | ((...args: any[]) => string) + ) => + (...args: any[]) => { + const resolver = valueOrCall(args); + const title = resolver(idOrTitle); + const name = nameInput ? resolver(nameInput) : false; + + if (title?.match(/--/) && !name) { + navigate({ storyId: title }); + } else if (name && title) { + navigate({ kind: title, story: name }); + } else if (title) { + navigate({ kind: title }); + } else if (name) { + navigate({ story: name }); + } + }; + +const linksListener = (e: Event) => { + const { target } = e; + if (!(target instanceof HTMLElement)) { + return; + } + const element = target as HTMLElement; + const { sbKind: kind, sbStory: story } = element.dataset; + if (kind || story) { + e.preventDefault(); + navigate({ kind, story }); + } +}; + +let hasListener = false; + +const on = () => { + if (!hasListener) { + hasListener = true; + document.addEventListener('click', linksListener); + } +}; +const off = () => { + if (hasListener) { + hasListener = false; + document.removeEventListener('click', linksListener); + } +}; + +export const withLinks = makeDecorator({ + name: 'withLinks', + parameterName: PARAM_KEY, + wrapper: (getStory, context) => { + on(); + addons.getChannel().once(STORY_CHANGED, off); + return getStory(context); + }, +}); diff --git a/code/addons/links/template/stories/decorator.stories.ts b/code/addons/links/template/stories/decorator.stories.ts new file mode 100644 index 000000000000..218833a75800 --- /dev/null +++ b/code/addons/links/template/stories/decorator.stories.ts @@ -0,0 +1,38 @@ +import { global as globalThis } from '@storybook/global'; +import { withLinks } from '@storybook/addon-links'; + +export default { + component: globalThis.Components.Html, + parameters: { + chromatic: { disable: true }, + }, + decorators: [withLinks], +}; + +export const Basic = { + args: { + content: ` + + `, + }, +}; +export const Other = { + args: { + content: ` + + `, + }, +}; +export const Third = { + args: { + content: ` + + `, + }, +}; diff --git a/code/addons/links/template/stories/linkto.stories.ts b/code/addons/links/template/stories/linkto.stories.ts new file mode 100644 index 000000000000..bdc752c2ae17 --- /dev/null +++ b/code/addons/links/template/stories/linkto.stories.ts @@ -0,0 +1,44 @@ +import { global as globalThis } from '@storybook/global'; +import { linkTo } from '@storybook/addon-links'; + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + parameters: { + chromatic: { disable: true }, + }, +}; + +export const ID = { + args: { + onClick: linkTo('addons-links-parameters--basic'), + }, +}; +export const Title = { + args: { + onClick: linkTo('addons-links-parameters'), + }, +}; +export const Basic = { + args: { + onClick: linkTo('addons-links-parameters', 'basic'), + }, +}; +export const Other = { + args: { + onClick: linkTo('addons-links-parameters', 'basic'), + }, +}; +export const Third = { + args: { + onClick: linkTo('addons-links-parameters', 'other'), + }, +}; + +export const Callback = { + args: { + onClick: linkTo('addons-links-parameters', (event: Event) => 'basic'), + }, +}; diff --git a/code/addons/links/template/stories/scroll.stories.ts b/code/addons/links/template/stories/scroll.stories.ts new file mode 100644 index 000000000000..a7d6a3937763 --- /dev/null +++ b/code/addons/links/template/stories/scroll.stories.ts @@ -0,0 +1,41 @@ +import { global as globalThis } from '@storybook/global'; +import { withLinks } from '@storybook/addon-links'; + +export default { + component: globalThis.Components.Html, + parameters: { + chromatic: { disable: true }, + }, + decorators: [withLinks], +}; + +export const Basic = { + args: { + content: ` +
    +
    + go to basic +
    + `, + }, +}; +export const Other = { + args: { + content: ` +
    +
    + to to basic +
    + `, + }, +}; +export const Third = { + args: { + content: ` +
    +
    + go to other +
    + `, + }, +}; diff --git a/code/addons/links/tsconfig.json b/code/addons/links/tsconfig.json new file mode 100644 index 000000000000..6643cdc7da8e --- /dev/null +++ b/code/addons/links/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "types": ["testing-library__jest-dom"] + }, + "include": ["src/**/*"] +} diff --git a/addons/measure/README.md b/code/addons/measure/README.md similarity index 100% rename from addons/measure/README.md rename to code/addons/measure/README.md diff --git a/code/addons/measure/jest.config.js b/code/addons/measure/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/measure/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/measure/manager.js b/code/addons/measure/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/measure/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/measure/package.json b/code/addons/measure/package.json new file mode 100644 index 000000000000..5f879f175eb6 --- /dev/null +++ b/code/addons/measure/package.json @@ -0,0 +1,119 @@ +{ + "name": "@storybook/addon-measure", + "version": "7.0.0-beta.25", + "description": "Inspect layouts by visualizing the box model", + "keywords": [ + "storybook-addons", + "essentials", + "style", + "CSS", + "design" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/measure", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/measure" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "author": "winkerVSbecks", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./register": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx", + "./src/preview.tsx" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Measure", + "unsupportedFrameworks": [ + "react-native" + ], + "icon": "https://user-images.githubusercontent.com/42671/119589951-dbcd9600-bda1-11eb-9227-078f3cfc1e74.png" + } +} diff --git a/code/addons/measure/preview.js b/code/addons/measure/preview.js new file mode 100644 index 000000000000..49ad602f79f4 --- /dev/null +++ b/code/addons/measure/preview.js @@ -0,0 +1 @@ +export * from './dist/preview'; diff --git a/code/addons/measure/src/Tool.tsx b/code/addons/measure/src/Tool.tsx new file mode 100644 index 000000000000..2e68078aa06b --- /dev/null +++ b/code/addons/measure/src/Tool.tsx @@ -0,0 +1,39 @@ +import React, { useCallback, useEffect } from 'react'; +import { useGlobals, useStorybookApi } from '@storybook/manager-api'; +import { Icons, IconButton } from '@storybook/components'; +import { TOOL_ID, ADDON_ID } from './constants'; + +export const Tool = () => { + const [globals, updateGlobals] = useGlobals(); + const { measureEnabled } = globals; + const api = useStorybookApi(); + + const toggleMeasure = useCallback( + () => + updateGlobals({ + measureEnabled: !measureEnabled, + }), + [updateGlobals, measureEnabled] + ); + + useEffect(() => { + api.setAddonShortcut(ADDON_ID, { + label: 'Toggle Measure [M]', + defaultShortcut: ['M'], + actionName: 'measure', + showInMenu: false, + action: toggleMeasure, + }); + }, [toggleMeasure, api]); + + return ( + + + + ); +}; diff --git a/addons/measure/src/box-model/canvas.ts b/code/addons/measure/src/box-model/canvas.ts similarity index 98% rename from addons/measure/src/box-model/canvas.ts rename to code/addons/measure/src/box-model/canvas.ts index e35ee8a6eac8..653e3f005ac1 100644 --- a/addons/measure/src/box-model/canvas.ts +++ b/code/addons/measure/src/box-model/canvas.ts @@ -1,5 +1,5 @@ /* eslint-disable no-param-reassign */ -import global from 'global'; +import { global } from '@storybook/global'; interface Size { width: number; diff --git a/addons/measure/src/box-model/labels.ts b/code/addons/measure/src/box-model/labels.ts similarity index 100% rename from addons/measure/src/box-model/labels.ts rename to code/addons/measure/src/box-model/labels.ts diff --git a/addons/measure/src/box-model/visualizer.ts b/code/addons/measure/src/box-model/visualizer.ts similarity index 98% rename from addons/measure/src/box-model/visualizer.ts rename to code/addons/measure/src/box-model/visualizer.ts index 97ac7791bb73..eba2de27573b 100644 --- a/addons/measure/src/box-model/visualizer.ts +++ b/code/addons/measure/src/box-model/visualizer.ts @@ -2,9 +2,10 @@ /** * Based on https://gist.github.com/awestbro/e668c12662ad354f02a413205b65fce7 */ -import global from 'global'; +import { global } from '@storybook/global'; import { draw } from './canvas'; -import { labelStacks, Label, LabelStack } from './labels'; +import type { Label, LabelStack } from './labels'; +import { labelStacks } from './labels'; const colors = { margin: '#f6b26ba8', diff --git a/addons/measure/src/constants.ts b/code/addons/measure/src/constants.ts similarity index 100% rename from addons/measure/src/constants.ts rename to code/addons/measure/src/constants.ts diff --git a/code/addons/measure/src/index.ts b/code/addons/measure/src/index.ts new file mode 100644 index 000000000000..d6968d6ab3e3 --- /dev/null +++ b/code/addons/measure/src/index.ts @@ -0,0 +1,8 @@ +/// + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} + +// make it work with --isolatedModules +export default {}; diff --git a/code/addons/measure/src/manager.tsx b/code/addons/measure/src/manager.tsx new file mode 100644 index 000000000000..53bca4d0b716 --- /dev/null +++ b/code/addons/measure/src/manager.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { addons, types } from '@storybook/manager-api'; + +import { ADDON_ID, TOOL_ID } from './constants'; +import { Tool } from './Tool'; + +addons.register(ADDON_ID, () => { + addons.add(TOOL_ID, { + type: types.TOOL, + title: 'Measure', + match: ({ viewMode }) => viewMode === 'story', + render: () => , + }); +}); diff --git a/addons/measure/src/preview.tsx b/code/addons/measure/src/preview.tsx similarity index 100% rename from addons/measure/src/preview.tsx rename to code/addons/measure/src/preview.tsx diff --git a/code/addons/measure/src/typings.d.ts b/code/addons/measure/src/typings.d.ts new file mode 100644 index 000000000000..19bb66f5544f --- /dev/null +++ b/code/addons/measure/src/typings.d.ts @@ -0,0 +1,49 @@ +interface Margin { + top: number; + bottom: number; + left: number; + right: number; +} + +interface Padding { + top: number; + bottom: number; + left: number; + right: number; +} + +interface Border { + top: number; + bottom: number; + left: number; + right: number; +} + +interface Dimensions { + margin: Margin; + padding: Padding; + border: Border; + width: number; + height: number; + top: number; + left: number; + bottom: number; + right: number; +} + +interface Extremities { + top: number; + bottom: number; + left: number; + right: number; +} + +interface FloatingAlignment { + x: 'left' | 'right'; + y: 'top' | 'bottom'; +} + +interface ElementMeasurements extends Dimensions { + extremities: Extremities; + floatingAlignment: FloatingAlignment; +} diff --git a/code/addons/measure/src/util.ts b/code/addons/measure/src/util.ts new file mode 100644 index 000000000000..6ad580df97e8 --- /dev/null +++ b/code/addons/measure/src/util.ts @@ -0,0 +1,29 @@ +import { global } from '@storybook/global'; + +export const deepElementFromPoint = (x: number, y: number) => { + const element = global.document.elementFromPoint(x, y) as HTMLElement; + + const crawlShadows = (node: HTMLElement): HTMLElement => { + if (node && node.shadowRoot) { + // elementFromPoint() doesn't exist in ShadowRoot type + const nestedElement = (node.shadowRoot as any).elementFromPoint(x, y); + + // Nested node is same as the root one + if (node.isEqualNode(nestedElement)) { + return node; + } + // The nested node has shadow DOM too so continue crawling + if (nestedElement.shadowRoot) { + return crawlShadows(nestedElement); + } + // No more shadow DOM + return nestedElement; + } + + return node; + }; + + const shadowElement = crawlShadows(element); + + return shadowElement || element; +}; diff --git a/code/addons/measure/src/withMeasure.ts b/code/addons/measure/src/withMeasure.ts new file mode 100644 index 000000000000..8a6b2a41489f --- /dev/null +++ b/code/addons/measure/src/withMeasure.ts @@ -0,0 +1,64 @@ +/* eslint-env browser */ +import { useEffect } from '@storybook/preview-api'; +import type { Renderer, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/types'; +import { drawSelectedElement } from './box-model/visualizer'; +import { init, rescale, destroy } from './box-model/canvas'; +import { deepElementFromPoint } from './util'; + +let nodeAtPointerRef; +const pointer = { x: 0, y: 0 }; + +function findAndDrawElement(x: number, y: number) { + nodeAtPointerRef = deepElementFromPoint(x, y); + drawSelectedElement(nodeAtPointerRef); +} + +export const withMeasure = (StoryFn: StoryFunction, context: StoryContext) => { + const { measureEnabled } = context.globals; + + useEffect(() => { + const onPointerMove = (event: MouseEvent) => { + window.requestAnimationFrame(() => { + event.stopPropagation(); + pointer.x = event.clientX; + pointer.y = event.clientY; + }); + }; + + document.addEventListener('pointermove', onPointerMove); + + return () => { + document.removeEventListener('pointermove', onPointerMove); + }; + }, []); + + useEffect(() => { + const onPointerOver = (event: MouseEvent) => { + window.requestAnimationFrame(() => { + event.stopPropagation(); + findAndDrawElement(event.clientX, event.clientY); + }); + }; + + const onResize = () => { + window.requestAnimationFrame(() => { + rescale(); + }); + }; + + if (measureEnabled) { + document.addEventListener('pointerover', onPointerOver); + init(); + window.addEventListener('resize', onResize); + // Draw the element below the pointer when first enabled + findAndDrawElement(pointer.x, pointer.y); + } + + return () => { + window.removeEventListener('resize', onResize); + destroy(); + }; + }, [measureEnabled]); + + return StoryFn(); +}; diff --git a/code/addons/measure/tsconfig.json b/code/addons/measure/tsconfig.json new file mode 100644 index 000000000000..52d43eaaa9b9 --- /dev/null +++ b/code/addons/measure/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/addons/outline/README.md b/code/addons/outline/README.md similarity index 100% rename from addons/outline/README.md rename to code/addons/outline/README.md diff --git a/code/addons/outline/jest.config.js b/code/addons/outline/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/outline/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/outline/manager.js b/code/addons/outline/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/outline/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/outline/package.json b/code/addons/outline/package.json new file mode 100644 index 000000000000..98e06327a7f0 --- /dev/null +++ b/code/addons/outline/package.json @@ -0,0 +1,123 @@ +{ + "name": "@storybook/addon-outline", + "version": "7.0.0-beta.25", + "description": "Outline all elements with CSS to help with layout placement and alignment", + "keywords": [ + "storybook-addons", + "essentials", + "outline", + "css", + "layout", + "debug", + "storybook-addon", + "style" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/outline", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/outline" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "author": "winkerVSbecks", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./preview": { + "require": "./dist/preview.js", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./register": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "ts-dedent": "^2.0.0" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx", + "./src/preview.tsx" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Outline", + "unsupportedFrameworks": [ + "react-native" + ], + "icon": "https://user-images.githubusercontent.com/263385/101991674-48355c80-3c7c-11eb-9686-f684e755fcdd.png" + } +} diff --git a/code/addons/outline/preview.js b/code/addons/outline/preview.js new file mode 100644 index 000000000000..49ad602f79f4 --- /dev/null +++ b/code/addons/outline/preview.js @@ -0,0 +1 @@ +export * from './dist/preview'; diff --git a/addons/outline/src/OutlineSelector.tsx b/code/addons/outline/src/OutlineSelector.tsx similarity index 86% rename from addons/outline/src/OutlineSelector.tsx rename to code/addons/outline/src/OutlineSelector.tsx index b1e92ba02fd9..cf597ec2b2f4 100644 --- a/addons/outline/src/OutlineSelector.tsx +++ b/code/addons/outline/src/OutlineSelector.tsx @@ -1,9 +1,9 @@ import React, { memo, useCallback, useEffect } from 'react'; -import { useGlobals, useStorybookApi } from '@storybook/api'; +import { useGlobals, useStorybookApi } from '@storybook/manager-api'; import { Icons, IconButton } from '@storybook/components'; import { ADDON_ID, PARAM_KEY } from './constants'; -export const OutlineSelector = memo(() => { +export const OutlineSelector = memo(function OutlineSelector() { const [globals, updateGlobals] = useGlobals(); const api = useStorybookApi(); diff --git a/addons/outline/src/constants.ts b/code/addons/outline/src/constants.ts similarity index 100% rename from addons/outline/src/constants.ts rename to code/addons/outline/src/constants.ts diff --git a/code/addons/outline/src/helpers.ts b/code/addons/outline/src/helpers.ts new file mode 100644 index 000000000000..d427db2fa0b4 --- /dev/null +++ b/code/addons/outline/src/helpers.ts @@ -0,0 +1,28 @@ +import { global } from '@storybook/global'; + +export const clearStyles = (selector: string | string[]) => { + const selectors = Array.isArray(selector) ? selector : [selector]; + selectors.forEach(clearStyle); +}; + +const clearStyle = (input: string | string[]) => { + const selector = typeof input === 'string' ? input : input.join(''); + const element = global.document.getElementById(selector); + if (element && element.parentElement) { + element.parentElement.removeChild(element); + } +}; + +export const addOutlineStyles = (selector: string, css: string) => { + const existingStyle = global.document.getElementById(selector); + if (existingStyle) { + if (existingStyle.innerHTML !== css) { + existingStyle.innerHTML = css; + } + } else { + const style = global.document.createElement('style'); + style.setAttribute('id', selector); + style.innerHTML = css; + global.document.head.appendChild(style); + } +}; diff --git a/code/addons/outline/src/index.ts b/code/addons/outline/src/index.ts new file mode 100644 index 000000000000..d6968d6ab3e3 --- /dev/null +++ b/code/addons/outline/src/index.ts @@ -0,0 +1,8 @@ +/// + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} + +// make it work with --isolatedModules +export default {}; diff --git a/code/addons/outline/src/manager.tsx b/code/addons/outline/src/manager.tsx new file mode 100644 index 000000000000..384ea24c07c6 --- /dev/null +++ b/code/addons/outline/src/manager.tsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { addons, types } from '@storybook/manager-api'; + +import { ADDON_ID } from './constants'; +import { OutlineSelector } from './OutlineSelector'; + +addons.register(ADDON_ID, () => { + addons.add(ADDON_ID, { + title: 'Outline', + type: types.TOOL, + match: ({ viewMode }) => !!(viewMode && viewMode.match(/^(story|docs)$/)), + render: () => , + }); +}); diff --git a/addons/outline/src/outlineCSS.ts b/code/addons/outline/src/outlineCSS.ts similarity index 99% rename from addons/outline/src/outlineCSS.ts rename to code/addons/outline/src/outlineCSS.ts index 94bbeee73570..502ecd884b8c 100644 --- a/addons/outline/src/outlineCSS.ts +++ b/code/addons/outline/src/outlineCSS.ts @@ -1,4 +1,4 @@ -import dedent from 'ts-dedent'; +import { dedent } from 'ts-dedent'; /* From pesticide v1.3.0 . @mrmrs . MIT diff --git a/code/addons/outline/src/preview.tsx b/code/addons/outline/src/preview.tsx new file mode 100644 index 000000000000..65161c6c4f29 --- /dev/null +++ b/code/addons/outline/src/preview.tsx @@ -0,0 +1,8 @@ +import { withOutline } from './withOutline'; +import { PARAM_KEY } from './constants'; + +export const decorators = [withOutline]; + +export const globals = { + [PARAM_KEY]: false, +}; diff --git a/code/addons/outline/src/withOutline.ts b/code/addons/outline/src/withOutline.ts new file mode 100644 index 000000000000..5642fdf91c8f --- /dev/null +++ b/code/addons/outline/src/withOutline.ts @@ -0,0 +1,34 @@ +import { useMemo, useEffect } from '@storybook/preview-api'; +import type { Renderer, PartialStoryFn as StoryFunction, StoryContext } from '@storybook/types'; + +import { clearStyles, addOutlineStyles } from './helpers'; +import { PARAM_KEY } from './constants'; +import outlineCSS from './outlineCSS'; + +export const withOutline = (StoryFn: StoryFunction, context: StoryContext) => { + const { globals } = context; + const isActive = globals[PARAM_KEY] === true; + const isInDocs = context.viewMode === 'docs'; + + const outlineStyles = useMemo(() => { + const selector = isInDocs ? `#anchor--${context.id} .docs-story` : '.sb-show-main'; + + return outlineCSS(selector); + }, [context]); + + useEffect(() => { + const selectorId = isInDocs ? `addon-outline-docs-${context.id}` : `addon-outline`; + + if (!isActive) { + clearStyles(selectorId); + } else { + addOutlineStyles(selectorId, outlineStyles); + } + + return () => { + clearStyles(selectorId); + }; + }, [isActive, outlineStyles, context]); + + return StoryFn(); +}; diff --git a/code/addons/outline/tsconfig.json b/code/addons/outline/tsconfig.json new file mode 100644 index 000000000000..52d43eaaa9b9 --- /dev/null +++ b/code/addons/outline/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/code/addons/storyshots-core/.eslintrc.js b/code/addons/storyshots-core/.eslintrc.js new file mode 100644 index 000000000000..79e820da0d30 --- /dev/null +++ b/code/addons/storyshots-core/.eslintrc.js @@ -0,0 +1,12 @@ +module.exports = { + settings: { + 'import/core-modules': [ + '@storybook/angular', + '@storybook/html', + '@storybook/react', + '@storybook/preact', + '@storybook/vue', + '@storybook/svelte', + ], + }, +}; diff --git a/code/addons/storyshots-core/README.md b/code/addons/storyshots-core/README.md new file mode 100644 index 000000000000..22881b8b14ec --- /dev/null +++ b/code/addons/storyshots-core/README.md @@ -0,0 +1,796 @@ +# StoryShots + +StoryShots adds automatic Jest Snapshot Testing for [Storybook](https://storybook.js.org/). + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +![StoryShots In Action](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/storyshots/storyshots-core/docs/storyshots-fail.png) + +To use StoryShots, you must use your existing Storybook stories as the input for Jest Snapshot Testing. + +## Getting Started + +Add the following module into your app. + +```sh +yarn add @storybook/addon-storyshots --dev +``` + +## Configure Storyshots for HTML snapshots + +Create a new test file with the name `Storyshots.test.js`. (Or whatever the name you prefer, as long as it matches Jest's config [`testMatch`](http://facebook.github.io/jest/docs/en/configuration.html#testmatch-array-string)). +Then add following content to it: + +```js +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots(); +``` + +That's all. + +Now run your Jest test command. (Usually, `npm test`.) Then you can see all of your stories are converted as Jest snapshot tests. + +![Screenshot](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/storyshots/storyshots-core/docs/storyshots.png) + +### Testing stories that rely on addon-added decorators + +If you have stories in your Storybook that can only render inside a decorator (for instance the [`apollo-storybook-decorator`](https://github.com/abhiaiyer91/apollo-storybook-decorator)), you'll need to ensure those decorators are applied in Storyshots. + +If you export those decorators from your `.storybook/preview.js` then Storyshots will apply those decorators for you in the same way that Storybook does. However if the addon _automatically_ adds the decorator for you (which is a new feature in Storybook 6.0), you will find the decorator does not get added in Storyshots. This is a limitation in Storyshots currently. + +To ensure such decorators get added, export them from `.storybook/preview.js`: + +```js +import addonDecorator from 'some-addon'; + +export const decorators = [addonDecorator]; +``` + +## Configure your app for Jest + +In many cases, for example Create React App, it's already configured for Jest. You need to create a filename with the extension `.test.js`. + +If you still need to configure jest you can use the resources mentioned below: + +- [Getting Started - Jest Official Documentation](https://facebook.github.io/jest/docs/en/getting-started.html) +- [Javascript Testing with Jest - Egghead](https://egghead.io/lessons/javascript-test-javascript-with-jest). **_paid content_** + +> Note: If you use React 16, you'll need to follow [these additional instructions](https://github.com/facebook/react/issues/9102#issuecomment-283873039). +> +> Note: Make sure you have added the `json` extension to `moduleFileExtensions` in `jest.config.json`. If this is missing it leads to the [following error](https://github.com/storybookjs/storybook/issues/3728): `Cannot find module 'spdx-license-ids' from 'scan.js'`. +> +> Note: Please make sure you are using `jsdom` as the testEnvironment on your jest config file. + +### Configure Jest to work with Webpack's [require.context()](https://webpack.js.org/guides/dependency-management/#require-context) + +**NOTE**: if you are using Storybook 5.3's `main.js` to list story files, this is no longer needed. + +Sometimes it's useful to configure Storybook with Webpack's require.context feature. You could be loading stories [one of two ways](https://github.com/storybookjs/storybook/blob/release/5.3/docs/src/pages/basics/writing-stories/index.md#loading-stories). + +1. If you're using the `storiesOf` API, you can integrate it this way: + +```js +import { configure } from '@storybook/react'; + +const req = require.context('../stories', true, /\.stories\.js$/); // <- import all the stories at once + +function loadStories() { + req.keys().forEach((filename) => req(filename)); +} + +configure(loadStories, module); +``` + +2. If you're using Component Story Format (CSF), you'll integrate it like so: + +```js +import { configure } from '@storybook/react'; + +const req = require.context('../stories', true, /\.stories\.js$/); // <- import all the stories at once + +configure(req, module); +``` + +The problem here is that it will work only during the build with webpack, +other tools may lack this feature. Since Storyshot is running under Jest, +we need to polyfill this functionality to work with Jest. The easiest +way is to integrate it to babel. + +You can do this with a Babel [plugin](https://github.com/smrq/babel-plugin-require-context-hook) or [macro](https://github.com/storybookjs/require-context.macro). If you're using `create-react-app` (v2 or above), use the macro. + +#### Option 1: Plugin + +First, install it: + +```sh +yarn add babel-plugin-require-context-hook --dev +``` + +Next, it needs to be registered and loaded before each test. To register it, create a file with the following register function `.jest/register-context.js`: + +```js +import registerRequireContextHook from 'babel-plugin-require-context-hook/register'; +registerRequireContextHook(); +``` + +That file needs to be added as a setup file for Jest. To do that, add (or create) a property in Jest's config called [`setupFiles`](https://jestjs.io/docs/en/configuration.html#setupfiles-array). Add the file name and path to this array. + +```json +setupFiles: ['/.jest/register-context.js'] +``` + +Finally, add the plugin to `.babelrc`: + +```json +{ + "presets": ["..."], + "plugins": ["..."], + "env": { + "test": { + "plugins": ["require-context-hook"] + } + } +} +``` + +The plugin is only added to the test environment otherwise it could replace webpack's version of it. + +#### Option 2: Macro + +First, install it: + +```sh +yarn add require-context.macro --dev +``` + +Now, inside of your Storybook config file, import the macro and run it in place of `require.context`, like so: + +```javascript +import requireContext from 'require-context.macro'; + +// const req = require.context('../stories', true, /\.stories\.js$/); <-- replaced +const req = requireContext('../stories', true, /\.stories\.js$/); +``` + +### Configure Jest for React + +StoryShots addon for React is dependent on [react-test-renderer](https://github.com/facebook/react/tree/master/packages/react-test-renderer), but +[doesn't](#deps-issue) install it, so you need to install it separately. + +```sh +yarn add react-test-renderer --dev +``` + +### Configure Jest for Angular + +StoryShots addon for Angular is dependent on [jest-preset-angular](https://github.com/thymikee/jest-preset-angular), but +[doesn't](#deps-issue) install it, so you need to install it separately. + +```sh +yarn add jest-preset-angular +``` + +If you already use Jest for testing your angular app - probably you already have the needed jest configuration. +Anyway you can add these lines to your jest config: + +```js +module.exports = { + globals: { + __TRANSFORM_HTML__: true, + }, + transform: { + '^.+\\.jsx?$': 'babel-jest', + '^.+\\.(ts|html)$': '/node_modules/jest-preset-angular/preprocessor.js', + }, + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node', '.html'], +}; +``` + +### Configure Jest for Vue + +StoryShots addon for Vue is dependent on [jest-vue-preprocessor](https://github.com/vire/jest-vue-preprocessor), but +[doesn't](#deps-issue) install it, so you need to install it separately. + +```sh +yarn add jest-vue-preprocessor +``` + +If you already use Jest for testing your vue app - probably you already have the needed jest configuration. +Anyway you can add these lines to your jest config: + +```js +module.exports = { + transform: { + '^.+\\.jsx?$': 'babel-jest', + '.*\\.(vue)$': '/node_modules/jest-vue-preprocessor', + }, + transformIgnorePatterns: ['/node_modules/(?!(@storybook/.*\\.vue$))'], + moduleFileExtensions: ['vue', 'js', 'jsx', 'json', 'node'], +}; +``` + +### Configure Jest for Vue 3 + +StoryShots addon for Vue is dependent on [vue-jest v5](https://www.npmjs.com/package/vue-jest/v/5.0.0-alpha.8), but +[doesn't](#deps-issue) install it, so you need to install it separately. + +```sh +yarn add vue-jest@5.0.0-alpha.8 +``` + +If you already use Jest for testing your vue app - probably you already have the needed jest configuration. +Anyway you can add these lines to your jest config: + +```js +module.exports = { + transform: { + '^.+\\.jsx?$': 'babel-jest', + '.*\\.(vue)$': '/node_modules/vue-jest', + }, + transformIgnorePatterns: ['/node_modules/(?!(@storybook/.*\\.vue$))'], + moduleFileExtensions: ['vue', 'js', 'jsx', 'json', 'node'], +}; +``` + +### Configure Jest for Preact + +StoryShots addon for Preact is dependent on [preact-render-to-string](https://github.com/preactjs/preact-render-to-string), but +[doesn't](#deps-issue) install it, so you need to install it separately. + +```sh +yarn add preact-render-to-string --dev +``` + +### Configure Jest for Web Components + +StoryShots addon for Web Components requires [jsdom](https://github.com/jsdom/jsdom) 16 or later to fully support the +web component shadow dom. To use jsdom 16 or later you can set the Jest `testEnvironment` configuration key to +`jest-environment-jsdom-sixteen`. This should work back to Jest 24 and is the default in Jest 26 and later. + +### Configure Jest for MDX Docs Add-On Stories + +If using the [Docs add-on](../../docs/README.md) with +[MDX stories](../../docs/docs/mdx.md) you will need +to configure Jest to transform MDX stories into something Storyshots can understand: + +Add the following to your Jest configuration: + +```json +{ + "transform": { + "^.+\\.[tj]sx?$": "babel-jest", + "^.+\\.mdx?$": "@storybook/addon-docs/jest-transform-mdx" + } +} +``` + +### Why don't we install dependencies of each framework ? + +Storyshots addon is currently supporting React, Angular and Vue. Each framework needs its own packages to be integrated with Jest. We don't want people that use only React will need to bring other dependencies that do not make sense for them. + +`dependencies` - will installed an exact version of the particular dep - Storyshots can work with different versions of the same framework (let's say React v16 and React v15), that have to be compatible with a version of its plugin (react-test-renderer). + +`optionalDependencies` - behaves like a regular dependency, but do not fail the installation in case there is a problem to bring the dep. + +`peerDependencies` - listing all the deps in peer will trigger warnings during the installation - we don't want users to install unneeded deps by hand. + +`optionalPeerDependencies` - unfortunately there is nothing like this =( + +For more information read npm [docs](https://docs.npmjs.com/files/package.json#dependencies) + +### Using `createNodeMock` to mock refs + +`react-test-renderer` doesn't provide refs for rendered components. By +default, it returns null when the refs are referenced. In order to mock +out elements that rely on refs, you will have to use the +`createNodeMock` option [added to React](https://reactjs.org/blog/2016/11/16/react-v15.4.0.html#mocking-refs-for-snapshot-testing) starting with version 15.4.0. + +Here is an example of how to specify the `createNodeMock` option in Storyshots: + +```js +import initStoryshots, { snapshotWithOptions } from '@storybook/addon-storyshots'; +import TextareaThatUsesRefs from '../component/TextareaThatUsesRefs'; + +initStoryshots({ + test: snapshotWithOptions({ + createNodeMock: (element) => { + if (element.type === TextareaThatUsesRefs) { + return document.createElement('textarea'); + } + }, + }), +}); +``` + +Provide a function to have story-specific options: + +```js +initStoryshots({ + test: snapshotWithOptions((story) => ({ + createNodeMock: (element) => { + if (story.name == 'foobar') { + return null; + } + return element; + }, + })), +}); +``` + +### Using a custom renderer + +By design, [`react-test-renderer` doesn't use a browser environment or JSDOM](https://github.com/facebook/react/issues/20589). Because of this difference, some stories might render in your browser, but not in Storyshots. If you encounter this problem, you may want to switch for an higher level renderer such as `mount` from Enzyme or `render` from React Testing Library. + +#### Example with React Testing Library + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { render } from '@testing-library/react'; + +const reactTestingLibrarySerializer = { + print: (val, serialize, indent) => serialize(val.container.firstChild), + test: (val) => val && val.hasOwnProperty('container'), +}; + +initStoryshots({ + renderer: render, + snapshotSerializers: [reactTestingLibrarySerializer], +}); +``` + +#### Example with Enzyme + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { mount } from 'enzyme'; + +initStoryshots({ + renderer: mount, +}); +``` + +If you are using enzyme, you need to make sure jest knows how to serialize rendered components. +For that, you can pass an enzyme-compatible snapshotSerializer (like [enzyme-to-json](https://github.com/adriantoine/enzyme-to-json), [jest-serializer-enzyme](https://github.com/rogeliog/jest-serializer-enzyme) etc.) with the `snapshotSerializer` option (see below). + +### StoryShots for async rendered components + +You can make use of [Jest done callback](https://jestjs.io/docs/en/asynchronous) to test components that render asynchronously. This callback is passed as param to test method passed to `initStoryshots(...)` when the `asyncJest` option is given as true. + +#### Example + +The following example shows how we can use the **done callback** to take StoryShots of a [Relay](http://facebook.github.io/relay/) component. Each kind of story is written into its own snapshot file with the use of `getSnapshotFileName`. + +Add _stories of UserForm_ in the file: UserForm.story.jsx + +```jsx +/* global module */ +import React from 'react'; +import { QueryRenderer } from 'react-relay'; +import { storiesOf } from '@storybook/react'; + +// Use the same queries used in YOUR app routes +import { newUserFormQuery, editUserFormQuery } from 'app/routes'; +import UserFormContainer from 'app/users/UserForm'; + +// YOUR function to generate a Relay Environment mock. +// See https://github.com/1stdibs/relay-mock-network-layer for more info +import getEnvironment from 'test/support/relay-environment-mock'; + +// User test data YOU generated for your tests +import { user } from 'test/support/data/index'; + +// Use this function to return a new Environment for each story +const Environment = () => + getEnvironment({ + mocks: { + Node: () => ({ __typename: 'User' }), + User: () => user, + }, + }); + +/** + + NOTICE that the QueryRenderer render its children via its render props. + + If we don't take the StoryShot async then we will only see the QueryRenderer in the StoryShot. + + The following QueryRenderer returns null in the first render (it can be a loading indicator instead in real file) and then when it gets the data to respond to query, it renders again with props containing the data for the Component + */ +const renderStory = (query, environment, variables = {}) => ( + { + if (error) { + console.error(error); + } else if (props) { + return ; + } + return null; + }} + /> +); + +storiesOf('users/UserForm', module) + .add('New User', () => { + const environment = new Environment(); + return renderStory(newUserFormQuery, environment); + }) + .add('Editing User', () => { + const environment = new Environment(); + return renderStory(editUserFormQuery, environment, { id: user.id }); + }); +``` + +Then, init Storyshots for async component in the file: StoryShots.test.js + +```jsx +import initStoryshots, { Stories2SnapsConverter } from '@storybook/addon-storyshots'; +import { mount } from 'enzyme'; +import toJson from 'enzyme-to-json'; + +// Runner +initStoryshots({ + asyncJest: true, // this is the option that activates the async behaviour + test: ({ + story, + context, + done, // --> callback passed to test method when asyncJest option is true + }) => { + const converter = new Stories2SnapsConverter(); + const snapshotFilename = converter.getSnapshotFileName(context); + const storyElement = story.render(); + + // mount the story + const tree = mount(storyElement); + + // wait until the mount is updated, in our app mostly by Relay + // but maybe something else updating the state of the component + // somewhere + const waitTime = 1; + setTimeout(() => { + if (snapshotFilename) { + expect(toJson(tree.update())).toMatchSpecificSnapshot(snapshotFilename); + } + + done(); + }, waitTime); + }, + // other options here +}); +``` + +NOTICE that When using the `asyncJest: true` option, you also must specify a `test` method that calls the `done()` callback. + +This is a really powerful technique to write stories of Relay components because it integrates data fetching with component rendering. So instead of passing data props manually, we can let Relay do the job for us as it does in our application. + +Whenever you change your data requirements by adding (and rendering) or (accidentally) deleting fields in your graphql query fragments, you'll get a different snapshot and thus an error in the StoryShot test. + +## Using a custom directory + +Depending on your project's needs, you can configure the `@storybook/addon-storyshots` to use a custom directory for the snapshots. You can read more about it in the [official docs](https://storybook.js.org/docs/react/writing-tests/snapshot-testing). + +## Options + +### `config` + +The `config` parameter must be a function that helps to configure storybook like the `preview.js` does. +If it's not specified, storyshots will try to use [configPath](#configPath) parameter. + +```js +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots({ + config: ({ configure }) => + configure(() => { + require('../stories/Button.story.js'); + }, module), +}); +``` + +### `configPath` + +By default, Storyshots assumes the config directory path for your project as below: + +- Storybook for React: `.storybook` +- Storybook for React Native: `storybook` + +If you are using a different config directory path, you could change it like this: + +```js +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots({ + configPath: '.my-storybook-config-dir', +}); +``` + +Or, as a more complex example, if we have a package in our `lerna` project called `app` with the path `./packages/app/src/__tests__/storyshots.js` and the storybook config directory `./packages/app/.storybook`: + +```js +import path from 'path'; +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots({ configPath: path.resolve(__dirname, '../../.storybook') }); +``` + +`configPath` can also specify path to the `preview.js` itself. In this case, config directory will be +a base directory of the `configPath`. It may be useful when the `preview.js` for test should differ from the +original one. It also may be useful for separating tests to different test configs: + +```js +initStoryshots({ + configPath: '.my-storybook-config-dir/testConfig1.js', +}); + +initStoryshots({ + configPath: '.my-storybook-config-dir/testConfig2.js', +}); +``` + +### `suite` + +By default, Storyshots groups stories inside a Jest test suite called "Storyshots". You could change it like this: + +```js +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots({ + suite: 'MyStoryshots', +}); +``` + +### `storyKindRegex` + +If you'd like to only run a subset of the stories for your snapshot tests based on the story's kind: + +```js +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots({ + storyKindRegex: /^MyComponent$/, +}); +``` + +This can be useful if you want to separate the snapshots in directories next to each component. See an example [here](https://github.com/storybookjs/storybook/issues/892). + +If you want to run all stories except stories of a specific kind, you can write an inverse regex which is true for all kinds except those with a specific word such as `DontTest` + +```js +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots({ + storyKindRegex: /^((?!.*?DontTest).)*$/, +}); +``` + +This can be useful while testing react components which make use of the findDomNode API since they always fail with snapshot testing +while using react-test-renderer see [here](https://github.com/facebook/react/issues/8324) + +### `storyNameRegex` + +If you'd like to only run a subset of the stories for your snapshot tests based on the story's name: + +```js +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots({ + storyNameRegex: /buttons/, +}); +``` + +### `framework` + +If you are running tests from outside of your app's directory, storyshots' detection of which framework you are using may fail. Pass `"react"` or `"react-native"` to short-circuit this. + +For example: + +```js +// storybook.test.js + +import path from 'path'; +import initStoryshots from '@storybook/addon-storyshots'; + +initStoryshots({ + framework: 'react', // Manually specify the project's framework + configPath: path.join(__dirname, '.storybook'), + integrityOptions: { cwd: path.join(__dirname, 'src', 'stories') }, + // Other configurations +}); +``` + +Use this table as a reference for manually specifying the framework. + +| angular | html | preact | +| -------------- | ---- | ------------ | +| react | riot | react-native | +| svelte | vue | vue3 | +| web-components | rax | | + +### `test` + +Run a custom test function for each story, rather than the default (a vanilla snapshot test). +Setting `test` will take precedence over the `renderer` option. +You can still overwrite what renderer is used for the test function: + +```js +import initStoryshots, { renderWithOptions } from '@storybook/addon-storyshots'; +import { mount } from 'enzyme'; + +initStoryshots({ + test: renderWithOptions({ + renderer: mount, + }), +}); +``` + +### `renderer` + +Pass a custom renderer (such as enzymes `mount`) to record snapshots. +This may be necessary if you want to use React features that are not supported by the default test renderer, +such as **ref** or **Portals**. +Note that setting `test` overrides `renderer`. + +### `snapshotSerializers` + +Pass an array of snapshotSerializers to the jest runtime that serializes your story (such as enzyme-to-json). + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { createSerializer } from 'enzyme-to-json'; + +initStoryshots({ + renderer: mount, + snapshotSerializers: [createSerializer()], +}); +``` + +This option needs to be set if either: + +- the multiSnapshot function is used to create multiple snapshot files (i.e. one per story), since it ignores any serializers specified in your jest config. +- serializers not specified in your jest config should be used when snapshotting stories. + +### `serializer` (deprecated) + +Pass a custom serializer (such as enzyme-to-json) to serialize components to snapshot-comparable data. The functionality of this option is completely covered by [snapshotSerializers](#snapshotserializers) which should be used instead. + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import toJSON from 'enzyme-to-json'; + +initStoryshots({ + renderer: mount, + serializer: toJSON, +}); +``` + +This option only needs to be set if the default `snapshotSerializers` is not set in your jest config. + +### `stories2snapsConverter` + +This parameter should be an instance of the [`Stories2SnapsConverter`](src/Stories2SnapsConverter.js) (or a derived from it) Class that is used to convert story-file name to snapshot-file name and vice versa. + +By default, the instance of this class is created with these default options: + +```js +{ + snapshotsDirName: '__snapshots__', + snapshotExtension: '.storyshot', + storiesExtensions: ['.js', '.jsx', '.ts', '.tsx'], +} +``` + +This class might be overridden to extend the existing conversion functionality or instantiated to provide different options: + +```js +import initStoryshots, { Stories2SnapsConverter } from '@storybook/addon-storyshots'; + +initStoryshots({ + stories2snapsConverter: new Stories2SnapsConverter({ + snapshotExtension: '.storypuke', + storiesExtensions: ['.foo'], + }), +}); +``` + +## Exports + +Apart from the default export (`initStoryshots`), Storyshots also exports some named test functions (see the `test` option above): + +### `snapshot` + +The default, render the story as normal and take a Jest snapshot. + +### `renderOnly` + +Just render the story, don't check the output at all. This is useful as a low-effort way of smoke testing your +components to ensure they do not error. + +### `snapshotWithOptions(options)` + +Like the default, but allows you to specify a set of options for the test renderer. [See for example here](https://github.com/storybookjs/storybook/blob/b915b5439786e0edb17d7f5ab404bba9f7919381/examples/test-cra/src/storyshots.test.js#L14-L16). + +### `renderWithOptions(options)` + +Like the default, but allows you to specify a set of options for the renderer, just like `snapshotWithOptions`. + +### `multiSnapshotWithOptions(options)` + +Like `snapshotWithOptions`, but generate a separate snapshot file for each stories file rather than a single monolithic file (as is the convention in Jest). This makes it dramatically easier to review changes. If you'd like the benefit of separate snapshot files, but don't have custom options to pass, you can pass an empty object. +If you use [Component Story Format](https://storybook.js.org/docs/react/api/csf), you may also need to add an additional Jest transform to automate detecting story file names: + +```js +// jest.config.js +module.exports = { + transform: { + '^.+\\.stories\\.jsx?$': '@storybook/addon-storyshots/injectFileName', + '^.+\\.jsx?$': 'babel-jest', + }, +}; +``` + +#### integrityOptions + +This option is useful when running test with `multiSnapshotWithOptions(options)` in order to track snapshots are matching the stories. (disabled by default). +The value is a [settings](https://github.com/isaacs/node-glob#options) to a `glob` object, that searches for the snapshot files. + +```js +initStoryshots({ + integrityOptions: { cwd: __dirname }, // it will start searching from the current directory + test: multiSnapshotWithOptions(), +}); +``` + +### `shallowSnapshot` + +Take a snapshot of a shallow-rendered version of the component. Note that this option will be overridden if you pass a `renderer` option. + +### `Stories2SnapsConverter` + +This is a class that generates snapshot's name based on the story (kind, story & filename) and vice versa. + +###### Example: + +Let's say we wanted to create a test function for shallow && multi-file snapshots: + +```js +import initStoryshots, { Stories2SnapsConverter } from '@storybook/addon-storyshots'; +import { shallow } from 'enzyme'; +import toJson from 'enzyme-to-json'; + +const converter = new Stories2SnapsConverter(); + +initStoryshots({ + test: ({ story, context }) => { + const snapshotFileName = converter.getSnapshotFileName(context); + const storyElement = story.render(); + const shallowTree = shallow(storyElement); + + if (snapshotFileName) { + expect(toJson(shallowTree)).toMatchSpecificSnapshot(snapshotFileName); + } + }, +}); +``` + +### `asyncJest` + +Enables Jest `done()` callback in the StoryShots tests for async testing. See [StoryShots for async rendered components](#storyshots-for-async-rendered-components) for more info. + +## Story Parameters + +### `disable` + +Some stories are difficult or impossible to snapshot, such as those covering components that use external DOM-modifying libraries, and those that deliberately throw errors. It is possible to skip stories like these by giving them a parameter of `storyshots: {disable: true}`. There is also a shorthand for this, `storyshots: false`. + +```js +export const Exception = () => { + throw new Error('storyFn threw an error! WHOOPS'); +}; +Exception.storyName = 'story throws exception'; +Exception.parameters = { + storyshots: { disable: true }, +}; +``` diff --git a/addons/storyshots/storyshots-core/docs/storyshots-fail.png b/code/addons/storyshots-core/docs/storyshots-fail.png similarity index 100% rename from addons/storyshots/storyshots-core/docs/storyshots-fail.png rename to code/addons/storyshots-core/docs/storyshots-fail.png diff --git a/addons/storyshots/storyshots-core/docs/storyshots.png b/code/addons/storyshots-core/docs/storyshots.png similarity index 100% rename from addons/storyshots/storyshots-core/docs/storyshots.png rename to code/addons/storyshots-core/docs/storyshots.png diff --git a/addons/storyshots/storyshots-core/injectFileName.js b/code/addons/storyshots-core/injectFileName.js similarity index 100% rename from addons/storyshots/storyshots-core/injectFileName.js rename to code/addons/storyshots-core/injectFileName.js diff --git a/code/addons/storyshots-core/jest.config.js b/code/addons/storyshots-core/jest.config.js new file mode 100644 index 000000000000..0115c67e5629 --- /dev/null +++ b/code/addons/storyshots-core/jest.config.js @@ -0,0 +1,12 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + snapshotSerializers: [...baseConfig.snapshotSerializers, 'enzyme-to-json/serializer'], + transform: { + ...baseConfig.transform, + '^.+\\.stories\\.[jt]sx?$': '@storybook/addon-storyshots/injectFileName', + }, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/storyshots-core/package.json b/code/addons/storyshots-core/package.json new file mode 100644 index 000000000000..1b86721b461c --- /dev/null +++ b/code/addons/storyshots-core/package.json @@ -0,0 +1,156 @@ +{ + "name": "@storybook/addon-storyshots", + "version": "7.0.0-beta.25", + "description": "Take a code snapshot of every story automatically with Jest", + "keywords": [ + "addon", + "storybook", + "test" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/storyshots-core", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/storyshots-core" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.mjs", + "*.d.ts" + ], + "scripts": { + "prep": "../../../scripts/prepare/tsc.ts" + }, + "dependencies": { + "@jest/transform": "^29.3.1", + "@storybook/babel-plugin-require-context-hook": "1.0.1", + "@storybook/client-api": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/core-webpack": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "@types/glob": "^7.1.3", + "@types/jest-specific-snapshot": "^0.5.6", + "core-js": "^3.8.2", + "glob": "^7.1.6", + "jest-specific-snapshot": "^7.0.0", + "preact-render-to-string": "^5.1.19", + "pretty-format": "^29.0.0", + "react-test-renderer": "^16.8.0 || ^17.0.0 || ^18.0.0", + "read-pkg-up": "^7.0.1", + "ts-dedent": "^2.0.0" + }, + "devDependencies": { + "@angular/core": "^13.3.6", + "@angular/platform-browser-dynamic": "^13.3.6", + "@emotion/jest": "^11.8.0", + "@storybook/addon-docs": "7.0.0-beta.25", + "@storybook/angular": "7.0.0-beta.25", + "@storybook/react": "7.0.0-beta.25", + "@storybook/vue": "7.0.0-beta.25", + "@storybook/vue3": "7.0.0-beta.25", + "babel-loader": "^8.3.0", + "enzyme": "^3.11.0", + "enzyme-adapter-react-16": "^1.15.5", + "enzyme-to-json": "^3.6.1", + "jest-preset-angular": "^8.3.2", + "jest-vue-preprocessor": "^1.7.1", + "react-test-renderer": "^16", + "rimraf": "^3.0.2", + "rxjs": "^6.6.3", + "vue-jest": "^5.0.0-alpha.8" + }, + "peerDependencies": { + "@angular/core": ">=13.0.0", + "@angular/platform-browser-dynamic": ">=13.0.0", + "@storybook/angular": "*", + "@storybook/react": "*", + "@storybook/vue": "*", + "@storybook/vue3": "*", + "jest": "*", + "jest-preset-angular": "*", + "jest-vue-preprocessor": "*", + "preact": "^10.5.13", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "rxjs": "*", + "svelte": "*", + "vue": "*", + "vue-jest": "*" + }, + "peerDependenciesMeta": { + "@angular/core": { + "optional": true + }, + "@angular/platform-browser-dynamic": { + "optional": true + }, + "@storybook/angular": { + "optional": true + }, + "@storybook/react": { + "optional": true + }, + "@storybook/vue": { + "optional": true + }, + "@storybook/vue3": { + "optional": true + }, + "jest-preset-angular": { + "optional": true + }, + "jest-vue-preprocessor": { + "optional": true + }, + "preact": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "rxjs": { + "optional": true + }, + "svelte": { + "optional": true + }, + "vue": { + "optional": true + }, + "vue-jest": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": {}, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Storyshots", + "icon": "https://user-images.githubusercontent.com/263385/101991676-48cdf300-3c7c-11eb-8aa1-944dab6ab29b.png", + "unsupportedFrameworks": [ + "ember", + "mithril", + "marko" + ] + } +} diff --git a/addons/storyshots/storyshots-core/preset.js b/code/addons/storyshots-core/preset.js similarity index 100% rename from addons/storyshots/storyshots-core/preset.js rename to code/addons/storyshots-core/preset.js diff --git a/code/addons/storyshots-core/src/Stories2SnapsConverter.test.ts b/code/addons/storyshots-core/src/Stories2SnapsConverter.test.ts new file mode 100644 index 000000000000..d066d1226e58 --- /dev/null +++ b/code/addons/storyshots-core/src/Stories2SnapsConverter.test.ts @@ -0,0 +1,52 @@ +import { Stories2SnapsConverter } from './Stories2SnapsConverter'; + +const target = new Stories2SnapsConverter(); + +describe('getSnapshotFileName', () => { + it('fileName is provided - snapshot is stored in __snapshots__ dir', () => { + const context = { fileName: 'foo.js', kind: 'kind' }; + + const result = target.getSnapshotFileName(context); + const platformAgnosticResult = result.replace(/\\|\//g, '/'); + + // This is an absolute path, so we need to use `toContain()` + expect(platformAgnosticResult).toContain('__snapshots__/foo.storyshot'); + }); + + it('fileName with multiple extensions is provided - only the last extension is replaced', () => { + const context = { fileName: 'foo.web.stories.js', kind: 'kind' }; + + const result = target.getSnapshotFileName(context); + const platformAgnosticResult = result.replace(/\\|\//g, '/'); + + // This is an absolute path, so we need to use `toContain()` + expect(platformAgnosticResult).toContain('__snapshots__/foo.web.stories.storyshot'); + }); + + it('fileName with dir is provided - __snapshots__ dir is created inside another dir', () => { + const context = { fileName: 'test/foo.js', kind: 'kind' }; + + const result = target.getSnapshotFileName(context); + const platformAgnosticResult = result.replace(/\\|\//g, '/'); + + // This is an absolute path, so we need to use `toContain()` + expect(platformAgnosticResult).toContain('test/__snapshots__/foo.storyshot'); + }); +}); + +describe('getPossibleStoriesFiles', () => { + it('storyshots is provided and all the posible stories file names are returned', () => { + const storyshots = 'test/__snapshots__/foo.web.stories.storyshot'; + + const result = target.getPossibleStoriesFiles(storyshots); + const platformAgnosticResult = result.map((path) => path.replace(/\\|\//g, '/')); + + expect(platformAgnosticResult).toEqual([ + 'test/foo.web.stories.js', + 'test/foo.web.stories.jsx', + 'test/foo.web.stories.ts', + 'test/foo.web.stories.tsx', + 'test/foo.web.stories.mdx', + ]); + }); +}); diff --git a/addons/storyshots/storyshots-core/src/Stories2SnapsConverter.ts b/code/addons/storyshots-core/src/Stories2SnapsConverter.ts similarity index 83% rename from addons/storyshots/storyshots-core/src/Stories2SnapsConverter.ts rename to code/addons/storyshots-core/src/Stories2SnapsConverter.ts index 85425bae4d72..439a514f7bd4 100644 --- a/addons/storyshots/storyshots-core/src/Stories2SnapsConverter.ts +++ b/code/addons/storyshots-core/src/Stories2SnapsConverter.ts @@ -1,5 +1,5 @@ import path from 'path'; -import dedent from 'ts-dedent'; +import { dedent } from 'ts-dedent'; const defaultOptions: Stories2SnapsConverterOptions = { snapshotsDirName: '__snapshots__', @@ -29,7 +29,15 @@ export class Stories2SnapsConverter { const { dir, name } = path.parse(fileName); const { snapshotsDirName, snapshotExtension } = this.options; - return path.format({ dir: path.join(dir, snapshotsDirName), name, ext: snapshotExtension }); + // Convert to absolute path, in case jest is not running in CWD, + // else it will create snapshots with the wrong path + const absDir = path.isAbsolute(dir) ? dir : path.resolve(dir); + + return path.format({ + dir: path.join(absDir, snapshotsDirName), + name, + ext: snapshotExtension, + }); } getSnapshotFileName(context: { fileName?: string; kind: any }) { diff --git a/addons/storyshots/storyshots-core/src/api/StoryshotsOptions.ts b/code/addons/storyshots-core/src/api/StoryshotsOptions.ts similarity index 82% rename from addons/storyshots/storyshots-core/src/api/StoryshotsOptions.ts rename to code/addons/storyshots-core/src/api/StoryshotsOptions.ts index dc5d542feb79..86c3b741a0ad 100644 --- a/addons/storyshots/storyshots-core/src/api/StoryshotsOptions.ts +++ b/code/addons/storyshots-core/src/api/StoryshotsOptions.ts @@ -1,7 +1,7 @@ -import { IOptions } from 'glob'; -import { Stories2SnapsConverter } from '../Stories2SnapsConverter'; -import { SupportedFramework } from '../frameworks'; -import { RenderTree } from '../frameworks/Loader'; +import type { IOptions } from 'glob'; +import type { Stories2SnapsConverter } from '../Stories2SnapsConverter'; +import type { SupportedFramework } from '../frameworks'; +import type { RenderTree } from '../frameworks/Loader'; export interface TestMethodOptions { story: any; diff --git a/addons/storyshots/storyshots-core/src/api/ensureOptionsDefaults.ts b/code/addons/storyshots-core/src/api/ensureOptionsDefaults.ts similarity index 94% rename from addons/storyshots/storyshots-core/src/api/ensureOptionsDefaults.ts rename to code/addons/storyshots-core/src/api/ensureOptionsDefaults.ts index 25adf62c8343..742c85173bb7 100644 --- a/addons/storyshots/storyshots-core/src/api/ensureOptionsDefaults.ts +++ b/code/addons/storyshots-core/src/api/ensureOptionsDefaults.ts @@ -1,6 +1,6 @@ import { snapshotWithOptions } from '../test-bodies'; import { Stories2SnapsConverter } from '../Stories2SnapsConverter'; -import { StoryshotsOptions } from './StoryshotsOptions'; +import type { StoryshotsOptions } from './StoryshotsOptions'; const ignore = ['**/node_modules/**']; const defaultStories2SnapsConverter = new Stories2SnapsConverter(); @@ -25,7 +25,6 @@ function getIntegrityOptions({ integrityOptions }: StoryshotsOptions) { }; } -// @ts-ignore function ensureOptionsDefaults(options: StoryshotsOptions) { const { suite = 'Storyshots', diff --git a/code/addons/storyshots-core/src/api/index.ts b/code/addons/storyshots-core/src/api/index.ts new file mode 100644 index 000000000000..301d5cbf8c36 --- /dev/null +++ b/code/addons/storyshots-core/src/api/index.ts @@ -0,0 +1,109 @@ +import { global } from '@storybook/global'; +import { addons, mockChannel } from '@storybook/preview-api'; +import ensureOptionsDefaults from './ensureOptionsDefaults'; +import snapshotsTests from './snapshotsTestsTemplate'; +import integrityTest from './integrityTestTemplate'; +import loadFramework from '../frameworks/frameworkLoader'; +import type { StoryshotsOptions } from './StoryshotsOptions'; + +const { describe, window: globalWindow } = global; + +type TestMethod = 'beforeAll' | 'beforeEach' | 'afterEach' | 'afterAll'; +const methods: TestMethod[] = ['beforeAll', 'beforeEach', 'afterEach', 'afterAll']; + +function callTestMethodGlobals( + testMethod: { [key in TestMethod]?: Function & { timeout?: number } } & { [key in string]: any } +) { + methods.forEach((method) => { + if (typeof testMethod[method] === 'function') { + // @ts-expect-error (ignore) + global[method](testMethod[method], testMethod[method].timeout); + } + }); +} + +const isDisabled = (parameter: any) => + parameter === false || (parameter && parameter.disable === true); +function testStorySnapshots(options: StoryshotsOptions = {}) { + if (typeof describe !== 'function') { + throw new Error('testStorySnapshots is intended only to be used inside jest'); + } + + addons.setChannel(mockChannel()); + + const { storybook, framework, renderTree, renderShallowTree } = loadFramework(options); + const { + asyncJest, + suite, + storyNameRegex, + storyKindRegex, + stories2snapsConverter, + testMethod, + integrityOptions, + snapshotSerializers, + } = ensureOptionsDefaults(options); + const testMethodParams = { + renderTree, + renderShallowTree, + stories2snapsConverter, + }; + + // NOTE: as the store + preview's initialization process entirely uses + // `SychronousPromise`s in the v6 store case, the callback to the `then()` here + // will run *immediately* (in the same tick), and thus the `snapshotsTests`, and + // subsequent calls to `it()` etc will all happen within this tick, which is required + // by Jest (cannot add tests asynchronously) + globalWindow.__STORYBOOK_STORY_STORE__.initializationPromise.then(() => { + const data = storybook.raw().reduce( + (acc, item) => { + if (storyNameRegex && !item.name.match(storyNameRegex)) { + return acc; + } + + if (storyKindRegex && !item.kind.match(storyKindRegex)) { + return acc; + } + + const { kind, storyFn: render, parameters } = item; + const existing = acc.find((i: any) => i.kind === kind); + const { fileName } = item.parameters; + + if (!isDisabled(parameters.storyshots)) { + if (existing) { + existing.children.push({ ...item, render, fileName }); + } else { + acc.push({ + kind, + children: [{ ...item, render, fileName }], + }); + } + } + return acc; + }, + [] as { + kind: string; + children: any[]; + }[] + ); + + if (data.length) { + callTestMethodGlobals(testMethod); + + snapshotsTests({ + data, + asyncJest, + suite, + framework, + testMethod, + testMethodParams, + snapshotSerializers, + }); + + integrityTest(integrityOptions, stories2snapsConverter); + } else { + throw new Error('storyshots found 0 stories'); + } + }); +} + +export default testStorySnapshots; diff --git a/addons/storyshots/storyshots-core/src/api/integrityTestTemplate.ts b/code/addons/storyshots-core/src/api/integrityTestTemplate.ts similarity index 91% rename from addons/storyshots/storyshots-core/src/api/integrityTestTemplate.ts rename to code/addons/storyshots-core/src/api/integrityTestTemplate.ts index 3a8c0d1c10b1..ad623bea4353 100644 --- a/addons/storyshots/storyshots-core/src/api/integrityTestTemplate.ts +++ b/code/addons/storyshots-core/src/api/integrityTestTemplate.ts @@ -1,8 +1,8 @@ /* eslint-disable jest/no-export */ import fs from 'fs'; import glob from 'glob'; -import global from 'global'; -import dedent from 'ts-dedent'; +import { global } from '@storybook/global'; +import { dedent } from 'ts-dedent'; const { describe, it } = global; @@ -52,7 +52,7 @@ function integrityTest(integrityOptions: any, stories2snapsConverter: any) { const snapshotExtension = stories2snapsConverter.getSnapshotExtension(); const storyshots = glob.sync(`**/*${snapshotExtension}`, integrityOptions); - // @ts-ignore + // @ts-expect-error (ts doesn't 'get' the extension happening on line 9) expect(storyshots).notToBeAbandoned(stories2snapsConverter); }); }); diff --git a/addons/storyshots/storyshots-core/src/api/snapshotsTestsTemplate.ts b/code/addons/storyshots-core/src/api/snapshotsTestsTemplate.ts similarity index 90% rename from addons/storyshots/storyshots-core/src/api/snapshotsTestsTemplate.ts rename to code/addons/storyshots-core/src/api/snapshotsTestsTemplate.ts index b155bd6dce81..1e2ee8cbf9f4 100644 --- a/addons/storyshots/storyshots-core/src/api/snapshotsTestsTemplate.ts +++ b/code/addons/storyshots-core/src/api/snapshotsTestsTemplate.ts @@ -1,6 +1,6 @@ /* eslint-disable jest/no-export */ /* eslint-disable jest/expect-expect */ -import global from 'global'; +import { global } from '@storybook/global'; import { addSerializer } from 'jest-specific-snapshot'; const { describe, it } = global; @@ -11,7 +11,7 @@ function snapshotTest({ item, asyncJest, framework, testMethod, testMethodParams if (asyncJest === true) { it( - name, + `${name}`, () => new Promise((resolve, reject) => testMethod({ @@ -25,7 +25,7 @@ function snapshotTest({ item, asyncJest, framework, testMethod, testMethodParams ); } else { it( - name, + `${name}`, () => testMethod({ story: item, @@ -39,8 +39,8 @@ function snapshotTest({ item, asyncJest, framework, testMethod, testMethodParams function snapshotTestSuite({ item, suite, ...restParams }: any) { const { kind, children } = item; - describe(suite, () => { - describe(kind, () => { + describe(`${suite}`, () => { + describe(`${kind}`, () => { children.forEach((c: any) => { snapshotTest({ item: c, ...restParams }); }); diff --git a/code/addons/storyshots-core/src/frameworks/Loader.ts b/code/addons/storyshots-core/src/frameworks/Loader.ts new file mode 100644 index 000000000000..b7d93898aa1f --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/Loader.ts @@ -0,0 +1,25 @@ +import type { Renderer, Addon_Loadable } from '@storybook/types'; +import type { ClientApi as ClientApiClass } from '@storybook/preview-api'; +import type { StoryshotsOptions } from '../api/StoryshotsOptions'; +import type { SupportedFramework } from './SupportedFramework'; + +export type RenderTree = (story: any, context?: any, options?: any) => any; + +export interface ClientApi extends ClientApiClass { + configure( + loader: Addon_Loadable, + module: NodeModule | false, + showDeprecationWarning?: boolean + ): void; + forceReRender(): void; +} + +export interface Loader { + load: (options: StoryshotsOptions) => { + framework: SupportedFramework; + renderTree: RenderTree; + renderShallowTree: any; + storybook: ClientApi; + }; + test: (options: StoryshotsOptions) => boolean; +} diff --git a/addons/storyshots/storyshots-core/src/frameworks/SupportedFramework.ts b/code/addons/storyshots-core/src/frameworks/SupportedFramework.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/SupportedFramework.ts rename to code/addons/storyshots-core/src/frameworks/SupportedFramework.ts diff --git a/code/addons/storyshots-core/src/frameworks/angular/loader.ts b/code/addons/storyshots-core/src/frameworks/angular/loader.ts new file mode 100644 index 000000000000..7b2406c3c92e --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/angular/loader.ts @@ -0,0 +1,82 @@ +import 'core-js'; +import 'core-js/es/reflect'; +import hasDependency from '../hasDependency'; +import configure from '../configure'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function setupAngularJestPreset() { + // Needed to prevent "Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten." + jest.requireActual('core-js'); + jest.requireActual('core-js/modules/es.promise'); + // jest.requireActual('core-js/es6/reflect'); + // jest.requireActual('core-js/es7/reflect'); + + // Angular + Jest + Storyshots = Crazy Shit: + // We need to require 'jest-preset-angular/build/setupJest' before any storybook code + // is running inside jest - one of the things that `jest-preset-angular/build/setupJest` does is + // extending the `window.Reflect` with all the needed metadata functions, that are required + // for emission of the TS decorations like 'design:paramtypes' + try { + jest.requireActual('jest-preset-angular/build/setupJest'); + } catch (e) { + jest.requireActual('jest-preset-angular/build/setup-jest'); + } +} + +function test(options: StoryshotsOptions): boolean { + return ( + options.framework === 'angular' || (!options.framework && hasDependency('@storybook/angular')) + ); +} + +function load(options: StoryshotsOptions) { + setupAngularJestPreset(); + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/angular', () => { + const renderAPI = jest.requireActual('@storybook/angular'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/angular'); + + configure({ + ...options, + storybook, + }); + + return { + framework: 'angular' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for angular'); + }, + storybook, + }; +} + +const angularLoader: Loader = { + load, + test, +}; + +export default angularLoader; diff --git a/addons/storyshots/storyshots-core/src/frameworks/angular/renderTree.ts b/code/addons/storyshots-core/src/frameworks/angular/renderTree.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/angular/renderTree.ts rename to code/addons/storyshots-core/src/frameworks/angular/renderTree.ts diff --git a/addons/storyshots/storyshots-core/src/frameworks/angular/types.ts b/code/addons/storyshots-core/src/frameworks/angular/types.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/angular/types.ts rename to code/addons/storyshots-core/src/frameworks/angular/types.ts diff --git a/addons/storyshots/storyshots-core/src/frameworks/configure.test.ts b/code/addons/storyshots-core/src/frameworks/configure.test.ts similarity index 95% rename from addons/storyshots/storyshots-core/src/frameworks/configure.test.ts rename to code/addons/storyshots-core/src/frameworks/configure.test.ts index 509aa5a13b24..0e4377e9dede 100644 --- a/addons/storyshots/storyshots-core/src/frameworks/configure.test.ts +++ b/code/addons/storyshots-core/src/frameworks/configure.test.ts @@ -2,7 +2,7 @@ import path from 'path'; import { getPreviewFile, getMainFile } from './configure'; // eslint-disable-next-line global-require, jest/no-mocks-import -jest.mock('fs', () => require('../../../../../__mocks__/fs')); +jest.mock('fs', () => require('../../../../__mocks__/fs')); const setupFiles = (files: Record) => { // eslint-disable-next-line no-underscore-dangle, global-require require('fs').__setMockFiles(files); diff --git a/code/addons/storyshots-core/src/frameworks/configure.ts b/code/addons/storyshots-core/src/frameworks/configure.ts new file mode 100644 index 000000000000..ec54eedab1e7 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/configure.ts @@ -0,0 +1,155 @@ +import fs from 'fs'; +import path from 'path'; +import type { + Renderer, + ArgsEnhancer, + ArgTypesEnhancer, + NormalizedStoriesSpecifier, + StoriesEntry, + DecoratorFunction, +} from '@storybook/types'; +import { toRequireContext } from '@storybook/core-webpack'; +import { normalizeStoriesEntry } from '@storybook/core-common'; +import registerRequireContextHook from '@storybook/babel-plugin-require-context-hook/register'; +import { global } from '@storybook/global'; + +import type { ClientApi } from './Loader'; +import type { StoryshotsOptions } from '../api/StoryshotsOptions'; + +registerRequireContextHook(); + +const isFile = (file: string): boolean => { + try { + return fs.lstatSync(file).isFile(); + } catch (e) { + return false; + } +}; + +interface Output { + features?: Record; + preview?: string; + stories?: NormalizedStoriesSpecifier[]; + requireContexts?: string[]; +} + +const supportedExtensions = ['ts', 'tsx', 'js', 'jsx', 'cjs', 'mjs']; + +const resolveFile = (configDir: string, supportedFilenames: string[]) => + supportedFilenames + .flatMap((filename) => + supportedExtensions.map((ext) => path.join(configDir, `${filename}.${ext}`)) + ) + .find(isFile) || false; + +export const getPreviewFile = (configDir: string): string | false => + resolveFile(configDir, ['preview', 'config']); + +export const getMainFile = (configDir: string): string | false => resolveFile(configDir, ['main']); + +function getConfigPathParts(input: string): Output { + const configDir = path.resolve(input); + + if (fs.lstatSync(configDir).isDirectory()) { + const output: Output = {}; + + const preview = getPreviewFile(configDir); + const main = getMainFile(configDir); + + if (preview) { + output.preview = preview; + } + if (main) { + const { stories = [], features = {} } = jest.requireActual(main); + + output.features = features; + + const workingDir = process.cwd(); + output.stories = stories.map((entry: StoriesEntry) => { + const specifier = normalizeStoriesEntry(entry, { + configDir, + workingDir, + }); + + return specifier; + }); + output.requireContexts = output.stories.map((specifier) => { + const { path: basePath, recursive, match } = toRequireContext(specifier); + + // eslint-disable-next-line no-underscore-dangle + return global.__requireContext(workingDir, basePath, recursive, match); + }); + } + + return output; + } + + return { preview: configDir }; +} + +function configure( + options: { + storybook: ClientApi; + } & StoryshotsOptions +): void { + const { configPath = '.storybook', config, storybook } = options; + + if (config && typeof config === 'function') { + config(storybook); + return; + } + + const { + preview, + features = {}, + stories = [], + requireContexts = [], + } = getConfigPathParts(configPath); + + global.FEATURES = features; + global.STORIES = stories.map((specifier) => ({ + ...specifier, + importPathMatcher: specifier.importPathMatcher.source, + })); + + if (preview) { + // This is essentially the same code as lib/builder-webpack5/templates/virtualModuleEntry.template + const { + parameters, + decorators, + globals, + globalTypes, + argsEnhancers, + argTypesEnhancers, + runStep, + } = jest.requireActual(preview); + + if (decorators) { + decorators.forEach((decorator: DecoratorFunction) => + storybook.addDecorator(decorator) + ); + } + if (parameters || globals || globalTypes) { + storybook.addParameters({ ...parameters, globals, globalTypes }); + } + if (runStep) { + storybook.addStepRunner(runStep); + } + if (argsEnhancers) { + argsEnhancers.forEach((enhancer: ArgsEnhancer) => + storybook.addArgsEnhancer(enhancer as any) + ); + } + if (argTypesEnhancers) { + argTypesEnhancers.forEach((enhancer: ArgTypesEnhancer) => + storybook.addArgTypesEnhancer(enhancer as any) + ); + } + } + + if (requireContexts && requireContexts.length) { + storybook.configure(requireContexts, false, false); + } +} + +export default configure; diff --git a/code/addons/storyshots-core/src/frameworks/frameworkLoader.ts b/code/addons/storyshots-core/src/frameworks/frameworkLoader.ts new file mode 100644 index 000000000000..6589df427390 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/frameworkLoader.ts @@ -0,0 +1,48 @@ +/* eslint-disable global-require,import/no-dynamic-require */ +import fs from 'fs'; +import path from 'path'; +import type { Loader } from './Loader'; +import type { StoryshotsOptions } from '../api/StoryshotsOptions'; + +const loaderScriptName = 'loader.js'; + +const isDirectory = (source: string) => fs.lstatSync(source).isDirectory(); + +function getLoaders(): Loader[] { + return fs + .readdirSync(__dirname) + .map((name) => path.join(__dirname, name)) + .filter(isDirectory) + .map((framework) => { + const pa = path.join(framework, loaderScriptName); + const pb = path.join(framework, 'loader.ts'); + + if (fs.existsSync(pa)) { + return pa; + } + + if (fs.existsSync(pb)) { + return pb; + } + + return null; + }) + .filter(Boolean) + .map((loader) => require(loader).default); +} + +function loadFramework(options: StoryshotsOptions) { + const loaders = getLoaders(); + + const loader = loaders.find((frameworkLoader) => frameworkLoader.test(options)); + + if (!loader) { + throw new Error( + "Couldn't find an appropriate framework loader -- do you need to set the `framework` option?" + ); + } + + return loader.load(options); +} + +export default loadFramework; diff --git a/addons/storyshots/storyshots-core/src/frameworks/hasDependency.ts b/code/addons/storyshots-core/src/frameworks/hasDependency.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/hasDependency.ts rename to code/addons/storyshots-core/src/frameworks/hasDependency.ts diff --git a/code/addons/storyshots-core/src/frameworks/html/loader.ts b/code/addons/storyshots-core/src/frameworks/html/loader.ts new file mode 100644 index 000000000000..df86afc1961e --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/html/loader.ts @@ -0,0 +1,59 @@ +import { global } from '@storybook/global'; +import configure from '../configure'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function test(options: StoryshotsOptions): boolean { + return options.framework === 'html'; +} + +function load(options: StoryshotsOptions) { + global.STORYBOOK_ENV = 'html'; + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/html', () => { + const renderAPI = jest.requireActual('@storybook/html'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/html'); + + configure({ + ...options, + storybook, + }); + + return { + framework: 'html' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for HTML'); + }, + storybook, + }; +} + +const htmLoader: Loader = { + load, + test, +}; + +export default htmLoader; diff --git a/code/addons/storyshots-core/src/frameworks/html/renderTree.ts b/code/addons/storyshots-core/src/frameworks/html/renderTree.ts new file mode 100644 index 000000000000..2347acb15867 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/html/renderTree.ts @@ -0,0 +1,22 @@ +import { global } from '@storybook/global'; + +const { document, Node } = global; + +function getRenderedTree(story: { render: () => any }) { + const component = story.render(); + + if (component instanceof Node) { + return component; + } + + const section: HTMLElement = document.createElement('section'); + section.innerHTML = component; + + if (section.childElementCount > 1) { + return section; + } + + return section.firstChild; +} + +export default getRenderedTree; diff --git a/addons/storyshots/storyshots-core/src/frameworks/index.ts b/code/addons/storyshots-core/src/frameworks/index.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/index.ts rename to code/addons/storyshots-core/src/frameworks/index.ts diff --git a/code/addons/storyshots-core/src/frameworks/preact/loader.ts b/code/addons/storyshots-core/src/frameworks/preact/loader.ts new file mode 100644 index 000000000000..b938dac3f928 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/preact/loader.ts @@ -0,0 +1,65 @@ +/** @jsxRuntime classic */ +/** @jsx h */ + +import { global } from '@storybook/global'; +import configure from '../configure'; +import hasDependency from '../hasDependency'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function test(options: StoryshotsOptions): boolean { + return ( + options.framework === 'preact' || (!options.framework && hasDependency('@storybook/preact')) + ); +} + +function load(options: StoryshotsOptions) { + global.STORYBOOK_ENV = 'preact'; + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/preact', () => { + const renderAPI = jest.requireActual('@storybook/preact'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/preact'); + + configure({ + ...options, + storybook, + }); + + return { + framework: 'preact' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for preact'); + }, + storybook, + }; +} + +const preactLoader: Loader = { + load, + test, +}; + +export default preactLoader; diff --git a/addons/storyshots/storyshots-core/src/frameworks/preact/renderTree.ts b/code/addons/storyshots-core/src/frameworks/preact/renderTree.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/preact/renderTree.ts rename to code/addons/storyshots-core/src/frameworks/preact/renderTree.ts diff --git a/code/addons/storyshots-core/src/frameworks/rax/loader.ts b/code/addons/storyshots-core/src/frameworks/rax/loader.ts new file mode 100644 index 000000000000..178ef3c1d7b5 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/rax/loader.ts @@ -0,0 +1,60 @@ +import { global } from '@storybook/global'; +import configure from '../configure'; +import hasDependency from '../hasDependency'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function test(options: StoryshotsOptions): boolean { + return options.framework === 'rax' || (!options.framework && hasDependency('@storybook/rax')); +} + +function load(options: StoryshotsOptions) { + global.STORYBOOK_ENV = 'rax'; + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/rax', () => { + const renderAPI = jest.requireActual('@storybook/rax'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/rax'); + + configure({ + ...options, + storybook, + }); + + return { + framework: 'rax' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for rax'); + }, + storybook, + }; +} + +const raxLoader: Loader = { + load, + test, +}; + +export default raxLoader; diff --git a/addons/storyshots/storyshots-core/src/frameworks/rax/renderTree.ts b/code/addons/storyshots-core/src/frameworks/rax/renderTree.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/rax/renderTree.ts rename to code/addons/storyshots-core/src/frameworks/rax/renderTree.ts diff --git a/code/addons/storyshots-core/src/frameworks/react-native/loader.ts b/code/addons/storyshots-core/src/frameworks/react-native/loader.ts new file mode 100644 index 000000000000..7c0e51d23f0f --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/react-native/loader.ts @@ -0,0 +1,44 @@ +/* eslint-disable global-require */ +import path from 'path'; +import hasDependency from '../hasDependency'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function test(options: StoryshotsOptions): boolean { + return ( + options.framework === 'react-native' || + (!options.framework && hasDependency('@storybook/react-native')) + ); +} + +function configure(options: StoryshotsOptions, storybook: any) { + const { configPath = 'storybook', config } = options; + + if (config && typeof config === 'function') { + config(storybook); + return; + } + + const resolvedConfigPath = path.resolve(configPath); + jest.requireActual(resolvedConfigPath); +} + +function load(options: StoryshotsOptions) { + const storybook = jest.requireActual('@storybook/react-native'); + + configure(options, storybook); + + return { + renderTree: require('../react/renderTree').default, + renderShallowTree: require('../react/renderShallowTree').default, + framework: 'react-native' as const, + storybook, + }; +} + +const reactNativeLoader: Loader = { + load, + test, +}; + +export default reactNativeLoader; diff --git a/code/addons/storyshots-core/src/frameworks/react/loader.ts b/code/addons/storyshots-core/src/frameworks/react/loader.ts new file mode 100644 index 000000000000..35d62098d183 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/react/loader.ts @@ -0,0 +1,55 @@ +import configure from '../configure'; +import hasDependency from '../hasDependency'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function test(options: StoryshotsOptions): boolean { + return options.framework === 'react' || (!options.framework && hasDependency('@storybook/react')); +} + +function load(options: StoryshotsOptions) { + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/react', () => { + const renderAPI = jest.requireActual('@storybook/react'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/react'); + + configure({ + ...options, + storybook, + }); + + return { + framework: 'react' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: jest.requireActual('./renderShallowTree').default, + storybook, + }; +} + +const reactLoader: Loader = { + load, + test, +}; + +export default reactLoader; diff --git a/addons/storyshots/storyshots-core/src/frameworks/react/renderShallowTree.ts b/code/addons/storyshots-core/src/frameworks/react/renderShallowTree.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/react/renderShallowTree.ts rename to code/addons/storyshots-core/src/frameworks/react/renderShallowTree.ts diff --git a/addons/storyshots/storyshots-core/src/frameworks/react/renderTree.ts b/code/addons/storyshots-core/src/frameworks/react/renderTree.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/react/renderTree.ts rename to code/addons/storyshots-core/src/frameworks/react/renderTree.ts diff --git a/code/addons/storyshots-core/src/frameworks/riot/loader.ts b/code/addons/storyshots-core/src/frameworks/riot/loader.ts new file mode 100644 index 000000000000..598bfc300601 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/riot/loader.ts @@ -0,0 +1,65 @@ +import { global } from '@storybook/global'; +import hasDependency from '../hasDependency'; +import configure from '../configure'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function mockRiotToIncludeCompiler() { + jest.mock('riot', () => jest.requireActual('riot/riot.js')); +} + +function test(options: StoryshotsOptions): boolean { + return options.framework === 'riot' || (!options.framework && hasDependency('@storybook/riot')); +} + +function load(options: StoryshotsOptions) { + global.STORYBOOK_ENV = 'riot'; + mockRiotToIncludeCompiler(); + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/riot', () => { + const renderAPI = jest.requireActual('@storybook/riot'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/riot'); + + configure({ + ...options, + storybook, + }); + + return { + framework: 'riot' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for riot'); + }, + storybook, + }; +} + +const riotLoader: Loader = { + load, + test, +}; + +export default riotLoader; diff --git a/code/addons/storyshots-core/src/frameworks/riot/renderTree.ts b/code/addons/storyshots-core/src/frameworks/riot/renderTree.ts new file mode 100644 index 000000000000..085065635acf --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/riot/renderTree.ts @@ -0,0 +1,36 @@ +import { global } from '@storybook/global'; + +const { document } = global; + +const riotForStorybook = jest.requireActual('@storybook/riot'); + +function bootstrapADocumentAndReturnANode() { + const rootElement = document.createElement('div'); + rootElement.id = 'storybook-root'; + document.body = document.createElement('body'); + document.body.appendChild(rootElement); + return rootElement; +} + +function makeSureThatResultIsRenderedSomehow({ context, result, rootElement }: any) { + if (!rootElement.firstChild) { + const { kind, name } = context; + riotForStorybook.render({ + storyFn: () => result, + kind, + name, + }); + } +} + +function getRenderedTree(story: any, context: any) { + const rootElement = bootstrapADocumentAndReturnANode(); + + const result = story.render(); + + makeSureThatResultIsRenderedSomehow({ context, result, rootElement }); + + return rootElement; +} + +export default getRenderedTree; diff --git a/code/addons/storyshots-core/src/frameworks/svelte/loader.ts b/code/addons/storyshots-core/src/frameworks/svelte/loader.ts new file mode 100644 index 000000000000..5bd09594013c --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/svelte/loader.ts @@ -0,0 +1,61 @@ +import { global } from '@storybook/global'; +import hasDependency from '../hasDependency'; +import configure from '../configure'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function test(options: StoryshotsOptions): boolean { + return ( + options.framework === 'svelte' || (!options.framework && hasDependency('@storybook/svelte')) + ); +} + +function load(options: StoryshotsOptions) { + global.STORYBOOK_ENV = 'svelte'; + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/svelte', () => { + const renderAPI = jest.requireActual('@storybook/svelte'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/svelte'); + + configure({ + ...options, + storybook, + }); + return { + framework: 'svelte' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for svelte'); + }, + storybook, + }; +} + +const svelteLoader: Loader = { + load, + test, +}; + +export default svelteLoader; diff --git a/code/addons/storyshots-core/src/frameworks/svelte/renderTree.ts b/code/addons/storyshots-core/src/frameworks/svelte/renderTree.ts new file mode 100644 index 000000000000..78c19bd1ab66 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/svelte/renderTree.ts @@ -0,0 +1,38 @@ +import { global } from '@storybook/global'; +import { set_current_component } from 'svelte/internal'; + +const { document } = global; + +/** + * Provides functionality to convert your raw story to the resulting markup. + * + * Storybook snapshots need the rendered markup that svelte outputs, + * but since we only have the story config data ({ Component, data }) in + * the Svelte stories, we need to mount the component, and then return the + * resulting HTML. + * + * If we don't render to HTML, we will get a snapshot of the raw story + * i.e. ({ Component, data }). + */ +function getRenderedTree(story: any) { + // allow setContext to work + set_current_component({ $$: { context: new Map() } }); + + const { Component, props } = story.render(); + + const DefaultCompatComponent = Component.default || Component; + + // We need to create a target to mount onto. + const target = document.createElement('section'); + + // eslint-disable-next-line no-new + new DefaultCompatComponent({ target, props }); + + // Classify the target so that it is clear where the markup + // originates from, and that it is specific for snapshot tests. + target.className = 'storybook-snapshot-container'; + + return target; +} + +export default getRenderedTree; diff --git a/code/addons/storyshots-core/src/frameworks/vue/loader.ts b/code/addons/storyshots-core/src/frameworks/vue/loader.ts new file mode 100644 index 000000000000..a29a88a2d98b --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/vue/loader.ts @@ -0,0 +1,64 @@ +import { global } from '@storybook/global'; +import hasDependency from '../hasDependency'; +import configure from '../configure'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function mockVueToIncludeCompiler() { + jest.mock('vue', () => jest.requireActual('vue/dist/vue.common.js')); +} + +function test(options: StoryshotsOptions): boolean { + return options.framework === 'vue' || (!options.framework && hasDependency('@storybook/vue')); +} + +function load(options: StoryshotsOptions) { + global.STORYBOOK_ENV = 'vue'; + mockVueToIncludeCompiler(); + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/vue', () => { + const renderAPI = jest.requireActual('@storybook/vue'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/vue'); + + configure({ + ...options, + storybook, + }); + return { + framework: 'vue' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for vue'); + }, + storybook, + }; +} + +const vueLoader: Loader = { + load, + test, +}; + +export default vueLoader; diff --git a/code/addons/storyshots-core/src/frameworks/vue/renderTree.ts b/code/addons/storyshots-core/src/frameworks/vue/renderTree.ts new file mode 100644 index 000000000000..d37139e813ea --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/vue/renderTree.ts @@ -0,0 +1,25 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +import Vue from 'vue'; + +// this is defined in @storybook/vue but not exported, +// and we need it to inject args into the story component's props +const VALUES = 'STORYBOOK_VALUES'; + +function getRenderedTree(story: any) { + const component = story.render(); + + // @ts-ignore FIXME storyshots type error + const vm = new Vue({ + // @ts-ignore FIXME storyshots type error + render(h) { + return h(component); + }, + }); + + // @ts-ignore FIXME storyshots type error + vm[VALUES] = story.initialArgs; + + return vm.$mount().$el; +} + +export default getRenderedTree; diff --git a/code/addons/storyshots-core/src/frameworks/vue3/loader.ts b/code/addons/storyshots-core/src/frameworks/vue3/loader.ts new file mode 100644 index 000000000000..3fed6869e1a2 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/vue3/loader.ts @@ -0,0 +1,60 @@ +import { global } from '@storybook/global'; +import hasDependency from '../hasDependency'; +import configure from '../configure'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function test(options: StoryshotsOptions): boolean { + return options.framework === 'vue3' || (!options.framework && hasDependency('@storybook/vue3')); +} + +function load(options: StoryshotsOptions) { + global.STORYBOOK_ENV = 'vue3'; + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/vue3', () => { + const renderAPI = jest.requireActual('@storybook/vue3'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/vue3'); + + configure({ + ...options, + storybook, + }); + + return { + framework: 'vue3' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for Vue 3'); + }, + storybook, + }; +} + +const vueLoader: Loader = { + load, + test, +}; + +export default vueLoader; diff --git a/code/addons/storyshots-core/src/frameworks/vue3/renderTree.ts b/code/addons/storyshots-core/src/frameworks/vue3/renderTree.ts new file mode 100644 index 000000000000..854cb485b3c1 --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/vue3/renderTree.ts @@ -0,0 +1,23 @@ +import * as Vue from 'vue'; +import { global } from '@storybook/global'; + +const { document } = global; + +// This is cast as `any` to workaround type errors caused by Vue 2 types +const { h, createApp } = Vue as any; + +function getRenderedTree(story: any) { + const component = story.render(); + + const app = createApp({ + render() { + return h(component, story.args); + }, + }); + + const vm = app.mount(document.createElement('div')); + vm.$forceUpdate(); + return vm.$el; +} + +export default getRenderedTree; diff --git a/code/addons/storyshots-core/src/frameworks/web-components/loader.ts b/code/addons/storyshots-core/src/frameworks/web-components/loader.ts new file mode 100644 index 000000000000..e3536d85d99d --- /dev/null +++ b/code/addons/storyshots-core/src/frameworks/web-components/loader.ts @@ -0,0 +1,59 @@ +import { global } from '@storybook/global'; +import configure from '../configure'; +import type { Loader } from '../Loader'; +import type { StoryshotsOptions } from '../../api/StoryshotsOptions'; + +function test(options: StoryshotsOptions): boolean { + return options.framework === 'web-components'; +} + +function load(options: StoryshotsOptions) { + global.STORYBOOK_ENV = 'web-components'; + + let mockStartedAPI: any; + + jest.mock('@storybook/preview-api', () => { + const previewAPI = jest.requireActual('@storybook/preview-api'); + + return { + ...previewAPI, + start: (...args: any[]) => { + mockStartedAPI = previewAPI.start(...args); + return mockStartedAPI; + }, + }; + }); + + jest.mock('@storybook/html', () => { + const renderAPI = jest.requireActual('@storybook/html'); + + renderAPI.addDecorator = mockStartedAPI.clientApi.addDecorator; + renderAPI.addParameters = mockStartedAPI.clientApi.addParameters; + + return renderAPI; + }); + + // eslint-disable-next-line global-require + const storybook = require('@storybook/html'); + + configure({ + ...options, + storybook, + }); + + return { + framework: 'web-components' as const, + renderTree: jest.requireActual('./renderTree').default, + renderShallowTree: () => { + throw new Error('Shallow renderer is not supported for web-components'); + }, + storybook, + }; +} + +const webComponentsLoader: Loader = { + load, + test, +}; + +export default webComponentsLoader; diff --git a/addons/storyshots/storyshots-core/src/frameworks/web-components/renderTree.ts b/code/addons/storyshots-core/src/frameworks/web-components/renderTree.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/frameworks/web-components/renderTree.ts rename to code/addons/storyshots-core/src/frameworks/web-components/renderTree.ts diff --git a/addons/storyshots/storyshots-core/src/index.ts b/code/addons/storyshots-core/src/index.ts similarity index 100% rename from addons/storyshots/storyshots-core/src/index.ts rename to code/addons/storyshots-core/src/index.ts diff --git a/addons/storyshots/storyshots-core/src/test-bodies.ts b/code/addons/storyshots-core/src/test-bodies.ts similarity index 99% rename from addons/storyshots/storyshots-core/src/test-bodies.ts rename to code/addons/storyshots-core/src/test-bodies.ts index b24b45826683..a4292fd41df3 100644 --- a/addons/storyshots/storyshots-core/src/test-bodies.ts +++ b/code/addons/storyshots-core/src/test-bodies.ts @@ -1,5 +1,5 @@ import 'jest-specific-snapshot'; -import { +import type { StoryshotsTestMethod, TestMethodOptions, StoryshotsOptions, diff --git a/code/addons/storyshots-core/src/typings.d.ts b/code/addons/storyshots-core/src/typings.d.ts new file mode 100644 index 000000000000..8a3b5786945d --- /dev/null +++ b/code/addons/storyshots-core/src/typings.d.ts @@ -0,0 +1,14 @@ +/* eslint-disable no-underscore-dangle */ +/* eslint-disable @typescript-eslint/naming-convention */ +declare module 'jest-preset-angular/*'; +declare module 'preact-render-to-string/jsx'; +declare module 'react-test-renderer*'; +declare module 'rax-test-renderer*'; + +declare module '@storybook/babel-plugin-require-context-hook/register'; + +declare var STORYBOOK_ENV: any; +declare var STORIES: any; +declare var FEATURES: any; +declare var __STORYBOOK_STORY_STORE__: any; +declare var __requireContext: any; diff --git a/code/addons/storyshots-core/stories/__snapshots__/storyshot.enzyme.test.js.snap b/code/addons/storyshots-core/stories/__snapshots__/storyshot.enzyme.test.js.snap new file mode 100644 index 000000000000..984165bef39c --- /dev/null +++ b/code/addons/storyshots-core/stories/__snapshots__/storyshot.enzyme.test.js.snap @@ -0,0 +1,56 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Another Button with some emoji 1`] = ` + +
    + prefix + + + + + + suffix +
    +
    +`; + +exports[`Storyshots Another Button with text 1`] = ` + +
    + prefix + + + + + + suffix +
    +
    +`; + +exports[`Storyshots Text Simple 1`] = ` + +
    + prefix + + + contents + + + suffix +
    +
    +`; diff --git a/code/addons/storyshots-core/stories/__snapshots__/storyshot.metadata.test.js.snap b/code/addons/storyshots-core/stories/__snapshots__/storyshot.metadata.test.js.snap new file mode 100644 index 000000000000..42d99ae740ca --- /dev/null +++ b/code/addons/storyshots-core/stories/__snapshots__/storyshot.metadata.test.js.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Another Button with some emoji 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Another Button with text 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Text Simple 1`] = ` +
    + prefix + + contents + + suffix +
    +`; diff --git a/code/addons/storyshots-core/stories/__snapshots__/storyshot.shallow.test.js.snap b/code/addons/storyshots-core/stories/__snapshots__/storyshot.shallow.test.js.snap new file mode 100644 index 000000000000..d7def107120a --- /dev/null +++ b/code/addons/storyshots-core/stories/__snapshots__/storyshot.shallow.test.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Another Button with some emoji 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Another Button with text 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Text Simple 1`] = ` +
    + prefix + + + + suffix +
    +`; diff --git a/code/addons/storyshots-core/stories/__snapshots__/storyshot.shallowWithOptions.test.js.snap b/code/addons/storyshots-core/stories/__snapshots__/storyshot.shallowWithOptions.test.js.snap new file mode 100644 index 000000000000..d7def107120a --- /dev/null +++ b/code/addons/storyshots-core/stories/__snapshots__/storyshot.shallowWithOptions.test.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Another Button with some emoji 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Another Button with text 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Text Simple 1`] = ` +
    + prefix + + + + suffix +
    +`; diff --git a/code/addons/storyshots-core/stories/__snapshots__/storyshot.snapshotWithOptionsFunction.test.js.snap b/code/addons/storyshots-core/stories/__snapshots__/storyshot.snapshotWithOptionsFunction.test.js.snap new file mode 100644 index 000000000000..42d99ae740ca --- /dev/null +++ b/code/addons/storyshots-core/stories/__snapshots__/storyshot.snapshotWithOptionsFunction.test.js.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Another Button with some emoji 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Another Button with text 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Text Simple 1`] = ` +
    + prefix + + contents + + suffix +
    +`; diff --git a/code/addons/storyshots-core/stories/exported_metadata/Async.stories.jsx b/code/addons/storyshots-core/stories/exported_metadata/Async.stories.jsx new file mode 100644 index 000000000000..f469d8b2a638 --- /dev/null +++ b/code/addons/storyshots-core/stories/exported_metadata/Async.stories.jsx @@ -0,0 +1,34 @@ +import React from 'react'; + +export const EXPECTED_VALUE = 'THIS IS SO DONE'; +export const TIMEOUT = 5; + +class AsyncTestComponent extends React.Component { + constructor(props) { + super(props); + this.state = { + value: '', + }; + } + + componentDidMount() { + setTimeout(() => { + this.setState({ + value: EXPECTED_VALUE, + }); + }, TIMEOUT); + } + + render() { + const { value } = this.state; + return

    {value}

    ; + } +} + +export default { + title: 'Async', + includeStories: ['WithTimeout'], +}; + +export const WithTimeout = () => ; +WithTimeout.storyName = `with ${TIMEOUT}ms timeout simulating async operation`; diff --git a/code/addons/storyshots-core/stories/exported_metadata/Extra.stories.jsx b/code/addons/storyshots-core/stories/exported_metadata/Extra.stories.jsx new file mode 100644 index 000000000000..4886a1c158f7 --- /dev/null +++ b/code/addons/storyshots-core/stories/exported_metadata/Extra.stories.jsx @@ -0,0 +1,15 @@ +/* eslint-disable react/button-has-type */ +import React from 'react'; + +import { storiesOf } from '@storybook/react'; +import { action } from '@storybook/addon-actions'; + +storiesOf('Another Button', module) + .add('with text', () => ) + .add('with some emoji', () => ( + + )); diff --git a/addons/storyshots/storyshots-core/stories/exported_metadata/Text.stories.js b/code/addons/storyshots-core/stories/exported_metadata/Text.stories.jsx similarity index 100% rename from addons/storyshots/storyshots-core/stories/exported_metadata/Text.stories.js rename to code/addons/storyshots-core/stories/exported_metadata/Text.stories.jsx diff --git a/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories.storyshot b/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories.storyshot new file mode 100644 index 000000000000..841630b0fc01 --- /dev/null +++ b/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories.storyshot @@ -0,0 +1,34 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Another Button with some emoji 1`] = ` +
    + prefix + + + + suffix +
    +`; + +exports[`Storyshots Another Button with text 1`] = ` +
    + prefix + + + + suffix +
    +`; diff --git a/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories@Another-_-Button@with-_-some-_-emoji.boo b/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories@Another-_-Button@with-_-some-_-emoji.boo new file mode 100644 index 000000000000..a1027859204f --- /dev/null +++ b/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories@Another-_-Button@with-_-some-_-emoji.boo @@ -0,0 +1,14 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Another Button with some emoji 1`] = ` + +`; diff --git a/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories@Another-_-Button@with-_-text.boo b/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories@Another-_-Button@with-_-text.boo new file mode 100644 index 000000000000..e344c7924619 --- /dev/null +++ b/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Extra.stories@Another-_-Button@with-_-text.boo @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Another Button with text 1`] = ` + +`; diff --git a/addons/storyshots/storyshots-core/stories/__snapshots__/storyshot.metadata.test.js.snap b/code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Text.stories.storyshot similarity index 100% rename from addons/storyshots/storyshots-core/stories/__snapshots__/storyshot.metadata.test.js.snap rename to code/addons/storyshots-core/stories/exported_metadata/__snapshots__/Text.stories.storyshot diff --git a/code/addons/storyshots-core/stories/exported_metadata/main.js b/code/addons/storyshots-core/stories/exported_metadata/main.js new file mode 100644 index 000000000000..fbb87ec1dfc5 --- /dev/null +++ b/code/addons/storyshots-core/stories/exported_metadata/main.js @@ -0,0 +1,3 @@ +module.exports = { + stories: ['./Text.stories.jsx', './Extra.stories.jsx'], +}; diff --git a/code/addons/storyshots-core/stories/exported_metadata/preview.jsx b/code/addons/storyshots-core/stories/exported_metadata/preview.jsx new file mode 100644 index 000000000000..54fec6401462 --- /dev/null +++ b/code/addons/storyshots-core/stories/exported_metadata/preview.jsx @@ -0,0 +1,15 @@ +/* eslint-disable react/prop-types */ +import React from 'react'; + +const Container = ({ children }) =>
    {children}
    ; + +export const decorators = [ + (StoryFn, { parameters, globals }) => ( + + {parameters.prefix} {globals.suffix} + + ), +]; + +export const parameters = { prefix: 'prefix' }; +export const globals = { suffix: 'suffix' }; diff --git a/code/addons/storyshots-core/stories/storyshot.async.test.js b/code/addons/storyshots-core/stories/storyshot.async.test.js new file mode 100644 index 000000000000..a4f13e34ddc6 --- /dev/null +++ b/code/addons/storyshots-core/stories/storyshot.async.test.js @@ -0,0 +1,41 @@ +import path from 'path'; +import { render, screen, waitFor } from '@testing-library/react'; +import initStoryshots, { Stories2SnapsConverter } from '../src'; +import { EXPECTED_VALUE } from './exported_metadata/Async.stories.jsx'; + +initStoryshots({ + asyncJest: true, + framework: 'react', + integrityOptions: false, + configPath: path.join(__dirname, 'exported_metadata'), + + // When async is true we need to provide a test method that + // calls done() when at the end of the test method + test: async ({ story, context, done }) => { + expect(done).toBeDefined(); + + // This is a storyOf Async (see ./required_with_context/Async.stories) + if (context.kind === 'Async') { + const converter = new Stories2SnapsConverter({ snapshotExtension: '.async.storyshot' }); + const snapshotFilename = converter.getSnapshotFileName(context); + const storyElement = story.render(); + + // Mount the component + const { container } = render(storyElement); + + // The Async component should not contain the expected value + expect(screen.queryByText(EXPECTED_VALUE)).toBeFalsy(); + + await waitFor(() => { + expect(screen.getByText(EXPECTED_VALUE)).toBeInTheDocument(); + expect(container.firstChild).toMatchSpecificSnapshot(snapshotFilename); + }); + + // finally mark test as done + done(); + } else { + // If not async, mark the test as done + done(); + } + }, +}); diff --git a/addons/storyshots/storyshots-core/stories/storyshot.configFunc.test.js b/code/addons/storyshots-core/stories/storyshot.configFunc.test.js similarity index 81% rename from addons/storyshots/storyshots-core/stories/storyshot.configFunc.test.js rename to code/addons/storyshots-core/stories/storyshot.configFunc.test.js index 28a37a20acb3..346c581207b9 100644 --- a/addons/storyshots/storyshots-core/stories/storyshot.configFunc.test.js +++ b/code/addons/storyshots-core/stories/storyshot.configFunc.test.js @@ -1,5 +1,7 @@ import path from 'path'; -import initStoryshots, { multiSnapshotWithOptions, Stories2SnapsConverter } from '../dist/ts3.9'; +import initStoryshots, { multiSnapshotWithOptions, Stories2SnapsConverter } from '../src'; + +/* deprecated and will be removed in Storybook 8.0 */ class AnotherStories2SnapsConverter extends Stories2SnapsConverter { getSnapshotFileName(context) { @@ -36,9 +38,13 @@ initStoryshots({ integrityOptions: { cwd: __dirname }, stories2snapsConverter: new AnotherStories2SnapsConverter({ snapshotExtension: '.boo' }), config: ({ configure }) => - configure(() => { - // eslint-disable-next-line global-require - require('./directly_required'); - }, module), + configure( + () => { + // eslint-disable-next-line global-require + require('./exported_metadata/Extra.stories.jsx'); + }, + module, + false + ), test: multiSnapshotWithOptions(), }); diff --git a/code/addons/storyshots-core/stories/storyshot.enzyme.test.js b/code/addons/storyshots-core/stories/storyshot.enzyme.test.js new file mode 100644 index 000000000000..afaaf9b3b537 --- /dev/null +++ b/code/addons/storyshots-core/stories/storyshot.enzyme.test.js @@ -0,0 +1,13 @@ +import path from 'path'; +import { mount, configure } from 'enzyme'; +// @ts-expect-error (Converted from ts-ignore) +import Adapter from 'enzyme-adapter-react-16'; +import initStoryshots from '../src'; + +configure({ adapter: new Adapter() }); + +initStoryshots({ + framework: 'react', + configPath: path.join(__dirname, 'exported_metadata'), + renderer: mount, +}); diff --git a/addons/storyshots/storyshots-core/stories/storyshot.metadata.test.js b/code/addons/storyshots-core/stories/storyshot.metadata.test.js similarity index 79% rename from addons/storyshots/storyshots-core/stories/storyshot.metadata.test.js rename to code/addons/storyshots-core/stories/storyshot.metadata.test.js index d12366fee7a9..971390d2b513 100644 --- a/addons/storyshots/storyshots-core/stories/storyshot.metadata.test.js +++ b/code/addons/storyshots-core/stories/storyshot.metadata.test.js @@ -1,5 +1,5 @@ import path from 'path'; -import initStoryshots from '../dist/ts3.9'; +import initStoryshots from '../src'; // jest.mock('@storybook/node-logger'); diff --git a/code/addons/storyshots-core/stories/storyshot.renderOnly.test.js b/code/addons/storyshots-core/stories/storyshot.renderOnly.test.js new file mode 100644 index 000000000000..e620fd15ed47 --- /dev/null +++ b/code/addons/storyshots-core/stories/storyshot.renderOnly.test.js @@ -0,0 +1,8 @@ +import path from 'path'; +import initStoryshots, { renderOnly } from '../src'; + +initStoryshots({ + framework: 'react', + configPath: path.join(__dirname, 'exported_metadata'), + test: renderOnly, +}); diff --git a/code/addons/storyshots-core/stories/storyshot.renderWithOptions.test.js b/code/addons/storyshots-core/stories/storyshot.renderWithOptions.test.js new file mode 100644 index 000000000000..4aac113cedd4 --- /dev/null +++ b/code/addons/storyshots-core/stories/storyshot.renderWithOptions.test.js @@ -0,0 +1,8 @@ +import path from 'path'; +import initStoryshots, { renderWithOptions } from '../src'; + +initStoryshots({ + framework: 'react', + configPath: path.join(__dirname, 'exported_metadata'), + test: renderWithOptions({}), +}); diff --git a/code/addons/storyshots-core/stories/storyshot.shallow.test.js b/code/addons/storyshots-core/stories/storyshot.shallow.test.js new file mode 100644 index 000000000000..62cf107e089a --- /dev/null +++ b/code/addons/storyshots-core/stories/storyshot.shallow.test.js @@ -0,0 +1,8 @@ +import path from 'path'; +import initStoryshots, { shallowSnapshot } from '../src'; + +initStoryshots({ + framework: 'react', + configPath: path.join(__dirname, 'exported_metadata'), + test: shallowSnapshot, +}); diff --git a/code/addons/storyshots-core/stories/storyshot.shallowWithOptions.test.js b/code/addons/storyshots-core/stories/storyshot.shallowWithOptions.test.js new file mode 100644 index 000000000000..5a4c45b78257 --- /dev/null +++ b/code/addons/storyshots-core/stories/storyshot.shallowWithOptions.test.js @@ -0,0 +1,11 @@ +import path from 'path'; +import initStoryshots, { shallowSnapshot } from '../src'; + +initStoryshots({ + framework: 'react', + configPath: path.join(__dirname, 'exported_metadata'), + test: (data) => + shallowSnapshot({ + ...data, + }), +}); diff --git a/code/addons/storyshots-core/stories/storyshot.snapshotWithOptionsFunction.test.js b/code/addons/storyshots-core/stories/storyshot.snapshotWithOptionsFunction.test.js new file mode 100644 index 000000000000..f6fc73770aa9 --- /dev/null +++ b/code/addons/storyshots-core/stories/storyshot.snapshotWithOptionsFunction.test.js @@ -0,0 +1,8 @@ +import path from 'path'; +import initStoryshots, { snapshotWithOptions } from '../src'; + +initStoryshots({ + framework: 'react', + configPath: path.join(__dirname, 'exported_metadata'), + test: snapshotWithOptions(() => ({})), +}); diff --git a/code/addons/storyshots-core/stories/storyshot.test.js b/code/addons/storyshots-core/stories/storyshot.test.js new file mode 100644 index 000000000000..9a1dde49cb99 --- /dev/null +++ b/code/addons/storyshots-core/stories/storyshot.test.js @@ -0,0 +1,13 @@ +import path from 'path'; +import initStoryshots, { multiSnapshotWithOptions } from '../src'; + +jest.mock('@storybook/node-logger'); + +// with react-test-renderer +initStoryshots({ + framework: 'react', + // Ignore integrityOptions for async.storyshot because only run when asyncJest is true + integrityOptions: { cwd: __dirname, ignore: ['**/**.async.storyshot'] }, + configPath: path.join(__dirname, 'exported_metadata'), + test: multiSnapshotWithOptions(), +}); diff --git a/code/addons/storyshots-core/tsconfig.build.json b/code/addons/storyshots-core/tsconfig.build.json new file mode 100644 index 000000000000..dae6c1e39197 --- /dev/null +++ b/code/addons/storyshots-core/tsconfig.build.json @@ -0,0 +1,23 @@ +{ + "extends": "./tsconfig.json", + "compileOnSave": false, + "compilerOptions": { + "target": "ES2020", + "module": "CommonJS", + "lib": ["es2020", "dom"], + "esModuleInterop": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "declaration": true, + "outDir": "dist", + "types": ["node"], + "skipLibCheck": true, + "resolveJsonModule": true, + "allowJs": true, + "pretty": true, + "noErrorTruncation": true, + "listEmittedFiles": false, + "noUnusedLocals": false + }, + "include": ["src/**/*", "src/**/*.json"] +} diff --git a/code/addons/storyshots-core/tsconfig.json b/code/addons/storyshots-core/tsconfig.json new file mode 100644 index 000000000000..769c52947576 --- /dev/null +++ b/code/addons/storyshots-core/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "declaration": true, + "jsx": "preserve", + "skipLibCheck": true, + "skipDefaultLibCheck": true + }, + "include": ["src/**/*.ts"] +} diff --git a/addons/storyshots/storyshots-puppeteer/.eslintrc.js b/code/addons/storyshots-puppeteer/.eslintrc.js similarity index 100% rename from addons/storyshots/storyshots-puppeteer/.eslintrc.js rename to code/addons/storyshots-puppeteer/.eslintrc.js diff --git a/code/addons/storyshots-puppeteer/README.md b/code/addons/storyshots-puppeteer/README.md new file mode 100644 index 000000000000..2175c1d436d4 --- /dev/null +++ b/code/addons/storyshots-puppeteer/README.md @@ -0,0 +1,361 @@ +# StoryShots + [Puppeteer](https://github.com/GoogleChrome/puppeteer) + +## Getting Started + +Add the following modules into your app. + +```sh +npm install @storybook/addon-storyshots-puppeteer puppeteer --save-dev +``` + +⚠️ As of Storybook 5.3 `puppeteer` is no longer included in the addon dependencies and must be added to your project directly. + +## Configure Storyshots for Puppeteer tests + +⚠️ **React-native** is **not supported** by this test function. + +When running Puppeteer tests for your stories, you have two options: + +- Have a storybook running (ie. accessible via http(s), for instance using `npm run storybook`) +- Have a static build of the storybook (for instance, using `npm run build-storybook`) + +Then you will need to reference the storybook URL (`file://...` if local, `http(s)://...` if served) + +## _puppeteerTest_ + +Allows to define arbitrary Puppeteer tests as `story.parameters.puppeteerTest` function. + +You can either create a new Storyshots instance or edit the one you previously used: + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; + +initStoryshots({ suite: 'Puppeteer storyshots', test: puppeteerTest() }); +``` + +Then, in your stories: + +```js +export const myExample = () => { + ... +}; +myExample.parameters = { + async puppeteerTest(page) { + const element = await page.$(''); + await element.click(); + expect(something).toBe(something); + }, +}; +``` + +This will assume you have a storybook running on at __. +Internally here are the steps: + +- Launches a Chrome headless using [puppeteer](https://github.com/GoogleChrome/puppeteer) +- Browses each stories (calling __ URL), +- Runs the `parameters.puppeteerTest` function if it's defined. + +### Specifying the storybook URL + +If you want to set specific storybook URL, you can specify via the `storybookUrl` parameter, see below: + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; + +initStoryshots({ + suite: 'Puppeteer storyshots', + test: puppeteerTest({ storybookUrl: 'http://my-specific-domain.com:9010' }), +}); +``` + +The above config will use __ for tests. You can also use query parameters in your URL (e.g. for setting a different background for your storyshots, if you use `@storybook/addon-backgrounds`). + +You may also use a local static build of storybook if you do not want to run the webpack dev-server: + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; + +initStoryshots({ + suite: 'Puppeteer storyshots', + test: puppeteerTest({ + storybookUrl: 'file:///path/to/my/storybook-static', + // storybookUrl: 'file://${path.resolve(__dirname, '../storybook-static')}' + }), +}); +``` + +### Specifying options to _goto()_ (Puppeteer API) + +You might use `getGotoOptions` to specify options when the storybook is navigating to a story (using the `goto` method). Will be passed to [Puppeteer .goto() fn](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagegotourl-options) + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; + +const getGotoOptions = ({ context, url }) => { + return { + waitUntil: 'networkidle0', + }; +}; + +initStoryshots({ + suite: 'Puppeteer storyshots', + test: puppeteerTest({ storybookUrl: 'http://localhost:6006', getGotoOptions }), +}); +``` + +### Customizing browser launch options (Puppeteer API) + +You might use the `browserLaunchOptions` to specify options for the default browser instance. Will be passed to [puppeteer.launch()](https://pptr.dev/api/puppeteer.puppeteernode.launch) + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; + +initStoryshots({ + suite: 'Puppeteer storyshots', + test: puppeteerTest({ + storybookUrl: 'https://some-local-ssl-url:7777', + browserLaunchOptions: { + // For ignoring self-signed certificates + ignoreHTTPSErrors: true, + }, + }), +}); +``` + +### Specifying custom Chrome executable path (Puppeteer API) + +You might use `chromeExecutablePath` to specify the path to a different version of Chrome, without downloading Chromium. Will be passed to [Runs a bundled version of Chromium](https://github.com/GoogleChrome/puppeteer#default-runtime-settings) + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; + +const chromeExecutablePath = '/usr/local/bin/chrome'; + +initStoryshots({ + suite: 'Puppeteer storyshots', + test: puppeteerTest({ storybookUrl: 'http://localhost:6006', chromeExecutablePath }), +}); +``` + +Alternatively, you may set the `SB_CHROMIUM_PATH` environment variable. If both are set, then `chromeExecutablePath` will take precedence. + +### Specifying a custom Puppeteer `browser` instance + +You might use the async `getCustomBrowser` function to obtain a custom instance of a Puppeteer `browser` object. This will prevent `storyshots-puppeteer` from creating its own `browser`. It will create and close pages within the `browser`, and it is your responsibility to manage the lifecycle of the `browser` itself. + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; +import puppeteer from 'puppeteer'; + +(async function () { + initStoryshots({ + suite: 'Puppeteer storyshots', + test: puppeteerTest({ + storybookUrl: 'http://localhost:6006', + getCustomBrowser: () => puppeteer.connect({ browserWSEndpoint: 'ws://yourUrl' }), + }), + }); +})(); +``` + +### Customizing a `page` instance + +Sometimes, there is a need to customize a page before it calls the `goto` api. + +An example of device emulation: + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { puppeteerTest } from '@storybook/addon-storyshots-puppeteer'; +const devices = require('puppeteer/DeviceDescriptors'); + +const iPhone = devices['iPhone 6']; + +function customizePage(page) { + return page.emulate(iPhone); +} + +initStoryshots({ + suite: 'Puppeteer storyshots', + test: puppeteerTest({ + storybookUrl: 'http://localhost:6006', + customizePage, + }), +}); +``` + +### Specifying setup and tests timeout + +By default, `@storybook/addon-storyshots-puppeteer` uses 15 second timeouts for browser setup and test functions. +Those can be customized with `setupTimeout` and `testTimeout` parameters. + +### Integrate Puppeteer storyshots with regular app + +You may want to use another Jest project to run your Puppeteer storyshots as they require more resources: Chrome and Storybook built/served. + +### Integrate Puppeteer storyshots with [Create React App](https://github.com/facebookincubator/create-react-app) + +You have two options here, you can either: + +- Add the storyshots configuration inside any of your `test.js` file. You must ensure you have either a running storybook or a static build available. + +- Create a custom test file using Jest outside of the CRA scope: + + A more robust approach would be to separate existing test files ran by create-react-app (anything `(test|spec).js` suffixed files) from the test files to run Puppeteer storyshots. + This use case can be achieved by using a custom name for the test file, ie something like `puppeteer-storyshots.runner.js`. This file will contain the `initStoryshots` call with Puppeteer storyshots configuration. + Then you will create a separate script entry in your package.json, for instance + + ```json + { + "scripts": { + "puppeteer-storyshots": "jest puppeteer-storyshots.runner.js --config path/to/custom/jest.config.json" + } + } + ``` + + Note that you will certainly need a custom config file for Jest as you run it outside of the CRA scope and thus you do not have the built-in config. + + Once that's setup, you can run `npm run puppeteer-storyshots`. + +### Reminder + +Puppeteer launches a web browser (Chrome) internally. + +The browser opens a page (either using the static build of storybook or a running instance of Storybook) + +If you run your test without either the static build or a running instance, this wont work. + +To make sure your tests run against the latest changes of your Storybook, you must keep your static build or running Storybook up-to-date. +This can be achieved by adding a step before running the test ie: `npm run build-storybook && npm run image-snapshots`. +If you run the Puppeteer storyshots against a running Storybook in dev mode, you don't have to worry about the stories being up-to-date because the dev-server is watching changes and rebuilds automatically. + +## _axeTest_ + +Runs [Axe](https://www.deque.com/axe/) accessibility checks and verifies that they pass using [jest-puppeteer-axe](https://github.com/WordPress/gutenberg/tree/master/packages/jest-puppeteer-axe). + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { axeTest } from '@storybook/addon-storyshots-puppeteer'; + +initStoryshots({ suite: 'A11y checks', test: axeTest() }); +``` + +For configuration, it uses the same `story.parameters.a11y` parameter as [`@storybook/addon-a11y`](https://github.com/storybookjs/storybook/tree/next/code/addons/a11y#parameters) + +### Specifying options to `axeTest` + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { axeTest } from '@storybook/addon-storyshots-puppeteer'; + +const beforeAxeTest = (page, { context: { kind, story }, url }) => { + return new Promise((resolve) => + setTimeout(() => { + resolve(); + }, 600) + ); +}; + +initStoryshots({ suite: 'A11y checks', test: axeTest({ beforeAxeTest }) }); +``` + +`beforeAxeTest` receives the [Puppeteer page instance](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-page) and an object: `{ context: {kind, story}, url}`. _kind_ is the kind of the story and the _story_ its name. _url_ is the URL the browser will use to screenshot. `beforeAxeTest` is part of the promise chain and is called after the browser navigation is completed but before the screenshot is taken. It allows for triggering events on the page elements and delaying the axe test . + +## _imageSnapshots_ + +Generates and compares screenshots of your stories using [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot). + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { imageSnapshot } from '@storybook/addon-storyshots-puppeteer'; + +initStoryshots({ suite: 'Image storyshots', test: imageSnapshot() }); +``` + +It saves all images under \_\_image_snapshots\_\_ folder. + +### Specifying options to _jest-image-snapshots_ + +If you wish to customize [jest-image-snapshot](https://github.com/americanexpress/jest-image-snapshot), then you can provide a `getMatchOptions` parameter that should return the options config object. Additionally, you can provide `beforeScreenshot` which is called before the screenshot is captured and a `afterScreenshot` handler which is called after the screenshot and receives the just created image. + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { imageSnapshot } from '@storybook/addon-storyshots-puppeteer'; +const getMatchOptions = ({ context: { kind, story }, url }) => { + return { + failureThreshold: 0.2, + failureThresholdType: 'percent', + }; +}; +const beforeScreenshot = (page, { context: { kind, story }, url }) => { + return new Promise((resolve) => + setTimeout(() => { + resolve(); + }, 600) + ); +}; +const afterScreenshot = ({ image, context }) => { + return new Promise((resolve) => + setTimeout(() => { + resolve(); + }, 600) + ); +}; +initStoryshots({ + suite: 'Image storyshots', + test: imageSnapshot({ + storybookUrl: 'http://localhost:6006', + getMatchOptions, + beforeScreenshot, + afterScreenshot, + }), +}); +``` + +`getMatchOptions` receives an object: `{ context: {kind, story}, url}`. _kind_ is the kind of the story and the _story_ its name. _url_ is the URL the browser will use to screenshot. + +`beforeScreenshot` receives the [Puppeteer page instance](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-page) and an object: `{ context: {kind, story}, url}`. _kind_ is the kind of the story and the _story_ its name. _url_ is the URL the browser will use to screenshot. `beforeScreenshot` is part of the promise chain and is called after the browser navigation is completed but before the screenshot is taken. It allows for triggering events on the page elements and delaying the screenshot and can be used avoid regressions due to mounting animations. + +`afterScreenshot` receives the created image from puppeteer. + +### Specifying options to _screenshot()_ (Puppeteer API) + +You might use `getScreenshotOptions` to specify options for screenshot. Will be passed to [Puppeteer .screenshot() fn](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagescreenshotoptions) + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { imageSnapshot } from '@storybook/addon-storyshots-puppeteer'; +const getScreenshotOptions = ({ context, url }) => { + return { + encoding: 'base64', // encoding: 'base64' is a property required by puppeteer + fullPage: false, // Do not take the full page screenshot. Default is 'true' in Storyshots., + }; +}; +initStoryshots({ + suite: 'Image storyshots', + test: imageSnapshot({ storybookUrl: 'http://localhost:6006', getScreenshotOptions }), +}); +``` + +`getScreenshotOptions` receives an object `{ context: {kind, story}, url}`. _kind_ is the kind of the story and the _story_ its name. _url_ is the URL the browser will use to screenshot. + +To create a screenshot of just a single element (with its children), rather than the page or current viewport, an ElementHandle can be returned from `beforeScreenshot`: + +```js +import initStoryshots from '@storybook/addon-storyshots'; +import { imageSnapshot } from '@storybook/addon-storyshots-puppeteer'; + +const beforeScreenshot = (page) => page.$('#storybook-root > *'); + +initStoryshots({ + suite: 'Image storyshots', + test: imageSnapshot({ storybookUrl: 'http://localhost:6006', beforeScreenshot }), +}); +``` diff --git a/code/addons/storyshots-puppeteer/jest.config.js b/code/addons/storyshots-puppeteer/jest.config.js new file mode 100644 index 000000000000..0115c67e5629 --- /dev/null +++ b/code/addons/storyshots-puppeteer/jest.config.js @@ -0,0 +1,12 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + snapshotSerializers: [...baseConfig.snapshotSerializers, 'enzyme-to-json/serializer'], + transform: { + ...baseConfig.transform, + '^.+\\.stories\\.[jt]sx?$': '@storybook/addon-storyshots/injectFileName', + }, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/storyshots-puppeteer/package.json b/code/addons/storyshots-puppeteer/package.json new file mode 100644 index 000000000000..a4c4d0ca9477 --- /dev/null +++ b/code/addons/storyshots-puppeteer/package.json @@ -0,0 +1,65 @@ +{ + "name": "@storybook/addon-storyshots-puppeteer", + "version": "7.0.0-beta.25", + "description": "Image snapshots addition to StoryShots based on puppeteer", + "keywords": [ + "addon", + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/storyshots-puppeteer", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/storyshots-puppeteer" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.mjs", + "*.d.ts" + ], + "scripts": { + "prep": "../../../scripts/prepare/tsc.ts" + }, + "dependencies": { + "@axe-core/puppeteer": "^4.2.0", + "@storybook/csf": "next", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "@types/jest-image-snapshot": "^5.1.0", + "jest-image-snapshot": "^6.0.0" + }, + "devDependencies": { + "@types/puppeteer": "^5.4.0", + "enzyme": "^3.11.0", + "enzyme-to-json": "^3.6.1", + "puppeteer": "^2.0.0 || ^3.0.0", + "rimraf": "^3.0.2" + }, + "peerDependencies": { + "@storybook/addon-storyshots": "7.0.0-beta.25", + "puppeteer": ">=2.0.0" + }, + "peerDependenciesMeta": { + "puppeteer": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": {}, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/addons/storyshots/storyshots-puppeteer/preset.js b/code/addons/storyshots-puppeteer/preset.js similarity index 100% rename from addons/storyshots/storyshots-puppeteer/preset.js rename to code/addons/storyshots-puppeteer/preset.js diff --git a/addons/storyshots/storyshots-puppeteer/src/__tests__/url.test.ts b/code/addons/storyshots-puppeteer/src/__tests__/url.test.ts similarity index 100% rename from addons/storyshots/storyshots-puppeteer/src/__tests__/url.test.ts rename to code/addons/storyshots-puppeteer/src/__tests__/url.test.ts diff --git a/addons/storyshots/storyshots-puppeteer/src/axeTest.ts b/code/addons/storyshots-puppeteer/src/axeTest.ts similarity index 88% rename from addons/storyshots/storyshots-puppeteer/src/axeTest.ts rename to code/addons/storyshots-puppeteer/src/axeTest.ts index 21548a4a0e0a..b2a7bdb603ff 100644 --- a/addons/storyshots/storyshots-puppeteer/src/axeTest.ts +++ b/code/addons/storyshots-puppeteer/src/axeTest.ts @@ -1,5 +1,6 @@ import AxePuppeteer from '@axe-core/puppeteer'; -import { defaultAxeConfig, AxeConfig } from './config'; +import type { AxeConfig } from './config'; +import { defaultAxeConfig } from './config'; import { puppeteerTest } from './puppeteerTest'; export const axeTest = (customConfig: Partial = {}) => { @@ -10,7 +11,7 @@ export const axeTest = (customConfig: Partial = {}) => { ...extendedConfig, async testBody(page, testOptions) { const { - element = '#root', + element = '#storybook-root', exclude, disabledRules, options, diff --git a/code/addons/storyshots-puppeteer/src/config.ts b/code/addons/storyshots-puppeteer/src/config.ts new file mode 100644 index 000000000000..f899a3d9a3ec --- /dev/null +++ b/code/addons/storyshots-puppeteer/src/config.ts @@ -0,0 +1,105 @@ +import type { MatchImageSnapshotOptions } from 'jest-image-snapshot'; +import type { ScreenshotOptions, Browser, Page, ElementHandle, LaunchOptions } from 'puppeteer'; + +type PuppeteerLifeCycleEvent = 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2'; + +export interface Context { + kind: string; + story: string; + parameters: { + [key: string]: any; + }; +} + +interface Options { + context: Context; + url: string; +} + +interface Base64ScreenShotOptions extends ScreenshotOptions { + encoding: 'base64'; +} + +interface DirectNavigationOptions { + referer?: string; + timeout?: number; + waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[]; +} + +export interface CommonConfig { + storybookUrl: string; + chromeExecutablePath: string; + getGotoOptions: (options: Options) => DirectNavigationOptions; + customizePage: (page: Page) => Promise; + getCustomBrowser: () => Promise; + /** + * Puppeteer browser launch options: + * {@link https://pptr.dev/api/puppeteer.puppeteernode.launch/ puppeteer.launch()} + */ + browserLaunchOptions: LaunchOptions; + setupTimeout: number; + testTimeout: number; +} + +export interface PuppeteerTestConfig extends CommonConfig { + testBody: ((page: Page, options: Options) => void | Promise) & { + filter?: (options: Options) => boolean; + }; +} + +export interface ImageSnapshotConfig extends CommonConfig { + getMatchOptions: (options: Options) => MatchImageSnapshotOptions; + getScreenshotOptions: (options: Options) => Base64ScreenShotOptions; + beforeScreenshot: (page: Page, options: Options) => Promise; + afterScreenshot: (options: { image: string | void | Buffer; context: Context }) => Promise; +} + +export interface AxeConfig extends CommonConfig { + beforeAxeTest: (page: Page, options: Options) => Promise; +} + +const noop: () => undefined = () => undefined; +const asyncNoop: () => Promise = async () => undefined; + +export const defaultCommonConfig: CommonConfig = { + storybookUrl: 'http://localhost:6006', + chromeExecutablePath: process.env.SB_CHROMIUM_PATH, + getGotoOptions: noop, + customizePage: asyncNoop, + getCustomBrowser: undefined, + browserLaunchOptions: {}, + setupTimeout: 15000, + testTimeout: 15000, +}; + +const getTestBody = (options: Options) => options.context.parameters.puppeteerTest; + +function defaultTestBody(page: Page, options: Options) { + const testBody = getTestBody(options); + if (testBody != null) { + return testBody(page, options); + } + return null; +} + +defaultTestBody.filter = (options: Options) => getTestBody(options) != null; + +export const defaultPuppeteerTestConfig: PuppeteerTestConfig = { + ...defaultCommonConfig, + testBody: defaultTestBody, +}; + +// We consider taking the full page is a reasonable default. +const defaultScreenshotOptions = () => ({ fullPage: true, encoding: 'base64' } as const); +export const defaultImageSnapshotConfig: ImageSnapshotConfig = { + ...defaultCommonConfig, + getMatchOptions: noop, + getScreenshotOptions: defaultScreenshotOptions, + beforeScreenshot: noop, + afterScreenshot: noop, +}; + +export const defaultAxeConfig: AxeConfig = { + ...defaultCommonConfig, + beforeAxeTest: noop, +}; diff --git a/addons/storyshots/storyshots-puppeteer/src/imageSnapshot.ts b/code/addons/storyshots-puppeteer/src/imageSnapshot.ts similarity index 88% rename from addons/storyshots/storyshots-puppeteer/src/imageSnapshot.ts rename to code/addons/storyshots-puppeteer/src/imageSnapshot.ts index e069f7b22d2b..b61552be7787 100644 --- a/addons/storyshots/storyshots-puppeteer/src/imageSnapshot.ts +++ b/code/addons/storyshots-puppeteer/src/imageSnapshot.ts @@ -1,5 +1,6 @@ import { toMatchImageSnapshot } from 'jest-image-snapshot'; -import { defaultImageSnapshotConfig, ImageSnapshotConfig } from './config'; +import type { ImageSnapshotConfig } from './config'; +import { defaultImageSnapshotConfig } from './config'; import { puppeteerTest } from './puppeteerTest'; expect.extend({ toMatchImageSnapshot }); diff --git a/addons/storyshots/storyshots-puppeteer/src/index.ts b/code/addons/storyshots-puppeteer/src/index.ts similarity index 100% rename from addons/storyshots/storyshots-puppeteer/src/index.ts rename to code/addons/storyshots-puppeteer/src/index.ts diff --git a/addons/storyshots/storyshots-puppeteer/src/puppeteerTest.ts b/code/addons/storyshots-puppeteer/src/puppeteerTest.ts similarity index 86% rename from addons/storyshots/storyshots-puppeteer/src/puppeteerTest.ts rename to code/addons/storyshots-puppeteer/src/puppeteerTest.ts index fbdd5233e5c1..03517979d31b 100644 --- a/addons/storyshots/storyshots-puppeteer/src/puppeteerTest.ts +++ b/code/addons/storyshots-puppeteer/src/puppeteerTest.ts @@ -1,7 +1,8 @@ -import { Browser, Page } from 'puppeteer'; +import type { Browser, Page } from 'puppeteer'; import { logger } from '@storybook/node-logger'; import { constructUrl } from './url'; -import { defaultPuppeteerTestConfig, PuppeteerTestConfig } from './config'; +import type { PuppeteerTestConfig } from './config'; +import { defaultPuppeteerTestConfig } from './config'; export const puppeteerTest = (customConfig: Partial = {}) => { const { @@ -10,6 +11,7 @@ export const puppeteerTest = (customConfig: Partial = {}) = getGotoOptions, customizePage, getCustomBrowser, + browserLaunchOptions, testBody, setupTimeout, testTimeout, @@ -78,7 +80,13 @@ export const puppeteerTest = (customConfig: Partial = {}) = const puppeteer = require('puppeteer'); // add some options "no-sandbox" to make it work properly on some Linux systems as proposed here: https://github.com/Googlechrome/puppeteer/issues/290#issuecomment-322851507 browser = await puppeteer.launch({ - args: ['--no-sandbox ', '--disable-setuid-sandbox', '--disable-dev-shm-usage'], + ...browserLaunchOptions, + args: [ + '--no-sandbox ', + '--disable-setuid-sandbox', + '--disable-dev-shm-usage', + ...(browserLaunchOptions?.args || []), + ], executablePath: chromeExecutablePath, }); } diff --git a/addons/storyshots/storyshots-puppeteer/src/url.ts b/code/addons/storyshots-puppeteer/src/url.ts similarity index 100% rename from addons/storyshots/storyshots-puppeteer/src/url.ts rename to code/addons/storyshots-puppeteer/src/url.ts diff --git a/code/addons/storyshots-puppeteer/tsconfig.build.json b/code/addons/storyshots-puppeteer/tsconfig.build.json new file mode 100644 index 000000000000..dae6c1e39197 --- /dev/null +++ b/code/addons/storyshots-puppeteer/tsconfig.build.json @@ -0,0 +1,23 @@ +{ + "extends": "./tsconfig.json", + "compileOnSave": false, + "compilerOptions": { + "target": "ES2020", + "module": "CommonJS", + "lib": ["es2020", "dom"], + "esModuleInterop": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "declaration": true, + "outDir": "dist", + "types": ["node"], + "skipLibCheck": true, + "resolveJsonModule": true, + "allowJs": true, + "pretty": true, + "noErrorTruncation": true, + "listEmittedFiles": false, + "noUnusedLocals": false + }, + "include": ["src/**/*", "src/**/*.json"] +} diff --git a/code/addons/storyshots-puppeteer/tsconfig.json b/code/addons/storyshots-puppeteer/tsconfig.json new file mode 100644 index 000000000000..d16da0e1d60f --- /dev/null +++ b/code/addons/storyshots-puppeteer/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "skipLibCheck": true, + "types": ["node"], + "declaration": true + }, + "include": ["src/**/*"] +} diff --git a/code/addons/storysource/README.md b/code/addons/storysource/README.md new file mode 100644 index 000000000000..3f292dd3399c --- /dev/null +++ b/code/addons/storysource/README.md @@ -0,0 +1,101 @@ +

    Storybook Storysource Addon

    + +This addon is used to show stories source in the addon panel. + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +![Storysource Demo](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/storysource/docs/demo.gif) + +- [Getting Started](#getting-started) + - [Install using preset](#install-using-preset) +- [Theming](#theming) +- [Displaying full source](#displaying-full-source) + +## Getting Started + +First, install the addon + +```sh +yarn add @storybook/addon-storysource --dev +``` + +You can add configuration for this addon by using a preset or by using the addon config with webpack + +### Install using preset + +Add the following to your `.storybook/main.js` exports: + +```js +module.exports = { + addons: ['@storybook/addon-storysource'], +}; +``` + +You can pass configurations into the addon-storysource loader in your `.storybook/main.js` file, e.g.: + +```js +module.exports = { + addons: [ + { + name: '@storybook/addon-storysource', + options: { + rule: { + // test: [/\.stories\.jsx?$/], This is default + include: [path.resolve(__dirname, '../src')], // You can specify directories + }, + loaderOptions: { + prettierConfig: { printWidth: 80, singleQuote: false }, + }, + }, + }, + ], +}; +``` + +To customize the `source-loader`, pass `loaderOptions`. Valid configurations are documented in the [`source-loader` README](https://github.com/storybookjs/storybook/tree/main/lib/source-loader/README.md#options). + +## Theming + +Storysource will automatically use the light or dark syntax theme based on your storybook theme. See [Theming Storybook](https://storybook.js.org/docs/react/configure/theming) for more information. + +![Storysource Light/Dark Themes](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/storysource/docs/theming-light-dark.png) + +## Displaying full source + +Storybook 6.0 introduced an unintentional change to `source-loader`, in which only the source of the selected story is shown in the addon. To restore the old behavior, pass the`injectStoryParameters: false` option. + +If you're using `addon-docs`: + +```js +module.exports = { + addons: [ + { + name: '@storybook/addon-docs', + options: { + sourceLoaderOptions: { + injectStoryParameters: false, + }, + }, + }, + ], +}; +``` + +If not: + +```js +module.exports = { + addons: [ + { + name: '@storybook/addon-storysource', + options: { + loaderOptions: { + injectStoryParameters: false, + }, + }, + }, + ], +}; +``` + +This bug will be resolved in a future version of the addon. diff --git a/addons/storysource/docs/demo.gif b/code/addons/storysource/docs/demo.gif similarity index 100% rename from addons/storysource/docs/demo.gif rename to code/addons/storysource/docs/demo.gif diff --git a/addons/storysource/docs/theming-light-dark.png b/code/addons/storysource/docs/theming-light-dark.png similarity index 100% rename from addons/storysource/docs/theming-light-dark.png rename to code/addons/storysource/docs/theming-light-dark.png diff --git a/code/addons/storysource/jest.config.js b/code/addons/storysource/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/storysource/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/storysource/manager.js b/code/addons/storysource/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/storysource/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/storysource/package.json b/code/addons/storysource/package.json new file mode 100644 index 000000000000..7ae1ce3f664b --- /dev/null +++ b/code/addons/storysource/package.json @@ -0,0 +1,103 @@ +{ + "name": "@storybook/addon-storysource", + "version": "7.0.0-beta.25", + "description": "View a story’s source code to see how it works and paste into your app", + "keywords": [ + "addon", + "storybook", + "code" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/storysource", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/storysource" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/router": "7.0.0-beta.25", + "@storybook/source-loader": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "estraverse": "^5.2.0", + "prop-types": "^15.7.2", + "react-syntax-highlighter": "^15.5.0" + }, + "devDependencies": { + "@types/react": "^16.14.34", + "@types/react-syntax-highlighter": "11.0.5", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx", + "./src/preset.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Storysource", + "icon": "https://user-images.githubusercontent.com/263385/101991675-48cdf300-3c7c-11eb-9400-58de5ac6daa7.png", + "unsupportedFrameworks": [ + "react-native" + ] + } +} diff --git a/code/addons/storysource/preset.js b/code/addons/storysource/preset.js new file mode 100644 index 000000000000..dd83b37f74cb --- /dev/null +++ b/code/addons/storysource/preset.js @@ -0,0 +1 @@ +import './dist/preset'; diff --git a/addons/storysource/src/StoryPanel.tsx b/code/addons/storysource/src/StoryPanel.tsx similarity index 92% rename from addons/storysource/src/StoryPanel.tsx rename to code/addons/storysource/src/StoryPanel.tsx index d4f8845c1c3e..33356fb735ef 100644 --- a/addons/storysource/src/StoryPanel.tsx +++ b/code/addons/storysource/src/StoryPanel.tsx @@ -1,17 +1,17 @@ import React from 'react'; -import { API, Story, useParameter } from '@storybook/api'; +import { type API, useParameter } from '@storybook/manager-api'; import { styled } from '@storybook/theming'; import { Link } from '@storybook/router'; import { SyntaxHighlighter, - SyntaxHighlighterProps, - SyntaxHighlighterRendererProps, + type SyntaxHighlighterProps, + type SyntaxHighlighterRendererProps, } from '@storybook/components'; // @ts-expect-error Typedefs don't currently expose `createElement` even though it exists import { createElement as createSyntaxHighlighterElement } from 'react-syntax-highlighter'; -import { SourceBlock, LocationsMap } from '@storybook/source-loader'; +import type { SourceBlock, LocationsMap } from '@storybook/source-loader'; const StyledStoryLink = styled(Link)<{ to: string; key: string }>(({ theme }) => ({ display: 'block', @@ -48,7 +48,7 @@ interface SourceParams { locationsMap?: LocationsMap; } export const StoryPanel: React.FC = ({ api }) => { - const story: Story | undefined = api.getCurrentStoryData() as Story; + const story = api.getCurrentStoryData(); const selectedStoryRef = React.useRef(null); const { source, locationsMap }: SourceParams = useParameter('storySource', { source: 'loading source...', @@ -114,10 +114,10 @@ export const StoryPanel: React.FC = ({ api }) => { const location = locationsMap[key]; const first = location.startLoc.line - 1; const last = location.endLoc.line; - const { kind, refId } = story; + const { title, refId } = story; // source loader ids are different from story id const sourceIdParts = key.split('--'); - const id = api.storyId(kind, sourceIdParts[sourceIdParts.length - 1]); + const id = api.storyId(title, sourceIdParts[sourceIdParts.length - 1]); const start = createPart({ rows: rows.slice(lastRow, first), stylesheet, useInlineStyles }); const storyPart = createStoryPart({ rows, stylesheet, useInlineStyles, location, id, refId }); diff --git a/addons/storysource/src/events.ts b/code/addons/storysource/src/events.ts similarity index 100% rename from addons/storysource/src/events.ts rename to code/addons/storysource/src/events.ts diff --git a/code/addons/storysource/src/index.ts b/code/addons/storysource/src/index.ts new file mode 100644 index 000000000000..5edaf4114ea1 --- /dev/null +++ b/code/addons/storysource/src/index.ts @@ -0,0 +1,9 @@ +/// + +import { ADDON_ID, PANEL_ID } from './events'; + +export { ADDON_ID, PANEL_ID }; + +if (module && module.hot && module.hot.decline) { + module.hot.decline(); +} diff --git a/code/addons/storysource/src/manager.tsx b/code/addons/storysource/src/manager.tsx new file mode 100644 index 000000000000..7a7769275ead --- /dev/null +++ b/code/addons/storysource/src/manager.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import { addons } from '@storybook/manager-api'; + +import { StoryPanel } from './StoryPanel'; +import { ADDON_ID, PANEL_ID } from './index'; + +addons.register(ADDON_ID, (api) => { + addons.addPanel(PANEL_ID, { + title: 'Story', + render: ({ active, key }) => (active ? : null), + paramKey: 'storysource', + }); +}); diff --git a/code/addons/storysource/src/preset.ts b/code/addons/storysource/src/preset.ts new file mode 100644 index 000000000000..37778acf34a3 --- /dev/null +++ b/code/addons/storysource/src/preset.ts @@ -0,0 +1,32 @@ +/// + +function webpack( + webpackConfig = { module: { rules: [] as Array } }, + options = { loaderOptions: {}, rule: {} } +) { + const { module = { rules: [] } } = webpackConfig; + const { loaderOptions, rule = {} } = options; + + return { + ...webpackConfig, + module: { + ...module, + rules: [ + ...(module.rules || []), + { + test: [/\.stories\.(jsx?$|tsx?$)/], + ...rule, + enforce: 'pre', + use: [ + { + loader: require.resolve('@storybook/source-loader'), + options: loaderOptions, + }, + ], + }, + ], + }, + }; +} + +export { webpack }; diff --git a/addons/storysource/theming-light-dark.png b/code/addons/storysource/theming-light-dark.png similarity index 100% rename from addons/storysource/theming-light-dark.png rename to code/addons/storysource/theming-light-dark.png diff --git a/code/addons/storysource/tsconfig.json b/code/addons/storysource/tsconfig.json new file mode 100644 index 000000000000..cf1e09965901 --- /dev/null +++ b/code/addons/storysource/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "skipLibCheck": true + }, + "include": ["src/**/*"] +} diff --git a/code/addons/toolbars/README.md b/code/addons/toolbars/README.md new file mode 100644 index 000000000000..46f3db9de9de --- /dev/null +++ b/code/addons/toolbars/README.md @@ -0,0 +1,45 @@ +# Storybook Toolbars Addon + +The Toolbars addon controls global story rendering options from [Storybook's](https://storybook.js.org) toolbar UI. It's a general purpose addon that can be used to: + +- set a theme for your components +- set your components' internationalization (i18n) locale +- configure just about anything in Storybook that makes use of a global variable + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +![Screenshot](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/toolbars/docs/hero.gif) + +## Installation + +Toolbars is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run: + +```sh +npm i -D @storybook/addon-toolbars +``` + +Then, add following content to [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project): + +```js +module.exports = { + addons: ['@storybook/addon-toolbars'], +}; +``` + +## Usage + +The usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/toolbars-and-globals). + +## FAQs + +### How does this compare to `addon-contexts`? + +`Addon-toolbars` is the successor to `addon-contexts`, which provided convenient global toolbars in Storybook's toolbar. + +The primary difference between the two packages is that `addon-toolbars` makes use of Storybook's new **Story Args** feature, which has the following advantages: + +- **Standardization**. Args are built into Storybook in 6.x. Since `addon-toolbars` is based on args, you don't need to learn any addon-specific APIs to use it. + +- **Ergonomics**. Global args are easy to consume [in stories](https://storybook.js.org/docs/react/essentials/toolbars-and-globals#consuming-globals-from-within-a-story), in [Storybook Docs](https://github.com/storybookjs/storybook/tree/main/addons/docs), or even in other addons. + +* **Framework compatibility**. Args are completely framework-independent, so `addon-toolbars` is compatible with React, Vue, Angular, etc. out of the box with no framework logic needed in the addon. diff --git a/addons/toolbars/docs/hero.gif b/code/addons/toolbars/docs/hero.gif similarity index 100% rename from addons/toolbars/docs/hero.gif rename to code/addons/toolbars/docs/hero.gif diff --git a/code/addons/toolbars/jest.config.js b/code/addons/toolbars/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/toolbars/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/toolbars/manager.js b/code/addons/toolbars/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/toolbars/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/toolbars/package.json b/code/addons/toolbars/package.json new file mode 100644 index 000000000000..b68d23a19b28 --- /dev/null +++ b/code/addons/toolbars/package.json @@ -0,0 +1,110 @@ +{ + "name": "@storybook/addon-toolbars", + "version": "7.0.0-beta.25", + "description": "Create your own toolbar items that control story rendering", + "keywords": [ + "addon", + "storybook", + "theming", + "i18n", + "internationalization", + "test", + "essentials" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/next/addons/toolbars", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/toolbars" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./register": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/manager.tsx" + ], + "platform": "browser" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Toolbars", + "icon": "https://user-images.githubusercontent.com/263385/101991677-48cdf300-3c7c-11eb-93b4-19b0e3366959.png", + "unsupportedFrameworks": [ + "react-native" + ] + } +} diff --git a/addons/toolbars/src/components/ToolbarManager.tsx b/code/addons/toolbars/src/components/ToolbarManager.tsx similarity index 81% rename from addons/toolbars/src/components/ToolbarManager.tsx rename to code/addons/toolbars/src/components/ToolbarManager.tsx index 5545aff7914e..f5a6d8e0aba4 100644 --- a/addons/toolbars/src/components/ToolbarManager.tsx +++ b/code/addons/toolbars/src/components/ToolbarManager.tsx @@ -1,9 +1,10 @@ -import React, { FC } from 'react'; -import { useGlobalTypes } from '@storybook/api'; +import type { FC } from 'react'; +import React from 'react'; +import { useGlobalTypes } from '@storybook/manager-api'; import { Separator } from '@storybook/components'; import { ToolbarMenuList } from './ToolbarMenuList'; import { normalizeArgType } from '../utils/normalize-toolbar-arg-type'; -import { ToolbarArgType } from '../types'; +import type { ToolbarArgType } from '../types'; /** * A smart component for handling manager-preview interactions. diff --git a/code/addons/toolbars/src/components/ToolbarMenuButton.tsx b/code/addons/toolbars/src/components/ToolbarMenuButton.tsx new file mode 100644 index 000000000000..f7d297be6b93 --- /dev/null +++ b/code/addons/toolbars/src/components/ToolbarMenuButton.tsx @@ -0,0 +1,26 @@ +import type { FC } from 'react'; +import React from 'react'; +import { Icons, IconButton, type IconsProps } from '@storybook/components'; + +interface ToolbarMenuButtonProps { + active: boolean; + title: string; + icon?: IconsProps['icon']; + description: string; + onClick?: () => void; +} + +export const ToolbarMenuButton: FC = ({ + active, + title, + icon, + description, + onClick, +}) => { + return ( + + {icon && } + {title ? `\xa0${title}` : null} + + ); +}; diff --git a/code/addons/toolbars/src/components/ToolbarMenuList.tsx b/code/addons/toolbars/src/components/ToolbarMenuList.tsx new file mode 100644 index 000000000000..95bd0c205dff --- /dev/null +++ b/code/addons/toolbars/src/components/ToolbarMenuList.tsx @@ -0,0 +1,98 @@ +import type { FC } from 'react'; +import React, { useCallback } from 'react'; +import { useGlobals } from '@storybook/manager-api'; +import { deprecate } from '@storybook/client-logger'; +import { WithTooltip, TooltipLinkList } from '@storybook/components'; +import { ToolbarMenuButton } from './ToolbarMenuButton'; +import type { WithKeyboardCycleProps } from '../hoc/withKeyboardCycle'; +import { withKeyboardCycle } from '../hoc/withKeyboardCycle'; +import { getSelectedIcon, getSelectedTitle } from '../utils/get-selected'; +import type { ToolbarMenuProps } from '../types'; +import { ToolbarMenuListItem } from './ToolbarMenuListItem'; + +type ToolbarMenuListProps = ToolbarMenuProps & WithKeyboardCycleProps; + +export const ToolbarMenuList: FC = withKeyboardCycle( + ({ + id, + name, + description, + toolbar: { icon: _icon, items, title: _title, showName, preventDynamicIcon, dynamicTitle }, + }) => { + const [globals, updateGlobals] = useGlobals(); + + const currentValue = globals[id]; + const hasGlobalValue = !!currentValue; + let icon = _icon; + let title = _title; + + if (!preventDynamicIcon) { + icon = getSelectedIcon({ currentValue, items }) || icon; + } + + // Deprecation support for old "name of global arg used as title" + if (showName && !title) { + title = name; + deprecate( + '`showName` is deprecated as `name` will stop having dual purposes in the future. Please specify a `title` in `globalTypes` instead.' + ); + } else if (!showName && !icon && !title) { + title = name; + deprecate( + `Using the \`name\` "${name}" as toolbar title for backward compatibility. \`name\` will stop having dual purposes in the future. Please specify either a \`title\` or an \`icon\` in \`globalTypes\` instead.` + ); + } + + if (dynamicTitle) { + title = getSelectedTitle({ currentValue, items }) || title; + } + + const handleItemClick = useCallback( + (value: string | undefined) => { + updateGlobals({ [id]: value }); + }, + [currentValue, updateGlobals] + ); + + return ( + { + const links = items + // Special case handling for various "type" variants + .filter(({ type }) => { + let shouldReturn = true; + + if (type === 'reset' && !currentValue) { + shouldReturn = false; + } + + return shouldReturn; + }) + .map((item) => { + const listItem = ToolbarMenuListItem({ + ...item, + currentValue, + onClick: () => { + handleItemClick(item.value); + onHide(); + }, + }); + + return listItem; + }); + return ; + }} + closeOnClick + > + + + ); + } +); diff --git a/addons/toolbars/src/components/ToolbarMenuListItem.tsx b/code/addons/toolbars/src/components/ToolbarMenuListItem.tsx similarity index 81% rename from addons/toolbars/src/components/ToolbarMenuListItem.tsx rename to code/addons/toolbars/src/components/ToolbarMenuListItem.tsx index 487711decc6a..35979e0b05dd 100644 --- a/addons/toolbars/src/components/ToolbarMenuListItem.tsx +++ b/code/addons/toolbars/src/components/ToolbarMenuListItem.tsx @@ -1,6 +1,7 @@ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { Icons } from '@storybook/components'; -import { ToolbarItem } from '../types'; +import type { ToolbarItem } from '../types'; interface ListItem { id: string; @@ -26,11 +27,11 @@ export const ToolbarMenuListItem = ({ onClick, currentValue, }: ToolbarMenuListItemProps) => { - const Icon = ; + const Icon = icon && ; const hasContent = left || right || title; const Item: ListItem = { - id: value, + id: value || currentValue, active: currentValue === value, onClick, }; diff --git a/addons/toolbars/src/constants.ts b/code/addons/toolbars/src/constants.ts similarity index 100% rename from addons/toolbars/src/constants.ts rename to code/addons/toolbars/src/constants.ts diff --git a/addons/toolbars/src/hoc/withKeyboardCycle.tsx b/code/addons/toolbars/src/hoc/withKeyboardCycle.tsx similarity index 93% rename from addons/toolbars/src/hoc/withKeyboardCycle.tsx rename to code/addons/toolbars/src/hoc/withKeyboardCycle.tsx index 9f8317d0de62..9ddb37f0df1b 100644 --- a/addons/toolbars/src/hoc/withKeyboardCycle.tsx +++ b/code/addons/toolbars/src/hoc/withKeyboardCycle.tsx @@ -1,8 +1,8 @@ import React, { useRef, useEffect, useCallback } from 'react'; -import { useGlobals, useStorybookApi } from '@storybook/api'; +import { useGlobals, useStorybookApi } from '@storybook/manager-api'; import { createCycleValueArray } from '../utils/create-cycle-value-array'; import { registerShortcuts } from '../utils/register-shortcuts'; -import { ToolbarMenuProps } from '../types'; +import type { ToolbarMenuProps } from '../types'; export type WithKeyboardCycleProps = { cycleValues?: string[]; @@ -17,7 +17,7 @@ export const withKeyboardCycle = (Component: React.ComponentType([]); const currentValue = globals[id]; const reset = useCallback(() => { diff --git a/code/addons/toolbars/src/index.ts b/code/addons/toolbars/src/index.ts new file mode 100644 index 000000000000..cb0ff5c3b541 --- /dev/null +++ b/code/addons/toolbars/src/index.ts @@ -0,0 +1 @@ +export {}; diff --git a/code/addons/toolbars/src/manager.tsx b/code/addons/toolbars/src/manager.tsx new file mode 100644 index 000000000000..c87d3fbf2d80 --- /dev/null +++ b/code/addons/toolbars/src/manager.tsx @@ -0,0 +1,13 @@ +import React from 'react'; +import { addons, types } from '@storybook/manager-api'; +import { ToolbarManager } from './components/ToolbarManager'; +import { ADDON_ID } from './constants'; + +addons.register(ADDON_ID, () => + addons.add(ADDON_ID, { + title: ADDON_ID, + type: types.TOOL, + match: () => true, + render: () => , + }) +); diff --git a/code/addons/toolbars/src/types.ts b/code/addons/toolbars/src/types.ts new file mode 100644 index 000000000000..bb597fab282d --- /dev/null +++ b/code/addons/toolbars/src/types.ts @@ -0,0 +1,52 @@ +import type { IconsProps } from '@storybook/components'; +import type { InputType } from '@storybook/types'; + +export type ToolbarShortcutType = 'next' | 'previous' | 'reset'; + +export type ToolbarItemType = 'item' | 'reset'; + +export interface ToolbarShortcutConfig { + label: string; + keys: string[]; +} + +export type ToolbarShortcuts = Record; + +export interface ToolbarItem { + value?: string; + icon?: IconsProps['icon']; + left?: string; + right?: string; + title?: string; + hideIcon?: boolean; + type?: ToolbarItemType; +} + +export interface NormalizedToolbarConfig { + /** The label to show for this toolbar item */ + title?: string; + /** Choose an icon to show for this toolbar item */ + icon: IconsProps['icon']; + /** Set to true to prevent default update of icon to match any present selected items icon */ + preventDynamicIcon?: boolean; + items: ToolbarItem[]; + shortcuts?: ToolbarShortcuts; + /** @deprecated "name" no longer dual purposes as title - use "title" if a title is wanted */ + showName?: boolean; + /** Change title based on selected value */ + dynamicTitle?: boolean; +} + +export type NormalizedToolbarArgType = InputType & { + toolbar: NormalizedToolbarConfig; +}; + +export type ToolbarConfig = NormalizedToolbarConfig & { + items: string[] | ToolbarItem[]; +}; + +export type ToolbarArgType = InputType & { + toolbar: ToolbarConfig; +}; + +export type ToolbarMenuProps = NormalizedToolbarArgType & { id: string }; diff --git a/addons/toolbars/src/utils/create-cycle-value-array.ts b/code/addons/toolbars/src/utils/create-cycle-value-array.ts similarity index 80% rename from addons/toolbars/src/utils/create-cycle-value-array.ts rename to code/addons/toolbars/src/utils/create-cycle-value-array.ts index af696d31bbbf..e9d12981a2da 100644 --- a/addons/toolbars/src/utils/create-cycle-value-array.ts +++ b/code/addons/toolbars/src/utils/create-cycle-value-array.ts @@ -1,11 +1,11 @@ -import { ToolbarItem, ToolbarItemType } from '../types'; +import type { ToolbarItem, ToolbarItemType } from '../types'; const disallowedCycleableItemTypes: Array = ['reset']; export const createCycleValueArray = (items: ToolbarItem[]) => { // Do not allow items in the cycle arrays that are conditional in placement const valueArray = items - .filter((item) => !disallowedCycleableItemTypes.includes(item.type)) + .filter((item) => !disallowedCycleableItemTypes.includes(item.type as ToolbarItemType)) .map((item) => item.value); return valueArray; }; diff --git a/addons/toolbars/src/utils/get-selected.ts b/code/addons/toolbars/src/utils/get-selected.ts similarity index 75% rename from addons/toolbars/src/utils/get-selected.ts rename to code/addons/toolbars/src/utils/get-selected.ts index 245f0b9fe04a..5b9e7b15644b 100644 --- a/addons/toolbars/src/utils/get-selected.ts +++ b/code/addons/toolbars/src/utils/get-selected.ts @@ -1,4 +1,4 @@ -import { ToolbarItem } from '../types'; +import type { ToolbarItem } from '../types'; interface GetSelectedItemProps { currentValue: string | null; @@ -12,10 +12,16 @@ export const getSelectedItem = ({ currentValue, items }: GetSelectedItemProps) = export const getSelectedIcon = ({ currentValue, items }: GetSelectedItemProps) => { const selectedItem = getSelectedItem({ currentValue, items }); - return selectedItem?.icon; + if (selectedItem) { + return selectedItem.icon; + } + return undefined; }; export const getSelectedTitle = ({ currentValue, items }: GetSelectedItemProps) => { const selectedItem = getSelectedItem({ currentValue, items }); - return selectedItem?.title; + if (selectedItem) { + return selectedItem.title; + } + return undefined; }; diff --git a/addons/toolbars/src/utils/normalize-toolbar-arg-type.ts b/code/addons/toolbars/src/utils/normalize-toolbar-arg-type.ts similarity index 100% rename from addons/toolbars/src/utils/normalize-toolbar-arg-type.ts rename to code/addons/toolbars/src/utils/normalize-toolbar-arg-type.ts diff --git a/addons/toolbars/src/utils/register-shortcuts.ts b/code/addons/toolbars/src/utils/register-shortcuts.ts similarity index 95% rename from addons/toolbars/src/utils/register-shortcuts.ts rename to code/addons/toolbars/src/utils/register-shortcuts.ts index c7db90a441c2..2b91e2dae74a 100644 --- a/addons/toolbars/src/utils/register-shortcuts.ts +++ b/code/addons/toolbars/src/utils/register-shortcuts.ts @@ -1,4 +1,4 @@ -import type { API } from '@storybook/api'; +import type { API } from '@storybook/manager-api'; import { ADDON_ID } from '../constants'; import type { ToolbarShortcutConfig } from '../types'; diff --git a/code/addons/toolbars/template/stories/globals.stories.ts b/code/addons/toolbars/template/stories/globals.stories.ts new file mode 100644 index 000000000000..1a99081dd9c0 --- /dev/null +++ b/code/addons/toolbars/template/stories/globals.stories.ts @@ -0,0 +1,33 @@ +import { global as globalThis } from '@storybook/global'; +import type { PartialStoryFn, StoryContext } from '@storybook/types'; + +const greetingForLocale = (locale: string) => { + switch (locale) { + case 'es': + return 'Hola!'; + case 'fr': + return 'Bonjour !'; + case 'zh': + return '你好!'; + case 'kr': + return '안녕하세요!'; + case 'en': + default: + return 'Hello'; + } +}; + +export default { + component: globalThis.Components.Pre, + decorators: [ + (storyFn: PartialStoryFn, { globals }: StoryContext) => { + const object = { + ...globals, + caption: `Locale is '${globals.locale}', so I say: ${greetingForLocale(globals.locale)}`, + }; + return storyFn({ args: { object } }); + }, + ], +}; + +export const Basic = {}; diff --git a/code/addons/toolbars/template/stories/preview.ts b/code/addons/toolbars/template/stories/preview.ts new file mode 100644 index 000000000000..f51f24e743e0 --- /dev/null +++ b/code/addons/toolbars/template/stories/preview.ts @@ -0,0 +1,44 @@ +export const globalTypes = { + theme: { + name: 'Theme', + description: 'Global theme for components', + toolbar: { + icon: 'circlehollow', + title: 'Theme', + items: [ + { value: 'light', icon: 'circlehollow', title: 'light' }, + { value: 'dark', icon: 'circle', title: 'dark' }, + { value: 'side-by-side', icon: 'sidebar', title: 'side by side' }, + { value: 'stacked', icon: 'bottombar', title: 'stacked' }, + ], + }, + }, + locale: { + name: 'Locale', + description: 'Internationalization locale', + toolbar: { + icon: 'globe', + shortcuts: { + next: { + label: 'Go to next language', + keys: ['L'], + }, + previous: { + label: 'Go to previous language', + keys: ['K'], + }, + reset: { + label: 'Reset language', + keys: ['meta', 'shift', 'L'], + }, + }, + items: [ + { title: 'Reset locale', type: 'reset' }, + { value: 'en', right: '🇺🇸', title: 'English' }, + { value: 'es', right: '🇪🇸', title: 'Español' }, + { value: 'zh', right: '🇨🇳', title: '中文' }, + { value: 'kr', right: '🇰🇷', title: '한국어' }, + ], + }, + }, +}; diff --git a/code/addons/toolbars/tsconfig.json b/code/addons/toolbars/tsconfig.json new file mode 100644 index 000000000000..a4429176e35f --- /dev/null +++ b/code/addons/toolbars/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true + }, + "include": ["src/**/*"] +} diff --git a/code/addons/viewport/README.md b/code/addons/viewport/README.md new file mode 100644 index 000000000000..0c52306229d1 --- /dev/null +++ b/code/addons/viewport/README.md @@ -0,0 +1,29 @@ +# Storybook Viewport Addon + +Storybook Viewport Addon allows your stories to be displayed in different sizes and layouts in [Storybook](https://storybook.js.org). This helps build responsive components inside of Storybook. + +[Framework Support](https://storybook.js.org/docs/react/api/frameworks-feature-support) + +![Screenshot](https://raw.githubusercontent.com/storybookjs/storybook/next/code/addons/viewport/docs/viewport.png) + +## Installation + +Viewport is part of [essentials](https://storybook.js.org/docs/react/essentials/introduction) and so is installed in all new Storybooks by default. If you need to add it to your Storybook, you can run: + +```sh +npm i -D @storybook/addon-viewport +``` + +Then, add following content to [`.storybook/main.js`](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project): + +```js +module.exports = { + addons: ['@storybook/addon-viewport'], +}; +``` + +You should now be able to see the viewport addon icon in the the toolbar at the top of the screen. + +## Usage + +The usage is documented in the [documentation](https://storybook.js.org/docs/react/essentials/viewport). diff --git a/addons/viewport/docs/viewport.png b/code/addons/viewport/docs/viewport.png similarity index 100% rename from addons/viewport/docs/viewport.png rename to code/addons/viewport/docs/viewport.png diff --git a/code/addons/viewport/jest.config.js b/code/addons/viewport/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/addons/viewport/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/addons/viewport/manager.js b/code/addons/viewport/manager.js new file mode 100644 index 000000000000..8a2eae4ffce1 --- /dev/null +++ b/code/addons/viewport/manager.js @@ -0,0 +1 @@ +import './dist/manager'; diff --git a/code/addons/viewport/package.json b/code/addons/viewport/package.json new file mode 100644 index 000000000000..4a9fa54c68ce --- /dev/null +++ b/code/addons/viewport/package.json @@ -0,0 +1,120 @@ +{ + "name": "@storybook/addon-viewport", + "version": "7.0.0-beta.25", + "description": "Build responsive components by adjusting Storybook’s viewport size and orientation", + "keywords": [ + "addon", + "storybook", + "style", + "essentials" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/addons/viewport", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "addons/viewport" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./manager": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./preview": { + "require": "./dist/preview.ts", + "import": "./dist/preview.mjs", + "types": "./dist/preview.d.ts" + }, + "./register": { + "require": "./dist/manager.js", + "import": "./dist/manager.mjs", + "types": "./dist/manager.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "dist/index.d.ts" + ], + "manager": [ + "dist/manager.d.ts" + ], + "preview": [ + "dist/preview.d.ts" + ] + } + }, + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "memoizerific": "^1.11.3", + "prop-types": "^15.7.2" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/models/index.ts", + "./src/manager.tsx", + "./src/preview.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec", + "storybook": { + "displayName": "Viewport", + "icon": "https://user-images.githubusercontent.com/263385/101991678-48cdf300-3c7c-11eb-9764-f8af293c1b28.png", + "unsupportedFrameworks": [ + "react-native" + ] + } +} diff --git a/code/addons/viewport/src/Tool.tsx b/code/addons/viewport/src/Tool.tsx new file mode 100644 index 000000000000..ec14c0740fa3 --- /dev/null +++ b/code/addons/viewport/src/Tool.tsx @@ -0,0 +1,253 @@ +/* eslint-disable no-fallthrough */ +import type { ReactNode, FC } from 'react'; +import React, { Fragment, useEffect, useRef, memo } from 'react'; +import memoize from 'memoizerific'; + +import { styled, Global, type Theme, withTheme } from '@storybook/theming'; + +import { Icons, IconButton, WithTooltip, TooltipLinkList } from '@storybook/components'; + +import { useStorybookApi, useParameter, useAddonState } from '@storybook/manager-api'; +import { registerShortcuts } from './shortcuts'; +import { PARAM_KEY, ADDON_ID } from './constants'; +import { MINIMAL_VIEWPORTS } from './defaults'; +import type { ViewportAddonParameter, ViewportMap, ViewportStyles, Styles } from './models'; + +interface ViewportItem { + id: string; + title: string; + styles: Styles; + type: 'desktop' | 'mobile' | 'tablet' | 'other'; + default?: boolean; +} + +const toList = memoize(50)((items: ViewportMap): ViewportItem[] => [ + ...baseViewports, + ...Object.entries(items).map(([id, { name, ...rest }]) => ({ ...rest, id, title: name })), +]); + +const responsiveViewport: ViewportItem = { + id: 'reset', + title: 'Reset viewport', + styles: null, + type: 'other', +}; + +const baseViewports: ViewportItem[] = [responsiveViewport]; + +const toLinks = memoize(50)((list: ViewportItem[], active: LinkBase, set, state, close): Link[] => { + return list + .map((i) => { + switch (i.id) { + case responsiveViewport.id: { + if (active.id === i.id) { + return null; + } + } + default: { + return { + ...i, + onClick: () => { + set({ ...state, selected: i.id }); + close(); + }, + }; + } + } + }) + .filter(Boolean); +}); + +const wrapperId = 'storybook-preview-wrapper'; + +interface LinkBase { + id: string; + title: string; + right?: ReactNode; + type: 'desktop' | 'mobile' | 'tablet' | 'other'; + styles: ViewportStyles | ((s: ViewportStyles) => ViewportStyles) | null; +} + +interface Link extends LinkBase { + onClick: () => void; +} + +const flip = ({ width, height, ...styles }: ViewportStyles) => ({ + ...styles, + height: width, + width: height, +}); + +const ActiveViewportSize = styled.div(() => ({ + display: 'inline-flex', +})); + +const ActiveViewportLabel = styled.div(({ theme }) => ({ + display: 'inline-block', + textDecoration: 'none', + padding: 10, + fontWeight: theme.typography.weight.bold, + fontSize: theme.typography.size.s2 - 1, + lineHeight: '1', + height: 40, + border: 'none', + borderTop: '3px solid transparent', + borderBottom: '3px solid transparent', + background: 'transparent', +})); + +const IconButtonWithLabel = styled(IconButton)(() => ({ + display: 'inline-flex', + alignItems: 'center', +})); + +const IconButtonLabel = styled.div(({ theme }) => ({ + fontSize: theme.typography.size.s2 - 1, + marginLeft: 10, +})); + +interface ViewportToolState { + isRotated: boolean; + selected: string | null; +} + +const getStyles = ( + prevStyles: ViewportStyles, + styles: Styles, + isRotated: boolean +): ViewportStyles => { + if (styles === null) { + return null; + } + const result = typeof styles === 'function' ? styles(prevStyles) : styles; + return isRotated ? flip(result) : result; +}; + +export const ViewportTool: FC = memo( + withTheme(({ theme }: { theme: Theme }) => { + const { + viewports = MINIMAL_VIEWPORTS, + defaultViewport = responsiveViewport.id, + disable, + } = useParameter(PARAM_KEY, {}); + const [state, setState] = useAddonState(ADDON_ID, { + selected: defaultViewport, + isRotated: false, + }); + + const list = toList(viewports); + const api = useStorybookApi(); + + if (!list.find((i) => i.id === defaultViewport)) { + // eslint-disable-next-line no-console + console.warn( + `Cannot find "defaultViewport" of "${defaultViewport}" in addon-viewport configs, please check the "viewports" setting in the configuration.` + ); + } + + useEffect(() => { + registerShortcuts(api, setState, Object.keys(viewports)); + }, [viewports]); + + useEffect(() => { + setState({ + selected: + defaultViewport || (viewports[state.selected] ? state.selected : responsiveViewport.id), + isRotated: state.isRotated, + }); + }, [defaultViewport]); + + const { selected, isRotated } = state; + const item = + list.find((i) => i.id === selected) || + list.find((i) => i.id === defaultViewport) || + list.find((i) => i.default) || + responsiveViewport; + + const ref = useRef(); + + const styles = getStyles(ref.current, item.styles, isRotated); + + useEffect(() => { + ref.current = styles; + }, [item]); + + if (disable || Object.entries(viewports).length === 0) { + return null; + } + + return ( + + ( + + )} + closeOnClick + > + { + setState({ ...state, selected: responsiveViewport.id }); + }} + > + + {styles ? ( + + {isRotated ? `${item.title} (L)` : `${item.title} (P)`} + + ) : null} + + + + {styles ? ( + + + + {styles.width.replace('px', '')} + + { + setState({ ...state, isRotated: !isRotated }); + }} + > + + + + {styles.height.replace('px', '')} + + + ) : null} + + ); + }) +); diff --git a/addons/viewport/src/constants.ts b/code/addons/viewport/src/constants.ts similarity index 100% rename from addons/viewport/src/constants.ts rename to code/addons/viewport/src/constants.ts diff --git a/addons/viewport/src/defaults.ts b/code/addons/viewport/src/defaults.ts similarity index 98% rename from addons/viewport/src/defaults.ts rename to code/addons/viewport/src/defaults.ts index 754c6c78cbe2..a402f188bad5 100644 --- a/addons/viewport/src/defaults.ts +++ b/code/addons/viewport/src/defaults.ts @@ -1,4 +1,4 @@ -import { ViewportMap } from './models'; +import type { ViewportMap } from './models'; export const INITIAL_VIEWPORTS: ViewportMap = { iphone5: { diff --git a/code/addons/viewport/src/index.ts b/code/addons/viewport/src/index.ts new file mode 100644 index 000000000000..341f696ad7b5 --- /dev/null +++ b/code/addons/viewport/src/index.ts @@ -0,0 +1,3 @@ +export * from './constants'; +export * from './defaults'; +export * from './shortcuts'; diff --git a/code/addons/viewport/src/manager.tsx b/code/addons/viewport/src/manager.tsx new file mode 100644 index 000000000000..e42e3fba40e1 --- /dev/null +++ b/code/addons/viewport/src/manager.tsx @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { addons, types } from '@storybook/manager-api'; + +import { ADDON_ID } from './constants'; + +import { ViewportTool } from './Tool'; + +addons.register(ADDON_ID, () => { + addons.add(ADDON_ID, { + title: 'viewport / media-queries', + type: types.TOOL, + match: ({ viewMode }) => viewMode === 'story', + render: () => , + }); +}); diff --git a/addons/viewport/src/models/Viewport.ts b/code/addons/viewport/src/models/Viewport.ts similarity index 100% rename from addons/viewport/src/models/Viewport.ts rename to code/addons/viewport/src/models/Viewport.ts diff --git a/code/addons/viewport/src/models/ViewportAddonParameter.ts b/code/addons/viewport/src/models/ViewportAddonParameter.ts new file mode 100644 index 000000000000..190e2beae0ec --- /dev/null +++ b/code/addons/viewport/src/models/ViewportAddonParameter.ts @@ -0,0 +1,7 @@ +import type { ViewportMap } from './Viewport'; + +export interface ViewportAddonParameter { + disable?: boolean; + defaultViewport?: string; + viewports?: ViewportMap; +} diff --git a/addons/viewport/src/models/index.ts b/code/addons/viewport/src/models/index.ts similarity index 100% rename from addons/viewport/src/models/index.ts rename to code/addons/viewport/src/models/index.ts diff --git a/addons/viewport/src/preview.ts b/code/addons/viewport/src/preview.ts similarity index 100% rename from addons/viewport/src/preview.ts rename to code/addons/viewport/src/preview.ts diff --git a/code/addons/viewport/src/shortcuts.ts b/code/addons/viewport/src/shortcuts.ts new file mode 100644 index 000000000000..39cff92af12b --- /dev/null +++ b/code/addons/viewport/src/shortcuts.ts @@ -0,0 +1,65 @@ +import type { API } from '@storybook/manager-api'; +import { ADDON_ID } from './constants'; + +type State = { + selected: string; + isRotated: boolean; +}; + +const getCurrentViewportIndex = (viewportsKeys: string[], current: string): number => + viewportsKeys.indexOf(current); + +const getNextViewport = (viewportsKeys: string[], current: string): string => { + const currentViewportIndex = getCurrentViewportIndex(viewportsKeys, current); + return currentViewportIndex === viewportsKeys.length - 1 + ? viewportsKeys[0] + : viewportsKeys[currentViewportIndex + 1]; +}; + +const getPreviousViewport = (viewportsKeys: string[], current: string): string => { + const currentViewportIndex = getCurrentViewportIndex(viewportsKeys, current); + return currentViewportIndex < 1 + ? viewportsKeys[viewportsKeys.length - 1] + : viewportsKeys[currentViewportIndex - 1]; +}; + +export const registerShortcuts = async (api: API, setState: any, viewportsKeys: string[]) => { + await api.setAddonShortcut(ADDON_ID, { + label: 'Previous viewport', + defaultShortcut: ['shift', 'V'], + actionName: 'previous', + action: () => { + const { selected, isRotated } = api.getAddonState(ADDON_ID); + setState({ + selected: getPreviousViewport(viewportsKeys, selected), + isRotated, + }); + }, + }); + + await api.setAddonShortcut(ADDON_ID, { + label: 'Next viewport', + defaultShortcut: ['V'], + actionName: 'next', + action: () => { + const { selected, isRotated } = api.getAddonState(ADDON_ID); + setState({ + selected: getNextViewport(viewportsKeys, selected), + isRotated, + }); + }, + }); + + await api.setAddonShortcut(ADDON_ID, { + label: 'Reset viewport', + defaultShortcut: ['alt', 'V'], + actionName: 'reset', + action: () => { + const { isRotated } = api.getAddonState(ADDON_ID); + setState({ + selected: 'reset', + isRotated, + }); + }, + }); +}; diff --git a/code/addons/viewport/template/stories/parameters.stories.ts b/code/addons/viewport/template/stories/parameters.stories.ts new file mode 100644 index 000000000000..8ea3a1bbc4dc --- /dev/null +++ b/code/addons/viewport/template/stories/parameters.stories.ts @@ -0,0 +1,51 @@ +import { global as globalThis } from '@storybook/global'; +import { MINIMAL_VIEWPORTS } from '@storybook/addon-viewport'; + +export default { + component: globalThis.Components.Button, + args: { + label: 'Click Me!', + }, + parameters: { + viewport: { + viewports: MINIMAL_VIEWPORTS, + }, + chromatic: { disable: true }, + }, +}; + +export const Basic = { + parameters: {}, +}; + +export const Selected = { + parameters: { + viewport: { + defaultViewport: Object.keys(MINIMAL_VIEWPORTS)[0], + }, + }, +}; + +export const Custom = { + parameters: { + viewport: { + defaultViewport: 'phone', + viewports: { + phone: { + name: 'Phone Width', + styles: { + height: '600px', + width: '100vh', + }, + type: 'mobile', + }, + }, + }, + }, +}; + +export const Disabled = { + parameters: { + viewport: { disable: true }, + }, +}; diff --git a/code/addons/viewport/tsconfig.json b/code/addons/viewport/tsconfig.json new file mode 100644 index 000000000000..52d43eaaa9b9 --- /dev/null +++ b/code/addons/viewport/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/code/e2e-tests/addon-actions.spec.ts b/code/e2e-tests/addon-actions.spec.ts new file mode 100644 index 000000000000..a38b6b82d118 --- /dev/null +++ b/code/e2e-tests/addon-actions.spec.ts @@ -0,0 +1,27 @@ +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; + +test.describe('addon-actions', () => { + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + await new SbPage(page).waitUntilLoaded(); + }); + + test('should trigger an action', async ({ page }) => { + const sbPage = new SbPage(page); + + await sbPage.navigateToStory('example/button', 'primary'); + const root = sbPage.previewRoot(); + const button = root.locator('button', { hasText: 'Button' }); + await button.click(); + + await sbPage.viewAddonPanel('Actions'); + const logItem = await page.locator('#storybook-panel-root #panel-tab-content', { + hasText: 'click', + }); + await expect(logItem).toBeVisible(); + }); +}); diff --git a/code/e2e-tests/addon-backgrounds.spec.ts b/code/e2e-tests/addon-backgrounds.spec.ts new file mode 100644 index 000000000000..a3ea50f9d454 --- /dev/null +++ b/code/e2e-tests/addon-backgrounds.spec.ts @@ -0,0 +1,30 @@ +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; + +test.describe('addon-backgrounds', () => { + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + await new SbPage(page).waitUntilLoaded(); + }); + + test('should have a dark background', async ({ page }) => { + const sbPage = new SbPage(page); + + await sbPage.navigateToStory('example/button', 'primary'); + await sbPage.selectToolbar('[title="Change the background of the preview"]', '#dark'); + + await expect(sbPage.getCanvasBodyElement()).toHaveCSS('background-color', 'rgb(51, 51, 51)'); + }); + + test('should apply a grid', async ({ page }) => { + const sbPage = new SbPage(page); + + await sbPage.navigateToStory('example/button', 'primary'); + await sbPage.selectToolbar('[title="Apply a grid to the preview"]'); + + await expect(sbPage.getCanvasBodyElement()).toHaveCSS('background-image', /linear-gradient/); + }); +}); diff --git a/code/e2e-tests/addon-controls.spec.ts b/code/e2e-tests/addon-controls.spec.ts new file mode 100644 index 000000000000..bcbf96019947 --- /dev/null +++ b/code/e2e-tests/addon-controls.spec.ts @@ -0,0 +1,73 @@ +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; + +test.describe('addon-controls', () => { + test('should change component when changing controls', async ({ page }) => { + await page.goto(storybookUrl); + const sbPage = new SbPage(page); + await sbPage.waitUntilLoaded(); + + await sbPage.navigateToStory('example/button', 'primary'); + await sbPage.viewAddonPanel('Controls'); + + // Text input: Label + await expect(sbPage.previewRoot().locator('button')).toContainText('Button'); + const label = sbPage.panelContent().locator('textarea[name=label]'); + await label.fill('Hello world'); + await expect(sbPage.previewRoot().locator('button')).toContainText('Hello world'); + + // Args in URL + await page.waitForTimeout(300); + const url = await page.url(); + await expect(url).toContain('args=label:Hello+world'); + + // Boolean toggle: Primary/secondary + await expect(sbPage.previewRoot().locator('button')).toHaveCSS( + 'background-color', + 'rgb(30, 167, 253)' + ); + const toggle = sbPage.panelContent().locator('input[name=primary]'); + await toggle.click(); + await expect(sbPage.previewRoot().locator('button')).toHaveCSS( + 'background-color', + 'rgba(0, 0, 0, 0)' + ); + + // Color picker: Background color + const color = sbPage.panelContent().locator('input[placeholder="Choose color..."]'); + await color.fill('red'); + await expect(sbPage.previewRoot().locator('button')).toHaveCSS( + 'background-color', + 'rgb(255, 0, 0)' + ); + + // TODO: enable this once the controls for size are aligned in all CLI templates. + // Radio buttons: Size + // cy.getStoryElement().find('button').should('have.css', 'font-size', '14px'); + // cy.get('label[for="size-large"]').click(); + // cy.getStoryElement().find('button').should('have.css', 'font-size', '16px'); + + // Reset controls: assert that the component is back to original state + const reset = sbPage.panelContent().locator('button[title="Reset controls"]'); + await reset.click(); + const button = sbPage.previewRoot().locator('button'); + await expect(button).toHaveCSS('font-size', '14px'); + await expect(button).toHaveCSS('background-color', 'rgb(30, 167, 253)'); + await expect(button).toContainText('Button'); + }); + + test('should apply controls automatically when passed via url', async ({ page }) => { + await page.goto(`${storybookUrl}?path=/story/example-button--primary&args=label:Hello+world`); + + const sbPage = new SbPage(page); + await sbPage.waitUntilLoaded(); + await expect(sbPage.previewRoot().locator('button')).toContainText('Hello world'); + + await sbPage.viewAddonPanel('Controls'); + const label = await sbPage.panelContent().locator('textarea[name=label]').inputValue(); + await expect(label).toEqual('Hello world'); + }); +}); diff --git a/code/e2e-tests/addon-docs.spec.ts b/code/e2e-tests/addon-docs.spec.ts new file mode 100644 index 000000000000..402ba144ece0 --- /dev/null +++ b/code/e2e-tests/addon-docs.spec.ts @@ -0,0 +1,68 @@ +/* eslint-disable jest/no-disabled-tests */ +/* eslint-disable no-await-in-loop */ +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; +const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; + +test.describe('addon-docs', () => { + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + await new SbPage(page).waitUntilLoaded(); + }); + + test('should provide source snippet', async ({ page }) => { + // templateName is e.g. 'Vue-CLI (Default JS)' + test.skip( + // eslint-disable-next-line jest/valid-title + /^(vue3|vue-cli|preact)/i.test(`${templateName}`), + `Skipping ${templateName}, which does not support dynamic source snippets` + ); + + const sbPage = new SbPage(page); + await sbPage.navigateToStory('addons/docs/docspage/basic', 'docs'); + const root = sbPage.previewRoot(); + const toggles = root.locator('.docblock-code-toggle'); + + const toggleCount = await toggles.count(); + for (let i = 0; i < toggleCount; i += 1) { + const toggle = await toggles.nth(i); + await toggle.click({ force: true }); + } + + const codes = root.locator('pre.prismjs'); + const codeCount = await codes.count(); + for (let i = 0; i < codeCount; i += 1) { + const code = await codes.nth(i); + const text = await code.innerText(); + await expect(text).not.toMatch(/^\(args\) => /); + } + }); + + test('should not run autoplay stories without parameter', async ({ page }) => { + const sbPage = new SbPage(page); + await sbPage.navigateToStory('addons/docs/docspage/autoplay', 'docs'); + + const root = sbPage.previewRoot(); + const autoplayPre = root.locator('#story--addons-docs-docspage-autoplay--autoplay pre'); + await expect(autoplayPre).toHaveText('Play has run'); + + const noAutoplayPre = root.locator('#story--addons-docs-docspage-autoplay--no-autoplay pre'); + await expect(noAutoplayPre).toHaveText('Play has not run'); + }); + + test('should order entries correctly', async ({ page }) => { + const sbPage = new SbPage(page); + await sbPage.navigateToStory('addons/docs/docspage/basic', 'docs'); + + // The `` block should render the "Basic" story, and the `` block should + // render the "Another" story + const root = sbPage.previewRoot(); + const stories = root.locator('.sbdocs-h3'); + + await expect(await stories.count()).toBe(1); + await expect(stories.first()).toHaveText('Another'); + }); +}); diff --git a/code/e2e-tests/addon-interactions.spec.ts b/code/e2e-tests/addon-interactions.spec.ts new file mode 100644 index 000000000000..f7dc82ce8868 --- /dev/null +++ b/code/e2e-tests/addon-interactions.spec.ts @@ -0,0 +1,112 @@ +/* eslint-disable jest/no-disabled-tests */ +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; +const templateName = process.env.STORYBOOK_TEMPLATE_NAME || ''; + +test.describe('addon-interactions', () => { + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + await new SbPage(page).waitUntilLoaded(); + }); + + // FIXME: skip xxx + test('should have interactions', async ({ page }) => { + // templateName is e.g. 'Vue-CLI (Default JS)' + test.skip( + // eslint-disable-next-line jest/valid-title + /^(lit)/i.test(`${templateName}`), + `Skipping ${templateName}, which does not support addon-interactions` + ); + + const sbPage = new SbPage(page); + + await sbPage.navigateToStory('example/page', 'logged-in'); + await sbPage.viewAddonPanel('Interactions'); + + const welcome = await sbPage.previewRoot().locator('.welcome'); + await expect(welcome).toContainText('Welcome, Jane Doe!'); + + const interactionsTab = await page.locator('#tabbutton-interactions'); + await expect(interactionsTab).toContainText(/(1)/); + await expect(interactionsTab).toBeVisible(); + + const panel = sbPage.panelContent(); + await expect(panel).toContainText(/Pass/); + await expect(panel).toContainText(/userEvent.click/); + await expect(panel).toBeVisible(); + + const done = await panel.locator('[data-testid=icon-done]'); + await expect(done).toBeVisible(); + }); + + test('should step through interactions', async ({ page }) => { + // templateName is e.g. 'Vue-CLI (Default JS)' + test.skip( + // eslint-disable-next-line jest/valid-title + /^(lit)/i.test(`${templateName}`), + `Skipping ${templateName}, which does not support addon-interactions` + ); + + const sbPage = new SbPage(page); + + await sbPage.navigateToStory('addons/interactions/basics', 'type-and-clear'); + await sbPage.viewAddonPanel('Interactions'); + + // Test initial state - Interactions have run, count is correct and values are as expected + const formInput = await sbPage.previewRoot().locator('#interaction-test-form input'); + await expect(formInput).toHaveValue('final value'); + + const interactionsTab = await page.locator('#tabbutton-interactions'); + await expect(interactionsTab).toContainText(/(3)/); + await expect(interactionsTab).toBeVisible(); + + const panel = sbPage.panelContent(); + const runStatusBadge = await panel.locator('[aria-label="Status of the test run"]'); + await expect(runStatusBadge).toContainText(/Pass/); + await expect(panel).toContainText(/value: "initial value"/); + await expect(panel).toContainText(/value: ""/); + await expect(panel).toContainText(/value: "final value"/); + await expect(panel).toBeVisible(); + + // Test interactions debugger - Stepping through works, count is correct and values are as expected + const interactionsRow = await panel.locator('[aria-label="Interaction step"]'); + + await interactionsRow.first().isVisible(); + + await expect(await interactionsRow.count()).toEqual(3); + const firstInteraction = interactionsRow.first(); + await firstInteraction.click(); + + await expect(runStatusBadge).toContainText(/Runs/); + await expect(formInput).toHaveValue('initial value'); + + const goForwardBtn = await panel.locator('[aria-label="Go forward"]'); + await goForwardBtn.click(); + await expect(formInput).toHaveValue(''); + await goForwardBtn.click(); + await expect(formInput).toHaveValue('final value'); + + await expect(runStatusBadge).toContainText(/Pass/); + + // Test rerun state (from addon panel) - Interactions have rerun, count is correct and values are as expected + const rerunInteractionButton = await panel.locator('[aria-label="Rerun"]'); + await rerunInteractionButton.click(); + await interactionsRow.first().isVisible(); + await interactionsRow.nth(1).isVisible(); + await interactionsRow.nth(2).isVisible(); + await expect(interactionsTab).toContainText(/(3)/); + await expect(interactionsTab).toBeVisible(); + + // Test remount state (from toolbar) - Interactions have rerun, count is correct and values are as expected + const remountComponentButton = await page.locator('[title="Remount component"]'); + await remountComponentButton.click(); + await interactionsRow.first().isVisible(); + await interactionsRow.nth(1).isVisible(); + await interactionsRow.nth(2).isVisible(); + await expect(interactionsTab).toContainText(/(3)/); + await expect(interactionsTab).toBeVisible(); + }); +}); diff --git a/code/e2e-tests/addon-viewport.spec.ts b/code/e2e-tests/addon-viewport.spec.ts new file mode 100644 index 000000000000..f15b9fa55704 --- /dev/null +++ b/code/e2e-tests/addon-viewport.spec.ts @@ -0,0 +1,23 @@ +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; + +test.describe('addon-viewport', () => { + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + await new SbPage(page).waitUntilLoaded(); + }); + + test('should have viewport button in the toolbar', async ({ page }) => { + const sbPage = new SbPage(page); + + // Click on viewport button and select small mobile + await sbPage.navigateToStory('example/button', 'primary'); + await sbPage.selectToolbar('[title="Change the size of the preview"]', '#mobile1'); + + // Check that Button story is still displayed + await expect(sbPage.previewRoot()).toContainText('Button'); + }); +}); diff --git a/code/e2e-tests/framework-nextjs.spec.ts b/code/e2e-tests/framework-nextjs.spec.ts new file mode 100644 index 000000000000..a40765842fe4 --- /dev/null +++ b/code/e2e-tests/framework-nextjs.spec.ts @@ -0,0 +1,90 @@ +/* eslint-disable jest/no-disabled-tests */ +import type { Locator } from '@playwright/test'; +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:6006'; +const templateName = process.env.STORYBOOK_TEMPLATE_NAME; + +test.describe('Next.js', () => { + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + await new SbPage(page).waitUntilLoaded(); + }); + + test.describe('next/navigation', () => { + test.skip( + // eslint-disable-next-line jest/valid-title + !templateName.includes('nextjs/default-js'), + 'Only run this test for the Frameworks that support next/navigation' + ); + + let root: Locator; + let sbPage: SbPage; + + function testRoutingBehaviour(buttonText: string, action: string) { + test(`should trigger ${action} action`, async ({ page }) => { + const button = root.locator('button', { hasText: buttonText }); + await button.click(); + + await sbPage.viewAddonPanel('Actions'); + const logItem = await page.locator('#storybook-panel-root #panel-tab-content', { + hasText: `nextNavigation.${action}`, + }); + await expect(logItem).toBeVisible(); + }); + } + + test.beforeEach(async ({ page }) => { + sbPage = new SbPage(page); + + await sbPage.navigateToStory('frameworks/nextjs_default-js/Navigation', 'default'); + root = sbPage.previewRoot(); + }); + + testRoutingBehaviour('Go back', 'back'); + testRoutingBehaviour('Go forward', 'forward'); + testRoutingBehaviour('Prefetch', 'prefetch'); + testRoutingBehaviour('Push HTML', 'push'); + testRoutingBehaviour('Refresh', 'refresh'); + testRoutingBehaviour('Replace', 'replace'); + }); + + test.describe('next/router', () => { + test.skip( + // eslint-disable-next-line jest/valid-title + !templateName.includes('nextjs'), + 'Only run this test for the Frameworks that support next/router' + ); + + let root: Locator; + let sbPage: SbPage; + + function testRoutingBehaviour(buttonText: string, action: string) { + test(`should trigger ${action} action`, async ({ page }) => { + const button = root.locator('button', { hasText: buttonText }); + await button.click(); + + await sbPage.viewAddonPanel('Actions'); + const logItem = await page.locator('#storybook-panel-root #panel-tab-content', { + hasText: `nextRouter.${action}`, + }); + await expect(logItem).toBeVisible(); + }); + } + + test.beforeEach(async ({ page }) => { + sbPage = new SbPage(page); + + await sbPage.navigateToStory('frameworks/nextjs_default-js/Router', 'default'); + root = sbPage.previewRoot(); + }); + + testRoutingBehaviour('Go back', 'back'); + testRoutingBehaviour('Go forward', 'forward'); + testRoutingBehaviour('Prefetch', 'prefetch'); + testRoutingBehaviour('Push HTML', 'push'); + testRoutingBehaviour('Replace', 'replace'); + }); +}); diff --git a/code/e2e-tests/preview-web.spec.ts b/code/e2e-tests/preview-web.spec.ts new file mode 100644 index 000000000000..3dec28a68910 --- /dev/null +++ b/code/e2e-tests/preview-web.spec.ts @@ -0,0 +1,32 @@ +import { test, expect } from '@playwright/test'; +import process from 'process'; +import { SbPage } from './util'; + +const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001'; + +test.describe('preview-web', () => { + test.beforeEach(async ({ page }) => { + await page.goto(storybookUrl); + await new SbPage(page).waitUntilLoaded(); + }); + + test('should pass over shortcuts, but not from play functions, story', async ({ page }) => { + const sbPage = new SbPage(page); + await sbPage.navigateToStory('lib/store/shortcuts', 'keydown-during-play'); + + await expect(sbPage.page.locator('.sidebar-container')).toBeVisible(); + + await sbPage.previewRoot().locator('button').press('s'); + await expect(sbPage.page.locator('.sidebar-container')).not.toBeVisible(); + }); + + test('should pass over shortcuts, but not from play functions, docs', async ({ page }) => { + const sbPage = new SbPage(page); + await sbPage.navigateToStory('lib/store/shortcuts', 'docs'); + + await expect(sbPage.page.locator('.sidebar-container')).toBeVisible(); + + await sbPage.previewRoot().getByRole('button').getByText('Submit').press('s'); + await expect(sbPage.page.locator('.sidebar-container')).not.toBeVisible(); + }); +}); diff --git a/code/e2e-tests/util.ts b/code/e2e-tests/util.ts new file mode 100644 index 000000000000..1630dbadbdc3 --- /dev/null +++ b/code/e2e-tests/util.ts @@ -0,0 +1,84 @@ +/* eslint-disable jest/no-standalone-expect, no-await-in-loop */ +import type { Page } from '@playwright/test'; +import { expect } from '@playwright/test'; +import { toId } from '@storybook/csf'; + +export class SbPage { + readonly page: Page; + + constructor(page: Page) { + this.page = page; + } + + async openComponent(title: string, hasRoot = true) { + const parts = title.split('/'); + for (let i = hasRoot ? 1 : 0; i < parts.length; i += 1) { + const parentId = toId(parts.slice(0, i + 1).join('/')); + + const parentLink = this.page.locator(`#${parentId}`); + + await expect(parentLink).toBeVisible(); + if ((await parentLink.getAttribute('aria-expanded')) === 'false') { + await parentLink.click(); + } + } + } + + async navigateToStory(title: string, name: string) { + await this.openComponent(title); + + const titleId = toId(title); + const storyId = toId(name); + const storyLinkId = `#${titleId}--${storyId}`; + await this.page.waitForSelector(storyLinkId); + const storyLink = this.page.locator(storyLinkId); + await storyLink.click({ force: true }); + + // assert url changes + const viewMode = name === 'docs' ? 'docs' : 'story'; + + const url = this.page.url(); + await expect(url).toContain(`path=/${viewMode}/${titleId}--${storyId}`); + + const selected = await storyLink.getAttribute('data-selected'); + await expect(selected).toBe('true'); + } + + async waitUntilLoaded() { + const root = this.previewRoot(); + const docsLoadingPage = root.locator('.sb-preparing-docs'); + const storyLoadingPage = root.locator('.sb-preparing-story'); + await docsLoadingPage.waitFor({ state: 'hidden' }); + await storyLoadingPage.waitFor({ state: 'hidden' }); + } + + previewIframe() { + return this.page.frameLocator('#storybook-preview-iframe'); + } + + previewRoot() { + const preview = this.previewIframe(); + return preview.locator('#storybook-root:visible, #storybook-docs:visible'); + } + + panelContent() { + return this.page.locator('#storybook-panel-root #panel-tab-content'); + } + + async viewAddonPanel(name: string) { + const tabs = await this.page.locator('[role=tablist] button[role=tab]'); + const tab = tabs.locator(`text=/^${name}/`); + await tab.click(); + } + + async selectToolbar(toolbarSelector: string, itemSelector?: string) { + await this.page.locator(toolbarSelector).click(); + if (itemSelector) { + await this.page.locator(itemSelector).click(); + } + } + + getCanvasBodyElement() { + return this.previewIframe().locator('body'); + } +} diff --git a/code/frameworks/angular/.eslintrc.js b/code/frameworks/angular/.eslintrc.js new file mode 100644 index 000000000000..4275130969fb --- /dev/null +++ b/code/frameworks/angular/.eslintrc.js @@ -0,0 +1,8 @@ +module.exports = { + rules: { + '@typescript-eslint/consistent-type-imports': [ + 'error', + { prefer: 'no-type-imports', disallowTypeAnnotations: false }, + ], + }, +}; diff --git a/code/frameworks/angular/README.md b/code/frameworks/angular/README.md new file mode 100644 index 000000000000..ceb998025f85 --- /dev/null +++ b/code/frameworks/angular/README.md @@ -0,0 +1,23 @@ +# Storybook for Angular + +Storybook for Angular is a UI development environment for your Angular components. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-angular-app +npx storybook init +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/angular/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. diff --git a/code/frameworks/angular/jest.config.js b/code/frameworks/angular/jest.config.js new file mode 100644 index 000000000000..dc0ffa5cecd4 --- /dev/null +++ b/code/frameworks/angular/jest.config.js @@ -0,0 +1,12 @@ +const path = require('path'); + +module.exports = { + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), + preset: 'jest-preset-angular', + setupFilesAfterEnv: ['/setup-jest.ts'], + transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid)'], + snapshotFormat: { + escapeString: true, + printBasicPrototype: true, + }, +}; diff --git a/code/frameworks/angular/package.json b/code/frameworks/angular/package.json new file mode 100644 index 000000000000..6eefeac66385 --- /dev/null +++ b/code/frameworks/angular/package.json @@ -0,0 +1,131 @@ +{ + "name": "@storybook/angular", + "version": "7.0.0-beta.25", + "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.", + "keywords": [ + "storybook", + "angular" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/angular", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/angular" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.mjs", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc", + "prep": "../../../scripts/prepare/tsc.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/core-client": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/core-server": "7.0.0-beta.25", + "@storybook/core-webpack": "7.0.0-beta.25", + "@storybook/docs-tools": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "@types/node": "^16.0.0", + "@types/react": "^16.14.34", + "@types/react-dom": "^16.9.14", + "@types/semver": "^7.3.4", + "@types/webpack-env": "^1.18.0", + "core-js": "^3.8.2", + "find-up": "^5.0.0", + "read-pkg-up": "^7.0.1", + "semver": "^7.3.7", + "telejson": "^7.0.3", + "ts-dedent": "^2.0.0", + "tsconfig-paths-webpack-plugin": "^3.5.2", + "util-deprecate": "^1.0.2", + "webpack": "5" + }, + "devDependencies": { + "@angular-devkit/architect": "^0.1303.5", + "@angular-devkit/build-angular": "^13.3.5", + "@angular-devkit/core": "^13.3.5", + "@angular/cli": "^13.3.5", + "@angular/common": "^13.3.6", + "@angular/compiler": "^13.3.6", + "@angular/compiler-cli": "^13.3.6", + "@angular/core": "^13.3.6", + "@angular/forms": "^13.3.6", + "@angular/platform-browser": "^13.3.6", + "@angular/platform-browser-dynamic": "^13.3.6", + "@nrwl/workspace": "14.6.1", + "@types/rimraf": "^3.0.2", + "@types/tmp": "^0.2.3", + "cross-spawn": "^7.0.3", + "jest": "^29.3.1", + "jest-preset-angular": "^12.0.0", + "jest-specific-snapshot": "^7.0.0", + "rimraf": "^3.0.2", + "tmp": "^0.2.1", + "typescript": "~4.9.3", + "webpack": "5", + "zone.js": "^0.12.0" + }, + "peerDependencies": { + "@angular-devkit/architect": ">=0.1300.0", + "@angular-devkit/build-angular": ">=13.0.0", + "@angular-devkit/core": ">=13.0.0", + "@angular/cli": ">=13.0.0", + "@angular/common": ">=13.0.0", + "@angular/compiler": ">=13.0.0", + "@angular/compiler-cli": ">=13.0.0", + "@angular/core": ">=13.0.0", + "@angular/forms": ">=13.0.0", + "@angular/platform-browser": ">=13.0.0", + "@angular/platform-browser-dynamic": ">=13.0.0", + "@babel/core": "*", + "@nrwl/workspace": "14.6.1", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "rxjs": "^6.0.0 || ^7.4.0", + "typescript": "^4.0.0", + "zone.js": "^0.8.29 || >= 0.9.0 < 1.0.0" + }, + "peerDependenciesMeta": { + "@angular/cli": { + "optional": true + }, + "@nrwl/workspace": { + "optional": true + } + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "builders": "dist/builders/builders.json", + "bundler": { + "tsConfig": "tsconfig.build.json" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/angular/preset.js b/code/frameworks/angular/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/angular/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/angular/renderer.d.ts b/code/frameworks/angular/renderer.d.ts new file mode 100644 index 000000000000..1bea89cf1a7e --- /dev/null +++ b/code/frameworks/angular/renderer.d.ts @@ -0,0 +1 @@ +export * from './dist/renderer.d'; diff --git a/code/frameworks/angular/renderer.js b/code/frameworks/angular/renderer.js new file mode 100644 index 000000000000..42130de99ec7 --- /dev/null +++ b/code/frameworks/angular/renderer.js @@ -0,0 +1 @@ +module.exports = require('./dist/renderer'); diff --git a/code/frameworks/angular/setup-jest.ts b/code/frameworks/angular/setup-jest.ts new file mode 100644 index 000000000000..06e753a2e78e --- /dev/null +++ b/code/frameworks/angular/setup-jest.ts @@ -0,0 +1,12 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import 'jest-preset-angular/setup-jest'; + +import { webcrypto } from 'node:crypto'; + +Object.defineProperty(window, 'crypto', { + get() { + return webcrypto; + }, +}); + +global.EventSource = class {} as any; diff --git a/code/frameworks/angular/src/builders/build-storybook/index.spec.ts b/code/frameworks/angular/src/builders/build-storybook/index.spec.ts new file mode 100644 index 000000000000..c5164efcf99e --- /dev/null +++ b/code/frameworks/angular/src/builders/build-storybook/index.spec.ts @@ -0,0 +1,238 @@ +import { Architect, createBuilder } from '@angular-devkit/architect'; +import { TestingArchitectHost } from '@angular-devkit/architect/testing'; +import { schema } from '@angular-devkit/core'; +import * as path from 'path'; + +const buildDevStandaloneMock = jest.fn(); +const buildStaticStandaloneMock = jest.fn(); +const buildMock = { + buildDevStandalone: buildDevStandaloneMock, + buildStaticStandalone: buildStaticStandaloneMock, +}; +jest.doMock('@storybook/core-server', () => buildMock); +jest.doMock('find-up', () => ({ sync: () => './storybook/tsconfig.ts' })); + +const cpSpawnMock = { + spawn: jest.fn(), +}; +jest.doMock('child_process', () => cpSpawnMock); + +describe('Build Storybook Builder', () => { + let architect: Architect; + let architectHost: TestingArchitectHost; + + beforeEach(async () => { + const registry = new schema.CoreSchemaRegistry(); + registry.addPostTransform(schema.transforms.addUndefinedDefaults); + + architectHost = new TestingArchitectHost(); + architect = new Architect(architectHost, registry); + + architectHost.addBuilder( + '@angular-devkit/build-angular:browser', + createBuilder(() => { + return { success: true }; + }) + ); + architectHost.addTarget( + { project: 'angular-cli', target: 'build-2' }, + '@angular-devkit/build-angular:browser', + { + outputPath: 'dist/angular-cli', + index: 'src/index.html', + main: 'src/main.ts', + polyfills: 'src/polyfills.ts', + tsConfig: 'src/tsconfig.app.json', + assets: ['src/favicon.ico', 'src/assets'], + styles: ['src/styles.css'], + scripts: [], + } + ); + + // This will either take a Node package name, or a path to the directory + // for the package.json file. + await architectHost.addBuilderFromPackage(path.join(__dirname, '../../..')); + }); + + beforeEach(() => { + buildStaticStandaloneMock.mockImplementation((_options: unknown) => Promise.resolve()); + cpSpawnMock.spawn.mockImplementation(() => ({ + stdout: { on: () => {} }, + stderr: { on: () => {} }, + on: (_event: string, cb: any) => cb(0), + })); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('should start storybook with angularBrowserTarget', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:build-storybook', { + browserTarget: 'angular-cli:build-2', + compodoc: false, + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: 'angular-cli:build-2', + angularBuilderContext: expect.any(Object), + angularBuilderOptions: {}, + configDir: '.storybook', + docs: undefined, + loglevel: undefined, + quiet: false, + outputDir: 'storybook-static', + packageJson: expect.any(Object), + mode: 'static', + tsConfig: './storybook/tsconfig.ts', + webpackStatsJson: false, + }); + }); + + it('should start storybook with tsConfig', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:build-storybook', { + tsConfig: 'path/to/tsConfig.json', + compodoc: false, + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: null, + angularBuilderContext: expect.any(Object), + angularBuilderOptions: {}, + configDir: '.storybook', + docs: undefined, + loglevel: undefined, + quiet: false, + outputDir: 'storybook-static', + packageJson: expect.any(Object), + mode: 'static', + tsConfig: 'path/to/tsConfig.json', + webpackStatsJson: false, + }); + }); + + it('should build storybook with webpack stats.json', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:build-storybook', { + tsConfig: 'path/to/tsConfig.json', + compodoc: false, + webpackStatsJson: true, + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: null, + angularBuilderContext: expect.any(Object), + angularBuilderOptions: {}, + configDir: '.storybook', + docs: undefined, + loglevel: undefined, + quiet: false, + outputDir: 'storybook-static', + packageJson: expect.any(Object), + mode: 'static', + tsConfig: 'path/to/tsConfig.json', + webpackStatsJson: true, + }); + }); + + it('should throw error', async () => { + buildStaticStandaloneMock.mockRejectedValue(true); + + const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { + browserTarget: 'angular-cli:build-2', + port: 4400, + compodoc: false, + }); + + try { + await run.result; + + expect(false).toEqual('Throw expected'); + } catch (error) { + // eslint-disable-next-line jest/no-try-expect, jest/no-conditional-expect + expect(error).toEqual( + 'Broken build, fix the error above.\nYou may need to refresh the browser.' + ); + } + }); + + it('should run compodoc', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:build-storybook', { + browserTarget: 'angular-cli:build-2', + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).toHaveBeenCalledWith( + 'npx', + ['compodoc', '-p', './storybook/tsconfig.ts', '-d', '', '-e', 'json'], + { + cwd: '', + shell: true, + } + ); + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: 'angular-cli:build-2', + angularBuilderContext: expect.any(Object), + angularBuilderOptions: {}, + configDir: '.storybook', + docs: undefined, + loglevel: undefined, + quiet: false, + outputDir: 'storybook-static', + packageJson: expect.any(Object), + mode: 'static', + tsConfig: './storybook/tsconfig.ts', + webpackStatsJson: false, + }); + }); + + it('should start storybook with styles options', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:build-storybook', { + tsConfig: 'path/to/tsConfig.json', + compodoc: false, + styles: ['style.scss'], + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); + expect(buildStaticStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: null, + angularBuilderContext: expect.any(Object), + angularBuilderOptions: { styles: ['style.scss'] }, + configDir: '.storybook', + docs: undefined, + loglevel: undefined, + quiet: false, + outputDir: 'storybook-static', + packageJson: expect.any(Object), + mode: 'static', + tsConfig: 'path/to/tsConfig.json', + webpackStatsJson: false, + }); + }); +}); diff --git a/code/frameworks/angular/src/builders/build-storybook/index.ts b/code/frameworks/angular/src/builders/build-storybook/index.ts new file mode 100644 index 000000000000..30314f72bbf7 --- /dev/null +++ b/code/frameworks/angular/src/builders/build-storybook/index.ts @@ -0,0 +1,118 @@ +import { + BuilderContext, + BuilderOutput, + Target, + createBuilder, + targetFromTargetString, +} from '@angular-devkit/architect'; +import { JsonObject } from '@angular-devkit/core'; +import { Observable, from, of, throwError } from 'rxjs'; +import { CLIOptions } from '@storybook/types'; +import { catchError, map, mapTo, switchMap } from 'rxjs/operators'; +import { sync as findUpSync } from 'find-up'; +import { sync as readUpSync } from 'read-pkg-up'; +import { + BrowserBuilderOptions, + ExtraEntryPoint, + StylePreprocessorOptions, +} from '@angular-devkit/build-angular'; + +import { buildStaticStandalone } from '@storybook/core-server'; +import { StandaloneOptions } from '../utils/standalone-options'; +import { runCompodoc } from '../utils/run-compodoc'; +import { buildStandaloneErrorHandler } from '../utils/build-standalone-errors-handler'; + +export type StorybookBuilderOptions = JsonObject & { + browserTarget?: string | null; + tsConfig?: string; + compodoc: boolean; + compodocArgs: string[]; + styles?: ExtraEntryPoint[]; + stylePreprocessorOptions?: StylePreprocessorOptions; +} & Pick< + // makes sure the option exists + CLIOptions, + 'outputDir' | 'configDir' | 'loglevel' | 'quiet' | 'docs' | 'webpackStatsJson' + >; + +export type StorybookBuilderOutput = JsonObject & BuilderOutput & {}; + +export default createBuilder(commandBuilder); + +function commandBuilder( + options: StorybookBuilderOptions, + context: BuilderContext +): Observable { + return from(setup(options, context)).pipe( + switchMap(({ tsConfig }) => { + const runCompodoc$ = options.compodoc + ? runCompodoc({ compodocArgs: options.compodocArgs, tsconfig: tsConfig }, context).pipe( + mapTo({ tsConfig }) + ) + : of({}); + + return runCompodoc$.pipe(mapTo({ tsConfig })); + }), + map(({ tsConfig }) => { + const { + browserTarget, + stylePreprocessorOptions, + styles, + configDir, + docs, + loglevel, + outputDir, + quiet, + webpackStatsJson, + } = options; + + const standaloneOptions: StandaloneOptions = { + packageJson: readUpSync({ cwd: __dirname }).packageJson, + configDir, + docs, + loglevel, + outputDir, + quiet, + angularBrowserTarget: browserTarget, + angularBuilderContext: context, + angularBuilderOptions: { + ...(stylePreprocessorOptions ? { stylePreprocessorOptions } : {}), + ...(styles ? { styles } : {}), + }, + tsConfig, + webpackStatsJson, + }; + return standaloneOptions; + }), + switchMap((standaloneOptions) => runInstance({ ...standaloneOptions, mode: 'static' })), + map(() => { + return { success: true }; + }) + ); +} + +async function setup(options: StorybookBuilderOptions, context: BuilderContext) { + let browserOptions: (JsonObject & BrowserBuilderOptions) | undefined; + let browserTarget: Target | undefined; + + if (options.browserTarget) { + browserTarget = targetFromTargetString(options.browserTarget); + browserOptions = await context.validateOptions( + await context.getTargetOptions(browserTarget), + await context.getBuilderNameForTarget(browserTarget) + ); + } + + return { + tsConfig: + options.tsConfig ?? + findUpSync('tsconfig.json', { cwd: options.configDir }) ?? + browserOptions.tsConfig, + }; +} + +function runInstance(options: StandaloneOptions) { + return from(buildStaticStandalone(options as any)).pipe( + catchError((error: any) => throwError(buildStandaloneErrorHandler(error))) + ); +} diff --git a/app/angular/src/builders/build-storybook/schema.json b/code/frameworks/angular/src/builders/build-storybook/schema.json similarity index 98% rename from app/angular/src/builders/build-storybook/schema.json rename to code/frameworks/angular/src/builders/build-storybook/schema.json index 2fa4edad3f2d..1640a3f986dd 100644 --- a/app/angular/src/builders/build-storybook/schema.json +++ b/code/frameworks/angular/src/builders/build-storybook/schema.json @@ -53,7 +53,7 @@ } }, "webpackStatsJson": { - "type": "boolean", + "type": ["boolean", "string"], "description": "Write Webpack Stats JSON to disk", "default": false }, diff --git a/app/angular/src/builders/builders.json b/code/frameworks/angular/src/builders/builders.json similarity index 100% rename from app/angular/src/builders/builders.json rename to code/frameworks/angular/src/builders/builders.json diff --git a/code/frameworks/angular/src/builders/start-storybook/index.spec.ts b/code/frameworks/angular/src/builders/start-storybook/index.spec.ts new file mode 100644 index 000000000000..c70d7cbf5b37 --- /dev/null +++ b/code/frameworks/angular/src/builders/start-storybook/index.spec.ts @@ -0,0 +1,229 @@ +import { Architect, createBuilder } from '@angular-devkit/architect'; +import { TestingArchitectHost } from '@angular-devkit/architect/testing'; +import { schema } from '@angular-devkit/core'; +import * as path from 'path'; + +const buildDevStandaloneMock = jest.fn(); +const buildStaticStandaloneMock = jest.fn(); +const buildMock = { + buildDevStandalone: buildDevStandaloneMock, + buildStaticStandalone: buildStaticStandaloneMock, +}; +jest.doMock('@storybook/core-server', () => buildMock); +jest.doMock('find-up', () => ({ sync: () => './storybook/tsconfig.ts' })); + +const cpSpawnMock = { + spawn: jest.fn(), +}; +jest.doMock('child_process', () => cpSpawnMock); + +describe('Start Storybook Builder', () => { + let architect: Architect; + let architectHost: TestingArchitectHost; + + beforeEach(async () => { + const registry = new schema.CoreSchemaRegistry(); + registry.addPostTransform(schema.transforms.addUndefinedDefaults); + + architectHost = new TestingArchitectHost(); + architect = new Architect(architectHost, registry); + + architectHost.addBuilder( + '@angular-devkit/build-angular:browser', + createBuilder(() => { + return { success: true }; + }) + ); + architectHost.addTarget( + { project: 'angular-cli', target: 'build-2' }, + '@angular-devkit/build-angular:browser', + { + outputPath: 'dist/angular-cli', + index: 'src/index.html', + main: 'src/main.ts', + polyfills: 'src/polyfills.ts', + tsConfig: 'src/tsconfig.app.json', + assets: ['src/favicon.ico', 'src/assets'], + styles: ['src/styles.css'], + scripts: [], + } + ); + // This will either take a Node package name, or a path to the directory + // for the package.json file. + await architectHost.addBuilderFromPackage(path.join(__dirname, '../../..')); + }); + + beforeEach(() => { + buildDevStandaloneMock.mockImplementation((_options: unknown) => Promise.resolve()); + cpSpawnMock.spawn.mockImplementation(() => ({ + stdout: { on: () => {} }, + stderr: { on: () => {} }, + on: (_event: string, cb: any) => cb(0), + })); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('should start storybook with angularBrowserTarget', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { + browserTarget: 'angular-cli:build-2', + port: 4400, + compodoc: false, + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); + expect(buildDevStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: 'angular-cli:build-2', + angularBuilderContext: expect.any(Object), + angularBuilderOptions: {}, + ci: false, + configDir: '.storybook', + docs: undefined, + host: 'localhost', + https: false, + packageJson: expect.any(Object), + port: 4400, + quiet: false, + smokeTest: false, + sslCa: undefined, + sslCert: undefined, + sslKey: undefined, + tsConfig: './storybook/tsconfig.ts', + }); + }); + + it('should start storybook with tsConfig', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { + tsConfig: 'path/to/tsConfig.json', + port: 4400, + compodoc: false, + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); + expect(buildDevStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: null, + angularBuilderContext: expect.any(Object), + angularBuilderOptions: {}, + ci: false, + configDir: '.storybook', + docs: undefined, + host: 'localhost', + https: false, + packageJson: expect.any(Object), + port: 4400, + quiet: false, + smokeTest: false, + sslCa: undefined, + sslCert: undefined, + sslKey: undefined, + tsConfig: 'path/to/tsConfig.json', + }); + }); + + it('should throw error', async () => { + buildDevStandaloneMock.mockRejectedValue(true); + + const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { + browserTarget: 'angular-cli:build-2', + port: 4400, + compodoc: false, + }); + + try { + await run.result; + + expect(false).toEqual('Throw expected'); + } catch (error) { + // eslint-disable-next-line jest/no-try-expect, jest/no-conditional-expect + expect(error).toEqual( + 'Broken build, fix the error above.\nYou may need to refresh the browser.' + ); + } + }); + + it('should run compodoc', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { + browserTarget: 'angular-cli:build-2', + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).toHaveBeenCalledWith( + 'npx', + ['compodoc', '-p', './storybook/tsconfig.ts', '-d', '', '-e', 'json'], + { + cwd: '', + shell: true, + } + ); + expect(buildDevStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: 'angular-cli:build-2', + angularBuilderContext: expect.any(Object), + angularBuilderOptions: {}, + ci: false, + configDir: '.storybook', + docs: undefined, + host: 'localhost', + https: false, + packageJson: expect.any(Object), + port: 9009, + quiet: false, + smokeTest: false, + sslCa: undefined, + sslCert: undefined, + sslKey: undefined, + tsConfig: './storybook/tsconfig.ts', + }); + }); + + it('should start storybook with styles options', async () => { + const run = await architect.scheduleBuilder('@storybook/angular:start-storybook', { + tsConfig: 'path/to/tsConfig.json', + port: 4400, + compodoc: false, + styles: ['src/styles.css'], + }); + + const output = await run.result; + + await run.stop(); + + expect(output.success).toBeTruthy(); + expect(cpSpawnMock.spawn).not.toHaveBeenCalledWith(); + expect(buildDevStandaloneMock).toHaveBeenCalledWith({ + angularBrowserTarget: null, + angularBuilderContext: expect.any(Object), + angularBuilderOptions: { + styles: ['src/styles.css'], + }, + ci: false, + configDir: '.storybook', + docs: undefined, + host: 'localhost', + https: false, + port: 4400, + packageJson: expect.any(Object), + quiet: false, + smokeTest: false, + sslCa: undefined, + sslCert: undefined, + sslKey: undefined, + tsConfig: 'path/to/tsConfig.json', + }); + }); +}); diff --git a/code/frameworks/angular/src/builders/start-storybook/index.ts b/code/frameworks/angular/src/builders/start-storybook/index.ts new file mode 100644 index 000000000000..e2c01677383f --- /dev/null +++ b/code/frameworks/angular/src/builders/start-storybook/index.ts @@ -0,0 +1,142 @@ +import { + BuilderContext, + BuilderOutput, + Target, + createBuilder, + targetFromTargetString, +} from '@angular-devkit/architect'; +import { JsonObject } from '@angular-devkit/core'; +import { + BrowserBuilderOptions, + ExtraEntryPoint, + StylePreprocessorOptions, +} from '@angular-devkit/build-angular'; +import { from, Observable, of } from 'rxjs'; +import { CLIOptions } from '@storybook/types'; +import { map, switchMap, mapTo } from 'rxjs/operators'; +import { sync as findUpSync } from 'find-up'; +import { sync as readUpSync } from 'read-pkg-up'; + +import { buildDevStandalone } from '@storybook/core-server'; +import { StandaloneOptions } from '../utils/standalone-options'; +import { runCompodoc } from '../utils/run-compodoc'; +import { buildStandaloneErrorHandler } from '../utils/build-standalone-errors-handler'; + +export type StorybookBuilderOptions = JsonObject & { + browserTarget?: string | null; + tsConfig?: string; + compodoc: boolean; + compodocArgs: string[]; + styles?: ExtraEntryPoint[]; + stylePreprocessorOptions?: StylePreprocessorOptions; +} & Pick< + // makes sure the option exists + CLIOptions, + | 'port' + | 'host' + | 'configDir' + | 'https' + | 'sslCa' + | 'sslCert' + | 'sslKey' + | 'smokeTest' + | 'ci' + | 'quiet' + | 'docs' + >; + +export type StorybookBuilderOutput = JsonObject & BuilderOutput & {}; + +export default createBuilder(commandBuilder); + +function commandBuilder( + options: StorybookBuilderOptions, + context: BuilderContext +): Observable { + return from(setup(options, context)).pipe( + switchMap(({ tsConfig }) => { + const runCompodoc$ = options.compodoc + ? runCompodoc({ compodocArgs: options.compodocArgs, tsconfig: tsConfig }, context).pipe( + mapTo({ tsConfig }) + ) + : of({}); + + return runCompodoc$.pipe(mapTo({ tsConfig })); + }), + map(({ tsConfig }) => { + const { + browserTarget, + stylePreprocessorOptions, + styles, + ci, + configDir, + docs, + host, + https, + port, + quiet, + smokeTest, + sslCa, + sslCert, + sslKey, + } = options; + + const standaloneOptions: StandaloneOptions = { + packageJson: readUpSync({ cwd: __dirname }).packageJson, + ci, + configDir, + docs, + host, + https, + port, + quiet, + smokeTest, + sslCa, + sslCert, + sslKey, + angularBrowserTarget: browserTarget, + angularBuilderContext: context, + angularBuilderOptions: { + ...(stylePreprocessorOptions ? { stylePreprocessorOptions } : {}), + ...(styles ? { styles } : {}), + }, + tsConfig, + }; + + return standaloneOptions; + }), + switchMap((standaloneOptions) => runInstance(standaloneOptions)), + map((port: number) => { + return { success: true, info: { port } }; + }) + ); +} + +async function setup(options: StorybookBuilderOptions, context: BuilderContext) { + let browserOptions: (JsonObject & BrowserBuilderOptions) | undefined; + let browserTarget: Target | undefined; + + if (options.browserTarget) { + browserTarget = targetFromTargetString(options.browserTarget); + browserOptions = await context.validateOptions( + await context.getTargetOptions(browserTarget), + await context.getBuilderNameForTarget(browserTarget) + ); + } + + return { + tsConfig: + options.tsConfig ?? + findUpSync('tsconfig.json', { cwd: options.configDir }) ?? + browserOptions.tsConfig, + }; +} +function runInstance(options: StandaloneOptions) { + return new Observable((observer) => { + // This Observable intentionally never complete, leaving the process running ;) + buildDevStandalone(options as any).then( + ({ port }) => observer.next(port), + (error) => observer.error(buildStandaloneErrorHandler(error)) + ); + }); +} diff --git a/app/angular/src/builders/start-storybook/schema.json b/code/frameworks/angular/src/builders/start-storybook/schema.json similarity index 100% rename from app/angular/src/builders/start-storybook/schema.json rename to code/frameworks/angular/src/builders/start-storybook/schema.json diff --git a/app/angular/src/builders/utils/build-standalone-errors-handler.ts b/code/frameworks/angular/src/builders/utils/build-standalone-errors-handler.ts similarity index 96% rename from app/angular/src/builders/utils/build-standalone-errors-handler.ts rename to code/frameworks/angular/src/builders/utils/build-standalone-errors-handler.ts index 126ad4836c26..639927540d9a 100644 --- a/app/angular/src/builders/utils/build-standalone-errors-handler.ts +++ b/code/frameworks/angular/src/builders/utils/build-standalone-errors-handler.ts @@ -1,5 +1,5 @@ import { logger, instance as npmLog } from '@storybook/node-logger'; -import dedent from 'ts-dedent'; +import { dedent } from 'ts-dedent'; export const buildStandaloneErrorHandler = (error: any): any => { // Duplicate code for Standalone error handling diff --git a/code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts b/code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts new file mode 100644 index 000000000000..0ec053879eef --- /dev/null +++ b/code/frameworks/angular/src/builders/utils/run-compodoc.spec.ts @@ -0,0 +1,151 @@ +import { BuilderContext } from '@angular-devkit/architect'; +import { LoggerApi } from '@angular-devkit/core/src/logger'; +import { take } from 'rxjs/operators'; + +const cpSpawnMock = { + spawn: jest.fn(), +}; +jest.doMock('child_process', () => cpSpawnMock); + +const { runCompodoc } = require('./run-compodoc'); + +const builderContextLoggerMock: LoggerApi = { + createChild: jest.fn(), + log: jest.fn(), + debug: jest.fn(), + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + fatal: jest.fn(), +}; + +describe('runCompodoc', () => { + beforeEach(() => { + cpSpawnMock.spawn.mockImplementation(() => ({ + stdout: { on: () => {} }, + stderr: { on: () => {} }, + on: (_event: string, cb: any) => cb(0), + })); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('should run compodoc with tsconfig from context', async () => { + runCompodoc( + { + compodocArgs: [], + tsconfig: 'path/to/tsconfig.json', + }, + { + workspaceRoot: 'path/to/project', + logger: builderContextLoggerMock, + } as BuilderContext + ) + .pipe(take(1)) + .subscribe(); + + expect(cpSpawnMock.spawn).toHaveBeenCalledWith( + 'npx', + ['compodoc', '-p', 'path/to/tsconfig.json', '-d', 'path/to/project'], + { + cwd: 'path/to/project', + shell: true, + } + ); + }); + + it('should run compodoc with tsconfig from compodocArgs', async () => { + runCompodoc( + { + compodocArgs: ['-p', 'path/to/tsconfig.stories.json'], + tsconfig: 'path/to/tsconfig.json', + }, + { + workspaceRoot: 'path/to/project', + logger: builderContextLoggerMock, + } as BuilderContext + ) + .pipe(take(1)) + .subscribe(); + + expect(cpSpawnMock.spawn).toHaveBeenCalledWith( + 'npx', + ['compodoc', '-d', 'path/to/project', '-p', 'path/to/tsconfig.stories.json'], + { + cwd: 'path/to/project', + shell: true, + } + ); + }); + + it('should run compodoc with default output folder.', async () => { + runCompodoc( + { + compodocArgs: [], + tsconfig: 'path/to/tsconfig.json', + }, + { + workspaceRoot: 'path/to/project', + logger: builderContextLoggerMock, + } as BuilderContext + ) + .pipe(take(1)) + .subscribe(); + + expect(cpSpawnMock.spawn).toHaveBeenCalledWith( + 'npx', + ['compodoc', '-p', 'path/to/tsconfig.json', '-d', 'path/to/project'], + { + cwd: 'path/to/project', + } + ); + }); + + it('should run with custom output folder specified with --output compodocArgs', async () => { + runCompodoc( + { + compodocArgs: ['--output', 'path/to/customFolder'], + tsconfig: 'path/to/tsconfig.json', + }, + { + workspaceRoot: 'path/to/project', + logger: builderContextLoggerMock, + } as BuilderContext + ) + .pipe(take(1)) + .subscribe(); + + expect(cpSpawnMock.spawn).toHaveBeenCalledWith( + 'npx', + ['compodoc', '-p', 'path/to/tsconfig.json', '--output', 'path/to/customFolder'], + { + cwd: 'path/to/project', + } + ); + }); + + it('should run with custom output folder specified with -d compodocArgs', async () => { + runCompodoc( + { + compodocArgs: ['-d', 'path/to/customFolder'], + tsconfig: 'path/to/tsconfig.json', + }, + { + workspaceRoot: 'path/to/project', + logger: builderContextLoggerMock, + } as BuilderContext + ) + .pipe(take(1)) + .subscribe(); + + expect(cpSpawnMock.spawn).toHaveBeenCalledWith( + 'npx', + ['compodoc', '-p', 'path/to/tsconfig.json', '-d', 'path/to/customFolder'], + { + cwd: 'path/to/project', + } + ); + }); +}); diff --git a/app/angular/src/builders/utils/run-compodoc.ts b/code/frameworks/angular/src/builders/utils/run-compodoc.ts similarity index 89% rename from app/angular/src/builders/utils/run-compodoc.ts rename to code/frameworks/angular/src/builders/utils/run-compodoc.ts index 0df330892048..2d9c99279910 100644 --- a/app/angular/src/builders/utils/run-compodoc.ts +++ b/code/frameworks/angular/src/builders/utils/run-compodoc.ts @@ -4,6 +4,8 @@ import { Observable } from 'rxjs'; import * as path from 'path'; const hasTsConfigArg = (args: string[]) => args.indexOf('-p') !== -1; +const hasOutputArg = (args: string[]) => + args.indexOf('-d') !== -1 || args.indexOf('--output') !== -1; // path.relative is necessary to workaround a compodoc issue with // absolute paths on windows machines @@ -21,8 +23,7 @@ export const runCompodoc = ( 'compodoc', // Default options ...(hasTsConfigArg(compodocArgs) ? [] : ['-p', tsConfigPath]), - '-d', - `${context.workspaceRoot}`, + ...(hasOutputArg(compodocArgs) ? [] : ['-d', `${context.workspaceRoot}`]), ...compodocArgs, ]; @@ -30,7 +31,6 @@ export const runCompodoc = ( context.logger.info(finalCompodocArgs.join(' ')); const child = spawn('npx', finalCompodocArgs, { cwd: context.workspaceRoot, - env: process.env, shell: true, }); diff --git a/code/frameworks/angular/src/builders/utils/standalone-options.ts b/code/frameworks/angular/src/builders/utils/standalone-options.ts new file mode 100644 index 000000000000..8276dd26d8f8 --- /dev/null +++ b/code/frameworks/angular/src/builders/utils/standalone-options.ts @@ -0,0 +1,17 @@ +import { BuilderContext } from '@angular-devkit/architect'; +import { LoadOptions, CLIOptions, BuilderOptions } from '@storybook/types'; + +export type StandaloneOptions = Partial< + CLIOptions & + LoadOptions & + BuilderOptions & { + mode?: 'static' | 'dev'; + angularBrowserTarget?: string | null; + angularBuilderOptions?: Record & { + styles?: any[]; + stylePreprocessorOptions?: any; + }; + angularBuilderContext?: BuilderContext | null; + tsConfig?: string; + } +>; diff --git a/app/angular/src/client/preview/angular-beta/AbstractRenderer.ts b/code/frameworks/angular/src/client/angular-beta/AbstractRenderer.ts similarity index 96% rename from app/angular/src/client/preview/angular-beta/AbstractRenderer.ts rename to code/frameworks/angular/src/client/angular-beta/AbstractRenderer.ts index 5c9e7c4e7197..b4e52bf0068c 100644 --- a/app/angular/src/client/preview/angular-beta/AbstractRenderer.ts +++ b/code/frameworks/angular/src/client/angular-beta/AbstractRenderer.ts @@ -1,11 +1,9 @@ -/* eslint-disable no-undef */ -import { enableProdMode, NgModule, PlatformRef } from '@angular/core'; +import { NgModule, PlatformRef, enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { Subject, BehaviorSubject } from 'rxjs'; import { stringify } from 'telejson'; -import { ICollection, StoryFnAngularReturnType } from '../types'; -import { Parameters } from '../types-6-0'; +import { ICollection, StoryFnAngularReturnType, Parameters } from '../types'; import { createStorybookModule, getStorybookModuleMetadata } from './StorybookModule'; type StoryRenderInfo = { diff --git a/app/angular/src/client/preview/angular-beta/CanvasRenderer.ts b/code/frameworks/angular/src/client/angular-beta/CanvasRenderer.ts similarity index 85% rename from app/angular/src/client/preview/angular-beta/CanvasRenderer.ts rename to code/frameworks/angular/src/client/angular-beta/CanvasRenderer.ts index dcd13483ae33..df1eb5f40436 100644 --- a/app/angular/src/client/preview/angular-beta/CanvasRenderer.ts +++ b/code/frameworks/angular/src/client/angular-beta/CanvasRenderer.ts @@ -1,6 +1,5 @@ import { AbstractRenderer } from './AbstractRenderer'; -import { StoryFnAngularReturnType } from '../types'; -import { Parameters } from '../types-6-0'; +import { StoryFnAngularReturnType, Parameters } from '../types'; export class CanvasRenderer extends AbstractRenderer { public async render(options: { diff --git a/app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts b/code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.test.ts similarity index 98% rename from app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts rename to code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.test.ts index b4a571feb05f..0d97c67bb7f5 100644 --- a/app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.test.ts +++ b/code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.test.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; -import type { ArgTypes } from '@storybook/api'; +import { ArgTypes } from '@storybook/types'; import { computesTemplateSourceFromComponent } from './ComputesTemplateFromComponent'; -import { ButtonAccent, InputComponent, ISomeInterface } from './__testfixtures__/input.component'; +import { ISomeInterface, ButtonAccent, InputComponent } from './__testfixtures__/input.component'; describe('angular source decorator', () => { it('With no props should generate simple tag', () => { @@ -324,7 +324,7 @@ describe('angular source decorator', () => { type: { name: 'enum', required: true, - summary: 'ButtonAccent', + value: [], }, }, }; @@ -354,6 +354,7 @@ describe('angular source decorator', () => { type: { name: 'object', required: true, + value: {}, }, }, }; diff --git a/app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.ts b/code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.ts similarity index 92% rename from app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.ts rename to code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.ts index ade69fb64695..1e18b32efda2 100644 --- a/app/angular/src/client/preview/angular-beta/ComputesTemplateFromComponent.ts +++ b/code/frameworks/angular/src/client/angular-beta/ComputesTemplateFromComponent.ts @@ -1,6 +1,6 @@ -import type { Type } from '@angular/core'; -import type { ArgType, ArgTypes } from '@storybook/api'; -import type { ICollection } from '../types'; +import { Type } from '@angular/core'; +import { ArgTypes } from '@storybook/types'; +import { ICollection } from '../types'; import { ComponentInputsOutputs, getComponentDecoratorMetadata, @@ -71,12 +71,12 @@ const createAngularInputProperty = ({ }: { propertyName: string; value: any; - argType?: ArgType; + argType?: ArgTypes[string]; }) => { - const { name: type = null, summary = null } = argType?.type || {}; - let templateValue = type === 'enum' && !!summary ? `${summary}.${value}` : value; + const { name: type = null } = (typeof argType?.type === 'object' && argType?.type) || {}; + let templateValue = type === 'enum' && value; - const actualType = type === 'enum' && summary ? 'enum' : typeof value; + const actualType = type === 'enum' && typeof value; const requiresBrackets = ['object', 'any', 'boolean', 'enum', 'number'].includes(actualType); if (typeof value === 'object') { diff --git a/app/angular/src/client/preview/angular-beta/DocsRenderer.ts b/code/frameworks/angular/src/client/angular-beta/DocsRenderer.ts similarity index 81% rename from app/angular/src/client/preview/angular-beta/DocsRenderer.ts rename to code/frameworks/angular/src/client/angular-beta/DocsRenderer.ts index 6960f5dba4c2..0e1de2489886 100644 --- a/app/angular/src/client/preview/angular-beta/DocsRenderer.ts +++ b/code/frameworks/angular/src/client/angular-beta/DocsRenderer.ts @@ -1,8 +1,7 @@ -import { addons } from '@storybook/addons'; -import Events from '@storybook/core-events'; +import { addons } from '@storybook/preview-api'; +import { DOCS_RENDERED, STORY_CHANGED } from '@storybook/core-events'; import { AbstractRenderer } from './AbstractRenderer'; -import { StoryFnAngularReturnType } from '../types'; -import { Parameters } from '../types-6-0'; +import { StoryFnAngularReturnType, Parameters } from '../types'; export class DocsRenderer extends AbstractRenderer { public async render(options: { @@ -23,7 +22,7 @@ export class DocsRenderer extends AbstractRenderer { * rendered in the doc. But one event could be enough for the whole docs * */ - channel.once(Events.STORY_CHANGED, async () => { + channel.once(STORY_CHANGED, async () => { await DocsRenderer.resetPlatformBrowserDynamic(); }); @@ -32,7 +31,7 @@ export class DocsRenderer extends AbstractRenderer { * when doc re render. Allows to call ngOnDestroy of angular * for previous component */ - channel.once(Events.DOCS_RENDERED, async () => { + channel.once(DOCS_RENDERED, async () => { await DocsRenderer.resetPlatformBrowserDynamic(); }); diff --git a/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts b/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts similarity index 94% rename from app/angular/src/client/preview/angular-beta/RendererFactory.test.ts rename to code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts index 3d57c6c9ef2e..7ad36c281979 100644 --- a/app/angular/src/client/preview/angular-beta/RendererFactory.test.ts +++ b/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts @@ -1,7 +1,7 @@ import { Component, getPlatform, ɵresetJitOptions } from '@angular/core'; import { platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { Parameters } from '../types-6-0'; +import { Parameters } from '../types'; import { CanvasRenderer } from './CanvasRenderer'; import { RendererFactory } from './RendererFactory'; @@ -18,8 +18,8 @@ describe('RendererFactory', () => { beforeEach(async () => { rendererFactory = new RendererFactory(); document.body.innerHTML = - '
    '; - rootTargetDOMNode = global.document.getElementById('root'); + '
    '; + rootTargetDOMNode = global.document.getElementById('storybook-root'); rootDocstargetDOMNode = global.document.getElementById('root-docs'); (platformBrowserDynamic as any).mockImplementation(platformBrowserDynamicTesting); jest.spyOn(console, 'log').mockImplementation(() => {}); @@ -301,14 +301,13 @@ describe('RendererFactory', () => { }); it('should reset root HTML', async () => { - global.document.getElementById('root').appendChild(global.document.createElement('👾')); + global.document + .getElementById('storybook-root') + .appendChild(global.document.createElement('👾')); - expect(global.document.getElementById('root').innerHTML).toContain('Canvas 🖼'); - const render = await rendererFactory.getRendererInstance( - 'my-story-in-docs', - rootDocstargetDOMNode - ); - expect(global.document.getElementById('root').innerHTML).toBe(''); + expect(global.document.getElementById('storybook-root').innerHTML).toContain('Canvas 🖼'); + await rendererFactory.getRendererInstance('my-story-in-docs', rootDocstargetDOMNode); + expect(global.document.getElementById('storybook-root').innerHTML).toBe(''); }); }); diff --git a/app/angular/src/client/preview/angular-beta/RendererFactory.ts b/code/frameworks/angular/src/client/angular-beta/RendererFactory.ts similarity index 88% rename from app/angular/src/client/preview/angular-beta/RendererFactory.ts rename to code/frameworks/angular/src/client/angular-beta/RendererFactory.ts index d781233c6364..888024d83614 100644 --- a/app/angular/src/client/preview/angular-beta/RendererFactory.ts +++ b/code/frameworks/angular/src/client/angular-beta/RendererFactory.ts @@ -44,17 +44,17 @@ export class RendererFactory { } export const getRenderType = (targetDOMNode: HTMLElement): RenderType => { - return targetDOMNode.id === 'root' ? 'canvas' : 'docs'; + return targetDOMNode.id === 'storybook-root' ? 'canvas' : 'docs'; }; export function clearRootHTMLElement(renderType: RenderType) { switch (renderType) { case 'canvas': - global.document.getElementById('docs-root').innerHTML = ''; + global.document.getElementById('storybook-docs').innerHTML = ''; break; case 'docs': - global.document.getElementById('root').innerHTML = ''; + global.document.getElementById('storybook-root').innerHTML = ''; break; default: break; diff --git a/app/angular/src/client/preview/angular-beta/StorybookModule.test.ts b/code/frameworks/angular/src/client/angular-beta/StorybookModule.test.ts similarity index 99% rename from app/angular/src/client/preview/angular-beta/StorybookModule.test.ts rename to code/frameworks/angular/src/client/angular-beta/StorybookModule.test.ts index ef7e664e07aa..513e72bfde4f 100644 --- a/app/angular/src/client/preview/angular-beta/StorybookModule.test.ts +++ b/code/frameworks/angular/src/client/angular-beta/StorybookModule.test.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, NgModule, Output, Type } from '@angular/core'; +import { NgModule, Type, Component, EventEmitter, Input, Output } from '@angular/core'; import { TestBed } from '@angular/core/testing'; import { BrowserModule } from '@angular/platform-browser'; diff --git a/code/frameworks/angular/src/client/angular-beta/StorybookModule.ts b/code/frameworks/angular/src/client/angular-beta/StorybookModule.ts new file mode 100644 index 000000000000..52d07baacd01 --- /dev/null +++ b/code/frameworks/angular/src/client/angular-beta/StorybookModule.ts @@ -0,0 +1,80 @@ +import { Type, NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; + +import { Subject } from 'rxjs'; +import { ICollection, StoryFnAngularReturnType } from '../types'; +import { storyPropsProvider } from './StorybookProvider'; +import { isComponentAlreadyDeclaredInModules } from './utils/NgModulesAnalyzer'; +import { isDeclarable, isStandaloneComponent } from './utils/NgComponentAnalyzer'; +import { createStorybookWrapperComponent } from './StorybookWrapperComponent'; +import { computesTemplateFromComponent } from './ComputesTemplateFromComponent'; + +export const getStorybookModuleMetadata = ( + { + storyFnAngular, + component, + targetSelector, + }: { + storyFnAngular: StoryFnAngularReturnType; + component?: any; + targetSelector: string; + }, + storyProps$: Subject +): NgModule => { + const { props, styles, moduleMetadata = {} } = storyFnAngular; + let { template } = storyFnAngular; + + const hasTemplate = !hasNoTemplate(template); + if (!hasTemplate && component) { + template = computesTemplateFromComponent(component, props, ''); + } + + /** + * Create a component that wraps generated template and gives it props + */ + const ComponentToInject = createStorybookWrapperComponent( + targetSelector, + template, + component, + styles, + props + ); + + const isStandalone = isStandaloneComponent(component); + // Look recursively (deep) if the component is not already declared by an import module + const requiresComponentDeclaration = + isDeclarable(component) && + !isComponentAlreadyDeclaredInModules( + component, + moduleMetadata.declarations, + moduleMetadata.imports + ) && + !isStandalone; + + return { + declarations: [ + ...(requiresComponentDeclaration ? [component] : []), + ComponentToInject, + ...(moduleMetadata.declarations ?? []), + ], + imports: [ + BrowserModule, + ...(isStandalone ? [component] : []), + ...(moduleMetadata.imports ?? []), + ], + providers: [storyPropsProvider(storyProps$), ...(moduleMetadata.providers ?? [])], + entryComponents: [...(moduleMetadata.entryComponents ?? [])], + schemas: [...(moduleMetadata.schemas ?? [])], + bootstrap: [ComponentToInject], + }; +}; + +export const createStorybookModule = (ngModule: NgModule): Type => { + @NgModule(ngModule) + class StorybookModule {} + return StorybookModule; +}; + +function hasNoTemplate(template: string | null | undefined): template is undefined { + return template === null || template === undefined; +} diff --git a/app/angular/src/client/preview/angular-beta/StorybookProvider.ts b/code/frameworks/angular/src/client/angular-beta/StorybookProvider.ts similarity index 87% rename from app/angular/src/client/preview/angular-beta/StorybookProvider.ts rename to code/frameworks/angular/src/client/angular-beta/StorybookProvider.ts index fac08eeea082..f40ef8d96aa7 100644 --- a/app/angular/src/client/preview/angular-beta/StorybookProvider.ts +++ b/code/frameworks/angular/src/client/angular-beta/StorybookProvider.ts @@ -1,5 +1,5 @@ -import { InjectionToken, NgZone, Provider } from '@angular/core'; -import { Observable, Subject, Subscriber } from 'rxjs'; +import { Provider, InjectionToken, NgZone } from '@angular/core'; +import { Subject, Subscriber, Observable } from 'rxjs'; import { ICollection } from '../types'; export const STORY_PROPS = new InjectionToken>('STORY_PROPS'); diff --git a/app/angular/src/client/preview/angular-beta/StorybookWrapperComponent.ts b/code/frameworks/angular/src/client/angular-beta/StorybookWrapperComponent.ts similarity index 98% rename from app/angular/src/client/preview/angular-beta/StorybookWrapperComponent.ts rename to code/frameworks/angular/src/client/angular-beta/StorybookWrapperComponent.ts index d3017dc5e784..79e6d3e23e84 100644 --- a/app/angular/src/client/preview/angular-beta/StorybookWrapperComponent.ts +++ b/code/frameworks/angular/src/client/angular-beta/StorybookWrapperComponent.ts @@ -1,11 +1,11 @@ import { AfterViewInit, - ChangeDetectorRef, - Component, ElementRef, - Inject, OnDestroy, Type, + ChangeDetectorRef, + Component, + Inject, ViewChild, ViewContainerRef, } from '@angular/core'; @@ -64,7 +64,6 @@ export const createStorybookWrapperComponent = ( // Used in case of a component without selector storyComponent = storyComponent ?? ''; - // eslint-disable-next-line no-useless-constructor constructor( @Inject(STORY_PROPS) private storyProps$: Subject, private changeDetectorRef: ChangeDetectorRef diff --git a/app/angular/src/client/preview/angular-beta/__testfixtures__/input.component.ts b/code/frameworks/angular/src/client/angular-beta/__testfixtures__/input.component.ts similarity index 98% rename from app/angular/src/client/preview/angular-beta/__testfixtures__/input.component.ts rename to code/frameworks/angular/src/client/angular-beta/__testfixtures__/input.component.ts index 93ea8e346f54..abf4205eeaf5 100644 --- a/app/angular/src/client/preview/angular-beta/__testfixtures__/input.component.ts +++ b/code/frameworks/angular/src/client/angular-beta/__testfixtures__/input.component.ts @@ -1,4 +1,3 @@ -// @ts-nocheck import { Component, EventEmitter, Input, Output } from '@angular/core'; export const exportedConstant = 'An exported constant'; diff --git a/app/angular/src/client/preview/angular-beta/utils/NgComponentAnalyzer.test.ts b/code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.test.ts similarity index 100% rename from app/angular/src/client/preview/angular-beta/utils/NgComponentAnalyzer.test.ts rename to code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.test.ts index faa7cdce09ff..59a69395c672 100644 --- a/app/angular/src/client/preview/angular-beta/utils/NgComponentAnalyzer.test.ts +++ b/code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.test.ts @@ -1,6 +1,7 @@ import { - Component, ComponentFactory, + Type, + Component, ComponentFactoryResolver, Directive, EventEmitter, @@ -9,7 +10,6 @@ import { Input, Output, Pipe, - Type, } from '@angular/core'; import { TestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule } from '@angular/platform-browser-dynamic/testing'; diff --git a/app/angular/src/client/preview/angular-beta/utils/NgComponentAnalyzer.ts b/code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.ts similarity index 99% rename from app/angular/src/client/preview/angular-beta/utils/NgComponentAnalyzer.ts rename to code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.ts index 36bd036631e3..2e5497ff8130 100644 --- a/app/angular/src/client/preview/angular-beta/utils/NgComponentAnalyzer.ts +++ b/code/frameworks/angular/src/client/angular-beta/utils/NgComponentAnalyzer.ts @@ -1,12 +1,11 @@ import { + Type, Component, Directive, Input, Output, Pipe, - Type, ɵReflectionCapabilities as ReflectionCapabilities, - ɵCodegenComponentFactoryResolver, } from '@angular/core'; const reflectionCapabilities = new ReflectionCapabilities(); diff --git a/app/angular/src/client/preview/angular-beta/utils/NgModulesAnalyzer.test.ts b/code/frameworks/angular/src/client/angular-beta/utils/NgModulesAnalyzer.test.ts similarity index 100% rename from app/angular/src/client/preview/angular-beta/utils/NgModulesAnalyzer.test.ts rename to code/frameworks/angular/src/client/angular-beta/utils/NgModulesAnalyzer.test.ts diff --git a/app/angular/src/client/preview/angular-beta/utils/NgModulesAnalyzer.ts b/code/frameworks/angular/src/client/angular-beta/utils/NgModulesAnalyzer.ts similarity index 100% rename from app/angular/src/client/preview/angular-beta/utils/NgModulesAnalyzer.ts rename to code/frameworks/angular/src/client/angular-beta/utils/NgModulesAnalyzer.ts diff --git a/code/frameworks/angular/src/client/angular/app.component.ts b/code/frameworks/angular/src/client/angular/app.component.ts new file mode 100644 index 000000000000..913022bc688f --- /dev/null +++ b/code/frameworks/angular/src/client/angular/app.component.ts @@ -0,0 +1,155 @@ +// We could use NgComponentOutlet here but there's currently no easy way +// to provide @Inputs and subscribe to @Outputs, see +// https://github.com/angular/angular/issues/15360 +// For the time being, the ViewContainerRef approach works pretty well. +import { + Component, + Inject, + ViewChild, + ViewContainerRef, + EventEmitter, + SimpleChange, + ChangeDetectorRef, + OnInit, + ComponentFactoryResolver, + OnDestroy, + SimpleChanges, +} from '@angular/core'; +import { Observable, Subscription } from 'rxjs'; +import { first } from 'rxjs/operators'; +import { STORY } from './app.token'; +import { StoryFnAngularReturnType, ICollection } from '../types'; + +@Component({ + selector: 'storybook-dynamic-app-root', + template: '', +}) +export class AppComponent implements OnInit, OnDestroy { + @ViewChild('target', { read: ViewContainerRef, static: true }) + target: ViewContainerRef; + + readonly previousValues: { [key: string]: any } = {}; + + subscription: Subscription; + + propSubscriptions = new Map(); + + constructor( + private cfr: ComponentFactoryResolver, + private changeDetectorRef: ChangeDetectorRef, + @Inject(STORY) private data: Observable + ) {} + + ngOnInit(): void { + this.data.pipe(first()).subscribe((data: StoryFnAngularReturnType) => { + this.target.clear(); + const compFactory = this.cfr.resolveComponentFactory(data.component); + const componentRef = this.target.createComponent(compFactory); + const { instance } = componentRef; + // For some reason, manual change detection ref is only working when getting the ref from the injector (rather than componentRef.changeDetectorRef) + const childChangeDetectorRef: ChangeDetectorRef = + componentRef.injector.get(ChangeDetectorRef); + + this.subscription = this.data.subscribe((newData) => { + this.setProps(instance, newData); + childChangeDetectorRef.markForCheck(); + // Must detect changes on the current component in order to update any changes in child component's @HostBinding properties (angular/angular#22560) + this.changeDetectorRef.detectChanges(); + }); + }); + } + + ngOnDestroy(): void { + this.target.clear(); + if (this.subscription) { + this.subscription.unsubscribe(); + } + + this.propSubscriptions.forEach((v) => { + if (!v.sub.closed) { + v.sub.unsubscribe(); + } + }); + this.propSubscriptions.clear(); + } + + /** + * Set inputs and outputs + */ + private setProps(instance: any, { props = {} }: StoryFnAngularReturnType): void { + const changes: SimpleChanges = {}; + const hasNgOnChangesHook = !!instance.ngOnChanges; + + Object.keys(props).forEach((key: string) => { + const value = props[key]; + const instanceProperty = instance[key]; + + if (!(instanceProperty instanceof EventEmitter) && value !== undefined && value !== null) { + // eslint-disable-next-line no-param-reassign + instance[key] = value; + if (hasNgOnChangesHook) { + const previousValue = this.previousValues[key]; + + if (previousValue !== value) { + changes[key] = new SimpleChange( + previousValue, + value, + !Object.prototype.hasOwnProperty.call(this.previousValues, key) + ); + this.previousValues[key] = value; + } + } + } else if (typeof value === 'function' && key !== 'ngModelChange') { + this.setPropSubscription(key, instanceProperty, value); + } + }); + + this.callNgOnChangesHook(instance, changes); + this.setNgModel(instance, props); + } + + /** + * Manually call 'ngOnChanges' hook because angular doesn't do that for dynamic components + * Issue: [https://github.com/angular/angular/issues/8903] + */ + private callNgOnChangesHook(instance: any, changes: SimpleChanges): void { + if (Object.keys(changes).length) { + instance.ngOnChanges(changes); + } + } + + /** + * If component implements ControlValueAccessor interface try to set ngModel + */ + private setNgModel(instance: any, props: ICollection): void { + if (props.ngModel) { + instance.writeValue(props.ngModel); + } + + if (typeof props.ngModelChange === 'function') { + instance.registerOnChange(props.ngModelChange); + } + } + + /** + * Store ref to subscription for cleanup in 'ngOnDestroy' and check if + * observable needs to be resubscribed to, before creating a new subscription. + */ + private setPropSubscription(key: string, instanceProperty: Observable, value: any): void { + if (this.propSubscriptions.has(key)) { + const v = this.propSubscriptions.get(key); + if (v.prop === value) { + // Prop hasn't changed, so the existing subscription can stay. + return; + } + + // Now that the value has changed, unsubscribe from the previous value's subscription. + if (!v.sub.closed) { + v.sub.unsubscribe(); + } + } + + const sub = instanceProperty.subscribe(value); + this.propSubscriptions.set(key, { prop: value, sub }); + } +} diff --git a/app/angular/src/client/preview/angular/app.token.ts b/code/frameworks/angular/src/client/angular/app.token.ts similarity index 100% rename from app/angular/src/client/preview/angular/app.token.ts rename to code/frameworks/angular/src/client/angular/app.token.ts diff --git a/code/frameworks/angular/src/client/angular/helpers.ts b/code/frameworks/angular/src/client/angular/helpers.ts new file mode 100644 index 000000000000..009a02298f9c --- /dev/null +++ b/code/frameworks/angular/src/client/angular/helpers.ts @@ -0,0 +1,207 @@ +import { global } from '@storybook/global'; +import { NgModuleRef, Type, enableProdMode, NgModule, Component, NgZone } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { BrowserModule } from '@angular/platform-browser'; +import { Subscriber, Observable, ReplaySubject } from 'rxjs'; +import { PartialStoryFn } from '@storybook/types'; +import { AppComponent } from './app.component'; +import { STORY } from './app.token'; +import { NgModuleMetadata, StoryFnAngularReturnType, AngularRenderer } from '../types'; + +const { document } = global; + +declare global { + interface Window { + NODE_ENV: 'string' | 'development' | undefined; + } +} + +let platform: any = null; +let promises: Promise>[] = []; +let storyData = new ReplaySubject(1); + +const moduleClass = class DynamicModule {}; +const componentClass = class DynamicComponent {}; + +type DynamicComponentType = typeof componentClass; + +function storyDataFactory(data: Observable) { + return (ngZone: NgZone) => + new Observable((subscriber: Subscriber) => { + const sub = data.subscribe( + (v: T) => { + ngZone.run(() => subscriber.next(v)); + }, + (err) => { + ngZone.run(() => subscriber.error(err)); + }, + () => { + ngZone.run(() => subscriber.complete()); + } + ); + + return () => { + sub.unsubscribe(); + }; + }); +} + +const getModule = ( + declarations: (Type | any[])[], + entryComponents: (Type | any[])[], + bootstrap: (Type | any[])[], + data: StoryFnAngularReturnType, + moduleMetadata: NgModuleMetadata +) => { + // Complete last ReplaySubject and create a new one for the current module + storyData.complete(); + storyData = new ReplaySubject(1); + storyData.next(data); + + const moduleMeta = { + declarations: [...declarations, ...(moduleMetadata.declarations || [])], + imports: [BrowserModule, FormsModule, ...(moduleMetadata.imports || [])], + providers: [ + { provide: STORY, useFactory: storyDataFactory(storyData.asObservable()), deps: [NgZone] }, + ...(moduleMetadata.providers || []), + ], + entryComponents: [...entryComponents, ...(moduleMetadata.entryComponents || [])], + schemas: [...(moduleMetadata.schemas || [])], + bootstrap: [...bootstrap], + }; + + return NgModule(moduleMeta)(moduleClass); +}; + +const createComponentFromTemplate = (template: string, styles: string[]) => { + return Component({ + template, + styles, + })(componentClass); +}; + +const extractNgModuleMetadata = (importItem: any): NgModule => { + const target = importItem && importItem.ngModule ? importItem.ngModule : importItem; + const decoratorKey = '__annotations__'; + const decorators: any[] = + Reflect && + Reflect.getOwnPropertyDescriptor && + Reflect.getOwnPropertyDescriptor(target, decoratorKey) + ? Reflect.getOwnPropertyDescriptor(target, decoratorKey).value + : target[decoratorKey]; + + if (!decorators || decorators.length === 0) { + return null; + } + + const ngModuleDecorator: NgModule | undefined = decorators.find( + (decorator) => decorator instanceof NgModule + ); + if (!ngModuleDecorator) { + return null; + } + return ngModuleDecorator; +}; + +const getExistenceOfComponentInModules = ( + component: any, + declarations: any[], + imports: any[] +): boolean => { + if (declarations && declarations.some((declaration) => declaration === component)) { + // Found component in declarations array + return true; + } + if (!imports) { + return false; + } + + return imports.some((importItem) => { + const extractedNgModuleMetadata = extractNgModuleMetadata(importItem); + if (!extractedNgModuleMetadata) { + // Not an NgModule + return false; + } + return getExistenceOfComponentInModules( + component, + extractedNgModuleMetadata.declarations, + extractedNgModuleMetadata.imports + ); + }); +}; + +const initModule = (storyFn: PartialStoryFn) => { + const storyObj = storyFn(); + const { component, template, props, styles, moduleMetadata = {} } = storyObj; + + const isCreatingComponentFromTemplate = Boolean(template); + + const AnnotatedComponent = isCreatingComponentFromTemplate + ? createComponentFromTemplate(template, styles) + : component; + + const componentRequiresDeclaration = + isCreatingComponentFromTemplate || + !getExistenceOfComponentInModules( + component, + moduleMetadata.declarations, + moduleMetadata.imports + ); + + const componentDeclarations = componentRequiresDeclaration + ? [AppComponent, AnnotatedComponent] + : [AppComponent]; + + const story = { + component: AnnotatedComponent, + props, + }; + + return getModule( + componentDeclarations, + [AnnotatedComponent], + [AppComponent], + story, + moduleMetadata + ); +}; + +const staticRoot = document.getElementById('storybook-root'); +const insertDynamicRoot = () => { + const app = document.createElement('storybook-dynamic-app-root'); + staticRoot.innerHTML = ''; + staticRoot.appendChild(app); +}; + +const draw = (newModule: DynamicComponentType): void => { + if (!platform) { + insertDynamicRoot(); + if (typeof NODE_ENV === 'string' && NODE_ENV !== 'development') { + try { + enableProdMode(); + } catch (e) { + // + } + } + + platform = platformBrowserDynamic(); + promises.push(platform.bootstrapModule(newModule)); + } else { + Promise.all(promises).then((modules) => { + modules.forEach((mod) => mod.destroy()); + + insertDynamicRoot(); + promises = []; + promises.push(platform.bootstrapModule(newModule)); + }); + } +}; + +export const renderNgApp = (storyFn: PartialStoryFn, forced: boolean) => { + if (!forced) { + draw(initModule(storyFn)); + } else { + storyData.next(storyFn()); + } +}; diff --git a/code/frameworks/angular/src/client/config.ts b/code/frameworks/angular/src/client/config.ts new file mode 100644 index 000000000000..fbf39e96621c --- /dev/null +++ b/code/frameworks/angular/src/client/config.ts @@ -0,0 +1,6 @@ +import './globals'; + +export { render, renderToCanvas } from './render'; +export { decorateStory as applyDecorators } from './decorateStory'; + +export const parameters = { framework: 'angular' as const }; diff --git a/app/angular/src/client/preview/decorateStory.test.ts b/code/frameworks/angular/src/client/decorateStory.test.ts similarity index 92% rename from app/angular/src/client/preview/decorateStory.test.ts rename to code/frameworks/angular/src/client/decorateStory.test.ts index 69243b14a74f..bf5d7b6dd5bb 100644 --- a/app/angular/src/client/preview/decorateStory.test.ts +++ b/code/frameworks/angular/src/client/decorateStory.test.ts @@ -1,14 +1,14 @@ import { Component, Input, Output } from '@angular/core'; -import type { DecoratorFunction, StoryContext } from '@storybook/addons'; +import { DecoratorFunction, StoryContext } from '@storybook/types'; import { componentWrapperDecorator } from './decorators'; import decorateStory from './decorateStory'; -import { StoryFnAngularReturnType } from './types'; +import { AngularRenderer } from './types'; describe('decorateStory', () => { describe('angular behavior', () => { it('should use componentWrapperDecorator with args', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ componentWrapperDecorator(ParentComponent, ({ args }) => args), componentWrapperDecorator( (story) => `${story}`, @@ -42,7 +42,7 @@ describe('decorateStory', () => { }); it('should use componentWrapperDecorator with input / output', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ componentWrapperDecorator(ParentComponent, { parentInput: 'Parent input', parentOutput: () => {}, @@ -81,7 +81,7 @@ describe('decorateStory', () => { }); it('should use componentWrapperDecorator', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ componentWrapperDecorator(ParentComponent), componentWrapperDecorator((story) => `${story}`), componentWrapperDecorator((story) => `${story}`), @@ -96,7 +96,7 @@ describe('decorateStory', () => { }); it('should use template in preference to component parameters', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ (s) => { const story = s(); return { @@ -129,7 +129,7 @@ describe('decorateStory', () => { }); it('should include story templates in decorators', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ (s) => { const story = s(); return { @@ -162,7 +162,7 @@ describe('decorateStory', () => { }); it('should include story components in decorators', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ (s) => { const story = s(); return { @@ -195,7 +195,7 @@ describe('decorateStory', () => { }); it('should include legacy story components in decorators', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ (s) => { const story = s(); return { @@ -229,7 +229,7 @@ describe('decorateStory', () => { }); it('should keep template with an empty value', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ componentWrapperDecorator(ParentComponent), ]; const decorated = decorateStory(() => ({ template: '' }), decorators); @@ -272,7 +272,7 @@ describe('decorateStory', () => { describe('default behavior', () => { it('calls decorators in out to in order', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ (s) => { const story = s(); return { ...story, props: { a: [...story.props.a, 1] } }; @@ -292,7 +292,7 @@ describe('decorateStory', () => { }); it('passes context through to sub decorators', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ (s, c) => { const story = s({ ...c, k: 1 }); return { ...story, props: { a: [...story.props.a, c.k] } }; @@ -312,7 +312,7 @@ describe('decorateStory', () => { }); it('DOES NOT merge parameter or pass through parameters key in context', () => { - const decorators: DecoratorFunction[] = [ + const decorators: DecoratorFunction[] = [ (s, c) => { const story = s({ ...c, k: 1, parameters: { p: 1 } }); return { @@ -347,7 +347,7 @@ describe('decorateStory', () => { }); }); -function makeContext(input: Record): StoryContext { +function makeContext(input: Record): StoryContext { return { id: 'id', kind: 'kind', @@ -355,7 +355,7 @@ function makeContext(input: Record): StoryContext { viewMode: 'story', parameters: {}, ...input, - } as StoryContext; + } as StoryContext; } @Component({ diff --git a/code/frameworks/angular/src/client/decorateStory.ts b/code/frameworks/angular/src/client/decorateStory.ts new file mode 100644 index 000000000000..532b4353f7fb --- /dev/null +++ b/code/frameworks/angular/src/client/decorateStory.ts @@ -0,0 +1,71 @@ +import { DecoratorFunction, LegacyStoryFn, StoryContext } from '@storybook/types'; +import { sanitizeStoryContextUpdate } from '@storybook/preview-api'; +import { computesTemplateFromComponent } from './angular-beta/ComputesTemplateFromComponent'; + +import { AngularRenderer } from './types'; + +export default function decorateStory( + mainStoryFn: LegacyStoryFn, + decorators: DecoratorFunction[] +): LegacyStoryFn { + const returnDecorators = [cleanArgsDecorator, ...decorators].reduce( + (previousStoryFn: LegacyStoryFn, decorator) => + (context: StoryContext) => { + const decoratedStory = decorator((update) => { + return previousStoryFn({ + ...context, + ...sanitizeStoryContextUpdate(update), + }); + }, context); + + return decoratedStory; + }, + (context) => prepareMain(mainStoryFn(context), context) + ); + + return returnDecorators; +} + +export { decorateStory }; + +const prepareMain = ( + story: AngularRenderer['storyResult'], + context: StoryContext +): AngularRenderer['storyResult'] => { + let { template } = story; + + const component = story.component ?? context.component; + const userDefinedTemplate = !hasNoTemplate(template); + + if (!userDefinedTemplate && component) { + template = computesTemplateFromComponent(component, story.props, ''); + } + return { + ...story, + ...(template ? { template, userDefinedTemplate } : {}), + }; +}; + +function hasNoTemplate(template: string | null | undefined): template is undefined { + return template === null || template === undefined; +} + +const cleanArgsDecorator: DecoratorFunction = (storyFn, context) => { + if (!context.argTypes || !context.args) { + return storyFn(); + } + + const argsToClean = context.args; + + context.args = Object.entries(argsToClean).reduce((obj, [key, arg]) => { + const argType = context.argTypes[key]; + + // Only keeps args with a control or an action in argTypes + if (argType?.action || argType?.control) { + return { ...obj, [key]: arg }; + } + return obj; + }, {}); + + return storyFn(); +}; diff --git a/code/frameworks/angular/src/client/decorators.test.ts b/code/frameworks/angular/src/client/decorators.test.ts new file mode 100644 index 000000000000..8ed4e347c55a --- /dev/null +++ b/code/frameworks/angular/src/client/decorators.test.ts @@ -0,0 +1,109 @@ +import { Addon_StoryContext } from '@storybook/types'; + +import { Component } from '@angular/core'; +import { moduleMetadata } from './decorators'; +import { AngularRenderer } from './types'; + +const defaultContext: Addon_StoryContext = { + componentId: 'unspecified', + kind: 'unspecified', + title: 'unspecified', + id: 'unspecified', + name: 'unspecified', + story: 'unspecified', + tags: [], + parameters: {}, + initialArgs: {}, + args: {}, + argTypes: {}, + globals: {}, + hooks: {}, + loaded: {}, + originalStoryFn: jest.fn(), + viewMode: 'story', + abortSignal: undefined, + canvasElement: undefined, +}; + +class MockModule {} +class MockModuleTwo {} +class MockService {} +@Component({}) +class MockComponent {} + +describe('moduleMetadata', () => { + it('should add metadata to a story without it', () => { + const result = moduleMetadata({ + imports: [MockModule], + providers: [MockService], + })( + () => ({ + component: MockComponent, + }), + // deepscan-disable-next-line + defaultContext + ); + + expect(result).toEqual({ + component: MockComponent, + moduleMetadata: { + declarations: [], + entryComponents: [], + imports: [MockModule], + schemas: [], + providers: [MockService], + }, + }); + }); + + it('should combine with individual metadata on a story', () => { + const result = moduleMetadata({ + imports: [MockModule], + })( + () => ({ + component: MockComponent, + moduleMetadata: { + imports: [MockModuleTwo], + providers: [MockService], + }, + }), + // deepscan-disable-next-line + defaultContext + ); + + expect(result).toEqual({ + component: MockComponent, + moduleMetadata: { + declarations: [], + entryComponents: [], + imports: [MockModule, MockModuleTwo], + schemas: [], + providers: [MockService], + }, + }); + }); + + it('should return the original metadata if passed null', () => { + const result = moduleMetadata(null)( + () => ({ + component: MockComponent, + moduleMetadata: { + providers: [MockService], + }, + }), + // deepscan-disable-next-line + defaultContext + ); + + expect(result).toEqual({ + component: MockComponent, + moduleMetadata: { + declarations: [], + entryComponents: [], + imports: [], + schemas: [], + providers: [MockService], + }, + }); + }); +}); diff --git a/code/frameworks/angular/src/client/decorators.ts b/code/frameworks/angular/src/client/decorators.ts new file mode 100644 index 000000000000..b34b416e71a2 --- /dev/null +++ b/code/frameworks/angular/src/client/decorators.ts @@ -0,0 +1,57 @@ +/* eslint-disable no-param-reassign */ +import { Type } from '@angular/core'; +import { DecoratorFunction, StoryContext } from '@storybook/types'; +import { computesTemplateFromComponent } from './angular-beta/ComputesTemplateFromComponent'; +import { isComponent } from './angular-beta/utils/NgComponentAnalyzer'; +import { ICollection, NgModuleMetadata, AngularRenderer } from './types'; + +// We use `any` here as the default type rather than `Args` because we need something that is +// castable to any component-specific args type when the user is being careful. +export const moduleMetadata = + (metadata: Partial): DecoratorFunction => + (storyFn) => { + const story = storyFn(); + const storyMetadata = story.moduleMetadata || {}; + metadata = metadata || {}; + + return { + ...story, + moduleMetadata: { + declarations: [...(metadata.declarations || []), ...(storyMetadata.declarations || [])], + entryComponents: [ + ...(metadata.entryComponents || []), + ...(storyMetadata.entryComponents || []), + ], + imports: [...(metadata.imports || []), ...(storyMetadata.imports || [])], + schemas: [...(metadata.schemas || []), ...(storyMetadata.schemas || [])], + providers: [...(metadata.providers || []), ...(storyMetadata.providers || [])], + }, + }; + }; + +export const componentWrapperDecorator = + ( + element: Type | ((story: string) => string), + props?: ICollection | ((storyContext: StoryContext) => ICollection) + ): DecoratorFunction => + (storyFn, storyContext) => { + const story = storyFn(); + const currentProps = typeof props === 'function' ? (props(storyContext) as ICollection) : props; + + const template = isComponent(element) + ? computesTemplateFromComponent(element, currentProps ?? {}, story.template) + : element(story.template); + + return { + ...story, + template, + ...(currentProps || story.props + ? { + props: { + ...currentProps, + ...story.props, + }, + } + : {}), + }; + }; diff --git a/app/angular/src/client/docs/__testfixtures__/doc-button/argtypes.snapshot b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/argtypes.snapshot similarity index 100% rename from app/angular/src/client/docs/__testfixtures__/doc-button/argtypes.snapshot rename to code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/argtypes.snapshot diff --git a/app/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot similarity index 93% rename from app/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot rename to code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot index dbb2d4c08edf..de95727d81f5 100644 --- a/app/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot +++ b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-posix.snapshot @@ -10,7 +10,7 @@ Object { "getSignature": Object { "description": "

    Getter for inputValue.

    ", - "line": 115, + "line": 116, "name": "inputValue", "rawdescription": " Getter for \`inputValue\`.", @@ -42,7 +42,7 @@ Getter for \`inputValue\`.", "type": "string", }, ], - "line": 110, + "line": 111, "name": "inputValue", "rawdescription": " Setter for \`inputValue\` that is also an \`@Input\`.", @@ -74,7 +74,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "type": "T[]", }, ], - "line": 195, + "line": 196, "name": "item", "returnType": "void", "type": "void", @@ -84,7 +84,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "getSignature": Object { "description": "

    Get the private value.

    ", - "line": 154, + "line": 155, "name": "value", "rawdescription": " Get the private value.", @@ -116,7 +116,7 @@ Get the private value.", "type": "string | number", }, ], - "line": 149, + "line": 150, "name": "value", "rawdescription": " Set the private value.", @@ -137,14 +137,14 @@ like bold, italic, and inline code.

    ", "encapsulation": Array [], "entryComponents": Array [], - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "hostBindings": Array [ Object { "decorators": Array [], "defaultValue": "false", "deprecated": false, "deprecationMessage": "", - "line": 124, + "line": 125, "name": "class.focused", "type": "boolean", }, @@ -164,7 +164,7 @@ like bold, italic, and inline code.

    ], "deprecated": false, "deprecationMessage": "", - "line": 120, + "line": 121, "name": "click", }, ], @@ -177,7 +177,7 @@ like bold, italic, and inline code.

    "deprecationMessage": "", "description": "

    Specify the accent-type of the button

    ", - "line": 56, + "line": 57, "name": "accent", "rawdescription": " Specify the accent-type of the button", @@ -190,7 +190,7 @@ Specify the accent-type of the button", "deprecationMessage": "", "description": "

    Appearance style of the button.

    ", - "line": 52, + "line": 53, "name": "appearance", "rawdescription": " Appearance style of the button.", @@ -202,7 +202,7 @@ Appearance style of the button.", "deprecationMessage": "", "description": "

    Setter for inputValue that is also an @Input.

    ", - "line": 110, + "line": 111, "name": "inputValue", "rawdescription": " Setter for \`inputValue\` that is also an \`@Input\`.", @@ -215,7 +215,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "deprecationMessage": "", "description": "

    Sets the button to a disabled state.

    ", - "line": 60, + "line": 61, "name": "isDisabled", "rawdescription": " Sets the button to a disabled state.", @@ -225,7 +225,7 @@ Sets the button to a disabled state.", "decorators": Array [], "deprecated": false, "deprecationMessage": "", - "line": 195, + "line": 196, "name": "item", "type": "T[]", }, @@ -238,24 +238,24 @@ Sets the button to a disabled state.", "jsdoctags": Array [ Object { "comment": "", - "end": 1525, + "end": 1587, "flags": 4227072, "kind": 325, "modifierFlagsCache": 0, - "pos": 1512, + "pos": 1574, "tagName": Object { - "end": 1521, + "end": 1583, "escapedText": "required", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 1513, + "pos": 1575, "transformFlags": 0, }, "transformFlags": 0, }, ], - "line": 68, + "line": 69, "name": "label", "rawdescription": " @@ -268,7 +268,7 @@ The inner text of the button. "decorators": Array [], "deprecated": false, "deprecationMessage": "", - "line": 192, + "line": 193, "name": "showKeyAlias", "type": "", }, @@ -279,7 +279,7 @@ The inner text of the button. "deprecationMessage": "", "description": "

    Size of the button.

    ", - "line": 72, + "line": 73, "name": "size", "rawdescription": " Size of the button.", @@ -291,7 +291,7 @@ Size of the button.", "deprecationMessage": "", "description": "

    Specifies some arbitrary object

    ", - "line": 75, + "line": 76, "name": "someDataObject", "rawdescription": " Specifies some arbitrary object", @@ -307,24 +307,24 @@ Specifies some arbitrary object", "jsdoctags": Array [ Object { "comment": "", - "end": 1802, + "end": 1864, "flags": 4227072, "kind": 329, "modifierFlagsCache": 0, - "pos": 1787, + "pos": 1849, "tagName": Object { - "end": 1798, + "end": 1860, "escapedText": "deprecated", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 1788, + "pos": 1850, "transformFlags": 0, }, "transformFlags": 0, }, ], - "line": 83, + "line": 84, "name": "somethingYouShouldNotUse", "rawdescription": " @@ -361,21 +361,21 @@ Some input you shouldn't use. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3518, + "end": 3580, "escapedText": "x", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3517, + "pos": 3579, "transformFlags": 0, }, "tagName": Object { - "end": 3516, + "end": 3578, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3511, + "pos": 3573, "transformFlags": 0, }, "type": "number", @@ -386,27 +386,27 @@ Some input you shouldn't use. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3563, + "end": 3625, "escapedText": "y", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3562, + "pos": 3624, "transformFlags": 0, }, "tagName": Object { - "end": 3561, + "end": 3623, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3556, + "pos": 3618, "transformFlags": 0, }, "type": "string | number", }, ], - "line": 164, + "line": 165, "modifierKind": Array [ 123, ], @@ -448,7 +448,7 @@ An internal calculation method which adds \`x\` and \`y\` together. "type": "", }, ], - "line": 120, + "line": 121, "name": "onClickListener", "optional": false, "returnType": "void", @@ -474,27 +474,27 @@ An internal calculation method which adds \`x\` and \`y\` together. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 4079, + "end": 4141, "escapedText": "password", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 4071, + "pos": 4133, "transformFlags": 0, }, "tagName": Object { - "end": 4070, + "end": 4132, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 4065, + "pos": 4127, "transformFlags": 0, }, "type": "string", }, ], - "line": 187, + "line": 188, "modifierKind": Array [ 121, ], @@ -529,28 +529,28 @@ A private method. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3938, + "end": 4000, "escapedText": "id", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3936, + "pos": 3998, "transformFlags": 0, }, "optional": true, "tagName": Object { - "end": 3935, + "end": 3997, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3930, + "pos": 3992, "transformFlags": 0, }, "type": "number", }, ], - "line": 178, + "line": 179, "modifierKind": Array [ 122, ], @@ -588,7 +588,7 @@ A protected method. "type": "ISomeInterface", }, ], - "line": 169, + "line": 170, "modifierKind": Array [ 123, ], @@ -610,7 +610,7 @@ A public method using an interface.", "description": "

    Handler to be called when the button is clicked by a user.

    Will also block the emission of the event if isDisabled is true.

    ", - "line": 91, + "line": 92, "name": "onClick", "rawdescription": " @@ -627,7 +627,7 @@ Will also block the emission of the event if \`isDisabled\` is true. "deprecated": false, "deprecationMessage": "", "description": "", - "line": 106, + "line": 107, "modifierKind": Array [ 121, ], @@ -641,7 +641,7 @@ Will also block the emission of the event if \`isDisabled\` is true. "deprecationMessage": "", "description": "

    Private value.

    ", - "line": 146, + "line": 147, "modifierKind": Array [ 121, ], @@ -661,7 +661,7 @@ Private value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 48, + "line": 49, "name": "buttonRef", "optional": false, "type": "ElementRef", @@ -677,7 +677,7 @@ Private value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 124, + "line": 125, "name": "focus", "optional": false, "type": "", @@ -688,7 +688,7 @@ Private value.", "deprecationMessage": "", "description": "

    Public value.

    ", - "line": 143, + "line": 144, "modifierKind": Array [ 123, ], @@ -702,7 +702,7 @@ Public value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 199, + "line": 200, "modifierKind": Array [ 123, ], @@ -937,7 +937,7 @@ export class InputComponent { Object { "coverageCount": "16/25", "coveragePercent": 64, - "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linktype": "component", "name": "InputComponent", "status": "good", @@ -946,7 +946,7 @@ export class InputComponent { Object { "coverageCount": "0/4", "coveragePercent": 0, - "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linktype": "interface", "name": "ISomeInterface", "status": "low", @@ -955,7 +955,7 @@ export class InputComponent { Object { "coverageCount": "0/1", "coveragePercent": 0, - "filePath": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linksubtype": "variable", "linktype": "miscellaneous", "name": "exportedConstant", @@ -973,7 +973,7 @@ export class InputComponent { Object { "deprecated": false, "deprecationMessage": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "id": "interface-ISomeInterface-d145da25329b094ee29610c45a9e46387cb39eddb2a67b4c9fadb84bcec76eacd60d131e48d98b2ee5725dedd25f2eb299b704e8e0a34307d6e84f6e57d57044", "indexSignatures": Array [], "kind": 165, @@ -984,7 +984,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 25, + "line": 26, "name": "one", "optional": false, "type": "string", @@ -993,7 +993,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 27, + "line": 28, "name": "three", "optional": false, "type": "any[]", @@ -1002,7 +1002,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 26, + "line": 27, "name": "two", "optional": false, "type": "boolean", @@ -1230,14 +1230,14 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "ButtonAccent", "subtype": "enum", }, ], "functions": Array [], "groupedEnumerations": Object { - "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "childs": Array [ Object { @@ -1257,7 +1257,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "ButtonAccent", "subtype": "enum", }, @@ -1265,13 +1265,13 @@ export class InputComponent { }, "groupedFunctions": Object {}, "groupedTypeAliases": Object { - "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "ctype": "miscellaneous", "deprecated": false, "deprecationMessage": "", "description": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "kind": 186, "name": "ButtonSize", "rawtype": "\\"small\\" | \\"medium\\" | \\"large\\" | \\"xlarge\\"", @@ -1280,13 +1280,13 @@ export class InputComponent { ], }, "groupedVariables": Object { - "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "ctype": "miscellaneous", "defaultValue": "'An exported constant'", "deprecated": false, "deprecationMessage": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "exportedConstant", "subtype": "variable", "type": "string", @@ -1299,7 +1299,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "kind": 186, "name": "ButtonSize", "rawtype": "\\"small\\" | \\"medium\\" | \\"large\\" | \\"xlarge\\"", @@ -1312,7 +1312,7 @@ export class InputComponent { "defaultValue": "'An exported constant'", "deprecated": false, "deprecationMessage": "", - "file": "addons/docs/src/frameworks/angular/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "exportedConstant", "subtype": "variable", "type": "string", diff --git a/app/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot similarity index 92% rename from app/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot rename to code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot index 1bddf9b75503..de95727d81f5 100644 --- a/app/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot +++ b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-undefined.snapshot @@ -10,7 +10,7 @@ Object { "getSignature": Object { "description": "

    Getter for inputValue.

    ", - "line": 115, + "line": 116, "name": "inputValue", "rawdescription": " Getter for \`inputValue\`.", @@ -42,7 +42,7 @@ Getter for \`inputValue\`.", "type": "string", }, ], - "line": 110, + "line": 111, "name": "inputValue", "rawdescription": " Setter for \`inputValue\` that is also an \`@Input\`.", @@ -74,7 +74,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "type": "T[]", }, ], - "line": 195, + "line": 196, "name": "item", "returnType": "void", "type": "void", @@ -84,7 +84,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "getSignature": Object { "description": "

    Get the private value.

    ", - "line": 154, + "line": 155, "name": "value", "rawdescription": " Get the private value.", @@ -116,7 +116,7 @@ Get the private value.", "type": "string | number", }, ], - "line": 149, + "line": 150, "name": "value", "rawdescription": " Set the private value.", @@ -137,14 +137,14 @@ like bold, italic, and inline code.

    ", "encapsulation": Array [], "entryComponents": Array [], - "file": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "hostBindings": Array [ Object { "decorators": Array [], "defaultValue": "false", "deprecated": false, "deprecationMessage": "", - "line": 124, + "line": 125, "name": "class.focused", "type": "boolean", }, @@ -164,7 +164,7 @@ like bold, italic, and inline code.

    ], "deprecated": false, "deprecationMessage": "", - "line": 120, + "line": 121, "name": "click", }, ], @@ -177,7 +177,7 @@ like bold, italic, and inline code.

    "deprecationMessage": "", "description": "

    Specify the accent-type of the button

    ", - "line": 56, + "line": 57, "name": "accent", "rawdescription": " Specify the accent-type of the button", @@ -190,7 +190,7 @@ Specify the accent-type of the button", "deprecationMessage": "", "description": "

    Appearance style of the button.

    ", - "line": 52, + "line": 53, "name": "appearance", "rawdescription": " Appearance style of the button.", @@ -202,7 +202,7 @@ Appearance style of the button.", "deprecationMessage": "", "description": "

    Setter for inputValue that is also an @Input.

    ", - "line": 110, + "line": 111, "name": "inputValue", "rawdescription": " Setter for \`inputValue\` that is also an \`@Input\`.", @@ -215,7 +215,7 @@ Setter for \`inputValue\` that is also an \`@Input\`.", "deprecationMessage": "", "description": "

    Sets the button to a disabled state.

    ", - "line": 60, + "line": 61, "name": "isDisabled", "rawdescription": " Sets the button to a disabled state.", @@ -225,7 +225,7 @@ Sets the button to a disabled state.", "decorators": Array [], "deprecated": false, "deprecationMessage": "", - "line": 195, + "line": 196, "name": "item", "type": "T[]", }, @@ -238,24 +238,24 @@ Sets the button to a disabled state.", "jsdoctags": Array [ Object { "comment": "", - "end": 1525, + "end": 1587, "flags": 4227072, "kind": 325, "modifierFlagsCache": 0, - "pos": 1512, + "pos": 1574, "tagName": Object { - "end": 1521, + "end": 1583, "escapedText": "required", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 1513, + "pos": 1575, "transformFlags": 0, }, "transformFlags": 0, }, ], - "line": 68, + "line": 69, "name": "label", "rawdescription": " @@ -268,7 +268,7 @@ The inner text of the button. "decorators": Array [], "deprecated": false, "deprecationMessage": "", - "line": 192, + "line": 193, "name": "showKeyAlias", "type": "", }, @@ -279,7 +279,7 @@ The inner text of the button. "deprecationMessage": "", "description": "

    Size of the button.

    ", - "line": 72, + "line": 73, "name": "size", "rawdescription": " Size of the button.", @@ -291,7 +291,7 @@ Size of the button.", "deprecationMessage": "", "description": "

    Specifies some arbitrary object

    ", - "line": 75, + "line": 76, "name": "someDataObject", "rawdescription": " Specifies some arbitrary object", @@ -307,24 +307,24 @@ Specifies some arbitrary object", "jsdoctags": Array [ Object { "comment": "", - "end": 1802, + "end": 1864, "flags": 4227072, "kind": 329, "modifierFlagsCache": 0, - "pos": 1787, + "pos": 1849, "tagName": Object { - "end": 1798, + "end": 1860, "escapedText": "deprecated", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 1788, + "pos": 1850, "transformFlags": 0, }, "transformFlags": 0, }, ], - "line": 83, + "line": 84, "name": "somethingYouShouldNotUse", "rawdescription": " @@ -361,21 +361,21 @@ Some input you shouldn't use. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3518, + "end": 3580, "escapedText": "x", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3517, + "pos": 3579, "transformFlags": 0, }, "tagName": Object { - "end": 3516, + "end": 3578, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3511, + "pos": 3573, "transformFlags": 0, }, "type": "number", @@ -386,27 +386,27 @@ Some input you shouldn't use. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3563, + "end": 3625, "escapedText": "y", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3562, + "pos": 3624, "transformFlags": 0, }, "tagName": Object { - "end": 3561, + "end": 3623, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3556, + "pos": 3618, "transformFlags": 0, }, "type": "string | number", }, ], - "line": 164, + "line": 165, "modifierKind": Array [ 123, ], @@ -448,7 +448,7 @@ An internal calculation method which adds \`x\` and \`y\` together. "type": "", }, ], - "line": 120, + "line": 121, "name": "onClickListener", "optional": false, "returnType": "void", @@ -474,27 +474,27 @@ An internal calculation method which adds \`x\` and \`y\` together. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 4079, + "end": 4141, "escapedText": "password", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 4071, + "pos": 4133, "transformFlags": 0, }, "tagName": Object { - "end": 4070, + "end": 4132, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 4065, + "pos": 4127, "transformFlags": 0, }, "type": "string", }, ], - "line": 187, + "line": 188, "modifierKind": Array [ 121, ], @@ -529,28 +529,28 @@ A private method. "deprecated": false, "deprecationMessage": "", "name": Object { - "end": 3938, + "end": 4000, "escapedText": "id", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3936, + "pos": 3998, "transformFlags": 0, }, "optional": true, "tagName": Object { - "end": 3935, + "end": 3997, "escapedText": "param", "flags": 4227072, "kind": 79, "modifierFlagsCache": 0, - "pos": 3930, + "pos": 3992, "transformFlags": 0, }, "type": "number", }, ], - "line": 178, + "line": 179, "modifierKind": Array [ 122, ], @@ -588,7 +588,7 @@ A protected method. "type": "ISomeInterface", }, ], - "line": 169, + "line": 170, "modifierKind": Array [ 123, ], @@ -610,7 +610,7 @@ A public method using an interface.", "description": "

    Handler to be called when the button is clicked by a user.

    Will also block the emission of the event if isDisabled is true.

    ", - "line": 91, + "line": 92, "name": "onClick", "rawdescription": " @@ -627,7 +627,7 @@ Will also block the emission of the event if \`isDisabled\` is true. "deprecated": false, "deprecationMessage": "", "description": "", - "line": 106, + "line": 107, "modifierKind": Array [ 121, ], @@ -641,7 +641,7 @@ Will also block the emission of the event if \`isDisabled\` is true. "deprecationMessage": "", "description": "

    Private value.

    ", - "line": 146, + "line": 147, "modifierKind": Array [ 121, ], @@ -661,7 +661,7 @@ Private value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 48, + "line": 49, "name": "buttonRef", "optional": false, "type": "ElementRef", @@ -677,7 +677,7 @@ Private value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 124, + "line": 125, "name": "focus", "optional": false, "type": "", @@ -688,7 +688,7 @@ Private value.", "deprecationMessage": "", "description": "

    Public value.

    ", - "line": 143, + "line": 144, "modifierKind": Array [ 123, ], @@ -702,7 +702,7 @@ Public value.", "deprecated": false, "deprecationMessage": "", "description": "", - "line": 199, + "line": 200, "modifierKind": Array [ 123, ], @@ -937,7 +937,7 @@ export class InputComponent { Object { "coverageCount": "16/25", "coveragePercent": 64, - "filePath": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linktype": "component", "name": "InputComponent", "status": "good", @@ -946,7 +946,7 @@ export class InputComponent { Object { "coverageCount": "0/4", "coveragePercent": 0, - "filePath": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linktype": "interface", "name": "ISomeInterface", "status": "low", @@ -955,7 +955,7 @@ export class InputComponent { Object { "coverageCount": "0/1", "coveragePercent": 0, - "filePath": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "filePath": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "linksubtype": "variable", "linktype": "miscellaneous", "name": "exportedConstant", @@ -973,7 +973,7 @@ export class InputComponent { Object { "deprecated": false, "deprecationMessage": "", - "file": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "id": "interface-ISomeInterface-d145da25329b094ee29610c45a9e46387cb39eddb2a67b4c9fadb84bcec76eacd60d131e48d98b2ee5725dedd25f2eb299b704e8e0a34307d6e84f6e57d57044", "indexSignatures": Array [], "kind": 165, @@ -984,7 +984,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 25, + "line": 26, "name": "one", "optional": false, "type": "string", @@ -993,7 +993,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 27, + "line": 28, "name": "three", "optional": false, "type": "any[]", @@ -1002,7 +1002,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "line": 26, + "line": 27, "name": "two", "optional": false, "type": "boolean", @@ -1230,14 +1230,14 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "ButtonAccent", "subtype": "enum", }, ], "functions": Array [], "groupedEnumerations": Object { - "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "childs": Array [ Object { @@ -1257,7 +1257,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "ButtonAccent", "subtype": "enum", }, @@ -1265,13 +1265,13 @@ export class InputComponent { }, "groupedFunctions": Object {}, "groupedTypeAliases": Object { - "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "ctype": "miscellaneous", "deprecated": false, "deprecationMessage": "", "description": "", - "file": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "kind": 186, "name": "ButtonSize", "rawtype": "\\"small\\" | \\"medium\\" | \\"large\\" | \\"xlarge\\"", @@ -1280,13 +1280,13 @@ export class InputComponent { ], }, "groupedVariables": Object { - "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ + "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts": Array [ Object { "ctype": "miscellaneous", "defaultValue": "'An exported constant'", "deprecated": false, "deprecationMessage": "", - "file": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "exportedConstant", "subtype": "variable", "type": "string", @@ -1299,7 +1299,7 @@ export class InputComponent { "deprecated": false, "deprecationMessage": "", "description": "", - "file": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "kind": 186, "name": "ButtonSize", "rawtype": "\\"small\\" | \\"medium\\" | \\"large\\" | \\"xlarge\\"", @@ -1312,7 +1312,7 @@ export class InputComponent { "defaultValue": "'An exported constant'", "deprecated": false, "deprecationMessage": "", - "file": "app/angular/src/client/docs/__testfixtures__/doc-button/input.ts", + "file": "frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts", "name": "exportedConstant", "subtype": "variable", "type": "string", diff --git a/app/angular/src/client/docs/__testfixtures__/doc-button/compodoc-windows.snapshot b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-windows.snapshot similarity index 100% rename from app/angular/src/client/docs/__testfixtures__/doc-button/compodoc-windows.snapshot rename to code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/compodoc-windows.snapshot diff --git a/app/angular/src/client/docs/__testfixtures__/doc-button/input.ts b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts similarity index 98% rename from app/angular/src/client/docs/__testfixtures__/doc-button/input.ts rename to code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts index f23c9025e421..1cbe512abedf 100644 --- a/app/angular/src/client/docs/__testfixtures__/doc-button/input.ts +++ b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/input.ts @@ -1,15 +1,16 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck /* eslint-disable no-console */ /* eslint-disable no-underscore-dangle */ import { Component, - ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, ViewChild, + ElementRef, } from '@angular/core'; export const exportedConstant = 'An exported constant'; diff --git a/app/angular/src/client/docs/__testfixtures__/doc-button/properties.snapshot b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/properties.snapshot similarity index 100% rename from app/angular/src/client/docs/__testfixtures__/doc-button/properties.snapshot rename to code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/properties.snapshot diff --git a/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/tsconfig.json b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/tsconfig.json new file mode 100644 index 000000000000..ced6b7ae2f7c --- /dev/null +++ b/code/frameworks/angular/src/client/docs/__testfixtures__/doc-button/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../tsconfig.json", + "compilerOptions": { + "rootDir": "." + }, + "include": ["./*.ts"] +} diff --git a/app/angular/src/client/docs/angular-properties.test.ts b/code/frameworks/angular/src/client/docs/angular-properties.test.ts similarity index 95% rename from app/angular/src/client/docs/angular-properties.test.ts rename to code/frameworks/angular/src/client/docs/angular-properties.test.ts index 49c7f5661a66..281f736334ac 100644 --- a/app/angular/src/client/docs/angular-properties.test.ts +++ b/code/frameworks/angular/src/client/docs/angular-properties.test.ts @@ -6,7 +6,7 @@ import { sync as spawnSync } from 'cross-spawn'; import { findComponentByName, extractArgTypesFromData } from './compodoc'; -// @ts-ignore +// @ts-expect-error (Converted from ts-ignore) const { SNAPSHOT_OS } = global; // File hierarchy: __testfixtures__ / some-test-case / input.* @@ -21,6 +21,7 @@ const runCompodoc = (inputPath: string) => { // (and screwed around with relative paths as well, but couldn't get it working) spawnSync('yarn', ['compodoc', '-p', `${testDir}/tsconfig.json`, '-e', 'json', '-d', tmpDir], { stdio: 'inherit', + shell: true, }); const output = fs.readFileSync(`${tmpDir}/documentation.json`, 'utf8'); try { @@ -38,7 +39,7 @@ describe('angular component properties', () => { const testDir = path.join(fixturesDir, testEntry.name); const testFile = fs.readdirSync(testDir).find((fileName) => inputRegExp.test(fileName)); if (testFile) { - it(testEntry.name, () => { + it(`${testEntry.name}`, () => { const inputPath = path.join(testDir, testFile); // snapshot the output of compodoc diff --git a/app/angular/src/client/docs/compodoc.test.ts b/code/frameworks/angular/src/client/docs/compodoc.test.ts similarity index 100% rename from app/angular/src/client/docs/compodoc.test.ts rename to code/frameworks/angular/src/client/docs/compodoc.test.ts diff --git a/app/angular/src/client/docs/compodoc.ts b/code/frameworks/angular/src/client/docs/compodoc.ts similarity index 92% rename from app/angular/src/client/docs/compodoc.ts rename to code/frameworks/angular/src/client/docs/compodoc.ts index 7de806bce9ad..9785842648d0 100644 --- a/app/angular/src/client/docs/compodoc.ts +++ b/code/frameworks/angular/src/client/docs/compodoc.ts @@ -1,9 +1,9 @@ /* eslint-disable no-underscore-dangle */ -/* global window */ +import { global } from '@storybook/global'; -import type { ArgType, ArgTypes } from '@storybook/api'; +import { InputType, ArgTypes, SBType } from '@storybook/types'; import { logger } from '@storybook/client-logger'; -import type { +import { Argument, Class, CompodocJson, @@ -21,12 +21,10 @@ export const isMethod = (methodOrProp: Method | Property): methodOrProp is Metho }; export const setCompodocJson = (compodocJson: CompodocJson) => { - // @ts-ignore - window.__STORYBOOK_COMPODOC_JSON__ = compodocJson; + global.__STORYBOOK_COMPODOC_JSON__ = compodocJson; }; -// @ts-ignore -export const getCompodocJson = (): CompodocJson => window.__STORYBOOK_COMPODOC_JSON__; +export const getCompodocJson = (): CompodocJson => global.__STORYBOOK_COMPODOC_JSON__; export const checkValidComponentOrDirective = (component: Component | Directive) => { if (!component.name) { @@ -137,7 +135,7 @@ const extractEnumValues = (compodocType: any) => { } }; -export const extractType = (property: Property, defaultValue: any) => { +export const extractType = (property: Property, defaultValue: any): SBType => { const compodocType = property.type || extractTypeFromValue(defaultValue); switch (compodocType) { case 'string': @@ -146,11 +144,13 @@ export const extractType = (property: Property, defaultValue: any) => { return { name: compodocType }; case undefined: case null: - return { name: 'void' }; + return { name: 'other', value: 'void' }; default: { const resolvedType = resolveTypealias(compodocType); const enumValues = extractEnumValues(resolvedType); - return enumValues ? { name: 'enum', value: enumValues } : { name: 'object' }; + return enumValues + ? { name: 'enum', value: enumValues } + : { name: 'other', value: 'empty-enum' }; } } }; @@ -191,8 +191,7 @@ const extractDefaultValueFromComments = (property: Property, value: any) => { let commentValue = value; property.jsdoctags.forEach((tag: JsDocTag) => { if (['default', 'defaultvalue'].includes(tag.tagName.escapedText)) { - // @ts-ignore - const dom = new window.DOMParser().parseFromString(tag.comment, 'text/html'); + const dom = new global.DOMParser().parseFromString(tag.comment, 'text/html'); commentValue = dom.body.textContent; } }); @@ -222,10 +221,11 @@ const resolveTypealias = (compodocType: string): string => { }; export const extractArgTypesFromData = (componentData: Class | Directive | Injectable | Pipe) => { - const sectionToItems: Record = {}; + const sectionToItems: Record = {}; const compodocClasses = ['component', 'directive'].includes(componentData.type) ? ['propertiesClass', 'methodsClass', 'inputsClass', 'outputsClass'] : ['properties', 'methods']; + // eslint-disable-next-line @typescript-eslint/naming-convention type COMPODOC_CLASS = | 'properties' | 'methods' @@ -240,16 +240,15 @@ export const extractArgTypesFromData = (componentData: Class | Directive | Injec const section = mapItemToSection(key, item); const defaultValue = isMethod(item) ? undefined : extractDefaultValue(item as Property); - const type = + const type: SBType = isMethod(item) || (section !== 'inputs' && section !== 'properties') - ? { name: 'void' } + ? { name: 'other', value: 'void' } : extractType(item as Property, defaultValue); const action = section === 'outputs' ? { action: item.name } : {}; const argType = { name: item.name, description: item.rawdescription || item.description, - defaultValue, type, ...action, table: { diff --git a/code/frameworks/angular/src/client/docs/config.ts b/code/frameworks/angular/src/client/docs/config.ts new file mode 100644 index 000000000000..66bd8c7a0a02 --- /dev/null +++ b/code/frameworks/angular/src/client/docs/config.ts @@ -0,0 +1,20 @@ +import { SourceType, enhanceArgTypes } from '@storybook/docs-tools'; +import { Parameters, DecoratorFunction, ArgTypesEnhancer } from '@storybook/types'; +import { extractArgTypes, extractComponentDescription } from './compodoc'; +import { sourceDecorator } from './sourceDecorator'; + +export const parameters: Parameters = { + docs: { + inlineStories: true, + extractArgTypes, + extractComponentDescription, + source: { + type: SourceType.DYNAMIC, + language: 'html', + }, + }, +}; + +export const decorators: DecoratorFunction[] = [sourceDecorator]; + +export const argTypesEnhancers: ArgTypesEnhancer[] = [enhanceArgTypes]; diff --git a/app/angular/src/client/docs/index.ts b/code/frameworks/angular/src/client/docs/index.ts similarity index 100% rename from app/angular/src/client/docs/index.ts rename to code/frameworks/angular/src/client/docs/index.ts diff --git a/code/frameworks/angular/src/client/docs/sourceDecorator.ts b/code/frameworks/angular/src/client/docs/sourceDecorator.ts new file mode 100644 index 000000000000..b60ad0fa9a40 --- /dev/null +++ b/code/frameworks/angular/src/client/docs/sourceDecorator.ts @@ -0,0 +1,58 @@ +import { addons, useEffect } from '@storybook/preview-api'; +import { PartialStoryFn } from '@storybook/types'; +import { SNIPPET_RENDERED, SourceType } from '@storybook/docs-tools'; +import { StoryContext, AngularRenderer } from '../types'; +import { computesTemplateSourceFromComponent } from '../../renderer'; + +export const skipSourceRender = (context: StoryContext) => { + const sourceParams = context?.parameters.docs?.source; + + // always render if the user forces it + if (sourceParams?.type === SourceType.DYNAMIC) { + return false; + } + // never render if the user is forcing the block to render code, or + // if the user provides code + return sourceParams?.code || sourceParams?.type === SourceType.CODE; +}; + +/** + * Angular source decorator. + * @param storyFn Fn + * @param context StoryContext + */ +export const sourceDecorator = ( + storyFn: PartialStoryFn, + context: StoryContext +) => { + const story = storyFn(); + if (skipSourceRender(context)) { + return story; + } + const channel = addons.getChannel(); + const { props, template, userDefinedTemplate } = story; + + const { component, argTypes } = context; + + let toEmit: string; + + useEffect(() => { + if (toEmit) { + channel.emit(SNIPPET_RENDERED, context.id, toEmit, 'angular'); + } + }); + + if (component && !userDefinedTemplate) { + const source = computesTemplateSourceFromComponent(component, props, argTypes); + + // We might have a story with a Directive or Service defined as the component + // In these cases there might exist a template, even if we aren't able to create source from component + if (source || template) { + toEmit = source || template; + } + } else if (template) { + toEmit = template; + } + + return story; +}; diff --git a/app/angular/src/client/docs/types.ts b/code/frameworks/angular/src/client/docs/types.ts similarity index 100% rename from app/angular/src/client/docs/types.ts rename to code/frameworks/angular/src/client/docs/types.ts diff --git a/code/frameworks/angular/src/client/globals.ts b/code/frameworks/angular/src/client/globals.ts new file mode 100644 index 000000000000..9e5f1fcfb9cb --- /dev/null +++ b/code/frameworks/angular/src/client/globals.ts @@ -0,0 +1,71 @@ +import { global } from '@storybook/global'; + +/** + * This file includes polyfills needed by Angular and is loaded before the app. + * You can add your own extra polyfills to this file. + * + * This file is divided into 2 sections: + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main + * file. + * + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. + * + * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html + */ + +/** ************************************************************************************************* + * BROWSER POLYFILLS + */ + +/** IE9, IE10 and IE11 requires all of the following polyfills. * */ +// import 'core-js/es6/symbol'; +// import 'core-js/es6/object'; +// import 'core-js/es6/function'; +// import 'core-js/es6/parse-int'; +// import 'core-js/es6/parse-float'; +// import 'core-js/es6/number'; +// import 'core-js/es6/math'; +// import 'core-js/es6/string'; +// import 'core-js/es6/date'; +// import 'core-js/es6/array'; +// import 'core-js/es6/regexp'; +// import 'core-js/es6/map'; +// import 'core-js/es6/weak-map'; +// import 'core-js/es6/set'; + +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ +// import 'classlist.js'; // Run `npm install --save classlist.js`. + +/** Evergreen browsers require these. * */ +import 'core-js/es/reflect'; +import 'core-js/proposals/reflect-metadata'; + +/** + * Required to support Web Animations `@angular/animation`. + * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation + * */ +// import 'web-animations-js'; // Run `npm install --save web-animations-js`. + +/** ************************************************************************************************* + * Zone JS is required by Angular itself. + */ +import 'zone.js/dist/zone'; // Included with Angular CLI. + +/** ************************************************************************************************* + * APPLICATION IMPORTS + */ + +/** + * Date, currency, decimal and percent pipes. + * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 + */ +// import 'intl'; // Run `npm install --save intl`. +/** + * Need to import at least one locale-data with intl. + */ +// import 'intl/locale-data/jsonp/en'; + +global.STORYBOOK_ENV = 'angular'; diff --git a/code/frameworks/angular/src/client/index.ts b/code/frameworks/angular/src/client/index.ts new file mode 100644 index 000000000000..98ae2b81a525 --- /dev/null +++ b/code/frameworks/angular/src/client/index.ts @@ -0,0 +1,15 @@ +/// + +import './globals'; + +// eslint-disable-next-line import/export +export * from './public-api'; +// eslint-disable-next-line import/export +export * from './public-types'; + +export type { StoryFnAngularReturnType as IStory } from './types'; + +export { moduleMetadata, componentWrapperDecorator } from './decorators'; + +// optimization: stop HMR propagation in webpack +module?.hot?.decline(); diff --git a/code/frameworks/angular/src/client/public-api.ts b/code/frameworks/angular/src/client/public-api.ts new file mode 100644 index 000000000000..596a5fd1b4a3 --- /dev/null +++ b/code/frameworks/angular/src/client/public-api.ts @@ -0,0 +1,29 @@ +/* eslint-disable prefer-destructuring */ +import { Addon_ClientStoryApi, Addon_Loadable } from '@storybook/types'; +import { start } from '@storybook/core-client'; +import { renderToCanvas, render } from './render'; +import decorateStory from './decorateStory'; +import { AngularRenderer } from './types'; + +export * from './public-types'; + +const FRAMEWORK = 'angular'; + +interface ClientApi extends Addon_ClientStoryApi { + configure(loader: Addon_Loadable, module: NodeModule): void; + forceReRender(): void; + raw: () => any; // todo add type + load: (...args: any[]) => void; +} + +const api = start(renderToCanvas, { decorateStory, render }); + +export const storiesOf: ClientApi['storiesOf'] = (kind, m) => { + return (api.clientApi.storiesOf(kind, m) as ReturnType).addParameters({ + framework: FRAMEWORK, + }); +}; + +export const configure: ClientApi['configure'] = (...args) => api.configure(FRAMEWORK, ...args); +export const forceReRender: ClientApi['forceReRender'] = api.forceReRender; +export const raw: ClientApi['raw'] = api.clientApi.raw; diff --git a/code/frameworks/angular/src/client/public-types.ts b/code/frameworks/angular/src/client/public-types.ts new file mode 100644 index 000000000000..c4a54cf25898 --- /dev/null +++ b/code/frameworks/angular/src/client/public-types.ts @@ -0,0 +1,51 @@ +import { + AnnotatedStoryFn, + Args, + ComponentAnnotations, + DecoratorFunction, + LoaderFunction, + StoryAnnotations, + StoryContext as GenericStoryContext, + StrictArgs, +} from '@storybook/types'; +import { AngularRenderer } from './types'; + +export type { Args, ArgTypes, Parameters, StrictArgs } from '@storybook/types'; +export type { Parameters as AngularParameters } from './types'; +export type { AngularRenderer }; + +/** + * Metadata to configure the stories for a component. + * + * @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export) + */ +export type Meta = ComponentAnnotations; + +/** + * Story function that represents a CSFv2 component example. + * + * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) + */ +export type StoryFn = AnnotatedStoryFn; + +/** + * Story function that represents a CSFv3 component example. + * + * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) + */ +export type StoryObj = StoryAnnotations; + +/** + * @deprecated Use `StoryFn` instead. + * Use `StoryObj` if you want to migrate to CSF3, which uses objects instead of functions to represent stories. + * You can read more about the CSF3 format here: https://storybook.js.org/blog/component-story-format-3-0/ + * + * Story function that represents a CSFv2 component example. + * + * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports) + */ +export type Story = StoryFn; + +export type Decorator = DecoratorFunction; +export type Loader = LoaderFunction; +export type StoryContext = GenericStoryContext; diff --git a/code/frameworks/angular/src/client/render.ts b/code/frameworks/angular/src/client/render.ts new file mode 100644 index 000000000000..5dc7c6e37a0c --- /dev/null +++ b/code/frameworks/angular/src/client/render.ts @@ -0,0 +1,38 @@ +import { RenderContext, ArgsStoryFn } from '@storybook/types'; + +import { renderNgApp } from './angular/helpers'; +import { AngularRenderer } from './types'; + +import { RendererFactory } from './angular-beta/RendererFactory'; + +export const rendererFactory = new RendererFactory(); + +export const render: ArgsStoryFn = (props) => ({ props }); + +export async function renderToCanvas( + { + storyFn, + showMain, + forceRemount, + storyContext: { parameters, component }, + id, + }: RenderContext, + element: HTMLElement +) { + showMain(); + + if (parameters.angularLegacyRendering) { + renderNgApp(storyFn, !forceRemount); + return; + } + + const renderer = await rendererFactory.getRendererInstance(id, element); + + await renderer.render({ + storyFnAngular: storyFn(), + component, + parameters, + forced: !forceRemount, + targetDOMNode: element, + }); +} diff --git a/code/frameworks/angular/src/client/types.ts b/code/frameworks/angular/src/client/types.ts new file mode 100644 index 000000000000..14f41557d5d5 --- /dev/null +++ b/code/frameworks/angular/src/client/types.ts @@ -0,0 +1,45 @@ +import { + Parameters as DefaultParameters, + StoryContext as DefaultStoryContext, + WebRenderer, +} from '@storybook/types'; + +export interface NgModuleMetadata { + declarations?: any[]; + entryComponents?: any[]; + imports?: any[]; + schemas?: any[]; + providers?: any[]; +} +export interface ICollection { + [p: string]: any; +} + +export interface StoryFnAngularReturnType { + /** @deprecated `component` story input is deprecated, and will be removed in Storybook 7.0. */ + component?: any; + props?: ICollection; + /** @deprecated `propsMeta` story input is deprecated, and will be removed in Storybook 7.0. */ + propsMeta?: ICollection; + moduleMetadata?: NgModuleMetadata; + template?: string; + styles?: string[]; + userDefinedTemplate?: boolean; +} + +/** + * @deprecated Use `AngularRenderer` instead. + */ +export type AngularFramework = AngularRenderer; +export interface AngularRenderer extends WebRenderer { + component: any; + storyResult: StoryFnAngularReturnType; +} + +export type Parameters = DefaultParameters & { + /** Uses legacy angular rendering engine that use dynamic component */ + angularLegacyRendering?: boolean; + bootstrapModuleOptions?: unknown; +}; + +export type StoryContext = DefaultStoryContext & { parameters: Parameters }; diff --git a/code/frameworks/angular/src/index.ts b/code/frameworks/angular/src/index.ts new file mode 100644 index 000000000000..92f1fac0da0f --- /dev/null +++ b/code/frameworks/angular/src/index.ts @@ -0,0 +1,14 @@ +export * from './client/index'; +export * from './types'; + +/* + * ATTENTION: + * - moduleMetadata + * - NgModuleMetadata + * - ICollection + * + * These typings are coped out of decorators.d.ts and types.d.ts in order to fix a bug with tsc + * It was imported out of dist before which was not the proper way of exporting public API + * + * This can be fixed by migrating app/angular to typescript + */ diff --git a/code/frameworks/angular/src/preset.ts b/code/frameworks/angular/src/preset.ts new file mode 100644 index 000000000000..762685d6ac9f --- /dev/null +++ b/code/frameworks/angular/src/preset.ts @@ -0,0 +1,35 @@ +import path from 'path'; +import { PresetProperty } from '@storybook/types'; +import { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + require.resolve('./server/framework-preset-angular-cli'), + require.resolve('./server/framework-preset-angular-ivy'), + require.resolve('./server/framework-preset-angular-docs'), +]; + +export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entries = []) => [ + ...entries, + require.resolve('./client/config'), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + }; +}; + +export const typescript: PresetProperty<'typescript', StorybookConfig> = async (config) => { + return { + ...config, + skipBabel: true, + }; +}; diff --git a/code/frameworks/angular/src/renderer.ts b/code/frameworks/angular/src/renderer.ts new file mode 100644 index 000000000000..3216885b6574 --- /dev/null +++ b/code/frameworks/angular/src/renderer.ts @@ -0,0 +1,4 @@ +export { computesTemplateSourceFromComponent } from './client/angular-beta/ComputesTemplateFromComponent'; +export { rendererFactory } from './client/render'; +export { AbstractRenderer } from './client/angular-beta/AbstractRenderer'; +export { getStorybookModuleMetadata } from './client/angular-beta/StorybookModule'; diff --git a/app/angular/src/server/__mocks-ng-workspace__/empty-projects-entry/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/empty-projects-entry/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/empty-projects-entry/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/empty-projects-entry/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/minimal-config/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/minimal-config/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/minimal-config/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/minimal-config/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/src/main.ts diff --git a/app/angular/src/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/tsconfig.json new file mode 100644 index 000000000000..ed46a09da328 --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/minimal-config/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__mocks-ng-workspace__/some-config/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/some-config/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/some-config/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/some-config/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/src/main.ts diff --git a/app/angular/src/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/tsconfig.json new file mode 100644 index 000000000000..ed46a09da328 --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/some-config/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.ts diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/styles.css b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/styles.css similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/styles.css rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/styles.css diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json new file mode 100644 index 000000000000..ed46a09da328 --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-lib/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-lib/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.ts diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json new file mode 100644 index 000000000000..b9a44f04464a --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json @@ -0,0 +1,20 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "../../out-tsc/lib", + "target": "es2015", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [], + "lib": ["dom", "es2018"] + }, + "angularCompilerOptions": { + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "enableResourceInlining": true + }, + "exclude": ["src/test.ts", "**/*.spec.ts"] +} diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/tsconfig.json new file mode 100644 index 000000000000..ed46a09da328 --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-lib/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/nx.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/nx.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/nx.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/nx.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/main.ts diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/styles.css b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/styles.css similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/styles.css rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/styles.css diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/styles.scss b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/styles.scss similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/styles.scss rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/styles.scss diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json new file mode 100644 index 000000000000..4c19c82b6bab --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json @@ -0,0 +1,14 @@ +{ + "include": ["./src"], + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx/nx.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/nx.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx/nx.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/nx.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/main.ts diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx/src/styles.css b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/styles.css similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx/src/styles.css rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/styles.css diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx/src/styles.scss b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/styles.scss similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx/src/styles.scss rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/styles.scss diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/tsconfig.json new file mode 100644 index 000000000000..4c19c82b6bab --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-nx/tsconfig.json @@ -0,0 +1,14 @@ +{ + "include": ["./src"], + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-options-styles/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-options-styles/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/main.ts diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/styles.css b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/styles.css similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/styles.css rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/styles.css diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/styles.scss b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/styles.scss similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/styles.scss rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/styles.scss diff --git a/app/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json new file mode 100644 index 000000000000..ed46a09da328 --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__mocks-ng-workspace__/without-architect-build-options/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-architect-build-options/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/without-architect-build-options/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/without-architect-build-options/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/without-architect-build/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-architect-build/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/without-architect-build/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/without-architect-build/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/without-compatible-projects/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-compatible-projects/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/without-compatible-projects/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/without-compatible-projects/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/without-projects-entry/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/without-projects-entry/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.ts diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json new file mode 100644 index 000000000000..b9a44f04464a --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json @@ -0,0 +1,20 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "../../out-tsc/lib", + "target": "es2015", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [], + "lib": ["dom", "es2018"] + }, + "angularCompilerOptions": { + "skipTemplateCodegen": true, + "strictMetadataEmit": true, + "enableResourceInlining": true + }, + "exclude": ["src/test.ts", "**/*.spec.ts"] +} diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json new file mode 100644 index 000000000000..ed46a09da328 --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__mocks-ng-workspace__/without-tsConfig/angular.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/angular.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/without-tsConfig/angular.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/angular.json diff --git a/app/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/main.ts b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/main.ts similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/main.ts rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/main.ts diff --git a/app/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json similarity index 100% rename from app/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json rename to code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json diff --git a/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json new file mode 100644 index 000000000000..ed46a09da328 --- /dev/null +++ b/code/frameworks/angular/src/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "sourceMap": true, + "moduleResolution": "node", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "skipLibCheck": true, + "target": "es5", + "lib": ["es2017", "dom"] + } +} diff --git a/app/angular/src/server/__tests__/angular.json b/code/frameworks/angular/src/server/__tests__/angular.json similarity index 100% rename from app/angular/src/server/__tests__/angular.json rename to code/frameworks/angular/src/server/__tests__/angular.json diff --git a/app/angular/src/server/angular-cli-webpack-12.2.x.d.ts b/code/frameworks/angular/src/server/angular-cli-webpack.d.ts similarity index 100% rename from app/angular/src/server/angular-cli-webpack-12.2.x.d.ts rename to code/frameworks/angular/src/server/angular-cli-webpack.d.ts diff --git a/code/frameworks/angular/src/server/angular-cli-webpack.js b/code/frameworks/angular/src/server/angular-cli-webpack.js new file mode 100644 index 000000000000..feb510df501f --- /dev/null +++ b/code/frameworks/angular/src/server/angular-cli-webpack.js @@ -0,0 +1,96 @@ +// Private angular devkit stuff +const { + generateI18nBrowserWebpackConfigFromContext, +} = require('@angular-devkit/build-angular/src/utils/webpack-browser-config'); +const { + getCommonConfig, + getStylesConfig, + getDevServerConfig, + getTypeScriptConfig, +} = require('@angular-devkit/build-angular/src/webpack/configs'); +const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin'); +const { filterOutStylingRules } = require('./utils/filter-out-styling-rules'); +const { + default: StorybookNormalizeAngularEntryPlugin, +} = require('./plugins/storybook-normalize-angular-entry-plugin'); + +/** + * Extract webpack config from angular-cli 13.x.x + * ⚠️ This file is in JavaScript to not use TypeScript. Because current storybook TypeScript version is not compatible with Angular CLI. + * FIXME: Try another way with TypeScript on future storybook version (7 maybe 🤞) + * + * @param {*} baseConfig Previous webpack config from storybook + * @param {*} options { builderOptions, builderContext } + */ +exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext }) => { + /** + * Get angular-cli Webpack config + */ + const { config: cliConfig } = await generateI18nBrowserWebpackConfigFromContext( + { + // Default options + index: 'noop-index', + main: 'noop-main', + outputPath: 'noop-out', + + // Options provided by user + ...builderOptions, + + // Fixed options + optimization: false, + namedChunks: false, + progress: false, + buildOptimizer: false, + aot: false, + }, + builderContext, + (wco) => [ + getCommonConfig(wco), + getStylesConfig(wco), + getTypeScriptConfig ? getTypeScriptConfig(wco) : getDevServerConfig(wco), + ] + ); + + /** + * Merge baseConfig Webpack with angular-cli Webpack + */ + const entry = [ + ...baseConfig.entry, + ...(cliConfig.entry.styles ?? []), + ...(cliConfig.entry.polyfills ?? []), + ]; + + // Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular + // because @angular-devkit/build-angular created rules have include/exclude for global style files. + const rulesExcludingStyles = filterOutStylingRules(baseConfig); + const module = { + ...baseConfig.module, + rules: [...cliConfig.module.rules, ...rulesExcludingStyles], + }; + + const plugins = [ + ...(cliConfig.plugins ?? []), + ...baseConfig.plugins, + new StorybookNormalizeAngularEntryPlugin(), + ]; + + const resolve = { + ...baseConfig.resolve, + modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliConfig.resolve.modules])), + plugins: [ + new TsconfigPathsPlugin({ + configFile: builderOptions.tsConfig, + mainFields: ['browser', 'module', 'main'], + }), + ], + }; + + return { + ...baseConfig, + entry, + module, + plugins, + resolve, + resolveLoader: cliConfig.resolveLoader, + }; +}; diff --git a/app/angular/src/server/angular-read-workspace.ts b/code/frameworks/angular/src/server/angular-read-workspace.ts similarity index 98% rename from app/angular/src/server/angular-read-workspace.ts rename to code/frameworks/angular/src/server/angular-read-workspace.ts index 97e027cd84ea..e22ceb99f2f0 100644 --- a/app/angular/src/server/angular-read-workspace.ts +++ b/code/frameworks/angular/src/server/angular-read-workspace.ts @@ -1,3 +1,4 @@ +/* eslint-disable global-require */ import { NodeJsSyncHost } from '@angular-devkit/core/node'; import { workspaces } from '@angular-devkit/core'; @@ -17,7 +18,6 @@ export const readAngularWorkspaceConfig = async ( * Apologies for the following line * If there's a better way to do it, let's do it */ - /* eslint-disable global-require */ // catch if nx.json does not exist require('@nrwl/workspace').readNxJson(); diff --git a/app/angular/src/server/framework-preset-angular-cli.test.ts b/code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts similarity index 81% rename from app/angular/src/server/framework-preset-angular-cli.test.ts rename to code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts index b5e1b86eee2b..3581d656088e 100644 --- a/app/angular/src/server/framework-preset-angular-cli.test.ts +++ b/code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts @@ -1,10 +1,10 @@ import path from 'path'; -import type { Configuration } from 'webpack'; +import { Configuration } from 'webpack'; import { logger } from '@storybook/node-logger'; import { normalize, getSystemPath } from '@angular-devkit/core'; import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'; import { webpackFinal } from './framework-preset-angular-cli'; -import { PresetOptions } from './options'; +import { PresetOptions } from './preset-options'; const testPath = __dirname; @@ -34,11 +34,8 @@ describe('framework-preset-angular-cli', () => { }); describe('without angular.json', () => { - let consoleErrorSpy: jest.SpyInstance; - beforeEach(() => { initMockWorkspace(''); - consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(); }); it('should return webpack base config and display log error', async () => { const webpackBaseConfig = newWebpackConfiguration(); @@ -205,27 +202,47 @@ describe('framework-preset-angular-cli', () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); + const expectedRules: any = [ + { + oneOf: [ + { + exclude: [], + use: expect.anything(), + }, + { + include: [], + use: expect.anything(), + }, + ], + }, + { use: expect.anything() }, + ]; expect(webpackFinalConfig.module.rules).toEqual([ { - exclude: [], - test: /\.css$/, - use: expect.anything(), + test: /\.(?:css)$/i, + rules: expectedRules, }, { - exclude: [], - test: /\.scss$|\.sass$/, - use: expect.anything(), + test: /\.(?:scss)$/i, + rules: expectedRules, }, { - exclude: [], - test: /\.less$/, - use: expect.anything(), + test: /\.(?:sass)$/i, + rules: expectedRules, }, { - exclude: [], - test: /\.styl$/, - use: expect.anything(), + test: /\.(?:less)$/i, + rules: expectedRules, }, + { + test: /\.(?:styl)$/i, + rules: expectedRules, + }, + { mimetype: 'text/css', use: expect.anything() }, + { mimetype: 'text/x-scss', use: expect.anything() }, + { mimetype: 'text/x-sass', use: expect.anything() }, + { mimetype: 'text/x-less', use: expect.anything() }, + { mimetype: 'text/x-stylus', use: expect.anything() }, ...baseWebpackConfig.module.rules, ]); }); @@ -239,10 +256,12 @@ describe('framework-preset-angular-cli', () => { AnyComponentStyleBudgetChecker { "budgets": Array [], }, + Object { + "apply": [Function], + }, ContextReplacementPlugin { - "newContentRecursive": undefined, - "newContentRegExp": undefined, - "newContentResource": undefined, + "newContentCreateContextMap": [Function], + "newContentResource": "/Users/shilman/projects/baseline/storybook/app/angular/src/server/__mocks-ng-workspace__/minimal-config/$_lazy_route_resources", "resourceRegExp": /\\\\@angular\\(\\\\\\\\\\|\\\\/\\)core\\(\\\\\\\\\\|\\\\/\\)/, }, DedupeModuleResolvePlugin { @@ -275,26 +294,7 @@ describe('framework-preset-angular-cli', () => { expect(webpackFinalConfig.resolve.plugins).toMatchInlineSnapshot(` Array [ TsconfigPathsPlugin { - "absoluteBaseUrl": "${( - getSystemPath(normalize(path.join(workspaceRoot, 'src'))) + path.sep - ).replace(/\\/g, '\\\\')}", - "baseUrl": "./", - "extensions": Array [ - ".ts", - ".tsx", - ], - "log": Object { - "log": [Function], - "logError": [Function], - "logInfo": [Function], - "logWarning": [Function], - }, - "matchPath": [Function], - "source": "described-resolve", - "target": "resolve", - }, - ] - `); + "absoluteBaseUrl": "`); }); }); describe('when angular.json have "options.styles" config', () => { @@ -328,51 +328,47 @@ describe('framework-preset-angular-cli', () => { it('should set webpack "module.rules"', async () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); - const stylePaths = [ - path.join(workspaceRoot, 'src', 'styles.css'), - path.join(workspaceRoot, 'src', 'styles.scss'), - ]; - expect(webpackFinalConfig.module.rules).toEqual([ - { - exclude: stylePaths, - test: /\.css$/, - use: expect.anything(), - }, - { - exclude: stylePaths, - test: /\.scss$|\.sass$/, - use: expect.anything(), - }, + const expectedRules = [ { - exclude: stylePaths, - test: /\.less$/, - use: expect.anything(), + oneOf: [ + { + exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + use: expect.anything(), + }, + { + include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + use: expect.anything(), + }, + ], }, + { use: expect.anything() }, + ]; + expect(webpackFinalConfig.module.rules).toEqual([ { - exclude: stylePaths, - test: /\.styl$/, - use: expect.anything(), + test: /\.(?:css)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.css$/, - use: expect.anything(), + test: /\.(?:scss)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.scss$|\.sass$/, - use: expect.anything(), + test: /\.(?:sass)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.less$/, - use: expect.anything(), + test: /\.(?:less)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.styl$/, - use: expect.anything(), + test: /\.(?:styl)$/i, + rules: expectedRules, }, + { mimetype: 'text/css', use: expect.anything() }, + { mimetype: 'text/x-scss', use: expect.anything() }, + { mimetype: 'text/x-sass', use: expect.anything() }, + { mimetype: 'text/x-less', use: expect.anything() }, + { mimetype: 'text/x-stylus', use: expect.anything() }, ...baseWebpackConfig.module.rules, ]); }); @@ -422,52 +418,48 @@ describe('framework-preset-angular-cli', () => { it('should set webpack "module.rules"', async () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); - const stylePaths = [ - path.join(workspaceRoot, 'src', 'styles.css'), - path.join(workspaceRoot, 'src', 'styles.scss'), - ]; - expect(webpackFinalConfig.module.rules).toEqual([ + const expectedRules: any = [ { - exclude: stylePaths, - test: /\.css$/, - use: expect.anything(), - }, - { - exclude: stylePaths, - test: /\.scss$|\.sass$/, - use: expect.anything(), - }, - { - exclude: stylePaths, - test: /\.less$/, - use: expect.anything(), + oneOf: [ + { + exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + use: expect.anything(), + }, + { + include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + use: expect.anything(), + }, + ], }, + { use: expect.anything() }, + ]; + expect(webpackFinalConfig.module.rules).toEqual([ { - exclude: stylePaths, - test: /\.styl$/, - use: expect.anything(), + test: /\.(?:css)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.css$/, - use: expect.anything(), + test: /\.(?:scss)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.scss$|\.sass$/, - use: expect.anything(), + test: /\.(?:sass)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.less$/, - use: expect.anything(), + test: /\.(?:less)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.styl$/, - use: expect.anything(), + test: /\.(?:styl)$/i, + rules: expectedRules, }, + { mimetype: 'text/css', use: expect.anything() }, + { mimetype: 'text/x-scss', use: expect.anything() }, + { mimetype: 'text/x-sass', use: expect.anything() }, + { mimetype: 'text/x-less', use: expect.anything() }, + { mimetype: 'text/x-stylus', use: expect.anything() }, ...baseWebpackConfig.module.rules, ]); }); @@ -508,52 +500,48 @@ describe('framework-preset-angular-cli', () => { it('should set webpack "module.rules"', async () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); - const stylePaths = [ - path.join(workspaceRoot, 'src', 'styles.css'), - path.join(workspaceRoot, 'src', 'styles.scss'), - ]; - expect(webpackFinalConfig.module.rules).toEqual([ - { - exclude: stylePaths, - test: /\.css$/, - use: expect.anything(), - }, - { - exclude: stylePaths, - test: /\.scss$|\.sass$/, - use: expect.anything(), - }, + const expectedRules: any = [ { - exclude: stylePaths, - test: /\.less$/, - use: expect.anything(), + oneOf: [ + { + exclude: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + use: expect.anything(), + }, + { + include: [`${workspaceRoot}/src/styles.css`, `${workspaceRoot}/src/styles.scss`], + use: expect.anything(), + }, + ], }, + { use: expect.anything() }, + ]; + expect(webpackFinalConfig.module.rules).toEqual([ { - exclude: stylePaths, - test: /\.styl$/, - use: expect.anything(), + test: /\.(?:css)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.css$/, - use: expect.anything(), + test: /\.(?:scss)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.scss$|\.sass$/, - use: expect.anything(), + test: /\.(?:sass)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.less$/, - use: expect.anything(), + test: /\.(?:less)$/i, + rules: expectedRules, }, { - include: stylePaths, - test: /\.styl$/, - use: expect.anything(), + test: /\.(?:styl)$/i, + rules: expectedRules, }, + { mimetype: 'text/css', use: expect.anything() }, + { mimetype: 'text/x-scss', use: expect.anything() }, + { mimetype: 'text/x-sass', use: expect.anything() }, + { mimetype: 'text/x-less', use: expect.anything() }, + { mimetype: 'text/x-stylus', use: expect.anything() }, ...baseWebpackConfig.module.rules, ]); }); @@ -587,27 +575,47 @@ describe('framework-preset-angular-cli', () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); + const expectedRules: any = [ + { + oneOf: [ + { + exclude: [], + use: expect.anything(), + }, + { + include: [], + use: expect.anything(), + }, + ], + }, + { use: expect.anything() }, + ]; expect(webpackFinalConfig.module.rules).toEqual([ { - exclude: [], - test: /\.css$/, - use: expect.anything(), + test: /\.(?:css)$/i, + rules: expectedRules, + }, + { + test: /\.(?:scss)$/i, + rules: expectedRules, }, { - exclude: [], - test: /\.scss$|\.sass$/, - use: expect.anything(), + test: /\.(?:sass)$/i, + rules: expectedRules, }, { - exclude: [], - test: /\.less$/, - use: expect.anything(), + test: /\.(?:less)$/i, + rules: expectedRules, }, { - exclude: [], - test: /\.styl$/, - use: expect.anything(), + test: /\.(?:styl)$/i, + rules: expectedRules, }, + { mimetype: 'text/css', use: expect.anything() }, + { mimetype: 'text/x-scss', use: expect.anything() }, + { mimetype: 'text/x-sass', use: expect.anything() }, + { mimetype: 'text/x-less', use: expect.anything() }, + { mimetype: 'text/x-stylus', use: expect.anything() }, ...baseWebpackConfig.module.rules, ]); }); @@ -767,7 +775,6 @@ const newWebpackConfiguration = ( devtool: 'cheap-module-source-map', entry: [ '/Users/joe/storybook/lib/core-server/dist/esm/globals/polyfills.js', - '/Users/joe/storybook/lib/core-server/dist/esm/globals/globals.js', '/Users/joe/storybook/examples/angular-cli/.storybook/storybook-init-framework-entry.js', '/Users/joe/storybook/addons/docs/dist/esm/frameworks/common/config.js-generated-other-entry.js', '/Users/joe/storybook/addons/docs/dist/esm/frameworks/angular/config.js-generated-other-entry.js', @@ -797,15 +804,14 @@ const newWebpackConfiguration = ( modules: ['node_modules'], mainFields: ['browser', 'main'], alias: { - '@storybook/addons': '/Users/joe/storybook/lib/addons', - '@storybook/api': '/Users/joe/storybook/lib/api', + '@storybook/preview-api': '/Users/joe/storybook/lib/addons', + '@storybook/manager-api': '/Users/joe/storybook/lib/api', '@storybook/channels': '/Users/joe/storybook/lib/channels', '@storybook/channel-postmessage': '/Users/joe/storybook/lib/channel-postmessage', - '@storybook/components': '/Users/joe/storybook/lib/components', + '@storybook/components': '/Users/joe/storybook/ui/components', '@storybook/core-events': '/Users/joe/storybook/lib/core-events', '@storybook/router': '/Users/joe/storybook/lib/router', '@storybook/theming': '/Users/joe/storybook/lib/theming', - '@storybook/semver': '/Users/joe/storybook/node_modules/@storybook/semver', '@storybook/client-api': '/Users/joe/storybook/lib/client-api', '@storybook/client-logger': '/Users/joe/storybook/lib/client-logger', react: '/Users/joe/storybook/node_modules/react', diff --git a/app/angular/src/server/framework-preset-angular-cli.ts b/code/frameworks/angular/src/server/framework-preset-angular-cli.ts similarity index 81% rename from app/angular/src/server/framework-preset-angular-cli.ts rename to code/frameworks/angular/src/server/framework-preset-angular-cli.ts index 2d7d6da3eb1c..0af9a9217bf6 100644 --- a/app/angular/src/server/framework-preset-angular-cli.ts +++ b/code/frameworks/angular/src/server/framework-preset-angular-cli.ts @@ -1,16 +1,14 @@ import webpack from 'webpack'; import { logger } from '@storybook/node-logger'; -import { targetFromTargetString, BuilderContext, Target } from '@angular-devkit/architect'; +import { BuilderContext, Target, targetFromTargetString } from '@angular-devkit/architect'; import { sync as findUpSync } from 'find-up'; -import semver from '@storybook/semver'; -import dedent from 'ts-dedent'; +import semver from 'semver'; +import { dedent } from 'ts-dedent'; -import { logging, JsonObject } from '@angular-devkit/core'; +import { JsonObject, logging } from '@angular-devkit/core'; +import { getWebpackConfig as getCustomWebpackConfig } from './angular-cli-webpack'; import { moduleIsAvailable } from './utils/module-is-available'; -import { getWebpackConfig as getWebpackConfig12_2_x } from './angular-cli-webpack-12.2.x'; -import { getWebpackConfig as getWebpackConfig13_x_x } from './angular-cli-webpack-13.x.x'; -import { getWebpackConfig as getWebpackConfigOlder } from './angular-cli-webpack-older'; -import { PresetOptions } from './options'; +import { PresetOptions } from './preset-options'; import { getDefaultProjectName, findAngularProjectTarget, @@ -44,7 +42,7 @@ export async function webpackFinal(baseConfig: webpack.Configuration, options: P const builderOptions = await getBuilderOptions(_options, builderContext); const legacyDefaultOptions = await getLegacyDefaultBuildOptions(_options); - return getWebpackConfig13_x_x(_baseConfig, { + return getCustomWebpackConfig(_baseConfig, { builderOptions: { watch: options.configType === 'DEVELOPMENT', ...legacyDefaultOptions, @@ -54,24 +52,6 @@ export async function webpackFinal(baseConfig: webpack.Configuration, options: P }); }, }, - { - info: '=> Loading angular-cli config for angular 12.2.x', - condition: semver.satisfies(angularCliVersion, '12.2.x') && options.angularBuilderContext, - getWebpackConfig: async (_baseConfig, _options) => { - const builderContext = getBuilderContext(_options); - const builderOptions = await getBuilderOptions(_options, builderContext); - - return getWebpackConfig12_2_x(_baseConfig, { - builderOptions, - builderContext, - }); - }, - }, - { - info: '=> Loading angular-cli config for angular lower than 12.2.0', - condition: true, - getWebpackConfig: getWebpackConfigOlder, - }, ]; const webpackGetter = webpackGetterByVersions.find((wg) => wg.condition); @@ -175,7 +155,7 @@ async function getLegacyDefaultBuildOptions(options: PresetOptions) { target: 'build', } as Target; - const { target, project } = findAngularProjectTarget( + const { target } = findAngularProjectTarget( workspaceConfig, browserTarget.project, browserTarget.target diff --git a/code/frameworks/angular/src/server/framework-preset-angular-docs.ts b/code/frameworks/angular/src/server/framework-preset-angular-docs.ts new file mode 100644 index 000000000000..c9f0e26b58cd --- /dev/null +++ b/code/frameworks/angular/src/server/framework-preset-angular-docs.ts @@ -0,0 +1,8 @@ +import path from 'path'; +import { StorybookConfig } from '@storybook/types'; +import { hasDocsOrControls } from '@storybook/docs-tools'; + +export const previewAnnotations: StorybookConfig['previewAnnotations'] = (entry = [], options) => { + if (!hasDocsOrControls(options)) return entry; + return [...entry, path.join(__dirname, '../../dist/client/docs/config')]; +}; diff --git a/app/angular/src/server/framework-preset-angular-ivy.ts b/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts similarity index 84% rename from app/angular/src/server/framework-preset-angular-ivy.ts rename to code/frameworks/angular/src/server/framework-preset-angular-ivy.ts index 65f2e5076419..d68f396113f1 100644 --- a/app/angular/src/server/framework-preset-angular-ivy.ts +++ b/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts @@ -1,7 +1,9 @@ import { Configuration } from 'webpack'; import * as path from 'path'; +import { Preset } from '@storybook/types'; -import { PresetOptions } from './options'; +import { PresetOptions } from './preset-options'; +import { AngularOptions } from '../types'; /** * Source : https://github.com/angular/angular-cli/blob/ebccb5de4a455af813c5e82483db6af20666bdbd/packages/angular_devkit/build_angular/src/utils/load-esm.ts#L23 @@ -17,7 +19,7 @@ import { PresetOptions } from './options'; * @returns A Promise that resolves to the dynamically imported module. */ function loadEsmModule(modulePath: string): Promise { - // eslint-disable-next-line no-new-func + // eslint-disable-next-line @typescript-eslint/no-implied-eval return new Function('modulePath', `return import(modulePath);`)(modulePath) as Promise; } @@ -48,20 +50,17 @@ export const runNgcc = async () => { }; export const webpack = async (webpackConfig: Configuration, options: PresetOptions) => { - const angularOptions = await options.presets.apply( - 'angularOptions', - {} as { - enableIvy?: boolean; - }, - options - ); + const framework = await options.presets.apply('framework'); + const angularOptions = (typeof framework === 'object' ? framework.options : {}) as AngularOptions; // Default to true, if undefined if (angularOptions.enableIvy === false) { return webpackConfig; } - runNgcc(); + if (angularOptions.enableNgcc !== false) { + runNgcc(); + } return { ...webpackConfig, diff --git a/code/frameworks/angular/src/server/plugins/storybook-normalize-angular-entry-plugin.js b/code/frameworks/angular/src/server/plugins/storybook-normalize-angular-entry-plugin.js new file mode 100644 index 000000000000..9d36fc8893e7 --- /dev/null +++ b/code/frameworks/angular/src/server/plugins/storybook-normalize-angular-entry-plugin.js @@ -0,0 +1,54 @@ +const PLUGIN_NAME = 'storybook-normalize-angular-entry-plugin'; + +/** + * Angular's webpack plugin @angular-devkit/build-angular/src/webpack/plugins/styles-webpack-plugin.js + * transforms the original webpackOptions.entry point array into a structure like this: + * + * ```js + * { + * main: { + * import: [...] + * }, + * + * styles: { + * import: [...] + * }, + * } + * ``` + * + * Storybook throws an __webpack_require__.nmd is not a function error, when another runtime bundle (styles~runtime.iframe.bundle.js) is loaded. + * To prevent this error, we have to normalize the entry point to only generate one runtime bundle (main~runtime.iframe.bundle.js). + */ +export default class StorybookNormalizeAngularEntryPlugin { + constructor(options) { + this.options = options; + } + + apply(compiler) { + compiler.hooks.environment.tap(PLUGIN_NAME, () => { + const webpackOptions = compiler.options; + const entry = + typeof webpackOptions.entry === 'function' ? webpackOptions.entry() : webpackOptions.entry; + + webpackOptions.entry = async () => { + const entryResult = await entry; + + if (entryResult.main && entryResult.styles) { + return { + main: { + import: Array.from( + new Set([...entryResult.main.import, ...entryResult.styles.import]) + ), + }, + }; + } + + return entry; + }; + }); + + compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => { + this.compilation = compilation; + }); + } +} diff --git a/code/frameworks/angular/src/server/preset-options.ts b/code/frameworks/angular/src/server/preset-options.ts new file mode 100644 index 000000000000..a831d206f861 --- /dev/null +++ b/code/frameworks/angular/src/server/preset-options.ts @@ -0,0 +1,17 @@ +import { Options as CoreOptions } from '@storybook/types'; + +import { BuilderContext } from '@angular-devkit/architect'; +import { ExtraEntryPoint, StylePreprocessorOptions } from '@angular-devkit/build-angular'; + +export type PresetOptions = CoreOptions & { + /* Allow to get the options of a targeted "browser builder" */ + angularBrowserTarget?: string | null; + /* Defined set of options. These will take over priority from angularBrowserTarget options */ + angularBuilderOptions?: { + styles?: ExtraEntryPoint[]; + stylePreprocessorOptions?: StylePreprocessorOptions; + }; + /* Angular context from builder */ + angularBuilderContext?: BuilderContext | null; + tsConfig?: string; +}; diff --git a/code/frameworks/angular/src/server/utils/filter-out-styling-rules.ts b/code/frameworks/angular/src/server/utils/filter-out-styling-rules.ts new file mode 100644 index 000000000000..9ececa7c18bf --- /dev/null +++ b/code/frameworks/angular/src/server/utils/filter-out-styling-rules.ts @@ -0,0 +1,19 @@ +import { Configuration, RuleSetRule } from 'webpack'; + +const isStylingRule = (rule: RuleSetRule) => { + const { test } = rule; + + if (!test) { + return false; + } + + if (!(test instanceof RegExp)) { + return false; + } + + return test.test('.css') || test.test('.scss') || test.test('.sass'); +}; + +export const filterOutStylingRules = (config: Configuration) => { + return (config.module.rules as RuleSetRule[]).filter((rule) => !isStylingRule(rule)); +}; diff --git a/app/angular/src/server/utils/module-is-available.ts b/code/frameworks/angular/src/server/utils/module-is-available.ts similarity index 100% rename from app/angular/src/server/utils/module-is-available.ts rename to code/frameworks/angular/src/server/utils/module-is-available.ts diff --git a/app/angular/src/server/utils/normalize-asset-patterns.ts b/code/frameworks/angular/src/server/utils/normalize-asset-patterns.ts similarity index 94% rename from app/angular/src/server/utils/normalize-asset-patterns.ts rename to code/frameworks/angular/src/server/utils/normalize-asset-patterns.ts index 928ac8baf192..4d8d7279605b 100644 --- a/app/angular/src/server/utils/normalize-asset-patterns.ts +++ b/code/frameworks/angular/src/server/utils/normalize-asset-patterns.ts @@ -6,18 +6,18 @@ */ import { statSync } from 'fs'; import { + Path, BaseException, basename, dirname, getSystemPath, join, normalize, - Path, relative, resolve, } from '@angular-devkit/core'; - -import { AssetPattern, AssetPatternClass } from '@angular-devkit/build-angular/src/browser/schema'; +import { AssetPattern } from '@angular-devkit/build-angular'; +import { AssetPatternClass } from '@angular-devkit/build-angular/src/builders/browser/schema'; export class MissingAssetSourceRootException extends BaseException { constructor(path: string) { diff --git a/app/angular/src/server/utils/normalize-optimization.ts b/code/frameworks/angular/src/server/utils/normalize-optimization.ts similarity index 97% rename from app/angular/src/server/utils/normalize-optimization.ts rename to code/frameworks/angular/src/server/utils/normalize-optimization.ts index 6fb444cf1326..345f3919e056 100644 --- a/app/angular/src/server/utils/normalize-optimization.ts +++ b/code/frameworks/angular/src/server/utils/normalize-optimization.ts @@ -1,5 +1,4 @@ -import { OptimizationUnion } from '@angular-devkit/build-angular/src/browser/schema'; - +import { OptimizationUnion } from '@angular-devkit/build-angular'; import { NormalizedOptimizationOptions } from '@angular-devkit/build-angular/src/utils/normalize-optimization'; import { moduleIsAvailable } from './module-is-available'; diff --git a/code/frameworks/angular/src/types.ts b/code/frameworks/angular/src/types.ts new file mode 100644 index 000000000000..926213e222b6 --- /dev/null +++ b/code/frameworks/angular/src/types.ts @@ -0,0 +1,50 @@ +import { + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/core-webpack'; +import { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/angular'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = AngularOptions & { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; + +export interface AngularOptions { + enableIvy?: boolean; + enableNgcc?: boolean; +} diff --git a/code/frameworks/angular/src/typings.d.ts b/code/frameworks/angular/src/typings.d.ts new file mode 100644 index 000000000000..9af3b65be338 --- /dev/null +++ b/code/frameworks/angular/src/typings.d.ts @@ -0,0 +1,19 @@ +/* eslint-disable no-underscore-dangle, @typescript-eslint/naming-convention */ + +// will be provided by the webpack define plugin +declare var NODE_ENV: string | undefined; + +declare var __STORYBOOK_ADDONS_CHANNEL__: any; +declare var __STORYBOOK_ADDONS_PREVIEW: any; +declare var __STORYBOOK_COMPODOC_JSON__: any; +declare var __STORYBOOK_CLIENT_API__: any; +declare var __STORYBOOK_PREVIEW__: any; +declare var __STORYBOOK_STORY_STORE__: any; +declare var CHANNEL_OPTIONS: any; +declare var DOCS_OPTIONS: any; +declare var FEATURES: any; +declare var IS_STORYBOOK: any; +declare var LOGLEVEL: any; +declare var STORIES: any; +declare var STORYBOOK_ENV: 'angular'; +declare var STORYBOOK_HOOKS_CONTEXT: any; diff --git a/code/frameworks/angular/template/cli/.eslintrc.json b/code/frameworks/angular/template/cli/.eslintrc.json new file mode 100644 index 000000000000..57c1b3246cb7 --- /dev/null +++ b/code/frameworks/angular/template/cli/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "@typescript-eslint/consistent-type-imports": ["error", { "disallowTypeAnnotations": false }] + } +} diff --git a/code/frameworks/angular/template/cli/Button.stories.ts b/code/frameworks/angular/template/cli/Button.stories.ts new file mode 100644 index 000000000000..85ce82c88270 --- /dev/null +++ b/code/frameworks/angular/template/cli/Button.stories.ts @@ -0,0 +1,51 @@ +import type { Meta, StoryObj } from '@storybook/angular'; +import Button from './button.component'; + +// More on how to set up stories at: https://storybook.js.org/docs/7.0/angular/writing-stories/introduction +const meta: Meta`, + styleUrls: ['./button.css'], +}) +export default class FrameworkButtonComponent { + /** + * Is this the principal call to action on the page? + */ + @Input() + primary = false; + + /** + * What background color to use + */ + @Input() + backgroundColor?: string; + + /** + * How large should the button be? + */ + @Input() + size: 'small' | 'medium' | 'large' = 'medium'; + + /** + * Button contents + * + * @required + */ + @Input() + label = 'Button'; + + /** + * Optional click handler + */ + @Output() + onClick = new EventEmitter(); + + public get classes(): string[] { + const mode = this.primary ? 'storybook-button--primary' : 'storybook-button--secondary'; + + return ['storybook-button', `storybook-button--${this.size}`, mode]; + } +} diff --git a/examples/cra-ts-essentials/src/stories/button.css b/code/frameworks/angular/template/components/button.css similarity index 100% rename from examples/cra-ts-essentials/src/stories/button.css rename to code/frameworks/angular/template/components/button.css diff --git a/code/frameworks/angular/template/components/form.component.ts b/code/frameworks/angular/template/components/form.component.ts new file mode 100644 index 000000000000..2bc4c00298e8 --- /dev/null +++ b/code/frameworks/angular/template/components/form.component.ts @@ -0,0 +1,37 @@ +import { Component, Output, EventEmitter } from '@angular/core'; + +@Component({ + selector: 'storybook-form', + template: ` +
    + + +

    Completed!!

    +
    + `, +}) +export default class FormComponent { + /** + * Optional success handler + */ + @Output() + onSuccess = new EventEmitter(); + + value = ''; + + complete = false; + + handleSubmit(event: SubmitEvent) { + event.preventDefault(); + this.onSuccess.emit(this.value); + setTimeout(() => { + this.complete = true; + }, 500); + setTimeout(() => { + this.complete = false; + }, 1500); + } +} diff --git a/code/frameworks/angular/template/components/html.component.ts b/code/frameworks/angular/template/components/html.component.ts new file mode 100644 index 000000000000..7efcf9770e6e --- /dev/null +++ b/code/frameworks/angular/template/components/html.component.ts @@ -0,0 +1,22 @@ +import { Component, Input } from '@angular/core'; +import { DomSanitizer } from '@angular/platform-browser'; + +@Component({ + selector: 'storybook-html', + template: `
    `, +}) +export default class HtmlComponent { + /** + * The HTML to render + * + * @required + */ + @Input() + content = ''; + + constructor(private sanitizer: DomSanitizer) {} + + get safeContent() { + return this.sanitizer.bypassSecurityTrustHtml(this.content); + } +} diff --git a/code/frameworks/angular/template/components/index.js b/code/frameworks/angular/template/components/index.js new file mode 100644 index 000000000000..71aafe7204fc --- /dev/null +++ b/code/frameworks/angular/template/components/index.js @@ -0,0 +1,8 @@ +import { global } from '@storybook/global'; + +import Button from './button.component'; +import Html from './html.component'; +import Pre from './pre.component'; +import Form from './form.component'; + +global.Components = { Button, Html, Pre, Form }; diff --git a/code/frameworks/angular/template/components/pre.component.ts b/code/frameworks/angular/template/components/pre.component.ts new file mode 100644 index 000000000000..76669d310819 --- /dev/null +++ b/code/frameworks/angular/template/components/pre.component.ts @@ -0,0 +1,29 @@ +import { Component, Input } from '@angular/core'; + +@Component({ + selector: 'storybook-pre', + template: `
    {{ finalText }}
    `, +}) +export default class PreComponent { + /** + * Styles to apply to the component + */ + @Input() + style?: Object; + + /** + * An object to render + */ + @Input() + object?: Object; + + /** + * The code to render + */ + @Input() + text?: string; + + get finalText() { + return this.object ? JSON.stringify(this.object, null, 2) : this.text; + } +} diff --git a/code/frameworks/angular/template/stories/angular-mdx.stories.mdx b/code/frameworks/angular/template/stories/angular-mdx.stories.mdx new file mode 100644 index 000000000000..afe20c14379b --- /dev/null +++ b/code/frameworks/angular/template/stories/angular-mdx.stories.mdx @@ -0,0 +1,25 @@ +import { global as globalThis } from '@storybook/global'; +import { moduleMetadata } from '@storybook/angular'; +import { Meta, Story, Canvas } from '@storybook/addon-docs'; + +export const Button = globalThis.Components.Button; + + + +# Angular-specific MDX Stories + + + + {{ + template: ``, + props: { + text: 'hello button', + onClick: () => {}, + }, + }} + + diff --git a/examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.component.html b/code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.html similarity index 100% rename from examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.component.html rename to code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.html diff --git a/examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.component.scss b/code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.scss similarity index 100% rename from examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.component.scss rename to code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.scss diff --git a/examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.component.ts b/code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.ts similarity index 93% rename from examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.component.ts rename to code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.ts index 5c9a7461a289..dbcf44c06ec5 100644 --- a/examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.component.ts +++ b/code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.component.ts @@ -2,13 +2,13 @@ /* eslint-disable no-underscore-dangle */ import { Component, - ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, ViewChild, + ElementRef, } from '@angular/core'; export const exportedConstant = 'An exported constant'; @@ -45,7 +45,7 @@ export enum ButtonAccent { styleUrls: ['./doc-button.component.scss'], }) export class DocButtonComponent { - @ViewChild('buttonRef', { static: false }) buttonRef: ElementRef; + @ViewChild('buttonRef', { static: false }) buttonRef!: ElementRef; /** Test default value. */ @Input() @@ -68,10 +68,11 @@ export class DocButtonComponent { /** Test null default value. */ @Input() - public aNullValue = null; + public aNullValue: string | null = null; /** Test null default value. */ @Input() + // @ts-expect-error intentionally undefined public anUndefinedValue; /** Test numeric default value. */ @@ -91,7 +92,7 @@ export class DocButtonComponent { public accent: ButtonAccent = ButtonAccent.Normal; /** Specifies some arbitrary object. This comment is to test certain chars like apostrophes - it's working */ - @Input() public someDataObject: ISomeInterface; + @Input() public someDataObject!: ISomeInterface; /** * The inner text of the button. @@ -99,7 +100,7 @@ export class DocButtonComponent { * @required */ @Input() - public label: string; + public label!: string; /** Size of the button. */ @Input() @@ -148,7 +149,7 @@ export class DocButtonComponent { } @HostListener('click', ['$event']) - onClickListener(event) { + onClickListener(event: Event) { console.log('button', event.target); this.handleClick(event); } @@ -221,12 +222,12 @@ export class DocButtonComponent { } @Input('showKeyAlias') - public showKey: keyof T; + public showKey!: keyof T; @Input() public set item(item: T[]) { this.processedItem = item; } - public processedItem: T[]; + public processedItem!: T[]; } diff --git a/examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.stories.ts b/code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.stories.ts similarity index 78% rename from examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.stories.ts rename to code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.stories.ts index c411acf46366..d23f3896359f 100644 --- a/examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.stories.ts +++ b/code/frameworks/angular/template/stories/argTypes/doc-button/doc-button.stories.ts @@ -1,11 +1,11 @@ +import { Args } from '@storybook/angular'; import { DocButtonComponent } from './doc-button.component'; export default { - title: 'Addons/Docs/DocButton', component: DocButtonComponent, }; -export const Basic = (args) => ({ +export const Basic = (args: Args) => ({ props: args, }); Basic.args = { label: 'Args test', isDisabled: false }; @@ -17,7 +17,7 @@ Basic.ArgTypes = { }, }; -export const WithTemplate = (args) => ({ +export const WithTemplate = (args: Args) => ({ props: args, template: '', }); diff --git a/examples/angular-cli/src/stories/addons/docs/doc-directive/doc-directive.directive.ts b/code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.directive.ts similarity index 81% rename from examples/angular-cli/src/stories/addons/docs/doc-directive/doc-directive.directive.ts rename to code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.directive.ts index bcb039c9d9f1..1f92588b813a 100644 --- a/examples/angular-cli/src/stories/addons/docs/doc-directive/doc-directive.directive.ts +++ b/code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.directive.ts @@ -1,5 +1,4 @@ -/* eslint-disable no-useless-constructor */ -import { Directive, ElementRef, AfterViewInit, Input } from '@angular/core'; +import { ElementRef, AfterViewInit, Directive, Input } from '@angular/core'; /** * This is an Angular Directive diff --git a/examples/angular-cli/src/stories/addons/docs/doc-directive/doc-directive.stories.ts b/code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.stories.ts similarity index 89% rename from examples/angular-cli/src/stories/addons/docs/doc-directive/doc-directive.stories.ts rename to code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.stories.ts index fe5d8d97b236..b734b93bf40d 100644 --- a/examples/angular-cli/src/stories/addons/docs/doc-directive/doc-directive.stories.ts +++ b/code/frameworks/angular/template/stories/argTypes/doc-directive/doc-directive.stories.ts @@ -1,7 +1,6 @@ import { DocDirective } from './doc-directive.directive'; export default { - title: 'Addons/Docs/DocDirective', component: DocDirective, }; diff --git a/examples/angular-cli/src/stories/addons/docs/doc-injectable/doc-injectable.service.ts b/code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.service.ts similarity index 94% rename from examples/angular-cli/src/stories/addons/docs/doc-injectable/doc-injectable.service.ts rename to code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.service.ts index b6ad136fec33..e269ceae5a95 100644 --- a/examples/angular-cli/src/stories/addons/docs/doc-injectable/doc-injectable.service.ts +++ b/code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.service.ts @@ -21,7 +21,7 @@ export class DocInjectableService { /** * Get posts from Backend. */ - getPosts() { + getPosts(): unknown[] { return []; } } diff --git a/examples/angular-cli/src/stories/addons/docs/doc-injectable/doc-injectable.stories.ts b/code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.stories.ts similarity index 90% rename from examples/angular-cli/src/stories/addons/docs/doc-injectable/doc-injectable.stories.ts rename to code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.stories.ts index b329ffc89367..d662a3de255f 100644 --- a/examples/angular-cli/src/stories/addons/docs/doc-injectable/doc-injectable.stories.ts +++ b/code/frameworks/angular/template/stories/argTypes/doc-injectable/doc-injectable.stories.ts @@ -1,7 +1,6 @@ import { DocInjectableService } from './doc-injectable.service'; export default { - title: 'Addons/Docs/DocInjectable', component: DocInjectableService, parameters: { controls: { hideNoControlsWarning: true }, diff --git a/examples/angular-cli/src/stories/addons/docs/doc-pipe/doc-pipe.pipe.ts b/code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.pipe.ts similarity index 85% rename from examples/angular-cli/src/stories/addons/docs/doc-pipe/doc-pipe.pipe.ts rename to code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.pipe.ts index 6b7aca418a37..43e12d73dd04 100644 --- a/examples/angular-cli/src/stories/addons/docs/doc-pipe/doc-pipe.pipe.ts +++ b/code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.pipe.ts @@ -1,4 +1,4 @@ -import { Pipe, PipeTransform } from '@angular/core'; +import { PipeTransform, Pipe } from '@angular/core'; /** * This is an Angular Pipe diff --git a/examples/angular-cli/src/stories/addons/docs/doc-pipe/doc-pipe.stories.ts b/code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.stories.ts similarity index 91% rename from examples/angular-cli/src/stories/addons/docs/doc-pipe/doc-pipe.stories.ts rename to code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.stories.ts index 07c8660958e4..ba6f0f282f63 100644 --- a/examples/angular-cli/src/stories/addons/docs/doc-pipe/doc-pipe.stories.ts +++ b/code/frameworks/angular/template/stories/argTypes/doc-pipe/doc-pipe.stories.ts @@ -1,7 +1,6 @@ import { DocPipe } from './doc-pipe.pipe'; export default { - title: 'Addons/Docs/DocPipe', component: DocPipe, parameters: { controls: { hideNoControlsWarning: true }, diff --git a/code/frameworks/angular/template/stories/basics/README.stories.mdx b/code/frameworks/angular/template/stories/basics/README.stories.mdx new file mode 100644 index 000000000000..4af25e032e7b --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/README.stories.mdx @@ -0,0 +1,7 @@ +import { Meta } from '@storybook/addon-docs'; + + + +# Examples for Angular features + +These examples serve to highlight the right Storybook operation for basics Angular features diff --git a/code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva-component.stories.ts b/code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva-component.stories.ts new file mode 100644 index 000000000000..228e2d7b9045 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva-component.stories.ts @@ -0,0 +1,27 @@ +import { FormsModule } from '@angular/forms'; +import { Meta, StoryFn, moduleMetadata } from '@storybook/angular'; +import { CustomCvaComponent } from './custom-cva.component'; + +export default { + // title: 'Basics / Angular forms / ControlValueAccessor', + component: CustomCvaComponent, + decorators: [ + moduleMetadata({ + imports: [FormsModule], + }), + (storyFn) => { + const story = storyFn(); + console.log(story); + return story; + }, + ], +} as Meta; + +export const SimpleInput: StoryFn = () => ({ + props: { + ngModel: 'Type anything', + ngModelChange: () => {}, + }, +}); + +SimpleInput.storyName = 'Simple input'; diff --git a/examples/angular-cli/src/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts b/code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts similarity index 98% rename from examples/angular-cli/src/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts rename to code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts index 3806d30ac5e8..ee2209c940fc 100644 --- a/examples/angular-cli/src/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts +++ b/code/frameworks/angular/template/stories/basics/angular-forms/customControlValueAccessor/custom-cva.component.ts @@ -18,7 +18,7 @@ const NOOP = () => {}; ], }) export class CustomCvaComponent implements ControlValueAccessor { - disabled: boolean; + disabled?: boolean; protected onChange: (value: any) => void = NOOP; diff --git a/examples/angular-cli/src/stories/basics/component-with-complex-selectors/attribute-selector.component.ts b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selector.component.ts similarity index 82% rename from examples/angular-cli/src/stories/basics/component-with-complex-selectors/attribute-selector.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selector.component.ts index fca8a0711fc3..58618870358f 100644 --- a/examples/angular-cli/src/stories/basics/component-with-complex-selectors/attribute-selector.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selector.component.ts @@ -1,4 +1,4 @@ -import { Component, ComponentFactoryResolver, ElementRef } from '@angular/core'; +import { ComponentFactoryResolver, ElementRef, Component } from '@angular/core'; @Component({ selector: 'storybook-attribute-selector[foo=bar]', @@ -7,9 +7,9 @@ import { Component, ComponentFactoryResolver, ElementRef } from '@angular/core'; Generated template: {{ generatedTemplate }}`, }) export class AttributeSelectorComponent { - generatedTemplate = ''; + generatedTemplate!: string; - selectors = ''; + selectors!: string; constructor(public el: ElementRef, private resolver: ComponentFactoryResolver) { const factory = this.resolver.resolveComponentFactory(AttributeSelectorComponent); diff --git a/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selectors.component.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selectors.component.stories.ts new file mode 100644 index 000000000000..d935de5215d7 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/attribute-selectors.component.stories.ts @@ -0,0 +1,8 @@ +import { AttributeSelectorComponent } from './attribute-selector.component'; + +export default { + // title: 'Basics / Component / With Complex Selectors', + component: AttributeSelectorComponent, +}; + +export const AttributeSelectors = {}; diff --git a/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.stories.ts new file mode 100644 index 000000000000..c8da5e41e2c4 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.stories.ts @@ -0,0 +1,8 @@ +import { ClassSelectorComponent } from './class-selector.component'; + +export default { + // title: 'Basics / Component / With Complex Selectors', + component: ClassSelectorComponent, +}; + +export const ClassSelectors = {}; diff --git a/examples/angular-cli/src/stories/basics/component-with-complex-selectors/class-selector.component.ts b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.ts similarity index 82% rename from examples/angular-cli/src/stories/basics/component-with-complex-selectors/class-selector.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.ts index 7d62a37ef39a..3e81b5c5074d 100644 --- a/examples/angular-cli/src/stories/basics/component-with-complex-selectors/class-selector.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/class-selector.component.ts @@ -1,4 +1,4 @@ -import { Component, ComponentFactoryResolver, ElementRef } from '@angular/core'; +import { ComponentFactoryResolver, ElementRef, Component } from '@angular/core'; @Component({ selector: 'storybook-class-selector.foo, storybook-class-selector.bar', @@ -7,9 +7,9 @@ import { Component, ComponentFactoryResolver, ElementRef } from '@angular/core'; Generated template: {{ generatedTemplate }}`, }) export class ClassSelectorComponent { - generatedTemplate = ''; + generatedTemplate!: string; - selectors = ''; + selectors!: string; constructor(public el: ElementRef, private resolver: ComponentFactoryResolver) { const factory = this.resolver.resolveComponentFactory(ClassSelectorComponent); diff --git a/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-class-selector.component.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-class-selector.component.stories.ts new file mode 100644 index 000000000000..0ed46ecfdbcd --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-class-selector.component.stories.ts @@ -0,0 +1,8 @@ +import { MultipleClassSelectorComponent } from './multiple-selector.component'; + +export default { + // title: 'Basics / Component / With Complex Selectors', + component: MultipleClassSelectorComponent, +}; + +export const MultipleClassSelectors = {}; diff --git a/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.stories.ts new file mode 100644 index 000000000000..3dac394c440a --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.stories.ts @@ -0,0 +1,8 @@ +import { MultipleSelectorComponent } from './multiple-selector.component'; + +export default { + // title: 'Basics / Component / With Complex Selectors', + component: MultipleSelectorComponent, +}; + +export const MultipleSelectors = {}; diff --git a/examples/angular-cli/src/stories/basics/component-with-complex-selectors/multiple-selector.component.ts b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.ts similarity index 86% rename from examples/angular-cli/src/stories/basics/component-with-complex-selectors/multiple-selector.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.ts index bc50cfe83c42..00a4b98c3bfa 100644 --- a/examples/angular-cli/src/stories/basics/component-with-complex-selectors/multiple-selector.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-complex-selectors/multiple-selector.component.ts @@ -1,4 +1,4 @@ -import { Component, ComponentFactoryResolver, ElementRef } from '@angular/core'; +import { ComponentFactoryResolver, ElementRef, Component } from '@angular/core'; @Component({ selector: 'storybook-multiple-selector, storybook-multiple-selector2', @@ -7,9 +7,9 @@ import { Component, ComponentFactoryResolver, ElementRef } from '@angular/core'; Generated template: {{ generatedTemplate }}`, }) export class MultipleSelectorComponent { - generatedTemplate = ''; + generatedTemplate!: string; - selectors = ''; + selectors!: string; constructor(public el: ElementRef, private resolver: ComponentFactoryResolver) { const factory = this.resolver.resolveComponentFactory(MultipleClassSelectorComponent); @@ -25,9 +25,9 @@ export class MultipleSelectorComponent { Generated template: {{ generatedTemplate }}`, }) export class MultipleClassSelectorComponent { - generatedTemplate = ''; + generatedTemplate!: string; - selectors = ''; + selectors!: string; constructor(public el: ElementRef, private resolver: ComponentFactoryResolver) { const factory = this.resolver.resolveComponentFactory(MultipleClassSelectorComponent); diff --git a/examples/angular-cli/src/stories/basics/component-with-enums/enums.component.html b/code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.html similarity index 100% rename from examples/angular-cli/src/stories/basics/component-with-enums/enums.component.html rename to code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.html diff --git a/code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.stories.ts new file mode 100644 index 000000000000..647ca86d8d67 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.stories.ts @@ -0,0 +1,24 @@ +import { Meta, StoryFn } from '@storybook/angular'; +import { + EnumsComponent, + EnumNumeric, + EnumNumericInitial, + EnumStringValues, +} from './enums.component'; + +export default { + // title: 'Basics / Component / With Enum Types', + component: EnumsComponent, +} as Meta; + +export const Basic: StoryFn = (args) => ({ + props: args, +}); +Basic.args = { + unionType: 'union a', + aliasedUnionType: 'Type Alias 1', + enumNumeric: EnumNumeric.FIRST, + enumNumericInitial: EnumNumericInitial.UNO, + enumStrings: EnumStringValues.PRIMARY, + enumAlias: EnumNumeric.FIRST, +}; diff --git a/examples/angular-cli/src/stories/basics/component-with-enums/enums.component.ts b/code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.ts similarity index 76% rename from examples/angular-cli/src/stories/basics/component-with-enums/enums.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.ts index 48e781942386..822aeaff17e1 100644 --- a/examples/angular-cli/src/stories/basics/component-with-enums/enums.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-enums/enums.component.ts @@ -9,22 +9,22 @@ import { Component, Input } from '@angular/core'; }) export class EnumsComponent { /** Union Type of string literals */ - @Input() unionType: 'Union A' | 'Union B' | 'Union C'; + @Input() unionType?: 'Union A' | 'Union B' | 'Union C'; /** Union Type assigned as a Type Alias */ - @Input() aliasedUnionType: TypeAlias; + @Input() aliasedUnionType?: TypeAlias; /** Base Enum Type with no assigned values */ - @Input() enumNumeric: EnumNumeric; + @Input() enumNumeric?: EnumNumeric; /** Enum with initial numeric value and auto-incrementing subsequent values */ - @Input() enumNumericInitial: EnumNumericInitial; + @Input() enumNumericInitial?: EnumNumericInitial; /** Enum with string values */ - @Input() enumStrings: EnumStringValues; + @Input() enumStrings?: EnumStringValues; /** Type Aliased Enum Type */ - @Input() enumAlias: EnumAlias; + @Input() enumAlias?: EnumAlias; } /** diff --git a/examples/angular-cli/src/stories/basics/component-with-inheritance/base-button.component.ts b/code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.component.ts similarity index 91% rename from examples/angular-cli/src/stories/basics/component-with-inheritance/base-button.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.component.ts index 6afc2f20cce8..0cd694506d50 100644 --- a/examples/angular-cli/src/stories/basics/component-with-inheritance/base-button.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.component.ts @@ -6,5 +6,5 @@ import { Component, Input } from '@angular/core'; }) export class BaseButtonComponent { @Input() - label: string; + label?: string; } diff --git a/code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.stories.ts new file mode 100644 index 000000000000..a206115f5de7 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-inheritance/base-button.stories.ts @@ -0,0 +1,12 @@ +import { BaseButtonComponent } from './base-button.component'; + +export default { + // title: 'Basics / Component / With Inheritance', + component: BaseButtonComponent, +}; + +export const BaseButton = () => ({ + props: { + label: 'this is label', + }, +}); diff --git a/examples/angular-cli/src/stories/basics/component-with-inheritance/icon-button.component.ts b/code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.component.ts similarity index 94% rename from examples/angular-cli/src/stories/basics/component-with-inheritance/icon-button.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.component.ts index 82ff17cf9e96..3994a3de2a97 100644 --- a/examples/angular-cli/src/stories/basics/component-with-inheritance/icon-button.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.component.ts @@ -7,5 +7,5 @@ import { BaseButtonComponent } from './base-button.component'; }) export class IconButtonComponent extends BaseButtonComponent { @Input() - icon: string; + icon?: string; } diff --git a/code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.stories.ts new file mode 100644 index 000000000000..baefe65c4f58 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-inheritance/icon-button.stories.ts @@ -0,0 +1,13 @@ +import { IconButtonComponent } from './icon-button.component'; + +export default { + // title: 'Basics / Component / With Inheritance', + component: IconButtonComponent, +}; + +export const IconButton = () => ({ + props: { + icon: 'this is icon', + label: 'this is label', + }, +}); diff --git a/code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-about-parent.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-about-parent.stories.ts new file mode 100644 index 000000000000..0512582aca6e --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-about-parent.stories.ts @@ -0,0 +1,58 @@ +import { Component, Input } from '@angular/core'; +import { componentWrapperDecorator, Meta, StoryFn } from '@storybook/angular'; + +@Component({ + selector: 'sb-button', + template: ``, + styles: [ + ` + button { + padding: 4px; + } + `, + ], +}) +class SbButtonComponent { + @Input() + color = '#5eadf5'; +} + +export default { + // title: 'Basics / Component / With ng-content / Button with different contents', + // Implicitly declares the component to Angular + // This will be the component described by the addon docs + component: SbButtonComponent, + decorators: [ + // Wrap all stories with this template + componentWrapperDecorator( + (story) => `${story}`, + + ({ args }) => ({ propsColor: args['color'] }) + ), + ], + argTypes: { + color: { control: 'color' }, + }, +} as Meta; + +// By default storybook uses the default export component if no template or component is defined in the story +// So Storybook nests the component twice because it is first added by the componentWrapperDecorator. +export const AlwaysDefineTemplateOrComponent: StoryFn = () => ({}); + +export const EmptyButton: StoryFn = () => ({ + template: '', +}); + +export const WithDynamicContentAndArgs: StoryFn = (args) => ({ + template: `${args['content']}`, +}); +WithDynamicContentAndArgs.argTypes = { + content: { control: 'text' }, +}; +WithDynamicContentAndArgs.args = { content: 'My button text' }; + +export const InH1: StoryFn = () => ({ + template: 'My button in h1', +}); +InH1.decorators = [componentWrapperDecorator((story) => `

    ${story}

    `)]; +InH1.storyName = 'In

    '; diff --git a/code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-simple.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-simple.stories.ts new file mode 100644 index 000000000000..13cc2eb550c5 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-ng-content/ng-content-simple.stories.ts @@ -0,0 +1,29 @@ +import { Component } from '@angular/core'; + +import { Meta, StoryFn } from '@storybook/angular/'; + +@Component({ + selector: 'storybook-with-ng-content', + template: `Content value: +
    `, +}) +class WithNgContentComponent {} + +export default { + // title: 'Basics / Component / With ng-content / Simple', + component: WithNgContentComponent, +} as Meta; + +export const OnlyComponent: StoryFn = () => ({}); + +export const Default: StoryFn = () => ({ + template: `

    This is rendered in ng-content

    `, +}); + +export const WithDynamicContentAndArgs: StoryFn = (args) => ({ + template: `

    ${args['content']}

    `, +}); +WithDynamicContentAndArgs.argTypes = { + content: { control: 'text' }, +}; +WithDynamicContentAndArgs.args = { content: 'Default content' }; diff --git a/examples/angular-cli/src/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts similarity index 77% rename from examples/angular-cli/src/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts rename to code/frameworks/angular/template/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts index d883d872b973..7f5941ab8003 100644 --- a/examples/angular-cli/src/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-ng-on-destroy/component-with-on-destroy.stories.ts @@ -1,5 +1,5 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; -import { Story, Meta } from '@storybook/angular'; +import { OnDestroy, OnInit, Component } from '@angular/core'; +import { Meta, StoryFn } from '@storybook/angular'; @Component({ selector: 'on-destroy', @@ -7,7 +7,7 @@ import { Story, Meta } from '@storybook/angular'; 📝 The current time in console should no longer display after a change of story`, }) class OnDestroyComponent implements OnInit, OnDestroy { - time: string; + time?: string; interval: any; @@ -28,7 +28,7 @@ class OnDestroyComponent implements OnInit, OnDestroy { } export default { - title: 'Basics / Component / with ngOnDestroy', + // title: 'Basics / Component / with ngOnDestroy', component: OnDestroyComponent, parameters: { // disabled due to new Date() @@ -37,6 +37,6 @@ export default { }, } as Meta; -export const SimpleComponent: Story = () => ({ +export const SimpleComponent: StoryFn = () => ({ component: OnDestroyComponent, }); diff --git a/examples/angular-cli/src/stories/basics/component-with-on-push/on-push-box.component.ts b/code/frameworks/angular/template/stories/basics/component-with-on-push/on-push-box.component.ts similarity index 81% rename from examples/angular-cli/src/stories/basics/component-with-on-push/on-push-box.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-on-push/on-push-box.component.ts index e35ada4b1c5b..b6bf293f1b0e 100644 --- a/examples/angular-cli/src/stories/basics/component-with-on-push/on-push-box.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-on-push/on-push-box.component.ts @@ -15,7 +15,7 @@ import { Component, Input, ChangeDetectionStrategy, HostBinding } from '@angular changeDetection: ChangeDetectionStrategy.OnPush, }) export class OnPushBoxComponent { - @Input() word: string; + @Input() word?: string; - @Input() @HostBinding('style.background-color') bgColor: string; + @Input() @HostBinding('style.background-color') bgColor?: string; } diff --git a/code/frameworks/angular/template/stories/basics/component-with-on-push/on-push.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-on-push/on-push.stories.ts new file mode 100644 index 000000000000..6ad452797bc2 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-on-push/on-push.stories.ts @@ -0,0 +1,21 @@ +import { Meta, StoryFn } from '@storybook/angular'; +import { OnPushBoxComponent } from './on-push-box.component'; + +export default { + // title: 'Basics / Component / With OnPush strategy', + component: OnPushBoxComponent, + argTypes: { + word: { control: 'text' }, + bgColor: { control: 'color' }, + }, + args: { + word: 'The text', + bgColor: '#FFF000', + }, +} as Meta; + +export const ClassSpecifiedComponentWithOnPushAndArgs: StoryFn = (args) => ({ + props: args, +}); +ClassSpecifiedComponentWithOnPushAndArgs.storyName = + 'Class-specified component with OnPush and Args'; diff --git a/code/frameworks/angular/template/stories/basics/component-with-pipe/custom-pipes.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-pipe/custom-pipes.stories.ts new file mode 100644 index 000000000000..6c8f9254208f --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-pipe/custom-pipes.stories.ts @@ -0,0 +1,31 @@ +import { Meta, StoryFn, moduleMetadata } from '@storybook/angular'; + +import { CustomPipePipe } from './custom.pipe'; +import { WithPipeComponent } from './with-pipe.component'; + +export default { + // title: 'Basics / Component / With Pipes', + component: WithPipeComponent, + decorators: [ + moduleMetadata({ + declarations: [CustomPipePipe], + }), + ], +} as Meta; + +export const Simple: StoryFn = () => ({ + props: { + field: 'foobar', + }, +}); + +export const WithArgsStory: StoryFn = (args) => ({ + props: args, +}); +WithArgsStory.storyName = 'With args'; +WithArgsStory.argTypes = { + field: { control: 'text' }, +}; +WithArgsStory.args = { + field: 'Foo Bar', +}; diff --git a/code/frameworks/angular/template/stories/basics/component-with-pipe/custom.pipe.ts b/code/frameworks/angular/template/stories/basics/component-with-pipe/custom.pipe.ts new file mode 100644 index 000000000000..0038bd609241 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-pipe/custom.pipe.ts @@ -0,0 +1,10 @@ +import { PipeTransform, Pipe } from '@angular/core'; + +@Pipe({ + name: 'customPipe', +}) +export class CustomPipePipe implements PipeTransform { + transform(value: any, args?: any): any { + return `CustomPipe: ${value}`; + } +} diff --git a/examples/angular-cli/src/stories/basics/component-with-pipe/with-pipe.component.ts b/code/frameworks/angular/template/stories/basics/component-with-pipe/with-pipe.component.ts similarity index 93% rename from examples/angular-cli/src/stories/basics/component-with-pipe/with-pipe.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-pipe/with-pipe.component.ts index 0ea676d121d6..4582170ecf73 100644 --- a/examples/angular-cli/src/stories/basics/component-with-pipe/with-pipe.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-pipe/with-pipe.component.ts @@ -6,5 +6,5 @@ import { Component, Input } from '@angular/core'; }) export class WithPipeComponent { @Input() - field; + field: any; } diff --git a/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.html b/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.html new file mode 100644 index 000000000000..8315d5b0ed66 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.html @@ -0,0 +1,7 @@ +
    +
    All dependencies are defined: {{ isAllDeps() }}
    +
    Title: {{ title }}
    +
    Injector: {{ injector.constructor.toString() }}
    +
    ElementRef: {{ elRefStr() }}
    +
    TestToken: {{ testToken }}
    +
    diff --git a/examples/angular-cli/src/stories/basics/component-with-provider/di.component.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.stories.ts similarity index 77% rename from examples/angular-cli/src/stories/basics/component-with-provider/di.component.stories.ts rename to code/frameworks/angular/template/stories/basics/component-with-provider/di.component.stories.ts index e0ae1cfb912e..fea1bc95c15f 100644 --- a/examples/angular-cli/src/stories/basics/component-with-provider/di.component.stories.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.stories.ts @@ -1,7 +1,8 @@ +import { Args } from '@storybook/angular'; import { DiComponent } from './di.component'; export default { - title: 'Basics / Component / With Provider', + // title: 'Basics / Component / With Provider', component: DiComponent, }; @@ -13,7 +14,7 @@ export const InputsAndInjectDependencies = () => ({ InputsAndInjectDependencies.storyName = 'inputs and inject dependencies'; -export const InputsAndInjectDependenciesWithArgs = (args) => ({ +export const InputsAndInjectDependenciesWithArgs = (args: Args) => ({ props: args, }); InputsAndInjectDependenciesWithArgs.storyName = 'inputs and inject dependencies with args'; diff --git a/examples/angular-cli/src/stories/basics/component-with-provider/di.component.ts b/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.ts similarity index 83% rename from examples/angular-cli/src/stories/basics/component-with-provider/di.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-provider/di.component.ts index fbca49cbc42a..11335b4131c8 100644 --- a/examples/angular-cli/src/stories/basics/component-with-provider/di.component.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-provider/di.component.ts @@ -1,5 +1,4 @@ -/* eslint-disable no-useless-constructor */ -import { Component, Input, InjectionToken, Injector, ElementRef, Inject } from '@angular/core'; +import { Injector, ElementRef, Component, Input, InjectionToken, Inject } from '@angular/core'; import { stringify } from 'telejson'; export const TEST_TOKEN = new InjectionToken('test'); @@ -11,7 +10,7 @@ export const TEST_TOKEN = new InjectionToken('test'); }) export class DiComponent { @Input() - title: string; + title?: string; constructor( protected injector: Injector, diff --git a/examples/angular-cli/src/stories/basics/component-with-style/styled.component.css b/code/frameworks/angular/template/stories/basics/component-with-style/styled.component.css similarity index 100% rename from examples/angular-cli/src/stories/basics/component-with-style/styled.component.css rename to code/frameworks/angular/template/stories/basics/component-with-style/styled.component.css diff --git a/examples/angular-cli/src/stories/basics/component-with-style/styled.component.html b/code/frameworks/angular/template/stories/basics/component-with-style/styled.component.html similarity index 100% rename from examples/angular-cli/src/stories/basics/component-with-style/styled.component.html rename to code/frameworks/angular/template/stories/basics/component-with-style/styled.component.html diff --git a/examples/angular-cli/src/stories/basics/component-with-style/styled.component.scss b/code/frameworks/angular/template/stories/basics/component-with-style/styled.component.scss similarity index 100% rename from examples/angular-cli/src/stories/basics/component-with-style/styled.component.scss rename to code/frameworks/angular/template/stories/basics/component-with-style/styled.component.scss diff --git a/examples/angular-cli/src/stories/basics/component-with-style/styled.component.stories.ts b/code/frameworks/angular/template/stories/basics/component-with-style/styled.component.stories.ts similarity index 80% rename from examples/angular-cli/src/stories/basics/component-with-style/styled.component.stories.ts rename to code/frameworks/angular/template/stories/basics/component-with-style/styled.component.stories.ts index c986f00bec88..0818ff28cc6f 100644 --- a/examples/angular-cli/src/stories/basics/component-with-style/styled.component.stories.ts +++ b/code/frameworks/angular/template/stories/basics/component-with-style/styled.component.stories.ts @@ -1,7 +1,7 @@ import { StyledComponent } from './styled.component'; export default { - title: 'Basics / Component / With StyleUrls', + // title: 'Basics / Component / With StyleUrls', component: StyledComponent, }; diff --git a/examples/angular-cli/src/stories/basics/component-with-style/styled.component.ts b/code/frameworks/angular/template/stories/basics/component-with-style/styled.component.ts similarity index 100% rename from examples/angular-cli/src/stories/basics/component-with-style/styled.component.ts rename to code/frameworks/angular/template/stories/basics/component-with-style/styled.component.ts diff --git a/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector-ng-component-outlet.stories.ts b/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector-ng-component-outlet.stories.ts new file mode 100644 index 000000000000..beff6c157988 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector-ng-component-outlet.stories.ts @@ -0,0 +1,73 @@ +import { OnInit, Type, Component, Injector, Input } from '@angular/core'; +import { StoryFn, Meta, componentWrapperDecorator, moduleMetadata } from '@storybook/angular'; +import { WithoutSelectorComponent, WITHOUT_SELECTOR_DATA } from './without-selector.component'; + +export default { + // title: 'Basics / Component / without selector / Custom wrapper *NgComponentOutlet', + component: WithoutSelectorComponent, + decorators: [ + moduleMetadata({ + entryComponents: [WithoutSelectorComponent], + }), + ], +} as Meta; + +// Advanced example with custom *ngComponentOutlet + +@Component({ + selector: 'ng-component-outlet-wrapper', + template: ``, +}) +class NgComponentOutletWrapperComponent implements OnInit { + @Input() + componentOutlet?: Type; + + @Input() + name?: string; + + @Input() + color?: string; + + componentInjector?: Injector; + + componentContent = [ + [document.createTextNode('Ng-content : Inspired by ')], + [document.createTextNode('https://angular.io/api/common/NgComponentOutlet')], + ]; + + constructor(private readonly injector: Injector) {} + + ngOnInit(): void { + this.componentInjector = Injector.create({ + providers: [ + { provide: WITHOUT_SELECTOR_DATA, useValue: { color: this.color, name: this.name } }, + ], + parent: this.injector, + }); + } +} + +// Live changing of args by controls does not work at the moment. When changing args storybook does not fully +// reload and therefore does not take into account the change of provider. +export const WithCustomNgComponentOutletWrapper: StoryFn = (args) => ({ + props: args, +}); +WithCustomNgComponentOutletWrapper.storyName = 'Custom wrapper *NgComponentOutlet'; +WithCustomNgComponentOutletWrapper.argTypes = { + name: { control: 'text' }, + color: { control: 'color' }, +}; +WithCustomNgComponentOutletWrapper.args = { name: 'Color', color: 'green' }; +WithCustomNgComponentOutletWrapper.decorators = [ + moduleMetadata({ + declarations: [NgComponentOutletWrapperComponent], + }), + componentWrapperDecorator(NgComponentOutletWrapperComponent, (args) => ({ + name: args.name, + + color: args['color'], + componentOutlet: WithoutSelectorComponent, + })), +]; diff --git a/examples/angular-cli/src/stories/basics/component-without-selector/without-selector-ng-factory-resolver.stories.ts b/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector-ng-factory-resolver.stories.ts similarity index 77% rename from examples/angular-cli/src/stories/basics/component-without-selector/without-selector-ng-factory-resolver.stories.ts rename to code/frameworks/angular/template/stories/basics/component-without-selector/without-selector-ng-factory-resolver.stories.ts index e583d2735651..5256c9de2894 100644 --- a/examples/angular-cli/src/stories/basics/component-without-selector/without-selector-ng-factory-resolver.stories.ts +++ b/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector-ng-factory-resolver.stories.ts @@ -1,18 +1,18 @@ import { AfterViewInit, - Component, ComponentFactoryResolver, - Input, Type, + Component, + Input, ViewChild, ViewContainerRef, } from '@angular/core'; -import { componentWrapperDecorator, moduleMetadata, Story, Meta } from '@storybook/angular'; +import { StoryFn, Meta, componentWrapperDecorator, moduleMetadata } from '@storybook/angular'; import { WithoutSelectorComponent } from './without-selector.component'; export default { - title: 'Basics / Component / without selector / Custom wrapper ComponentFactoryResolver', + // title: 'Basics / Component / without selector / Custom wrapper ComponentFactoryResolver', component: WithoutSelectorComponent, decorators: [ moduleMetadata({ @@ -25,15 +25,14 @@ export default { @Component({ selector: 'component-factory-wrapper', template: '' }) class ComponentFactoryWrapperComponent implements AfterViewInit { - @ViewChild('dynamicInsert', { read: ViewContainerRef }) dynamicInsert; + @ViewChild('dynamicInsert', { read: ViewContainerRef }) dynamicInsert: any; @Input() - componentOutlet: Type; + componentOutlet?: Type; @Input() args: any; - // eslint-disable-next-line no-useless-constructor constructor( private viewContainerRef: ViewContainerRef, private componentFactoryResolver: ComponentFactoryResolver @@ -41,18 +40,18 @@ class ComponentFactoryWrapperComponent implements AfterViewInit { ngAfterViewInit() { const componentFactory = this.componentFactoryResolver.resolveComponentFactory( - this.componentOutlet + this.componentOutlet! ); const containerRef = this.viewContainerRef; containerRef.clear(); const dynamicComponent = containerRef.createComponent(componentFactory); - Object.assign(dynamicComponent.instance, this.args); + Object.assign(dynamicComponent.instance as any, this.args); } } // Live changing of args by controls does not work at the moment. When changing args storybook does not fully // reload and therefore does not take into account the change of provider. -export const WithComponentFactoryResolver: Story = (args) => ({ +export const WithComponentFactoryResolver: StoryFn = (args) => ({ props: args, }); WithComponentFactoryResolver.storyName = 'Custom wrapper ComponentFactoryResolver'; @@ -60,7 +59,7 @@ WithComponentFactoryResolver.argTypes = { name: { control: 'text' }, color: { control: 'color' }, }; -WithComponentFactoryResolver.args = { name: 'Dixie Normous', color: 'chartreuse' }; +WithComponentFactoryResolver.args = { name: 'Color', color: 'chartreuse' }; WithComponentFactoryResolver.decorators = [ moduleMetadata({ declarations: [ComponentFactoryWrapperComponent], diff --git a/examples/angular-cli/src/stories/basics/component-without-selector/without-selector.component.ts b/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.component.ts similarity index 100% rename from examples/angular-cli/src/stories/basics/component-without-selector/without-selector.component.ts rename to code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.component.ts diff --git a/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.stories.ts b/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.stories.ts new file mode 100644 index 000000000000..dec59310b0c3 --- /dev/null +++ b/code/frameworks/angular/template/stories/basics/component-without-selector/without-selector.stories.ts @@ -0,0 +1,30 @@ +import { StoryFn, Meta, moduleMetadata } from '@storybook/angular'; +import { WithoutSelectorComponent, WITHOUT_SELECTOR_DATA } from './without-selector.component'; + +export default { + // title: 'Basics / Component / without selector', + component: WithoutSelectorComponent, + decorators: [ + moduleMetadata({ + entryComponents: [WithoutSelectorComponent], + }), + ], +} as Meta; + +export const SimpleComponent: StoryFn = () => ({}); + +// Live changing of args by controls does not work for now. When changing args storybook does not fully +// reload and therefore does not take into account the change of provider. +export const WithInjectionTokenAndArgs: StoryFn = (args) => ({ + props: args, + moduleMetadata: { + providers: [ + { provide: WITHOUT_SELECTOR_DATA, useValue: { color: args['color'], name: args['name'] } }, + ], + }, +}); +WithInjectionTokenAndArgs.argTypes = { + name: { control: 'text' }, + color: { control: 'color' }, +}; +WithInjectionTokenAndArgs.args = { name: 'Color', color: 'red' }; diff --git a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chip-color.token.ts b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-color.token.ts similarity index 100% rename from examples/angular-cli/src/stories/basics/ng-module/angular-src/chip-color.token.ts rename to code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-color.token.ts diff --git a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chip-text.pipe.ts b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-text.pipe.ts similarity index 90% rename from examples/angular-cli/src/stories/basics/ng-module/angular-src/chip-text.pipe.ts rename to code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-text.pipe.ts index c57cf51f87de..0d628239d07b 100644 --- a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chip-text.pipe.ts +++ b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip-text.pipe.ts @@ -1,4 +1,4 @@ -import { Pipe, PipeTransform } from '@angular/core'; +import { PipeTransform, Pipe } from '@angular/core'; @Pipe({ name: 'chipText', diff --git a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chip.component.ts b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip.component.ts similarity index 97% rename from examples/angular-cli/src/stories/basics/ng-module/angular-src/chip.component.ts rename to code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip.component.ts index 18ae3440a582..249adb2598ed 100644 --- a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chip.component.ts +++ b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chip.component.ts @@ -48,7 +48,7 @@ import { CHIP_COLOR } from './chip-color.token'; ], }) export class ChipComponent { - @Input() displayText: string; + @Input() displayText?: string; @Output() removeClicked = new EventEmitter(); diff --git a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chips-group.component.ts b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips-group.component.ts similarity index 98% rename from examples/angular-cli/src/stories/basics/ng-module/angular-src/chips-group.component.ts rename to code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips-group.component.ts index 8969e188e90c..787596400fb9 100644 --- a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chips-group.component.ts +++ b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips-group.component.ts @@ -38,7 +38,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core'; ], }) export class ChipsGroupComponent { - @Input() chips: { + @Input() chips?: { id: number; text: string; }[]; diff --git a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chips.module.ts b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips.module.ts similarity index 92% rename from examples/angular-cli/src/stories/basics/ng-module/angular-src/chips.module.ts rename to code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips.module.ts index 9d1bc7ea9406..73ca7e1fd284 100644 --- a/examples/angular-cli/src/stories/basics/ng-module/angular-src/chips.module.ts +++ b/code/frameworks/angular/template/stories/basics/ng-module/angular-src/chips.module.ts @@ -1,4 +1,4 @@ -import { NgModule, ModuleWithProviders } from '@angular/core'; +import { ModuleWithProviders, NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ChipComponent } from './chip.component'; import { ChipsGroupComponent } from './chips-group.component'; diff --git a/examples/angular-cli/src/stories/basics/ng-module/import-module-for-root.stories.ts b/code/frameworks/angular/template/stories/basics/ng-module/import-module-for-root.stories.ts similarity index 85% rename from examples/angular-cli/src/stories/basics/ng-module/import-module-for-root.stories.ts rename to code/frameworks/angular/template/stories/basics/ng-module/import-module-for-root.stories.ts index de90f39bc485..4777d60ccb5b 100644 --- a/examples/angular-cli/src/stories/basics/ng-module/import-module-for-root.stories.ts +++ b/code/frameworks/angular/template/stories/basics/ng-module/import-module-for-root.stories.ts @@ -1,10 +1,10 @@ -import { moduleMetadata, Story, Meta } from '@storybook/angular'; +import { StoryFn, Meta, moduleMetadata } from '@storybook/angular'; import { ChipsModule } from './angular-src/chips.module'; import { ChipsGroupComponent } from './angular-src/chips-group.component'; import { CHIP_COLOR } from './angular-src/chip-color.token'; export default { - title: 'Basics / NgModule / forRoot() pattern', + // title: 'Basics / NgModule / forRoot() pattern', component: ChipsGroupComponent, decorators: [ moduleMetadata({ @@ -29,7 +29,7 @@ export default { }, } as Meta; -const Template = (): Story => (args) => ({ +const Template = (): StoryFn => (args) => ({ props: args, }); diff --git a/examples/angular-cli/src/stories/basics/ng-module/import-module.stories.ts b/code/frameworks/angular/template/stories/basics/ng-module/import-module.stories.ts similarity index 75% rename from examples/angular-cli/src/stories/basics/ng-module/import-module.stories.ts rename to code/frameworks/angular/template/stories/basics/ng-module/import-module.stories.ts index eaadf5c0499c..e962d1661df8 100644 --- a/examples/angular-cli/src/stories/basics/ng-module/import-module.stories.ts +++ b/code/frameworks/angular/template/stories/basics/ng-module/import-module.stories.ts @@ -1,10 +1,11 @@ -import { moduleMetadata, Story, Meta } from '@storybook/angular'; +import { StoryFn, Meta, moduleMetadata } from '@storybook/angular'; import { ChipsModule } from './angular-src/chips.module'; import { ChipsGroupComponent } from './angular-src/chips-group.component'; import { ChipComponent } from './angular-src/chip.component'; export default { - title: 'Basics / NgModule / Module with multiple component', + // title: 'Basics / NgModule / Module with multiple component', + component: ChipsGroupComponent, decorators: [ moduleMetadata({ imports: [ChipsModule], @@ -12,7 +13,7 @@ export default { ], } as Meta; -export const ChipsGroup: Story = (args) => ({ +export const ChipsGroup: StoryFn = (args) => ({ component: ChipsGroupComponent, props: args, }); @@ -33,7 +34,7 @@ ChipsGroup.argTypes = { removeAllChipsClick: { action: 'Remove all chips clicked' }, }; -export const Chip: Story = (args) => ({ +export const Chip: StoryFn = (args) => ({ component: ChipComponent, props: args, }); diff --git a/app/angular/src/demo/button.component.ts b/code/frameworks/angular/template/stories/button.component.ts similarity index 100% rename from app/angular/src/demo/button.component.ts rename to code/frameworks/angular/template/stories/button.component.ts diff --git a/code/frameworks/angular/template/stories/core/README.stories.mdx b/code/frameworks/angular/template/stories/core/README.stories.mdx new file mode 100644 index 000000000000..15dbdc282625 --- /dev/null +++ b/code/frameworks/angular/template/stories/core/README.stories.mdx @@ -0,0 +1,7 @@ +import { Meta } from '@storybook/addon-docs'; + + + +# Examples for Storybook native features + +These examples highlight Storybook's native functionality. It does not require any special addon diff --git a/examples/angular-cli/src/stories/core/decorators/componentWrapperDecorator/child.component.ts b/code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/child.component.ts similarity index 100% rename from examples/angular-cli/src/stories/core/decorators/componentWrapperDecorator/child.component.ts rename to code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/child.component.ts diff --git a/code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/decorators.stories.ts b/code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/decorators.stories.ts new file mode 100644 index 000000000000..0a23284e7930 --- /dev/null +++ b/code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/decorators.stories.ts @@ -0,0 +1,117 @@ +// your-component.stories.ts + +import { Args, Meta, Story, componentWrapperDecorator, moduleMetadata } from '@storybook/angular'; +import ChildComponent from './child.component'; +import ParentComponent from './parent.component'; + +export default { + // title: 'Core / Decorators / ComponentWrapperDecorator', + component: ChildComponent, + decorators: [ + componentWrapperDecorator( + (story) => `Grandparent
    ${story}
    ` + ), + ], + args: { childText: 'Child text', childPrivateText: 'Child private text' }, + argTypes: { onClickChild: { action: 'onClickChild' } }, +} as Meta; + +export const WithTemplate = (args: Args) => ({ + template: `Child Template`, + props: { + ...args, + }, +}); + +export const WithComponent = (args: Args) => ({ + props: { + ...args, + }, +}); + +export const WithLegacyComponent = (args: Args) => ({ + component: ChildComponent, + props: { + ...args, + }, +}); + +export const WithComponentWrapperDecorator = (args: Args) => ({ + component: ChildComponent, + props: { + ...args, + }, +}); +WithComponentWrapperDecorator.decorators = [ + moduleMetadata({ declarations: [ParentComponent] }), + componentWrapperDecorator(ParentComponent), +]; + +export const WithComponentWrapperDecoratorAndProps = (args: Args) => ({ + component: ChildComponent, + props: { + ...args, + }, +}); +WithComponentWrapperDecoratorAndProps.decorators = [ + moduleMetadata({ declarations: [ParentComponent] }), + componentWrapperDecorator(ParentComponent, { + parentText: 'Parent text', + onClickParent: () => { + console.log('onClickParent'); + }, + }), +]; + +export const WithComponentWrapperDecoratorAndArgs = (args: Args) => ({ + component: ChildComponent, + props: { + ...args, + }, +}); +WithComponentWrapperDecoratorAndArgs.argTypes = { + parentText: { control: { type: 'text' } }, + onClickParent: { action: 'onClickParent' }, +}; +WithComponentWrapperDecoratorAndArgs.decorators = [ + moduleMetadata({ declarations: [ParentComponent] }), + componentWrapperDecorator(ParentComponent, ({ args }) => ({ + parentText: args.parentText, + onClickParent: args.onClickParent, + })), +]; + +export const WithCustomDecorator = (args: Args) => ({ + template: `Child Template`, + props: { + ...args, + }, +}); +WithCustomDecorator.decorators = [ + (storyFunc) => { + const story = storyFunc(); + + return { + ...story, + template: `Custom Decorator
    ${story.template}
    `, + }; + }, +] as Story['decorators']; + +export const AngularLegacyRendering = (args: Args) => ({ + template: `Child Template`, + props: { + ...args, + }, +}); +AngularLegacyRendering.parameters = { angularLegacyRendering: true }; +AngularLegacyRendering.decorators = [ + (storyFunc) => { + const story = storyFunc(); + + return { + ...story, + template: `Custom Decorator
    ${story.template}
    `, + }; + }, +] as Story['decorators']; diff --git a/examples/angular-cli/src/stories/core/decorators/componentWrapperDecorator/parent.component.ts b/code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/parent.component.ts similarity index 100% rename from examples/angular-cli/src/stories/core/decorators/componentWrapperDecorator/parent.component.ts rename to code/frameworks/angular/template/stories/core/decorators/componentWrapperDecorator/parent.component.ts diff --git a/code/frameworks/angular/template/stories/core/decorators/theme-decorator/decorators.stories.ts b/code/frameworks/angular/template/stories/core/decorators/theme-decorator/decorators.stories.ts new file mode 100644 index 000000000000..11bba5843353 --- /dev/null +++ b/code/frameworks/angular/template/stories/core/decorators/theme-decorator/decorators.stories.ts @@ -0,0 +1,20 @@ +import { Args, Meta, componentWrapperDecorator } from '@storybook/angular'; + +export const Base = (args: Args) => ({ + template: 'Change theme with the brush in toolbar', + props: { + ...args, + }, +}); + +export default { + // title: 'Core / Decorators / Theme Decorators', + component: Base, + decorators: [ + componentWrapperDecorator( + (story) => `
    ${story}
    `, + + ({ globals }) => ({ myTheme: `${globals['theme']}-theme` }) + ), + ], +} as Meta; diff --git a/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/custom.pipe.ts b/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/custom.pipe.ts new file mode 100644 index 000000000000..0038bd609241 --- /dev/null +++ b/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/custom.pipe.ts @@ -0,0 +1,10 @@ +import { PipeTransform, Pipe } from '@angular/core'; + +@Pipe({ + name: 'customPipe', +}) +export class CustomPipePipe implements PipeTransform { + transform(value: any, args?: any): any { + return `CustomPipe: ${value}`; + } +} diff --git a/examples/angular-cli/src/stories/core/moduleMetadata/angular-src/dummy.service.ts b/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/dummy.service.ts similarity index 83% rename from examples/angular-cli/src/stories/core/moduleMetadata/angular-src/dummy.service.ts rename to code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/dummy.service.ts index fc3668478af3..f988d2d05778 100644 --- a/examples/angular-cli/src/stories/core/moduleMetadata/angular-src/dummy.service.ts +++ b/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/dummy.service.ts @@ -2,7 +2,6 @@ import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) export class DummyService { - // eslint-disable-next-line no-useless-constructor constructor() {} getItems() { diff --git a/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/service.component.ts b/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/service.component.ts new file mode 100644 index 000000000000..4aee42811321 --- /dev/null +++ b/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/service.component.ts @@ -0,0 +1,24 @@ +import { OnInit, Component, Input } from '@angular/core'; +import { DummyService } from './dummy.service'; + +@Component({ + selector: 'storybook-simple-service-component', + template: ` +

    {{ name }}:

    +
      +
    • {{ item }}
    • +
    + `, +}) +export class ServiceComponent implements OnInit { + items?: {}; + + @Input() + name?: any; + + constructor(private dummy: DummyService) {} + + async ngOnInit() { + this.items = (await this.dummy.getItems()) as any; + } +} diff --git a/examples/angular-cli/src/stories/core/moduleMetadata/angular-src/token.component.ts b/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/token.component.ts similarity index 100% rename from examples/angular-cli/src/stories/core/moduleMetadata/angular-src/token.component.ts rename to code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/token.component.ts diff --git a/code/frameworks/angular/template/stories/core/moduleMetadata/in-export-default.stories.ts b/code/frameworks/angular/template/stories/core/moduleMetadata/in-export-default.stories.ts new file mode 100644 index 000000000000..7b89b5b0a476 --- /dev/null +++ b/code/frameworks/angular/template/stories/core/moduleMetadata/in-export-default.stories.ts @@ -0,0 +1,38 @@ +import { StoryFn, Meta, moduleMetadata } from '@storybook/angular'; +import { TokenComponent, ITEMS, DEFAULT_NAME } from './angular-src/token.component'; + +export const Story1: StoryFn = () => ({ + template: ``, + props: { + name: 'Prop Name', + }, +}); + +Story1.storyName = 'Story 1'; + +export const Story2: StoryFn = () => ({ + template: ``, +}); + +Story2.storyName = 'Story 2'; + +export default { + // title: 'Core / ModuleMetadata / In export default with decorator', + component: Story1, + decorators: [ + moduleMetadata({ + imports: [], + declarations: [TokenComponent], + providers: [ + { + provide: ITEMS, + useValue: ['Joe', 'Jane'], + }, + { + provide: DEFAULT_NAME, + useValue: 'Provider Name', + }, + ], + }), + ], +} as Meta; diff --git a/examples/angular-cli/src/stories/core/moduleMetadata/in-stories.stories.ts b/code/frameworks/angular/template/stories/core/moduleMetadata/in-stories.stories.ts similarity index 79% rename from examples/angular-cli/src/stories/core/moduleMetadata/in-stories.stories.ts rename to code/frameworks/angular/template/stories/core/moduleMetadata/in-stories.stories.ts index bfd46f2bd9a9..ac0ec0beb66e 100644 --- a/examples/angular-cli/src/stories/core/moduleMetadata/in-stories.stories.ts +++ b/code/frameworks/angular/template/stories/core/moduleMetadata/in-stories.stories.ts @@ -1,11 +1,7 @@ -import { Meta, Story } from '@storybook/angular'; +import { Meta, StoryFn } from '@storybook/angular'; import { TokenComponent, ITEMS, DEFAULT_NAME } from './angular-src/token.component'; -export default { - title: 'Core / ModuleMetadata / In stories', -} as Meta; - -export const Individual1: Story = () => ({ +export const Individual1: StoryFn = () => ({ template: ``, props: { name: 'Prop Name', @@ -24,7 +20,7 @@ export const Individual1: Story = () => ({ Individual1.storyName = 'Individual 1'; -export const Individual2: Story = () => ({ +export const Individual2: StoryFn = () => ({ template: ``, moduleMetadata: { imports: [], @@ -43,3 +39,8 @@ export const Individual2: Story = () => ({ }); Individual2.storyName = 'Individual 2'; + +export default { + // title: 'Core / ModuleMetadata / In stories', + component: Individual1, +} as Meta; diff --git a/examples/angular-cli/src/stories/core/moduleMetadata/merge-default-and-story.stories.ts b/code/frameworks/angular/template/stories/core/moduleMetadata/merge-default-and-story.stories.ts similarity index 76% rename from examples/angular-cli/src/stories/core/moduleMetadata/merge-default-and-story.stories.ts rename to code/frameworks/angular/template/stories/core/moduleMetadata/merge-default-and-story.stories.ts index b14ca16572cc..cb6ff0d1fc4e 100644 --- a/examples/angular-cli/src/stories/core/moduleMetadata/merge-default-and-story.stories.ts +++ b/code/frameworks/angular/template/stories/core/moduleMetadata/merge-default-and-story.stories.ts @@ -1,9 +1,22 @@ -import { moduleMetadata, Meta, Story } from '@storybook/angular'; +import { Meta, StoryFn, moduleMetadata } from '@storybook/angular'; import { TokenComponent, ITEMS, DEFAULT_NAME } from './angular-src/token.component'; import { CustomPipePipe } from './angular-src/custom.pipe'; +export const MergeWithDefaultModuleMetadata: StoryFn = () => ({ + template: ``, + props: { + name: 'Prop Name', + }, + moduleMetadata: { + declarations: [CustomPipePipe], + providers: [], + }, +}); +MergeWithDefaultModuleMetadata.storyName = 'Merge with default ModuleMetadata'; + export default { - title: 'Core / ModuleMetadata / Merge default and story', + // title: 'Core / ModuleMetadata / Merge default and story', + component: MergeWithDefaultModuleMetadata, decorators: [ moduleMetadata({ declarations: [TokenComponent], @@ -20,15 +33,3 @@ export default { }), ], } as Meta; - -export const MergeWithDefaultModuleMetadata: Story = () => ({ - template: ``, - props: { - name: 'Prop Name', - }, - moduleMetadata: { - declarations: [CustomPipePipe], - providers: [], - }, -}); -MergeWithDefaultModuleMetadata.storyName = 'Merge with default ModuleMetadata'; diff --git a/code/frameworks/angular/template/stories/core/parameters/bootstrap-options.stories.ts b/code/frameworks/angular/template/stories/core/parameters/bootstrap-options.stories.ts new file mode 100644 index 000000000000..5f7a96ef1097 --- /dev/null +++ b/code/frameworks/angular/template/stories/core/parameters/bootstrap-options.stories.ts @@ -0,0 +1,22 @@ +import { Meta, StoryFn } from '@storybook/angular'; +import { Component } from '@angular/core'; + +@Component({ + selector: 'component-with-whitespace', + template: `
    +

    Some content

    +
    `, +}) +class ComponentWithWhitespace {} + +export default { + // title: 'Core / Parameters / With Bootstrap Options', + component: ComponentWithWhitespace, + parameters: { + bootstrapOptions: { + preserveWhitespaces: true, + }, + }, +} as Meta; + +export const WithPreserveWhitespaces: StoryFn = (_args) => ({}); diff --git a/code/frameworks/angular/template/stories/core/styles/story-styles.stories.ts b/code/frameworks/angular/template/stories/core/styles/story-styles.stories.ts new file mode 100644 index 000000000000..b1adedc561ea --- /dev/null +++ b/code/frameworks/angular/template/stories/core/styles/story-styles.stories.ts @@ -0,0 +1,50 @@ +import { Meta, StoryFn, moduleMetadata } from '@storybook/angular'; +import Button from '../../button.component'; + +export const TemplateStory: StoryFn = () => ({ + template: ``, + props: { + text: 'Button with custom styles', + onClick: () => {}, + }, + styles: [ + ` + storybook-button-component { + background-color: yellow; + padding: 25px; + } + `, + ], +}); +TemplateStory.storyName = 'With story template'; + +export const WithArgsStory: StoryFn = (args) => ({ + template: ``, + props: args, + styles: [ + ` + storybook-button-component { + background-color: red; + padding: 25px; + } +`, + ], +}); +WithArgsStory.storyName = 'With Args'; +WithArgsStory.argTypes = { + text: { control: 'text' }, + onClick: { action: 'On click' }, +}; +WithArgsStory.args = { + text: 'Button with custom styles', +}; + +export default { + // title: 'Core / Story host styles', + component: TemplateStory, + decorators: [ + moduleMetadata({ + declarations: [Button], + }), + ], +} as Meta; diff --git a/code/frameworks/angular/template/stories/others/issues/12009-unknown-component.stories.ts b/code/frameworks/angular/template/stories/others/issues/12009-unknown-component.stories.ts new file mode 100644 index 000000000000..24948e1af79d --- /dev/null +++ b/code/frameworks/angular/template/stories/others/issues/12009-unknown-component.stories.ts @@ -0,0 +1,14 @@ +import { Meta, StoryFn } from '@storybook/angular'; +import Button from '../../button.component'; + +export default { + // title: 'Others / Issues / 12009 unknown component', + component: Button, +} as Meta; + +const Template: StoryFn = (args) => ({ + props: args, +}); + +export const Basic = Template.bind({}); +Basic.args = { text: 'Unknown component' }; diff --git a/code/frameworks/angular/template/stories/others/ngx-translate/README.stories.mdx b/code/frameworks/angular/template/stories/others/ngx-translate/README.stories.mdx new file mode 100644 index 000000000000..32d1cfcd3b7b --- /dev/null +++ b/code/frameworks/angular/template/stories/others/ngx-translate/README.stories.mdx @@ -0,0 +1,58 @@ +import { Meta } from '@storybook/addon-docs'; + + + +# [ngx-translate](https://github.com/ngx-translate/core) + +> No real example here to avoid adding more dependency to storybook mono repository + +There are several ways to configure ngx-translate in storybook which will depend on your context. + +Here is a simple example with a storybook decorator that you can place in the `preview.ts` or locally on the stories. +[See the doc on decorators](https://storybook.js.org/docs/angular/writing-stories/decorators) + +```ts +import { HttpClient, HttpClientModule } from '@angular/common/http'; +import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; +import { TranslateHttpLoader } from '@ngx-translate/http-loader'; +import { moduleMetadata } from '@storybook/angular'; + +function createTranslateLoader(http: HttpClient) { + return new TranslateHttpLoader(http, '/assets/i18n/', '.json'); +} + +const TranslateModuleDecorator = (storyFunc, context) => { + const { locale } = context.globals; + + return moduleMetadata({ + imports: [ + HttpClientModule, + TranslateModule.forRoot({ + defaultLanguage: locale, + loader: { + provide: TranslateLoader, + useFactory: createTranslateLoader, + deps: [HttpClient], + }, + }), + ], + })(storyFunc, context); +}; + +// for `preview.ts` +export const decorators = [TranslateModuleDecorator]; +``` + +If the `TranslateModule.forRoot` is made by another module you can try to set this provider `DEFAULT_LANGUAGE` + +```ts +import { DEFAULT_LANGUAGE } from '@ngx-translate/core'; + +const TranslateModuleDecorator = (storyFunc, context) => { + const { locale } = context.globals; + + return moduleMetadata({ + providers: [{ provide: DEFAULT_LANGUAGE, useValue: locale }], + })(storyFunc, context); +}; +``` diff --git a/code/frameworks/angular/tsconfig.build.json b/code/frameworks/angular/tsconfig.build.json new file mode 100644 index 000000000000..75efd9abab35 --- /dev/null +++ b/code/frameworks/angular/tsconfig.build.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfig.json", + "compileOnSave": false, + "compilerOptions": { + "target": "ES2020", + "module": "CommonJS", + "lib": ["es2020", "dom", "dom.iterable"], + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "declaration": true, + "outDir": "dist", + "types": ["node"], + "skipLibCheck": true, + "resolveJsonModule": true, + "allowJs": true, + "pretty": true, + "noErrorTruncation": true, + "listEmittedFiles": false, + "noUnusedLocals": false + }, + "include": ["src/**/*", "src/**/*.json"] +} diff --git a/code/frameworks/angular/tsconfig.json b/code/frameworks/angular/tsconfig.json new file mode 100644 index 000000000000..9779c817bf5a --- /dev/null +++ b/code/frameworks/angular/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.build.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["src/**/*", "src/**/*.json", "template/**/*"] +} diff --git a/app/angular/tsconfig.spec.json b/code/frameworks/angular/tsconfig.spec.json similarity index 100% rename from app/angular/tsconfig.spec.json rename to code/frameworks/angular/tsconfig.spec.json diff --git a/code/frameworks/ember/README.md b/code/frameworks/ember/README.md new file mode 100644 index 000000000000..f15503cd24ca --- /dev/null +++ b/code/frameworks/ember/README.md @@ -0,0 +1,50 @@ +# Storybook for Ember + +Storybook for Ember is a UI development environment for your Ember components. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-ember-app +npx storybook init +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/ember/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. + +## Docs + +- [Basics](https://storybook.js.org/docs/ember/get-started/introduction) +- [Configurations](https://storybook.js.org/docs/ember/configure/overview) +- [Addons](https://storybook.js.org/docs/ember/configure/storybook-addons) + +## Working with polyfills + +If you need to use a polyfill that is already in use in our Ember application, +you will need to add some options to have Storybook working with them. + +In this example we'll use the [named-block-polyfill](https://github.com/ember-polyfills/ember-named-blocks-polyfill). +This example also assume that you already have the package in your `package.json`. + +In your `.storybook/main.js` you can add the following lines: + +```javascript +const namedBlockPolyfill = require('ember-named-blocks-polyfill/lib/named-blocks-polyfill-plugin'); + +module.exports = { + emberOptions: { + polyfills: [namedBlockPolyfill], + }, + [...] +}; +``` diff --git a/code/frameworks/ember/jest.config.js b/code/frameworks/ember/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/ember/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/ember/package.json b/code/frameworks/ember/package.json new file mode 100644 index 000000000000..8acef2556c0d --- /dev/null +++ b/code/frameworks/ember/package.json @@ -0,0 +1,63 @@ +{ + "name": "@storybook/ember", + "version": "7.0.0-beta.25", + "description": "Storybook for Ember: Develop Ember Component in isolation with Hot Reloading.", + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/ember", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/ember" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/tsc.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/docs-tools": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "ts-dedent": "^2.0.0" + }, + "devDependencies": { + "ember-source": "~3.28.1", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "@babel/core": "*", + "@types/ember__component": "4.0.8", + "babel-plugin-ember-modules-api-polyfill": "^2.12.0", + "babel-plugin-htmlbars-inline-precompile": "2 || 3", + "ember-source": "~3.28.1", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": {}, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/addons/docs/preset.js b/code/frameworks/ember/preset.js similarity index 100% rename from addons/docs/preset.js rename to code/frameworks/ember/preset.js diff --git a/app/ember/src/client/docs/config.js b/code/frameworks/ember/src/client/docs/config.js similarity index 100% rename from app/ember/src/client/docs/config.js rename to code/frameworks/ember/src/client/docs/config.js diff --git a/app/ember/src/client/docs/index.js b/code/frameworks/ember/src/client/docs/index.js similarity index 100% rename from app/ember/src/client/docs/index.js rename to code/frameworks/ember/src/client/docs/index.js diff --git a/code/frameworks/ember/src/client/docs/jsondoc.js b/code/frameworks/ember/src/client/docs/jsondoc.js new file mode 100644 index 000000000000..9e7269af8d45 --- /dev/null +++ b/code/frameworks/ember/src/client/docs/jsondoc.js @@ -0,0 +1,50 @@ +/* eslint-disable no-underscore-dangle */ +import { global } from '@storybook/global'; + +export const setJSONDoc = (jsondoc) => { + global.__EMBER_GENERATED_DOC_JSON__ = jsondoc; +}; +export const getJSONDoc = () => { + return global.__EMBER_GENERATED_DOC_JSON__; +}; + +export const extractArgTypes = (componentName) => { + const json = getJSONDoc(); + if (!(json && json.included)) { + return null; + } + const componentDoc = json.included.find((doc) => doc.attributes.name === componentName); + + if (!componentDoc) { + return null; + } + return componentDoc.attributes.arguments.reduce((acc, prop) => { + acc[prop.name] = { + name: prop.name, + defaultValue: prop.defaultValue, + description: prop.description, + table: { + defaultValue: { summary: prop.defaultValue }, + type: { + summary: prop.type, + required: prop.tags.length ? prop.tags.some((tag) => tag.name === 'required') : false, + }, + }, + }; + return acc; + }, {}); +}; + +export const extractComponentDescription = (componentName) => { + const json = getJSONDoc(); + if (!(json && json.included)) { + return null; + } + const componentDoc = json.included.find((doc) => doc.attributes.name === componentName); + + if (!componentDoc) { + return null; + } + + return componentDoc.attributes.description; +}; diff --git a/code/frameworks/ember/src/client/preview/config.ts b/code/frameworks/ember/src/client/preview/config.ts new file mode 100644 index 000000000000..0d4f9f3c0a01 --- /dev/null +++ b/code/frameworks/ember/src/client/preview/config.ts @@ -0,0 +1,3 @@ +export { renderToCanvas } from './render'; + +export const parameters = { framework: 'ember' as const }; diff --git a/app/ember/src/client/preview/docs/config.js b/code/frameworks/ember/src/client/preview/docs/config.js similarity index 100% rename from app/ember/src/client/preview/docs/config.js rename to code/frameworks/ember/src/client/preview/docs/config.js diff --git a/app/ember/src/client/preview/docs/index.js b/code/frameworks/ember/src/client/preview/docs/index.js similarity index 100% rename from app/ember/src/client/preview/docs/index.js rename to code/frameworks/ember/src/client/preview/docs/index.js diff --git a/code/frameworks/ember/src/client/preview/docs/jsondoc.js b/code/frameworks/ember/src/client/preview/docs/jsondoc.js new file mode 100644 index 000000000000..9e7269af8d45 --- /dev/null +++ b/code/frameworks/ember/src/client/preview/docs/jsondoc.js @@ -0,0 +1,50 @@ +/* eslint-disable no-underscore-dangle */ +import { global } from '@storybook/global'; + +export const setJSONDoc = (jsondoc) => { + global.__EMBER_GENERATED_DOC_JSON__ = jsondoc; +}; +export const getJSONDoc = () => { + return global.__EMBER_GENERATED_DOC_JSON__; +}; + +export const extractArgTypes = (componentName) => { + const json = getJSONDoc(); + if (!(json && json.included)) { + return null; + } + const componentDoc = json.included.find((doc) => doc.attributes.name === componentName); + + if (!componentDoc) { + return null; + } + return componentDoc.attributes.arguments.reduce((acc, prop) => { + acc[prop.name] = { + name: prop.name, + defaultValue: prop.defaultValue, + description: prop.description, + table: { + defaultValue: { summary: prop.defaultValue }, + type: { + summary: prop.type, + required: prop.tags.length ? prop.tags.some((tag) => tag.name === 'required') : false, + }, + }, + }; + return acc; + }, {}); +}; + +export const extractComponentDescription = (componentName) => { + const json = getJSONDoc(); + if (!(json && json.included)) { + return null; + } + const componentDoc = json.included.find((doc) => doc.attributes.name === componentName); + + if (!componentDoc) { + return null; + } + + return componentDoc.attributes.description; +}; diff --git a/code/frameworks/ember/src/client/preview/globals.ts b/code/frameworks/ember/src/client/preview/globals.ts new file mode 100644 index 000000000000..7291f2881442 --- /dev/null +++ b/code/frameworks/ember/src/client/preview/globals.ts @@ -0,0 +1,4 @@ +import { global } from '@storybook/global'; + +global.STORYBOOK_NAME = process.env.STORYBOOK_NAME; +global.STORYBOOK_ENV = 'ember'; diff --git a/code/frameworks/ember/src/client/preview/index.ts b/code/frameworks/ember/src/client/preview/index.ts new file mode 100644 index 000000000000..091e84e7c3f4 --- /dev/null +++ b/code/frameworks/ember/src/client/preview/index.ts @@ -0,0 +1,16 @@ +import { start } from '@storybook/preview-api'; + +import './globals'; +import type { EmberRenderer } from './types'; +import { renderToCanvas } from './render'; + +const { configure: coreConfigure, clientApi, forceReRender } = start(renderToCanvas); + +export const { raw } = clientApi; + +const FRAMEWORK = 'ember'; +export const storiesOf = (kind: string, m: any) => + clientApi.storiesOf(kind, m).addParameters({ framework: FRAMEWORK }); +export const configure = (loadable: any, m: any) => coreConfigure(FRAMEWORK, loadable, m); + +export { forceReRender }; diff --git a/code/frameworks/ember/src/client/preview/render.ts b/code/frameworks/ember/src/client/preview/render.ts new file mode 100644 index 000000000000..84121a6cd7bf --- /dev/null +++ b/code/frameworks/ember/src/client/preview/render.ts @@ -0,0 +1,84 @@ +import { global } from '@storybook/global'; +import { dedent } from 'ts-dedent'; +import type { RenderContext } from '@storybook/types'; +// @ts-expect-error (Converted from ts-ignore) +import Component from '@ember/component'; // eslint-disable-line import/no-unresolved +import type { OptionsArgs, EmberRenderer } from './types'; + +const { document } = global; + +const rootEl = document.getElementById('storybook-root'); + +const config = global.require(`${global.STORYBOOK_NAME}/config/environment`); +const app = global.require(`${global.STORYBOOK_NAME}/app`).default.create({ + autoboot: false, + rootElement: rootEl, + ...config.APP, +}); + +let lastPromise = app.boot(); +let hasRendered = false; +let isRendering = false; + +function render(options: OptionsArgs, el: EmberRenderer['canvasElement']) { + if (isRendering) return; + isRendering = true; + + const { template, context = {}, element } = options; + + if (hasRendered) { + lastPromise = lastPromise.then((instance: any) => instance.destroy()); + } + + lastPromise = lastPromise + .then(() => { + const appInstancePrivate = app.buildInstance(); + return appInstancePrivate.boot().then(() => appInstancePrivate); + }) + .then((instance: any) => { + instance.register( + 'component:story-mode', + Component.extend({ + layout: template || options, + ...context, + }) + ); + + const component = instance.lookup('component:story-mode'); + + if (element) { + component.appendTo(element); + + element.appendTo(el); + } else { + component.appendTo(el); + } + hasRendered = true; + isRendering = false; + + return instance; + }); +} + +export function renderToCanvas( + { storyFn, kind, name, showMain, showError }: RenderContext, + canvasElement: EmberRenderer['canvasElement'] +) { + const element = storyFn(); + + if (!element) { + showError({ + title: `Expecting a Ember element from the story: "${name}" of "${kind}".`, + description: dedent` + Did you forget to return the Ember element from the story? + Use "() => hbs('{{component}}')" or "() => { return { + template: hbs\`{{component}}\` + } }" when defining the story. + `, + }); + return; + } + + showMain(); + render(element, canvasElement); +} diff --git a/code/frameworks/ember/src/client/preview/types.ts b/code/frameworks/ember/src/client/preview/types.ts new file mode 100644 index 000000000000..5df0b2632aa5 --- /dev/null +++ b/code/frameworks/ember/src/client/preview/types.ts @@ -0,0 +1,23 @@ +import type { WebRenderer } from '@storybook/types'; + +export type { RenderContext } from '@storybook/types'; + +export interface ShowErrorArgs { + title: string; + description: string; +} + +export interface OptionsArgs { + template: any; + context: any; + element: any; +} + +/** + * @deprecated Use `EmberRenderer` instead. + */ +export type EmberFramework = EmberRenderer; +export interface EmberRenderer extends WebRenderer { + component: any; + storyResult: OptionsArgs; +} diff --git a/code/frameworks/ember/src/index.ts b/code/frameworks/ember/src/index.ts new file mode 100644 index 000000000000..db22918233c3 --- /dev/null +++ b/code/frameworks/ember/src/index.ts @@ -0,0 +1,6 @@ +/// + +export { storiesOf, configure, forceReRender, raw } from './client/preview'; + +// optimization: stop HMR propagation in webpack +module?.hot?.decline(); diff --git a/code/frameworks/ember/src/preset.ts b/code/frameworks/ember/src/preset.ts new file mode 100644 index 000000000000..770fd2e7ab83 --- /dev/null +++ b/code/frameworks/ember/src/preset.ts @@ -0,0 +1,22 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + require.resolve('./server/framework-preset-babel-ember'), + require.resolve('./server/framework-preset-ember-docs'), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + }; +}; diff --git a/app/ember/src/server/framework-preset-babel-ember.ts b/code/frameworks/ember/src/server/framework-preset-babel-ember.ts similarity index 83% rename from app/ember/src/server/framework-preset-babel-ember.ts rename to code/frameworks/ember/src/server/framework-preset-babel-ember.ts index da857b38fada..f85328fb84ee 100644 --- a/app/ember/src/server/framework-preset-babel-ember.ts +++ b/code/frameworks/ember/src/server/framework-preset-babel-ember.ts @@ -1,7 +1,7 @@ import type { TransformOptions } from '@babel/core'; import { precompile } from 'ember-source/dist/ember-template-compiler'; import { findDistEsm } from '@storybook/core-common'; -import type { StorybookConfig, Options } from '@storybook/core-common'; +import type { StorybookConfig, Options } from '@storybook/types'; let emberOptions: any; @@ -19,8 +19,10 @@ export function babel(config: TransformOptions, options: Options): TransformOpti options.presetsList.forEach((e: any, index: number) => { if (e.preset && e.preset.emberOptions) { emberOptions = e.preset.emberOptions; - // eslint-disable-next-line no-param-reassign - delete options.presetsList[index].preset.emberOptions; + if (options.presetsList) { + // eslint-disable-next-line no-param-reassign + delete options.presetsList[index].preset.emberOptions; + } } }); } @@ -44,7 +46,7 @@ export function babel(config: TransformOptions, options: Options): TransformOpti return { ...config, - plugins: [].concat(babelConfigPlugins, extraPlugins), + plugins: [...babelConfigPlugins, ...extraPlugins], }; } diff --git a/app/ember/src/server/framework-preset-ember-docs.ts b/code/frameworks/ember/src/server/framework-preset-ember-docs.ts similarity index 84% rename from app/ember/src/server/framework-preset-ember-docs.ts rename to code/frameworks/ember/src/server/framework-preset-ember-docs.ts index 2cdcc56e7cb8..f6dd860c2f9f 100644 --- a/app/ember/src/server/framework-preset-ember-docs.ts +++ b/code/frameworks/ember/src/server/framework-preset-ember-docs.ts @@ -1,4 +1,4 @@ -import type { StorybookConfig } from '@storybook/core-common'; +import type { StorybookConfig } from '@storybook/types'; import { findDistEsm } from '@storybook/core-common'; import { hasDocsOrControls } from '@storybook/docs-tools'; diff --git a/code/frameworks/ember/src/types.ts b/code/frameworks/ember/src/types.ts new file mode 100644 index 000000000000..e75995bf27a7 --- /dev/null +++ b/code/frameworks/ember/src/types.ts @@ -0,0 +1,45 @@ +import type { + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/core-webpack'; +import type { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/ember-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/ember/src/typings.d.ts b/code/frameworks/ember/src/typings.d.ts new file mode 100644 index 000000000000..06750cef4597 --- /dev/null +++ b/code/frameworks/ember/src/typings.d.ts @@ -0,0 +1,4 @@ +declare module 'ember-source/dist/ember-template-compiler'; + +declare var STORYBOOK_ENV: 'ember'; +declare var STORYBOOK_NAME: any; diff --git a/code/frameworks/ember/template/cli/Button.stories.js b/code/frameworks/ember/template/cli/Button.stories.js new file mode 100644 index 000000000000..00b73d23e627 --- /dev/null +++ b/code/frameworks/ember/template/cli/Button.stories.js @@ -0,0 +1,62 @@ +import { hbs } from 'ember-cli-htmlbars'; +import { action } from '@storybook/addon-actions'; +import { linkTo } from '@storybook/addon-links'; + +// More on how to set up stories at: https://storybook.js.org/docs/7.0/ember/writing-stories/introduction +export default { + title: 'Example/Button', + render: (args) => ({ + template: hbs``, + context: args, + }), + argTypes: { + label: { control: 'text' }, + }, + // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/react/writing-docs/docs-page + tags: ['autodocs'], +}; + +// More on writing stories with args: https://storybook.js.org/docs/7.0/ember/writing-stories/args +export const Text = { + args: { + label: 'Button', + onClick: action('onClick'), + }, +}; + +export const Emoji = { + args: { + label: '😀 😎 👍 💯', + }, +}; + +export const TextWithAction = { + render: () => ({ + template: hbs` + + `, + context: { + onClick: () => action('This was clicked')(), + }, + }), + name: 'With an action', + parameters: { + notes: 'My notes on a button with emojis', + }, +}; + +export const ButtonWithLinkToAnotherStory = { + render: () => ({ + template: hbs` + + `, + context: { + onClick: linkTo('example-introduction--page'), + }, + }), + name: 'button with link to another story', +}; diff --git a/code/frameworks/ember/tsconfig.json b/code/frameworks/ember/tsconfig.json new file mode 100644 index 000000000000..77832da6336d --- /dev/null +++ b/code/frameworks/ember/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/html-vite/README.md b/code/frameworks/html-vite/README.md new file mode 100644 index 000000000000..b1d04f7a5d67 --- /dev/null +++ b/code/frameworks/html-vite/README.md @@ -0,0 +1 @@ +# Storybook for HTML diff --git a/code/frameworks/html-vite/package.json b/code/frameworks/html-vite/package.json new file mode 100644 index 000000000000..11bd571b2a85 --- /dev/null +++ b/code/frameworks/html-vite/package.json @@ -0,0 +1,80 @@ +{ + "name": "@storybook/html-vite", + "version": "7.0.0-beta.25", + "description": "Storybook for HTML and Vite: Develop HTML in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/html-vite", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/html-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/addons": "7.0.0-beta.25", + "@storybook/builder-vite": "7.0.0-beta.25", + "@storybook/channel-postmessage": "7.0.0-beta.25", + "@storybook/channel-websocket": "7.0.0-beta.25", + "@storybook/client-api": "7.0.0-beta.25", + "@storybook/core-server": "7.0.0-beta.25", + "@storybook/html": "7.0.0-beta.25", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/preview-web": "7.0.0-beta.25", + "magic-string": "^0.26.1" + }, + "devDependencies": { + "@types/node": "^16.0.0", + "typescript": "~4.9.3" + }, + "engines": { + "node": "^14.18 || >=16" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/html-vite/preset.js b/code/frameworks/html-vite/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/html-vite/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/html-vite/src/index.ts b/code/frameworks/html-vite/src/index.ts new file mode 100644 index 000000000000..d3ded0cdbbb9 --- /dev/null +++ b/code/frameworks/html-vite/src/index.ts @@ -0,0 +1 @@ +export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/html-vite/src/preset.ts b/code/frameworks/html-vite/src/preset.ts new file mode 100644 index 000000000000..8e2f55a64687 --- /dev/null +++ b/code/frameworks/html-vite/src/preset.ts @@ -0,0 +1,6 @@ +import type { StorybookConfig } from '@storybook/builder-vite'; + +export const core: StorybookConfig['core'] = { + builder: '@storybook/builder-vite', + renderer: '@storybook/html', +}; diff --git a/code/frameworks/html-vite/tsconfig.json b/code/frameworks/html-vite/tsconfig.json new file mode 100644 index 000000000000..534e4ddd108a --- /dev/null +++ b/code/frameworks/html-vite/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["node"], + "resolveJsonModule": true + }, + "include": ["src/**/*"], + "exclude": ["src/**/*.test.*", "src/**/__testfixtures__/**"] +} diff --git a/code/frameworks/html-webpack5/README.md b/code/frameworks/html-webpack5/README.md new file mode 100644 index 000000000000..d18efbcb9829 --- /dev/null +++ b/code/frameworks/html-webpack5/README.md @@ -0,0 +1,30 @@ +# Storybook for HTML + +--- + +Storybook for HTML is a UI development environment for your plain HTML snippets. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-app +npx storybook init -t html +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +### Typescript + +`npx sb init` will select `.ts` starter stories if your `package.json` has typescript as a dependency. If starting a new project, +run `npm init` and `npm install typescript --save-dev` before initializing storybook to get the typescript starter stories. + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/html/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. diff --git a/code/frameworks/html-webpack5/jest.config.js b/code/frameworks/html-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/html-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/html-webpack5/package.json b/code/frameworks/html-webpack5/package.json new file mode 100644 index 000000000000..25b6ab7e578c --- /dev/null +++ b/code/frameworks/html-webpack5/package.json @@ -0,0 +1,80 @@ +{ + "name": "@storybook/html-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook for HTML: View HTML snippets in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/html-webpack5", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/html-webpack5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/html": "7.0.0-beta.25", + "@storybook/preset-html-webpack": "7.0.0-beta.25", + "@types/node": "^16.0.0" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "@babel/core": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/html-webpack5/preset.js b/code/frameworks/html-webpack5/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/html-webpack5/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/html-webpack5/src/index.ts b/code/frameworks/html-webpack5/src/index.ts new file mode 100644 index 000000000000..fcb073fefcd6 --- /dev/null +++ b/code/frameworks/html-webpack5/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/code/frameworks/html-webpack5/src/preset.ts b/code/frameworks/html-webpack5/src/preset.ts new file mode 100644 index 000000000000..85fac6740037 --- /dev/null +++ b/code/frameworks/html-webpack5/src/preset.ts @@ -0,0 +1,22 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + path.dirname(require.resolve(path.join('@storybook/preset-html-webpack', 'package.json'))), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + renderer: path.dirname(require.resolve(path.join('@storybook/html', 'package.json'))), + }; +}; diff --git a/code/frameworks/html-webpack5/src/types.ts b/code/frameworks/html-webpack5/src/types.ts new file mode 100644 index 000000000000..2360ef4ac9e6 --- /dev/null +++ b/code/frameworks/html-webpack5/src/types.ts @@ -0,0 +1,45 @@ +import type { + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/preset-html-webpack'; +import type { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/html-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/html-webpack5/src/typings.d.ts b/code/frameworks/html-webpack5/src/typings.d.ts new file mode 100644 index 000000000000..cbeccdbb15f7 --- /dev/null +++ b/code/frameworks/html-webpack5/src/typings.d.ts @@ -0,0 +1,2 @@ +// will be provided by the webpack define plugin +declare var NODE_ENV: string | undefined; diff --git a/code/frameworks/html-webpack5/tsconfig.json b/code/frameworks/html-webpack5/tsconfig.json new file mode 100644 index 000000000000..a4429176e35f --- /dev/null +++ b/code/frameworks/html-webpack5/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/nextjs/.eslintrc.json b/code/frameworks/nextjs/.eslintrc.json new file mode 100644 index 000000000000..7b43755b37ac --- /dev/null +++ b/code/frameworks/nextjs/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "rules": { + "global-require": "off", + "no-param-reassign": "off", + "import/no-dynamic-require": "off", + "import/no-unresolved": "off" + }, + "overrides": [ + { + "files": ["**/*.stories.@(jsx|tsx)"], + "rules": { + "react/no-unknown-property": "off", + "jsx-a11y/anchor-is-valid": "off" + } + } + ] +} diff --git a/code/frameworks/nextjs/README.md b/code/frameworks/nextjs/README.md new file mode 100644 index 000000000000..c31af8862c7e --- /dev/null +++ b/code/frameworks/nextjs/README.md @@ -0,0 +1,937 @@ +# Storybook for Next.js + +## Table of Contents + +- [Supported Features](#supported-features) +- [Requirements](#requirements) +- [Getting Started](#getting-started) + - [In a project without Storybook](#in-a-project-without-storybook) + - [In a project with Storybook](#in-a-project-with-storybook) + - [Automatic migration](#automatic-migration) + - [Manual migration](#manual-migration) +- [Documentation](#documentation) + - [Options](#options) + - [Next.js's Image Component](#nextjss-image-component) + - [Local Images](#local-images) + - [Remote Images](#remote-images) + - [AVIF](#avif) + - [Next.js Font Optimization](#nextjs-font-optimization) + - [@next/font/google](#nextfontgoogle) + - [@next/font/local](#nextfontlocal) + - [Not supported features of @next/font](#not-supported-features-of-nextfont) + - [Next.js Routing](#nextjs-routing) + - [Overriding defaults](#overriding-defaults) + - [Global Defaults](#global-defaults) + - [Default Router](#default-router) + - [Actions Integration Caveats](#actions-integration-caveats) + - [Next.js Navigation](#nextjs-navigation) + - [Set `nextjs.appDirectory` to `true`](#set-nextjsappdirectory-to-true) + - [Overriding defaults](#overriding-defaults-1) + - [Global Defaults](#global-defaults-1) + - [`useSelectedLayoutSegment` and `useSelectedLayoutSegments` hook](#useselectedlayoutsegment-and-useselectedlayoutsegments-hook) + - [Default Navigation Context](#default-navigation-context) + - [Actions Integration Caveats](#actions-integration-caveats-1) + - [Next.js Head](#nextjs-head) + - [Sass/Scss](#sassscss) + - [Css/Sass/Scss Modules](#csssassscss-modules) + - [Styled JSX](#styled-jsx) + - [Postcss](#postcss) + - [Absolute Imports](#absolute-imports) + - [Runtime Config](#runtime-config) + - [Custom Webpack Config](#custom-webpack-config) + - [Typescript](#typescript) + - [Notes for Yarn v2 and v3 users](#notes-for-yarn-v2-and-v3-users) + - [FAQ](#faq) + - [Stories for pages/components which fetch data](#stories-for-pagescomponents-which-fetch-data) + - [Statically imported images won't load](#statically-imported-images-wont-load) + - [Module not found: Error: Can't resolve \[package name\]](#module-not-found-error-cant-resolve-package-name) +- [Acknowledgements](#acknowledgements) + +## Supported Features + +👉 [Next.js's Image Component](#nextjss-image-component) + +👉 [Next.js Font Optimization](#nextjs-font-optimization) + +👉 [Next.js Routing (next/router)](#nextjs-routing) + +👉 [Next.js Head (next/head)](#nextjs-head) + +👉 [Next.js Navigation (next/navigation)](#nextjs-navigation) + +👉 [Sass/Scss](#sassscss) + +👉 [Css/Sass/Scss Modules](#csssassscss-modules) + +👉 [Styled JSX](#styled-jsx) + +👉 [Postcss](#postcss) + +👉 [Absolute Imports](#absolute-imports) + +👉 [Runtime Config](#runtime-config) + +👉 [Custom Webpack Config](#custom-webpack-config) + +👉 [Typescript](#typescript) (already supported out of the box by Storybook) + +## Requirements + +- [Next.js](https://nextjs.org/) >= 12.x +- [Storybook](https://storybook.js.org/) >= 7.x + +## Getting Started + +### In a project without Storybook + +Follow the prompts after running this command in your Next.js project's root directory: + +```bash +npx storybook@next init +``` + +[More on getting started with Storybook](https://storybook.js.org/docs/react/get-started/install) + +### In a project with Storybook + +This framework is designed to work with Storybook 7. If you’re not already using v7, upgrade with this command: + +```bash +npx storybook@next upgrade --prerelease +``` + +#### Automatic migration + +When running the `upgrade` command above, you should get a prompt asking you to migrate to `@storybook/nextjs`, which should handle everything for you. In case that auto-migration does not work for your project, refer to the manual migration below. + +#### Manual migration + +Install the framework: + +```bash +yarn add --dev @storybook/nextjs@next +``` + +Update your `main.js` to change the framework property: + +```js +// .storybook/main.js +module.exports = { + // ... + framework: { + // name: '@storybook/react-webpack5', // Remove this + name: '@storybook/nextjs', // Add this + options: {}, + }, +}; +``` + +If you were using Storybook plugins to integrate with Next.js, those are no longer necessary when using this framework and can be removed: + +```js +// .storybook/main.js +module.exports = { + // ... + addons: [ + // ... + // These can both be removed + // 'storybook-addon-next', + // 'storybook-addon-next-router', + ], +}; +``` + +## Documentation + +### Options + +You can be pass an options object for addional configuration if needed. + +For example: + +```js +// .storybook/main.js +const path = require('path'); + +module.exports = { + // ... + framework: { + name: '@storybook/nextjs', + options: { + nextConfigPath: path.resolve(__dirname, '../next.config.js'), + }, + }, +}; +``` + +- `nextConfigPath`: The absolute path to the `next.config.js` + +### Next.js's Image Component + +[next/image](https://nextjs.org/docs/api-reference/next/image) is [notoriously difficult](https://github.com/vercel/next.js/issues/18393) to get working with Storybook. This framework allows you to use Next.js's `Image` component with no configuration! + +#### Local Images + +[Local images](https://nextjs.org/docs/basic-features/image-optimization#local-images) work just fine! Keep in mind that this feature was [only added in Next.js v11](https://nextjs.org/blog/next-11#automatic-size-detection-local-images). + +```js +import Image from 'next/image'; +import profilePic from '../public/me.png'; + +function Home() { + return ( + <> +

    My Homepage

    + Picture of the author +

    Welcome to my homepage!

    + + ); +} +``` + +#### Remote Images + +[Remote images](https://nextjs.org/docs/basic-features/image-optimization#remote-images) also work just fine! + +```js +import Image from 'next/image'; + +export default function Home() { + return ( + <> +

    My Homepage

    + Picture of the author +

    Welcome to my homepage!

    + + ); +} +``` + +#### AVIF + +This format is not supported by this framework yet. Feel free to [open up an issue](https://github.com/storybookjs/storybook/issues) if this is something you want to see. + +### Next.js Font Optimization + +[@next/font](https://nextjs.org/docs/basic-features/font-optimization) is partially supported in Storybook. The packages `@next/font/google` and `@next/font/local` are supported. + +#### @next/font/google + +You don't have to do anything. `@next/font/google` is supported out of the box. + +#### @next/font/local + +For local fonts you have to define the [src](https://nextjs.org/docs/api-reference/next/font#src) property. +The path is relative to the directory where the font loader function is called. + +If the following component defines your localFont like this: + +```js +// src/components/MyComponent.js +import localFont from '@next/font/local'; + +const localRubikStorm = localFont({ src: './fonts/RubikStorm-Regular.ttf' }); +``` + +You have to tell Storybook where the `fonts` directory is located. The `from` value is relative to the `.storybook` directory. The `to` value is relative to the execution context of Storybook. Very likely it is the root of your project. + +```js +// .storybook/main.js +module.exports = { + ... + "staticDirs": [ + { + from: '../src/components/fonts', + to: 'src/components/fonts' + } + ], +} +``` + +#### Not supported features of @next/font + +The following features are not supported (yet). Support for these features might be planned for the future: + +- [Support font loaders configuration in next.config.js](https://nextjs.org/docs/basic-features/font-optimization#specifying-a-subset) +- [fallback](https://nextjs.org/docs/api-reference/next/font#fallback) option +- [adjustFontFallback](https://nextjs.org/docs/api-reference/next/font#adjustfontfallback) option +- [declarations](https://nextjs.org/docs/api-reference/next/font#declarations) option +- [preload](https://nextjs.org/docs/api-reference/next/font#preload) option gets ignored. Storybook handles Font loading its own way. +- [display](https://nextjs.org/docs/api-reference/next/font#display) option gets ignored. All fonts are loaded with display set to "block" to make Storybook load the font properly. + +### Next.js Routing + +[Next.js's router](https://nextjs.org/docs/routing/introduction) is automatically stubbed for you so that when the router is interacted with, all of its interactions are automatically logged to the Actions ctions panel if you have the [Storybook actions addon](https://storybook.js.org/docs/react/essentials/actions). + +> When using Next.js 13+, you should only use `next/router` in the `pages` directory. In the `app` directory, it is necessary to use `next/navigation`. + +#### Overriding defaults + +Per-story overrides can be done by adding a `nextjs.router` property onto the story [parameters](https://storybook.js.org/docs/react/writing-stories/parameters). The framework will shallowly merge whatever you put here into the router. + +```js +// SomeComponentThatUsesTheRouter.stories.js +import SomeComponentThatUsesTheRouter from './SomeComponentThatUsesTheRouter'; + +export default { + component: SomeComponentThatUsesTheRouter, +}; + +// If you have the actions addon, +// you can interact with the links and see the route change events there +export const Example = { + parameters: { + nextjs: { + router: { + path: '/profile/[id]', + asPath: '/profile/1', + query: { + id: '1', + }, + }, + }, + }, +}; +``` + +#### Global Defaults + +Global defaults can be set in [preview.js](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering) and will be shallowly merged with the default router. + +```js +// .storybook/preview.js + +export const parameters = { + nextjs: { + router: { + path: '/some-default-path', + asPath: '/some-default-path', + query: {}, + }, + }, +}; +``` + +#### Default Router + +The default values on the stubbed router are as follows (see [globals](https://storybook.js.org/docs/react/essentials/toolbars-and-globals#globals) for more details on how globals work) + +```ts +const defaultRouter = { + push(...args) { + action('nextRouter.push')(...args); + return Promise.resolve(true); + }, + replace(...args) { + action('nextRouter.replace')(...args); + return Promise.resolve(true); + }, + reload(...args) { + action('nextRouter.reload')(...args); + }, + back(...args) { + action('nextRouter.back')(...args); + }, + forward() { + action('nextRouter.forward')(); + }, + prefetch(...args) { + action('nextRouter.prefetch')(...args); + return Promise.resolve(); + }, + beforePopState(...args) { + action('nextRouter.beforePopState')(...args); + }, + events: { + on(...args) { + action('nextRouter.events.on')(...args); + }, + off(...args) { + action('nextRouter.events.off')(...args); + }, + emit(...args) { + action('nextRouter.events.emit')(...args); + }, + }, + // The locale should be configured [globally](https://storybook.js.org/docs/react/essentials/toolbars-and-globals#globals) + locale: globals?.locale, + asPath: '/', + basePath: '/', + isFallback: false, + isLocaleDomain: false, + isReady: true, + isPreview: false, + route: '/', + pathname: '/', + query: {}, +}; +``` + +#### Actions Integration Caveats + +If you override a function, you lose the automatic actions integration and have to build it out yourself. + +```js +// .storybook/preview.js + +export const parameters = { + nextjs: { + router: { + push() { + // The default implementation that logs the action into the Actions panel is lost + }, + }, + }, +}; +``` + +Doing this yourself looks something like this (make sure you install the `@storybook/addon-actions` package): + +```js +// .storybook/preview.js +import { action } from '@storybook/addon-actions'; + +export const parameters = { + nextjs: { + router: { + push(...args) { + // Custom logic can go here + // This logs to the Actions panel + action('nextRouter.push')(...args); + // Return whatever you want here + return Promise.resolve(true); + }, + }, + }, +}; +``` + +### Next.js Navigation + +> Please note that [next/navigation](https://beta.nextjs.org/docs/upgrade-guide#step-5-migrating-routing-hooks) can only be used in components/pages in the `app` directory of Next.js 13+. + +#### Set `nextjs.appDirectory` to `true` + +If your story imports components that use `next/navigation`, you need to set the parameter `nextjs.appDirectory` to `true` in your Story: + +```js +// SomeComponentThatUsesTheRouter.stories.js +import SomeComponentThatUsesTheNavigation from './SomeComponentThatUsesTheNavigation'; + +export default { + component: SomeComponentThatUsesTheNavigation, +}; + +export const Example = { + parameters: { + nextjs: { + appDirectory: true, + }, + }, +}, +``` + +If your Next.js project uses the `app` directory for every page (in other words, it does not have a `pages` directory), you can set the parameter `nextjs.appDirectory` to `true` in the [preview.js](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering) file to apply it to all stories. + +```js +// .storybook/preview.js + +export const parameters = { + nextjs: { + appDirectory: true, + }, +}; +``` + +The parameter `nextjs.appDirectory` defaults to `false` if not set. + +#### Overriding defaults + +Per-story overrides can be done by adding a `nextjs.navigation` property onto the story [parameters](https://storybook.js.org/docs/react/writing-stories/parameters). The framework will shallowly merge whatever you put here into the router. + +```js +// SomeComponentThatUsesTheNavigation.stories.js +import SomeComponentThatUsesTheNavigation from './SomeComponentThatUsesTheNavigation'; + +export default { + component: SomeComponentThatUsesTheNavigation, +}; + +// If you have the actions addon, +// you can interact with the links and see the route change events there +export const Example = { + parameters: { + nextjs: { + appDirectory: true, + navigation: { + pathname: '/profile', + query: { + user: '1', + }, + }, + }, + }, +}; +``` + +#### Global Defaults + +Global defaults can be set in [preview.js](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering) and will be shallowly merged with the default router. + +```js +// .storybook/preview.js + +export const parameters = { + nextjs: { + appDirectory: true, + navigation: { + pathname: '/some-default-path', + }, + }, +}; +``` + +#### `useSelectedLayoutSegment` and `useSelectedLayoutSegments` hook + +The `useSelectedLayoutSegment` and `useSelectedLayoutSegments` hooks are supported in Storybook. You have to set the `nextjs.navigation.segments` parameter to return the segments you want to use. + +```js +// SomeComponentThatUsesTheNavigation.stories.js +import SomeComponentThatUsesTheNavigation from './SomeComponentThatUsesTheNavigation'; + +export default { + component: SomeComponentThatUsesTheNavigation, + parameters: { + nextjs: { + appDirectory: true, + navigation: { + segments: ['dashboard', 'analytics'] + }, + }, + }, +}; + +export const Example = {}; + +// SomeComponentThatUsesTheNavigation.js +import { useSelectedLayoutSegment, useSelectedLayoutSegments } from 'next/navigation'; + +export default function SomeComponentThatUsesTheNavigation() { + const segment = useSelectedLayoutSegment(); // dashboard + const segments = useSelectedLayoutSegments(); // ["dashboard", "analytics"] + ... +} +``` + +The default value of `nextjs.navigation.segments` is `[]` if not set. + +#### Default Navigation Context + +The default values on the stubbed navigation context are as follows: + +```ts +const defaultNavigationContext = { + push(...args) { + action('nextNavigation.push')(...args); + }, + replace(...args) { + action('nextNavigation.replace')(...args); + }, + forward(...args) { + action('nextNavigation.forward')(...args); + }, + back(...args) { + action('nextNavigation.back')(...args); + }, + prefetch(...args) { + action('nextNavigation.prefetch')(...args); + }, + refresh: () => { + action('nextNavigation.refresh')(); + }, + pathname: '/', + query: {}, +}; +``` + +#### Actions Integration Caveats + +If you override a function, you lose the automatic action tab integration and have to build it out yourself. + +```js +// .storybook/preview.js + +export const parameters = { + nextjs: { + appDirectory: true, + navigation: { + push() { + // The default implementation that logs the action into the Actions panel is lost + }, + }, + }, +}; +``` + +Doing this yourself looks something like this (make sure you install the `@storybook/addon-actions` package): + +```js +// .storybook/preview.js +import { action } from '@storybook/addon-actions'; + +export const parameters = { + nextjs: { + appDirectory: true, + navigation: { + push(...args) { + // Custom logic can go here + // This logs to the Actions panel + action('nextNavigation.push')(...args); + // Return whatever you want here + return Promise.resolve(true); + }, + }, + }, +}; +``` + +### Next.js Head + +[next/head](https://nextjs.org/docs/api-reference/next/head) is supported out of the box. You can use it in your stories like you would in your Next.js application. Please keep in mind, that the Head children are placed into the head element of the iframe that Storybook uses to render your stories. + +### Sass/Scss + +[Global sass/scss stylesheets](https://nextjs.org/docs/basic-features/built-in-css-support#sass-support) are supported without any additional configuration as well. Just import them into [preview.js](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering) + +```js +import '../styles/globals.scss'; +``` + +This will automatically include any of your [custom sass configurations](https://nextjs.org/docs/basic-features/built-in-css-support#customizing-sass-options) in your `next.config.js` file. + +```js +// next.config.js +const path = require('path'); + +module.exports = { + // Any options here are included in Sass compilation for your stories + sassOptions: { + includePaths: [path.join(__dirname, 'styles')], + }, +}; +``` + +### Css/Sass/Scss Modules + +[css modules](https://nextjs.org/docs/basic-features/built-in-css-support#adding-component-level-css) work as expected. + +```js +// This import works just fine in Storybook now +import styles from './Button.module.css'; +// sass/scss is also supported +// import styles from './Button.module.scss' +// import styles from './Button.module.sass' + +export function Button() { + return ( + + ); +} +``` + +### Styled JSX + +The built in CSS-in-JS solution for Next.js is [styled-jsx](https://nextjs.org/docs/basic-features/built-in-css-support#css-in-js), and this framework supports that out of the box too, zero config. + +```js +// This works just fine in Storybook now +function HelloWorld() { + return ( +
    + Hello world +

    scoped!

    + + +
    + ); +} + +export default HelloWorld; +``` + +You can use your own babel config too. This is an example of how you can customize styled-jsx. + +```json +// .babelrc or whatever config file you use +{ + "presets": [ + [ + "next/babel", + { + "styled-jsx": { + "plugins": ["@styled-jsx/plugin-sass"] + } + } + ] + ] +} +``` + +### Postcss + +Next.js lets you [customize postcss config](https://nextjs.org/docs/advanced-features/customizing-postcss-config#default-behavior). Thus this framework will automatically handle your postcss config for you. + +This allows for cool things like zero config tailwindcss! (See [Next.js' example](https://github.com/vercel/next.js/tree/canary/examples/with-tailwindcss)) + +### Absolute Imports + +Goodbye `../`! Absolute imports from the root directory work just fine. + +```js +// All good! +import Button from 'components/button'; +// Also good! +import styles from 'styles/HomePage.module.css'; + +export default function HomePage() { + return ( + <> +

    Hello World

    + + ); +}; + +Button.propTypes = { + /** + * Is this the principal call to action on the page? + */ + primary: PropTypes.bool, + /** + * What background color to use + */ + backgroundColor: PropTypes.string, + /** + * How large should the button be? + */ + size: PropTypes.oneOf(['small', 'medium', 'large']), + /** + * Button contents + */ + label: PropTypes.string.isRequired, + /** + * Optional click handler + */ + onClick: PropTypes.func, +}; + +Button.defaultProps = { + backgroundColor: null, + primary: false, + size: 'medium', + onClick: undefined, +}; diff --git a/code/frameworks/nextjs/template/cli/js/Button.stories.js b/code/frameworks/nextjs/template/cli/js/Button.stories.js new file mode 100644 index 000000000000..116ce20366a9 --- /dev/null +++ b/code/frameworks/nextjs/template/cli/js/Button.stories.js @@ -0,0 +1,41 @@ +import { Button } from './Button'; + +// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction +export default { + title: 'Example/Button', + component: Button, + tags: ['autodocs'], + argTypes: { + backgroundColor: { + control: 'color', + }, + }, +}; + +// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args +export const Primary = { + args: { + primary: true, + label: 'Button', + }, +}; + +export const Secondary = { + args: { + label: 'Button', + }, +}; + +export const Large = { + args: { + size: 'large', + label: 'Button', + }, +}; + +export const Small = { + args: { + size: 'small', + label: 'Button', + }, +}; diff --git a/code/frameworks/nextjs/template/cli/js/Header.jsx b/code/frameworks/nextjs/template/cli/js/Header.jsx new file mode 100644 index 000000000000..3862422ed8ec --- /dev/null +++ b/code/frameworks/nextjs/template/cli/js/Header.jsx @@ -0,0 +1,59 @@ +import React from 'react'; +import PropTypes from 'prop-types'; + +import { Button } from './Button'; +import './header.css'; + +export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => ( +
    +
    +
    + + + + + + + +

    Acme

    +
    +
    + {user ? ( + <> + + Welcome, {user.name}! + +
    +
    +
    +); + +Header.propTypes = { + user: PropTypes.shape({ + name: PropTypes.string.isRequired, + }), + onLogin: PropTypes.func.isRequired, + onLogout: PropTypes.func.isRequired, + onCreateAccount: PropTypes.func.isRequired, +}; + +Header.defaultProps = { + user: null, +}; diff --git a/code/frameworks/nextjs/template/cli/js/Header.stories.js b/code/frameworks/nextjs/template/cli/js/Header.stories.js new file mode 100644 index 000000000000..d34acd2e7405 --- /dev/null +++ b/code/frameworks/nextjs/template/cli/js/Header.stories.js @@ -0,0 +1,23 @@ +import { Header } from './Header'; + +export default { + title: 'Example/Header', + component: Header, + // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/react/writing-docs/docs-page + tags: ['autodocs'], + parameters: { + // More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout + layout: 'fullscreen', + }, +}; +export const LoggedIn = { + args: { + user: { + name: 'Jane Doe', + }, + }, +}; + +export const LoggedOut = { + args: {}, +}; diff --git a/code/frameworks/nextjs/template/cli/js/Introduction.mdx b/code/frameworks/nextjs/template/cli/js/Introduction.mdx new file mode 100644 index 000000000000..a16b0e916604 --- /dev/null +++ b/code/frameworks/nextjs/template/cli/js/Introduction.mdx @@ -0,0 +1,228 @@ +import { Meta } from '@storybook/blocks'; +import Image from 'next/image'; + +import Code from './assets/code-brackets.svg'; +import Colors from './assets/colors.svg'; +import Comments from './assets/comments.svg'; +import Direction from './assets/direction.svg'; +import Flow from './assets/flow.svg'; +import Plugin from './assets/plugin.svg'; +import Repo from './assets/repo.svg'; +import StackAlt from './assets/stackalt.svg'; + + + + + +# Welcome to Storybook + +Storybook helps you build UI components in isolation from your app's business logic, data, and context. +That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA. + +Browse example stories now by navigating to them in the sidebar. +View their code in the `stories` directory to learn how they work. +We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages. + +
    Configure
    + + + +
    Learn
    + + + +
    + TipEdit the Markdown in stories/Introduction.stories.mdx +
    diff --git a/lib/cli/src/frameworks/react/js/Page.jsx b/code/frameworks/nextjs/template/cli/js/Page.jsx similarity index 100% rename from lib/cli/src/frameworks/react/js/Page.jsx rename to code/frameworks/nextjs/template/cli/js/Page.jsx diff --git a/code/frameworks/nextjs/template/cli/js/Page.stories.js b/code/frameworks/nextjs/template/cli/js/Page.stories.js new file mode 100644 index 000000000000..40b25af0a1e6 --- /dev/null +++ b/code/frameworks/nextjs/template/cli/js/Page.stories.js @@ -0,0 +1,24 @@ +import { within, userEvent } from '@storybook/testing-library'; +import { Page } from './Page'; + +export default { + title: 'Example/Page', + component: Page, + parameters: { + // More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout + layout: 'fullscreen', + }, +}; + +export const LoggedOut = {}; + +// More on interaction testing: https://storybook.js.org/docs/7.0/react/writing-tests/interaction-testing +export const LoggedIn = { + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + const loginButton = await canvas.getByRole('button', { + name: /Log in/i, + }); + await userEvent.click(loginButton); + }, +}; diff --git a/code/frameworks/nextjs/template/cli/ts-legacy/Button.stories.ts b/code/frameworks/nextjs/template/cli/ts-legacy/Button.stories.ts new file mode 100644 index 000000000000..382a9ae49a1f --- /dev/null +++ b/code/frameworks/nextjs/template/cli/ts-legacy/Button.stories.ts @@ -0,0 +1,46 @@ +import type { Meta, StoryObj } from '@storybook/react'; + +import { Button } from './Button'; + +// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction +const meta: Meta = { + title: 'Example/Button', + component: Button, + tags: ['autodocs'], + argTypes: { + backgroundColor: { + control: 'color', + }, + }, +}; + +export default meta; +type Story = StoryObj; + +// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args +export const Primary: Story = { + args: { + primary: true, + label: 'Button', + }, +}; + +export const Secondary: Story = { + args: { + label: 'Button', + }, +}; + +export const Large: Story = { + args: { + size: 'large', + label: 'Button', + }, +}; + +export const Small: Story = { + args: { + size: 'small', + label: 'Button', + }, +}; diff --git a/code/frameworks/nextjs/template/cli/ts-legacy/Button.tsx b/code/frameworks/nextjs/template/cli/ts-legacy/Button.tsx new file mode 100644 index 000000000000..e3cb2f231141 --- /dev/null +++ b/code/frameworks/nextjs/template/cli/ts-legacy/Button.tsx @@ -0,0 +1,52 @@ +import React from 'react'; +import './button.css'; + +interface ButtonProps { + /** + * Is this the principal call to action on the page? + */ + primary?: boolean; + /** + * What background color to use + */ + backgroundColor?: string; + /** + * How large should the button be? + */ + size?: 'small' | 'medium' | 'large'; + /** + * Button contents + */ + label: string; + /** + * Optional click handler + */ + onClick?: () => void; +} + +/** + * Primary UI component for user interaction + */ +export const Button = ({ + primary = false, + size = 'medium', + backgroundColor, + label, + ...props +}: ButtonProps) => { + const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; + return ( + + ); +}; diff --git a/code/frameworks/nextjs/template/cli/ts-legacy/Header.stories.ts b/code/frameworks/nextjs/template/cli/ts-legacy/Header.stories.ts new file mode 100644 index 000000000000..a31fea43f119 --- /dev/null +++ b/code/frameworks/nextjs/template/cli/ts-legacy/Header.stories.ts @@ -0,0 +1,26 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { Header } from './Header'; + +const meta: Meta = { + title: 'Example/Header', + component: Header, + // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/7.0/react/writing-docs/docs-page + tags: ['autodocs'], + parameters: { + // More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout + layout: 'fullscreen', + }, +}; + +export default meta; +type Story = StoryObj; + +export const LoggedIn: Story = { + args: { + user: { + name: 'Jane Doe', + }, + }, +}; + +export const LoggedOut: Story = {}; diff --git a/lib/cli/src/frameworks/react/ts/Header.tsx b/code/frameworks/nextjs/template/cli/ts-legacy/Header.tsx similarity index 100% rename from lib/cli/src/frameworks/react/ts/Header.tsx rename to code/frameworks/nextjs/template/cli/ts-legacy/Header.tsx diff --git a/code/frameworks/nextjs/template/cli/ts-legacy/Introduction.stories.mdx b/code/frameworks/nextjs/template/cli/ts-legacy/Introduction.stories.mdx new file mode 100644 index 000000000000..a16b0e916604 --- /dev/null +++ b/code/frameworks/nextjs/template/cli/ts-legacy/Introduction.stories.mdx @@ -0,0 +1,228 @@ +import { Meta } from '@storybook/blocks'; +import Image from 'next/image'; + +import Code from './assets/code-brackets.svg'; +import Colors from './assets/colors.svg'; +import Comments from './assets/comments.svg'; +import Direction from './assets/direction.svg'; +import Flow from './assets/flow.svg'; +import Plugin from './assets/plugin.svg'; +import Repo from './assets/repo.svg'; +import StackAlt from './assets/stackalt.svg'; + + + + + +# Welcome to Storybook + +Storybook helps you build UI components in isolation from your app's business logic, data, and context. +That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA. + +Browse example stories now by navigating to them in the sidebar. +View their code in the `stories` directory to learn how they work. +We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages. + +
    Configure
    + + + +
    Learn
    + + + +
    + TipEdit the Markdown in stories/Introduction.stories.mdx +
    diff --git a/code/frameworks/nextjs/template/cli/ts-legacy/Page.stories.ts b/code/frameworks/nextjs/template/cli/ts-legacy/Page.stories.ts new file mode 100644 index 000000000000..357a46f74d91 --- /dev/null +++ b/code/frameworks/nextjs/template/cli/ts-legacy/Page.stories.ts @@ -0,0 +1,29 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { within, userEvent } from '@storybook/testing-library'; + +import { Page } from './Page'; + +const meta: Meta = { + title: 'Example/Page', + component: Page, + parameters: { + // More on how to position stories at: https://storybook.js.org/docs/7.0/react/configure/story-layout + layout: 'fullscreen', + }, +}; + +export default meta; +type Story = StoryObj; + +export const LoggedOut: Story = {}; + +// More on interaction testing: https://storybook.js.org/docs/7.0/react/writing-tests/interaction-testing +export const LoggedIn: Story = { + play: async ({ canvasElement }) => { + const canvas = within(canvasElement); + const loginButton = await canvas.getByRole('button', { + name: /Log in/i, + }); + await userEvent.click(loginButton); + }, +}; diff --git a/lib/cli/src/frameworks/react/ts/Page.tsx b/code/frameworks/nextjs/template/cli/ts-legacy/Page.tsx similarity index 100% rename from lib/cli/src/frameworks/react/ts/Page.tsx rename to code/frameworks/nextjs/template/cli/ts-legacy/Page.tsx diff --git a/code/frameworks/nextjs/template/stories/DynamicImport.stories.jsx b/code/frameworks/nextjs/template/stories/DynamicImport.stories.jsx new file mode 100644 index 000000000000..3c177d670737 --- /dev/null +++ b/code/frameworks/nextjs/template/stories/DynamicImport.stories.jsx @@ -0,0 +1,20 @@ +import dynamic from 'next/dynamic'; +import React, { Suspense } from 'react'; + +const DynamicComponent = dynamic(() => import('./dynamic-component'), { + ssr: false, +}); + +function Component() { + return ( + + + + ); +} + +export default { + component: Component, +}; + +export const Default = {}; diff --git a/code/frameworks/nextjs/template/stories/Image.stories.jsx b/code/frameworks/nextjs/template/stories/Image.stories.jsx new file mode 100644 index 000000000000..c30778804dfe --- /dev/null +++ b/code/frameworks/nextjs/template/stories/Image.stories.jsx @@ -0,0 +1,50 @@ +import React from 'react'; +import Image from 'next/image'; + +import StackAlt from '../../assets/colors.svg'; + +export default { + component: Image, + args: { + src: StackAlt, + alt: 'Stack Alt', + }, +}; + +export const Default = {}; + +export const BlurredPlaceholder = { + args: { + placeholder: 'blur', + }, +}; + +export const BlurredAbsolutePlaceholder = { + args: { + src: 'https://storybook.js.org/images/placeholders/50x50.png', + width: 50, + height: 50, + blurDataURL: + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABP5JREFUWEeNlwtz2zgMhEGKsv/k9XFp82xe11763yOJVGcXC4m2czM3GYa0E2s/LACSTi+vv1czM/7CvPpqxY/ejPeS3khmFiPHOiVLHK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QKIzYF9HyB0XEZ1xJ4DzNoDOAfAslhDDTyjDfv8A2AcBeCiu/jBHQEgxnYW6Kp6BlCVAkQM8VnieF2Xyr0ivXy+XvsCzKOihwNHCCryw8HrQXVB8dgFeRfAVQiXjMbIIgXINQYB2H7Kf5wF/2Ar7h0AgKKGuAP4zOjhzlkLbpcRXKRZhNUjxG6HIQDOjN47gCn4+fWW3xVS9urPESEEwwHMo9IhAGxS2ISiA1iEnQOoA4hXRAwItp7WzL9Ow18ESJaw/ar4NgeOR49cAHCAnaH8swBhv+6CBGjeBSxEOUAI7HyKHkD4O9xKb3/feQouAI4uLBciHRRHmgbfA7h/xFc9AngNBADthvii1sMOiPwDAFeyt6s7FSFS4PmnA1v0vQvqDqQKAAPE/weAUuEgsj8c+H11Twdw/AKANXA82EDr5cJBEEzB3oI4Mb0AdR3nNw8vQnegWuvqAABwJFJEBwDgNdA7IOs3gL0LhuJdwBY8c4BfNnDdVgooHiOqn/b7JoSW/QODjTHXhU7hMQAAAABJRU5ErkJggg==', + placeholder: 'blur', + }, +}; + +export const FilledParent = { + args: { + fill: true, + }, + decorator: [ + (Story) =>
    {Story()}
    , + ], +}; + +export const Sized = { + args: { + fill: true, + sizes: '(max-width: 600px) 100vw, 600px', + decorator: [ + (Story) =>
    {Story()}
    , + ], + }, +}; diff --git a/code/frameworks/nextjs/template/stories/StyledJsx.stories.jsx b/code/frameworks/nextjs/template/stories/StyledJsx.stories.jsx new file mode 100644 index 000000000000..5a0c586e232c --- /dev/null +++ b/code/frameworks/nextjs/template/stories/StyledJsx.stories.jsx @@ -0,0 +1,20 @@ +import React from 'react'; + +const Component = () => ( +
    + +
    +

    This is styled using Styled JSX

    +
    +
    +); + +export default { + component: Component, +}; + +export const Default = {}; diff --git a/code/frameworks/nextjs/template/stories/dynamic-component.js b/code/frameworks/nextjs/template/stories/dynamic-component.js new file mode 100644 index 000000000000..4863633033f3 --- /dev/null +++ b/code/frameworks/nextjs/template/stories/dynamic-component.js @@ -0,0 +1,5 @@ +import React from 'react'; + +export default function DynamicComponent() { + return
    I am a dynamically loaded component
    ; +} diff --git a/code/frameworks/nextjs/template/stories_12-js/ImageFuture.stories.jsx b/code/frameworks/nextjs/template/stories_12-js/ImageFuture.stories.jsx new file mode 100644 index 000000000000..3c65960d585d --- /dev/null +++ b/code/frameworks/nextjs/template/stories_12-js/ImageFuture.stories.jsx @@ -0,0 +1,50 @@ +import React from 'react'; +import Image from 'next/future/image'; + +import StackAlt from '../../assets/colors.svg'; + +export default { + component: Image, + args: { + src: StackAlt, + alt: 'Stack Alt', + }, +}; + +export const Default = {}; + +export const BlurredPlaceholder = { + args: { + placeholder: 'blur', + }, +}; + +export const BlurredAbsolutePlaceholder = { + args: { + src: 'https://storybook.js.org/images/placeholders/50x50.png', + width: 50, + height: 50, + blurDataURL: + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAABP5JREFUWEeNlwtz2zgMhEGKsv/k9XFp82xe11763yOJVGcXC4m2czM3GYa0E2s/LACSTi+vv1czM/7CvPpqxY/ejPeS3khmFiPHOiVLHKaZi4ux4j18GpMlS6cALupEQBCKQM4BdnGzjIcJgs//QBxAPQAem55f3yL4PWJIdyCyhlMfPdYZot0cwj3Ayg/5JwHA13paen7pADphxr/n5VI8JQsHCCGQ3gVGLLsxQ3h/LYSn5383B05rwNOws3Z576LOTOduvwfrOd5FtVat4akx0uPTrw8BNuUz23vLsY7hmg7i4ipqM2saiAdruNuirh4ff0bNdb3Qy3vkvfAQwrkHoDxTTZtDCOKrC1bMEkdnsQh/PLyetOGHkXeRAgQAQ84efQcBdUhvFofoulpdm9WGGTA+AJEe7l+i37a2c371tCFKs5zzJjxQNBMi1im7OCudP2aNghJuzZaGdSMEZjpwf/t0UgNdg9DOyLGLnY0BUHlzwVtNDkgEQhBeKkb1tUDgQrq7frwAiIJi5BKAeIFgHk5mOpPzvgltOfcoK0Rrs7lWHwsgqtXarK3N0u23h5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vqAABwJFJEBwDgNdA7IOs3gL0LhuJdwBY8c4BfNnDdVgooHiOqn/b7JoSW/QODjTHXhU7hMQAAAABJRU5ErkJggg==', + placeholder: 'blur', + }, +}; + +export const FilledParent = { + args: { + fill: true, + }, + decorator: [ + (Story) =>
    {Story()}
    , + ], +}; + +export const Sized = { + args: { + fill: true, + sizes: '(max-width: 600px) 100vw, 600px', + decorator: [ + (Story) =>
    {Story()}
    , + ], + }, +}; diff --git a/code/frameworks/nextjs/template/stories_12-js/Link.stories.jsx b/code/frameworks/nextjs/template/stories_12-js/Link.stories.jsx new file mode 100644 index 000000000000..40631d5cf2f7 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_12-js/Link.stories.jsx @@ -0,0 +1,28 @@ +import React from 'react'; +import Link from 'next/link'; + +const Component = () => ( + +); + +export default { + component: Component, +}; + +export const Default = {}; diff --git a/code/frameworks/nextjs/template/stories_default-js/Font.jsx b/code/frameworks/nextjs/template/stories_default-js/Font.jsx new file mode 100644 index 000000000000..228c81efc03d --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/Font.jsx @@ -0,0 +1,64 @@ +/* eslint-disable react/prop-types */ +import { Rubik_Puddles } from '@next/font/google'; +import localFont from '@next/font/local'; + +import React from 'react'; + +const rubik = Rubik_Puddles({ + subsets: ['latin'], + variable: '--font-latin-rubik', + weight: '400', +}); + +export const localRubikStorm = localFont({ + src: '/fonts/RubikStorm-Regular.ttf', + variable: '--font-rubik-storm', +}); + +export default function Font({ variant }) { + switch (variant) { + case 'className': + return ( +
    +

    Google Rubik Puddles

    +

    Google Local Rubik Storm

    +
    + ); + case 'style': + return ( +
    +

    Google Rubik Puddles

    +

    Google Local Rubik Storm

    +
    + ); + case 'variable': + return ( +
    +
    +

    + Google Rubik Puddles +

    +
    +
    +

    + Google Local Rubik Storm +

    +
    +
    + ); + default: + return null; + } +} diff --git a/code/frameworks/nextjs/template/stories_default-js/Font.stories.jsx b/code/frameworks/nextjs/template/stories_default-js/Font.stories.jsx new file mode 100644 index 000000000000..b851661dd436 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/Font.stories.jsx @@ -0,0 +1,23 @@ +import Font from './Font'; + +export default { + component: Font, +}; + +export const WithClassName = { + args: { + variant: 'className', + }, +}; + +export const WithStyle = { + args: { + variant: 'style', + }, +}; + +export const WithVariable = { + args: { + variant: 'variable', + }, +}; diff --git a/code/frameworks/nextjs/template/stories_default-js/Head.stories.jsx b/code/frameworks/nextjs/template/stories_default-js/Head.stories.jsx new file mode 100644 index 000000000000..76c9d5983031 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/Head.stories.jsx @@ -0,0 +1,34 @@ +/* eslint-disable no-undef */ +import { expect } from '@storybook/jest'; +import Head from 'next/head'; +import React from 'react'; +import { within, userEvent, waitFor } from '@storybook/testing-library'; + +function Component() { + return ( +
    + + Next.js Head Title + + + + + +

    Hello world!

    +
    + ); +} + +export default { + component: Component, +}; + +export const Default = { + play: async ({ canvasElement }) => { + await waitFor(() => expect(document.title).toEqual('Next.js Head Title')); + await expect(document.querySelectorAll('meta[property="og:title"]')).toHaveLength(1); + await expect(document.querySelector('meta[property="og:title"]').content).toEqual( + 'My new title' + ); + }, +}; diff --git a/code/frameworks/nextjs/template/stories_default-js/ImageLegacy.stories.jsx b/code/frameworks/nextjs/template/stories_default-js/ImageLegacy.stories.jsx new file mode 100644 index 000000000000..772536a7a5f6 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/ImageLegacy.stories.jsx @@ -0,0 +1,31 @@ +import React from 'react'; +import Image from 'next/legacy/image'; + +import StackAlt from '../../assets/colors.svg'; + +export default { + component: Image, + args: { + src: StackAlt, + alt: 'Stack Alt', + }, +}; + +export const Default = {}; + +export const BlurredPlaceholder = { + args: { + placeholder: 'blur', + }, +}; + +export const BlurredAbsolutePlaceholder = { + args: { + src: 'https://storybook.js.org/images/placeholders/50x50.png', + width: 50, + height: 50, + blurDataURL: + 'data:image/png;base64,iVBORw0KGgoAAAANS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KcXcAojsEAJZZKXhgCoziGKxqWV8IMNp4kP2aC+oB0TMFvhGxDQHQfIPhDrilwKOm/YCZASAHfgBABQjr3f7CyAkA0cPB03AQULRhKd4xAIjzHymo2Gp7gN0FAMAVOoA2fPz03a9ssh/RM7Iz8QKIzYF9HyB0XEZ1xJ4DzNoDOAfAslhDDTyjDfv8A2AcBeCiu/jBHQEgxnYW6Kp6BlCVAkQM8VnieF2Xyr0ivXy+XvsCzKOihwNHCCryw8HrQXVB8dgFeRfAVQiXjMbIIgXINQYB2H7Kf5wF/2Ar7h0AgKKGuAP4zOjhzlkLbpcRXKRZhNUjxG6HIQDOjN47gCn4+fWW3xVS9urPESEEwwHMo9IhAGxS2ISiA1iEnQOoA4hXRAwItp7WzL9Ow18ESJaw/ar4NgeOR49cAHCAnaH8swBhv+6CBGjeBSxEOUAI7HyKHkD4O9xKb3/feQouAI4uLBciHRRHmgbfA7h/xFc9AngNBADthvii1sMOiPwDAFeyt6s7FSFS4PmnA1v0vQvqDqQKAAPE/weAUuEgsj8c+H11Twdw/AKANXA82EDr5cJBEEzB3oI4Mb0AdR3nNw8vQnegWuvqAABwJFJEBwDgNdA7IOs3gL0LhuJdwBY8c4BfNnDdVgooHiOqn/b7JoSW/QODjTHXhU7hMQAAAABJRU5ErkJggg==', + placeholder: 'blur', + }, +}; diff --git a/code/frameworks/nextjs/template/stories_default-js/Link.stories.jsx b/code/frameworks/nextjs/template/stories_default-js/Link.stories.jsx new file mode 100644 index 000000000000..f9fcb28b6253 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/Link.stories.jsx @@ -0,0 +1,82 @@ +/* eslint-disable react/prop-types */ +import React from 'react'; +import Link from 'next/link'; + +import style from './Link.stories.module.css'; + +// `onClick`, `href`, and `ref` need to be passed to the DOM element +// for proper handling +const MyButton = React.forwardRef(function Button({ onClick, href, children }, ref) { + return ( + + {children} + + ); +}); + +const Component = () => ( +
      +
    • + Normal Link +
    • +
    • + + With URL Object + +
    • +
    • + + Replace the URL instead of push + +
    • +
    • + + Legacy behavior + +
    • +
    • + + child is a functional component + +
    • +
    • + + Disables scrolling to the top + +
    • +
    • + + No Prefetching + +
    • +
    • + + With style + +
    • +
    • + + With className + +
    • +
    +); + +export default { + component: Component, +}; + +export const Default = {}; + +export const InAppDir = { + parameters: { + nextjs: { + appDirectory: true, + }, + }, +}; diff --git a/code/frameworks/nextjs/template/stories_default-js/Link.stories.module.css b/code/frameworks/nextjs/template/stories_default-js/Link.stories.module.css new file mode 100644 index 000000000000..9edb616226d0 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/Link.stories.module.css @@ -0,0 +1,3 @@ +.link { + color: green; +} diff --git a/code/frameworks/nextjs/template/stories_default-js/Navigation.stories.jsx b/code/frameworks/nextjs/template/stories_default-js/Navigation.stories.jsx new file mode 100644 index 000000000000..f43167da2c14 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/Navigation.stories.jsx @@ -0,0 +1,98 @@ +import { + useRouter, + usePathname, + useSearchParams, + useSelectedLayoutSegment, + useSelectedLayoutSegments, +} from 'next/navigation'; +import React from 'react'; + +function Component() { + const router = useRouter(); + const pathname = usePathname(); + const searchParams = useSearchParams(); + const segment = useSelectedLayoutSegment(); + const segments = useSelectedLayoutSegments(); + + const searchParamsList = Array.from(searchParams.entries()); + + const routerActions = [ + { + cb: () => router.back(), + name: 'Go back', + }, + { + cb: () => router.forward(), + name: 'Go forward', + }, + { + cb: () => router.prefetch('/prefetched-html'), + name: 'Prefetch', + }, + { + cb: () => router.push('/push-html', { forceOptimisticNavigation: true }), + name: 'Push HTML', + }, + { + cb: () => router.refresh(), + name: 'Refresh', + }, + { + cb: () => router.replace('/replaced-html', { forceOptimisticNavigation: true }), + name: 'Replace', + }, + ]; + + return ( +
    +
    pathname: {pathname}
    +
    segment: {segment}
    +
    segments: {segments.join(',')}
    +
    + searchparams:{' '} +
      + {searchParamsList.map(([key, value]) => ( +
    • + {key}: {value} +
    • + ))} +
    +
    + {routerActions.map(({ cb, name }) => ( +
    + +
    + ))} +
    + ); +} + +export default { + component: Component, + parameters: { + nextjs: { + appDirectory: true, + navigation: { + pathname: '/hello', + query: { + foo: 'bar', + }, + }, + }, + }, +}; + +export const Default = {}; + +export const WithSegmentDefined = { + parameters: { + nextjs: { + appDirectory: true, + navigation: { + segments: ['dashboard', 'settings'], + }, + }, + }, +}; diff --git a/code/frameworks/nextjs/template/stories_default-js/Router.stories.jsx b/code/frameworks/nextjs/template/stories_default-js/Router.stories.jsx new file mode 100644 index 000000000000..2ea7511a2f4e --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/Router.stories.jsx @@ -0,0 +1,69 @@ +import { useRouter } from 'next/router'; +import React from 'react'; + +function Component() { + const router = useRouter(); + const searchParams = router.query; + + const routerActions = [ + { + cb: () => router.back(), + name: 'Go back', + }, + { + cb: () => router.forward(), + name: 'Go forward', + }, + { + cb: () => router.prefetch('/prefetched-html'), + name: 'Prefetch', + }, + { + cb: () => router.push('/push-html', { forceOptimisticNavigation: true }), + name: 'Push HTML', + }, + { + cb: () => router.replace('/replaced-html', { forceOptimisticNavigation: true }), + name: 'Replace', + }, + ]; + + return ( +
    +
    pathname: {router.pathname}
    +
    + searchparams:{' '} +
      + {Object.entries(searchParams).map(([key, value]) => ( +
    • + {key}: {value} +
    • + ))} +
    +
    + {routerActions.map(({ cb, name }) => ( +
    + +
    + ))} +
    + ); +} + +export default { + component: Component, + parameters: { + nextjs: { + router: { + pathname: '/hello', + query: { + foo: 'bar', + }, + }, + }, + }, +}; + +export const Default = {}; diff --git a/code/frameworks/nextjs/template/stories_default-js/fonts/OFL.txt b/code/frameworks/nextjs/template/stories_default-js/fonts/OFL.txt new file mode 100644 index 000000000000..36d2f6f3febb --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-js/fonts/OFL.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Rubik Filtered Project Authors (https://https://github.com/NaN-xyz/Rubik-Filtered) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/code/frameworks/nextjs/template/stories_default-js/fonts/RubikStorm-Regular.ttf b/code/frameworks/nextjs/template/stories_default-js/fonts/RubikStorm-Regular.ttf new file mode 100644 index 000000000000..2304ee84a07b Binary files /dev/null and b/code/frameworks/nextjs/template/stories_default-js/fonts/RubikStorm-Regular.ttf differ diff --git a/code/frameworks/nextjs/template/stories_default-ts/Link.stories.module.css b/code/frameworks/nextjs/template/stories_default-ts/Link.stories.module.css new file mode 100644 index 000000000000..9edb616226d0 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-ts/Link.stories.module.css @@ -0,0 +1,3 @@ +.link { + color: green; +} diff --git a/code/frameworks/nextjs/template/stories_default-ts/Link.stories.tsx b/code/frameworks/nextjs/template/stories_default-ts/Link.stories.tsx new file mode 100644 index 000000000000..1bc99d187e3d --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-ts/Link.stories.tsx @@ -0,0 +1,85 @@ +import React from 'react'; +import Link from 'next/link'; +import type { Meta, StoryObj } from '@storybook/react'; + +import style from './Link.stories.module.css'; + +// `onClick`, `href`, and `ref` need to be passed to the DOM element +// for proper handling +const MyButton = React.forwardRef< + HTMLAnchorElement, + React.DetailedHTMLProps, HTMLAnchorElement> +>(function Button({ onClick, href, children }, ref) { + return ( + + {children} + + ); +}); + +const Component = () => ( +
      +
    • + Normal Link +
    • +
    • + + With URL Object + +
    • +
    • + + Replace the URL instead of push + +
    • +
    • + + Legacy behavior + +
    • +
    • + + child is a functional component + +
    • +
    • + + Disables scrolling to the top + +
    • +
    • + + No Prefetching + +
    • +
    • + + With style + +
    • +
    • + + With className + +
    • +
    +); + +export default { + component: Component, +} as Meta; + +export const Default: StoryObj = {}; + +export const InAppDir: StoryObj = { + parameters: { + nextjs: { + appDirectory: true, + }, + }, +}; diff --git a/code/frameworks/nextjs/template/stories_default-ts/Navigation.stories.tsx b/code/frameworks/nextjs/template/stories_default-ts/Navigation.stories.tsx new file mode 100644 index 000000000000..a4c2f2d27758 --- /dev/null +++ b/code/frameworks/nextjs/template/stories_default-ts/Navigation.stories.tsx @@ -0,0 +1,78 @@ +import { useRouter, usePathname, useSearchParams } from 'next/navigation'; +import React from 'react'; +import type { Meta, StoryObj } from '@storybook/react'; + +function Component() { + const router = useRouter(); + const pathname = usePathname(); + const searchParams = useSearchParams(); + + const searchParamsList = Array.from(searchParams.entries()); + + const routerActions = [ + { + cb: () => router.back(), + name: 'Go back', + }, + { + cb: () => router.forward(), + name: 'Go forward', + }, + { + cb: () => router.prefetch('/prefetched-html'), + name: 'Prefetch', + }, + { + cb: () => router.push('/push-html', { forceOptimisticNavigation: true }), + name: 'Push HTML', + }, + { + cb: () => router.refresh(), + name: 'Refresh', + }, + { + cb: () => router.replace('/replaced-html', { forceOptimisticNavigation: true }), + name: 'Replace', + }, + ]; + + return ( +
    +
    pathname: {pathname}
    +
    + searchparams:{' '} +
      + {searchParamsList.map(([key, value]) => ( +
    • + {key}: {value} +
    • + ))} +
    +
    + {routerActions.map(({ cb, name }) => ( +
    + +
    + ))} +
    + ); +} + +export default { + component: Component, + parameters: { + nextjs: { + appDirectory: true, + navigation: { + pathname: '/hello', + query: { + foo: 'bar', + }, + }, + }, + }, +} as Meta; + +export const Default: StoryObj = {}; diff --git a/code/frameworks/nextjs/tsconfig.json b/code/frameworks/nextjs/tsconfig.json new file mode 100644 index 000000000000..26be65113f88 --- /dev/null +++ b/code/frameworks/nextjs/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "resolveJsonModule": true, + "skipLibCheck": true + }, + "include": ["src/**/*", "template/**/*"] +} diff --git a/code/frameworks/preact-vite/README.md b/code/frameworks/preact-vite/README.md new file mode 100644 index 000000000000..4a38f4b8c447 --- /dev/null +++ b/code/frameworks/preact-vite/README.md @@ -0,0 +1,47 @@ +# Storybook for Preact + +## Requirements + +- [Preact](https://preactjs.com/) >= 10.x +- [Storybook](https://storybook.js.org/) >= 7.x + +## Getting Started + +### In a project without Storybook + +Follow the prompts after running this command in your Preact project's root directory: + +```bash +npx storybook@next init +``` + +[More on getting started with Storybook](https://storybook.js.org/docs/preact/get-started/install) + +### In a project with Storybook + +This framework is designed to work with Storybook 7. If you’re not already using v7, upgrade with this command: + +```bash +npx storybook@next upgrade --prerelease +``` + +#### Manual migration + +Install the framework: + +```bash +yarn add --dev @storybook/preact-vite@next +``` + +Update your `main.js` to change the framework property: + +```js +// .storybook/main.js +module.exports = { + // ... + framework: { + name: '@storybook/preact-vite', // <- Change this + options: {}, + }, +}; +``` diff --git a/code/frameworks/preact-vite/jest.config.js b/code/frameworks/preact-vite/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/preact-vite/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/preact-vite/package.json b/code/frameworks/preact-vite/package.json new file mode 100644 index 000000000000..a4e3e4390ce9 --- /dev/null +++ b/code/frameworks/preact-vite/package.json @@ -0,0 +1,77 @@ +{ + "name": "@storybook/preact-vite", + "version": "7.0.0-beta.25", + "description": "Storybook for Preact and Vite: Develop Preact components in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/preact-vite", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/preact-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "types/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@preact/preset-vite": "^2.0.0", + "@storybook/builder-vite": "7.0.0-beta.25", + "@storybook/preact": "7.0.0-beta.25" + }, + "devDependencies": { + "@types/node": "^16.0.0", + "typescript": "~4.9.3", + "vite": "^4.0.0" + }, + "peerDependencies": { + "preact": ">=10", + "vite": "^3.0.0 || ^4.0.0" + }, + "engines": { + "node": ">=16" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/preact-vite/preset.js b/code/frameworks/preact-vite/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/preact-vite/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/preact-vite/src/index.ts b/code/frameworks/preact-vite/src/index.ts new file mode 100644 index 000000000000..d3ded0cdbbb9 --- /dev/null +++ b/code/frameworks/preact-vite/src/index.ts @@ -0,0 +1 @@ +export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/preact-vite/src/preset.ts b/code/frameworks/preact-vite/src/preset.ts new file mode 100644 index 000000000000..b0f891c626c7 --- /dev/null +++ b/code/frameworks/preact-vite/src/preset.ts @@ -0,0 +1,21 @@ +import type { StorybookConfig } from '@storybook/builder-vite'; +import { hasVitePlugins } from '@storybook/builder-vite'; +import preact from '@preact/preset-vite'; + +export const core: StorybookConfig['core'] = { + builder: '@storybook/builder-vite', + renderer: '@storybook/preact', +}; + +export const viteFinal: StorybookConfig['viteFinal'] = async (config) => { + const { plugins = [] } = config; + + // Add Preact plugin if not present + if (!(await hasVitePlugins(plugins, ['vite:preact-jsx']))) { + plugins.push(preact()); + } + + // TODO: Add docgen plugin per issue https://github.com/storybookjs/storybook/issues/19739 + + return config; +}; diff --git a/code/frameworks/preact-vite/tsconfig.json b/code/frameworks/preact-vite/tsconfig.json new file mode 100644 index 000000000000..caaffe6065c7 --- /dev/null +++ b/code/frameworks/preact-vite/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["node"], + "resolveJsonModule": true, + "jsx": "react-jsx", + "jsxImportSource": "preact" + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/preact-webpack5/README.md b/code/frameworks/preact-webpack5/README.md new file mode 100644 index 000000000000..60b338b400b2 --- /dev/null +++ b/code/frameworks/preact-webpack5/README.md @@ -0,0 +1,29 @@ +# Storybook for Preact + +Storybook for Preact is a UI development environment for your Preact components. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-preact-app +npx storybook init +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/preact/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. + +## Docs + +- [Basics](https://storybook.js.org/docs/preact/get-started/introduction) +- [Configurations](https://storybook.js.org/docs/preact/configure/overview) +- [Addons](https://storybook.js.org/docs/preact/configure/storybook-addons) diff --git a/code/frameworks/preact-webpack5/jest.config.js b/code/frameworks/preact-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/preact-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/preact-webpack5/package.json b/code/frameworks/preact-webpack5/package.json new file mode 100644 index 000000000000..48c101bcb777 --- /dev/null +++ b/code/frameworks/preact-webpack5/package.json @@ -0,0 +1,81 @@ +{ + "name": "@storybook/preact-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook for Preact: Develop Preact Component in isolation.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/preact-webpack5", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/preact-webpack5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/preact": "7.0.0-beta.25", + "@storybook/preset-preact-webpack": "7.0.0-beta.25", + "@types/node": "^16.0.0" + }, + "devDependencies": { + "preact": "^10.5.13", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "@babel/core": "*", + "preact": "^8.0.0||^10.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/preact-webpack5/preset.js b/code/frameworks/preact-webpack5/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/preact-webpack5/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/preact-webpack5/src/index.ts b/code/frameworks/preact-webpack5/src/index.ts new file mode 100644 index 000000000000..fcb073fefcd6 --- /dev/null +++ b/code/frameworks/preact-webpack5/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/code/frameworks/preact-webpack5/src/preset.ts b/code/frameworks/preact-webpack5/src/preset.ts new file mode 100644 index 000000000000..d822a8b3274f --- /dev/null +++ b/code/frameworks/preact-webpack5/src/preset.ts @@ -0,0 +1,22 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + path.dirname(require.resolve(path.join('@storybook/preset-preact-webpack', 'package.json'))), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + renderer: path.dirname(require.resolve(path.join('@storybook/preact', 'package.json'))), + }; +}; diff --git a/code/frameworks/preact-webpack5/src/types.ts b/code/frameworks/preact-webpack5/src/types.ts new file mode 100644 index 000000000000..2d66b8576166 --- /dev/null +++ b/code/frameworks/preact-webpack5/src/types.ts @@ -0,0 +1,45 @@ +import type { + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/preset-preact-webpack'; +import type { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/preact-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/preact-webpack5/tsconfig.json b/code/frameworks/preact-webpack5/tsconfig.json new file mode 100644 index 000000000000..77832da6336d --- /dev/null +++ b/code/frameworks/preact-webpack5/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/react-vite/README.md b/code/frameworks/react-vite/README.md new file mode 100644 index 000000000000..e8a35450aec9 --- /dev/null +++ b/code/frameworks/react-vite/README.md @@ -0,0 +1 @@ +# Storybook for React diff --git a/code/frameworks/react-vite/jest.config.js b/code/frameworks/react-vite/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/react-vite/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/react-vite/package.json b/code/frameworks/react-vite/package.json new file mode 100644 index 000000000000..5c5251807a4b --- /dev/null +++ b/code/frameworks/react-vite/package.json @@ -0,0 +1,84 @@ +{ + "name": "@storybook/react-vite", + "version": "7.0.0-beta.25", + "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/react-vite", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/react-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@joshwooding/vite-plugin-react-docgen-typescript": "^0.2.1", + "@rollup/pluginutils": "^4.2.0", + "@storybook/builder-vite": "7.0.0-beta.25", + "@storybook/react": "7.0.0-beta.25", + "@vitejs/plugin-react": "^3.0.0", + "ast-types": "^0.14.2", + "magic-string": "^0.26.1", + "react-docgen": "6.0.0-alpha.3" + }, + "devDependencies": { + "@types/node": "^16.0.0", + "typescript": "~4.9.3", + "vite": "^4.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "vite": "^3.0.0 || ^4.0.0" + }, + "engines": { + "node": ">=16" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/react-vite/preset.js b/code/frameworks/react-vite/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/react-vite/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/react-vite/src/index.ts b/code/frameworks/react-vite/src/index.ts new file mode 100644 index 000000000000..d3ded0cdbbb9 --- /dev/null +++ b/code/frameworks/react-vite/src/index.ts @@ -0,0 +1 @@ +export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/react-vite/src/plugins/docgen-handlers/actualNameHandler.ts b/code/frameworks/react-vite/src/plugins/docgen-handlers/actualNameHandler.ts new file mode 100644 index 000000000000..efa6717b47b2 --- /dev/null +++ b/code/frameworks/react-vite/src/plugins/docgen-handlers/actualNameHandler.ts @@ -0,0 +1,48 @@ +/** + * This is heavily based on the react-docgen `displayNameHandler` + * (https://github.com/reactjs/react-docgen/blob/26c90c0dd105bf83499a83826f2a6ff7a724620d/src/handlers/displayNameHandler.ts) + * but instead defines an `actualName` property on the generated docs that is taken first from the component's actual name. + * This addresses an issue where the name that the generated docs are stored under is incorrectly named with the `displayName` + * and not the component's actual name. + * + * This is inspired by `actualNameHandler` from https://github.com/storybookjs/babel-plugin-react-docgen, but is modified + * directly from displayNameHandler, using the same approach as babel-plugin-react-docgen. + */ + +import { namedTypes as t } from 'ast-types'; +import type { NodePath } from 'ast-types/lib/node-path'; +import { getNameOrValue, isReactForwardRefCall } from 'react-docgen/dist/utils'; +import type { Importer } from 'react-docgen/dist/parse'; +import type Documentation from 'react-docgen/dist/Documentation'; + +export default function actualNameHandler( + documentation: Documentation, + path: NodePath, + importer: Importer +): void { + if (t.ClassDeclaration.check(path.node) || t.FunctionDeclaration.check(path.node)) { + documentation.set('actualName', getNameOrValue(path.get('id'))); + } else if ( + t.ArrowFunctionExpression.check(path.node) || + t.FunctionExpression.check(path.node) || + isReactForwardRefCall(path, importer) + ) { + let currentPath = path; + while (currentPath.parent) { + if (t.VariableDeclarator.check(currentPath.parent.node)) { + documentation.set('actualName', getNameOrValue(currentPath.parent.get('id'))); + return; + } + if (t.AssignmentExpression.check(currentPath.parent.node)) { + const leftPath = currentPath.parent.get('left'); + if (t.Identifier.check(leftPath.node) || t.Literal.check(leftPath.node)) { + documentation.set('actualName', getNameOrValue(leftPath)); + return; + } + } + currentPath = currentPath.parent; + } + // Could not find an actual name + documentation.set('actualName', ''); + } +} diff --git a/code/frameworks/react-vite/src/plugins/react-docgen.ts b/code/frameworks/react-vite/src/plugins/react-docgen.ts new file mode 100644 index 000000000000..0561456f8618 --- /dev/null +++ b/code/frameworks/react-vite/src/plugins/react-docgen.ts @@ -0,0 +1,69 @@ +import path from 'path'; +import { createFilter } from '@rollup/pluginutils'; +import { + parse, + handlers as docgenHandlers, + resolver as docgenResolver, + importers as docgenImporters, +} from 'react-docgen'; +import type { DocumentationObject } from 'react-docgen/dist/Documentation'; +import MagicString from 'magic-string'; +import type { PluginOption } from 'vite'; +import actualNameHandler from './docgen-handlers/actualNameHandler'; + +type DocObj = DocumentationObject & { actualName: string }; + +// TODO: None of these are able to be overridden, so `default` is aspirational here. +const defaultHandlers = Object.values(docgenHandlers).map((handler) => handler); +const defaultResolver = docgenResolver.findAllExportedComponentDefinitions; +const defaultImporter = docgenImporters.makeFsImporter(); +const handlers = [...defaultHandlers, actualNameHandler]; + +type Options = { + include?: string | RegExp | (string | RegExp)[]; + exclude?: string | RegExp | (string | RegExp)[]; +}; + +export function reactDocgen({ + include = /\.(mjs|tsx?|jsx?)$/, + exclude = [/node_modules\/.*/], +}: Options = {}): PluginOption { + const cwd = process.cwd(); + const filter = createFilter(include, exclude); + + return { + name: 'storybook:react-docgen-plugin', + enforce: 'pre', + async transform(src: string, id: string) { + const relPath = path.relative(cwd, id); + if (!filter(relPath)) return; + + try { + // Since we're using `findAllExportedComponentDefinitions`, this will always be an array. + const docgenResults = parse(src, defaultResolver, handlers, { + importer: defaultImporter, + filename: id, + }) as DocObj[]; + const s = new MagicString(src); + + docgenResults.forEach((info) => { + const { actualName, ...docgenInfo } = info; + if (actualName) { + const docNode = JSON.stringify(docgenInfo); + s.append(`;${actualName}.__docgenInfo=${docNode}`); + } + }); + + // eslint-disable-next-line consistent-return + return { + code: s.toString(), + map: s.generateMap(), + }; + } catch (e) { + // Usually this is just an error from react-docgen that it couldn't find a component + // Only uncomment for troubleshooting + // console.error(e); + } + }, + }; +} diff --git a/code/frameworks/react-vite/src/preset.ts b/code/frameworks/react-vite/src/preset.ts new file mode 100644 index 000000000000..6f89d4dd61f6 --- /dev/null +++ b/code/frameworks/react-vite/src/preset.ts @@ -0,0 +1,56 @@ +/* eslint-disable global-require */ +import type { StorybookConfig } from '@storybook/builder-vite'; +import { hasVitePlugins } from '@storybook/builder-vite'; + +export const core: StorybookConfig['core'] = { + builder: '@storybook/builder-vite', + renderer: '@storybook/react', +}; + +export const viteFinal: StorybookConfig['viteFinal'] = async (config, { presets }) => { + const { plugins = [] } = config; + + // Add react plugin if not present + if (!(await hasVitePlugins(plugins, ['vite:react-babel', 'vite:react-swc']))) { + const { default: react } = await import('@vitejs/plugin-react'); + plugins.push(react()); + } + + // Add docgen plugin + const { reactDocgen: reactDocgenOption, reactDocgenTypescriptOptions } = await presets.apply( + 'typescript', + {} + ); + let typescriptPresent; + + try { + require.resolve('typescript'); + typescriptPresent = true; + } catch (e) { + typescriptPresent = false; + } + + if (reactDocgenOption === 'react-docgen-typescript' && typescriptPresent) { + plugins.push( + require('@joshwooding/vite-plugin-react-docgen-typescript')({ + ...reactDocgenTypescriptOptions, + // We *need* this set so that RDT returns default values in the same format as react-docgen + savePropValueAsString: true, + }) + ); + } + + // Add react-docgen so long as the option is not false + if (typeof reactDocgenOption === 'string') { + const { reactDocgen } = await import('./plugins/react-docgen'); + // Needs to run before the react plugin, so add to the front + plugins.unshift( + // If react-docgen is specified, use it for everything, otherwise only use it for non-typescript files + reactDocgen({ + include: reactDocgenOption === 'react-docgen' ? /\.(mjs|tsx?|jsx?)$/ : /\.(mjs|jsx?)$/, + }) + ); + } + + return config; +}; diff --git a/code/frameworks/react-vite/src/typings.d.ts b/code/frameworks/react-vite/src/typings.d.ts new file mode 100644 index 000000000000..53aa2b04a775 --- /dev/null +++ b/code/frameworks/react-vite/src/typings.d.ts @@ -0,0 +1,44 @@ +// TODO: Replace, as soon as @types/react-dom 17.0.14 is used +// Source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fb0f14b7a35cde26ffaa82e7536c062e593e9ae6/types/react-dom/client.d.ts +declare module 'react-dom/client' { + import React = require('react'); + + export interface HydrationOptions { + onHydrated?(suspenseInstance: Comment): void; + onDeleted?(suspenseInstance: Comment): void; + /** + * Prefix for `useId`. + */ + identifierPrefix?: string; + onRecoverableError?: (error: unknown) => void; + } + + export interface RootOptions { + /** + * Prefix for `useId`. + */ + identifierPrefix?: string; + onRecoverableError?: (error: unknown) => void; + } + + export interface Root { + render(children: React.ReactChild | Iterable): void; + unmount(): void; + } + + /** + * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode. + * + * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot + */ + export function createRoot( + container: Element | Document | DocumentFragment | Comment, + options?: RootOptions + ): Root; + + export function hydrateRoot( + container: Element | Document | DocumentFragment | Comment, + initialChildren: React.ReactChild | Iterable, + options?: HydrationOptions + ): Root; +} diff --git a/code/frameworks/react-vite/src/utils.ts b/code/frameworks/react-vite/src/utils.ts new file mode 100644 index 000000000000..805a30a728e2 --- /dev/null +++ b/code/frameworks/react-vite/src/utils.ts @@ -0,0 +1,12 @@ +import path from 'path'; +import fs from 'fs'; + +export function readPackageJson(): Record | false { + const packageJsonPath = path.resolve('package.json'); + if (!fs.existsSync(packageJsonPath)) { + return false; + } + + const jsonContent = fs.readFileSync(packageJsonPath, 'utf8'); + return JSON.parse(jsonContent); +} diff --git a/code/frameworks/react-vite/tsconfig.json b/code/frameworks/react-vite/tsconfig.json new file mode 100644 index 000000000000..13e04352a3c7 --- /dev/null +++ b/code/frameworks/react-vite/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["node"], + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/react-webpack5/README.md b/code/frameworks/react-webpack5/README.md new file mode 100644 index 000000000000..6aee8981736d --- /dev/null +++ b/code/frameworks/react-webpack5/README.md @@ -0,0 +1,47 @@ +# Storybook for React + +Storybook for React is a UI development environment for your React components. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-react-app +npx storybook init +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/react/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. + +Here are some featured storybooks that you can reference to see how Storybook works: + +- [Demo of Storybook Design System](https://storybook.js.org/design-system) - [source](https://github.com/storybookjs/design-system) + +## Create React App + +Support for [Create React App](https://create-react-app.dev/) is handled by [`@storybook/preset-create-react-app`](https://github.com/storybookjs/presets/tree/master/packages/preset-create-react-app). + +This preset enables support for all Create React App features, including Sass/SCSS and TypeScript. + +If you're working on an app that was initialized manually (i.e., without the use of Create React App), ensure that your app has [react-dom](https://www.npmjs.com/package/react-dom) included as a dependency. Failing to do so can lead to unforeseen issues with Storybook and your project. + +## Typescript + +`@storybook/react` is now exporting its own types to use with Typescript. +You don't need to have `@types/storybook__react` installed anymore if it was your case. +But you probably also need to use types from `@types/node @types/react`. + +## Docs + +- [Basics](https://storybook.js.org/docs/react/get-started/introduction) +- [Configurations](https://storybook.js.org/docs/react/configure/overview) +- [Addons](https://storybook.js.org/docs/react/configure/storybook-addons) diff --git a/code/frameworks/react-webpack5/jest.config.js b/code/frameworks/react-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/react-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/react-webpack5/package.json b/code/frameworks/react-webpack5/package.json new file mode 100644 index 000000000000..8ccb8e132196 --- /dev/null +++ b/code/frameworks/react-webpack5/package.json @@ -0,0 +1,87 @@ +{ + "name": "@storybook/react-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/react-webpack5", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/react-webpack5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/preset-react-webpack": "7.0.0-beta.25", + "@storybook/react": "7.0.0-beta.25", + "@types/node": "^16.0.0" + }, + "devDependencies": { + "jest-specific-snapshot": "^7.0.0", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "@babel/core": "^7.11.5", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "typescript": { + "optional": true + } + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/react-webpack5/preset.js b/code/frameworks/react-webpack5/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/react-webpack5/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/react-webpack5/src/index.ts b/code/frameworks/react-webpack5/src/index.ts new file mode 100644 index 000000000000..fcb073fefcd6 --- /dev/null +++ b/code/frameworks/react-webpack5/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/code/frameworks/react-webpack5/src/preset.ts b/code/frameworks/react-webpack5/src/preset.ts new file mode 100644 index 000000000000..b2f73f2089fe --- /dev/null +++ b/code/frameworks/react-webpack5/src/preset.ts @@ -0,0 +1,68 @@ +/* eslint-disable no-param-reassign */ + +import path from 'path'; +import type { PresetProperty, Options } from '@storybook/types'; +import type { FrameworkOptions, StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + path.dirname(require.resolve(path.join('@storybook/preset-react-webpack', 'package.json'))), +]; + +const defaultFrameworkOptions: FrameworkOptions = { + legacyRootApi: true, +}; + +export const frameworkOptions = async ( + _: never, + options: Options +): Promise => { + const config = await options.presets.apply('framework'); + + if (typeof config === 'string') { + return { + name: config, + options: defaultFrameworkOptions, + }; + } + if (typeof config === 'undefined') { + return { + name: require.resolve('@storybook/react-webpack5') as '@storybook/react-webpack5', + options: defaultFrameworkOptions, + }; + } + + return { + name: config.name, + options: { + ...defaultFrameworkOptions, + ...config.options, + }, + }; +}; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + renderer: path.dirname(require.resolve(path.join('@storybook/react', 'package.json'))), + }; +}; + +export const webpack: StorybookConfig['webpack'] = async (config) => { + config.resolve = config.resolve || {}; + + config.resolve.alias = { + ...config.resolve?.alias, + '@storybook/react': path.dirname( + require.resolve(path.join('@storybook/react', 'package.json')) + ), + }; + return config; +}; diff --git a/code/frameworks/react-webpack5/src/types.ts b/code/frameworks/react-webpack5/src/types.ts new file mode 100644 index 000000000000..7e50ef23aba4 --- /dev/null +++ b/code/frameworks/react-webpack5/src/types.ts @@ -0,0 +1,46 @@ +import type { + ReactOptions, + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/preset-react-webpack'; +import type { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/react-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = ReactOptions & { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/react-webpack5/src/typings.d.ts b/code/frameworks/react-webpack5/src/typings.d.ts new file mode 100644 index 000000000000..53aa2b04a775 --- /dev/null +++ b/code/frameworks/react-webpack5/src/typings.d.ts @@ -0,0 +1,44 @@ +// TODO: Replace, as soon as @types/react-dom 17.0.14 is used +// Source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fb0f14b7a35cde26ffaa82e7536c062e593e9ae6/types/react-dom/client.d.ts +declare module 'react-dom/client' { + import React = require('react'); + + export interface HydrationOptions { + onHydrated?(suspenseInstance: Comment): void; + onDeleted?(suspenseInstance: Comment): void; + /** + * Prefix for `useId`. + */ + identifierPrefix?: string; + onRecoverableError?: (error: unknown) => void; + } + + export interface RootOptions { + /** + * Prefix for `useId`. + */ + identifierPrefix?: string; + onRecoverableError?: (error: unknown) => void; + } + + export interface Root { + render(children: React.ReactChild | Iterable): void; + unmount(): void; + } + + /** + * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode. + * + * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot + */ + export function createRoot( + container: Element | Document | DocumentFragment | Comment, + options?: RootOptions + ): Root; + + export function hydrateRoot( + container: Element | Document | DocumentFragment | Comment, + initialChildren: React.ReactChild | Iterable, + options?: HydrationOptions + ): Root; +} diff --git a/code/frameworks/react-webpack5/tsconfig.json b/code/frameworks/react-webpack5/tsconfig.json new file mode 100644 index 000000000000..77832da6336d --- /dev/null +++ b/code/frameworks/react-webpack5/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/server-webpack5/README.md b/code/frameworks/server-webpack5/README.md new file mode 100644 index 000000000000..20609d406cfa --- /dev/null +++ b/code/frameworks/server-webpack5/README.md @@ -0,0 +1,317 @@ +# Storybook for Server + +--- + +Storybook for Server is a UI development environment for your plain HTML snippets rendered by your server backend. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-app +npx storybook init -t server +``` + +To configure the server that Storybook will connect to, export a global parameter `parameters.server.url` in `.storybook/preview.js`: + +```js +export const parameters = { + server: { + url: `http://localhost:${port}/storybook_preview`, + }, +}; +``` + +The URL you connect to should have the ability to render a story, see [server rendering](#server-rendering) below. + +For more information visit: [storybook.js.org](https://storybook.js.org) + +## Writing Stories + +To write a story, use whatever API is natural for your server-side rendering framework to generate set of JSON or YAML files of stories analogous to CSF files (see the [`server-kitchen-sink`](../../examples/server-kitchen-sink/stories) example for ideas). + +```json +{ + "title": "Component", + "parameters": { + "options": { "component": "my_widget" } + }, + "stories": [ + { + "name": "Default", + "parameters": { + "server": { "id": "path/of/your/story" } + } + } + ] +} +``` + +In your `.storybook/main.js` you simply provide a glob specifying the location of those JSON files, e.g. + +```js +module.exports = { + stories: ['../stories/**/*.stories.json'], +}; +``` + +Notice that the JSON does not specify a rendering function -- `@storybook/server` will instead call your `parameters.server.url` with the story's server id appended. + +For example the JSON story above is requivalent to the CSF3 definition: + +```javascript +export default { + title: 'Component', + parameters: { + options: { + component: 'my_widget', + }, + }, +}; + +export const Default = { + name: 'Default', + parameters: { + server: { + id: 'path/of/your/story"', + }, + }, +}; +``` + +With the story HTML will be fetched from the server by making a GET request to http://localhost/storybook_preview/path/of/your/story` + +### Ruby/Rails support + +In particular the [View Component::Storybook](https://github.com/jonspalmer/view_component_storybook) gem provides a Ruby API for easily creating the above with a Ruby/Rails DSL (as well as providing a server rendering endpoint). + +## Server rendering + +The server rendering side of things is relatively straightforward. When you browse to a story in the sidebar, Storybook will make a `fetch` request to `${parameters.server.url}/{parameters.server.id}` and display the HTML that is returned. + +You need to ensure the route in your server app renders the appropriate HTML when called in that fashion. + +### Passing parameters to the server + +Many components are likely to be dynamic - responding to parameters that change their content or appearance. `@storybook\server` has two mechanisms for passing those parameters to the server - `params` and `args`. Parameters defined in this way are appended to the fetch url as query string parameters. The server endpoint is responsible for interpreting those parameters and vary the returned html appropriately + +#### Constant parameters with `params` + +Static parameters can be defined using the `params` story parameter. For example suppose you have a Button component that has a label and color options: + +```json +{ + "title": "Buttons", + "stories": [ + { + "name": "Red", + "parameters": { + "server": { + "id": "button", + "params": { "color": "red", "label": "Stop" } + } + } + }, + { + "name": "Green", + "parameters": { + "server": { + "id": "button", + "params": { "color": "green", "label": "OK" } + } + } + } + ] +} +``` + +The Red and Green story HTML will be fetched from the urls `server.url/controls/button?color=red&label=Stop` and `server.url/controls/button?color=green&label=OK` + +Like all story parameters server params can be defined in the default export and overridden in stories. + +```json +{ + "title": "Buttons", + "parameters": { + "server": { + "params": { "color": "red" } + } + }, + "stories": [ + { + "name": "Default", + "parameters": { + "server": { + "id": "button", + "params": { "label": "Stop" } + } + } + }, + { + "name": "Green", + "parameters": { + "server": { + "id": "button", + "params": { "color": "green", "label": "OK" } + } + } + } + ] +} +``` + +#### Dynamic parameters with `args` and Controls + +Dynamic parameters can be defined using args and the Controls addon + +```json +{ + "title": "Buttons", + "stories": [ + { + "name": "Red", + "parameters": { + "server": { + "id": "button" + } + }, + "args": { "color": "red", "label": "Stop" } + }, + { + "name": "Green", + "parameters": { + "server": { + "id": "button" + } + }, + "args": { "color": "green", "label": "Go" } + } + ] +} +``` + +Story args are passed to the server as url query parameters just like `params` except now they can be varied on the Controls addon panel. + +Just like CSF stories we can define `argTypes` to specify the controls used in the controls panel. `argTypes` can be defined at the default or story level. + +```json +{ + "title": "Buttons", + "argTypes": { + "color": { "control": { "type": "color" } } + }, + "stories": [ + { + "name": "Red", + "parameters": { + "server": { + "id": "button" + } + }, + "args": { "color": "red", "label": "Stop" } + }, + { + "name": "Green", + "parameters": { + "server": { + "id": "button" + } + }, + "args": { "color": "green", "label": "Go" } + } + ] +} +``` + +## Addon compatibility + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. As some addons assume the story is rendered in JS, they may not work with `@storybook/server` (yet!). + +Many addons that act on the manager side (such as `backgrounds` and `viewport`) will work out of the box with `@storybook/server` -- you can configure them with parameters written on the server as usual. + +### Controls + +To configure controls, simple add `args` and `argTypes` keys to the story JSON much like you would CSF: + +```json +{ + "title": "Controls", + "stories": [ + { + "name": "Button", + "parameters": { + "server": { "id": "controls/button" } + }, + "args": { "button_text": "Push Me", "color": "red" }, + "argTypes": { "button_text": { "control": { "type": "color" } } } + } + ] +} +``` + +The controls values will be added to your story URL as query parameters. + +### Actions + +To use actions, use the `parameters.actions.handles` parameter: + +```json +{ + "title": "Actions", + "stories": [ + { + "name": "Button", + "parameters": { + "server": { "id": "actions/button" }, + "actions": { + "handles": ["mouseover", "click .btn"] + } + } + } + ] +} +``` + +## Advanced Configuration + +### fetchStoryHtml + +For control over how `@storybook/server` fetches Html from the server you can provide a `fetchStoryHtml` function as a parameter. You would typically set this in `.storybook/preview.js` but it's just a regular Storybook parameter so could be overridden at the stories or story level. + +```javascript +// .storybook/preview.js + +const fetchStoryHtml = async (url, path, params, context) => { + // Custom fetch implementation + // .... + return html; +}; + +export const parameters = { + server: { + url: `http://localhost:${port}/storybook_preview`, + fetchStoryHtml, + }, +}; +``` + +`fetchStoryHtml` should be an async function with the following signature + +```javascript +type FetchStoryHtmlType = ( + url: string, + id: string, + params: any, + context: StoryContext +) => Promise; +``` + +- url: Server url configured by the `parameters.server.url` +- id: Id of the story being rendered given by `parameters.server.id` +- params: Merged story params `parameters.server.params`and story args +- context: The context of the story diff --git a/code/frameworks/server-webpack5/jest.config.js b/code/frameworks/server-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/server-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/server-webpack5/package.json b/code/frameworks/server-webpack5/package.json new file mode 100644 index 000000000000..591e52fbb383 --- /dev/null +++ b/code/frameworks/server-webpack5/package.json @@ -0,0 +1,78 @@ +{ + "name": "@storybook/server-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook for Server: View HTML snippets from a server in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/server-webpack5", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/server-webpack5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/preset-server-webpack": "7.0.0-beta.25", + "@storybook/server": "7.0.0-beta.25", + "@types/node": "^16.0.0" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/server-webpack5/preset.js b/code/frameworks/server-webpack5/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/server-webpack5/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/server-webpack5/src/index.ts b/code/frameworks/server-webpack5/src/index.ts new file mode 100644 index 000000000000..fcb073fefcd6 --- /dev/null +++ b/code/frameworks/server-webpack5/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/code/frameworks/server-webpack5/src/preset.ts b/code/frameworks/server-webpack5/src/preset.ts new file mode 100644 index 000000000000..61f628ee08f9 --- /dev/null +++ b/code/frameworks/server-webpack5/src/preset.ts @@ -0,0 +1,22 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + path.dirname(require.resolve(path.join('@storybook/preset-server-webpack', 'package.json'))), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + renderer: path.dirname(require.resolve(path.join('@storybook/server', 'package.json'))), + }; +}; diff --git a/code/frameworks/server-webpack5/src/types.ts b/code/frameworks/server-webpack5/src/types.ts new file mode 100644 index 000000000000..63ecb28ab897 --- /dev/null +++ b/code/frameworks/server-webpack5/src/types.ts @@ -0,0 +1,45 @@ +import type { + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/preset-server-webpack'; +import type { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/server-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/server-webpack5/tsconfig.json b/code/frameworks/server-webpack5/tsconfig.json new file mode 100644 index 000000000000..a4429176e35f --- /dev/null +++ b/code/frameworks/server-webpack5/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/svelte-vite/README.md b/code/frameworks/svelte-vite/README.md new file mode 100644 index 000000000000..30a7c36ca01e --- /dev/null +++ b/code/frameworks/svelte-vite/README.md @@ -0,0 +1 @@ +# Storybook for Svelte diff --git a/code/frameworks/svelte-vite/jest.config.js b/code/frameworks/svelte-vite/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/svelte-vite/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/svelte-vite/package.json b/code/frameworks/svelte-vite/package.json new file mode 100644 index 000000000000..22a7f050cb6d --- /dev/null +++ b/code/frameworks/svelte-vite/package.json @@ -0,0 +1,84 @@ +{ + "name": "@storybook/svelte-vite", + "version": "7.0.0-beta.25", + "description": "Storybook for Svelte and Vite: Develop Svelte components in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/svelte-vite", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/svelte-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-vite": "7.0.0-beta.25", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/svelte": "7.0.0-beta.25", + "@sveltejs/vite-plugin-svelte": "^2.0.0", + "magic-string": "^0.26.1", + "svelte": "^3.0.0", + "sveltedoc-parser": "^4.2.1", + "ts-dedent": "^2.2.0" + }, + "devDependencies": { + "@types/node": "^16.0.0", + "typescript": "~4.9.3", + "vite": "^4.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "vite": "^3.0.0 || ^4.0.0" + }, + "engines": { + "node": "^14.18 || >=16" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/svelte-vite/preset.js b/code/frameworks/svelte-vite/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/svelte-vite/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/svelte-vite/src/index.ts b/code/frameworks/svelte-vite/src/index.ts new file mode 100644 index 000000000000..d3ded0cdbbb9 --- /dev/null +++ b/code/frameworks/svelte-vite/src/index.ts @@ -0,0 +1 @@ +export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts new file mode 100644 index 000000000000..55fd98811af4 --- /dev/null +++ b/code/frameworks/svelte-vite/src/plugins/svelte-docgen.ts @@ -0,0 +1,103 @@ +import type { PluginOption } from 'vite'; +import MagicString from 'magic-string'; +import path from 'path'; +import fs from 'fs'; +import svelteDoc from 'sveltedoc-parser'; +import type { SvelteParserOptions } from 'sveltedoc-parser'; +import { logger } from '@storybook/node-logger'; +import { preprocess } from 'svelte/compiler'; +import { createFilter } from 'vite'; + +// Most of the code here should probably be exported by @storybook/svelte and reused here. +// See: https://github.com/storybookjs/storybook/blob/next/app/svelte/src/server/svelte-docgen-loader.ts + +// From https://github.com/sveltejs/svelte/blob/8db3e8d0297e052556f0b6dde310ef6e197b8d18/src/compiler/compile/utils/get_name_from_filename.ts +// Copied because it is not exported from the compiler +function getNameFromFilename(filename: string) { + if (!filename) return null; + + const parts = filename.split(/[/\\]/).map(encodeURI); + + if (parts.length > 1) { + const indexMatch = parts[parts.length - 1].match(/^index(\.\w+)/); + if (indexMatch) { + parts.pop(); + parts[parts.length - 1] += indexMatch[1]; + } + } + + const base = parts + .pop() + ?.replace(/%/g, 'u') + .replace(/\.[^.]+$/, '') + .replace(/[^a-zA-Z_$0-9]+/g, '_') + .replace(/^_/, '') + .replace(/_$/, '') + .replace(/^(\d)/, '_$1'); + + if (!base) { + throw new Error(`Could not derive component name from file ${filename}`); + } + + return base[0].toUpperCase() + base.slice(1); +} + +export function svelteDocgen(svelteOptions: Record): PluginOption { + const cwd = process.cwd(); + const { preprocess: preprocessOptions, logDocgen = false } = svelteOptions; + const include = /\.(svelte)$/; + const filter = createFilter(include); + + return { + name: 'storybook:svelte-docgen-plugin', + async transform(src: string, id: string) { + if (!filter(id)) return undefined; + + const resource = path.relative(cwd, id); + + let docOptions; + if (preprocessOptions) { + // eslint-disable-next-line @typescript-eslint/no-shadow + const src = fs.readFileSync(resource).toString(); + + const { code: fileContent } = await preprocess(src, preprocessOptions, { + filename: resource, + }); + + docOptions = { + fileContent, + }; + } else { + docOptions = { filename: resource }; + } + + // set SvelteDoc options + const options: SvelteParserOptions = { + ...docOptions, + version: 3, + }; + + const s = new MagicString(src); + + try { + const componentDoc = await svelteDoc.parse(options); + // get filename for source content + const file = path.basename(resource); + + componentDoc.name = path.basename(file); + + const componentName = getNameFromFilename(resource); + s.append(`;${componentName}.__docgen = ${JSON.stringify(componentDoc)}`); + } catch (error: any) { + if (logDocgen) { + logger.error(error); + } + } + + return { + code: s.toString(), + map: s.generateMap({ hires: true, source: id }), + }; + }, + }; +} diff --git a/code/frameworks/svelte-vite/src/preset.ts b/code/frameworks/svelte-vite/src/preset.ts new file mode 100644 index 000000000000..0d459212adae --- /dev/null +++ b/code/frameworks/svelte-vite/src/preset.ts @@ -0,0 +1,36 @@ +import { type StorybookConfig, hasVitePlugins } from '@storybook/builder-vite'; +import { handleSvelteKit } from './utils'; +import { svelteDocgen } from './plugins/svelte-docgen'; + +export const core: StorybookConfig['core'] = { + builder: '@storybook/builder-vite', + renderer: '@storybook/svelte', +}; + +export const viteFinal: NonNullable = async (config, options) => { + const { plugins = [] } = config; + // TODO: set up eslint import to use typescript resolver + // eslint-disable-next-line import/no-unresolved + const { svelte, loadSvelteConfig } = await import('@sveltejs/vite-plugin-svelte'); + const svelteOptions: Record = await options.presets.apply( + 'svelteOptions', + {}, + options + ); + const svelteConfig = { ...(await loadSvelteConfig()), ...svelteOptions }; + + // Add svelte plugin if not present + if (!(await hasVitePlugins(plugins, ['vite-plugin-svelte']))) { + plugins.push(svelte()); + } + + // Add docgen plugin + plugins.push(svelteDocgen(svelteConfig)); + + await handleSvelteKit(plugins, options); + + return { + ...config, + plugins, + }; +}; diff --git a/code/frameworks/svelte-vite/src/utils.ts b/code/frameworks/svelte-vite/src/utils.ts new file mode 100644 index 000000000000..154587f852f1 --- /dev/null +++ b/code/frameworks/svelte-vite/src/utils.ts @@ -0,0 +1,41 @@ +import type { PluginOption } from 'vite'; +import type { Options } from '@storybook/types'; +import dedent from 'ts-dedent'; +import { logger } from '@storybook/node-logger'; +import { hasVitePlugins } from '@storybook/builder-vite'; + +/** + * A migration step that ensures the svelte-vite framework still supports SvelteKit, + * but warns the user that they should use the sveltekit framework instead. + * Should be removed when we decide to remove support completely for SvelteKit in svelte-vite + */ +export async function handleSvelteKit(plugins: PluginOption[], options: Options) { + /* + the sveltekit framework uses this svelte-vite framework under the hood + so we have to take extra care of only throwing when the user is actually using + svelte-vite directly and not just through sveltekit + */ + const frameworkPreset = await options.presets.apply('framework', {}, options); + const framework = typeof frameworkPreset === 'string' ? frameworkPreset : frameworkPreset.name; + + const hasSvelteKitPlugins = await hasVitePlugins(plugins, [ + 'vite-plugin-svelte-kit', + 'vite-plugin-sveltekit-setup', + 'vite-plugin-sveltekit-compile', + ]); + + if (hasSvelteKitPlugins && framework !== '@storybook/sveltekit') { + logger.error( + dedent` + We've detected a SvelteKit project using the @storybook/svelte-vite framework, which is not supported in Storybook 7.0 + Please use the @storybook/sveltekit framework instead. + You can migrate automatically by running + + npx sb@next automigrate sveltekitFramework + + See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework + ` + ); + throw new Error(); + } +} diff --git a/code/frameworks/svelte-vite/tsconfig.json b/code/frameworks/svelte-vite/tsconfig.json new file mode 100644 index 000000000000..13e04352a3c7 --- /dev/null +++ b/code/frameworks/svelte-vite/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["node"], + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/svelte-webpack5/README.md b/code/frameworks/svelte-webpack5/README.md new file mode 100644 index 000000000000..2c1279392720 --- /dev/null +++ b/code/frameworks/svelte-webpack5/README.md @@ -0,0 +1,32 @@ +# Storybook for Svelte + +Storybook for Svelte is a UI development environment for your Svelte components. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-svelte-app +npx storybook init +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/svelte/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. + +## TODOs + +- [ ] Support `addon-info` +- [ ] Support Svelte markup directly in stories +- [ ] Add Svelte storybook generator +- [ ] Provide stories that show advanced Svelte use cases +- [ ] Hydratable +- [ ] Advanced mount options diff --git a/code/frameworks/svelte-webpack5/jest.config.js b/code/frameworks/svelte-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/svelte-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/svelte-webpack5/package.json b/code/frameworks/svelte-webpack5/package.json new file mode 100644 index 000000000000..e1c1b6e398fd --- /dev/null +++ b/code/frameworks/svelte-webpack5/package.json @@ -0,0 +1,82 @@ +{ + "name": "@storybook/svelte-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook for Svelte: Develop Svelte Component in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/svelte-webpack5", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/svelte-webpack5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/preset-svelte-webpack": "7.0.0-beta.25", + "@storybook/svelte": "7.0.0-beta.25" + }, + "devDependencies": { + "svelte": "^3.48.0", + "svelte-loader": "^3.1.2", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "@babel/core": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "svelte": "^3.48.0", + "svelte-loader": "*" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/svelte-webpack5/preset.js b/code/frameworks/svelte-webpack5/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/svelte-webpack5/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/svelte-webpack5/src/index.ts b/code/frameworks/svelte-webpack5/src/index.ts new file mode 100644 index 000000000000..fcb073fefcd6 --- /dev/null +++ b/code/frameworks/svelte-webpack5/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/code/frameworks/svelte-webpack5/src/preset.ts b/code/frameworks/svelte-webpack5/src/preset.ts new file mode 100644 index 000000000000..8b55996d6128 --- /dev/null +++ b/code/frameworks/svelte-webpack5/src/preset.ts @@ -0,0 +1,22 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + path.dirname(require.resolve(path.join('@storybook/preset-svelte-webpack', 'package.json'))), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + renderer: path.dirname(require.resolve(path.join('@storybook/svelte', 'package.json'))), + }; +}; diff --git a/code/frameworks/svelte-webpack5/src/types.ts b/code/frameworks/svelte-webpack5/src/types.ts new file mode 100644 index 000000000000..d5c0578faa32 --- /dev/null +++ b/code/frameworks/svelte-webpack5/src/types.ts @@ -0,0 +1,46 @@ +import type { + SvelteOptions, + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/preset-svelte-webpack'; +import type { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/svelte-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = SvelteOptions & { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/svelte-webpack5/src/typings.d.ts b/code/frameworks/svelte-webpack5/src/typings.d.ts new file mode 100644 index 000000000000..48e7ba6228fd --- /dev/null +++ b/code/frameworks/svelte-webpack5/src/typings.d.ts @@ -0,0 +1,3 @@ +declare module '@storybook/svelte/templates/SlotDecorator.svelte'; +declare module '@storybook/svelte/templates/PreviewRender.svelte'; +declare module '@storybook/svelte/templates/HOC.svelte'; diff --git a/app/svelte/templates/HOC.svelte b/code/frameworks/svelte-webpack5/templates/HOC.svelte similarity index 100% rename from app/svelte/templates/HOC.svelte rename to code/frameworks/svelte-webpack5/templates/HOC.svelte diff --git a/code/frameworks/svelte-webpack5/templates/PreviewRender.svelte b/code/frameworks/svelte-webpack5/templates/PreviewRender.svelte new file mode 100644 index 000000000000..84fe3707a426 --- /dev/null +++ b/code/frameworks/svelte-webpack5/templates/PreviewRender.svelte @@ -0,0 +1,37 @@ + + \ No newline at end of file diff --git a/app/svelte/templates/SlotDecorator.svelte b/code/frameworks/svelte-webpack5/templates/SlotDecorator.svelte similarity index 100% rename from app/svelte/templates/SlotDecorator.svelte rename to code/frameworks/svelte-webpack5/templates/SlotDecorator.svelte diff --git a/code/frameworks/svelte-webpack5/tsconfig.json b/code/frameworks/svelte-webpack5/tsconfig.json new file mode 100644 index 000000000000..77832da6336d --- /dev/null +++ b/code/frameworks/svelte-webpack5/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/sveltekit/README.md b/code/frameworks/sveltekit/README.md new file mode 100644 index 000000000000..4f50e3f54bff --- /dev/null +++ b/code/frameworks/sveltekit/README.md @@ -0,0 +1,127 @@ +# Storybook for SvelteKit + +Our goal is to help you use the tools you love together with Storybook. That’s why Storybook has zero-config support for SvelteKit with the `@storybook/sveltekit` package. + +Check out our [Frameworks API](https://storybook.js.org/blog/framework-api/) announcement for what this all means for you and our continued efforts to make Storybook a seamless integration for any project. + +## Table of Contents + +- [Supported features](#supported-features) +- [Requirements](#requirements) +- [Getting Started](#getting-started) + - [In a project without Storybook](#in-a-project-without-storybook) + - [In a project with Storybook](#in-a-project-with-storybook) + - [Automatic migration](#automatic-migration) + - [Manual migration](#manual-migration) +- [Troubleshooting](#troubleshooting) + - [Error: `ERR! SyntaxError: Identifier '__esbuild_register_import_meta_url__' has already been declared` when starting Storybook](#error-err-syntaxerror-identifier-__esbuild_register_import_meta_url__-has-already-been-declared-when-starting-storybook) + - [Error: `Cannot read properties of undefined (reading 'disable_scroll_handling')` in preview](#error-cannot-read-properties-of-undefined-reading-disable_scroll_handling-in-preview) +- [Acknowledgements](#acknowledgements) + +## Supported features + +All Svelte language features are supported out of the box, as Storybook uses the Svelte compiler underneath. +However SvelteKit has some [Kit-specific modules](https://kit.svelte.dev/docs/modules) that currently aren't supported. It's on our roadmap to support most of them soon: + +| **Module** | **Status** | **Note** | +| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| [`$app/environment`](https://kit.svelte.dev/docs/modules#$app-environment) | ✅ Supported | `version` is always empty in Storybook. | +| [`$app/forms`](https://kit.svelte.dev/docs/modules#$app-forms) | ⏳ Planned for 7.1 | See [section in Troubleshooting](#error-cannot-read-properties-of-undefined-reading-disable_scroll_handling-in-preview) | +| [`$app/navigation`](https://kit.svelte.dev/docs/modules#$app-navigation) | ⏳ Planned for 7.1. With mocks so the Actions addon will display when the hooks are being called. | See [section in Troubleshooting](#error-cannot-read-properties-of-undefined-reading-disable_scroll_handling-in-preview) | +| [`$app/paths`](https://kit.svelte.dev/docs/modules#$app-paths) | ⏳ Planned for 7.1. | | +| [`$app/stores`](https://kit.svelte.dev/docs/modules#$app-stores) | ✅ Supported | Mocks planned for 7.1, so you can set different store values per story. | +| [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private) | ⛔ Not supported | They are meant to only be available server-side, and Storybook renders all components on the client. | +| [`$env/dynamic/public`](https://kit.svelte.dev/docs/modules#$env-dynamic-public) | 🚧 Partially supported | Only supported in development mode. | +| [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private) | ⛔ Not supported | They are meant to only be available server-side, and Storybook renders all components on the client. | +| [`$env/static/public`](https://kit.svelte.dev/docs/modules#$env-static-public) | ✅ Supported | | +| [`$lib`](https://kit.svelte.dev/docs/modules#$lib) | ✅ Supported | | +| [`$service-worker`](https://kit.svelte.dev/docs/modules#$service-worker) | ⛔ Not supported | They are only meant to be used in service workers | +| [`@sveltejs/kit/*`](https://kit.svelte.dev/docs/modules#sveltejs-kit) | ✅ Supported | | + +This is just the beginning. We're close to adding basic support for many of the SvelteKit features. Longer term we're planning on making it an even better experience to [build](https://storybook.js.org/docs/7.0/react/writing-stories/introduction), [test](https://storybook.js.org/docs/7.0/react/writing-tests/introduction) and [document](https://storybook.js.org/docs/7.0/react/writing-docs/introduction) all the SvelteKit goodies like [pages](https://kit.svelte.dev/docs/routing), [forms](https://kit.svelte.dev/docs/form-actions) and [layouts](https://kit.svelte.dev/docs/routing#layout) in Storybook, while still integrating with all the addons and workflows you know and love. + +## Requirements + +- [SvelteKit](https://kit.svelte.dev/) >= 1.0.0 (not including beta versions) +- [Storybook](https://storybook.js.org/) >= 7.x + +## Getting Started + +### In a project without Storybook + +Run the following command in your SvelteKit project's root directory, and follow the prompts: + +```bash +npx storybook@next init +``` + +[More on getting started with Storybook](https://storybook.js.org/docs/7.0/svelte/get-started/install) + +### In a project with Storybook + +This framework is designed to work with Storybook 7. If you’re not already using v7, upgrade with this command: + +```bash +npx storybook@next upgrade --prerelease +``` + +#### Automatic migration + +When running the `upgrade` command above you should get a prompt asking you to migrate to `@storybook/sveltekit`, which should handle everything for you. In some cases it can't migrate for you, eg. if your existing Storybook setup is based on Webpack. In such cases, refer to the manual migration below. + +Storybook 7.0 automatically loads your Vite config, and by extension your Svelte config. If you had a `svelteOptions` property in `.storybook/main.cjs` the automigration will have removed it, as it is no longer supported. + +#### Manual migration + +Install the framework: + +```bash +yarn add -D @storybook/sveltekit@next +``` + +Update your `main.cjs` to change the framework property: + +```js +// .storybook/main.cjs +module.exports = { + ... + framework: '@storybook/sveltekit', +}; +``` + +Storybook 7.0 automatically loads your Vite config, and by extension your Svelte config. If you have a `svelteOptions` property in `.storybook/main.cjs` you need to remove that. See [Troubleshooting](#error-about-__esbuild_register_import_meta_url__-when-starting-storybook) below. + +Remove any redundant dependencies, if you have them: + +```bash +yarn remove @storybook/svelte-vite +yarn remove @storybook/svelte-webpack5 +yarn remove storybook-builder-vite +yarn remove @storybook/builder-vite +``` + +## Troubleshooting + +### Error: `ERR! SyntaxError: Identifier '__esbuild_register_import_meta_url__' has already been declared` when starting Storybook + +> When starting Storybook after upgrading to v7.0, it breaks with the following error: +> +> ``` +> ERR! SyntaxError: Identifier '__esbuild_register_import_meta_url__' has already been declared +> ``` + +You'll get this error when manually upgrading from 6.5 to 7.0. You need to remove the `svelteOptions` property in `.storybook/main.cjs`, as that is not supported by Storybook 7.0 + SvelteKit. The property is also not necessary anymore because the Vite and Svelte configurations are loaded automatically in Storybook 7.0. + +### Error: `Cannot read properties of undefined (reading 'disable_scroll_handling')` in preview + +> Some stories don't load, instead they show the following error in the preview: +> +> ``` +> Cannot read properties of undefined (reading 'disable_scroll_handling') +> ``` + +You'll experience this if anything in your story is importing from `$app/forms` or `$app/navigation`, which is currently not supported. To get around this, separate your component into a shallow parent component that imports what's needed and passes it to a child component via props. This way you can write stories for your child component and mock any of the necessary modules by passing props in. + +## Acknowledgements + +Integrating with SvelteKit would not have been possible if it weren't for the fantastic efforts by the Svelte core team - especially [Ben McCann](https://twitter.com/benjaminmccann) - to make integrations with the wider ecosystem possible. diff --git a/code/frameworks/sveltekit/jest.config.js b/code/frameworks/sveltekit/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/sveltekit/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/sveltekit/package.json b/code/frameworks/sveltekit/package.json new file mode 100644 index 000000000000..d200b396342e --- /dev/null +++ b/code/frameworks/sveltekit/package.json @@ -0,0 +1,80 @@ +{ + "name": "@storybook/sveltekit", + "version": "7.0.0-beta.25", + "description": "Storybook for SvelteKit", + "keywords": [ + "storybook", + "svelte", + "sveltekit", + "svelte-kit" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/next/code/frameworks/sveltekit", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "code/frameworks/sveltekit" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-vite": "7.0.0-beta.25", + "@storybook/svelte": "7.0.0-beta.25", + "@storybook/svelte-vite": "7.0.0-beta.25" + }, + "devDependencies": { + "@types/node": "^16.0.0", + "typescript": "^4.9.3", + "vite": "^4.0.0" + }, + "peerDependencies": { + "vite": "^4.0.0" + }, + "engines": { + "node": "^14.18 || >=16" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/sveltekit/preset.js b/code/frameworks/sveltekit/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/sveltekit/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/sveltekit/src/index.ts b/code/frameworks/sveltekit/src/index.ts new file mode 100644 index 000000000000..1a8d7c1a6e62 --- /dev/null +++ b/code/frameworks/sveltekit/src/index.ts @@ -0,0 +1 @@ +export * from '@storybook/svelte-vite'; diff --git a/code/frameworks/sveltekit/src/preset.ts b/code/frameworks/sveltekit/src/preset.ts new file mode 100644 index 000000000000..4f6a7d602f1d --- /dev/null +++ b/code/frameworks/sveltekit/src/preset.ts @@ -0,0 +1,24 @@ +import { type StorybookConfig } from '@storybook/svelte-vite'; +// @ts-expect-error -- TS picks up the type from preset.js instead of dist/preset.d.ts +import { viteFinal as svelteViteFinal } from '@storybook/svelte-vite/preset'; +import { withoutVitePlugins } from '@storybook/builder-vite'; + +export const core: StorybookConfig['core'] = { + builder: '@storybook/builder-vite', + renderer: '@storybook/svelte', +}; + +export const viteFinal: NonNullable = async (config, options) => { + const baseConfig = await svelteViteFinal(config, options); + + let { plugins = [] } = baseConfig; + + // Remove vite-plugin-svelte-kit from plugins if using SvelteKit + // see https://github.com/storybookjs/storybook/issues/19280#issuecomment-1281204341 + plugins = await withoutVitePlugins(plugins, [ + // @sveltejs/kit@1.0.0-next.587 and later + 'vite-plugin-sveltekit-compile', + ]); + + return { ...baseConfig, plugins }; +}; diff --git a/code/frameworks/sveltekit/tsconfig.json b/code/frameworks/sveltekit/tsconfig.json new file mode 100644 index 000000000000..13e04352a3c7 --- /dev/null +++ b/code/frameworks/sveltekit/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["node"], + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/vue-vite/README.md b/code/frameworks/vue-vite/README.md new file mode 100644 index 000000000000..60aad7efd48e --- /dev/null +++ b/code/frameworks/vue-vite/README.md @@ -0,0 +1,48 @@ +# Storybook for Vue and Vite + +Storybook for Vue is a UI development environment for your Vue components. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-vue-app +npx storybook init +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +## Starter Storybook-for-Vue Boilerplate project with [Vuetify](https://github.com/vuetifyjs/vuetify) Material Component Framework + + + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/vue/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. + +## Vue Notes + +- When using global custom components or extensions (e.g., `Vue.use`). You will need to declare those in the `./storybook/preview.js`. + +## Known Limitations + +In Storybook story and decorator components, you can not access the Vue instance +in factory functions for default prop values: + +```js +{ + props: { + foo: { + default() { + return this.bar; // does not work! + } + } + } +} +``` diff --git a/code/frameworks/vue-vite/jest.config.js b/code/frameworks/vue-vite/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/vue-vite/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/vue-vite/package.json b/code/frameworks/vue-vite/package.json new file mode 100644 index 000000000000..e5facdac0098 --- /dev/null +++ b/code/frameworks/vue-vite/package.json @@ -0,0 +1,83 @@ +{ + "name": "@storybook/vue-vite", + "version": "7.0.0-beta.25", + "description": "Storybook for Vue2 and Vite: Develop Vue2 Components in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/vue-vite", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/vue-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-vite": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/core-server": "7.0.0-beta.25", + "@storybook/vue": "7.0.0-beta.25", + "magic-string": "^0.26.1", + "vue-docgen-api": "^4.40.0" + }, + "devDependencies": { + "typescript": "~4.9.3", + "vite": "^4.0.0", + "vue": "^2.7.10" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "vite": "^3.0.0 || ^4.0.0", + "vue": "^2.7.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/vue-vite/preset.js b/code/frameworks/vue-vite/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/vue-vite/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/vue-vite/src/index.ts b/code/frameworks/vue-vite/src/index.ts new file mode 100644 index 000000000000..d3ded0cdbbb9 --- /dev/null +++ b/code/frameworks/vue-vite/src/index.ts @@ -0,0 +1 @@ +export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/vue-vite/src/plugins/vue-docgen.ts b/code/frameworks/vue-vite/src/plugins/vue-docgen.ts new file mode 100644 index 000000000000..e80ca52d60c2 --- /dev/null +++ b/code/frameworks/vue-vite/src/plugins/vue-docgen.ts @@ -0,0 +1,27 @@ +import { parse } from 'vue-docgen-api'; +import type { PluginOption } from 'vite'; +import { createFilter } from 'vite'; +import MagicString from 'magic-string'; + +export function vueDocgen(): PluginOption { + const include = /\.(vue)$/; + const filter = createFilter(include); + + return { + name: 'storybook:vue2-docgen-plugin', + + async transform(src: string, id: string) { + if (!filter(id)) return undefined; + + const metaData = await parse(id); + const metaSource = JSON.stringify(metaData); + const s = new MagicString(src); + s.append(`;__component__.exports.__docgenInfo = ${metaSource}`); + + return { + code: s.toString(), + map: s.generateMap({ hires: true, source: id }), + }; + }, + }; +} diff --git a/code/frameworks/vue-vite/src/preset.ts b/code/frameworks/vue-vite/src/preset.ts new file mode 100644 index 000000000000..0460bac09d69 --- /dev/null +++ b/code/frameworks/vue-vite/src/preset.ts @@ -0,0 +1,43 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from '@storybook/builder-vite'; +import { vueDocgen } from './plugins/vue-docgen'; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-vite', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework?.options.builder || {}, + }, + renderer: '@storybook/vue', + }; +}; + +export const typescript: PresetProperty<'typescript', StorybookConfig> = async (config) => ({ + ...config, + skipBabel: true, +}); + +export const viteFinal: StorybookConfig['viteFinal'] = async (config, { presets }) => { + const { plugins = [] } = config; + + plugins.push(vueDocgen()); + + const updated = { + ...config, + plugins, + resolve: { + ...config.resolve, + alias: { + ...config.resolve?.alias, + vue: 'vue/dist/vue.esm.js', + }, + }, + }; + return updated; +}; diff --git a/code/frameworks/vue-vite/tsconfig.json b/code/frameworks/vue-vite/tsconfig.json new file mode 100644 index 000000000000..1405a8fbb5a6 --- /dev/null +++ b/code/frameworks/vue-vite/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/vue-webpack5/README.md b/code/frameworks/vue-webpack5/README.md new file mode 100644 index 000000000000..e9ddd06ffa95 --- /dev/null +++ b/code/frameworks/vue-webpack5/README.md @@ -0,0 +1,48 @@ +# Storybook for Vue + +Storybook for Vue is a UI development environment for your Vue components. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-vue-app +npx storybook init +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +## Starter Storybook-for-Vue Boilerplate project with [Vuetify](https://github.com/vuetifyjs/vuetify) Material Component Framework + + + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/vue/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. + +## Vue Notes + +- When using global custom components or extensions (e.g., `Vue.use`). You will need to declare those in the `./storybook/preview.js`. + +## Known Limitations + +In Storybook story and decorator components, you can not access the Vue instance +in factory functions for default prop values: + +```js +{ + props: { + foo: { + default() { + return this.bar; // does not work! + } + } + } +} +``` diff --git a/code/frameworks/vue-webpack5/jest.config.js b/code/frameworks/vue-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/vue-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/vue-webpack5/package.json b/code/frameworks/vue-webpack5/package.json new file mode 100644 index 000000000000..398130db9dcd --- /dev/null +++ b/code/frameworks/vue-webpack5/package.json @@ -0,0 +1,87 @@ +{ + "name": "@storybook/vue-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/vue-webpack5", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/vue-webpack5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/preset-vue-webpack": "7.0.0-beta.25", + "@storybook/vue": "7.0.0-beta.25", + "@types/node": "^16.0.0" + }, + "devDependencies": { + "typescript": "~4.9.3", + "vue": "^2.6.12", + "vue-loader": "^15.7.0", + "vue-template-compiler": "^2.6.14" + }, + "peerDependencies": { + "@babel/core": "*", + "babel-loader": "^7.0.0 || ^8.0.0 || ^9.0.0", + "css-loader": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "vue": "^2.6.8", + "vue-loader": "^15.7.0", + "vue-template-compiler": "^2.6.8" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/vue-webpack5/preset.js b/code/frameworks/vue-webpack5/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/vue-webpack5/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/vue-webpack5/src/index.ts b/code/frameworks/vue-webpack5/src/index.ts new file mode 100644 index 000000000000..fcb073fefcd6 --- /dev/null +++ b/code/frameworks/vue-webpack5/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/code/frameworks/vue-webpack5/src/preset.ts b/code/frameworks/vue-webpack5/src/preset.ts new file mode 100644 index 000000000000..929f2ffba93b --- /dev/null +++ b/code/frameworks/vue-webpack5/src/preset.ts @@ -0,0 +1,27 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + path.dirname(require.resolve(path.join('@storybook/preset-vue-webpack', 'package.json'))), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + renderer: path.dirname(require.resolve(path.join('@storybook/vue', 'package.json'))), + }; +}; + +export const typescript: PresetProperty<'typescript', StorybookConfig> = async (config) => ({ + ...config, + skipBabel: true, +}); diff --git a/code/frameworks/vue-webpack5/src/types.ts b/code/frameworks/vue-webpack5/src/types.ts new file mode 100644 index 000000000000..7a1c993d8791 --- /dev/null +++ b/code/frameworks/vue-webpack5/src/types.ts @@ -0,0 +1,45 @@ +import type { + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/preset-vue-webpack'; +import type { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/vue-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/vue-webpack5/src/typings.d.ts b/code/frameworks/vue-webpack5/src/typings.d.ts new file mode 100644 index 000000000000..45d6411e8736 --- /dev/null +++ b/code/frameworks/vue-webpack5/src/typings.d.ts @@ -0,0 +1 @@ +declare module 'vue-loader/lib/plugin'; diff --git a/code/frameworks/vue-webpack5/tsconfig.json b/code/frameworks/vue-webpack5/tsconfig.json new file mode 100644 index 000000000000..1405a8fbb5a6 --- /dev/null +++ b/code/frameworks/vue-webpack5/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "skipLibCheck": true, + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/vue3-vite/README.md b/code/frameworks/vue3-vite/README.md new file mode 100644 index 000000000000..e8a35450aec9 --- /dev/null +++ b/code/frameworks/vue3-vite/README.md @@ -0,0 +1 @@ +# Storybook for React diff --git a/code/frameworks/vue3-vite/jest.config.js b/code/frameworks/vue3-vite/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/vue3-vite/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/vue3-vite/package.json b/code/frameworks/vue3-vite/package.json new file mode 100644 index 000000000000..a7a628bfd800 --- /dev/null +++ b/code/frameworks/vue3-vite/package.json @@ -0,0 +1,87 @@ +{ + "name": "@storybook/vue3-vite", + "version": "7.0.0-beta.25", + "description": "Storybook for Vue3 and Vite: Develop Vue3 components in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/vue3-vite", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/vue3-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-vite": "7.0.0-beta.25", + "@storybook/core-server": "7.0.0-beta.25", + "@storybook/vue3": "7.0.0-beta.25", + "magic-string": "^0.26.1", + "vue-docgen-api": "^4.40.0" + }, + "devDependencies": { + "@types/node": "^16.0.0", + "@vitejs/plugin-vue": "^4.0.0", + "typescript": "~4.9.3", + "vite": "^4.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "vite": "^3.0.0 || ^4.0.0" + }, + "engines": { + "node": "^14.18 || >=16" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "externals": [ + "util", + "tty", + "path" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/vue3-vite/preset.js b/code/frameworks/vue3-vite/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/vue3-vite/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/vue3-vite/src/index.ts b/code/frameworks/vue3-vite/src/index.ts new file mode 100644 index 000000000000..d3ded0cdbbb9 --- /dev/null +++ b/code/frameworks/vue3-vite/src/index.ts @@ -0,0 +1 @@ +export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/vue3-vite/src/plugins/vue-docgen.ts b/code/frameworks/vue3-vite/src/plugins/vue-docgen.ts new file mode 100644 index 000000000000..6bed6a1fed98 --- /dev/null +++ b/code/frameworks/vue3-vite/src/plugins/vue-docgen.ts @@ -0,0 +1,27 @@ +import { parse } from 'vue-docgen-api'; +import type { PluginOption } from 'vite'; +import { createFilter } from 'vite'; +import MagicString from 'magic-string'; + +export function vueDocgen(): PluginOption { + const include = /\.(vue)$/; + const filter = createFilter(include); + + return { + name: 'storybook:vue-docgen-plugin', + + async transform(src: string, id: string) { + if (!filter(id)) return undefined; + + const metaData = await parse(id); + const metaSource = JSON.stringify(metaData); + const s = new MagicString(src); + s.append(`;_sfc_main.__docgenInfo = ${metaSource}`); + + return { + code: s.toString(), + map: s.generateMap({ hires: true, source: id }), + }; + }, + }; +} diff --git a/code/frameworks/vue3-vite/src/preset.ts b/code/frameworks/vue3-vite/src/preset.ts new file mode 100644 index 000000000000..b4ea232db708 --- /dev/null +++ b/code/frameworks/vue3-vite/src/preset.ts @@ -0,0 +1,34 @@ +import type { StorybookConfig } from '@storybook/builder-vite'; +import { hasVitePlugins } from '@storybook/builder-vite'; +import { vueDocgen } from './plugins/vue-docgen'; + +export const core: StorybookConfig['core'] = { + builder: '@storybook/builder-vite', + renderer: '@storybook/vue3', +}; + +export const viteFinal: StorybookConfig['viteFinal'] = async (config, { presets }) => { + const { plugins = [] } = config; + + // Add vue plugin if not present + if (!(await hasVitePlugins(plugins, ['vite:vue']))) { + const { default: vue } = await import('@vitejs/plugin-vue'); + plugins.push(vue()); + } + + // Add docgen plugin + plugins.push(vueDocgen()); + + const updated = { + ...config, + plugins, + resolve: { + ...config.resolve, + alias: { + ...config.resolve?.alias, + vue: 'vue/dist/vue.esm-bundler.js', + }, + }, + }; + return updated; +}; diff --git a/code/frameworks/vue3-vite/tsconfig.json b/code/frameworks/vue3-vite/tsconfig.json new file mode 100644 index 000000000000..3ce879217eb5 --- /dev/null +++ b/code/frameworks/vue3-vite/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["node"], + "skipLibCheck": true, + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/vue3-webpack5/README.md b/code/frameworks/vue3-webpack5/README.md new file mode 100644 index 000000000000..8ce5b4dafb8d --- /dev/null +++ b/code/frameworks/vue3-webpack5/README.md @@ -0,0 +1,43 @@ +# Storybook for Vue 3 + +Storybook for Vue 3 is a UI development environment for your Vue 3 components. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-vue3-app +npx storybook init +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/vue/sharing/publish-storybook) of your Storybook and deploy it anywhere you want. + +## Extending the Vue application + +Storybook creates a [Vue 3 application](https://v3.vuejs.org/api/application-api.html#application-api) for your component preview which can be imported as `import { app } from '@storybook/vue3'`. + +When using global custom components (`app.component`), directives (`app.directive`), extensions (`app.use`), or other application methods, you will need to configure those in the `./storybook/preview.js` file. + +For example: + +```js +// .storybook/preview.js + +import { app } from '@storybook/vue3'; + +app.use(MyPlugin); +app.component('my-component', MyComponent); +app.mixin({ + /* My mixin */ +}); +``` diff --git a/code/frameworks/vue3-webpack5/jest.config.js b/code/frameworks/vue3-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/vue3-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/vue3-webpack5/package.json b/code/frameworks/vue3-webpack5/package.json new file mode 100644 index 000000000000..13313637c04d --- /dev/null +++ b/code/frameworks/vue3-webpack5/package.json @@ -0,0 +1,84 @@ +{ + "name": "@storybook/vue3-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook for Vue 3: Develop Vue 3 Components in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/vue3-webpack5", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/vue3-webpack5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/preset-vue3-webpack": "7.0.0-beta.25", + "@storybook/vue3": "7.0.0-beta.25", + "@types/node": "^16.0.0" + }, + "devDependencies": { + "@vue/compiler-sfc": "3.0.0", + "typescript": "~4.9.3", + "vue": "3.0.0" + }, + "peerDependencies": { + "@babel/core": "*", + "@vue/compiler-sfc": "^3.0.0", + "babel-loader": "^7.0.0 || ^8.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", + "vue": "^3.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/vue3-webpack5/preset.js b/code/frameworks/vue3-webpack5/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/vue3-webpack5/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/vue3-webpack5/src/index.ts b/code/frameworks/vue3-webpack5/src/index.ts new file mode 100644 index 000000000000..fcb073fefcd6 --- /dev/null +++ b/code/frameworks/vue3-webpack5/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/code/frameworks/vue3-webpack5/src/preset.ts b/code/frameworks/vue3-webpack5/src/preset.ts new file mode 100644 index 000000000000..2173330e2705 --- /dev/null +++ b/code/frameworks/vue3-webpack5/src/preset.ts @@ -0,0 +1,27 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + path.dirname(require.resolve(path.join('@storybook/preset-vue3-webpack', 'package.json'))), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + renderer: path.dirname(require.resolve(path.join('@storybook/vue3', 'package.json'))), + }; +}; + +export const typescript: PresetProperty<'typescript', StorybookConfig> = async (config) => ({ + ...config, + skipBabel: true, +}); diff --git a/code/frameworks/vue3-webpack5/src/types.ts b/code/frameworks/vue3-webpack5/src/types.ts new file mode 100644 index 000000000000..bdae08526600 --- /dev/null +++ b/code/frameworks/vue3-webpack5/src/types.ts @@ -0,0 +1,45 @@ +import type { + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsReact, +} from '@storybook/preset-vue3-webpack'; +import type { + StorybookConfigWebpack, + BuilderOptions, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/vue3-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/vue3-webpack5/src/typings.d.ts b/code/frameworks/vue3-webpack5/src/typings.d.ts new file mode 100644 index 000000000000..a045728260a0 --- /dev/null +++ b/code/frameworks/vue3-webpack5/src/typings.d.ts @@ -0,0 +1,3 @@ +declare module 'vue-loader' { + export const VueLoaderPlugin: any; +} diff --git a/code/frameworks/vue3-webpack5/tsconfig.json b/code/frameworks/vue3-webpack5/tsconfig.json new file mode 100644 index 000000000000..863d7c2de0d2 --- /dev/null +++ b/code/frameworks/vue3-webpack5/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "resolveJsonModule": true, + "skipLibCheck": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/web-components-vite/README.md b/code/frameworks/web-components-vite/README.md new file mode 100644 index 000000000000..9c68eca98041 --- /dev/null +++ b/code/frameworks/web-components-vite/README.md @@ -0,0 +1 @@ +# Storybook for Web components diff --git a/code/frameworks/web-components-vite/jest.config.js b/code/frameworks/web-components-vite/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/web-components-vite/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/web-components-vite/package.json b/code/frameworks/web-components-vite/package.json new file mode 100644 index 000000000000..8bac03c58d01 --- /dev/null +++ b/code/frameworks/web-components-vite/package.json @@ -0,0 +1,79 @@ +{ + "name": "@storybook/web-components-vite", + "version": "7.0.0-beta.25", + "description": "Storybook for web-components and Vite: Develop Web Components in isolation with Hot Reloading.", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/web-components-vite", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/web-components-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/builder-vite": "7.0.0-beta.25", + "@storybook/core-server": "7.0.0-beta.25", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/web-components": "7.0.0-beta.25", + "magic-string": "^0.26.1" + }, + "devDependencies": { + "@types/node": "^16.0.0", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "engines": { + "node": "^14.18 || >=16" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/web-components-vite/preset.js b/code/frameworks/web-components-vite/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/web-components-vite/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/web-components-vite/src/index.ts b/code/frameworks/web-components-vite/src/index.ts new file mode 100644 index 000000000000..d3ded0cdbbb9 --- /dev/null +++ b/code/frameworks/web-components-vite/src/index.ts @@ -0,0 +1 @@ +export type { StorybookConfig } from '@storybook/builder-vite'; diff --git a/code/frameworks/web-components-vite/src/preset.ts b/code/frameworks/web-components-vite/src/preset.ts new file mode 100644 index 000000000000..497a597ec2af --- /dev/null +++ b/code/frameworks/web-components-vite/src/preset.ts @@ -0,0 +1,6 @@ +import type { StorybookConfig } from '@storybook/builder-vite'; + +export const core: StorybookConfig['core'] = { + builder: '@storybook/builder-vite', + renderer: '@storybook/web-components', +}; diff --git a/code/frameworks/web-components-vite/tsconfig.json b/code/frameworks/web-components-vite/tsconfig.json new file mode 100644 index 000000000000..13e04352a3c7 --- /dev/null +++ b/code/frameworks/web-components-vite/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "./src", + "types": ["node"], + "resolveJsonModule": true + }, + "include": ["src/**/*"] +} diff --git a/code/frameworks/web-components-webpack5/README.md b/code/frameworks/web-components-webpack5/README.md new file mode 100644 index 000000000000..2239de4e631d --- /dev/null +++ b/code/frameworks/web-components-webpack5/README.md @@ -0,0 +1,71 @@ +# Storybook for web-components + +--- + +Storybook for web-components is a UI development environment for your plain web-component snippets. +With it, you can visualize different states of your UI components and develop them interactively. + +![Storybook Screenshot](https://github.com/storybookjs/storybook/blob/main/media/storybook-intro.gif) + +Storybook runs outside of your app. +So you can develop UI components in isolation without worrying about app specific dependencies and requirements. + +## Getting Started + +```sh +cd my-app +npx storybook init -t web_components +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +--- + +Storybook also comes with a lot of [addons](https://storybook.js.org/addons) and a great API to customize as you wish. +You can also build a [static version](https://storybook.js.org/docs/web-components/sharing/publish-storybook) of your storybook and deploy it anywhere you want. + +# Hot Module Reloading (HMR) + +As web components register on a global registry which only accepts a certain name/class once it can lead to errors when using classical HMR. There are ideas on how to archive HMR with a static registry but there is no proven solution yet. Therefore the best approach for now is to do full page reloads. If you keep your stories to specific states of components (which we would recommend anyways) this usually means it is fast. + +# Setup es6/7 dependencies + +By default storybook only works with precompiled ES5 code but as most web components themselves and their libs are distributed as ES2017 you will need to manually mark those packages as "needs transpilation". + +For example if you have a library called `my-library` which is in ES2017 then you can add it like so + +```js +// .storybook/main.js + +module.exports = { + webpackFinal: async (config) => { + // find web-components rule for extra transpilation + const webComponentsRule = config.module.rules.find( + (rule) => rule.use && rule.use.options && rule.use.options.babelrc === false + ); + // add your own `my-library` + webComponentsRule.test.push(new RegExp(`node_modules(\\/|\\\\)my-library(.*)\\.js$`)); + + return config; + }, +}; +``` + +By default the following folders are included + +- `src/*.js` +- `packages/*/src/*.js` +- `node_modules/lit-html/*.js` +- `node_modules/lit-element/*.js` +- `node_modules/@open-wc/*.js` +- `node_modules/@polymer/*.js` +- `node_modules/@vaadin/*.js` + +As you can see the `src` folder is also included. +The reason for that is as it has some extra configuration to allow for example `import.meta`. +If you use a different folder you will need to make sure webpack/babel can handle it. + +# FAQ + +- While working on my component I get the error `Failed to execute 'define' on 'CustomElementRegistry': the name "..." has already been used with this registry` + => please see Setup page reload via HMR diff --git a/code/frameworks/web-components-webpack5/jest.config.js b/code/frameworks/web-components-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/frameworks/web-components-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/frameworks/web-components-webpack5/package.json b/code/frameworks/web-components-webpack5/package.json new file mode 100644 index 000000000000..bbec1f64311b --- /dev/null +++ b/code/frameworks/web-components-webpack5/package.json @@ -0,0 +1,83 @@ +{ + "name": "@storybook/web-components-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook for web-components: View web components snippets in isolation with Hot Reloading.", + "keywords": [ + "lit-html", + "storybook", + "web-components" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/frameworks/web-components-webpack5", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "frameworks/web-components-webpack5" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./preset": { + "require": "./dist/preset.js", + "import": "./dist/preset.mjs", + "types": "./dist/preset.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@babel/preset-env": "^7.20.2", + "@storybook/builder-webpack5": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/preset-web-components-webpack": "7.0.0-beta.25", + "@storybook/web-components": "7.0.0-beta.25", + "@types/node": "^16.0.0" + }, + "devDependencies": { + "lit-html": "2.0.2", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "lit-html": "^1.4.1 || ^2.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/frameworks/web-components-webpack5/preset.js b/code/frameworks/web-components-webpack5/preset.js new file mode 100644 index 000000000000..a83f95279e7f --- /dev/null +++ b/code/frameworks/web-components-webpack5/preset.js @@ -0,0 +1 @@ +module.exports = require('./dist/preset'); diff --git a/code/frameworks/web-components-webpack5/src/index.ts b/code/frameworks/web-components-webpack5/src/index.ts new file mode 100644 index 000000000000..fcb073fefcd6 --- /dev/null +++ b/code/frameworks/web-components-webpack5/src/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/code/frameworks/web-components-webpack5/src/preset.ts b/code/frameworks/web-components-webpack5/src/preset.ts new file mode 100644 index 000000000000..338405302815 --- /dev/null +++ b/code/frameworks/web-components-webpack5/src/preset.ts @@ -0,0 +1,24 @@ +import path from 'path'; +import type { PresetProperty } from '@storybook/types'; +import type { StorybookConfig } from './types'; + +export const addons: PresetProperty<'addons', StorybookConfig> = [ + path.dirname( + require.resolve(path.join('@storybook/preset-web-components-webpack', 'package.json')) + ), +]; + +export const core: PresetProperty<'core', StorybookConfig> = async (config, options) => { + const framework = await options.presets.apply('framework'); + + return { + ...config, + builder: { + name: path.dirname( + require.resolve(path.join('@storybook/builder-webpack5', 'package.json')) + ) as '@storybook/builder-webpack5', + options: typeof framework === 'string' ? {} : framework.options.builder || {}, + }, + renderer: path.dirname(require.resolve(path.join('@storybook/web-components', 'package.json'))), + }; +}; diff --git a/code/frameworks/web-components-webpack5/src/types.ts b/code/frameworks/web-components-webpack5/src/types.ts new file mode 100644 index 000000000000..d39175fa711f --- /dev/null +++ b/code/frameworks/web-components-webpack5/src/types.ts @@ -0,0 +1,45 @@ +import type { + StorybookConfig as StorybookConfigBase, + TypescriptOptions as TypescriptOptionsWebComponents, +} from '@storybook/preset-web-components-webpack'; +import type { + BuilderOptions, + StorybookConfigWebpack, + TypescriptOptions as TypescriptOptionsBuilder, +} from '@storybook/builder-webpack5'; + +type FrameworkName = '@storybook/react-webpack5'; +type BuilderName = '@storybook/builder-webpack5'; + +export type FrameworkOptions = { + builder?: BuilderOptions; +}; + +type StorybookConfigFramework = { + framework: + | FrameworkName + | { + name: FrameworkName; + options: FrameworkOptions; + }; + core?: StorybookConfigBase['core'] & { + builder?: + | BuilderName + | { + name: BuilderName; + options: BuilderOptions; + }; + }; + typescript?: Partial & + StorybookConfigBase['typescript']; +}; + +/** + * The interface for Storybook configuration in `main.ts` files. + */ +export type StorybookConfig = Omit< + StorybookConfigBase, + keyof StorybookConfigWebpack | keyof StorybookConfigFramework +> & + StorybookConfigWebpack & + StorybookConfigFramework; diff --git a/code/frameworks/web-components-webpack5/src/typings.d.ts b/code/frameworks/web-components-webpack5/src/typings.d.ts new file mode 100644 index 000000000000..cbeccdbb15f7 --- /dev/null +++ b/code/frameworks/web-components-webpack5/src/typings.d.ts @@ -0,0 +1,2 @@ +// will be provided by the webpack define plugin +declare var NODE_ENV: string | undefined; diff --git a/code/frameworks/web-components-webpack5/tsconfig.json b/code/frameworks/web-components-webpack5/tsconfig.json new file mode 100644 index 000000000000..a4429176e35f --- /dev/null +++ b/code/frameworks/web-components-webpack5/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true + }, + "include": ["src/**/*"] +} diff --git a/code/jest.config.base.js b/code/jest.config.base.js new file mode 100644 index 000000000000..d268f949c710 --- /dev/null +++ b/code/jest.config.base.js @@ -0,0 +1,80 @@ +const os = require('os'); +const path = require('path'); + +/** + * TODO: Some windows related tasks are still commented out, because they are behaving differently on + * a local Windows machine compared to the Windows Server 2022 machine running in GitHub Actions. + * The main issue is that path.sep is behaving differently on the two machines. Some more investagations + * are necessary! + * */ +const skipOnWindows = [ + 'lib/core-server/src/utils/__tests__/server-statics.test.ts', + 'lib/core-common/src/utils/__tests__/template.test.ts', + 'addons/storyshots-core/src/frameworks/configure.test.ts', + 'lib/core-common/src/utils/__tests__/interpret-files.test.ts', + 'lib/cli/src/helpers.test.ts', +]; + +module.exports = { + cacheDirectory: path.resolve('.cache/jest'), + clearMocks: true, + moduleNameMapper: { + // non-js files + '\\.(jpg|jpeg|png|apng|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': + path.resolve('./__mocks__/fileMock.js'), + '\\.(css|scss|stylesheet)$': path.resolve('./__mocks__/styleMock.js'), + '\\.(md)$': path.resolve('./__mocks__/htmlMock.js'), + }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + '^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx', + }, + transformIgnorePatterns: ['/node_modules/(?!@angular|rxjs|nanoid|uuid|lit-html|@mdx-js)'], + testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], + testPathIgnorePatterns: [ + '/storybook-static/', + '/node_modules/', + '/dist/', + '/prebuilt/', + '/template/', + 'addon-jest.test.js', + // TODO: Can not get svelte-jester to work, but also not necessary for this test, as it is run by tsc/svelte-check. + '/renderers/svelte/src/public-types.test.ts', + '/renderers/vue/src/public-types.test.ts', + '/renderers/vue3/src/public-types.test.ts', + ...(process.platform === 'win32' ? skipOnWindows : []), + ], + coveragePathIgnorePatterns: [ + '/node_modules/', + '/cli/test/', + '/dist/', + '/prebuilt/', + '/generators/', + '/template/', + '/__mocks__ /', + '/__mockdata__/', + '/__mocks-ng-workspace__/', + '/__testfixtures__/', + '^.*\\.stories\\.[jt]sx?$', + 'typings.d.ts$', + ], + globals: { + PREVIEW_URL: undefined, + SNAPSHOT_OS: os.platform() === 'win32' ? 'windows' : 'posix', + }, + snapshotSerializers: ['@emotion/jest/serializer', 'jest-serializer-html'], + testEnvironmentOptions: { + url: 'http://localhost', + }, + modulePathIgnorePatterns: [ + // + '/dist/.*/__mocks__/', + '/storybook-static/', + '/template/', + ], + moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json', 'node'], + snapshotFormat: { + escapeString: true, + printBasicPrototype: true, + }, +}; diff --git a/code/jest.config.browser.js b/code/jest.config.browser.js new file mode 100644 index 000000000000..2e94523b8eff --- /dev/null +++ b/code/jest.config.browser.js @@ -0,0 +1,9 @@ +const path = require('path'); +const baseConfig = require('./jest.config.base'); + +module.exports = { + ...baseConfig, + setupFilesAfterEnv: [path.resolve('./jest.init.browser.ts')], + testEnvironment: 'jest-environment-jsdom', + setupFiles: ['raf/polyfill'], +}; diff --git a/code/jest.config.js b/code/jest.config.js new file mode 100644 index 000000000000..6e72f4acb974 --- /dev/null +++ b/code/jest.config.js @@ -0,0 +1,21 @@ +module.exports = { + projects: [ + '/addons/*', + '/frameworks/!(angular)*', + '/lib/*', + '/renderers/*', + '/ui/!(node_modules)*', + ], + collectCoverage: false, + collectCoverageFrom: [ + 'frameworks/*/src/**/*.{js,jsx,ts,tsx}', + 'lib/*/src/**/*.{js,jsx,ts,tsx}', + 'renderers/*/src/**/*.{js,jsx,ts,tsx}', + 'addons/*/src/**/*.{js,jsx,ts,tsx}', + 'ui/*/src/**/*.{js,jsx,ts,tsx}', + ], + coverageDirectory: 'coverage', + coverageReporters: ['lcov'], + reporters: ['default', 'jest-junit'], + watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], +}; diff --git a/code/jest.config.node.js b/code/jest.config.node.js new file mode 100644 index 000000000000..54acf2670929 --- /dev/null +++ b/code/jest.config.node.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('./jest.config.base'); + +module.exports = { + ...baseConfig, + setupFilesAfterEnv: [path.resolve('./jest.init.base.ts')], +}; diff --git a/code/jest.init.base.ts b/code/jest.init.base.ts new file mode 100644 index 000000000000..682b72bb0397 --- /dev/null +++ b/code/jest.init.base.ts @@ -0,0 +1,49 @@ +import '@testing-library/jest-dom'; + +// setup file +import registerRequireContextHook from '@storybook/babel-plugin-require-context-hook/register'; + +registerRequireContextHook(); + +jest.mock('util-deprecate', () => (fn: any) => fn); + +// mock console.info calls for cleaner test execution +global.console.info = jest.fn().mockImplementation(() => {}); +global.console.debug = jest.fn().mockImplementation(() => {}); + +// mock local storage calls +const localStorageMock = { + getItem: jest.fn().mockName('getItem'), + setItem: jest.fn().mockName('setItem'), + clear: jest.fn().mockName('clear'), +}; +// @ts-expect-error (Converted from ts-ignore) +global.localStorage = localStorageMock; + +/* Fail tests on PropType warnings + This allows us to throw an error in tests environments when there are prop-type warnings. + This should keep the tests free of warnings going forward. + */ + +const ignoreList = [ + (error: any) => error.message.includes('":nth-child" is potentially unsafe'), + (error: any) => error.message.includes('":first-child" is potentially unsafe'), + (error: any) => error.message.includes('Failed prop type') && error.stack.includes('storyshots'), + (error: any) => + error.message.includes('react-async-component-lifecycle-hooks') && + error.stack.includes('addons/knobs/src/components/__tests__/Options.js'), + // Storyshots blows up if your project includes a (non stories.) mdx file. + (error: any) => error.message.match(/Unexpected error while loading .*(? { + const error = new Error(`${type}${message}`); + if (!ignoreList.reduce((acc, item) => acc || item(error), false)) { + throw error; + } +}; +const throwWarning = (message: any) => throwMessage('warn: ', message); +const throwError = (message: any) => throwMessage('error: ', message); + +global.console.error = throwError; +global.console.warn = throwWarning; diff --git a/code/jest.init.browser.ts b/code/jest.init.browser.ts new file mode 100644 index 000000000000..0ad9f9d2e7ac --- /dev/null +++ b/code/jest.init.browser.ts @@ -0,0 +1,48 @@ +import './jest.init.base'; +import EventEmitter from 'events'; +import { webcrypto } from 'node:crypto'; + +// Mock for matchMedia since it's not yet implemented in JSDOM (https://jestjs.io/docs/en/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom) +global.window.matchMedia = jest.fn().mockImplementation((query) => { + return { + matches: false, + media: query, + onchange: null, + addListener: jest.fn(), // deprecated + removeListener: jest.fn(), // deprecated + addEventListener: jest.fn(), + removeEventListener: jest.fn(), + dispatchEvent: jest.fn(), + }; +}); + +class EventSourceMock { + static sources: EventSourceMock[] = []; + + static reset() { + this.sources = []; + } + + emitter: EventEmitter; + + constructor() { + this.emitter = new EventEmitter(); + EventSourceMock.sources.push(this); + } + + addEventListener(event: string, cb: (data: any) => void) { + this.emitter.on(event, cb); + } + + emit(event: string, data: any) { + this.emitter.emit(event, data); + } +} + +global.window.EventSource = EventSourceMock as any; + +Object.defineProperty(window, 'crypto', { + get() { + return webcrypto; + }, +}); diff --git a/lerna.json b/code/lerna.json similarity index 76% rename from lerna.json rename to code/lerna.json index 2281d40b16e7..c2c414f8cb49 100644 --- a/lerna.json +++ b/code/lerna.json @@ -2,5 +2,5 @@ "npmClient": "yarn", "useWorkspaces": true, "registry": "https://registry.npmjs.org", - "version": "6.5.0-rc.1" + "version": "7.0.0-beta.25" } diff --git a/code/lib/addons/README.md b/code/lib/addons/README.md new file mode 100644 index 000000000000..41f81df8a95d --- /dev/null +++ b/code/lib/addons/README.md @@ -0,0 +1,3 @@ +The contents of this package have moved to `@storybook/preview-api` and `@storybook/manager-api`. Please update your import depending on where are using this API. + +This package will no longer be released as part of the 8.0 release of storybook. diff --git a/code/lib/addons/jest.config.js b/code/lib/addons/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/lib/addons/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/addons/package.json b/code/lib/addons/package.json new file mode 100644 index 000000000000..6afd370659d6 --- /dev/null +++ b/code/lib/addons/package.json @@ -0,0 +1,64 @@ +{ + "name": "@storybook/addons", + "version": "7.0.0-beta.25", + "description": "Storybook addons store", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/addons", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/addons" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "sideEffects": false, + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist/**/*", + "template/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/lib/addons/src/index.ts b/code/lib/addons/src/index.ts new file mode 100644 index 000000000000..2dee3d2d2ea4 --- /dev/null +++ b/code/lib/addons/src/index.ts @@ -0,0 +1,26 @@ +import { type Addon_Type, Addon_TypesEnum } from '@storybook/types'; + +export { type Addon_Type as Addon, Addon_TypesEnum as types }; + +export { addons, type AddonStore, mockChannel } from '@storybook/manager-api'; + +export { + type EventMap, + HooksContext, + type Listener, + type MakeDecoratorOptions, + type MakeDecoratorResult, + applyHooks, + makeDecorator, + useArgs, + useCallback, + useChannel, + useEffect, + useGlobals, + useMemo, + useParameter, + useReducer, + useRef, + useState, + useStoryContext, +} from '@storybook/preview-api/dist/addons'; diff --git a/code/lib/addons/tsconfig.json b/code/lib/addons/tsconfig.json new file mode 100644 index 000000000000..52d43eaaa9b9 --- /dev/null +++ b/code/lib/addons/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/code/lib/builder-manager/README.md b/code/lib/builder-manager/README.md new file mode 100644 index 000000000000..54e0611cb703 --- /dev/null +++ b/code/lib/builder-manager/README.md @@ -0,0 +1,12 @@ +# Manager-Builder + +> NOTE: Do not use this package unless you know what you are doing. + +This package is used internally by Storybook to create the manager side (UI) of Storybook. + +This package uses `esbuild` to bundle the manager-side of addons, and prepare it for modern, ESM supporting browsers. + +Each addon is bundled into a separate file, and the manager is responsible for loading them. +If a `manager.*` file exists in the config dir (e.g. `.storybook`), it's also bundled, and loaded in the browser. + +Additionally, this package also will add the manager ui via the `@storybook/ui` package, which is already built by `esbuild` in our build process before publishing. diff --git a/code/lib/builder-manager/jest.config.js b/code/lib/builder-manager/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/lib/builder-manager/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/builder-manager/package.json b/code/lib/builder-manager/package.json new file mode 100644 index 000000000000..276cab4035c6 --- /dev/null +++ b/code/lib/builder-manager/package.json @@ -0,0 +1,77 @@ +{ + "name": "@storybook/builder-manager", + "version": "7.0.0-beta.25", + "description": "Storybook manager builder", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/core", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/builder-manager" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "templates/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@fal-works/esbuild-plugin-global-externals": "^2.1.2", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/manager": "7.0.0-beta.25", + "@storybook/node-logger": "7.0.0-beta.25", + "@types/ejs": "^3.1.1", + "@types/find-cache-dir": "^3.2.1", + "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.10", + "browser-assert": "^1.2.1", + "ejs": "^3.1.8", + "esbuild": "^0.16.4", + "esbuild-plugin-alias": "^0.2.1", + "express": "^4.17.3", + "find-cache-dir": "^3.0.0", + "fs-extra": "^9.0.1", + "process": "^0.11.10", + "slash": "^3.0.0", + "util": "^0.12.4" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/lib/builder-manager/src/index.ts b/code/lib/builder-manager/src/index.ts new file mode 100644 index 000000000000..e5fc9ef7e590 --- /dev/null +++ b/code/lib/builder-manager/src/index.ts @@ -0,0 +1,294 @@ +import { dirname, join, parse } from 'path'; +import fs from 'fs-extra'; +import express from 'express'; + +import { logger } from '@storybook/node-logger'; + +import { globalExternals } from '@fal-works/esbuild-plugin-global-externals'; +import { pnpPlugin } from '@yarnpkg/esbuild-plugin-pnp'; +import aliasPlugin from 'esbuild-plugin-alias'; + +import { getTemplatePath, renderHTML } from './utils/template'; +import { definitions } from './utils/globals'; +import { wrapManagerEntries } from './utils/managerEntries'; +import type { + BuilderBuildResult, + BuilderFunction, + BuilderStartOptions, + BuilderStartResult, + Compilation, + ManagerBuilder, + StarterFunction, +} from './types'; +// eslint-disable-next-line import/no-cycle +import { getData } from './utils/data'; +import { safeResolve } from './utils/safeResolve'; +import { readOrderedFiles } from './utils/files'; + +let compilation: Compilation; +let asyncIterator: ReturnType | ReturnType; + +export const getConfig: ManagerBuilder['getConfig'] = async (options) => { + const [addonsEntryPoints, customManagerEntryPoint, tsconfigPath] = await Promise.all([ + options.presets.apply('managerEntries', []), + safeResolve(join(options.configDir, 'manager')), + getTemplatePath('addon.tsconfig.json'), + ]); + + const entryPoints = customManagerEntryPoint + ? [...addonsEntryPoints, customManagerEntryPoint] + : addonsEntryPoints; + + const realEntryPoints = await wrapManagerEntries(entryPoints); + + return { + entryPoints: realEntryPoints, + outdir: join(options.outputDir || './', 'sb-addons'), + format: 'esm', + write: false, + resolveExtensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx'], + outExtension: { '.js': '.mjs' }, + loader: { + '.js': 'jsx', + '.png': 'dataurl', + '.gif': 'dataurl', + '.jpg': 'dataurl', + '.jpeg': 'dataurl', + '.svg': 'dataurl', + '.webp': 'dataurl', + '.webm': 'dataurl', + }, + target: ['chrome100'], + platform: 'browser', + bundle: true, + minify: true, + sourcemap: true, + conditions: ['browser', 'module', 'default'], + + jsxFactory: 'React.createElement', + jsxFragment: 'React.Fragment', + jsx: 'transform', + jsxImportSource: 'react', + + tsconfig: tsconfigPath, + + legalComments: 'external', + plugins: [ + aliasPlugin({ + process: require.resolve('process/browser.js'), + util: require.resolve('util/util.js'), + assert: require.resolve('browser-assert'), + }), + globalExternals(definitions), + pnpPlugin(), + ], + + banner: { + js: 'try{', + }, + footer: { + js: '}catch(e){ console.error("[Storybook] One of your manager-entries failed: " + import.meta.url, e); }', + }, + + define: { + 'process.env.NODE_ENV': "'production'", + 'process.env': '{}', + global: 'window', + module: '{}', + }, + }; +}; + +export const executor = { + get: async () => { + const { build } = await import('esbuild'); + return build; + }, +}; + +/** + * This function is a generator so that we can abort it mid process + * in case of failure coming from other processes e.g. preview builder + * + * I am sorry for making you read about generators today :') + */ +const starter: StarterFunction = async function* starterGeneratorFn({ + startTime, + options, + router, +}) { + logger.info('=> Starting manager..'); + + const { config, customHead, features, instance, refs, template, title, logLevel, docsOptions } = + await getData(options); + + yield; + + // make sure we clear output directory of addons dir before starting + // this could cause caching issues where addons are loaded when they shouldn't + const addonsDir = config.outdir; + await fs.remove(addonsDir); + + yield; + + compilation = await instance({ + ...config, + watch: true, + }); + + yield; + + const coreDirOrigin = join(dirname(require.resolve('@storybook/manager/package.json')), 'dist'); + + router.use(`/sb-addons`, express.static(addonsDir, { immutable: true, maxAge: '5m' })); + router.use(`/sb-manager`, express.static(coreDirOrigin, { immutable: true, maxAge: '5m' })); + + const { cssFiles, jsFiles } = await readOrderedFiles(addonsDir, compilation?.outputFiles); + + yield; + + const html = await renderHTML( + template, + title, + customHead, + cssFiles, + jsFiles, + features, + refs, + logLevel, + docsOptions, + options + ); + + yield; + + router.use(`/`, ({ path }, res, next) => { + if (path === '/') { + res.status(200).send(html); + } else { + next(); + } + }); + + return { + bail, + stats: { + toJson: () => ({}), + }, + totalTime: process.hrtime(startTime), + } as BuilderStartResult; +}; + +/** + * This function is a generator so that we can abort it mid process + * in case of failure coming from other processes e.g. preview builder + * + * I am sorry for making you read about generators today :') + */ +const builder: BuilderFunction = async function* builderGeneratorFn({ startTime, options }) { + if (!options.outputDir) { + throw new Error('outputDir is required'); + } + logger.info('=> Building manager..'); + const { config, customHead, features, instance, refs, template, title, logLevel, docsOptions } = + await getData(options); + yield; + + const addonsDir = config.outdir; + const coreDirOrigin = join(dirname(require.resolve('@storybook/manager/package.json')), 'dist'); + const coreDirTarget = join(options.outputDir, `sb-manager`); + + compilation = await instance({ + ...config, + + minify: true, + watch: false, + }); + + yield; + + const managerFiles = fs.copy(coreDirOrigin, coreDirTarget, { + filter: (src) => { + const { ext } = parse(src); + if (ext) { + return ext === '.mjs'; + } + return true; + }, + }); + const { cssFiles, jsFiles } = await readOrderedFiles(addonsDir, compilation?.outputFiles); + + yield; + + const html = await renderHTML( + template, + title, + customHead, + cssFiles, + jsFiles, + features, + refs, + logLevel, + docsOptions, + options + ); + + await Promise.all([ + // + fs.writeFile(join(options.outputDir, 'index.html'), html), + managerFiles, + ]); + + logger.trace({ message: '=> Manager built', time: process.hrtime(startTime) }); + + return { + toJson: () => ({}), + } as BuilderBuildResult; +}; + +export const bail: ManagerBuilder['bail'] = async () => { + if (asyncIterator) { + try { + // we tell the builder (that started) to stop ASAP and wait + await asyncIterator.throw(new Error()); + } catch (e) { + // + } + } + + if (compilation && compilation.stop) { + try { + compilation.stop(); + logger.warn('Force closed manager build'); + } catch (err) { + logger.warn('Unable to close manager build!'); + } + } +}; + +export const start = async (options: BuilderStartOptions) => { + asyncIterator = starter(options); + let result; + + do { + // eslint-disable-next-line no-await-in-loop + result = await asyncIterator.next(); + } while (!result.done); + + return result.value; +}; + +export const build = async (options: BuilderStartOptions) => { + asyncIterator = builder(options); + let result; + + do { + // eslint-disable-next-line no-await-in-loop + result = await asyncIterator.next(); + } while (!result.done); + + return result.value; +}; + +export const corePresets: ManagerBuilder['corePresets'] = []; +export const overridePresets: ManagerBuilder['overridePresets'] = []; diff --git a/code/lib/builder-manager/src/types.ts b/code/lib/builder-manager/src/types.ts new file mode 100644 index 000000000000..a3e5634096fb --- /dev/null +++ b/code/lib/builder-manager/src/types.ts @@ -0,0 +1,27 @@ +import type { + Builder, + Builder_WithRequiredProperty, + BuilderStats, + Builder_Unpromise, +} from '@storybook/types'; + +import type { BuildOptions, BuildResult } from 'esbuild'; + +export type ManagerBuilder = Builder< + Builder_WithRequiredProperty & { entryPoints: string[] }, + BuilderStats +>; +export type Compilation = BuildResult; + +export type BuilderStartOptions = Parameters['0']; +export type BuilderStartResult = Builder_Unpromise>; + +export type StarterFunction = ( + options: BuilderStartOptions +) => AsyncGenerator; + +export type BuilderBuildOptions = Parameters['0']; +export type BuilderBuildResult = Builder_Unpromise>; +export type BuilderFunction = ( + options: BuilderBuildOptions +) => AsyncGenerator; diff --git a/code/lib/builder-manager/src/utils/data.ts b/code/lib/builder-manager/src/utils/data.ts new file mode 100644 index 000000000000..4a1da5b5b867 --- /dev/null +++ b/code/lib/builder-manager/src/utils/data.ts @@ -0,0 +1,37 @@ +import { join } from 'path'; +import type { DocsOptions, Options } from '@storybook/types'; +import { getRefs } from '@storybook/core-common'; + +import { readTemplate } from './template'; +// eslint-disable-next-line import/no-cycle +import { executor, getConfig } from '../index'; +import { safeResolve } from './safeResolve'; + +export const getData = async (options: Options) => { + const refs = getRefs(options); + const features = options.presets.apply>('features'); + const logLevel = options.presets.apply('logLevel'); + const title = options.presets.apply('title'); + const docsOptions = options.presets.apply('docs', {}); + const template = readTemplate('template.ejs'); + const customHead = safeResolve(join(options.configDir, 'manager-head.html')); + + // we await these, because crucially if these fail, we want to bail out asap + const [instance, config] = await Promise.all([ + // + executor.get(), + getConfig(options), + ]); + + return { + refs, + features, + title, + docsOptions, + template, + customHead, + instance, + config, + logLevel, + }; +}; diff --git a/code/lib/builder-manager/src/utils/files.test.ts b/code/lib/builder-manager/src/utils/files.test.ts new file mode 100644 index 000000000000..2cdb1f0d4c59 --- /dev/null +++ b/code/lib/builder-manager/src/utils/files.test.ts @@ -0,0 +1,29 @@ +import { platform } from 'os'; +import { sanitizePath } from './files'; + +const os = platform(); +const isWindows = os === 'win32'; + +test('sanitizePath', () => { + const addonsDir = isWindows + ? 'C:\\Users\\username\\Projects\\projectname\\storybook' + : '/Users/username/Projects/projectname/storybook'; + const text = 'demo text'; + const file = { + path: isWindows + ? 'C:\\Users\\username\\Projects\\projectname\\storybook\\node_modules\\@storybook\\addon-x+y\\dist\\manager.mjs' + : '/Users/username/Projects/projectname/storybook/node_modules/@storybook/addon-x+y/dist/manager.mjs', + contents: Uint8Array.from(Array.from(text).map((letter) => letter.charCodeAt(0))), + text, + }; + const { location, url } = sanitizePath(file, addonsDir); + + expect(location).toEqual( + isWindows + ? 'C:\\Users\\username\\Projects\\projectname\\storybook\\node_modules\\@storybook\\addon-x+y\\dist\\manager.mjs' + : '/Users/username/Projects/projectname/storybook/node_modules/@storybook/addon-x+y/dist/manager.mjs' + ); + expect(url).toMatchInlineSnapshot( + `"./sb-addons/node_modules/%40storybook/addon-x%2By/dist/manager.mjs"` + ); +}); diff --git a/code/lib/builder-manager/src/utils/files.ts b/code/lib/builder-manager/src/utils/files.ts new file mode 100644 index 000000000000..bca197dcda9e --- /dev/null +++ b/code/lib/builder-manager/src/utils/files.ts @@ -0,0 +1,33 @@ +import type { OutputFile } from 'esbuild'; +import fs from 'fs-extra'; +import { join, normalize } from 'path'; +import slash from 'slash'; +import type { Compilation } from '../types'; + +export async function readOrderedFiles( + addonsDir: string, + outputFiles: Compilation['outputFiles'] | undefined +) { + const files = await Promise.all( + outputFiles?.map(async (file) => { + // convert deeply nested paths to a single level, also remove special characters + const { location, url } = sanitizePath(file, addonsDir); + + await fs.ensureFile(location); + await fs.writeFile(location, file.contents); + return url; + }) || [] + ); + + const jsFiles = files.filter((file) => file.endsWith('.mjs')); + const cssFiles = files.filter((file) => file.endsWith('.css')); + return { cssFiles, jsFiles }; +} + +export function sanitizePath(file: OutputFile, addonsDir: string) { + const filePath = file.path.replace(addonsDir, ''); + const location = normalize(join(addonsDir, filePath)); + const url = `./sb-addons${slash(filePath).split('/').map(encodeURIComponent).join('/')}`; + + return { location, url }; +} diff --git a/code/lib/builder-manager/src/utils/globals.ts b/code/lib/builder-manager/src/utils/globals.ts new file mode 100644 index 000000000000..08fda5f5a44b --- /dev/null +++ b/code/lib/builder-manager/src/utils/globals.ts @@ -0,0 +1 @@ +export { definitions } from '@storybook/manager/dist/globals'; diff --git a/code/lib/builder-manager/src/utils/managerEntries.ts b/code/lib/builder-manager/src/utils/managerEntries.ts new file mode 100644 index 000000000000..264aa81366fb --- /dev/null +++ b/code/lib/builder-manager/src/utils/managerEntries.ts @@ -0,0 +1,54 @@ +import findCacheDirectory from 'find-cache-dir'; +import fs from 'fs-extra'; +import { join, parse, relative, sep } from 'node:path'; +import slash from 'slash'; + +const sanitizeBase = (path: string) => { + return path.replaceAll('.', '').replaceAll('@', '').replaceAll(sep, '-').replaceAll('/', '-'); +}; + +const sanitizeFinal = (path: string) => { + const sections = path.split(/-?node_modules-?/); + + return sections[sections.length - 1].replaceAll('storybook-addon-', '').replaceAll('dist-', ''); +}; + +/** + * Manager entries should be **self-invoking** bits of code. + * They can of-course import from modules, and ESbuild will bundle all of that into a single file. + * But they should not export anything. However this can't be enforced, so what we do is wrap the given file, in a bit of code like this: + * + * ```js + * import '<>'; + * ``` + * + * That way we are indicating to ESbuild that we do not care about this files exports, and they will be dropped in the bundle. + * + * We do all of that so we can wrap a try-catch around the code. + * That would have been invalid syntax had the export statements been left in place. + * + * We need to wrap each managerEntry with a try-catch because if we do not, a failing managerEntry can stop execution of other managerEntries. + */ +export async function wrapManagerEntries(entrypoints: string[]) { + return Promise.all( + entrypoints.map(async (entry, i) => { + const { name, dir } = parse(entry); + const cacheLocation = findCacheDirectory({ name: 'sb-manager' }); + + if (!cacheLocation) { + throw new Error('Could not create/find cache directory'); + } + + const base = relative(process.cwd(), dir); + const location = join( + cacheLocation, + sanitizeFinal(join(`${sanitizeBase(base)}-${i}`, `${sanitizeBase(name)}-bundle.mjs`)) + ); + + await fs.ensureFile(location); + await fs.writeFile(location, `import '${slash(entry)}';`); + + return location; + }) + ); +} diff --git a/code/lib/builder-manager/src/utils/safeResolve.ts b/code/lib/builder-manager/src/utils/safeResolve.ts new file mode 100644 index 000000000000..b166a22bced4 --- /dev/null +++ b/code/lib/builder-manager/src/utils/safeResolve.ts @@ -0,0 +1,7 @@ +export const safeResolve = (path: string) => { + try { + return Promise.resolve(require.resolve(path)); + } catch (e) { + return Promise.resolve(false as const); + } +}; diff --git a/code/lib/builder-manager/src/utils/template.ts b/code/lib/builder-manager/src/utils/template.ts new file mode 100644 index 000000000000..48d402a9328d --- /dev/null +++ b/code/lib/builder-manager/src/utils/template.ts @@ -0,0 +1,83 @@ +import path, { dirname, join } from 'path'; +import fs from 'fs-extra'; + +import { render } from 'ejs'; + +import type { DocsOptions, Options, Ref } from '@storybook/types'; + +const interpolate = (string: string, data: Record = {}) => + Object.entries(data).reduce((acc, [k, v]) => acc.replace(new RegExp(`%${k}%`, 'g'), v), string); + +export const getTemplatePath = async (template: string) => { + return join( + dirname(require.resolve('@storybook/builder-manager/package.json')), + 'templates', + template + ); +}; + +export const readTemplate = async (template: string) => { + // eslint-disable-next-line @typescript-eslint/no-shadow + const path = await getTemplatePath(template); + + return fs.readFile(path, 'utf8'); +}; + +export async function getManagerHeadTemplate( + configDirPath: string, + interpolations: Record +) { + const head = await fs + .pathExists(path.resolve(configDirPath, 'manager-head.html')) + .then | false>((exists) => { + if (exists) { + return fs.readFile(path.resolve(configDirPath, 'manager-head.html'), 'utf8'); + } + return false; + }); + + if (!head) { + return ''; + } + + return interpolate(head, interpolations); +} + +export async function getManagerMainTemplate() { + return getTemplatePath(`manager.ejs`); +} + +export const renderHTML = async ( + template: Promise, + title: Promise, + customHead: Promise, + cssFiles: string[], + jsFiles: string[], + features: Promise>, + refs: Promise>, + logLevel: Promise, + docsOptions: Promise, + { versionCheck, releaseNotesData, previewUrl, serverChannelUrl, configType }: Options +) => { + const customHeadRef = await customHead; + const titleRef = await title; + const templateRef = await template; + + return render(templateRef, { + title: titleRef ? `${titleRef} - Storybook` : 'Storybook', + files: { js: jsFiles, css: cssFiles }, + globals: { + FEATURES: JSON.stringify(await features, null, 2), + REFS: JSON.stringify(await refs, null, 2), + LOGLEVEL: JSON.stringify(await logLevel, null, 2), + DOCS_OPTIONS: JSON.stringify(await docsOptions, null, 2), + CONFIG_TYPE: JSON.stringify(await configType, null, 2), + // These two need to be double stringified because the UI expects a string + VERSIONCHECK: JSON.stringify(JSON.stringify(versionCheck), null, 2), + RELEASE_NOTES_DATA: JSON.stringify(JSON.stringify(releaseNotesData), null, 2), + PREVIEW_URL: JSON.stringify(previewUrl, null, 2), // global preview URL + SERVER_CHANNEL_URL: JSON.stringify(serverChannelUrl, null, 2), + }, + head: customHeadRef ? await fs.readFile(customHeadRef, 'utf8') : '', + }); +}; diff --git a/code/lib/builder-manager/templates/addon.tsconfig.json b/code/lib/builder-manager/templates/addon.tsconfig.json new file mode 100644 index 000000000000..38452bcdfa20 --- /dev/null +++ b/code/lib/builder-manager/templates/addon.tsconfig.json @@ -0,0 +1,6 @@ +{ + "compilerOptions": { + "jsx": "react", + "jsxImportSource": "react" + } +} diff --git a/code/lib/builder-manager/templates/template.ejs b/code/lib/builder-manager/templates/template.ejs new file mode 100644 index 000000000000..296f0a8fca8d --- /dev/null +++ b/code/lib/builder-manager/templates/template.ejs @@ -0,0 +1,47 @@ + + + + + + <%= typeof title !== 'undefined'? title : 'Storybook'%> + + + + + + <% if (typeof head !== 'undefined') { %> <%- head %> <% } %> + + + + <% files.css.forEach(file => { %> + + <% }); %> + + +
    + + <% if (typeof globals !== 'undefined' && Object.keys(globals).length) { %> + + <% } %> + + + + + + diff --git a/code/lib/builder-manager/tsconfig.json b/code/lib/builder-manager/tsconfig.json new file mode 100644 index 000000000000..b89e79d6ea26 --- /dev/null +++ b/code/lib/builder-manager/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "skipLibCheck": true + }, + "include": ["src/**/*", "typings.d.ts"] +} diff --git a/code/lib/builder-vite/README.md b/code/lib/builder-vite/README.md new file mode 100644 index 000000000000..88d077113f2d --- /dev/null +++ b/code/lib/builder-vite/README.md @@ -0,0 +1,225 @@ +# Storybook builder for Vite + +Build your stories with [vite](https://vitejs.dev/) for fast startup times and near-instant HMR. + +# Table of Contents + +- [Migration from storybook-builder-vite](#migration-from-storybook-builder-vite) +- [Installation](#installation) +- [Usage](#usage) + - [Getting started with Vite and Storybook (on a new project)](#getting-started-with-vite-and-storybook-on-a-new-project) + - [Migration from webpack / CRA](#migration-from-webpack--cra) + - [Customize Vite config](#customize-vite-config) + - [Svelte Customization](#svelte-customization) + - [TypeScript](#typescript) + - [React Docgen](#react-docgen) + - [Note about working directory](#note-about-working-directory) +- [Known issues](#known-issues) +- [Contributing](#contributing) + - [About this codebase](#about-this-codebase) + +## Migration from storybook-builder-vite + +This project has moved from `storybook-builder-vite` to `@storybook/builder-vite` as part of a larger effort to improve Vite support in Storybook. To automatically migrate your existing project, you can run + +```bash +npx sb@next automigrate +``` + +To manually migrate: + +1. Remove `storybook-builder-vite` from your `package.json` dependencies +2. Install `@storybook/builder-vite` +3. Update your `core.builder` setting in `.storybook/main.js` to `@storybook/builder-vite`. + +## Installation + +Requirements: + +- Vite 3.0 or newer (for Vite v2 (2.5+), use `@storybook/builder-vite@0.1.x`) +- Storybook 6.4.0 or newer (for storybook 6.3, use `storybook-builder-vite@0.1.16`) + +```bash +npm install @storybook/builder-vite --save-dev +``` + +or + +```bash +yarn add --dev @storybook/builder-vite +``` + +or + +```bash +pnpm add --save-dev @storybook/builder-vite +``` + +Note: when using `pnpm`, you may need to enable [shamefully-hoist](https://pnpm.io/npmrc#shamefully-hoist), until https://github.com/storybookjs/builder-vite/issues/55 can be fixed. + +## Usage + +In your `main.js` configuration file, +set `core: { builder: "@storybook/builder-vite" }`. + +> For autoreload of react stories to work, they need to have a `.stories.tsx` or `.stories.jsx` file suffix. +> See also [#53](https://github.com/storybookjs/builder-vite/pull/53) + +The builder supports both development mode in Storybook, and building a static production version. + +### Getting started with Vite and Storybook (on a new project) + +See https://vitejs.dev/guide/#scaffolding-your-first-vite-project, + +``` +npm create vite@latest # follow the prompts +npx sb init --builder @storybook/builder-vite && npm run storybook +``` + +### Migration from webpack / CRA + +1. Install `vite` and `@storybook/builder-vite` +2. Remove any explicit project dependencies on `webpack`, `react-scripts`, and any other webpack plugins or loaders. +3. If you were previously using `@storybook/manager-webpack5`, you'll need to remove it, since currently the vite builder only works with `manager-webpack4`, which is the default and does not need to be installed manually. Also remove `@storybook/builder-webpack5` or `@storybook/builder-webpack4` if they are installed. +4. Set `core: { builder: "@storybook/builder-vite" }` in your `.storybook/main.js` file. +5. Remove storybook webpack cache (`rm -rf node_modules/.cache`) +6. Update your `/public/index.html` file for vite (be sure there are no `%PUBLIC_URL%` inside it, which is a CRA variable) +7. Be sure that any files containing JSX syntax use a `.jsx` or `.tsx` file extension, which [vite requires](https://vitejs.dev/guide/features.html#jsx). This includes `.storybook/preview.jsx` if it contains JSX syntax. +8. If you are using `@storybook/addon-interactions`, for now you'll need to add a [workaround](https://github.com/storybookjs/storybook/issues/18399) for jest-mock relying on the node `global` variable by creating a `.storybook/preview-head.html` file containing the following: + +```html + +``` + +9. Start up your storybook using the same `yarn storybook` or `npm run storybook` commands you are used to. + +For other details about the differences between vite and webpack projects, be sure to read through the [vite documentation](https://vitejs.dev/). + +### Customize Vite config + +The builder will _not_ read your `vite.config.js` file by default. + +In `.storybook/main.js` (or whatever your Storybook config file is named) +you can override the Vite config: + +```javascript +// use `mergeConfig` to recursively merge Vite options +const { mergeConfig } = require('vite'); + +module.exports = { + async viteFinal(config, { configType }) { + // return the customized config + return mergeConfig(config, { + // customize the Vite config here + resolve: { + alias: { foo: 'bar' }, + }, + }); + }, + // ... other options here +}; +``` + +The `viteFinal` function will give you `config` which is +the builder's own Vite config. You can tweak this as you want, +for example to set up aliases, add new plugins etc. + +The `configType` variable will be either `"DEVELOPMENT"` or `"PRODUCTION"`. + +The function should return the updated Vite configuration. + +### Svelte Customization + +When using this builder with Svelte, your `.storybook/main.js` (or equivalent) +can contain a `svelteOptions` object to pass custom options to +[`vite-plugin-svelte`](https://github.com/sveltejs/vite-plugin-svelte/tree/main/packages/vite-plugin-svelte): + +```javascript +const preprocess = require('svelte-preprocess'); + +module.exports = { + svelteOptions: { + preprocess: preprocess({ + typescript: true, + postcss: true, + sourceMap: true, + }), + }, +}; +``` + +### TypeScript + +Configure your `.storybook/main.ts` to use TypeScript: + +```typescript +import type { StorybookViteConfig } from '@storybook/builder-vite'; + +const config: StorybookViteConfig = { + // other storybook options..., + async viteFinal(config, options) { + // modify and return config + }, +}; + +export default config; +``` + +Or alternatively, you can use named exports: + +```typescript +import type { ViteFinal } from '@storybook/builder-vite'; + +export const viteFinal: ViteFinal = async (config, options) => { + // modify and return config +}; +``` + +See [Customize Vite config](#customize-vite-config) for details about using `viteFinal`. + +### React Docgen + +Docgen is used in Storybook to populate the props table in docs view, the controls panel, and for several other addons. Docgen is supported in vue and react, and there are two docgen options when using react, `react-docgen` and `react-docgen-typescript`. You can learn more about the pros/cons of each in [this gist](https://gist.github.com/shilman/036313ffa3af52ca986b375d90ea46b0). By default, if we find a `typescript` dependency in your `package.json` file, we will assume you're using typescript and will choose `react-docgen-typescript`. You can change this by setting the `typescript.reactDocgen` option in your `.storybook/main.js` file: + +```javascript +module.exports = { + typescript: { + reactDocgen: 'react-docgen` + } +} +``` + +If you're using TypeScript, we encourage you to experiment and see which option works better for your project. + +### Note about working directory + +The builder will by default enable Vite's [server.fs.strict](https://vitejs.dev/config/#server-fs-strict) +option, for increased security. The default project `root` is set to the parent directory of the +storybook configuration directory. This can be overridden in viteFinal. + +## Known issues + +- HMR: saving a story file does not hot-module-reload, a full reload happens instead. HMR works correctly when saving component files. + +## Contributing + +The Vite builder cannot build itself. +Are you willing to contribute? We are especially looking for vue and svelte experts, as the current maintainers are react users. + +https://github.com/storybookjs/builder-vite/issues/11 + +Have a look at the GitHub issues for known bugs. If you find any new bugs, +feel free to create an issue or send a pull request! + +Please read the [How to contribute](/CONTRIBUTING.md) guide. + +### About this codebase + +The code is a monorepo with the core `@storybook/builder-vite` package, +and examples (like `examples/react`) to test the builder implementation. + +Similar to the main storybook monorepo, you need yarn to develop this builder, because the project is organized as yarn workspaces. +This lets you write new code in the core builder package, and instantly use them from +the example packages. diff --git a/code/lib/builder-vite/input/iframe.html b/code/lib/builder-vite/input/iframe.html new file mode 100644 index 000000000000..874cf855e9a7 --- /dev/null +++ b/code/lib/builder-vite/input/iframe.html @@ -0,0 +1,31 @@ + + + + + + <!-- [TITLE HERE] --> + + + + + + +
    +
    + + + + diff --git a/code/lib/builder-vite/input/react-dom-client-placeholder.js b/code/lib/builder-vite/input/react-dom-client-placeholder.js new file mode 100644 index 000000000000..ac58bff7de38 --- /dev/null +++ b/code/lib/builder-vite/input/react-dom-client-placeholder.js @@ -0,0 +1,3 @@ +// This file is to work around https://github.com/vitejs/vite/issues/6007 +// For react < 18 projects, where `react-dom/client` does not exist, yet is +// conditionally imported by @storybook/react. diff --git a/code/lib/builder-vite/jest.config.js b/code/lib/builder-vite/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/lib/builder-vite/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/builder-vite/package.json b/code/lib/builder-vite/package.json new file mode 100644 index 000000000000..5915d7127bae --- /dev/null +++ b/code/lib/builder-vite/package.json @@ -0,0 +1,99 @@ +{ + "name": "@storybook/builder-vite", + "version": "7.0.0-beta.25", + "description": "A plugin to run and build Storybooks with Vite", + "homepage": "https://github.com/storybookjs/storybook/tree/main/code/lib/builder-vite/#readme", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "code/lib/builder-vite" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "author": "Eirik Sletteberg", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./input/iframe.html": "./input/iframe.html", + "./input/react-dom-client-placeholder.js": "./input/react-dom-client-placeholder.js", + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "input/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/csf-plugin": "7.0.0-beta.25", + "@storybook/mdx2-csf": "next", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/preview": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "browser-assert": "^1.2.1", + "es-module-lexer": "^0.9.3", + "express": "^4.17.3", + "fs-extra": "^9.0.1", + "glob": "^7.2.0", + "glob-promise": "^4.2.0", + "magic-string": "^0.26.1", + "rollup": "^2.25.0 || ^3.3.0", + "slash": "^3.0.0", + "vite-plugin-externals": "^0.5.1" + }, + "devDependencies": { + "@types/express": "^4.17.13", + "@types/node": "^16.0.0", + "rollup": "^3.0.0", + "typescript": "~4.9.3", + "vite": "^4.0.0" + }, + "peerDependencies": { + "@preact/preset-vite": "*", + "typescript": ">= 4.3.x", + "vite": "^3.0.0 || ^4.0.0", + "vite-plugin-glimmerx": "*" + }, + "peerDependenciesMeta": { + "@preact/preset-vite": { + "optional": true + }, + "typescript": { + "optional": true + }, + "vite-plugin-glimmerx": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/lib/builder-vite/src/build.ts b/code/lib/builder-vite/src/build.ts new file mode 100644 index 000000000000..dbb6feefb011 --- /dev/null +++ b/code/lib/builder-vite/src/build.ts @@ -0,0 +1,26 @@ +import { build as viteBuild, mergeConfig } from 'vite'; +import { commonConfig } from './vite-config'; + +import type { ExtendedOptions } from './types'; +import { sanitizeEnvVars } from './envs'; + +export async function build(options: ExtendedOptions) { + const { presets } = options; + + const config = await commonConfig(options, 'build'); + config.build = mergeConfig(config, { + build: { + outDir: options.outputDir, + emptyOutDir: false, // do not clean before running Vite build - Storybook has already added assets in there! + sourcemap: true, + rollupOptions: { + // Do not try to bundle the storybook runtime, it is copied into the output dir after the build. + external: ['./sb-preview/runtime.mjs'], + }, + }, + }).build; + + const finalConfig = await presets.apply('viteFinal', config, options); + + await viteBuild(await sanitizeEnvVars(options, finalConfig)); +} diff --git a/code/lib/builder-vite/src/codegen-entries.ts b/code/lib/builder-vite/src/codegen-entries.ts new file mode 100644 index 000000000000..2e2f9b256175 --- /dev/null +++ b/code/lib/builder-vite/src/codegen-entries.ts @@ -0,0 +1,45 @@ +import { loadPreviewOrConfigFile } from '@storybook/core-common'; +import type { Options } from '@storybook/types'; +import slash from 'slash'; +import { normalizePath } from 'vite'; +import type { ExtendedOptions } from './types'; +import { listStories } from './list-stories'; + +const absoluteFilesToImport = (files: string[], name: string) => + files + .map((el, i) => `import ${name ? `* as ${name}_${i} from ` : ''}'/@fs/${normalizePath(el)}'`) + .join('\n'); + +export async function generateVirtualStoryEntryCode(options: ExtendedOptions) { + const storyEntries = await listStories(options); + const resolveMap = storyEntries.reduce>( + (prev, entry) => ({ ...prev, [entry]: entry.replace(slash(process.cwd()), '.') }), + {} + ); + const modules = storyEntries.map((entry, i) => `${JSON.stringify(entry)}: story_${i}`).join(','); + + return ` + ${absoluteFilesToImport(storyEntries, 'story')} + + function loadable(key) { + return {${modules}}[key]; + } + + Object.assign(loadable, { + keys: () => (${JSON.stringify(Object.keys(resolveMap))}), + resolve: (key) => (${JSON.stringify(resolveMap)}[key]) + }); + + export function configStories(configure) { + configure(loadable, { hot: import.meta.hot }, false); + } + `.trim(); +} + +export async function generatePreviewEntryCode({ configDir }: Options) { + const previewFile = loadPreviewOrConfigFile({ configDir }); + if (!previewFile) return ''; + + return `import * as preview from '${slash(previewFile)}'; + export default preview;`; +} diff --git a/code/lib/builder-vite/src/codegen-iframe-script.ts b/code/lib/builder-vite/src/codegen-iframe-script.ts new file mode 100644 index 000000000000..a5818c1a170b --- /dev/null +++ b/code/lib/builder-vite/src/codegen-iframe-script.ts @@ -0,0 +1,115 @@ +import { getRendererName } from '@storybook/core-common'; +import type { PreviewAnnotation } from '@storybook/types'; +import { virtualPreviewFile, virtualStoriesFile } from './virtual-file-names'; +import type { ExtendedOptions } from './types'; +import { processPreviewAnnotation } from './utils/process-preview-annotation'; + +export async function generateIframeScriptCode(options: ExtendedOptions) { + const { presets } = options; + const rendererName = await getRendererName(options); + + const previewAnnotations = await presets.apply( + 'previewAnnotations', + [], + options + ); + const configEntries = [...previewAnnotations].filter(Boolean).map(processPreviewAnnotation); + + const filesToImport = (files: string[], name: string) => + files.map((el, i) => `import ${name ? `* as ${name}_${i} from ` : ''}'${el}'`).join('\n'); + + const importArray = (name: string, length: number) => + new Array(length).fill(0).map((_, i) => `${name}_${i}`); + + // noinspection UnnecessaryLocalVariableJS + /** @todo Inline variable and remove `noinspection` */ + // language=JavaScript + const code = ` + // Ensure that the client API is initialized by the framework before any other iframe code + // is loaded. That way our client-apis can assume the existence of the API+store + import { configure } from '${rendererName}'; + + import { logger } from '@storybook/client-logger'; + import * as previewApi from "@storybook/preview-api"; + ${filesToImport(configEntries, 'config')} + + import * as preview from '${virtualPreviewFile}'; + import { configStories } from '${virtualStoriesFile}'; + + const { + addDecorator, + addParameters, + addLoader, + addArgs, + addArgTypes, + addStepRunner, + addArgTypesEnhancer, + addArgsEnhancer, + setGlobalRender, + } = previewApi; + + const configs = [${importArray('config', configEntries.length) + .concat('preview.default') + .join(',')}].filter(Boolean) + + configs.forEach(config => { + Object.keys(config).forEach((key) => { + const value = config[key]; + switch (key) { + case 'args': { + return addArgs(value); + } + case 'argTypes': { + return addArgTypes(value); + } + case 'decorators': { + return value.forEach((decorator) => addDecorator(decorator, false)); + } + case 'loaders': { + return value.forEach((loader) => addLoader(loader, false)); + } + case 'parameters': { + return addParameters({ ...value }, false); + } + case 'argTypesEnhancers': { + return value.forEach((enhancer) => addArgTypesEnhancer(enhancer)); + } + case 'argsEnhancers': { + return value.forEach((enhancer) => addArgsEnhancer(enhancer)) + } + case 'render': { + return setGlobalRender(value) + } + case 'globals': + case 'globalTypes': { + const v = {}; + v[key] = value; + return addParameters(v, false); + } + case 'decorateStory': + case 'applyDecorators': + case 'renderToDOM': // deprecated + case 'renderToCanvas': { + return null; // This key is not handled directly in v6 mode. + } + case 'runStep': { + return addStepRunner(value); + } + default: { + // eslint-disable-next-line prefer-template + return console.log(key + ' was not supported :( !'); + } + } + }); + }) + + /* TODO: not quite sure what to do with this, to fix HMR + if (import.meta.hot) { + import.meta.hot.accept(); + } + */ + + configStories(configure); + `.trim(); + return code; +} diff --git a/code/lib/builder-vite/src/codegen-importfn-script.ts b/code/lib/builder-vite/src/codegen-importfn-script.ts new file mode 100644 index 000000000000..55c24503a726 --- /dev/null +++ b/code/lib/builder-vite/src/codegen-importfn-script.ts @@ -0,0 +1,56 @@ +import * as path from 'path'; +import { normalizePath } from 'vite'; +import type { Options } from '@storybook/types'; +import { logger } from '@storybook/node-logger'; + +import { listStories } from './list-stories'; + +/** + * This file is largely based on https://github.com/storybookjs/storybook/blob/d1195cbd0c61687f1720fefdb772e2f490a46584/lib/core-common/src/utils/to-importFn.ts + */ + +/** + * Paths get passed either with no leading './' - e.g. `src/Foo.stories.js`, + * or with a leading `../` (etc), e.g. `../src/Foo.stories.js`. + * We want to deal in importPaths relative to the working dir, so we normalize + */ +function toImportPath(relativePath: string) { + return relativePath.startsWith('../') ? relativePath : `./${relativePath}`; +} + +/** + * This function takes an array of stories and creates a mapping between the stories' relative paths + * to the working directory and their dynamic imports. The import is done in an asynchronous function + * to delay loading. It then creates a function, `importFn(path)`, which resolves a path to an import + * function and this is called by Storybook to fetch a story dynamically when needed. + * @param stories An array of absolute story paths. + */ +async function toImportFn(stories: string[]) { + const objectEntries = stories.map((file) => { + const ext = path.extname(file); + const relativePath = normalizePath(path.relative(process.cwd(), file)); + if (!['.js', '.jsx', '.ts', '.tsx', '.mdx', '.svelte'].includes(ext)) { + logger.warn(`Cannot process ${ext} file with storyStoreV7: ${relativePath}`); + } + + return ` '${toImportPath(relativePath)}': async () => import('/@fs/${file}')`; + }); + + return ` + const importers = { + ${objectEntries.join(',\n')} + }; + + export async function importFn(path) { + return importers[path](); + } + `; +} + +export async function generateImportFnScriptCode(options: Options) { + // First we need to get an array of stories and their absolute paths. + const stories = await listStories(options); + + // We can then call toImportFn to create a function that can be used to load each story dynamically. + return (await toImportFn(stories)).trim(); +} diff --git a/code/lib/builder-vite/src/codegen-modern-iframe-script.ts b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts new file mode 100644 index 000000000000..53061f175d81 --- /dev/null +++ b/code/lib/builder-vite/src/codegen-modern-iframe-script.ts @@ -0,0 +1,77 @@ +import { loadPreviewOrConfigFile, getFrameworkName } from '@storybook/core-common'; +import type { PreviewAnnotation } from '@storybook/types'; +import { virtualStoriesFile, virtualAddonSetupFile } from './virtual-file-names'; +import type { ExtendedOptions } from './types'; +import { processPreviewAnnotation } from './utils/process-preview-annotation'; + +export async function generateModernIframeScriptCode(options: ExtendedOptions) { + const { presets, configDir } = options; + const frameworkName = await getFrameworkName(options); + + const previewOrConfigFile = loadPreviewOrConfigFile({ configDir }); + const previewAnnotations = await presets.apply( + 'previewAnnotations', + [], + options + ); + const relativePreviewAnnotations = [...previewAnnotations, previewOrConfigFile] + .filter(Boolean) + .map(processPreviewAnnotation); + + // eslint-disable-next-line @typescript-eslint/no-shadow + const generateHMRHandler = (frameworkName: string): string => { + // Web components are not compatible with HMR, so disable HMR, reload page instead. + if (frameworkName === '@storybook/web-components-vite') { + return ` + if (import.meta.hot) { + import.meta.hot.decline(); + }`.trim(); + } + + return ` + if (import.meta.hot) { + import.meta.hot.accept('${virtualStoriesFile}', (newModule) => { + // importFn has changed so we need to patch the new one in + window.__STORYBOOK_PREVIEW__.onStoriesChanged({ importFn: newModule.importFn }); + }); + + import.meta.hot.accept(${JSON.stringify( + relativePreviewAnnotations + )}, ([...newConfigEntries]) => { + const newGetProjectAnnotations = () => composeConfigs(newConfigEntries); + + // getProjectAnnotations has changed so we need to patch the new one in + window.__STORYBOOK_PREVIEW__.onGetProjectAnnotationsChanged({ getProjectAnnotations: newGetProjectAnnotations }); + }); + }`.trim(); + }; + + /** + * This code is largely taken from https://github.com/storybookjs/storybook/blob/d1195cbd0c61687f1720fefdb772e2f490a46584/lib/builder-webpack4/src/preview/virtualModuleModernEntry.js.handlebars + * Some small tweaks were made to `getProjectAnnotations` (since `import()` needs to be resolved asynchronously) + * and the HMR implementation has been tweaked to work with Vite. + * @todo Inline variable and remove `noinspection` + */ + const code = ` + import { composeConfigs, PreviewWeb, ClientApi } from '@storybook/preview-api'; + import '${virtualAddonSetupFile}'; + import { importFn } from '${virtualStoriesFile}'; + + const getProjectAnnotations = async () => { + const configs = await Promise.all([${relativePreviewAnnotations + .map((previewAnnotation) => `import('${previewAnnotation}')`) + .join(',\n')}]) + return composeConfigs(configs); + } + + + window.__STORYBOOK_PREVIEW__ = window.__STORYBOOK_PREVIEW__ || new PreviewWeb(); + + window.__STORYBOOK_STORY_STORE__ = window.__STORYBOOK_STORY_STORE__ || window.__STORYBOOK_PREVIEW__.storyStore; + window.__STORYBOOK_CLIENT_API__ = window.__STORYBOOK_CLIENT_API__ || new ClientApi({ storyStore: window.__STORYBOOK_PREVIEW__.storyStore }); + window.__STORYBOOK_PREVIEW__.initialize({ importFn, getProjectAnnotations }); + + ${generateHMRHandler(frameworkName)}; + `.trim(); + return code; +} diff --git a/code/lib/builder-vite/src/codegen-set-addon-channel.ts b/code/lib/builder-vite/src/codegen-set-addon-channel.ts new file mode 100644 index 000000000000..6cb475c8893b --- /dev/null +++ b/code/lib/builder-vite/src/codegen-set-addon-channel.ts @@ -0,0 +1,18 @@ +export async function generateAddonSetupCode() { + return ` + import { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; + import { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; + import { addons } from '@storybook/preview-api'; + + const channel = createPostMessageChannel({ page: 'preview' }); + addons.setChannel(channel); + window.__STORYBOOK_ADDONS_CHANNEL__ = channel; + + const { SERVER_CHANNEL_URL } = globalThis; + if (SERVER_CHANNEL_URL) { + const serverChannel = createWebSocketChannel({ url: SERVER_CHANNEL_URL }); + addons.setServerChannel(serverChannel); + window.__STORYBOOK_SERVER_CHANNEL__ = serverChannel; + } + `.trim(); +} diff --git a/code/lib/builder-vite/src/envs.ts b/code/lib/builder-vite/src/envs.ts new file mode 100644 index 000000000000..6b6812ac0f22 --- /dev/null +++ b/code/lib/builder-vite/src/envs.ts @@ -0,0 +1,60 @@ +import { stringifyEnvs } from '@storybook/core-common'; +import type { UserConfig as ViteConfig } from 'vite'; +import type { Builder_EnvsRaw } from '@storybook/types'; +import type { ExtendedOptions } from './types'; + +// Allowed env variables on the client +const allowedEnvVariables = [ + 'STORYBOOK', + // Vite `import.meta.env` default variables + // @see https://github.com/vitejs/vite/blob/6b8d94dca2a1a8b4952e3e3fcd0aed1aedb94215/packages/vite/types/importMeta.d.ts#L68-L75 + 'BASE_URL', + 'MODE', + 'DEV', + 'PROD', + 'SSR', +]; + +/** + * Customized version of stringifyProcessEnvs from @storybook/core-common which + * uses import.meta.env instead of process.env and checks for allowed variables. + */ +export function stringifyProcessEnvs(raw: Builder_EnvsRaw, envPrefix: ViteConfig['envPrefix']) { + const updatedRaw: Builder_EnvsRaw = {}; + const envs = Object.entries(raw).reduce((acc: Builder_EnvsRaw, [key, value]) => { + // Only add allowed values OR values from array OR string started with allowed prefixes + if ( + allowedEnvVariables.includes(key) || + (Array.isArray(envPrefix) && !!envPrefix.find((prefix) => key.startsWith(prefix))) || + (typeof envPrefix === 'string' && key.startsWith(envPrefix)) + ) { + acc[`import.meta.env.${key}`] = JSON.stringify(value); + updatedRaw[key] = value; + } + return acc; + }, {}); + // support destructuring like + // const { foo } = import.meta.env; + envs['import.meta.env'] = JSON.stringify(stringifyEnvs(updatedRaw)); + + return envs; +} + +// Sanitize environment variables if needed +export async function sanitizeEnvVars(options: ExtendedOptions, config: ViteConfig) { + const { presets } = options; + const envsRaw = await presets.apply>('env'); + let { define } = config; + if (Object.keys(envsRaw).length) { + // Stringify env variables after getting `envPrefix` from the config + const envs = stringifyProcessEnvs(envsRaw, config.envPrefix); + define = { + ...define, + ...envs, + }; + } + return { + ...config, + define, + } as ViteConfig; +} diff --git a/code/lib/builder-vite/src/index.ts b/code/lib/builder-vite/src/index.ts new file mode 100644 index 000000000000..b9535c4a5e08 --- /dev/null +++ b/code/lib/builder-vite/src/index.ts @@ -0,0 +1,119 @@ +// noinspection JSUnusedGlobalSymbols + +import * as fs from 'fs-extra'; +import type { Builder, StorybookConfig as StorybookBaseConfig, Options } from '@storybook/types'; +import type { RequestHandler } from 'express'; +import type { InlineConfig, UserConfig, ViteDevServer } from 'vite'; +import express from 'express'; +import { dirname, join, parse } from 'path'; +import { transformIframeHtml } from './transform-iframe-html'; +import { createViteServer } from './vite-server'; +import { build as viteBuild } from './build'; +import type { ExtendedOptions } from './types'; + +export { withoutVitePlugins } from './utils/without-vite-plugins'; +export { hasVitePlugins } from './utils/has-vite-plugins'; + +// TODO remove +export type { TypescriptOptions } from '@storybook/types'; + +// Storybook's Stats are optional Webpack related property +export type ViteStats = { + toJson: () => any; +}; + +export type ViteBuilder = Builder; + +export type ViteFinal = ( + config: InlineConfig, + options: Options +) => InlineConfig | Promise; + +export type StorybookConfig = StorybookBaseConfig & { + viteFinal?: ViteFinal; +}; + +/** + * @deprecated + * + * Use `import { StorybookConfig } from '@storybook/builder-vite';` + * + * Or better yet, import from your framework. + */ +export type StorybookViteConfig = StorybookConfig; + +function iframeMiddleware(options: ExtendedOptions, server: ViteDevServer): RequestHandler { + return async (req, res, next) => { + if (!req.url.match(/^\/iframe\.html($|\?)/)) { + next(); + return; + } + + // We need to handle `html-proxy` params for style tag HMR https://github.com/storybookjs/builder-vite/issues/266#issuecomment-1055677865 + // e.g. /iframe.html?html-proxy&index=0.css + if (req.query['html-proxy'] !== undefined) { + next(); + return; + } + + const indexHtml = await fs.readFile( + require.resolve('@storybook/builder-vite/input/iframe.html'), + 'utf-8' + ); + const generated = await transformIframeHtml(indexHtml, options); + const transformed = await server.transformIndexHtml('/iframe.html', generated); + res.setHeader('Content-Type', 'text/html'); + res.status(200).send(transformed); + }; +} + +let server: ViteDevServer; + +export async function bail(): Promise { + return server?.close(); +} + +export const start: ViteBuilder['start'] = async ({ + startTime, + options, + router, + server: devServer, +}) => { + server = await createViteServer(options as ExtendedOptions, devServer); + + const previewResolvedDir = dirname(require.resolve('@storybook/preview/package.json')); + const previewDirOrigin = join(previewResolvedDir, 'dist'); + + router.use(`/sb-preview`, express.static(previewDirOrigin, { immutable: true, maxAge: '5m' })); + + router.use(iframeMiddleware(options as ExtendedOptions, server)); + router.use(server.middlewares); + + return { + bail, + stats: { toJson: () => null }, + totalTime: process.hrtime(startTime), + }; +}; + +export const build: ViteBuilder['build'] = async ({ options }) => { + const viteCompilation = viteBuild(options as ExtendedOptions); + + const previewResolvedDir = dirname(require.resolve('@storybook/preview/package.json')); + const previewDirOrigin = join(previewResolvedDir, 'dist'); + const previewDirTarget = join(options.outputDir || '', `sb-preview`); + + const previewFiles = fs.copy(previewDirOrigin, previewDirTarget, { + filter: (src) => { + const { ext } = parse(src); + if (ext) { + return ext === '.mjs'; + } + return true; + }, + }); + + const [out] = await Promise.all([viteCompilation, previewFiles]); + + return out; +}; diff --git a/code/lib/builder-vite/src/list-stories.ts b/code/lib/builder-vite/src/list-stories.ts new file mode 100644 index 000000000000..56a962d5d5fb --- /dev/null +++ b/code/lib/builder-vite/src/list-stories.ts @@ -0,0 +1,22 @@ +import * as path from 'path'; +import { promise as glob } from 'glob-promise'; +import { normalizeStories } from '@storybook/core-common'; + +import type { Options } from '@storybook/types'; + +export async function listStories(options: Options) { + return ( + await Promise.all( + normalizeStories(await options.presets.apply('stories', [], options), { + configDir: options.configDir, + workingDir: options.configDir, + }).map(({ directory, files }) => { + const pattern = path.join(directory, files); + + return glob(path.isAbsolute(pattern) ? pattern : path.join(options.configDir, pattern), { + follow: true, + }); + }) + ) + ).reduce((carry, stories) => carry.concat(stories), []); +} diff --git a/code/lib/builder-vite/src/optimizeDeps.ts b/code/lib/builder-vite/src/optimizeDeps.ts new file mode 100644 index 000000000000..3d00a7783318 --- /dev/null +++ b/code/lib/builder-vite/src/optimizeDeps.ts @@ -0,0 +1,126 @@ +import * as path from 'path'; +import { normalizePath, resolveConfig } from 'vite'; +import type { InlineConfig as ViteInlineConfig, UserConfig } from 'vite'; +import { listStories } from './list-stories'; + +import type { ExtendedOptions } from './types'; + +const INCLUDE_CANDIDATES = [ + '@base2/pretty-print-object', + '@emotion/core', + '@emotion/is-prop-valid', + '@emotion/styled', + '@mdx-js/react', + '@storybook/addon-docs > acorn-jsx', + '@storybook/addon-docs', + '@storybook/channel-postmessage', + '@storybook/channel-websocket', + '@storybook/client-api', + '@storybook/client-logger', + '@storybook/core/client', + '@storybook/global', + '@storybook/preview-api', + '@storybook/preview-web', + '@storybook/react > acorn-jsx', + '@storybook/react', + '@storybook/svelte', + '@storybook/types', + '@storybook/vue3', + 'acorn-jsx', + 'acorn-walk', + 'acorn', + 'airbnb-js-shims', + 'ansi-to-html', + 'axe-core', + 'color-convert', + 'deep-object-diff', + 'doctrine', + 'emotion-theming', + 'escodegen', + 'estraverse', + 'fast-deep-equal', + 'html-tags', + 'isobject', + 'jest-mock', + 'loader-utils', + 'lodash/cloneDeep', + 'lodash/isFunction', + 'lodash/isPlainObject', + 'lodash/isString', + 'lodash/mapKeys', + 'lodash/mapValues', + 'lodash/pick', + 'lodash/pickBy', + 'lodash/startCase', + 'lodash/throttle', + 'lodash/uniq', + 'markdown-to-jsx', + 'memoizerific', + 'overlayscrollbars', + 'polished', + 'prettier/parser-babel', + 'prettier/parser-flow', + 'prettier/parser-typescript', + 'prop-types', + 'qs', + 'react-dom', + 'react-dom/client', + 'react-fast-compare', + 'react-is', + 'react-textarea-autosize', + 'react', + 'react/jsx-runtime', + 'refractor/core', + 'refractor/lang/bash.js', + 'refractor/lang/css.js', + 'refractor/lang/graphql.js', + 'refractor/lang/js-extras.js', + 'refractor/lang/json.js', + 'refractor/lang/jsx.js', + 'refractor/lang/markdown.js', + 'refractor/lang/markup.js', + 'refractor/lang/tsx.js', + 'refractor/lang/typescript.js', + 'refractor/lang/yaml.js', + 'regenerator-runtime/runtime.js', + 'slash', + 'store2', + 'synchronous-promise', + 'telejson', + 'ts-dedent', + 'unfetch', + 'util-deprecate', + 'uuid-browser/v4', + 'vue', + 'warning', +]; + +/** + * Helper function which allows us to `filter` with an async predicate. Uses Promise.all for performance. + */ +const asyncFilter = async (arr: string[], predicate: (val: string) => Promise) => + Promise.all(arr.map(predicate)).then((results) => arr.filter((_v, index) => results[index])); + +export async function getOptimizeDeps(config: ViteInlineConfig, options: ExtendedOptions) { + const { root = process.cwd() } = config; + const absoluteStories = await listStories(options); + const stories = absoluteStories.map((storyPath) => normalizePath(path.relative(root, storyPath))); + // TODO: check if resolveConfig takes a lot of time, possible optimizations here + const resolvedConfig = await resolveConfig(config, 'serve', 'development'); + + // This function converts ids which might include ` > ` to a real path, if it exists on disk. + // See https://github.com/vitejs/vite/blob/67d164392e8e9081dc3f0338c4b4b8eea6c5f7da/packages/vite/src/node/optimizer/index.ts#L182-L199 + const resolve = resolvedConfig.createResolver({ asSrc: false }); + const include = await asyncFilter(INCLUDE_CANDIDATES, async (id) => Boolean(await resolve(id))); + + const optimizeDeps: UserConfig['optimizeDeps'] = { + ...config.optimizeDeps, + // We don't need to resolve the glob since vite supports globs for entries. + entries: stories, + // We need Vite to precompile these dependencies, because they contain non-ESM code that would break + // if we served it directly to the browser. + include: [...include, ...(config.optimizeDeps?.include || [])], + }; + + return optimizeDeps; +} diff --git a/code/lib/builder-vite/src/plugins/code-generator-plugin.ts b/code/lib/builder-vite/src/plugins/code-generator-plugin.ts new file mode 100644 index 000000000000..718bc956b367 --- /dev/null +++ b/code/lib/builder-vite/src/plugins/code-generator-plugin.ts @@ -0,0 +1,150 @@ +/* eslint-disable no-param-reassign */ + +import * as fs from 'fs'; +import { mergeConfig } from 'vite'; +import type { Plugin } from 'vite'; +import { transformIframeHtml } from '../transform-iframe-html'; +import { generateIframeScriptCode } from '../codegen-iframe-script'; +import { generateModernIframeScriptCode } from '../codegen-modern-iframe-script'; +import { generateImportFnScriptCode } from '../codegen-importfn-script'; +import { generateVirtualStoryEntryCode, generatePreviewEntryCode } from '../codegen-entries'; +import { generateAddonSetupCode } from '../codegen-set-addon-channel'; + +import type { ExtendedOptions } from '../types'; + +import { + virtualAddonSetupFile, + virtualFileId, + virtualPreviewFile, + virtualStoriesFile, +} from '../virtual-file-names'; + +export function codeGeneratorPlugin(options: ExtendedOptions): Plugin { + const iframePath = require.resolve('@storybook/builder-vite/input/iframe.html'); + let iframeId: string; + + // noinspection JSUnusedGlobalSymbols + return { + name: 'storybook:code-generator-plugin', + enforce: 'pre', + configureServer(server) { + // invalidate the whole vite-app.js script on every file change. + // (this might be a little too aggressive?) + server.watcher.on('change', () => { + const appModule = server.moduleGraph.getModuleById(virtualFileId); + if (appModule) { + server.moduleGraph.invalidateModule(appModule); + } + const storiesModule = server.moduleGraph.getModuleById(virtualStoriesFile); + if (storiesModule) { + server.moduleGraph.invalidateModule(storiesModule); + } + }); + + // Adding new story files is not covered by the change event above. So we need to detect this and trigger + // HMR to update the importFn. + + server.watcher.on('add', (path) => { + // TODO maybe use the stories declaration in main + if (/\.stories\.([tj])sx?$/.test(path) || /\.(story|stories).mdx$/.test(path)) { + // We need to emit a change event to trigger HMR + server.watcher.emit('change', virtualStoriesFile); + } + }); + }, + config(config, { command }) { + // If we are building the static distribution, add iframe.html as an entry. + // In development mode, it's not an entry - instead, we use an express middleware + // to serve iframe.html. The reason is that Vite's dev server (at the time of writing) + // does not support virtual files as entry points. + if (command === 'build') { + if (!config.build) { + config.build = {}; + } + config.build.rollupOptions = { + ...config.build.rollupOptions, + input: iframePath, + }; + } + + // Detect if react 18 is installed. If not, alias it to a virtual placeholder file. + try { + require.resolve('react-dom/client', { paths: [config.root || process.cwd()] }); + } catch (e) { + if (isNodeError(e) && e.code === 'MODULE_NOT_FOUND') { + config.resolve = mergeConfig(config.resolve ?? {}, { + alias: { + 'react-dom/client': require.resolve( + '@storybook/builder-vite/input/react-dom-client-placeholder.js' + ), + }, + }); + } + } + }, + configResolved(config) { + iframeId = `${config.root}/iframe.html`; + }, + resolveId(source) { + if (source === virtualFileId) { + return virtualFileId; + } + if (source === iframePath) { + return iframeId; + } + if (source === virtualStoriesFile) { + return virtualStoriesFile; + } + if (source === virtualPreviewFile) { + return virtualPreviewFile; + } + if (source === virtualAddonSetupFile) { + return virtualAddonSetupFile; + } + + return undefined; + }, + async load(id) { + const storyStoreV7 = options.features?.storyStoreV7; + if (id === virtualStoriesFile) { + if (storyStoreV7) { + return generateImportFnScriptCode(options); + } + return generateVirtualStoryEntryCode(options); + } + + if (id === virtualAddonSetupFile) { + return generateAddonSetupCode(); + } + + if (id === virtualPreviewFile && !storyStoreV7) { + return generatePreviewEntryCode(options); + } + + if (id === virtualFileId) { + if (storyStoreV7) { + return generateModernIframeScriptCode(options); + } + return generateIframeScriptCode(options); + } + + if (id === iframeId) { + return fs.readFileSync( + require.resolve('@storybook/builder-vite/input/iframe.html'), + 'utf-8' + ); + } + + return undefined; + }, + async transformIndexHtml(html, ctx) { + if (ctx.path !== '/iframe.html') { + return undefined; + } + return transformIframeHtml(html, options); + }, + }; +} + +// Refines an error received from 'catch' to be a NodeJS exception +const isNodeError = (error: unknown): error is NodeJS.ErrnoException => error instanceof Error; diff --git a/code/lib/builder-vite/src/plugins/csf-plugin.ts b/code/lib/builder-vite/src/plugins/csf-plugin.ts new file mode 100644 index 000000000000..1e73af210713 --- /dev/null +++ b/code/lib/builder-vite/src/plugins/csf-plugin.ts @@ -0,0 +1,15 @@ +import type { Plugin } from 'vite'; +import { vite } from '@storybook/csf-plugin'; +import type { StorybookConfig } from '@storybook/types'; +import type { ExtendedOptions } from '../types'; + +export async function csfPlugin(config: ExtendedOptions): Promise { + const { presets } = config; + + const addons = await presets.apply('addons', []); + const docsOptions = + // @ts-expect-error - not sure what type to use here + addons.find((a) => [a, a.name].includes('@storybook/addon-docs'))?.options ?? {}; + + return vite(docsOptions?.csfPluginOptions); +} diff --git a/code/lib/builder-vite/src/plugins/index.ts b/code/lib/builder-vite/src/plugins/index.ts new file mode 100644 index 000000000000..114a09191365 --- /dev/null +++ b/code/lib/builder-vite/src/plugins/index.ts @@ -0,0 +1,5 @@ +export * from './inject-export-order-plugin'; +export * from './mdx-plugin'; +export * from './strip-story-hmr-boundaries'; +export * from './code-generator-plugin'; +export * from './csf-plugin'; diff --git a/code/lib/builder-vite/src/plugins/inject-export-order-plugin.ts b/code/lib/builder-vite/src/plugins/inject-export-order-plugin.ts new file mode 100644 index 000000000000..743043f7427c --- /dev/null +++ b/code/lib/builder-vite/src/plugins/inject-export-order-plugin.ts @@ -0,0 +1,32 @@ +import { parse } from 'es-module-lexer'; +import MagicString from 'magic-string'; +import { createFilter } from 'vite'; + +const include = [/\.stories\.([tj])sx?$/, /(stories|story).mdx$/]; +const filter = createFilter(include); + +export const injectExportOrderPlugin = { + name: 'storybook:inject-export-order-plugin', + // This should only run after the typescript has been transpiled + enforce: 'post', + async transform(code: string, id: string) { + if (!filter(id)) return undefined; + + // TODO: Maybe convert `injectExportOrderPlugin` to function that returns object, + // and run `await init;` once and then call `parse()` without `await`, + // instead of calling `await parse()` every time. + const [, exports] = await parse(code); + + if (exports.includes('__namedExportsOrder')) { + // user has defined named exports already + return undefined; + } + const s = new MagicString(code); + const orderedExports = exports.filter((e) => e !== 'default'); + s.append(`;export const __namedExportsOrder = ${JSON.stringify(orderedExports)};`); + return { + code: s.toString(), + map: s.generateMap({ hires: true, source: id }), + }; + }, +}; diff --git a/code/lib/builder-vite/src/plugins/mdx-plugin.ts b/code/lib/builder-vite/src/plugins/mdx-plugin.ts new file mode 100644 index 000000000000..deedf25fa822 --- /dev/null +++ b/code/lib/builder-vite/src/plugins/mdx-plugin.ts @@ -0,0 +1,51 @@ +import type { Options, StorybookConfig } from '@storybook/types'; +import type { Plugin } from 'vite'; +import { createFilter } from 'vite'; + +const isStorybookMdx = (id: string) => id.endsWith('stories.mdx') || id.endsWith('story.mdx'); + +/** + * Storybook uses two different loaders when dealing with MDX: + * + * - *stories.mdx and *story.mdx are compiled with the CSF compiler + * - *.mdx are compiled with the MDX compiler directly + * + * @see https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/recipes.md#csf-stories-with-arbitrary-mdx + */ +export async function mdxPlugin(options: Options): Promise { + const include = /\.mdx?$/; + const filter = createFilter(include); + const addons = await options.presets.apply('addons', []); + const docsOptions = + // @ts-expect-error - not sure what type to use here + addons.find((a) => [a, a.name].includes('@storybook/addon-docs'))?.options ?? {}; + + return { + name: 'storybook:mdx-plugin', + enforce: 'pre', + async transform(src, id) { + if (!filter(id)) return undefined; + + const { compile } = await import('@storybook/mdx2-csf'); + + const mdxLoaderOptions = await options.presets.apply('mdxLoaderOptions', { + mdxCompileOptions: { + providerImportSource: '@storybook/addon-docs/mdx-react-shim', + }, + jsxOptions: docsOptions.jsxOptions, + }); + + const code = String( + await compile(src, { + skipCsf: !isStorybookMdx(id), + ...mdxLoaderOptions, + }) + ); + + return { + code, + map: null, // TODO: update mdx2-csf to return the map + }; + }, + }; +} diff --git a/code/lib/builder-vite/src/plugins/strip-story-hmr-boundaries.ts b/code/lib/builder-vite/src/plugins/strip-story-hmr-boundaries.ts new file mode 100644 index 000000000000..46ca7045e6d5 --- /dev/null +++ b/code/lib/builder-vite/src/plugins/strip-story-hmr-boundaries.ts @@ -0,0 +1,27 @@ +import type { Plugin } from 'vite'; +import { createFilter } from 'vite'; +import MagicString from 'magic-string'; + +/** + * This plugin removes HMR `accept` calls in story files. Stories should not be treated + * as hmr boundaries, but vite has a bug which causes them to be treated as boundaries + * (https://github.com/vitejs/vite/issues/9869). + */ +export function stripStoryHMRBoundary(): Plugin { + const filter = createFilter(/\.stories\.([tj])sx?$/); + return { + name: 'storybook:strip-hmr-boundary-plugin', + enforce: 'post', + async transform(src: string, id: string) { + if (!filter(id)) return undefined; + + const s = new MagicString(src); + s.replace(/import\.meta\.hot\.accept\(\);/, ''); + + return { + code: s.toString(), + map: s.generateMap({ hires: true, source: id }), + }; + }, + }; +} diff --git a/code/lib/builder-vite/src/transform-iframe-html.ts b/code/lib/builder-vite/src/transform-iframe-html.ts new file mode 100644 index 000000000000..d0b3294bd0f5 --- /dev/null +++ b/code/lib/builder-vite/src/transform-iframe-html.ts @@ -0,0 +1,39 @@ +import { normalizeStories } from '@storybook/core-common'; +import type { CoreConfig, DocsOptions } from '@storybook/types'; +import type { ExtendedOptions } from './types'; + +export type PreviewHtml = string | undefined; + +export async function transformIframeHtml(html: string, options: ExtendedOptions) { + const { configType, features, presets, serverChannelUrl, title } = options; + const frameworkOptions = await presets.apply | null>('frameworkOptions'); + const headHtmlSnippet = await presets.apply('previewHead'); + const bodyHtmlSnippet = await presets.apply('previewBody'); + const logLevel = await presets.apply('logLevel', undefined); + const docsOptions = await presets.apply('docs'); + + const coreOptions = await presets.apply('core'); + const stories = normalizeStories(await options.presets.apply('stories', [], options), { + configDir: options.configDir, + workingDir: process.cwd(), + }).map((specifier) => ({ + ...specifier, + importPathMatcher: specifier.importPathMatcher.source, + })); + + return html + .replace('', title || 'Storybook') + .replace('[CONFIG_TYPE HERE]', configType || '') + .replace('[LOGLEVEL HERE]', logLevel || '') + .replace(`'[FRAMEWORK_OPTIONS HERE]'`, JSON.stringify(frameworkOptions)) + .replace( + `'[CHANNEL_OPTIONS HERE]'`, + JSON.stringify(coreOptions && coreOptions.channelOptions ? coreOptions.channelOptions : {}) + ) + .replace(`'[FEATURES HERE]'`, JSON.stringify(features || {})) + .replace(`'[STORIES HERE]'`, JSON.stringify(stories || {})) + .replace(`'[DOCS_OPTIONS HERE]'`, JSON.stringify(docsOptions || {})) + .replace(`'[SERVER_CHANNEL_URL HERE]'`, JSON.stringify(serverChannelUrl)) + .replace('', headHtmlSnippet || '') + .replace('', bodyHtmlSnippet || ''); +} diff --git a/code/lib/builder-vite/src/types/extended-options.type.ts b/code/lib/builder-vite/src/types/extended-options.type.ts new file mode 100644 index 000000000000..eaad5a8cc86c --- /dev/null +++ b/code/lib/builder-vite/src/types/extended-options.type.ts @@ -0,0 +1,8 @@ +import type { Options } from '@storybook/types'; + +// Using instead of `Record` to provide better aware of used options +type IframeOptions = { + title: string; +}; + +export type ExtendedOptions = Options & IframeOptions; diff --git a/code/lib/builder-vite/src/types/index.ts b/code/lib/builder-vite/src/types/index.ts new file mode 100644 index 000000000000..937f58679fe6 --- /dev/null +++ b/code/lib/builder-vite/src/types/index.ts @@ -0,0 +1 @@ +export * from './extended-options.type'; diff --git a/code/lib/builder-vite/src/utils/has-vite-plugins.test.ts b/code/lib/builder-vite/src/utils/has-vite-plugins.test.ts new file mode 100644 index 000000000000..d82211fba6b3 --- /dev/null +++ b/code/lib/builder-vite/src/utils/has-vite-plugins.test.ts @@ -0,0 +1,69 @@ +import { hasVitePlugins } from './has-vite-plugins'; + +describe('hasVitePlugins', () => { + describe('should return true for', () => { + it('plugin in root', async () => { + const plugins = [{ name: 'vite-plugin-to-find' }, { name: 'vite-plugin-other' }]; + const names = ['vite-plugin-to-find']; + expect(await hasVitePlugins(plugins, names)).toBeTruthy(); + }); + it('plugin in nested array', async () => { + const plugins = [[{ name: 'vite-plugin-to-find' }], { name: 'vite-plugin-other' }]; + const names = ['vite-plugin-to-find']; + expect(await hasVitePlugins(plugins, names)).toBeTruthy(); + }); + it('plugin in nested async array', async () => { + const plugins = [ + { name: 'vite-plugin-other' }, + Promise.resolve([{ name: 'vite-plugin-to-find' }]), + ]; + const names = ['vite-plugin-to-find']; + expect(await hasVitePlugins(plugins, names)).toBeTruthy(); + }); + + it('async plugin in root', async () => { + const plugins = [ + Promise.resolve({ name: 'vite-plugin-to-find' }), + { name: 'vite-plugin-other' }, + ]; + const names = ['vite-plugin-to-find']; + expect(await hasVitePlugins(plugins, names)).toBeTruthy(); + }); + it('async plugin in nested array', async () => { + const plugins = [ + [Promise.resolve({ name: 'vite-plugin-to-find' })], + { name: 'vite-plugin-other' }, + ]; + const names = ['vite-plugin-to-find']; + expect(await hasVitePlugins(plugins, names)).toBeTruthy(); + }); + it('async plugin in nested async array', async () => { + const plugins = [ + { name: 'vite-plugin-other' }, + Promise.resolve([Promise.resolve({ name: 'vite-plugin-to-find' })]), + ]; + const names = ['vite-plugin-to-find']; + expect(await hasVitePlugins(plugins, names)).toBeTruthy(); + }); + it('multiple plugins in root', async () => { + const plugins = [ + { name: 'vite-plugin-other' }, + { name: 'vite-plugin-to-find-first' }, + { name: 'vite-plugin-to-find-second' }, + ]; + const names = ['vite-plugin-to-find-first', 'vite-plugin-to-find-second']; + expect(await hasVitePlugins(plugins, names)).toBeTruthy(); + }); + }); + it('should return false with all types of plugin structures', async () => { + const plugins = [ + { name: 'vite-plugin-root' }, + [{ name: 'vite-plugin-in-nested-array' }], + Promise.resolve({ name: 'vite-plugin-async-root' }), + Promise.resolve([{ name: 'vite-plugin-in-nested-async-array' }]), + Promise.resolve([Promise.resolve({ name: 'vite-plugin-async-in-nested-async-array' })]), + ]; + const names = ['vite-plugin-to-find-first', 'vite-plugin-to-find-second']; + expect(await hasVitePlugins(plugins, names)).toBeFalsy(); + }); +}); diff --git a/code/lib/builder-vite/src/utils/has-vite-plugins.ts b/code/lib/builder-vite/src/utils/has-vite-plugins.ts new file mode 100644 index 000000000000..97f958aa3d7b --- /dev/null +++ b/code/lib/builder-vite/src/utils/has-vite-plugins.ts @@ -0,0 +1,26 @@ +import type { PluginOption } from 'vite'; + +function checkName(plugin: PluginOption, names: string[]) { + return ( + plugin !== null && typeof plugin === 'object' && 'name' in plugin && names.includes(plugin.name) + ); +} + +/** + * Returns true if ANY of the plugins in the array have a name that matches one of the names in the names array. + * Will resolve any promises in the array. + */ +export async function hasVitePlugins(plugins: PluginOption[], names: string[]) { + const resolvedPlugins = await Promise.all(plugins); + // eslint-disable-next-line no-restricted-syntax -- we need to await in the loop + for (const plugin of resolvedPlugins) { + // eslint-disable-next-line no-await-in-loop -- we need to await in the loop + if (Array.isArray(plugin) && Boolean(await hasVitePlugins(plugin, names))) { + return true; + } + if (checkName(plugin, names)) { + return true; + } + } + return false; +} diff --git a/code/lib/builder-vite/src/utils/process-preview-annotation.ts b/code/lib/builder-vite/src/utils/process-preview-annotation.ts new file mode 100644 index 000000000000..b37ac876d817 --- /dev/null +++ b/code/lib/builder-vite/src/utils/process-preview-annotation.ts @@ -0,0 +1,41 @@ +import type { PreviewAnnotation } from '@storybook/types'; +import { resolve } from 'path'; +import slash from 'slash'; +import { transformAbsPath } from './transform-abs-path'; + +/** + * Preview annotations can take several forms, and vite needs them to be + * a bit more restrained. + * + * For node_modules, we want bare imports (so vite can process them), + * and for files in the user's source, + * we want absolute paths. + */ +export function processPreviewAnnotation(path: PreviewAnnotation | undefined) { + // If entry is an object, take the first, which is the + // bare (non-absolute) specifier. + // This is so that webpack can use an absolute path, and + // continue supporting super-addons in pnp/pnpm without + // requiring them to re-export their sub-addons as we do + // in addon-essentials. + if (typeof path === 'object') { + return path.bare; + } + // resolve relative paths into absolute paths, but don't resolve "bare" imports + if (path?.startsWith('./') || path?.startsWith('../')) { + return slash(resolve(path)); + } + // This should not occur, since we use `.filter(Boolean)` prior to + // calling this function, but this makes typescript happy + if (!path) { + throw new Error('Could not determine path for previewAnnotation'); + } + + // For addon dependencies that use require.resolve(), we need to convert to a bare path + // so that vite will process it as a dependency (cjs -> esm, etc). + if (path.includes('node_modules')) { + return transformAbsPath(path); + } + + return slash(path); +} diff --git a/code/lib/builder-vite/src/utils/transform-abs-path.ts b/code/lib/builder-vite/src/utils/transform-abs-path.ts new file mode 100644 index 000000000000..bd8c89f8fbc3 --- /dev/null +++ b/code/lib/builder-vite/src/utils/transform-abs-path.ts @@ -0,0 +1,11 @@ +import path from 'path'; +import { normalizePath } from 'vite'; + +// We need to convert from an absolute path, to a traditional node module import path, +// so that vite can correctly pre-bundle/optimize +export function transformAbsPath(absPath: string) { + const splits = absPath.split(`node_modules${path.sep}`); + // Return everything after the final "node_modules/" + const module = normalizePath(splits[splits.length - 1]); + return module; +} diff --git a/code/lib/builder-vite/src/utils/without-vite-plugins.test.ts b/code/lib/builder-vite/src/utils/without-vite-plugins.test.ts new file mode 100644 index 000000000000..c53422cc69ed --- /dev/null +++ b/code/lib/builder-vite/src/utils/without-vite-plugins.test.ts @@ -0,0 +1,200 @@ +import { withoutVitePlugins } from './without-vite-plugins'; + +describe('withoutVitePlugins', () => { + describe('should remove', () => { + it('plugin in root', async () => { + const plugins = [{ name: 'vite-plugin-root-to-remove' }, { name: 'vite-plugin-root-keep' }]; + const names = ['vite-plugin-root-to-remove']; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Object { + "name": "vite-plugin-root-keep", + }, + ] + `); + }); + + it('plugin in nested array', async () => { + const plugins = [ + [{ name: 'vite-plugin-nested-to-remove' }, { name: 'vite-plugin-nested-keep' }], + { name: 'vite-plugin-root-keep' }, + ]; + const names = ['vite-plugin-nested-to-remove']; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "name": "vite-plugin-nested-keep", + }, + ], + Object { + "name": "vite-plugin-root-keep", + }, + ] + `); + }); + + it('plugin in nested async array', async () => { + const plugins = [ + Promise.resolve([ + { name: 'vite-plugin-nested-async-to-remove' }, + { name: 'vite-plugin-nested-async-keep' }, + ]), + ]; + const names = ['vite-plugin-nested-async-to-remove']; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "name": "vite-plugin-nested-async-keep", + }, + ], + ] + `); + }); + + it('async plugin in root', async () => { + const plugins = [ + Promise.resolve({ name: 'vite-plugin-async-root-to-remove' }), + Promise.resolve({ name: 'vite-plugin-async-root-keep' }), + ]; + const names = ['vite-plugin-async-root-to-remove']; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Object { + "name": "vite-plugin-async-root-keep", + }, + ] + `); + }); + + it('async plugin in nested array', async () => { + const plugins = [ + [ + Promise.resolve({ name: 'vite-plugin-async-nested-to-remove' }), + Promise.resolve({ name: 'vite-plugin-async-nested-keep' }), + ], + Promise.resolve({ name: 'vite-plugin-async-root-keep' }), + ]; + const names = ['vite-plugin-async-nested-to-remove']; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "name": "vite-plugin-async-nested-keep", + }, + ], + Object { + "name": "vite-plugin-async-root-keep", + }, + ] + `); + }); + it('async plugin in nested async array', async () => { + const plugins = [ + Promise.resolve([ + Promise.resolve({ name: 'vite-plugin-async-nested-async-to-remove' }), + Promise.resolve({ name: 'vite-plugin-async-nested-async-keep' }), + ]), + ]; + const names = ['vite-plugin-async-nested-async-to-remove']; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Array [ + Object { + "name": "vite-plugin-async-nested-async-keep", + }, + ], + ] + `); + }); + + it('multiple plugins in root', async () => { + const plugins = [ + { name: 'vite-plugin-root-first-to-remove' }, + { name: 'vite-plugin-root-keep' }, + { name: 'vite-plugin-root-second-to-remove' }, + ]; + const names = ['vite-plugin-root-first-to-remove', 'vite-plugin-root-second-to-remove']; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Object { + "name": "vite-plugin-root-keep", + }, + ] + `); + }); + + it('multiple plugins in all cases', async () => { + const plugins = [ + { name: 'vite-plugin-root-to-remove' }, + Promise.resolve({ name: 'vite-plugin-async-root-to-remove' }), + [{ name: 'vite-plugin-nested-to-remove' }], + Promise.resolve([{ name: 'vite-plugin-async-nested-to-remove' }]), + [Promise.resolve({ name: 'vite-plugin-nested-async-to-remove' })], + Promise.resolve([Promise.resolve({ name: 'vite-plugin-async-nested-async-to-remove' })]), + ]; + const names = [ + 'vite-plugin-root-to-remove', + 'vite-plugin-async-root-to-remove', + 'vite-plugin-nested-to-remove', + 'vite-plugin-async-nested-to-remove', + 'vite-plugin-nested-async-to-remove', + 'vite-plugin-async-nested-async-to-remove', + ]; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Array [], + Array [], + Array [], + Array [], + ] + `); + }); + }); + + it('should no-op if plugins are not found', async () => { + const plugins = [ + { name: 'vite-plugin-root' }, + [{ name: 'vite-plugin-in-nested-array' }], + Promise.resolve({ name: 'vite-plugin-async-root' }), + Promise.resolve([{ name: 'vite-plugin-in-nested-async-array' }]), + Promise.resolve([Promise.resolve({ name: 'vite-plugin-async-in-nested-async-array' })]), + ]; + const names = ['vite-plugin-to-remove-first', 'vite-plugin-to-remove-second']; + + expect(await withoutVitePlugins(plugins, names)).toMatchInlineSnapshot(` + Array [ + Object { + "name": "vite-plugin-root", + }, + Array [ + Object { + "name": "vite-plugin-in-nested-array", + }, + ], + Object { + "name": "vite-plugin-async-root", + }, + Array [ + Object { + "name": "vite-plugin-in-nested-async-array", + }, + ], + Array [ + Object { + "name": "vite-plugin-async-in-nested-async-array", + }, + ], + ] + `); + }); +}); diff --git a/code/lib/builder-vite/src/utils/without-vite-plugins.ts b/code/lib/builder-vite/src/utils/without-vite-plugins.ts new file mode 100644 index 000000000000..33f0dc5633ee --- /dev/null +++ b/code/lib/builder-vite/src/utils/without-vite-plugins.ts @@ -0,0 +1,24 @@ +import type { PluginOption } from 'vite'; + +/** + * Recursively removes all plugins with the names given + * Resolves async plugins + */ +export const withoutVitePlugins = async ( + plugins: PluginOption[] = [], + namesToRemove: string[] +): Promise => { + const result = []; + const resolvedPlugins = await Promise.all(plugins); + // eslint-disable-next-line no-restricted-syntax -- we need to await in the loop + for (const plugin of resolvedPlugins) { + if (Array.isArray(plugin)) { + // eslint-disable-next-line no-await-in-loop + result.push(await withoutVitePlugins(plugin, namesToRemove)); + } + if (plugin && 'name' in plugin && !namesToRemove.includes(plugin.name)) { + result.push(plugin); + } + } + return result; +}; diff --git a/code/lib/builder-vite/src/virtual-file-names.ts b/code/lib/builder-vite/src/virtual-file-names.ts new file mode 100644 index 000000000000..0da0c5517dec --- /dev/null +++ b/code/lib/builder-vite/src/virtual-file-names.ts @@ -0,0 +1,4 @@ +export const virtualFileId = '/virtual:/@storybook/builder-vite/vite-app.js'; +export const virtualStoriesFile = '/virtual:/@storybook/builder-vite/storybook-stories.js'; +export const virtualPreviewFile = '/virtual:/@storybook/builder-vite/preview-entry.js'; +export const virtualAddonSetupFile = '/virtual:/@storybook/builder-vite/setup-addons.js'; diff --git a/code/lib/builder-vite/src/vite-config.ts b/code/lib/builder-vite/src/vite-config.ts new file mode 100644 index 000000000000..1f0724544afd --- /dev/null +++ b/code/lib/builder-vite/src/vite-config.ts @@ -0,0 +1,105 @@ +import * as path from 'path'; +import { loadConfigFromFile, mergeConfig } from 'vite'; +import type { + ConfigEnv, + InlineConfig as ViteInlineConfig, + PluginOption, + UserConfig as ViteConfig, + InlineConfig, +} from 'vite'; +import { viteExternalsPlugin } from 'vite-plugin-externals'; +import { isPreservingSymlinks, getFrameworkName } from '@storybook/core-common'; +import { globals } from '@storybook/preview/globals'; +import { + codeGeneratorPlugin, + csfPlugin, + injectExportOrderPlugin, + mdxPlugin, + stripStoryHMRBoundary, +} from './plugins'; +import type { ExtendedOptions } from './types'; + +export type PluginConfigType = 'build' | 'development'; + +const configEnvServe: ConfigEnv = { + mode: 'development', + command: 'serve', + ssrBuild: false, +}; + +const configEnvBuild: ConfigEnv = { + mode: 'production', + command: 'build', + ssrBuild: false, +}; + +// Vite config that is common to development and production mode +export async function commonConfig( + options: ExtendedOptions, + _type: PluginConfigType +): Promise { + const configEnv = _type === 'development' ? configEnvServe : configEnvBuild; + + // I destructure away the `build` property from the user's config object + // I do this because I can contain config that breaks storybook, such as we had in a lit project. + // If the user needs to configure the `build` they need to do so in the viteFinal function in main.js. + const { config: { build: buildProperty = undefined, ...userConfig } = {} } = + (await loadConfigFromFile(configEnv)) ?? {}; + + const sbConfig: InlineConfig = { + configFile: false, + cacheDir: 'node_modules/.cache/.vite-storybook', + root: path.resolve(options.configDir, '..'), + // Allow storybook deployed as subfolder. See https://github.com/storybookjs/builder-vite/issues/238 + base: './', + plugins: await pluginConfig(options), + resolve: { + preserveSymlinks: isPreservingSymlinks(), + alias: { + assert: require.resolve('browser-assert'), + }, + }, + // If an envPrefix is specified in the vite config, add STORYBOOK_ to it, + // otherwise, add VITE_ and STORYBOOK_ so that vite doesn't lose its default. + envPrefix: userConfig.envPrefix ? 'STORYBOOK_' : ['VITE_', 'STORYBOOK_'], + }; + + const config: ViteConfig = mergeConfig(userConfig, sbConfig); + + return config; +} + +export async function pluginConfig(options: ExtendedOptions) { + const frameworkName = await getFrameworkName(options); + + const plugins = [ + codeGeneratorPlugin(options), + await csfPlugin(options), + await mdxPlugin(options), + injectExportOrderPlugin, + stripStoryHMRBoundary(), + { + name: 'storybook:allow-storybook-dir', + enforce: 'post', + config(config) { + // if there is NO allow list then Vite allows anything in the root directory + // if there is an allow list then Vite only allows anything in the listed directories + // add storybook specific directories only if there's an allow list so that we don't end up + // disallowing the root unless root is already disallowed + if (config?.server?.fs?.allow) { + config.server.fs.allow.push('.storybook'); + } + }, + }, + viteExternalsPlugin(globals, { useWindow: false }), + ] as PluginOption[]; + + // TODO: framework doesn't exist, should move into framework when/if built + if (frameworkName === '@storybook/glimmerx-vite') { + // eslint-disable-next-line global-require + const plugin = require('vite-plugin-glimmerx/index.cjs'); + plugins.push(plugin.default()); + } + + return plugins; +} diff --git a/code/lib/builder-vite/src/vite-server.ts b/code/lib/builder-vite/src/vite-server.ts new file mode 100644 index 000000000000..ed92f2e63c02 --- /dev/null +++ b/code/lib/builder-vite/src/vite-server.ts @@ -0,0 +1,33 @@ +import type { Server } from 'http'; +import { createServer } from 'vite'; +import { commonConfig } from './vite-config'; +import type { ExtendedOptions } from './types'; +import { getOptimizeDeps } from './optimizeDeps'; +import { sanitizeEnvVars } from './envs'; + +export async function createViteServer(options: ExtendedOptions, devServer: Server) { + const { presets } = options; + + const commonCfg = await commonConfig(options, 'development'); + + const config = { + ...commonCfg, + // Set up dev server + server: { + middlewareMode: true, + hmr: { + port: options.port, + server: devServer, + }, + fs: { + strict: true, + }, + }, + appType: 'custom' as const, + optimizeDeps: await getOptimizeDeps(commonCfg, options), + }; + + const finalConfig = await presets.apply('viteFinal', config, options); + + return createServer(await sanitizeEnvVars(options, finalConfig)); +} diff --git a/code/lib/builder-vite/tsconfig.json b/code/lib/builder-vite/tsconfig.json new file mode 100644 index 000000000000..d3576aa8f726 --- /dev/null +++ b/code/lib/builder-vite/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "resolveJsonModule": true, + "skipLibCheck": true + }, + "include": ["src/**/*"] +} diff --git a/code/lib/builder-webpack5/README.md b/code/lib/builder-webpack5/README.md new file mode 100644 index 000000000000..a5ee5d258da9 --- /dev/null +++ b/code/lib/builder-webpack5/README.md @@ -0,0 +1,11 @@ +# Builder-Webpack5 + +Builder implemented with `webpack5` and `webpack5`-compatible loaders/plugins/config, used by `@storybook/core-server` to build the preview iframe. + +```js +module.exports = { + core: { + builder: 'webpack5', + }, +}; +``` diff --git a/code/lib/builder-webpack5/jest.config.js b/code/lib/builder-webpack5/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/lib/builder-webpack5/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/builder-webpack5/package.json b/code/lib/builder-webpack5/package.json new file mode 100644 index 000000000000..7c195c1ff598 --- /dev/null +++ b/code/lib/builder-webpack5/package.json @@ -0,0 +1,135 @@ +{ + "name": "@storybook/builder-webpack5", + "version": "7.0.0-beta.25", + "description": "Storybook framework-agnostic API", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/core", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/core" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./presets/custom-webpack-preset": { + "node": "./dist/presets/custom-webpack-preset.js", + "require": "./dist/presets/custom-webpack-preset.js", + "import": "./dist/presets/custom-webpack-preset.mjs", + "types": "./dist/presets/custom-webpack-preset.d.ts" + }, + "./presets/preview-preset": { + "node": "./dist/presets/preview-preset.js", + "require": "./dist/presets/preview-preset.js", + "import": "./dist/presets/preview-preset.mjs", + "types": "./dist/presets/preview-preset.d.ts" + }, + "./templates/virtualModuleModernEntry.js.handlebars": "./templates/virtualModuleModernEntry.js.handlebars", + "./templates/preview.ejs": "./templates/preview.ejs", + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "templates/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@babel/core": "^7.12.10", + "@storybook/addons": "7.0.0-beta.25", + "@storybook/api": "7.0.0-beta.25", + "@storybook/channel-postmessage": "7.0.0-beta.25", + "@storybook/channel-websocket": "7.0.0-beta.25", + "@storybook/channels": "7.0.0-beta.25", + "@storybook/client-api": "7.0.0-beta.25", + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/core-webpack": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/preview": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/router": "7.0.0-beta.25", + "@storybook/store": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "@types/node": "^16.0.0", + "@types/semver": "^7.3.4", + "babel-loader": "^8.3.0", + "babel-plugin-named-exports-order": "^0.0.2", + "browser-assert": "^1.2.1", + "case-sensitive-paths-webpack-plugin": "^2.4.0", + "css-loader": "^6.7.1", + "express": "^4.17.3", + "fork-ts-checker-webpack-plugin": "^7.2.8", + "fs-extra": "^9.0.1", + "html-webpack-plugin": "^5.5.0", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "semver": "^7.3.7", + "slash": "^3.0.0", + "style-loader": "^3.3.1", + "terser-webpack-plugin": "^5.3.1", + "ts-dedent": "^2.0.0", + "util": "^0.12.4", + "util-deprecate": "^1.0.2", + "webpack": "5", + "webpack-dev-middleware": "^5.3.1", + "webpack-hot-middleware": "^2.25.1", + "webpack-virtual-modules": "^0.4.3" + }, + "devDependencies": { + "@types/pretty-hrtime": "^1.0.0", + "@types/terser-webpack-plugin": "^5.2.0", + "@types/webpack-dev-middleware": "^5.3.0", + "@types/webpack-hot-middleware": "^2.25.6", + "@types/webpack-virtual-modules": "^0.1.1", + "pretty-hrtime": "^1.0.3", + "typescript": "~4.9.3" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts", + "./src/presets/custom-webpack-preset.ts", + "./src/presets/preview-preset.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/lib/builder-webpack5/src/index.ts b/code/lib/builder-webpack5/src/index.ts new file mode 100644 index 000000000000..64a985f7dca1 --- /dev/null +++ b/code/lib/builder-webpack5/src/index.ts @@ -0,0 +1,333 @@ +import type { Stats, Configuration, StatsOptions } from 'webpack'; +import webpack, { ProgressPlugin } from 'webpack'; +import webpackDevMiddleware from 'webpack-dev-middleware'; +import webpackHotMiddleware from 'webpack-hot-middleware'; +import { logger } from '@storybook/node-logger'; +import type { Builder, Options } from '@storybook/types'; +import { checkWebpackVersion } from '@storybook/core-webpack'; +import { dirname, join, parse } from 'path'; +import express from 'express'; +import fs from 'fs-extra'; +import { PREVIEW_BUILDER_PROGRESS } from '@storybook/core-events'; + +import prettyTime from 'pretty-hrtime'; + +export * from './types'; + +export const printDuration = (startTime: [number, number]) => + prettyTime(process.hrtime(startTime)) + .replace(' ms', ' milliseconds') + .replace(' s', ' seconds') + .replace(' m', ' minutes'); + +let compilation: ReturnType | undefined; +let reject: (reason?: any) => void; + +type WebpackBuilder = Builder; +type Unpromise> = T extends Promise ? U : never; + +type BuilderStartOptions = Parameters['0']; +type BuilderStartResult = Unpromise>; +type StarterFunction = ( + options: BuilderStartOptions +) => AsyncGenerator; + +type BuilderBuildOptions = Parameters['0']; +type BuilderBuildResult = Unpromise>; +type BuilderFunction = ( + options: BuilderBuildOptions +) => AsyncGenerator; + +export const executor = { + get: async (options: Options) => { + const version = ((await options.presets.apply('webpackVersion')) || '5') as string; + const webpackInstance = + (await options.presets.apply<{ default: typeof webpack }>('webpackInstance'))?.default || + webpack; + checkWebpackVersion({ version }, '5', 'builder-webpack5'); + return webpackInstance; + }, +}; + +export const getConfig: WebpackBuilder['getConfig'] = async (options) => { + const { presets } = options; + const typescriptOptions = await presets.apply('typescript', {}, options); + const babelOptions = await presets.apply('babel', {}, { ...options, typescriptOptions }); + const frameworkOptions = await presets.apply('frameworkOptions'); + + return presets.apply( + 'webpack', + {}, + { + ...options, + babelOptions, + typescriptOptions, + frameworkOptions, + } + ) as any; +}; + +let asyncIterator: ReturnType | ReturnType; + +export const bail: WebpackBuilder['bail'] = async () => { + if (asyncIterator) { + try { + // we tell the builder (that started) to stop ASAP and wait + await asyncIterator.throw(new Error()); + } catch (e) { + // + } + } + + if (reject) { + reject(); + } + // we wait for the compiler to finish it's work, so it's command-line output doesn't interfere + return new Promise((res, rej) => { + if (process && compilation) { + try { + compilation.close(() => res()); + logger.warn('Force closed preview build'); + } catch (err) { + logger.warn('Unable to close preview build!'); + res(); + } + } else { + res(); + } + }); +}; + +/** + * This function is a generator so that we can abort it mid process + * in case of failure coming from other processes e.g. preview builder + * + * I am sorry for making you read about generators today :') + */ +const starter: StarterFunction = async function* starterGeneratorFn({ + startTime, + options, + router, + channel, +}) { + const webpackInstance = await executor.get(options); + yield; + + const config = await getConfig(options); + yield; + const compiler = webpackInstance(config); + + if (!compiler) { + const err = `${config.name}: missing webpack compiler at runtime!`; + logger.error(err); + return { + bail, + totalTime: process.hrtime(startTime), + stats: { + hasErrors: () => true, + hasWarnings: () => false, + toJson: () => ({ warnings: [] as any[], errors: [err] }), + } as any as Stats, + }; + } + + yield; + const modulesCount = (await options.cache?.get('modulesCount').catch(() => {})) || 1000; + let totalModules: number; + let value = 0; + + new ProgressPlugin({ + handler: (newValue, message, arg3) => { + value = Math.max(newValue, value); // never go backwards + const progress = { value, message: message.charAt(0).toUpperCase() + message.slice(1) }; + if (message === 'building') { + // arg3 undefined in webpack5 + const counts = (arg3 && arg3.match(/(\d+)\/(\d+)/)) || []; + const complete = parseInt(counts[1], 10); + const total = parseInt(counts[2], 10); + if (!Number.isNaN(complete) && !Number.isNaN(total)) { + (progress as any).modules = { complete, total }; + totalModules = total; + } + } + + if (value === 1) { + if (options.cache) { + options.cache.set('modulesCount', totalModules); + } + + if (!progress.message) { + progress.message = `Completed in ${printDuration(startTime)}.`; + } + } + + channel.emit(PREVIEW_BUILDER_PROGRESS, [progress]); + }, + modulesCount, + }).apply(compiler); + + const middlewareOptions: Parameters[1] = { + publicPath: config.output?.publicPath as string, + writeToDisk: true, + }; + + compilation = webpackDevMiddleware(compiler, middlewareOptions); + + const previewResolvedDir = dirname(require.resolve('@storybook/preview/package.json')); + const previewDirOrigin = join(previewResolvedDir, 'dist'); + + router.use(`/sb-preview`, express.static(previewDirOrigin, { immutable: true, maxAge: '5m' })); + + router.use(compilation); + router.use(webpackHotMiddleware(compiler as any)); + + const stats = await new Promise((ready, stop) => { + compilation?.waitUntilValid(ready as any); + reject = stop; + }); + yield; + + if (!stats) { + throw new Error('no stats after building preview'); + } + + if (stats.hasErrors()) { + // eslint-disable-next-line @typescript-eslint/no-throw-literal + throw stats; + } + + return { + bail, + stats, + totalTime: process.hrtime(startTime), + }; +}; + +/** + * This function is a generator so that we can abort it mid process + * in case of failure coming from other processes e.g. manager builder + * + * I am sorry for making you read about generators today :') + */ +const builder: BuilderFunction = async function* builderGeneratorFn({ startTime, options }) { + const webpackInstance = await executor.get(options); + yield; + logger.info('=> Compiling preview..'); + const config = await getConfig(options); + yield; + + const compiler = webpackInstance(config); + + if (!compiler) { + const err = `${config.name}: missing webpack compiler at runtime!`; + logger.error(err); + return { + hasErrors: () => true, + hasWarnings: () => false, + toJson: () => ({ warnings: [] as any[], errors: [err] }), + } as any as Stats; + } + + const webpackCompilation = new Promise((succeed, fail) => { + compiler.run((error, stats) => { + if (error || !stats || stats.hasErrors()) { + logger.error('=> Failed to build the preview'); + process.exitCode = 1; + + if (error) { + logger.error(error.message); + + compiler.close(() => fail(error)); + + return; + } + + if (stats && (stats.hasErrors() || stats.hasWarnings())) { + const { warnings = [], errors = [] } = stats.toJson( + typeof config.stats === 'string' + ? config.stats + : { + warnings: true, + errors: true, + ...(config.stats as StatsOptions), + } + ); + + errors.forEach((e) => logger.error(e.message)); + warnings.forEach((e) => logger.error(e.message)); + + compiler.close(() => + options.debugWebpack + ? fail(stats) + : fail(new Error('=> Webpack failed, learn more with --debug-webpack')) + ); + + return; + } + } + + logger.trace({ message: '=> Preview built', time: process.hrtime(startTime) }); + if (stats && stats.hasWarnings()) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- we know it has warnings because of hasWarnings() + stats + .toJson({ warnings: true } as StatsOptions) + .warnings!.forEach((e) => logger.warn(e.message)); + } + + // https://webpack.js.org/api/node/#run + // #15227 + compiler.close((closeErr) => { + if (closeErr) { + return fail(closeErr); + } + + return succeed(stats as Stats); + }); + }); + }); + + const previewResolvedDir = dirname(require.resolve('@storybook/preview/package.json')); + const previewDirOrigin = join(previewResolvedDir, 'dist'); + const previewDirTarget = join(options.outputDir || '', `sb-preview`); + + const previewFiles = fs.copy(previewDirOrigin, previewDirTarget, { + filter: (src) => { + const { ext } = parse(src); + if (ext) { + return ext === '.mjs'; + } + return true; + }, + }); + + const [webpackCompilationOutput] = await Promise.all([webpackCompilation, previewFiles]); + + return webpackCompilationOutput; +}; + +export const start = async (options: BuilderStartOptions) => { + asyncIterator = starter(options); + let result; + + do { + // eslint-disable-next-line no-await-in-loop + result = await asyncIterator.next(); + } while (!result.done); + + return result.value; +}; + +export const build = async (options: BuilderStartOptions) => { + asyncIterator = builder(options); + let result; + + do { + // eslint-disable-next-line no-await-in-loop + result = await asyncIterator.next(); + } while (!result.done); + + return result.value; +}; + +export const corePresets = [join(__dirname, 'presets/preview-preset.js')]; +export const overridePresets = [join(__dirname, './presets/custom-webpack-preset.js')]; diff --git a/code/lib/builder-webpack5/src/presets/custom-webpack-preset.ts b/code/lib/builder-webpack5/src/presets/custom-webpack-preset.ts new file mode 100644 index 000000000000..d71a67322d3e --- /dev/null +++ b/code/lib/builder-webpack5/src/presets/custom-webpack-preset.ts @@ -0,0 +1,47 @@ +import * as webpackReal from 'webpack'; +import { logger } from '@storybook/node-logger'; +import type { Options, CoreConfig } from '@storybook/types'; +import type { Configuration } from 'webpack'; +import deprecate from 'util-deprecate'; +import { dedent } from 'ts-dedent'; +import { loadCustomWebpackConfig } from '@storybook/core-webpack'; +import { createDefaultWebpackConfig } from '../preview/base-webpack.config'; + +export async function webpack(config: Configuration, options: Options) { + // @ts-expect-error (Converted from ts-ignore) + const { configDir, configType, presets, webpackConfig } = options; + + const coreOptions = await presets.apply('core'); + + let defaultConfig = config; + if (!coreOptions?.disableWebpackDefaults) { + defaultConfig = await createDefaultWebpackConfig(config, options); + } + + const finalDefaultConfig = await presets.apply('webpackFinal', defaultConfig, options); + + // through standalone webpackConfig option + if (webpackConfig) { + return deprecate( + webpackConfig, + dedent` + You've provided a webpack config directly in CallOptions, this is not recommended. Please use presets instead. This feature will be removed in 7.0 + ` + )(finalDefaultConfig); + } + + // Check whether user has a custom webpack config file and + // return the (extended) base configuration if it's not available. + const customConfig = loadCustomWebpackConfig(configDir); + + if (typeof customConfig === 'function') { + logger.info('=> Loading custom Webpack config (full-control mode).'); + return customConfig({ config: finalDefaultConfig, mode: configType }); + } + + logger.info('=> Using default Webpack5 setup'); + return finalDefaultConfig; +} + +export const webpackInstance = async () => webpackReal; +export const webpackVersion = async () => '5'; diff --git a/code/lib/builder-webpack5/src/presets/preview-preset.ts b/code/lib/builder-webpack5/src/presets/preview-preset.ts new file mode 100644 index 000000000000..eba1e361bbdf --- /dev/null +++ b/code/lib/builder-webpack5/src/presets/preview-preset.ts @@ -0,0 +1,33 @@ +import webpackConfig from '../preview/iframe-webpack.config'; + +export const webpack = async (_: unknown, options: any) => webpackConfig(options); + +export const entries = async (_: unknown, options: any) => { + let result: string[] = []; + + if (options.configType === 'DEVELOPMENT') { + // Suppress informational messages when --quiet is specified. webpack-hot-middleware's quiet + // parameter would also suppress warnings. + result = result.concat( + `${require.resolve('webpack-hot-middleware/client')}?reload=true&quiet=false&noInfo=${ + options.quiet + }` + ); + } + + return result; +}; + +export const babel = async (config: any, options: any) => ({ + ...config, + overrides: [ + ...(config?.overrides || []), + { + test: /\.(story|stories).*$/, + plugins: [require.resolve('babel-plugin-named-exports-order')], + }, + ], +}); + +export const previewMainTemplate = () => + require.resolve('@storybook/builder-webpack5/templates/preview.ejs'); diff --git a/code/lib/builder-webpack5/src/preview/babel-loader-preview.ts b/code/lib/builder-webpack5/src/preview/babel-loader-preview.ts new file mode 100644 index 000000000000..7728ceef58c6 --- /dev/null +++ b/code/lib/builder-webpack5/src/preview/babel-loader-preview.ts @@ -0,0 +1,16 @@ +import { getProjectRoot } from '@storybook/core-common'; +import type { TypescriptOptions } from '../types'; + +export const createBabelLoader = (options: any, typescriptOptions: TypescriptOptions) => { + return { + test: typescriptOptions.skipBabel ? /\.(mjs|jsx?)$/ : /\.(mjs|tsx?|jsx?)$/, + use: [ + { + loader: require.resolve('babel-loader'), + options, + }, + ], + include: [getProjectRoot()], + exclude: /node_modules/, + }; +}; diff --git a/code/lib/builder-webpack5/src/preview/base-webpack.config.ts b/code/lib/builder-webpack5/src/preview/base-webpack.config.ts new file mode 100644 index 000000000000..62ba0d8ed50b --- /dev/null +++ b/code/lib/builder-webpack5/src/preview/base-webpack.config.ts @@ -0,0 +1,88 @@ +import { logger } from '@storybook/node-logger'; +import type { Options } from '@storybook/types'; +import type { Configuration } from 'webpack'; + +export async function createDefaultWebpackConfig( + storybookBaseConfig: Configuration, + options: Options +): Promise { + if ( + options.presetsList?.some((preset) => + /@storybook(\/|\\)preset-create-react-app/.test( + typeof preset === 'string' ? preset : preset.name + ) + ) + ) { + return storybookBaseConfig; + } + + const hasPostcssAddon = options.presetsList?.some((preset) => + /@storybook(\/|\\)addon-postcss/.test(typeof preset === 'string' ? preset : preset.name) + ); + + let cssLoaders = {}; + if (!hasPostcssAddon) { + logger.info(`=> Using implicit CSS loaders`); + cssLoaders = { + test: /\.css$/, + sideEffects: true, + use: [ + // TODO: Decide if we want to keep style-loader & css-loader in core + // Trying to apply style-loader or css-loader to files that already have been + // processed by them causes webpack to crash, so no one else can add similar + // loader configurations to the `.css` extension. + require.resolve('style-loader'), + { + loader: require.resolve('css-loader'), + options: { + importLoaders: 1, + }, + }, + ], + }; + } + + const isProd = storybookBaseConfig.mode !== 'development'; + + return { + ...storybookBaseConfig, + module: { + ...storybookBaseConfig.module, + rules: [ + ...(storybookBaseConfig.module?.rules || []), + cssLoaders, + { + test: /\.(svg|ico|jpg|jpeg|png|apng|gif|eot|otf|webp|ttf|woff|woff2|cur|ani|pdf)(\?.*)?$/, + type: 'asset/resource', + generator: { + filename: isProd + ? 'static/media/[name].[contenthash:8][ext]' + : 'static/media/[path][name][ext]', + }, + }, + { + test: /\.(mp4|webm|wav|mp3|m4a|aac|oga)(\?.*)?$/, + type: 'asset', + parser: { + dataUrlCondition: { + maxSize: 10000, + }, + }, + generator: { + filename: isProd + ? 'static/media/[name].[contenthash:8][ext]' + : 'static/media/[path][name][ext]', + }, + }, + ], + }, + resolve: { + ...storybookBaseConfig.resolve, + fallback: { + crypto: false, + assert: false, + ...storybookBaseConfig.resolve?.fallback, + }, + }, + }; +} diff --git a/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts b/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts new file mode 100644 index 000000000000..cb85f840dc5e --- /dev/null +++ b/code/lib/builder-webpack5/src/preview/iframe-webpack.config.ts @@ -0,0 +1,329 @@ +import { dirname, join, resolve } from 'path'; +import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin, ProvidePlugin } from 'webpack'; +import type { Configuration } from 'webpack'; +import HtmlWebpackPlugin from 'html-webpack-plugin'; +// @ts-expect-error (I removed this on purpose, because it's incorrect) +import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; +import TerserWebpackPlugin from 'terser-webpack-plugin'; +import VirtualModulePlugin from 'webpack-virtual-modules'; +import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; +import slash from 'slash'; + +import type { Options, CoreConfig, DocsOptions, PreviewAnnotation } from '@storybook/types'; +import { globals } from '@storybook/preview/globals'; +import { + getRendererName, + stringifyProcessEnvs, + handlebars, + interpolate, + normalizeStories, + readTemplate, + loadPreviewOrConfigFile, + isPreservingSymlinks, +} from '@storybook/core-common'; +import { toRequireContextString, toImportFn } from '@storybook/core-webpack'; +import type { BuilderOptions, TypescriptOptions } from '../types'; +import { createBabelLoader } from './babel-loader-preview'; + +const storybookPaths: Record = { + global: dirname(require.resolve('@storybook/global/package.json')), + ...[ + // these packages are not pre-bundled because of react dependencies + 'api', + 'components', + 'global', + 'manager-api', + 'router', + 'theming', + ].reduce( + (acc, sbPackage) => ({ + ...acc, + [`@storybook/${sbPackage}`]: dirname(require.resolve(`@storybook/${sbPackage}/package.json`)), + }), + {} + ), + // deprecated, remove in 8.0 + [`@storybook/api`]: dirname(require.resolve(`@storybook/manager-api/package.json`)), +}; + +export default async ( + options: Options & Record & { typescriptOptions: TypescriptOptions } +): Promise => { + const { + outputDir = join('.', 'public'), + quiet, + packageJson, + configType, + presets, + previewUrl, + babelOptions, + typescriptOptions, + features, + serverChannelUrl, + } = options; + + const isProd = configType === 'PRODUCTION'; + const workingDir = process.cwd(); + + const [ + coreOptions, + frameworkOptions, + envs, + logLevel, + headHtmlSnippet, + bodyHtmlSnippet, + template, + docsOptions, + entries, + nonNormalizedStories, + ] = await Promise.all([ + presets.apply('core'), + presets.apply('frameworkOptions'), + presets.apply>('env'), + presets.apply('logLevel', undefined), + presets.apply('previewHead'), + presets.apply('previewBody'), + presets.apply('previewMainTemplate'), + presets.apply('docs'), + presets.apply('entries', [], options), + presets.apply('stories', [], options), + ]); + + const stories = normalizeStories(nonNormalizedStories, { + configDir: options.configDir, + workingDir, + }); + + const builderOptions: BuilderOptions = + typeof coreOptions.builder === 'string' + ? {} + : coreOptions.builder?.options || ({} as BuilderOptions); + + const previewAnnotations = [ + ...(await presets.apply('previewAnnotations', [], options)).map( + (entry) => { + // If entry is an object, use the absolute import specifier. + // This is to maintain back-compat with community addons that bundle other addons + // and package managers that "hide" sub dependencies (e.g. pnpm / yarn pnp) + // The vite builder uses the bare import specifier. + if (typeof entry === 'object') { + return entry.absolute; + } + return slash(entry); + } + ), + loadPreviewOrConfigFile(options), + ].filter(Boolean); + + const virtualModuleMapping: Record = {}; + if (features?.storyStoreV7) { + const storiesFilename = 'storybook-stories.js'; + const storiesPath = resolve(join(workingDir, storiesFilename)); + + const needPipelinedImport = !!builderOptions.lazyCompilation && !isProd; + virtualModuleMapping[storiesPath] = toImportFn(stories, { needPipelinedImport }); + const configEntryPath = resolve(join(workingDir, 'storybook-config-entry.js')); + virtualModuleMapping[configEntryPath] = handlebars( + await readTemplate( + require.resolve( + '@storybook/builder-webpack5/templates/virtualModuleModernEntry.js.handlebars' + ) + ), + { + storiesFilename, + previewAnnotations, + } + // We need to double escape `\` for webpack. We may have some in windows paths + ).replace(/\\/g, '\\\\'); + entries.push(configEntryPath); + } else { + const rendererName = await getRendererName(options); + + const rendererInitEntry = resolve(join(workingDir, 'storybook-init-renderer-entry.js')); + virtualModuleMapping[rendererInitEntry] = `import '${rendererName}';`; + entries.push(rendererInitEntry); + + const entryTemplate = await readTemplate( + join(__dirname, '..', '..', 'templates', 'virtualModuleEntry.template.js') + ); + + previewAnnotations.forEach((previewAnnotationFilename: string | undefined) => { + if (!previewAnnotationFilename) return; + + // Ensure that relative paths end up mapped to a filename in the cwd, so a later import + // of the `previewAnnotationFilename` in the template works. + const entryFilename = previewAnnotationFilename.startsWith('.') + ? `${previewAnnotationFilename.replace(/(\w)(\/|\\)/g, '$1-')}-generated-config-entry.js` + : `${previewAnnotationFilename}-generated-config-entry.js`; + // NOTE: although this file is also from the `dist/cjs` directory, it is actually a ESM + // file, see https://github.com/storybookjs/storybook/pull/16727#issuecomment-986485173 + virtualModuleMapping[entryFilename] = interpolate(entryTemplate, { + previewAnnotationFilename, + }); + entries.push(entryFilename); + }); + if (stories.length > 0) { + const storyTemplate = await readTemplate( + join(__dirname, '..', '..', 'templates', 'virtualModuleStory.template.js') + ); + // NOTE: this file has a `.cjs` extension as it is a CJS file (from `dist/cjs`) and runs + // in the user's webpack mode, which may be strict about the use of require/import. + // See https://github.com/storybookjs/storybook/issues/14877 + const storiesFilename = resolve(join(workingDir, `generated-stories-entry.cjs`)); + virtualModuleMapping[storiesFilename] = interpolate(storyTemplate, { + rendererName, + }) + // Make sure we also replace quotes for this one + .replace("'{{stories}}'", stories.map(toRequireContextString).join(',')); + entries.push(storiesFilename); + } + } + + const shouldCheckTs = typescriptOptions.check && !typescriptOptions.skipBabel; + const tsCheckOptions = typescriptOptions.checkOptions || {}; + + const cacheConfig = builderOptions.fsCache ? { cache: { type: 'filesystem' as const } } : {}; + const lazyCompilationConfig = + builderOptions.lazyCompilation && !isProd + ? { + lazyCompilation: { entries: false }, + } + : {}; + + return { + name: 'preview', + mode: isProd ? 'production' : 'development', + bail: isProd, + devtool: 'cheap-module-source-map', + entry: entries, + output: { + path: resolve(process.cwd(), outputDir), + filename: isProd ? '[name].[contenthash:8].iframe.bundle.js' : '[name].iframe.bundle.js', + publicPath: '', + }, + stats: { + preset: 'none', + logging: 'error', + }, + watchOptions: { + ignored: /node_modules/, + }, + externals: globals, + ignoreWarnings: [ + { + message: /export '\S+' was not found in 'global'/, + }, + { + message: /export '\S+' was not found in '@storybook\/global'/, + }, + ], + plugins: [ + Object.keys(virtualModuleMapping).length > 0 + ? new VirtualModulePlugin(virtualModuleMapping) + : (null as any), + new HtmlWebpackPlugin({ + filename: `iframe.html`, + // FIXME: `none` isn't a known option + chunksSortMode: 'none' as any, + alwaysWriteToDisk: true, + inject: false, + template, + templateParameters: { + version: packageJson.version, + globals: { + CONFIG_TYPE: configType, + LOGLEVEL: logLevel, + FRAMEWORK_OPTIONS: frameworkOptions, + CHANNEL_OPTIONS: coreOptions.channelOptions, + FEATURES: features, + PREVIEW_URL: previewUrl, + STORIES: stories.map((specifier) => ({ + ...specifier, + importPathMatcher: specifier.importPathMatcher.source, + })), + DOCS_OPTIONS: docsOptions, + SERVER_CHANNEL_URL: serverChannelUrl, + }, + headHtmlSnippet, + bodyHtmlSnippet, + }, + minify: { + collapseWhitespace: true, + removeComments: true, + removeRedundantAttributes: true, + removeScriptTypeAttributes: false, + removeStyleLinkTypeAttributes: true, + useShortDoctype: true, + }, + }), + new DefinePlugin({ + ...stringifyProcessEnvs(envs), + NODE_ENV: JSON.stringify(process.env.NODE_ENV), + }), + new ProvidePlugin({ process: require.resolve('process/browser.js') }), + isProd ? null : new HotModuleReplacementPlugin(), + new CaseSensitivePathsPlugin(), + quiet ? null : new ProgressPlugin({}), + shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null, + ].filter(Boolean), + module: { + rules: [ + { + test: /\.m?js$/, + type: 'javascript/auto', + }, + { + test: /\.m?js$/, + resolve: { + fullySpecified: false, + }, + }, + createBabelLoader(babelOptions, typescriptOptions), + { + test: /\.md$/, + type: 'asset/source', + }, + ], + }, + resolve: { + extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx', '.json', '.cjs'], + modules: ['node_modules'].concat(envs.NODE_PATH || []), + mainFields: ['browser', 'module', 'main'].filter(Boolean), + alias: storybookPaths, + fallback: { + path: require.resolve('path-browserify'), + assert: require.resolve('browser-assert'), + util: require.resolve('util'), + }, + // Set webpack to resolve symlinks based on whether the user has asked node to. + // This feels like it should be default out-of-the-box in webpack :shrug: + symlinks: !isPreservingSymlinks(), + }, + optimization: { + splitChunks: { + chunks: 'all', + }, + runtimeChunk: true, + sideEffects: true, + usedExports: isProd, + moduleIds: 'named', + minimizer: isProd + ? [ + new TerserWebpackPlugin({ + parallel: true, + terserOptions: { + sourceMap: true, + mangle: false, + keep_fnames: true, + }, + }), + ] + : [], + }, + performance: { + hints: isProd ? 'warning' : false, + }, + ...cacheConfig, + experiments: { ...lazyCompilationConfig }, + }; +}; diff --git a/code/lib/builder-webpack5/src/types.ts b/code/lib/builder-webpack5/src/types.ts new file mode 100644 index 000000000000..6e55f145ca22 --- /dev/null +++ b/code/lib/builder-webpack5/src/types.ts @@ -0,0 +1,45 @@ +import type { Configuration, Stats } from 'webpack'; +import type { + Options, + BuilderResult as BuilderResultBase, + StorybookConfig, +} from '@storybook/core-webpack'; + +import type ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin'; + +type TypeScriptOptionsBase = Required['typescript']; + +/** + * Options for TypeScript usage within Storybook. + */ +export interface TypescriptOptions extends TypeScriptOptionsBase { + /** + * Configures `fork-ts-checker-webpack-plugin` + */ + checkOptions?: ConstructorParameters[0]; +} + +export interface StorybookConfigWebpack extends Pick { + /** + * Modify or return a custom Webpack config after the Storybook's default configuration + * has run (mostly used by addons). + */ + webpack?: (config: Configuration, options: Options) => Configuration | Promise; + + /** + * Modify or return a custom Webpack config after every addon has run. + */ + webpackFinal?: ( + config: Configuration, + options: Options + ) => Configuration | Promise; +} + +export type BuilderOptions = { + fsCache?: boolean; + lazyCompilation?: boolean; +}; + +export interface BuilderResult extends BuilderResultBase { + stats?: Stats; +} diff --git a/code/lib/builder-webpack5/templates/preview.ejs b/code/lib/builder-webpack5/templates/preview.ejs new file mode 100644 index 000000000000..b3f05805236a --- /dev/null +++ b/code/lib/builder-webpack5/templates/preview.ejs @@ -0,0 +1,48 @@ + + + + + <%= htmlWebpackPlugin.options.title || 'Storybook'%> + + <% if (htmlWebpackPlugin.files.favicon) { %> + + <% } %> + + + + <% if (typeof headHtmlSnippet !== 'undefined') { %> <%= headHtmlSnippet %> <% } %> <% + htmlWebpackPlugin.files.css.forEach(file => { %> + + <% }); %> + + + + + <% if (typeof bodyHtmlSnippet !== 'undefined') { %> <%= bodyHtmlSnippet %> <% } %> + +
    +
    + + <% if (typeof globals !== 'undefined' && Object.keys(globals).length) { %> + + <% } %> + + + diff --git a/code/lib/builder-webpack5/templates/virtualModuleEntry.template.js b/code/lib/builder-webpack5/templates/virtualModuleEntry.template.js new file mode 100644 index 000000000000..d078efc3eb53 --- /dev/null +++ b/code/lib/builder-webpack5/templates/virtualModuleEntry.template.js @@ -0,0 +1,63 @@ +/* eslint-disable import/no-unresolved */ +import { + addDecorator, + addParameters, + addLoader, + addArgs, + addArgTypes, + addStepRunner, + addArgsEnhancer, + addArgTypesEnhancer, + setGlobalRender, +} from '@storybook/preview-api'; +import * as previewAnnotations from '{{previewAnnotationFilename}}'; + +Object.keys(previewAnnotations).forEach((key) => { + const value = previewAnnotations[key]; + switch (key) { + case 'args': { + return addArgs(value); + } + case 'argTypes': { + return addArgTypes(value); + } + case 'decorators': { + return value.forEach((decorator) => addDecorator(decorator, false)); + } + case 'loaders': { + return value.forEach((loader) => addLoader(loader, false)); + } + case 'parameters': { + return addParameters({ ...value }, false); + } + case 'argTypesEnhancers': { + return value.forEach((enhancer) => addArgTypesEnhancer(enhancer)); + } + case 'argsEnhancers': { + return value.forEach((enhancer) => addArgsEnhancer(enhancer)); + } + case 'render': { + return setGlobalRender(value); + } + case 'globals': + case 'globalTypes': { + const v = {}; + v[key] = value; + return addParameters(v, false); + } + case '__namedExportsOrder': + case 'decorateStory': + case 'renderToDOM': // deprecated + case 'renderToCanvas': { + return null; // This key is not handled directly in v6 mode. + } + case 'runStep': { + return addStepRunner(value); + } + default: { + return console.log( + `Unknown key '${key}' exported by preview annotation file '{{previewAnnotationFilename}}'` + ); + } + } +}); diff --git a/code/lib/builder-webpack5/templates/virtualModuleModernEntry.js.handlebars b/code/lib/builder-webpack5/templates/virtualModuleModernEntry.js.handlebars new file mode 100644 index 000000000000..3f77a83eeca0 --- /dev/null +++ b/code/lib/builder-webpack5/templates/virtualModuleModernEntry.js.handlebars @@ -0,0 +1,42 @@ +import { global } from '@storybook/global'; + +import { ClientApi, PreviewWeb, addons, composeConfigs } from '@storybook/preview-api'; +import { createChannel as createPostMessageChannel } from '@storybook/channel-postmessage'; +import { createChannel as createWebSocketChannel } from '@storybook/channel-websocket'; + +import { importFn } from './{{storiesFilename}}'; + +const { SERVER_CHANNEL_URL } = global; + +const getProjectAnnotations = () => + composeConfigs([{{#each previewAnnotations}}require('{{this}}'),{{/each}}]); + +const channel = createPostMessageChannel({ page: 'preview' }); +addons.setChannel(channel); + +if (SERVER_CHANNEL_URL) { + const serverChannel = createWebSocketChannel({ url: SERVER_CHANNEL_URL, }); + addons.setServerChannel(serverChannel); + window.__STORYBOOK_SERVER_CHANNEL__ = serverChannel; +} + +const preview = new PreviewWeb(); + +window.__STORYBOOK_PREVIEW__ = preview; +window.__STORYBOOK_STORY_STORE__ = preview.storyStore; +window.__STORYBOOK_ADDONS_CHANNEL__ = channel; +window.__STORYBOOK_CLIENT_API__ = new ClientApi({ storyStore: preview.storyStore }); + +preview.initialize({ importFn, getProjectAnnotations }); + +if (import.meta.webpackHot) { + import.meta.webpackHot.accept('./{{storiesFilename}}', () => { + // importFn has changed so we need to patch the new one in + preview.onStoriesChanged({ importFn }); + }); + + import.meta.webpackHot.accept([{{#each previewAnnotations}}'{{this}}',{{/each}}], () => { + // getProjectAnnotations has changed so we need to patch the new one in + preview.onGetProjectAnnotationsChanged({ getProjectAnnotations }); + }); +} \ No newline at end of file diff --git a/code/lib/builder-webpack5/templates/virtualModuleStory.template.js b/code/lib/builder-webpack5/templates/virtualModuleStory.template.js new file mode 100644 index 000000000000..f7a668cab55f --- /dev/null +++ b/code/lib/builder-webpack5/templates/virtualModuleStory.template.js @@ -0,0 +1,3 @@ +const { configure } = require('{{rendererName}}'); + +configure(['{{stories}}'], module, false); diff --git a/code/lib/builder-webpack5/tsconfig.json b/code/lib/builder-webpack5/tsconfig.json new file mode 100644 index 000000000000..5b3f3a56a68d --- /dev/null +++ b/code/lib/builder-webpack5/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "strict": true, + "skipLibCheck": true + }, + "include": ["src/**/*"] +} diff --git a/code/lib/builder-webpack5/typings.d.ts b/code/lib/builder-webpack5/typings.d.ts new file mode 100644 index 000000000000..df888b533e90 --- /dev/null +++ b/code/lib/builder-webpack5/typings.d.ts @@ -0,0 +1,2 @@ +declare module 'lazy-universal-dotenv'; +declare module '@storybook/theming/paths'; diff --git a/code/lib/channel-postmessage/README.md b/code/lib/channel-postmessage/README.md new file mode 100644 index 000000000000..8edc7163f9e2 --- /dev/null +++ b/code/lib/channel-postmessage/README.md @@ -0,0 +1,14 @@ +# Storybook PostMessage Channel + +Storybook PostMessage Channel is a channel for Storybook that can be used when the Storybook Renderer runs inside an iframe or a child window. +A channel can be created using the `createChannel` function. + +```js +import { createChannel } from '@storybook/channel-postmessage'; + +const channel = createChannel({ key: 'postmsg-key' }); +``` + +--- + +For more information visit: [storybook.js.org](https://storybook.js.org) diff --git a/code/lib/channel-postmessage/jest.config.js b/code/lib/channel-postmessage/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/lib/channel-postmessage/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/channel-postmessage/package.json b/code/lib/channel-postmessage/package.json new file mode 100644 index 000000000000..c16d1e452594 --- /dev/null +++ b/code/lib/channel-postmessage/package.json @@ -0,0 +1,65 @@ +{ + "name": "@storybook/channel-postmessage", + "version": "7.0.0-beta.25", + "description": "", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/channel-postmessage", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/channel-postmessage" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "sideEffects": false, + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/channels": "7.0.0-beta.25", + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "qs": "^6.10.0", + "telejson": "^7.0.3" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/lib/channel-postmessage/src/index.ts b/code/lib/channel-postmessage/src/index.ts new file mode 100644 index 000000000000..14caf77e13f8 --- /dev/null +++ b/code/lib/channel-postmessage/src/index.ts @@ -0,0 +1,290 @@ +import { global } from '@storybook/global'; +import * as EVENTS from '@storybook/core-events'; +import { Channel } from '@storybook/channels'; +import type { ChannelHandler, ChannelEvent } from '@storybook/channels'; +import { logger, pretty } from '@storybook/client-logger'; +import { isJSON, parse, stringify } from 'telejson'; +import qs from 'qs'; + +const { document, location } = global; + +interface Config { + page: 'manager' | 'preview'; +} + +interface BufferedEvent { + event: ChannelEvent; + resolve: (value?: any) => void; + reject: (reason?: any) => void; +} + +export const KEY = 'storybook-channel'; + +const defaultEventOptions = { allowFunction: true, maxDepth: 25 }; + +// TODO: we should export a method for opening child windows here and keep track of em. +// that way we can send postMessage to child windows as well, not just iframe +// https://stackoverflow.com/questions/6340160/how-to-get-the-references-of-all-already-opened-child-windows + +export class PostmsgTransport { + private buffer: BufferedEvent[]; + + private handler: ChannelHandler; + + private connected: boolean; + + constructor(private readonly config: Config) { + this.buffer = []; + this.handler = null; + + if (typeof global?.addEventListener === 'function') { + global.addEventListener('message', this.handleEvent.bind(this), false); + } + + // Check whether the config.page parameter has a valid value + if (config.page !== 'manager' && config.page !== 'preview') { + throw new Error(`postmsg-channel: "config.page" cannot be "${config.page}"`); + } + } + + setHandler(handler: ChannelHandler): void { + this.handler = (...args) => { + handler.apply(this, args); + + if (!this.connected && this.getLocalFrame().length) { + this.flush(); + this.connected = true; + } + }; + } + + /** + * Sends `event` to the associated window. If the window does not yet exist + * the event will be stored in a buffer and sent when the window exists. + * @param event + */ + send(event: ChannelEvent, options?: any): Promise { + const { + target, + + // telejson options + allowRegExp, + allowFunction, + allowSymbol, + allowDate, + allowUndefined, + allowClass, + maxDepth, + space, + lazyEval, + } = options || {}; + + const eventOptions = Object.fromEntries( + Object.entries({ + allowRegExp, + allowFunction, + allowSymbol, + allowDate, + allowUndefined, + allowClass, + maxDepth, + space, + lazyEval, + }).filter(([k, v]) => typeof v !== 'undefined') + ); + + const stringifyOptions = { + ...defaultEventOptions, + ...(global.CHANNEL_OPTIONS || {}), + ...eventOptions, + }; + + const frames = this.getFrames(target); + + const query = qs.parse(location.search, { ignoreQueryPrefix: true }); + + const data = stringify( + { + key: KEY, + event, + refId: query.refId, + }, + stringifyOptions + ); + + if (!frames.length) { + return new Promise((resolve, reject) => { + this.buffer.push({ event, resolve, reject }); + }); + } + if (this.buffer.length) { + this.flush(); + } + + frames.forEach((f) => { + try { + f.postMessage(data, '*'); + } catch (e) { + console.error('sending over postmessage fail'); + } + }); + + return Promise.resolve(null); + } + + private flush(): void { + const { buffer } = this; + this.buffer = []; + buffer.forEach((item) => { + this.send(item.event).then(item.resolve).catch(item.reject); + }); + } + + private getFrames(target?: string): Window[] { + if (this.config.page === 'manager') { + const nodes: HTMLIFrameElement[] = Array.from( + document.querySelectorAll('iframe[data-is-storybook][data-is-loaded]') + ); + + const list = nodes + .filter((e) => { + try { + return !!e.contentWindow && e.dataset.isStorybook !== undefined && e.id === target; + } catch (er) { + return false; + } + }) + .map((e) => e.contentWindow); + + return list.length ? list : this.getCurrentFrames(); + } + if (global && global.parent && global.parent !== global.self) { + return [global.parent]; + } + + return []; + } + + private getCurrentFrames(): Window[] { + if (this.config.page === 'manager') { + const list: HTMLIFrameElement[] = Array.from( + document.querySelectorAll('[data-is-storybook="true"]') + ); + return list.map((e) => e.contentWindow); + } + if (global && global.parent) { + return [global.parent]; + } + + return []; + } + + private getLocalFrame(): Window[] { + if (this.config.page === 'manager') { + const list: HTMLIFrameElement[] = Array.from( + document.querySelectorAll('#storybook-preview-iframe') + ); + return list.map((e) => e.contentWindow); + } + if (global && global.parent) { + return [global.parent]; + } + + return []; + } + + private handleEvent(rawEvent: MessageEvent): void { + try { + const { data } = rawEvent; + const { key, event, refId } = + typeof data === 'string' && isJSON(data) ? parse(data, global.CHANNEL_OPTIONS || {}) : data; + + if (key === KEY) { + const pageString = + this.config.page === 'manager' + ? ` manager ` + : ` preview `; + + const eventString = Object.values(EVENTS).includes(event.type) + ? `${event.type}` + : `${event.type}`; + + if (refId) { + event.refId = refId; + } + + event.source = + this.config.page === 'preview' ? rawEvent.origin : getEventSourceUrl(rawEvent); + + if (!event.source) { + pretty.error( + `${pageString} received ${eventString} but was unable to determine the source of the event` + ); + + return; + } + const message = `${pageString} received ${eventString} (${data.length})`; + pretty.debug( + location.origin !== event.source + ? message + : `${message} (on ${location.origin} from ${event.source})`, + ...event.args + ); + + this.handler(event); + } + } catch (error) { + logger.error(error); + } + } +} + +const getEventSourceUrl = (event: MessageEvent) => { + const frames: HTMLIFrameElement[] = Array.from( + document.querySelectorAll('iframe[data-is-storybook]') + ); + // try to find the originating iframe by matching it's contentWindow + // This might not be cross-origin safe + const [frame, ...remainder] = frames.filter((element) => { + try { + return element.contentWindow === event.source; + } catch (err) { + // continue + } + + const src = element.getAttribute('src'); + let origin; + + try { + ({ origin } = new URL(src, document.location.toString())); + } catch (err) { + return false; + } + return origin === event.origin; + }); + + if (frame && remainder.length === 0) { + const src = frame.getAttribute('src'); + const { protocol, host, pathname } = new URL(src, document.location.toString()); + return `${protocol}//${host}${pathname}`; + } + + if (remainder.length > 0) { + // If we found multiple matches, there's going to be trouble + logger.error('found multiple candidates for event source'); + } + + // If we found no frames of matches + return null; +}; + +/** + * Creates a channel which communicates with an iframe or child window. + */ +export function createChannel({ page }: Config): Channel { + const transport = new PostmsgTransport({ page }); + return new Channel({ transport }); +} + +// backwards compat with builder-vite +export default createChannel; diff --git a/code/lib/channel-postmessage/src/typings.d.ts b/code/lib/channel-postmessage/src/typings.d.ts new file mode 100644 index 000000000000..5c3e4f56f641 --- /dev/null +++ b/code/lib/channel-postmessage/src/typings.d.ts @@ -0,0 +1 @@ +declare var CHANNEL_OPTIONS: any; diff --git a/code/lib/channel-postmessage/tsconfig.json b/code/lib/channel-postmessage/tsconfig.json new file mode 100644 index 000000000000..52d43eaaa9b9 --- /dev/null +++ b/code/lib/channel-postmessage/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/code/lib/channel-websocket/README.md b/code/lib/channel-websocket/README.md new file mode 100644 index 000000000000..8f131ab21ae3 --- /dev/null +++ b/code/lib/channel-websocket/README.md @@ -0,0 +1,14 @@ +# Storybook Websocket Channel + +Storybook Websocket Channel is a channel for Storybook that can be used when the Storybook Renderer should communicate with the Storybook Manager over the network. +A channel can be created using the `createChannel` function. + +```js +import createChannel from '@storybook/channel-websocket'; + +const channel = createChannel({ url: 'ws://localhost:9001' }); +``` + +--- + +For more information visit: [storybook.js.org](https://storybook.js.org) diff --git a/code/lib/channel-websocket/jest.config.js b/code/lib/channel-websocket/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/lib/channel-websocket/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/channel-websocket/package.json b/code/lib/channel-websocket/package.json new file mode 100644 index 000000000000..4bc1b034b12a --- /dev/null +++ b/code/lib/channel-websocket/package.json @@ -0,0 +1,63 @@ +{ + "name": "@storybook/channel-websocket", + "version": "7.0.0-beta.25", + "description": "", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/channel-websocket", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/channel-websocket" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "sideEffects": false, + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/channels": "7.0.0-beta.25", + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "telejson": "^7.0.3" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/lib/channel-websocket/src/index.ts b/code/lib/channel-websocket/src/index.ts new file mode 100644 index 000000000000..c92f857c0cb1 --- /dev/null +++ b/code/lib/channel-websocket/src/index.ts @@ -0,0 +1,90 @@ +import { global } from '@storybook/global'; +import { Channel } from '@storybook/channels'; +import type { ChannelHandler } from '@storybook/channels'; +import { logger } from '@storybook/client-logger'; +import { isJSON, parse, stringify } from 'telejson'; + +const { WebSocket } = global; + +type OnError = (message: Event) => void; + +interface WebsocketTransportArgs { + url: string; + onError: OnError; +} + +interface CreateChannelArgs { + url: string; + async?: boolean; + onError?: OnError; +} + +export class WebsocketTransport { + private socket: WebSocket; + + private handler: ChannelHandler; + + private buffer: string[] = []; + + private isReady = false; + + constructor({ url, onError }: WebsocketTransportArgs) { + this.connect(url, onError); + } + + setHandler(handler: ChannelHandler) { + this.handler = handler; + } + + send(event: any) { + if (!this.isReady) { + this.sendLater(event); + } else { + this.sendNow(event); + } + } + + private sendLater(event: any) { + this.buffer.push(event); + } + + private sendNow(event: any) { + const data = stringify(event, { maxDepth: 15, allowFunction: true }); + this.socket.send(data); + } + + private flush() { + const { buffer } = this; + this.buffer = []; + buffer.forEach((event) => this.send(event)); + } + + private connect(url: string, onError: OnError) { + this.socket = new WebSocket(url); + this.socket.onopen = () => { + this.isReady = true; + this.flush(); + }; + this.socket.onmessage = ({ data }) => { + const event = typeof data === 'string' && isJSON(data) ? parse(data) : data; + this.handler(event); + }; + this.socket.onerror = (e) => { + if (onError) { + onError(e); + } + }; + } +} + +export function createChannel({ + url, + async = false, + onError = (err) => logger.warn(err), +}: CreateChannelArgs) { + const transport = new WebsocketTransport({ url, onError }); + return new Channel({ transport, async }); +} + +// backwards compat with builder-vite +export default createChannel; diff --git a/code/lib/channel-websocket/src/typings.d.ts b/code/lib/channel-websocket/src/typings.d.ts new file mode 100644 index 000000000000..36dadd3de8aa --- /dev/null +++ b/code/lib/channel-websocket/src/typings.d.ts @@ -0,0 +1 @@ +declare module 'json-fn'; diff --git a/code/lib/channel-websocket/tsconfig.json b/code/lib/channel-websocket/tsconfig.json new file mode 100644 index 000000000000..52d43eaaa9b9 --- /dev/null +++ b/code/lib/channel-websocket/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/code/lib/channels/README.md b/code/lib/channels/README.md new file mode 100644 index 000000000000..0076f33230bf --- /dev/null +++ b/code/lib/channels/README.md @@ -0,0 +1,32 @@ +# Storybook Channel + +Storybook Channel is similar to an EventEmitter. +Channels are used with Storybook implementations to send/receive events between the Storybook Manager and the Storybook Renderer. + +```js +class Channel { + addListener(type, listener) {} + addPeerListener(type, listener) {} // ignore events from itself + emit(type, ...args) {} + eventNames() {} + listenerCount(type) {} + listeners(type) {} + on(type, listener) {} + once(type, listener) {} + prependListener(type, listener) {} + prependOnceListener(type, listener) {} + removeAllListeners(type) {} + removeListener(type, listener) {} +} +``` + +The channel takes a Transport object as a parameter which will be used to send/receive messages. The transport object should implement this interface. + +```js +class Transport { + send(event) {} + setHandler(handler) {} +} +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) diff --git a/code/lib/channels/jest.config.js b/code/lib/channels/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/lib/channels/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/channels/package.json b/code/lib/channels/package.json new file mode 100644 index 000000000000..5e9ff082832b --- /dev/null +++ b/code/lib/channels/package.json @@ -0,0 +1,57 @@ +{ + "name": "@storybook/channels", + "version": "7.0.0-beta.25", + "description": "", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/channels", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/channels" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "sideEffects": false, + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "devDependencies": { + "typescript": "~4.9.3" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/lib/channels/src/index.test.ts b/code/lib/channels/src/index.test.ts new file mode 100644 index 000000000000..58822c3bf2d5 --- /dev/null +++ b/code/lib/channels/src/index.test.ts @@ -0,0 +1,224 @@ +import type { ChannelTransport, Listener } from '.'; +import { Channel } from '.'; + +jest.useFakeTimers(); + +describe('Channel', () => { + let transport: ChannelTransport; + let channel: Channel; + + beforeEach(() => { + transport = { setHandler: jest.fn(), send: jest.fn() }; + channel = new Channel({ transport }); + }); + + describe('constructor', () => { + it('should set the handler if handler is preset', () => { + channel = new Channel({ transport }); + expect(transport.setHandler).toHaveBeenCalled(); + }); + + it('should not set transport if not passed as an argument', () => { + channel = new Channel(); + expect(channel.hasTransport).toBeFalsy(); + }); + + it('should set transport if passed as an argument', () => { + channel = new Channel({ transport }); + expect(channel.hasTransport).toBeTruthy(); + }); + + it('should set isAsync to false as default value', () => { + channel = new Channel(); + expect(channel.isAsync).toBeFalsy(); + }); + + it('should set isAsync to true if passed as an argument', () => { + channel = new Channel({ async: true }); + expect(channel.isAsync).toBeTruthy(); + }); + }); + + describe('method:addListener', () => { + it('should create one listener', () => { + const eventName = 'event1'; + + channel.addListener(eventName, jest.fn()); + expect(channel.listeners(eventName).length).toBe(1); + }); + }); + + describe('method:on', () => { + it('should do the same as addListener', () => { + const eventName = 'event1'; + + channel.on(eventName, jest.fn()); + expect(channel.listeners(eventName).length).toBe(1); + }); + }); + + describe('method:off', () => { + it('should remove listeners', () => { + const eventName = 'event1'; + const fn = jest.fn(); + + channel.on(eventName, fn); + expect(channel.listeners(eventName).length).toBe(1); + channel.off(eventName, fn); + expect(channel.listeners(eventName).length).toBe(0); + }); + }); + + describe('method:emit', () => { + it('should execute the callback fn of a listener', () => { + const eventName = 'event1'; + const listenerInputData = ['string1', 'string2', 'string3']; + let listenerOutputData: string[] = null; + const mockListener: Listener = (data) => { + listenerOutputData = data; + }; + + channel.addListener(eventName, mockListener); + channel.emit(eventName, listenerInputData); + expect(listenerOutputData).toBe(listenerInputData); + }); + + it('should be callable with a spread operator as event arguments', () => { + const eventName = 'event1'; + const listenerInputData = ['string1', 'string2', 'string3']; + let listenerOutputData: string[] = null; + + channel.addListener(eventName, (...data) => { + listenerOutputData = data; + }); + channel.emit(eventName, ...listenerInputData); + expect(listenerOutputData).toEqual(listenerInputData); + }); + + it('should be callable with options on the event', () => { + const eventName = 'event1'; + const listenerInputData = [{ event: {}, options: { depth: 1 } }]; + let listenerOutputData: any = null; + + channel.addListener(eventName, (...data) => { + listenerOutputData = data; + }); + const sendSpy = jest.fn(); + // @ts-expect-error (Converted from ts-ignore) + channel.transport.send = sendSpy; + channel.emit(eventName, ...listenerInputData); + expect(listenerOutputData).toEqual(listenerInputData); + expect(sendSpy.mock.calls[0][1]).toEqual({ depth: 1 }); + }); + + it('should use setImmediate if async is true', () => { + channel = new Channel({ async: true, transport }); + channel.addListener('event1', jest.fn()); + }); + }); + + describe('method:eventNames', () => { + it('should return a list of all registered events', () => { + const eventNames = ['event1', 'event2', 'event3']; + eventNames.forEach((eventName) => channel.addListener(eventName, jest.fn())); + + expect(channel.eventNames()).toEqual(eventNames); + }); + }); + + describe('method:listenerCount', () => { + it('should return a list of all registered events', () => { + const events = [ + { eventName: 'event1', listeners: [jest.fn(), jest.fn(), jest.fn()], listenerCount: 0 }, + { eventName: 'event2', listeners: [jest.fn()], listenerCount: 0 }, + ]; + events.forEach((event) => { + event.listeners.forEach((listener) => { + channel.addListener(event.eventName, listener); + // eslint-disable-next-line no-plusplus, no-param-reassign + event.listenerCount++; + }); + }); + + events.forEach((event) => { + expect(channel.listenerCount(event.eventName)).toBe(event.listenerCount); + }); + }); + }); + + describe('method:once', () => { + it('should execute a listener once and remove it afterwards', () => { + const eventName = 'event1'; + channel.once(eventName, jest.fn()); + channel.emit(eventName); + + expect(channel.listenerCount(eventName)).toBe(0); + }); + + it('should pass all event arguments correctly to the listener', () => { + const eventName = 'event1'; + const listenerInputData = ['string1', 'string2', 'string3']; + let listenerOutputData = null; + const mockListener: Listener = (data: string[]) => { + listenerOutputData = data; + }; + + channel.once(eventName, (args) => mockListener(args)); + channel.emit(eventName, listenerInputData); + + expect(listenerOutputData).toEqual(listenerInputData); + }); + + it('should be removable', () => { + const eventName = 'event1'; + const listenerToBeRemoved = jest.fn(); + + channel.once(eventName, listenerToBeRemoved); + channel.removeListener(eventName, listenerToBeRemoved); + }); + }); + + describe('method:removeAllListeners', () => { + it('should remove all listeners', () => { + const eventName1 = 'event1'; + const eventName2 = 'event2'; + const listeners1 = [jest.fn(), jest.fn(), jest.fn()]; + const listeners2 = [jest.fn()]; + + listeners1.forEach((fn) => channel.addListener(eventName1, fn)); + listeners2.forEach((fn) => channel.addListener(eventName2, fn)); + channel.removeAllListeners(); + + expect(channel.listenerCount(eventName1)).toBe(0); + expect(channel.listenerCount(eventName2)).toBe(0); + }); + + it('should remove all listeners of a certain event', () => { + const eventName = 'event1'; + const listeners = [jest.fn(), jest.fn(), jest.fn()]; + + listeners.forEach((fn) => channel.addListener(eventName, fn)); + expect(channel.listenerCount(eventName)).toBe(listeners.length); + + channel.removeAllListeners(eventName); + expect(channel.listenerCount(eventName)).toBe(0); + }); + }); + + describe('method:removeListener', () => { + it('should remove one listener', () => { + const eventName = 'event1'; + const listenerToBeRemoved = jest.fn(); + const listeners = [jest.fn(), jest.fn()]; + const findListener = (listener: Listener) => + channel.listeners(eventName).find((_listener) => _listener === listener); + + listeners.forEach((fn) => channel.addListener(eventName, fn)); + channel.addListener(eventName, listenerToBeRemoved); + expect(findListener(listenerToBeRemoved)).toBe(listenerToBeRemoved); + + channel.removeListener(eventName, listenerToBeRemoved); + expect(findListener(listenerToBeRemoved)).toBeUndefined(); + }); + }); +}); diff --git a/code/lib/channels/src/index.ts b/code/lib/channels/src/index.ts new file mode 100644 index 000000000000..9c7425690f05 --- /dev/null +++ b/code/lib/channels/src/index.ts @@ -0,0 +1,149 @@ +/// + +export type ChannelHandler = (event: ChannelEvent) => void; + +export interface ChannelTransport { + send(event: ChannelEvent, options?: any): void; + setHandler(handler: ChannelHandler): void; +} + +export interface ChannelEvent { + type: string; // eventName + from: string; + args: any[]; +} + +export interface Listener { + (...args: any[]): void; +} + +interface EventsKeyValue { + [key: string]: Listener[]; +} + +interface ChannelArgs { + transport?: ChannelTransport; + async?: boolean; +} + +const generateRandomId = () => { + // generates a random 13 character string + return Math.random().toString(16).slice(2); +}; + +export class Channel { + readonly isAsync: boolean; + + private sender = generateRandomId(); + + private events: EventsKeyValue = {}; + + private data: Record = {}; + + private readonly transport: ChannelTransport | undefined = undefined; + + constructor({ transport, async = false }: ChannelArgs = {}) { + this.isAsync = async; + if (transport) { + this.transport = transport; + this.transport.setHandler((event) => this.handleEvent(event)); + } + } + + get hasTransport() { + return !!this.transport; + } + + addListener(eventName: string, listener: Listener) { + this.events[eventName] = this.events[eventName] || []; + this.events[eventName].push(listener); + } + + emit(eventName: string, ...args: any) { + const event: ChannelEvent = { type: eventName, args, from: this.sender }; + let options = {}; + if (args.length >= 1 && args[0] && args[0].options) { + options = args[0].options; + } + + const handler = () => { + if (this.transport) { + this.transport.send(event, options); + } + this.handleEvent(event); + }; + + if (this.isAsync) { + // todo I'm not sure how to test this + setImmediate(handler); + } else { + handler(); + } + } + + last(eventName: string) { + return this.data[eventName]; + } + + eventNames() { + return Object.keys(this.events); + } + + listenerCount(eventName: string) { + const listeners = this.listeners(eventName); + return listeners ? listeners.length : 0; + } + + listeners(eventName: string): Listener[] | undefined { + const listeners = this.events[eventName]; + return listeners || undefined; + } + + once(eventName: string, listener: Listener) { + const onceListener: Listener = this.onceListener(eventName, listener); + this.addListener(eventName, onceListener); + } + + removeAllListeners(eventName?: string) { + if (!eventName) { + this.events = {}; + } else if (this.events[eventName]) { + delete this.events[eventName]; + } + } + + removeListener(eventName: string, listener: Listener) { + const listeners = this.listeners(eventName); + if (listeners) { + this.events[eventName] = listeners.filter((l) => l !== listener); + } + } + + on(eventName: string, listener: Listener) { + this.addListener(eventName, listener); + } + + off(eventName: string, listener: Listener) { + this.removeListener(eventName, listener); + } + + private handleEvent(event: ChannelEvent) { + const listeners = this.listeners(event.type); + if (listeners && listeners.length) { + listeners.forEach((fn) => { + fn.apply(event, event.args); + }); + } + this.data[event.type] = event.args; + } + + private onceListener(eventName: string, listener: Listener) { + const onceListener: Listener = (...args: any[]) => { + this.removeListener(eventName, onceListener); + return listener(...args); + }; + return onceListener; + } +} + +export default Channel; diff --git a/code/lib/channels/tsconfig.json b/code/lib/channels/tsconfig.json new file mode 100644 index 000000000000..52d43eaaa9b9 --- /dev/null +++ b/code/lib/channels/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.json", + "include": ["src/**/*"] +} diff --git a/lib/cli-sb/README.md b/code/lib/cli-sb/README.md similarity index 100% rename from lib/cli-sb/README.md rename to code/lib/cli-sb/README.md diff --git a/lib/cli-sb/index.js b/code/lib/cli-sb/index.js similarity index 100% rename from lib/cli-sb/index.js rename to code/lib/cli-sb/index.js diff --git a/code/lib/cli-sb/jest.config.js b/code/lib/cli-sb/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/lib/cli-sb/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/cli-sb/package.json b/code/lib/cli-sb/package.json new file mode 100644 index 000000000000..8ac298bb3357 --- /dev/null +++ b/code/lib/cli-sb/package.json @@ -0,0 +1,30 @@ +{ + "name": "sb", + "version": "7.0.0-beta.25", + "description": "Storybook CLI", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/cli", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/cli" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "bin": "./index.js", + "dependencies": { + "@storybook/cli": "7.0.0-beta.25" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/lib/cli-storybook/README.md b/code/lib/cli-storybook/README.md similarity index 100% rename from lib/cli-storybook/README.md rename to code/lib/cli-storybook/README.md diff --git a/lib/cli-storybook/index.js b/code/lib/cli-storybook/index.js similarity index 100% rename from lib/cli-storybook/index.js rename to code/lib/cli-storybook/index.js diff --git a/code/lib/cli-storybook/jest.config.js b/code/lib/cli-storybook/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/lib/cli-storybook/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/cli-storybook/package.json b/code/lib/cli-storybook/package.json new file mode 100644 index 000000000000..620cd21501be --- /dev/null +++ b/code/lib/cli-storybook/package.json @@ -0,0 +1,33 @@ +{ + "name": "storybook", + "version": "7.0.0-beta.25", + "description": "Storybook CLI", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/cli", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/cli" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "bin": { + "sb": "./index.js", + "storybook": "./index.js" + }, + "dependencies": { + "@storybook/cli": "7.0.0-beta.25" + }, + "publishConfig": { + "access": "public" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/lib/cli/.babelrc.json b/code/lib/cli/.babelrc.json similarity index 92% rename from lib/cli/.babelrc.json rename to code/lib/cli/.babelrc.json index ffec5b09f395..89a2815442ec 100644 --- a/lib/cli/.babelrc.json +++ b/code/lib/cli/.babelrc.json @@ -12,7 +12,7 @@ ] ], "ignore": [ - "./src/frameworks", + "./src/rendererAssets", "./src/generators/**/template", "./src/generators/**/template-csf", "./src/generators/**/template-csf-ts", diff --git a/code/lib/cli/.eslintrc.js b/code/lib/cli/.eslintrc.js new file mode 100644 index 000000000000..f8d0bcd5e831 --- /dev/null +++ b/code/lib/cli/.eslintrc.js @@ -0,0 +1,35 @@ +const ignore = 0; + +module.exports = { + overrides: [ + { + files: 'templates/**/*', + env: { + browser: true, + }, + rules: { + 'react/no-this-in-sfc': ignore, + 'import/no-unresolved': ignore, + 'react/react-in-jsx-scope': ignore, + 'import/no-extraneous-dependencies': ignore, + 'global-require': ignore, + 'no-redeclare': ignore, + }, + }, + { + files: 'rendererAssets/**/*', + env: { + browser: true, + }, + rules: { + 'jsx-a11y/anchor-is-valid': ignore, + 'import/no-unresolved': ignore, + 'react/prop-types': ignore, + 'react/react-in-jsx-scope': ignore, + 'import/no-extraneous-dependencies': ignore, + 'import/extensions': ignore, + 'import/named': ignore, + }, + }, + ], +}; diff --git a/code/lib/cli/README.md b/code/lib/cli/README.md new file mode 100644 index 000000000000..0152be4e6aef --- /dev/null +++ b/code/lib/cli/README.md @@ -0,0 +1,70 @@ +# Storybook CLI + +Storybook CLI (_Command Line Interface_) is the easiest way to add [Storybook](https://github.com/storybookjs/storybook) to your project. + +![Screenshot](docs/getstorybook.png) + +Go to your project and run: + +```sh +cd my-app +npx sb init +``` + +In addition to `init`, the CLI also has other commands: + +- `add` - add an addon and register it +- `info` - print out system information for bug reports +- `migrate` - run codemods to migrate your code + +See the command-line help with `-h` for details. + +--- + +## [Yarn](https://github.com/yarnpkg/yarn) support + +The CLI supports yarn. If you have installed yarn in your system and your project has a `yarn.lock` file, it'll detect it and use `yarn` to install dependencies. + +If you don't want to use `yarn` always you can use the `--package-manager` option like this: + +```sh +npx sb init --package-manager=npm +``` + +If you would like to force a particular version of yarn, you can use the `--package-manager` flag with a value of `yarn1` or `yarn2`. + +--- + +## [PNPM](https://pnpm.io/) support + +The CLI supports pnpm. If you have installed pnpm in your system and your project has a `pnpm-lock.yaml` file, it'll detect it and use `pnpm` to install dependencies. + +If you don't have a lock file and would like to force pnpm to be used, you can use the `--package-manager` option like this: + +```sh +npx sb init --package-manager=pnpm +``` + +--- + +## [Flow](https://flow.org/) support + +It also supports flow files. By default, [jscodeshift](https://github.com/facebook/jscodeshift), the tool used to transform the source files, uses babel to read the files. To be able to transform any flow annotated file, you need to use the flow parser. + +```sh +npx sb init --parser flow +``` + +For more information visit: [storybook.js.org](https://storybook.js.org) + +--- + +## Manually specify project type + +If the CLI cannot detect your project type, it will ask you. You can also force it to use a particular project type: + +```sh +npx sb init --type +``` + +Where type is one of the project types defined in [project_types.ts](https://github.com/storybookjs/storybook/blob/next/code/lib/cli/src/project_types.ts) diff --git a/code/lib/cli/__mocks__/@aw-web-design/x-default-browser.js b/code/lib/cli/__mocks__/@aw-web-design/x-default-browser.js new file mode 100644 index 000000000000..ecd2ed7a2262 --- /dev/null +++ b/code/lib/cli/__mocks__/@aw-web-design/x-default-browser.js @@ -0,0 +1,2 @@ +// TODO: Once we upgrade to Jest 28/29 we can probably remove this entire mock. +module.exports = {}; diff --git a/code/lib/cli/bin/index.js b/code/lib/cli/bin/index.js new file mode 100755 index 000000000000..fe4936d7d0b5 --- /dev/null +++ b/code/lib/cli/bin/index.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +require('../dist/generate.js'); diff --git a/lib/cli/docs/getstorybook.png b/code/lib/cli/docs/getstorybook.png similarity index 100% rename from lib/cli/docs/getstorybook.png rename to code/lib/cli/docs/getstorybook.png diff --git a/code/lib/cli/jest.config.js b/code/lib/cli/jest.config.js new file mode 100644 index 000000000000..343e4c7a7f32 --- /dev/null +++ b/code/lib/cli/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.node'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/lib/cli/package.json b/code/lib/cli/package.json new file mode 100644 index 000000000000..32482f58d102 --- /dev/null +++ b/code/lib/cli/package.json @@ -0,0 +1,101 @@ +{ + "name": "@storybook/cli", + "version": "7.0.0-beta.25", + "description": "Storybook's CLI - easiest method of adding storybook to your projects", + "keywords": [ + "cli", + "generator", + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/lib/cli", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "lib/cli" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "author": "Storybook Team", + "bin": { + "getstorybook": "./bin/index.js", + "sb": "./bin/index.js" + }, + "files": [ + "bin/**/*", + "dist/**/*", + "rendererAssets/**/*", + "templates/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts", + "test": "jest test/**/*.test.js" + }, + "dependencies": { + "@babel/core": "^7.20.2", + "@babel/preset-env": "^7.20.2", + "@storybook/codemod": "7.0.0-beta.25", + "@storybook/core-common": "7.0.0-beta.25", + "@storybook/core-server": "7.0.0-beta.25", + "@storybook/csf-tools": "7.0.0-beta.25", + "@storybook/node-logger": "7.0.0-beta.25", + "@storybook/telemetry": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "@types/semver": "^7.3.4", + "boxen": "^5.1.2", + "chalk": "^4.1.0", + "commander": "^6.2.1", + "cross-spawn": "^7.0.3", + "detect-indent": "^6.1.0", + "envinfo": "^7.7.3", + "execa": "^5.0.0", + "express": "^4.17.3", + "find-up": "^5.0.0", + "fs-extra": "^9.0.1", + "get-port": "^5.1.1", + "giget": "^1.0.0", + "globby": "^11.0.2", + "jscodeshift": "^0.13.1", + "leven": "^3.1.0", + "prompts": "^2.4.0", + "puppeteer-core": "^2.1.1", + "read-pkg-up": "^7.0.1", + "semver": "^7.3.7", + "shelljs": "^0.8.5", + "simple-update-notifier": "^1.0.0", + "strip-json-comments": "^3.0.1", + "tempy": "^1.0.1", + "ts-dedent": "^2.0.0", + "util-deprecate": "^1.0.2" + }, + "devDependencies": { + "@storybook/client-api": "7.0.0-beta.25", + "@types/cross-spawn": "^6.0.2", + "@types/prompts": "^2.0.9", + "@types/puppeteer-core": "^2.1.0", + "@types/semver": "^7.3.4", + "@types/shelljs": "^0.8.7", + "@types/util-deprecate": "^1.0.0", + "strip-json-comments": "^3.1.1", + "typescript": "~4.9.3" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/generate.ts" + ], + "platform": "node" + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/lib/cli/rendererAssets/.eslintrc.json b/code/lib/cli/rendererAssets/.eslintrc.json new file mode 100644 index 000000000000..5a2d2b06ab7b --- /dev/null +++ b/code/lib/cli/rendererAssets/.eslintrc.json @@ -0,0 +1,19 @@ +{ + "rules": { + "no-undef": "off", + "@typescript-eslint/ban-types": "off", + "react/prop-types": "off", + "react/react-in-jsx-scope": "off", + "import/extensions": "off", + "import/no-unresolved": "off", + "import/no-extraneous-dependencies": "off" + }, + "overrides": [ + { + "files": ["nextjs/**/*.@(jsx|tsx)"], + "rules": { + "react/no-unknown-property": "off" + } + } + ] +} diff --git a/code/lib/cli/rendererAssets/common/Introduction.mdx b/code/lib/cli/rendererAssets/common/Introduction.mdx new file mode 100644 index 000000000000..2097f9130d9c --- /dev/null +++ b/code/lib/cli/rendererAssets/common/Introduction.mdx @@ -0,0 +1,211 @@ +import { Meta } from '@storybook/blocks'; +import Code from './assets/code-brackets.svg'; +import Colors from './assets/colors.svg'; +import Comments from './assets/comments.svg'; +import Direction from './assets/direction.svg'; +import Flow from './assets/flow.svg'; +import Plugin from './assets/plugin.svg'; +import Repo from './assets/repo.svg'; +import StackAlt from './assets/stackalt.svg'; + + + + + +# Welcome to Storybook + +Storybook helps you build UI components in isolation from your app's business logic, data, and context. +That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA. + +Browse example stories now by navigating to them in the sidebar. +View their code in the `stories` directory to learn how they work. +We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages. + +
    Configure
    + + + +
    Learn
    + + + +
    + TipEdit the Markdown in{' '} + stories/Introduction.stories.mdx +
    diff --git a/examples/html-kitchen-sink/stories/from-essentials/assets/code-brackets.svg b/code/lib/cli/rendererAssets/common/assets/code-brackets.svg similarity index 100% rename from examples/html-kitchen-sink/stories/from-essentials/assets/code-brackets.svg rename to code/lib/cli/rendererAssets/common/assets/code-brackets.svg diff --git a/examples/html-kitchen-sink/stories/from-essentials/assets/colors.svg b/code/lib/cli/rendererAssets/common/assets/colors.svg similarity index 100% rename from examples/html-kitchen-sink/stories/from-essentials/assets/colors.svg rename to code/lib/cli/rendererAssets/common/assets/colors.svg diff --git a/examples/html-kitchen-sink/stories/from-essentials/assets/comments.svg b/code/lib/cli/rendererAssets/common/assets/comments.svg similarity index 100% rename from examples/html-kitchen-sink/stories/from-essentials/assets/comments.svg rename to code/lib/cli/rendererAssets/common/assets/comments.svg diff --git a/examples/html-kitchen-sink/stories/from-essentials/assets/direction.svg b/code/lib/cli/rendererAssets/common/assets/direction.svg similarity index 100% rename from examples/html-kitchen-sink/stories/from-essentials/assets/direction.svg rename to code/lib/cli/rendererAssets/common/assets/direction.svg diff --git a/examples/html-kitchen-sink/stories/from-essentials/assets/flow.svg b/code/lib/cli/rendererAssets/common/assets/flow.svg similarity index 100% rename from examples/html-kitchen-sink/stories/from-essentials/assets/flow.svg rename to code/lib/cli/rendererAssets/common/assets/flow.svg diff --git a/examples/html-kitchen-sink/stories/from-essentials/assets/plugin.svg b/code/lib/cli/rendererAssets/common/assets/plugin.svg similarity index 100% rename from examples/html-kitchen-sink/stories/from-essentials/assets/plugin.svg rename to code/lib/cli/rendererAssets/common/assets/plugin.svg diff --git a/examples/html-kitchen-sink/stories/from-essentials/assets/repo.svg b/code/lib/cli/rendererAssets/common/assets/repo.svg similarity index 100% rename from examples/html-kitchen-sink/stories/from-essentials/assets/repo.svg rename to code/lib/cli/rendererAssets/common/assets/repo.svg diff --git a/examples/html-kitchen-sink/stories/from-essentials/assets/stackalt.svg b/code/lib/cli/rendererAssets/common/assets/stackalt.svg similarity index 100% rename from examples/html-kitchen-sink/stories/from-essentials/assets/stackalt.svg rename to code/lib/cli/rendererAssets/common/assets/stackalt.svg diff --git a/examples/cra-ts-essentials/src/stories/testing-react/components/button.css b/code/lib/cli/rendererAssets/common/button.css similarity index 100% rename from examples/cra-ts-essentials/src/stories/testing-react/components/button.css rename to code/lib/cli/rendererAssets/common/button.css diff --git a/lib/cli/src/frameworks/common/header.css b/code/lib/cli/rendererAssets/common/header.css similarity index 100% rename from lib/cli/src/frameworks/common/header.css rename to code/lib/cli/rendererAssets/common/header.css diff --git a/lib/cli/src/frameworks/common/page.css b/code/lib/cli/rendererAssets/common/page.css similarity index 100% rename from lib/cli/src/frameworks/common/page.css rename to code/lib/cli/rendererAssets/common/page.css diff --git a/code/lib/cli/scripts/generate-sb-packages-versions.js b/code/lib/cli/scripts/generate-sb-packages-versions.js new file mode 100755 index 000000000000..14159fbae83c --- /dev/null +++ b/code/lib/cli/scripts/generate-sb-packages-versions.js @@ -0,0 +1,65 @@ +#!/usr/bin/env node + +const { readJson, writeFile } = require('fs-extra'); +const { exec } = require('child_process'); +const path = require('path'); +const globby = require('globby'); +const semver = require('semver'); +const { default: dedent } = require('ts-dedent'); + +const rootDirectory = path.join(__dirname, '..', '..', '..'); + +const logger = console; + +const run = async () => { + const updatedVersion = process.argv[process.argv.length - 1]; + + if (!semver.valid(updatedVersion)) throw new Error(`Invalid version: ${updatedVersion}`); + + logger.log(`Generating versions.ts with v${updatedVersion}`); + + const storybookPackagesPaths = await globby( + `${rootDirectory}/@(frameworks|addons|lib|renderers|presets)/**/package.json`, + { + ignore: '**/node_modules/**/*', + } + ); + + const packageToVersionMap = ( + await Promise.all( + storybookPackagesPaths.map(async (storybookPackagePath) => { + const { name, version } = await readJson(storybookPackagePath); + + return { + name, + version, + }; + }) + ) + ) + .filter(({ name }) => /^(@storybook|sb$|storybook$)/.test(name)) + // As some previous steps are asynchronous order is not always the same so sort them to avoid that + .sort((package1, package2) => package1.name.localeCompare(package2.name)) + .reduce((acc, { name }) => ({ ...acc, [name]: updatedVersion }), {}); + + const versionsPath = path.join(__dirname, '..', 'src', 'versions.ts'); + + await writeFile( + versionsPath, + dedent` + // auto generated file, do not edit + export default ${JSON.stringify(packageToVersionMap, null, 2)} + ` + ); + + logger.log(`Updating versions and formatting results at: ${versionsPath}`); + + exec(`yarn lint:js:cmd --fix ${versionsPath}`, { + cwd: path.join(__dirname, '..', '..', '..'), + }); +}; + +run().catch((e) => { + logger.error(e); + process.exit(1); +}); diff --git a/lib/cli/src/NpmOptions.ts b/code/lib/cli/src/NpmOptions.ts similarity index 100% rename from lib/cli/src/NpmOptions.ts rename to code/lib/cli/src/NpmOptions.ts diff --git a/code/lib/cli/src/add.ts b/code/lib/cli/src/add.ts new file mode 100644 index 000000000000..374b39c19804 --- /dev/null +++ b/code/lib/cli/src/add.ts @@ -0,0 +1,119 @@ +import path from 'path'; +import fs from 'fs'; +import { sync as spawnSync } from 'cross-spawn'; + +import { getStorybookInfo } from '@storybook/core-common'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; + +import { commandLog } from './helpers'; +import { + JsPackageManagerFactory, + useNpmWarning, + type PackageManagerName, +} from './js-package-manager'; + +const logger = console; + +const LEGACY_CONFIGS = ['addons', 'config', 'presets']; + +const postinstallAddon = async (addonName: string, isOfficialAddon: boolean) => { + let skipMsg = null; + if (!isOfficialAddon) { + skipMsg = 'unofficial addon'; + } else if (!fs.existsSync('.storybook')) { + skipMsg = 'no .storybook config'; + } else { + skipMsg = 'no codmods found'; + LEGACY_CONFIGS.forEach((config) => { + try { + const codemod = require.resolve( + // @ts-expect-error (it is broken) + `${getPackageName(addonName, isOfficialAddon)}/postinstall/${config}.js` + ); + commandLog(`Running postinstall script for ${addonName}`)(); + let configFile = path.join('.storybook', `${config}.ts`); + if (!fs.existsSync(configFile)) { + configFile = path.join('.storybook', `${config}.js`); + if (!fs.existsSync(configFile)) { + fs.writeFileSync(configFile, '', 'utf8'); + } + } + spawnSync('npx', ['jscodeshift', '-t', codemod, configFile], { + stdio: 'inherit', + shell: true, + }); + skipMsg = null; + } catch (err) { + // resolve failed, skip + } + }); + } + + if (skipMsg) { + commandLog(`Skipping postinstall for ${addonName}, ${skipMsg}`)(); + } +}; + +const getVersionSpecifier = (addon: string) => { + const groups = /^(...*)@(.*)$/.exec(addon); + return groups ? [groups[1], groups[2]] : [addon, undefined]; +}; + +/** + * Install the given addon package and add it to main.js + * + * Usage: + * - sb add @storybook/addon-docs + * - sb add @storybook/addon-interactions@7.0.1 + * + * If there is no version specifier and it's a storybook addon, + * it will try to use the version specifier matching your current + * Storybook install version. + */ +export async function add( + addon: string, + options: { useNpm: boolean; packageManager: PackageManagerName; skipPostinstall: boolean } +) { + let { packageManager: pkgMgr } = options; + if (options.useNpm) { + useNpmWarning(); + pkgMgr = 'npm'; + } + const packageManager = JsPackageManagerFactory.getPackageManager({ force: pkgMgr }); + const packageJson = packageManager.retrievePackageJson(); + const [addonName, versionSpecifier] = getVersionSpecifier(addon); + + const { mainConfig, version: storybookVersion } = getStorybookInfo(packageJson); + if (!mainConfig) { + logger.error('Unable to find storybook main.js config'); + return; + } + const main = await readConfig(mainConfig); + const addons = main.getFieldValue(['addons']); + if (addons && !Array.isArray(addons)) { + logger.error('Expected addons array in main.js config'); + } + + logger.log(`Verifying ${addonName}`); + const latestVersion = packageManager.latestVersion(addonName); + if (!latestVersion) { + logger.error(`Unknown addon ${addonName}`); + } + + // add to package.json + const isStorybookAddon = addonName.startsWith('@storybook/'); + const version = versionSpecifier || (isStorybookAddon ? storybookVersion : latestVersion); + const addonWithVersion = `${addonName}@${version}`; + logger.log(`Installing ${addonWithVersion}`); + packageManager.addDependencies({ installAsDevDependencies: true }, [addonWithVersion]); + + // add to main.js + logger.log(`Adding '${addon}' to main.js addons field.`); + const updatedAddons = [...(addons || []), addonName]; + main.setFieldValue(['addons'], updatedAddons); + await writeConfig(main); + + if (!options.skipPostinstall) { + await postinstallAddon(addon, isStorybookAddon); + } +} diff --git a/code/lib/cli/src/automigrate/fixes/add-react.test.ts b/code/lib/cli/src/automigrate/fixes/add-react.test.ts new file mode 100644 index 000000000000..f497f4013016 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/add-react.test.ts @@ -0,0 +1,60 @@ +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; +import { addReact } from './add-react'; + +const checkAddReact = async (packageJson: PackageJson) => { + const packageManager = { + retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), + } as JsPackageManager; + return addReact.check({ packageManager }); +}; + +describe('addReact fix', () => { + it('should no-op when not using docs or essentials', async () => { + await expect(checkAddReact({ dependencies: {} })).resolves.toBeFalsy(); + }); + + it('should no-op when react/react-dom are already installed', async () => { + await expect( + checkAddReact({ + dependencies: { react: '*' }, + devDependencies: { '@storybook/addon-docs': '*', 'react-dom': '*' }, + }) + ).resolves.toBeFalsy(); + }); + + it('should add react when it is missing', async () => { + await expect( + checkAddReact({ + dependencies: {}, + devDependencies: { '@storybook/addon-docs': '*', 'react-dom': '*' }, + }) + ).resolves.toMatchInlineSnapshot(` + Object { + "additionalDependencies": Array [ + "react", + ], + "dependents": Array [ + "@storybook/addon-docs", + ], + } + `); + }); + + it('should add reac-dom when it is missing', async () => { + await expect( + checkAddReact({ + dependencies: {}, + devDependencies: { '@storybook/addon-essentials': '*', react: '*' }, + }) + ).resolves.toMatchInlineSnapshot(` + Object { + "additionalDependencies": Array [ + "react-dom", + ], + "dependents": Array [ + "@storybook/addon-essentials", + ], + } + `); + }); +}); diff --git a/code/lib/cli/src/automigrate/fixes/add-react.ts b/code/lib/cli/src/automigrate/fixes/add-react.ts new file mode 100644 index 000000000000..df3fe6f51c3a --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/add-react.ts @@ -0,0 +1,69 @@ +import chalk from 'chalk'; +import { dedent } from 'ts-dedent'; +import type { Fix } from '../types'; + +interface AddReactOptions { + dependents: string[]; + additionalDependencies: string[]; +} + +/** + * is the user missing a dependency on react? + */ +export const addReact: Fix = { + id: 'addReact', + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + const installedDependencies = new Set( + Object.keys({ ...packageJson.dependencies, ...packageJson.devDependencies }) + ); + + const dependents = ['@storybook/addon-essentials', '@storybook/addon-docs'].filter((pkg) => + installedDependencies.has(pkg) + ); + const additionalDependencies = []; + if (dependents.length > 0) { + if (!installedDependencies.has('react')) { + // we add these here because they are required by addon-essentials > addon-docs + additionalDependencies.push('react'); + } + if (!installedDependencies.has('react-dom')) { + // we add these here because they are required by addon-essentials > addon-docs + additionalDependencies.push('react-dom'); + } + } + + if (additionalDependencies.length > 0) { + return { dependents, additionalDependencies }; + } + return null; + }, + + prompt({ dependents, additionalDependencies }) { + const dependentsFormatted = dependents.map((pkg) => chalk.cyan(pkg)).join(' & '); + const additionalDependenciesFormatted = additionalDependencies + .map((pkg) => `- ${chalk.cyan(pkg)}`) + .join('\n'); + + return dedent` + We've detected that you're using ${dependentsFormatted}. + + Starting in Storybook 7 we now require the following peer dependencies: + + ${additionalDependenciesFormatted} + + We can add these for you automatically. + + More info: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#react-peer-dependencies-required' + )} + `; + }, + + async run({ packageManager, result: { additionalDependencies }, dryRun }) { + if (!dryRun) { + packageManager.addDependencies({ installAsDevDependencies: true }, additionalDependencies); + } + }, +}; diff --git a/lib/cli/src/automigrate/fixes/angular12.test.ts b/code/lib/cli/src/automigrate/fixes/angular12.test.ts similarity index 87% rename from lib/cli/src/automigrate/fixes/angular12.test.ts rename to code/lib/cli/src/automigrate/fixes/angular12.test.ts index 9ef4c8ad1863..02da0ae88506 100644 --- a/lib/cli/src/automigrate/fixes/angular12.test.ts +++ b/code/lib/cli/src/automigrate/fixes/angular12.test.ts @@ -1,12 +1,19 @@ /* eslint-disable no-underscore-dangle */ -import path from 'path'; -import { JsPackageManager } from '../../js-package-manager'; +import * as path from 'path'; +import type { StorybookConfig } from '@storybook/types'; +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; import { angular12 } from './angular12'; // eslint-disable-next-line global-require, jest/no-mocks-import jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); -const checkAngular12 = async ({ packageJson, main }) => { +const checkAngular12 = async ({ + packageJson, + main, +}: { + packageJson: PackageJson; + main: Partial; +}) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, @@ -106,20 +113,6 @@ describe('angular12 fix', () => { ).resolves.toBeFalsy(); }); }); - describe('angular11 dependency', () => { - it('should no-op', async () => { - await expect( - checkAngular12({ - packageJson: { - dependencies: { - '@angular/core': '11', - }, - }, - main: {}, - }) - ).resolves.toBeFalsy(); - }); - }); }); describe('sb 7.0+', () => { describe('angular12 dependency', () => { diff --git a/lib/cli/src/automigrate/fixes/angular12.ts b/code/lib/cli/src/automigrate/fixes/angular12.ts similarity index 80% rename from lib/cli/src/automigrate/fixes/angular12.ts rename to code/lib/cli/src/automigrate/fixes/angular12.ts index b64289f5e1cc..b22a3e131a56 100644 --- a/lib/cli/src/automigrate/fixes/angular12.ts +++ b/code/lib/cli/src/automigrate/fixes/angular12.ts @@ -1,8 +1,8 @@ import chalk from 'chalk'; -import dedent from 'ts-dedent'; -import semver from '@storybook/semver'; -import { ConfigFile } from '@storybook/csf-tools'; -import { Fix } from '../types'; +import { dedent } from 'ts-dedent'; +import semver from 'semver'; +import type { ConfigFile } from '@storybook/csf-tools'; +import type { Fix } from '../types'; import { webpack5 } from './webpack5'; interface Angular12RunOptions { @@ -35,15 +35,15 @@ export const angular12: Fix = { return builderInfo ? { angularVersion, ...builderInfo } : null; }, - prompt({ angularVersion, storybookVersion }) { + prompt({ angularVersion }) { const angularFormatted = chalk.cyan(`Angular ${angularVersion}`); - const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); + return dedent` We've detected you are running ${angularFormatted} which is powered by webpack5. - ${sbFormatted} runs webpack4 by default, which is incompatible. + Your Storybook's main.js files specifies webpack4, which is incompatible. In order to work with your version of Angular, we need to install Storybook's ${chalk.cyan( - 'webpack5 builder' + '@storybook/builder-webpack5' )}. More info: ${chalk.yellow( diff --git a/code/lib/cli/src/automigrate/fixes/autodocs-true.ts b/code/lib/cli/src/automigrate/fixes/autodocs-true.ts new file mode 100644 index 000000000000..00bc5faed2ba --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/autodocs-true.ts @@ -0,0 +1,101 @@ +import chalk from 'chalk'; +import { dedent } from 'ts-dedent'; + +import type { ConfigFile } from '@storybook/csf-tools'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; +import { getStorybookInfo } from '@storybook/core-common'; +import type { StorybookConfig } from '@storybook/types'; + +import type { Fix } from '../types'; + +const logger = console; + +interface AutodocsTrueFrameworkRunOptions { + main: ConfigFile; + value?: StorybookConfig['docs']['autodocs']; +} + +/** + * Set the docs.autodocs option to true if it isn't already set + */ +export const autodocsTrue: Fix = { + id: 'autodocsTrue', + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + + const { mainConfig } = getStorybookInfo(packageJson); + + if (!mainConfig) { + logger.warn('Unable to find storybook main.js config, skipping'); + return null; + } + + const main = await readConfig(mainConfig); + const docs = main.getFieldValue(['docs']); + + const docsPageToAutodocsMapping = { + true: 'tag' as const, + automatic: true, + false: false, + }; + if (docs?.docsPage) { + const oldValue = docs?.docsPage.toString(); + if (!(oldValue in docsPageToAutodocsMapping)) + throw new Error(`Unexpected value for docs.docsPage: ${oldValue}`); + return { + main, + value: docsPageToAutodocsMapping[oldValue as keyof typeof docsPageToAutodocsMapping], + }; + } + + return docs?.autodocs === undefined ? { main } : null; + }, + + prompt({ value }) { + const autodocsFormatted = chalk.cyan(`docs: { autodocs: ${JSON.stringify(value ?? true)} }`); + + if (value) { + return dedent` + We've changed the configuration of autodocs (previous docsPage), so now the value: + - docs.autodocs: true -- means automatically create docs for every CSF file + - docs.autodocs: 'tag' -- means only create autodocs for CSF files with the 'autodocs' tag + - docs.autodocs: false -- means never create autodocs + + Based on your prior configuration, we can set the \`docs.autodocs\` to keep your old behaviour: + + ${autodocsFormatted} + + ${ + value === 'tag' && + `NOTE: it is important you change all CSF files to use the 'autodocs' tag rather than the 'docsPage' tag.` + } + + More info: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#autodocs' + )} + `; + } + + return dedent` + We've detected that your main.js configuration file has not configured autodocs. In 6.x we + we defaulted to having a autodocs for every story, in 7.x you need to opt in per-component. + However, we can set the \`docs.autodocs\` to true to approximate the old behaviour: + + ${autodocsFormatted} + + More info: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#autodocs' + )} + `; + }, + + async run({ result: { main, value }, dryRun }) { + logger.info(`✅ Setting 'docs.autodocs' to true in main.js`); + if (!dryRun) { + main.removeField(['docs', 'docsPage']); + main.setFieldValue(['docs', 'autodocs'], value ?? true); + await writeConfig(main); + } + }, +}; diff --git a/lib/cli/src/automigrate/fixes/builder-vite.test.ts b/code/lib/cli/src/automigrate/fixes/builder-vite.test.ts similarity index 86% rename from lib/cli/src/automigrate/fixes/builder-vite.test.ts rename to code/lib/cli/src/automigrate/fixes/builder-vite.test.ts index aa21e490b8af..6981d288c265 100644 --- a/lib/cli/src/automigrate/fixes/builder-vite.test.ts +++ b/code/lib/cli/src/automigrate/fixes/builder-vite.test.ts @@ -1,12 +1,19 @@ /* eslint-disable no-underscore-dangle */ -import path from 'path'; -import { JsPackageManager } from '../../js-package-manager'; +import * as path from 'path'; +import type { StorybookConfig } from '@storybook/types'; +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; import { builderVite } from './builder-vite'; // eslint-disable-next-line global-require, jest/no-mocks-import jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); -const checkBuilderVite = async ({ packageJson = {}, main }) => { +const checkBuilderVite = async ({ + packageJson = {}, + main, +}: { + packageJson?: PackageJson; + main: Partial; +}) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, diff --git a/lib/cli/src/automigrate/fixes/builder-vite.ts b/code/lib/cli/src/automigrate/fixes/builder-vite.ts similarity index 89% rename from lib/cli/src/automigrate/fixes/builder-vite.ts rename to code/lib/cli/src/automigrate/fixes/builder-vite.ts index 9c8d382b7210..16ff7e5c8cdc 100644 --- a/lib/cli/src/automigrate/fixes/builder-vite.ts +++ b/code/lib/cli/src/automigrate/fixes/builder-vite.ts @@ -1,11 +1,12 @@ import chalk from 'chalk'; -import dedent from 'ts-dedent'; +import { dedent } from 'ts-dedent'; -import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools'; +import type { ConfigFile } from '@storybook/csf-tools'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; import { getStorybookInfo } from '@storybook/core-common'; -import { Fix } from '../types'; -import { PackageJson, writePackageJson } from '../../js-package-manager'; +import type { Fix } from '../types'; +import type { PackageJson } from '../../js-package-manager'; const logger = console; @@ -70,7 +71,7 @@ export const builderVite: Fix = { if (!dryRun) { delete dependencies['storybook-builder-vite']; delete devDependencies['storybook-builder-vite']; - writePackageJson(packageJson); + packageManager.writePackageJson(packageJson); } logger.info(`Adding '@storybook/builder-vite' as dev dependency`); diff --git a/lib/cli/src/automigrate/fixes/cra5.test.ts b/code/lib/cli/src/automigrate/fixes/cra5.test.ts similarity index 92% rename from lib/cli/src/automigrate/fixes/cra5.test.ts rename to code/lib/cli/src/automigrate/fixes/cra5.test.ts index 72e42f9f6f65..db3066f6f5a8 100644 --- a/lib/cli/src/automigrate/fixes/cra5.test.ts +++ b/code/lib/cli/src/automigrate/fixes/cra5.test.ts @@ -1,12 +1,19 @@ /* eslint-disable no-underscore-dangle */ -import path from 'path'; -import { JsPackageManager } from '../../js-package-manager'; +import * as path from 'path'; +import type { StorybookConfig } from '@storybook/types'; +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; import { cra5 } from './cra5'; // eslint-disable-next-line global-require, jest/no-mocks-import jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); -const checkCra5 = async ({ packageJson, main }) => { +const checkCra5 = async ({ + packageJson, + main, +}: { + packageJson: PackageJson; + main: Partial; +}) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, diff --git a/lib/cli/src/automigrate/fixes/cra5.ts b/code/lib/cli/src/automigrate/fixes/cra5.ts similarity index 79% rename from lib/cli/src/automigrate/fixes/cra5.ts rename to code/lib/cli/src/automigrate/fixes/cra5.ts index 74d7b567d4ec..b4d9e156e83a 100644 --- a/lib/cli/src/automigrate/fixes/cra5.ts +++ b/code/lib/cli/src/automigrate/fixes/cra5.ts @@ -1,8 +1,8 @@ import chalk from 'chalk'; -import dedent from 'ts-dedent'; -import semver from '@storybook/semver'; -import { ConfigFile } from '@storybook/csf-tools'; -import { Fix } from '../types'; +import { dedent } from 'ts-dedent'; +import semver from 'semver'; +import type { ConfigFile } from '@storybook/csf-tools'; +import type { Fix } from '../types'; import { webpack5 } from './webpack5'; interface CRA5RunOptions { @@ -35,15 +35,17 @@ export const cra5: Fix = { return builderInfo ? { craVersion, ...builderInfo } : null; }, - prompt({ craVersion, storybookVersion }) { + prompt({ craVersion, ...rest }) { const craFormatted = chalk.cyan(`Create React App (CRA) ${craVersion}`); - const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); + + console.log({ ...rest }); + return dedent` We've detected you are running ${craFormatted} which is powered by webpack5. - ${sbFormatted} runs webpack4 by default, which is incompatible. + Your Storybook's main.js files specifies webpack4, which is incompatible. In order to work with your version of CRA, we need to install Storybook's ${chalk.cyan( - 'webpack5 builder' + '@storybook/builder-webpack5' )}. More info: ${chalk.yellow( diff --git a/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts b/code/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts similarity index 91% rename from lib/cli/src/automigrate/fixes/eslint-plugin.test.ts rename to code/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts index b87856375474..a82ee63fed52 100644 --- a/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts +++ b/code/lib/cli/src/automigrate/fixes/eslint-plugin.test.ts @@ -1,7 +1,8 @@ /* eslint-disable no-underscore-dangle */ -import path from 'path'; -import dedent from 'ts-dedent'; -import { JsPackageManager } from '../../js-package-manager'; +import * as path from 'path'; +import { dedent } from 'ts-dedent'; +import type { StorybookConfig } from '@storybook/types'; +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; import { eslintPlugin } from './eslint-plugin'; // eslint-disable-next-line global-require, jest/no-mocks-import @@ -12,6 +13,11 @@ const checkEslint = async ({ main = {}, hasEslint = true, eslintExtension = 'js', +}: { + packageJson: PackageJson; + main?: Partial & Record; + hasEslint?: boolean; + eslintExtension?: string; }) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ diff --git a/code/lib/cli/src/automigrate/fixes/eslint-plugin.ts b/code/lib/cli/src/automigrate/fixes/eslint-plugin.ts new file mode 100644 index 000000000000..ba3b481b080d --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/eslint-plugin.ts @@ -0,0 +1,120 @@ +import chalk from 'chalk'; +import { dedent } from 'ts-dedent'; +import type { ConfigFile } from '@storybook/csf-tools'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; +import { getStorybookInfo } from '@storybook/core-common'; +import { readFile, readJson, writeJson } from 'fs-extra'; +import detectIndent from 'detect-indent'; + +import { findEslintFile, SUPPORTED_ESLINT_EXTENSIONS } from '../helpers/getEslintInfo'; + +import type { Fix } from '../types'; + +const logger = console; + +interface EslintPluginRunOptions { + main: ConfigFile; + eslintFile: string; + unsupportedExtension?: string; +} + +/** + * Does the user not have eslint-plugin-storybook installed? + * + * If so: + * - Install it, and if possible configure it + */ +export const eslintPlugin: Fix = { + id: 'eslintPlugin', + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + const { dependencies, devDependencies } = packageJson; + + const eslintPluginStorybook = + dependencies['eslint-plugin-storybook'] || devDependencies['eslint-plugin-storybook']; + const eslintDependency = dependencies.eslint || devDependencies.eslint; + + if (eslintPluginStorybook || !eslintDependency) { + return null; + } + + const { mainConfig } = getStorybookInfo(packageJson); + + if (!mainConfig) { + logger.warn('Unable to find storybook main.js config, skipping'); + return null; + } + + let eslintFile; + let unsupportedExtension; + try { + eslintFile = findEslintFile(); + } catch (err) { + unsupportedExtension = err.message; + } + + if (!eslintFile && !unsupportedExtension) { + logger.warn('Unable to find .eslintrc config file, skipping'); + return null; + } + + // If in the future the eslint plugin has a framework option, using main to extract the framework field will be very useful + const main = await readConfig(mainConfig); + + return { eslintFile, main, unsupportedExtension }; + }, + + prompt() { + return dedent` + We've detected you are not using our eslint-plugin. + + In order to have the best experience with Storybook and follow best practices, we advise you to install eslint-plugin-storybook. + + More info: ${chalk.yellow('https://github.com/storybookjs/eslint-plugin-storybook#readme')} + `; + }, + + async run({ result: { eslintFile, unsupportedExtension }, packageManager, dryRun }) { + const deps = [`eslint-plugin-storybook`]; + + logger.info(`✅ Adding dependencies: ${deps}`); + if (!dryRun) packageManager.addDependencies({ installAsDevDependencies: true }, deps); + + if (!dryRun && unsupportedExtension) { + logger.info(dedent` + ⚠️ The plugin was successfully installed but failed to configure. + + Found an eslint config file with an unsupported automigration format: .eslintrc.${unsupportedExtension}. + The supported formats for this automigration are: ${SUPPORTED_ESLINT_EXTENSIONS.join( + ', ' + )}. + + Please refer to https://github.com/storybookjs/eslint-plugin-storybook#usage to finish setting up the plugin manually. + `); + return; + } + + logger.info(`✅ Adding Storybook plugin to ${eslintFile}`); + if (!dryRun) { + if (eslintFile.endsWith('json')) { + const eslintConfig = (await readJson(eslintFile)) as { extends?: string[] }; + const existingConfigValue = Array.isArray(eslintConfig.extends) + ? eslintConfig.extends + : [eslintConfig.extends]; + eslintConfig.extends = [...(existingConfigValue || []), 'plugin:storybook/recommended']; + + const eslintFileContents = await readFile(eslintFile, 'utf8'); + const spaces = detectIndent(eslintFileContents).amount || 2; + await writeJson(eslintFile, eslintConfig, { spaces }); + } else { + const eslint = await readConfig(eslintFile); + const extendsConfig = eslint.getFieldValue(['extends']) || []; + const existingConfigValue = Array.isArray(extendsConfig) ? extendsConfig : [extendsConfig]; + eslint.setFieldValue(['extends'], [...existingConfigValue, 'plugin:storybook/recommended']); + + await writeConfig(eslint); + } + } + }, +}; diff --git a/code/lib/cli/src/automigrate/fixes/index.ts b/code/lib/cli/src/automigrate/fixes/index.ts new file mode 100644 index 000000000000..924c558d3314 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/index.ts @@ -0,0 +1,41 @@ +import type { Fix } from '../types'; + +import { cra5 } from './cra5'; +import { webpack5 } from './webpack5'; +import { angular12 } from './angular12'; +import { vue3 } from './vue3'; +import { mainjsFramework } from './mainjsFramework'; +import { eslintPlugin } from './eslint-plugin'; +import { builderVite } from './builder-vite'; +import { sbScripts } from './sb-scripts'; +import { sbBinary } from './sb-binary'; +import { nextjsFramework } from './nextjs-framework'; +import { newFrameworks } from './new-frameworks'; +import { removedGlobalClientAPIs } from './remove-global-client-apis'; +import { mdx1to2 } from './mdx-1-to-2'; +import { autodocsTrue } from './autodocs-true'; +import { sveltekitFramework } from './sveltekit-framework'; +import { addReact } from './add-react'; +import { nodeJsRequirement } from './nodejs-requirement'; + +export * from '../types'; + +export const fixes: Fix[] = [ + nodeJsRequirement, + cra5, + webpack5, + angular12, + vue3, + mainjsFramework, + eslintPlugin, + sveltekitFramework, + builderVite, + sbBinary, + sbScripts, + newFrameworks, + nextjsFramework, + removedGlobalClientAPIs, + mdx1to2, + autodocsTrue, + addReact, +]; diff --git a/lib/cli/src/automigrate/fixes/mainjsFramework.ts b/code/lib/cli/src/automigrate/fixes/mainjsFramework.ts similarity index 85% rename from lib/cli/src/automigrate/fixes/mainjsFramework.ts rename to code/lib/cli/src/automigrate/fixes/mainjsFramework.ts index 15a67e3ac674..b08460602cf8 100644 --- a/lib/cli/src/automigrate/fixes/mainjsFramework.ts +++ b/code/lib/cli/src/automigrate/fixes/mainjsFramework.ts @@ -1,11 +1,12 @@ import chalk from 'chalk'; -import dedent from 'ts-dedent'; +import { dedent } from 'ts-dedent'; -import semver from '@storybook/semver'; -import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools'; +import semver from 'semver'; +import type { ConfigFile } from '@storybook/csf-tools'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; import { getStorybookInfo } from '@storybook/core-common'; -import { Fix } from '../types'; +import type { Fix } from '../types'; const logger = console; @@ -19,6 +20,8 @@ export const mainjsFramework: Fix = { async check({ packageManager }) { const packageJson = packageManager.retrievePackageJson(); + + // FIXME: use renderer in SB7? const { mainConfig, framework, version: storybookVersion } = getStorybookInfo(packageJson); if (!mainConfig) { @@ -28,11 +31,10 @@ export const mainjsFramework: Fix = { const storybookCoerced = storybookVersion && semver.coerce(storybookVersion)?.version; if (!storybookCoerced) { - logger.warn(dedent` - ❌ Unable to determine storybook version, skipping ${chalk.cyan('mainjsFramework')} fix. + throw new Error(dedent` + ❌ Unable to determine storybook version. 🤔 Are you running automigrate from your project directory? `); - return null; } const main = await readConfig(mainConfig); diff --git a/code/lib/cli/src/automigrate/fixes/mdx-1-to-2.test.ts b/code/lib/cli/src/automigrate/fixes/mdx-1-to-2.test.ts new file mode 100644 index 000000000000..d3f1556f42b9 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/mdx-1-to-2.test.ts @@ -0,0 +1,120 @@ +/// ; + +import { dedent } from 'ts-dedent'; +import { fixMdxStyleTags, fixMdxComments } from './mdx-1-to-2'; + +it('fixMdxStyleTags fixes badly-formatted style blocks', () => { + expect( + fixMdxStyleTags(dedent` + + `) + ).toEqual(dedent` + + `); +}); + +it('fixMdxStyleTags fixes multiple style blocks', () => { + expect( + fixMdxStyleTags(dedent` + + + `) + ).toMatchInlineSnapshot(` + + + `); +}); + +it('fixMdxComments fixes all comments', () => { + expect( + fixMdxComments(dedent` + # Hello + + + + and this is not + + + `) + ).toMatchInlineSnapshot(` + "# Hello + + {/* This is a comment */} + + and this is not + + {/* This is another comment */}" + `); +}); + +it('fixMdxComments keeps html comments in codeblocks', () => { + expect( + fixMdxComments(dedent` + # Hello + + ~~~html + + ~~~ + + ~~~html + + ~~~ + + \`\`\`html + + \`\`\` + + \`\`\`html + + \`\`\` + + and this is not + + + `) + ).toMatchInlineSnapshot(` + "# Hello + + ~~~html + + ~~~ + + ~~~html + + ~~~ + + \`\`\`html + + \`\`\` + + \`\`\`html + + \`\`\` + + and this is not + + {/* This is another comment */}" + `); +}); diff --git a/code/lib/cli/src/automigrate/fixes/mdx-1-to-2.ts b/code/lib/cli/src/automigrate/fixes/mdx-1-to-2.ts new file mode 100644 index 000000000000..baa316241884 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/mdx-1-to-2.ts @@ -0,0 +1,83 @@ +import chalk from 'chalk'; +import { dedent } from 'ts-dedent'; +import { basename } from 'path'; +import fse from 'fs-extra'; +import globby from 'globby'; +import type { Fix } from '../types'; + +const MDX1_STYLE_START = /'); +}; + +export const fixMdxComments = (mdx: string) => { + const codeblocks = mdx.matchAll(MDX1_CODEBLOCK); + + // separate the mdx into sections without codeblocks & replace html comments NOT in codeblocks + const sections = mdx + .split(MDX1_CODEBLOCK) + .map((v) => v.replace(MDX1_COMMENT, (original, group) => `{/*${group}*/}`)); + + // interleave the original codeblocks with the replaced sections + return sections.reduce((acc, item, i) => { + const next = codeblocks.next(); + return next.done ? acc + item : acc + item + next.value[0]; + }, ''); +}; + +const logger = console; + +interface Mdx1to2Options { + storiesMdxFiles: string[]; +} + +/** + * Does the user have `.stories.mdx` files? + * + * If so: + * - Assume they might be MDX1 + * - Offer to help migrate to MDX2 + */ +export const mdx1to2: Fix = { + id: 'mdx1to2', + + async check() { + const storiesMdxFiles = await globby('./!(node_modules)**/*.(story|stories).mdx'); + return storiesMdxFiles.length ? { storiesMdxFiles } : undefined; + }, + + prompt({ storiesMdxFiles }) { + return dedent` + We've found ${chalk.yellow(storiesMdxFiles.length)} '.stories.mdx' files in your project. + + Storybook has upgraded to MDX2 (https://mdxjs.com/blog/v2/), which contains breaking changes from V1. + + We can try to automatically upgrade your MDX files to MDX2 format using some common patterns. + + For a full guide for how to manually upgrade your files, see the MDX2 migration guide: + + ${chalk.cyan('https://mdxjs.com/migrating/v2/#update-mdx-files')} + `; + }, + + async run({ result: { storiesMdxFiles }, dryRun }) { + await Promise.all([ + ...storiesMdxFiles.map(async (fname) => { + const contents = await fse.readFile(fname, 'utf-8'); + const updated = fixMdxComments(fixMdxStyleTags(contents)); + if (updated === contents) { + logger.info(`🆗 Unmodified ${basename(fname)}`); + } else { + logger.info(`✅ Modified ${basename(fname)}`); + if (!dryRun) { + await fse.writeFile(fname, updated); + } + } + }), + ]); + }, +}; diff --git a/code/lib/cli/src/automigrate/fixes/new-frameworks.test.ts b/code/lib/cli/src/automigrate/fixes/new-frameworks.test.ts new file mode 100644 index 000000000000..db4c33492620 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/new-frameworks.test.ts @@ -0,0 +1,284 @@ +/* eslint-disable no-underscore-dangle */ +import * as path from 'path'; +import type { StorybookConfig } from '@storybook/types'; +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; +import { newFrameworks } from './new-frameworks'; + +// eslint-disable-next-line global-require, jest/no-mocks-import +jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); + +const checkNewFrameworks = async ({ + packageJson, + main, +}: { + packageJson: PackageJson; + main: Partial & Record; +}) => { + if (main) { + // eslint-disable-next-line global-require + require('fs-extra').__setMockFiles({ + [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, + }); + } + const packageManager = { + retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), + } as JsPackageManager; + return newFrameworks.check({ packageManager }); +}; + +describe('new-frameworks fix', () => { + describe('should no-op', () => { + it('in sb < 7', async () => { + const packageJson = { dependencies: { '@storybook/vue': '^6.2.0' } }; + await expect( + checkNewFrameworks({ + packageJson, + main: {}, + }) + ).resolves.toBeFalsy(); + }); + + it('in sb 7 with no main', async () => { + const packageJson = { dependencies: { '@storybook/vue': '^7.0.0' } }; + await expect( + checkNewFrameworks({ + packageJson, + main: undefined, + }) + ).resolves.toBeFalsy(); + }); + + it('in sb 7 with no framework field in main', async () => { + const packageJson = { dependencies: { '@storybook/vue': '^7.0.0' } }; + await expect( + checkNewFrameworks({ + packageJson, + main: {}, + }) + ).resolves.toBeFalsy(); + }); + + it('in sb 7 with no builder', async () => { + const packageJson = { dependencies: { '@storybook/vue': '^7.0.0' } }; + await expect( + checkNewFrameworks({ + packageJson, + main: { + framework: '@storybook/vue', + }, + }) + ).resolves.toEqual( + expect.objectContaining({ + frameworkPackage: '@storybook/vue-webpack5', + dependenciesToAdd: ['@storybook/vue-webpack5'], + dependenciesToRemove: [], + }) + ); + }); + + it('in sb 7 with unsupported package', async () => { + const packageJson = { dependencies: { '@storybook/riot': '^7.0.0' } }; + await expect( + checkNewFrameworks({ + packageJson, + main: { + framework: '@storybook/riot', + core: { + builder: 'webpack5', + }, + }, + }) + ).resolves.toBeFalsy(); + }); + + // TODO: once we have a @storybook/vue-vite framework, we should remove this test + it('in sb 7 with vue and vite', async () => { + const packageJson = { + dependencies: { + '@storybook/vue': '^7.0.0', + '@storybook/builder-vite': 'x.y.z', + }, + }; + await expect( + checkNewFrameworks({ + packageJson, + main: { + framework: '@storybook/vue', + core: { + builder: '@storybook/builder-vite', + }, + }, + }) + ).resolves.toBeFalsy(); + }); + + it('in sb 7 with vite < 3', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0', + '@storybook/builder-vite': 'x.y.z', + vite: '^2.0.0', + }, + }; + await expect( + checkNewFrameworks({ + packageJson, + main: { + framework: '@storybook/react', + core: { + builder: '@storybook/builder-vite', + }, + }, + }) + ).rejects.toBeTruthy(); + }); + }); + + describe('sb >= 7', () => { + describe('new-frameworks dependency', () => { + it('should update to @storybook/react-webpack5', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + '@storybook/builder-webpack5': '^6.5.9', + '@storybook/manager-webpack5': '^6.5.9', + }, + }; + await expect( + checkNewFrameworks({ + packageJson, + main: { + framework: '@storybook/react', + core: { + builder: { + name: 'webpack5', + options: { + lazyCompilation: true, + }, + }, + }, + reactOptions: { + fastRefresh: true, + }, + }, + }) + ).resolves.toEqual( + expect.objectContaining({ + frameworkPackage: '@storybook/react-webpack5', + dependenciesToAdd: ['@storybook/react-webpack5'], + dependenciesToRemove: ['@storybook/builder-webpack5', '@storybook/manager-webpack5'], + frameworkOptions: { + fastRefresh: true, + }, + builderInfo: { + name: 'webpack5', + options: { + lazyCompilation: true, + }, + }, + }) + ); + }); + + it('should update only builders in @storybook/angular', async () => { + const packageJson = { + dependencies: { + '@storybook/angular': '^7.0.0-alpha.0', + '@storybook/builder-webpack5': '^6.5.9', + '@storybook/manager-webpack5': '^6.5.9', + }, + }; + await expect( + checkNewFrameworks({ + packageJson, + main: { + framework: '@storybook/angular', + core: { + builder: { + name: 'webpack5', + options: { + lazyCompilation: true, + }, + }, + }, + angularOptions: { + enableIvy: true, + enableNgcc: true, + }, + }, + }) + ).resolves.toEqual( + expect.objectContaining({ + frameworkPackage: '@storybook/angular', + dependenciesToAdd: [], + dependenciesToRemove: ['@storybook/builder-webpack5', '@storybook/manager-webpack5'], + frameworkOptions: { + enableIvy: true, + enableNgcc: true, + }, + builderInfo: { + name: 'webpack5', + options: { + lazyCompilation: true, + }, + }, + }) + ); + }); + + it('should update to @storybook/react-vite', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + '@storybook/builder-vite': '^0.0.2', + vite: '3.0.0', + }, + }; + await expect( + checkNewFrameworks({ + packageJson, + main: { + framework: '@storybook/react', + core: { + builder: '@storybook/builder-vite', + }, + }, + }) + ).resolves.toEqual( + expect.objectContaining({ + frameworkPackage: '@storybook/react-vite', + dependenciesToAdd: ['@storybook/react-vite'], + dependenciesToRemove: ['@storybook/builder-vite'], + }) + ); + }); + + it('should update to @storybook/preact-vite', async () => { + const packageJson = { + dependencies: { + '@storybook/preact': '^7.0.0-alpha.0', + '@storybook/builder-vite': '^0.0.2', + vite: '3.0.0', + }, + }; + await expect( + checkNewFrameworks({ + packageJson, + main: { + framework: '@storybook/preact', + core: { + builder: '@storybook/builder-vite', + }, + }, + }) + ).resolves.toEqual( + expect.objectContaining({ + frameworkPackage: '@storybook/preact-vite', + dependenciesToAdd: ['@storybook/preact-vite'], + dependenciesToRemove: ['@storybook/builder-vite'], + }) + ); + }); + }); + }); +}); diff --git a/code/lib/cli/src/automigrate/fixes/new-frameworks.ts b/code/lib/cli/src/automigrate/fixes/new-frameworks.ts new file mode 100644 index 000000000000..d6935e92c703 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/new-frameworks.ts @@ -0,0 +1,285 @@ +import chalk from 'chalk'; +import dedent from 'ts-dedent'; +import semver from 'semver'; +import type { ConfigFile } from '@storybook/csf-tools'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; +import { getStorybookInfo } from '@storybook/core-common'; + +import type { Fix } from '../types'; +import type { PackageJsonWithDepsAndDevDeps } from '../../js-package-manager'; +import { getStorybookVersionSpecifier } from '../../helpers'; + +const logger = console; + +const packagesMap: Record = { + '@storybook/react': { + webpack5: '@storybook/react-webpack5', + vite: '@storybook/react-vite', + }, + '@storybook/preact': { + webpack5: '@storybook/preact-webpack5', + vite: '@storybook/preact-vite', + }, + '@storybook/server': { + webpack5: '@storybook/server-webpack5', + }, + '@storybook/angular': { + webpack5: '@storybook/angular', + }, + '@storybook/vue': { + webpack5: '@storybook/vue-webpack5', + // TODO: bring this back if we ever want to support vue 2 + vite. Else delete this! + // vite: '@storybook/vue-vite', + }, + '@storybook/vue3': { + webpack5: '@storybook/vue3-webpack5', + vite: '@storybook/vue3-vite', + }, + '@storybook/svelte': { + webpack5: '@storybook/svelte-webpack5', + vite: '@storybook/svelte-vite', + }, + '@storybook/web-components': { + webpack5: '@storybook/web-components-webpack5', + vite: '@storybook/web-components-vite', + }, + '@storybook/html': { + webpack5: '@storybook/html-webpack5', + vite: '@storybook/html-vite', + }, +}; + +interface NewFrameworkRunOptions { + main: ConfigFile; + packageJson: PackageJsonWithDepsAndDevDeps; + dependenciesToAdd: string[]; + dependenciesToRemove: string[]; + frameworkPackage: string; + frameworkOptions: Record; + builderInfo: { + name: string; + options: Record; + }; +} + +export const getBuilder = (builder: string | { name: string }) => { + if (typeof builder === 'string') { + return builder.includes('vite') ? 'vite' : 'webpack5'; + } + + return builder?.name.includes('vite') ? 'vite' : 'webpack5'; +}; + +export const getFrameworkOptions = (framework: string, main: ConfigFile) => { + let frameworkOptions = {}; + try { + frameworkOptions = main.getFieldValue([`${framework}Options`]); + } catch (e) { + logger.warn(dedent` + Unable to get the ${framework}Options field. + + Please review the changes made to your main.js config and make any necessary changes. + The ${framework}Options should be moved to the framework.options field. + + The following error occurred when we tried to get the ${framework}Options field: + `); + console.log(e); + } + return frameworkOptions || {}; +}; + +/** + * Does the user have separate framework and builders (e.g. @storybook/react + core.builder -> webpack5? + * + * If so: + * - Remove the dependencies (@storybook/react + @storybook/builder-webpack5 + @storybook/manager-webpack5) + * - Install the correct new package e.g. (@storybook/react-webpack5) + * - Update the main config to use the new framework + * -- moving core.builder into framework.options.builder + * -- moving frameworkOptions (e.g. reactOptions) into framework.options + */ +export const newFrameworks: Fix = { + id: 'newFrameworks', + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + const allDeps = { ...packageJson.dependencies, ...packageJson.devDependencies }; + + // FIXME: update to use renderer instead of framework + const { mainConfig, version: storybookVersion, framework } = getStorybookInfo(packageJson); + if (!mainConfig) { + logger.warn('Unable to find storybook main.js config, skipping'); + return null; + } + + const storybookCoerced = storybookVersion && semver.coerce(storybookVersion)?.version; + if (!storybookCoerced) { + throw new Error(dedent` + ❌ Unable to determine storybook version. + 🤔 Are you running automigrate from your project directory? + `); + } + + if (!semver.gte(storybookCoerced, '7.0.0')) { + return null; + } + + // If in the future the eslint plugin has a framework option, using main to extract the framework field will be very useful + const main = await readConfig(mainConfig); + + const frameworkPackage = main.getFieldValue(['framework']) as keyof typeof packagesMap; + const builder = main.getFieldValue(['core', 'builder']); + + if (!frameworkPackage) { + return null; + } + + const supportedPackages = Object.keys(packagesMap); + if (!supportedPackages.includes(frameworkPackage)) { + return null; + } + + const builderInfo = { + name: getBuilder(builder), + options: main.getFieldValue(['core', 'builder', 'options']) || {}, + } as const; + + const newFrameworkPackage = packagesMap[frameworkPackage][builderInfo.name]; + + // not all frameworks support vite yet e.g. Svelte + if (!newFrameworkPackage) { + return null; + } + + const frameworkOptions = + // svelte-vite doesn't support svelteOptions so there's no need to move them + newFrameworkPackage === '@storybook/svelte-vite' ? {} : getFrameworkOptions(framework, main); + + const dependenciesToRemove = [ + '@storybook/builder-webpack5', + '@storybook/manager-webpack5', + '@storybook/builder-webpack4', + '@storybook/manager-webpack4', + '@storybook/builder-vite', + 'storybook-builder-vite', + ].filter((dep) => allDeps[dep]); + + const dependenciesToAdd = []; + + // some frameworks didn't change e.g. Angular, Ember + if (newFrameworkPackage !== frameworkPackage) { + dependenciesToAdd.push(newFrameworkPackage); + } + + if (allDeps.vite && semver.lt(semver.coerce(allDeps.vite).version, '3.0.0')) { + throw new Error(dedent` + ❌ Your project should be upgraded to use the framework package ${chalk.bold( + newFrameworkPackage + )}, but we detected that you are using Vite ${chalk.bold( + allDeps.vite + )}, which is unsupported in ${chalk.bold( + 'Storybook 7.0' + )}. Please upgrade Vite to ${chalk.bold('3.0.0 or higher')} and rerun this migration. + `); + } + + return { + main, + dependenciesToAdd, + dependenciesToRemove, + frameworkPackage: newFrameworkPackage, + frameworkOptions, + builderInfo, + packageJson, + }; + }, + + prompt({ frameworkPackage, dependenciesToRemove }) { + return dedent` + We've detected you are using an older format of Storybook frameworks and builders. + + In Storybook 7, frameworks also specify the builder to be used. + + We can remove the dependencies that are no longer needed: ${chalk.yellow( + dependenciesToRemove.join(', ') + )} + + And set up the ${chalk.magenta(frameworkPackage)} framework that already includes the builder. + + To learn more about the framework field, see: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory' + )} + + ${chalk.underline(chalk.bold(chalk.cyan('Webpack4 users')))} + + Unless you're using Storybook's Vite builder, this automigration will install a Webpack5-based framework. + + If you were using Storybook's Webpack4 builder (default in 6.x, discontinued in 7.0), this could be a breaking + change -- especially if your project has a custom webpack configuration. + + To learn more about migrating from Webpack4, see: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#webpack4-support-discontinued' + )} + `; + }, + + async run({ + result: { + dependenciesToAdd, + dependenciesToRemove, + main, + frameworkPackage, + frameworkOptions, + builderInfo, + packageJson, + }, + packageManager, + dryRun, + }) { + logger.info(`✅ Removing legacy dependencies: ${dependenciesToRemove.join(', ')}`); + if (!dryRun) { + packageManager.removeDependencies( + { skipInstall: dependenciesToAdd.length > 0, packageJson }, + dependenciesToRemove + ); + } + if (dependenciesToAdd.length > 0) { + logger.info(`✅ Installing new dependencies: ${dependenciesToAdd.join(', ')}`); + if (!dryRun) { + const versionToInstall = getStorybookVersionSpecifier(packageJson); + const depsToAdd = dependenciesToAdd.map((dep) => `${dep}@${versionToInstall}`); + packageManager.addDependencies({ installAsDevDependencies: true }, depsToAdd); + } + } + + if (!dryRun) { + logger.info(`✅ Updating framework field in main.js`); + const currentCore = main.getFieldValue(['core']); + main.setFieldValue(['framework', 'name'], frameworkPackage); + main.setFieldValue(['framework', 'options'], frameworkOptions); + + if (currentCore?.builder) { + delete currentCore.builder; + } + + if (frameworkPackage === '@storybook/svelte-vite' && main.getFieldNode(['svelteOptions'])) { + logger.info(`✅ Removing svelteOptions field in main.js`); + main.removeField(['svelteOptions']); + } + + if (Object.keys(builderInfo.options).length > 0) { + main.setFieldValue(['framework', 'options', 'builder'], builderInfo.options); + } + + if (currentCore) { + if (Object.keys(currentCore).length === 0) { + main.removeField(['core']); + } else { + main.setFieldValue(['core'], currentCore); + } + } + + await writeConfig(main); + } + }, +}; diff --git a/code/lib/cli/src/automigrate/fixes/nextjs-framework.test.ts b/code/lib/cli/src/automigrate/fixes/nextjs-framework.test.ts new file mode 100644 index 000000000000..2f8d57bbfee7 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/nextjs-framework.test.ts @@ -0,0 +1,183 @@ +/* eslint-disable no-underscore-dangle */ +import path from 'path'; +import type { JsPackageManager } from '../../js-package-manager'; +import { nextjsFramework } from './nextjs-framework'; + +// eslint-disable-next-line global-require, jest/no-mocks-import +jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); + +const checkNextjsFramework = async ({ packageJson, main }: any) => { + if (main) { + // eslint-disable-next-line global-require + require('fs-extra').__setMockFiles({ + [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, + }); + } + const packageManager = { + retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), + } as JsPackageManager; + return nextjsFramework.check({ packageManager }); +}; + +describe('nextjs-framework fix', () => { + describe('should no-op', () => { + it('in sb < 7', async () => { + const packageJson = { dependencies: { '@storybook/react': '^6.2.0' } }; + await expect( + checkNextjsFramework({ + packageJson, + main: {}, + }) + ).resolves.toBeFalsy(); + }); + + it('in sb 7 with no main', async () => { + const packageJson = { dependencies: { '@storybook/react': '^7.0.0' } }; + await expect( + checkNextjsFramework({ + packageJson, + main: undefined, + }) + ).resolves.toBeFalsy(); + }); + + it('in sb 7 with no framework field in main', async () => { + const packageJson = { dependencies: { '@storybook/react': '^7.0.0' } }; + await expect( + checkNextjsFramework({ + packageJson, + main: {}, + }) + ).resolves.toBeFalsy(); + }); + + it('in sb 7 in non-nextjs projects', async () => { + const packageJson = { dependencies: { '@storybook/react': '^7.0.0' } }; + await expect( + checkNextjsFramework({ + packageJson, + main: { + framework: '@storybook/react', + }, + }) + ).resolves.toBeFalsy(); + }); + + it('in sb 7 with unsupported package', async () => { + const packageJson = { dependencies: { '@storybook/riot': '^7.0.0' } }; + await expect( + checkNextjsFramework({ + packageJson, + main: { + framework: '@storybook/riot', + core: { + builder: 'webpack5', + }, + }, + }) + ).resolves.toBeFalsy(); + }); + }); + + describe('sb >= 7', () => { + it('should update from @storybook/react-webpack5 to @storybook/nextjs', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + '@storybook/react-webpack5': '^7.0.0-alpha.0', + next: '^12.0.0', + }, + }; + await expect( + checkNextjsFramework({ + packageJson, + main: { + framework: '@storybook/react-webpack5', + }, + }) + ).resolves.toEqual(expect.objectContaining({})); + }); + + it('should remove legacy addons', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + '@storybook/react-webpack5': '^7.0.0-alpha.0', + next: '^12.0.0', + 'storybook-addon-next': '^1.0.0', + 'storybook-addon-next-router': '^1.0.0', + }, + }; + await expect( + checkNextjsFramework({ + packageJson, + main: { + framework: '@storybook/react-webpack5', + addons: ['storybook-addon-next', 'storybook-addon-next-router'], + }, + }) + ).resolves.toEqual( + expect.objectContaining({ + addonsToRemove: ['storybook-addon-next', 'storybook-addon-next-router'], + }) + ); + }); + + it('should move nextjs addon options to frameworkOptions', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + '@storybook/react-webpack5': '^7.0.0-alpha.0', + next: '^12.0.0', + 'storybook-addon-next': '^1.0.0', + }, + }; + await expect( + checkNextjsFramework({ + packageJson, + main: { + framework: { name: '@storybook/react-webpack5', options: { fastRefresh: true } }, + addons: [ + { + name: 'storybook-addon-next', + options: { + nextConfigPath: '../next.config.js', + }, + }, + ], + }, + }) + ).resolves.toEqual( + expect.objectContaining({ + addonsToRemove: ['storybook-addon-next'], + frameworkOptions: { + fastRefresh: true, + nextConfigPath: '../next.config.js', + }, + }) + ); + }); + + it('should warn for @storybook/react-vite users', async () => { + const consoleSpy = jest.spyOn(console, 'info'); + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + '@storybook/react-vite': '^7.0.0-alpha.0', + next: '^12.0.0', + 'storybook-addon-next': '^1.0.0', + }, + }; + await expect( + checkNextjsFramework({ + packageJson, + main: { + framework: { name: '@storybook/react-vite' }, + }, + }) + ).resolves.toBeFalsy(); + + expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining('Vite builder')); + }); + }); +}); diff --git a/code/lib/cli/src/automigrate/fixes/nextjs-framework.ts b/code/lib/cli/src/automigrate/fixes/nextjs-framework.ts new file mode 100644 index 000000000000..5dbe0f5b22cc --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/nextjs-framework.ts @@ -0,0 +1,198 @@ +import chalk from 'chalk'; +import dedent from 'ts-dedent'; +import semver from 'semver'; +import type { ConfigFile } from '@storybook/csf-tools'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; +import { getStorybookInfo } from '@storybook/core-common'; + +import type { Fix } from '../types'; +import type { PackageJsonWithDepsAndDevDeps } from '../../js-package-manager'; +import { getStorybookVersionSpecifier } from '../../helpers'; + +const logger = console; + +interface NextjsFrameworkRunOptions { + main: ConfigFile; + packageJson: PackageJsonWithDepsAndDevDeps; + addonsToRemove: string[]; + frameworkOptions: Record; +} + +type Addon = string | { name: string; options?: Record }; + +export const getNextjsAddonOptions = (addons: Addon[]) => { + const nextjsAddon = addons?.find((addon) => + typeof addon === 'string' + ? addon === 'storybook-addon-next' + : addon.name === 'storybook-addon-next' + ); + + if (!nextjsAddon || typeof nextjsAddon === 'string') { + return {}; + } + + return nextjsAddon.options || {}; +}; + +/** + * Does the user have a nextjs project but is not using the @storybook/nextjs framework package? + * + * If so: + * - Remove the dependencies if webpack (@storybook/react-webpack5) + * - Install the nextjs package (@storybook/nextjs) + * - Uninstall existing legacy addons: storybook-addon-next and storybook-addon-next-router + * - Update StorybookConfig type import (if it exists) from react-webpack5 to nextjs + * - Update the main config to use the new framework + * -- removing legacy addons: storybook-addon-next and storybook-addon-next-router + * -- moving storybook-addon-next options into frameworkOptions + */ +export const nextjsFramework: Fix = { + id: 'nextjsFramework', + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + const allDeps = { ...packageJson.dependencies, ...packageJson.devDependencies }; + + if (!allDeps.next) { + return null; + } + + const { mainConfig, version: storybookVersion } = getStorybookInfo(packageJson); + if (!mainConfig) { + logger.warn('Unable to find storybook main.js config, skipping'); + return null; + } + + const storybookCoerced = storybookVersion && semver.coerce(storybookVersion)?.version; + if (!storybookCoerced) { + throw new Error(dedent` + ❌ Unable to determine storybook version. + 🤔 Are you running automigrate from your project directory? + `); + } + + if (!semver.gte(storybookCoerced, '7.0.0')) { + return null; + } + + const main = await readConfig(mainConfig); + + const frameworkPackage = main.getFieldValue(['framework']); + + if (!frameworkPackage) { + return null; + } + + const frameworkPackageName = + typeof frameworkPackage === 'string' ? frameworkPackage : frameworkPackage.name; + + if (frameworkPackageName === '@storybook/react-vite') { + logger.info(dedent` + We've detected you are using Storybook in a Next.js project. + + In Storybook 7, we introduced a new framework package for Next.js projects: @storybook/nextjs. + + This package provides a better experience for Next.js users, however it is only compatible with the webpack 5 builder, so we can't automigrate for you, as you are using the Vite builder. + + If you are interested in using this package, see: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md' + )} + `); + + return null; + } + + // we only migrate from react-webpack5 projects + if (frameworkPackageName !== '@storybook/react-webpack5') { + return null; + } + + const addonOptions = getNextjsAddonOptions(main.getFieldValue(['addons'])); + const frameworkOptions = main.getFieldValue(['framework', 'options']) || {}; + + const addonsToRemove = ['storybook-addon-next', 'storybook-addon-next-router'].filter( + (dep) => allDeps[dep] + ); + + return { + main, + addonsToRemove, + frameworkOptions: { + ...frameworkOptions, + ...addonOptions, + }, + packageJson, + }; + }, + + prompt({ addonsToRemove }) { + let addonsMessage = ''; + + if (addonsToRemove.length > 0) { + addonsMessage = ` + This package also supports features provided by the following packages, which can now be removed: + ${addonsToRemove.map((dep) => `- ${chalk.cyan(dep)}`).join(', ')} + `; + } + + return dedent` + We've detected you are using Storybook in a ${chalk.bold('Next.js')} project. + + In Storybook 7, we introduced a new framework package for Next.js projects: ${chalk.magenta( + '@storybook/nextjs' + )}. + + This package is a replacement for ${chalk.magenta( + '@storybook/react-webpack5' + )} and provides a better experience for Next.js users. + ${addonsMessage} + To learn more about it, see: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/code/frameworks/nextjs/README.md' + )} + `; + }, + + async run({ + result: { addonsToRemove, main, frameworkOptions, packageJson }, + packageManager, + dryRun, + }) { + const dependenciesToRemove = [...addonsToRemove, '@storybook/react-webpack5']; + if (dependenciesToRemove.length > 0) { + logger.info(`✅ Removing redundant packages: ${dependenciesToRemove.join(', ')}`); + if (!dryRun) { + packageManager.removeDependencies({ skipInstall: true, packageJson }, dependenciesToRemove); + + const existingAddons = main.getFieldValue(['addons']) as Addon[]; + const updatedAddons = existingAddons.filter((addon) => { + if (typeof addon === 'string') { + return !addonsToRemove.includes(addon); + } + + if (addon.name) { + return !addonsToRemove.includes(addon.name); + } + + return false; + }); + main.setFieldValue(['addons'], updatedAddons); + } + } + + logger.info(`✅ Installing new dependencies: @storybook/nextjs`); + if (!dryRun) { + const versionToInstall = getStorybookVersionSpecifier(packageJson); + packageManager.addDependencies({ installAsDevDependencies: true, packageJson }, [ + `@storybook/nextjs@${versionToInstall}`, + ]); + } + + logger.info(`✅ Updating framework field in main.js`); + if (!dryRun) { + main.setFieldValue(['framework', 'options'], frameworkOptions); + main.setFieldValue(['framework', 'name'], '@storybook/nextjs'); + + await writeConfig(main); + } + }, +}; diff --git a/code/lib/cli/src/automigrate/fixes/nodejs-requirement.test.ts b/code/lib/cli/src/automigrate/fixes/nodejs-requirement.test.ts new file mode 100644 index 000000000000..0dc62e43ecd6 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/nodejs-requirement.test.ts @@ -0,0 +1,45 @@ +/// ; + +import type { JsPackageManager } from '../../js-package-manager'; +import { nodeJsRequirement } from './nodejs-requirement'; + +// eslint-disable-next-line global-require, jest/no-mocks-import +jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); + +const check = async ({ packageJson = {} }: any) => { + const packageManager = { + retrievePackageJson: () => ({ + dependencies: { + '@storybook/react': '^7.0.0', + }, + devDependencies: {}, + ...packageJson, + }), + } as JsPackageManager; + return nodeJsRequirement.check({ packageManager }); +}; + +const originalNodeVersion = process.version; +const mockNodeVersion = (version: string) => { + Object.defineProperties(process, { + version: { + value: version, + }, + }); +}; + +describe('nodejs-requirement fix', () => { + afterAll(() => { + mockNodeVersion(originalNodeVersion); + }); + + it('skips when node >= 16.0.0', async () => { + mockNodeVersion('16.0.0'); + await expect(check({})).resolves.toBeNull(); + }); + + it('prompts when node <= 16.0.0', async () => { + mockNodeVersion('14.0.0'); + await expect(check({})).resolves.toEqual({ nodeVersion: '14.0.0' }); + }); +}); diff --git a/code/lib/cli/src/automigrate/fixes/nodejs-requirement.ts b/code/lib/cli/src/automigrate/fixes/nodejs-requirement.ts new file mode 100644 index 000000000000..4c828e5a3cd3 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/nodejs-requirement.ts @@ -0,0 +1,56 @@ +import chalk from 'chalk'; +import dedent from 'ts-dedent'; +import semver from 'semver'; +import { getStorybookInfo } from '@storybook/core-common'; +import type { Fix } from '../types'; + +interface NodeJsRequirementOptions { + nodeVersion: string; +} + +export const nodeJsRequirement: Fix = { + id: 'nodejs-requirement', + promptOnly: true, + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + const { version: storybookVersion } = getStorybookInfo(packageJson); + + const storybookCoerced = storybookVersion && semver.coerce(storybookVersion)?.version; + if (!storybookCoerced) { + throw new Error(dedent` + ❌ Unable to determine storybook version. + 🤔 Are you running automigrate from your project directory? + `); + } + + if (!semver.gte(storybookCoerced, '7.0.0')) { + return null; + } + + const nodeVersion = process.version; + if (semver.lt(nodeVersion, '16.0.0')) { + return { nodeVersion }; + } + + return null; + }, + prompt({ nodeVersion }) { + return dedent` + ${chalk.bold( + chalk.red('Attention') + )}: We could not automatically make this change. You'll need to do it manually. + + We've detected that you're using Node ${chalk.bold( + nodeVersion + )} but Storybook 7 only supports Node ${chalk.bold( + 'v16.0.0' + )} and higher. You will either need to upgrade your Node version or keep using an older version of Storybook. + + Please see the migration guide for more information: + ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropped-support-for-node-15-and-below' + )} + `; + }, +}; diff --git a/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.test.ts b/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.test.ts new file mode 100644 index 000000000000..0ae9971db053 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.test.ts @@ -0,0 +1,58 @@ +/// ; + +/* eslint-disable no-underscore-dangle */ +import path from 'path'; +import type { JsPackageManager } from '../../js-package-manager'; +import { RemovedAPIs, removedGlobalClientAPIs as migration } from './remove-global-client-apis'; + +// eslint-disable-next-line global-require, jest/no-mocks-import +jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); + +const check = async ({ packageJson = {}, contents }: any) => { + if (contents) { + // eslint-disable-next-line global-require + require('fs-extra').__setMockFiles({ + [path.join('.storybook', 'preview.js')]: contents, + }); + } + const packageManager = { + retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), + } as JsPackageManager; + return migration.check({ packageManager }); +}; + +describe('removedGlobalClientAPIs fix', () => { + it('file does not exist', async () => { + const contents = false; + await expect(check({ contents })).resolves.toBeNull(); + }); + it('uses no removed APIs', async () => { + const contents = ` + export const parameters = {}; + `; + await expect(check({ contents })).resolves.toBeNull(); + }); + it('uses 1 removed API', async () => { + const contents = ` + import { addParameters } from '@storybook/react'; + addParameters({}); + `; + await expect(check({ contents })).resolves.toEqual( + expect.objectContaining({ + usedAPIs: [RemovedAPIs.addParameters], + }) + ); + }); + it('uses >1 removed APIs', async () => { + const contents = ` + import { addParameters, addDecorator } from '@storybook/react'; + addParameters({}); + addDecorator((storyFn) => storyFn()); + `; + await expect(check({ contents })).resolves.toEqual( + expect.objectContaining({ + usedAPIs: expect.arrayContaining([RemovedAPIs.addParameters, RemovedAPIs.addDecorator]), + }) + ); + }); +}); diff --git a/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.ts b/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.ts new file mode 100644 index 000000000000..793d0c9aa80d --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/remove-global-client-apis.ts @@ -0,0 +1,66 @@ +import chalk from 'chalk'; +import dedent from 'ts-dedent'; +import { getStorybookInfo } from '@storybook/core-common'; +import { readFile } from 'fs-extra'; +import type { Fix } from '../types'; + +export enum RemovedAPIs { + addDecorator = 'addDecorator', + addParameters = 'addParameters', + addLoader = 'addLoader', + getStorybook = 'getStorybook', + setAddon = 'setAddon', + clearDecorators = 'clearDecorators', +} + +interface GlobalClientAPIOptions { + usedAPIs: RemovedAPIs[]; + previewPath: string; +} + +export const removedGlobalClientAPIs: Fix = { + id: 'removedglobalclientapis', + promptOnly: true, + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + + const { previewConfig } = getStorybookInfo(packageJson); + + if (previewConfig) { + const contents = await readFile(previewConfig, 'utf8'); + + const usedAPIs = Object.values(RemovedAPIs).reduce((acc, item) => { + if (contents.includes(item)) { + acc.push(item); + } + return acc; + }, [] as RemovedAPIs[]); + + if (usedAPIs.length) { + return { + usedAPIs, + previewPath: previewConfig, + }; + } + } + + return null; + }, + prompt({ usedAPIs, previewPath }) { + return dedent` + ${chalk.bold( + chalk.red('Attention') + )}: We could not automatically make this change. You'll need to do it manually. + + The following APIs (used in "${chalk.yellow(previewPath)}") have been removed from Storybook: + + ${usedAPIs.map((api) => `- ${chalk.cyan(api)}`).join('\n')} + + Please see the migration guide for more information: + ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-global-client-apis' + )} + `; + }, +}; diff --git a/code/lib/cli/src/automigrate/fixes/sb-binary.test.ts b/code/lib/cli/src/automigrate/fixes/sb-binary.test.ts new file mode 100644 index 000000000000..a3d68cf6dfa8 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/sb-binary.test.ts @@ -0,0 +1,77 @@ +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; +import { sbBinary } from './sb-binary'; + +const checkStorybookBinary = async ({ packageJson }: { packageJson: PackageJson }) => { + const packageManager = { + retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), + } as JsPackageManager; + return sbBinary.check({ packageManager }); +}; + +describe('storybook-binary fix', () => { + describe('sb < 7.0', () => { + describe('does nothing', () => { + const packageJson = { dependencies: { '@storybook/react': '^6.2.0' } }; + it('should no-op', async () => { + await expect( + checkStorybookBinary({ + packageJson, + }) + ).resolves.toBeFalsy(); + }); + }); + }); + + describe('sb >= 7.0', () => { + it('should add storybook dependency if not present', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + }, + }; + await expect( + checkStorybookBinary({ + packageJson, + }) + ).resolves.toEqual( + expect.objectContaining({ + hasSbBinary: false, + hasStorybookBinary: false, + }) + ); + }); + + it('should remove sb dependency if it is present', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + sb: '6.5.0', + }, + }; + await expect( + checkStorybookBinary({ + packageJson, + }) + ).resolves.toEqual( + expect.objectContaining({ + hasSbBinary: true, + hasStorybookBinary: false, + }) + ); + }); + + it('should no op if storybook is present and sb is not present', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + storybook: '^7.0.0-alpha.0', + }, + }; + await expect( + checkStorybookBinary({ + packageJson, + }) + ).resolves.toBeNull(); + }); + }); +}); diff --git a/code/lib/cli/src/automigrate/fixes/sb-binary.ts b/code/lib/cli/src/automigrate/fixes/sb-binary.ts new file mode 100644 index 000000000000..91f647ba7a52 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/sb-binary.ts @@ -0,0 +1,107 @@ +import chalk from 'chalk'; +import { dedent } from 'ts-dedent'; +import semver from 'semver'; +import { getStorybookInfo } from '@storybook/core-common'; +import type { Fix } from '../types'; +import { getStorybookVersionSpecifier } from '../../helpers'; +import type { PackageJsonWithDepsAndDevDeps } from '../../js-package-manager'; + +interface SbBinaryRunOptions { + storybookVersion: string; + hasSbBinary: boolean; + hasStorybookBinary: boolean; + packageJson: PackageJsonWithDepsAndDevDeps; +} + +const logger = console; + +/** + * Does the user not have storybook dependency? + * + * If so: + * - Add storybook dependency + * - If they are using sb dependency, remove it + */ +export const sbBinary: Fix = { + id: 'storybook-binary', + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + const { devDependencies, dependencies } = packageJson; + const { version: storybookVersion } = getStorybookInfo(packageJson); + + const allDeps = { ...dependencies, ...devDependencies }; + + const storybookCoerced = storybookVersion && semver.coerce(storybookVersion)?.version; + if (!storybookCoerced) { + throw new Error(dedent` + ❌ Unable to determine storybook version. + 🤔 Are you running automigrate from your project directory? + `); + } + + if (semver.lt(storybookCoerced, '7.0.0')) { + return null; + } + + const hasSbBinary = !!allDeps.sb; + const hasStorybookBinary = !!allDeps.storybook; + + if (!hasSbBinary && hasStorybookBinary) { + return null; + } + + return { + hasSbBinary, + hasStorybookBinary, + storybookVersion, + packageJson, + }; + }, + + prompt({ storybookVersion, hasSbBinary, hasStorybookBinary }) { + const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); + + const storybookBinaryMessage = !hasStorybookBinary + ? `We've detected you are using ${sbFormatted} without Storybook's ${chalk.magenta( + 'storybook' + )} binary. Starting in Storybook 7.0, it has to be installed.` + : ''; + + const extraMessage = hasSbBinary + ? "You're using the 'sb' binary and it should be replaced, as 'storybook' is the recommended way to run Storybook.\n" + : ''; + + return dedent` + ${storybookBinaryMessage} + ${extraMessage} + + More info: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed' + )} + `; + }, + + async run({ result: { packageJson, hasSbBinary, hasStorybookBinary }, packageManager, dryRun }) { + if (hasSbBinary) { + logger.info(`✅ Removing 'sb' dependency`); + if (!dryRun) { + packageManager.removeDependencies({ skipInstall: !hasStorybookBinary, packageJson }, [ + 'sb', + ]); + } + } + + if (!hasStorybookBinary) { + logger.log(); + logger.info(`✅ Adding 'storybook' as dev dependency`); + logger.log(); + if (!dryRun) { + const versionToInstall = getStorybookVersionSpecifier(packageJson); + packageManager.addDependencies({ installAsDevDependencies: true }, [ + `storybook@${versionToInstall}`, + ]); + } + } + }, +}; diff --git a/code/lib/cli/src/automigrate/fixes/sb-scripts.test.ts b/code/lib/cli/src/automigrate/fixes/sb-scripts.test.ts new file mode 100644 index 000000000000..eb8b827a89a5 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/sb-scripts.test.ts @@ -0,0 +1,158 @@ +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; +import { getStorybookScripts, sbScripts } from './sb-scripts'; + +const checkSbScripts = async ({ packageJson }: { packageJson: PackageJson }) => { + const packageManager = { + retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), + } as JsPackageManager; + return sbScripts.check({ packageManager }); +}; + +describe('getStorybookScripts', () => { + it('detects default storybook scripts', () => { + expect( + getStorybookScripts({ + 'sb:upgrade': 'sb upgrade', + storybook: 'start-storybook', + 'build-storybook': 'build-storybook', + }) + ).toEqual({ + 'build-storybook': { + before: 'build-storybook', + after: 'storybook build', + }, + storybook: { + before: 'start-storybook', + after: 'storybook dev', + }, + 'sb:upgrade': { + before: 'sb upgrade', + after: 'storybook upgrade', + }, + }); + }); + + it('skips non-storybook scripts', () => { + expect( + getStorybookScripts({ + start: 'server start', + 'start-storybook': 'MOCKS=true start-storybook -p 9000', + 'storybook:start-ci': 'CI=true yarn start-storybook', + 'storybook:build-ci': 'CI=true yarn build-storybook', + }) + ).toEqual({ + 'start-storybook': { + before: 'MOCKS=true start-storybook -p 9000', + after: 'MOCKS=true storybook dev -p 9000', + }, + }); + }); +}); + +describe('sb-scripts fix', () => { + describe('sb < 7.0', () => { + describe('does nothing', () => { + const packageJson = { dependencies: { '@storybook/react': '^6.2.0' } }; + it('should no-op', async () => { + await expect( + checkSbScripts({ + packageJson, + }) + ).resolves.toBeFalsy(); + }); + }); + }); + + describe('sb >= 7.0', () => { + describe('with old scripts', () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + }, + scripts: { + storybook: 'start-storybook -p 6006', + 'build-storybook': 'build-storybook -o build/storybook', + }, + }; + it('should update scripts to new format', async () => { + await expect( + checkSbScripts({ + packageJson, + }) + ).resolves.toEqual( + expect.objectContaining({ + storybookScripts: { + 'build-storybook': { + after: 'storybook build -o build/storybook', + before: 'build-storybook -o build/storybook', + }, + storybook: { + after: 'storybook dev -p 6006', + before: 'start-storybook -p 6006', + }, + }, + storybookVersion: '^7.0.0-alpha.0', + }) + ); + }); + }); + + describe('with old custom scripts', () => { + it('should update scripts to new format', async () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + }, + scripts: { + 'storybook:ci': 'yarn start-storybook --ci', + 'storybook:build': 'build-storybook -o build/storybook', + 'storybook:build-mocked': 'MOCKS=true yarn storybook:build', + 'test-storybook:ci': + 'concurrently -k -s first -n "SB,TEST" -c "magenta,blue" "CI=true build-storybook --quiet && npx http-server storybook-static --port 6006 --silent" "wait-on tcp:6006 && yarn test-storybook"', + }, + }; + + await expect( + checkSbScripts({ + packageJson, + }) + ).resolves.toEqual( + expect.objectContaining({ + storybookScripts: { + 'storybook:build': { + after: 'storybook build -o build/storybook', + before: 'build-storybook -o build/storybook', + }, + 'test-storybook:ci': { + before: + 'concurrently -k -s first -n "SB,TEST" -c "magenta,blue" "CI=true build-storybook --quiet && npx http-server storybook-static --port 6006 --silent" "wait-on tcp:6006 && yarn test-storybook"', + after: + 'concurrently -k -s first -n "SB,TEST" -c "magenta,blue" "CI=true storybook build --quiet && npx http-server storybook-static --port 6006 --silent" "wait-on tcp:6006 && yarn test-storybook"', + }, + }, + storybookVersion: '^7.0.0-alpha.0', + }) + ); + }); + }); + + describe('already containing new scripts', () => { + const packageJson = { + dependencies: { + '@storybook/react': '^7.0.0-alpha.0', + }, + scripts: { + storybook: 'storybook dev -p 6006', + 'build-storybook': 'storybook build -o build/storybook', + }, + }; + it('should no-op', async () => { + await expect( + checkSbScripts({ + packageJson, + }) + ).resolves.toBeFalsy(); + }); + }); + }); +}); diff --git a/code/lib/cli/src/automigrate/fixes/sb-scripts.ts b/code/lib/cli/src/automigrate/fixes/sb-scripts.ts new file mode 100644 index 000000000000..73dd8ac39776 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/sb-scripts.ts @@ -0,0 +1,146 @@ +import chalk from 'chalk'; +import { dedent } from 'ts-dedent'; +import semver from 'semver'; +import { getStorybookInfo } from '@storybook/core-common'; +import type { Fix } from '../types'; +import type { PackageJsonWithDepsAndDevDeps } from '../../js-package-manager'; + +interface SbScriptsRunOptions { + storybookScripts: Record; + storybookVersion: string; + packageJson: PackageJsonWithDepsAndDevDeps; +} + +const logger = console; + +/** + * Slightly big function because JS regex doesn't have proper full-word boundary. + * This goes through all the words in each script, and only return the scripts + * that do contain the actual sb binary, and not something like "npm run start-storybook" + * which could actually be a custom script even though the name matches the legacy binary name + */ +export const getStorybookScripts = (allScripts: Record) => { + return Object.keys(allScripts).reduce((acc, key) => { + let isStorybookScript = false; + const allWordsFromScript = allScripts[key].split(' '); + const newScript = allWordsFromScript + .map((currentWord, index) => { + const previousWord = allWordsFromScript[index - 1]; + + // full word check, rather than regex which could be faulty + const isSbBinary = + currentWord === 'build-storybook' || + currentWord === 'start-storybook' || + currentWord === 'sb'; + + // in case people have scripts like `yarn start-storybook` + const isPrependedByPkgManager = + previousWord && ['npx', 'run', 'yarn', 'pnpx'].some((cmd) => previousWord.includes(cmd)); + + if (isSbBinary && !isPrependedByPkgManager) { + isStorybookScript = true; + return currentWord + .replace('sb', 'storybook') + .replace('start-storybook', 'storybook dev') + .replace('build-storybook', 'storybook build'); + } + + return currentWord; + }) + .join(' '); + + if (isStorybookScript) { + acc[key] = { + before: allScripts[key], + after: newScript, + }; + } + + return acc; + }, {} as Record); +}; + +/** + * Is the user using start-storybook or build-storybook in its scripts + * + * If so: + * - Change start-storybook and build-storybook scripts to storybook dev and storybook build + * - Change sb to storybook if they are using sb + */ +export const sbScripts: Fix = { + id: 'sb-scripts', + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + const { scripts = {} } = packageJson; + const { version: storybookVersion } = getStorybookInfo(packageJson); + + const storybookCoerced = storybookVersion && semver.coerce(storybookVersion)?.version; + if (!storybookCoerced) { + throw new Error(dedent` + ❌ Unable to determine storybook version. + 🤔 Are you running automigrate from your project directory? + `); + } + + if (semver.lt(storybookCoerced, '7.0.0')) { + return null; + } + + const storybookScripts = getStorybookScripts(scripts); + + if (Object.keys(storybookScripts).length === 0) { + return null; + } + + return { packageJson, storybookScripts, storybookVersion }; + }, + + prompt({ storybookVersion, storybookScripts }) { + const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); + + const newScriptsMessage = Object.keys(storybookScripts).reduce((acc, scriptKey) => { + acc.push( + [ + chalk.bold(scriptKey), + 'from:', + chalk.cyan(storybookScripts[scriptKey].before), + 'to:', + chalk.cyan(storybookScripts[scriptKey].after), + ].join('\n') + ); + return acc; + }, []); + + return dedent` + We've detected you are using ${sbFormatted} with scripts from previous versions of Storybook. + Starting in Storybook 7, the ${chalk.yellow('start-storybook')} and ${chalk.yellow( + 'build-storybook' + )} binaries have changed to ${chalk.magenta('storybook dev')} and ${chalk.magenta( + 'storybook build' + )} respectively. + In order to work with ${sbFormatted}, your storybook scripts have to be adjusted to use the binary. We can adjust them for you: + + ${newScriptsMessage.join('\n\n')} + + In case this migration did not cover all of your scripts, or you'd like more info: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-storybook--build-storybook-binaries-removed' + )} + `; + }, + + async run({ result: { storybookScripts }, packageManager, dryRun }) { + logger.info(`✅ Updating scripts in package.json`); + logger.log(); + if (!dryRun) { + const newScripts = Object.keys(storybookScripts).reduce((acc, scriptKey) => { + acc[scriptKey] = storybookScripts[scriptKey].after; + return acc; + }, {} as Record); + + logger.log(); + + packageManager.addScripts(newScripts); + } + }, +}; diff --git a/code/lib/cli/src/automigrate/fixes/sveltekit-framework.test.ts b/code/lib/cli/src/automigrate/fixes/sveltekit-framework.test.ts new file mode 100644 index 000000000000..de14f93b9efb --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/sveltekit-framework.test.ts @@ -0,0 +1,171 @@ +/* eslint-disable no-underscore-dangle */ +import type { StorybookConfig } from 'lib/types/src'; +import path from 'path'; +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; +import { sveltekitFramework } from './sveltekit-framework'; + +// eslint-disable-next-line global-require, jest/no-mocks-import +jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); + +const checkSvelteKitFramework = async ({ + packageJson, + main, +}: { + packageJson: PackageJson; + main?: Partial; +}) => { + if (main) { + // eslint-disable-next-line global-require + require('fs-extra').__setMockFiles({ + [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, + }); + } else { + // eslint-disable-next-line global-require + require('fs-extra').__setMockFiles({}); + } + const packageManager = { + retrievePackageJson: () => ({ dependencies: {}, devDependencies: {}, ...packageJson }), + } as JsPackageManager; + + return sveltekitFramework.check({ packageManager }); +}; + +describe('SvelteKit framework fix', () => { + describe('should no-op', () => { + it('in SB < v7.0.0', async () => { + const packageJson = { + dependencies: { '@sveltejs/kit': '^1.0.0-next.571', '@storybook/svelte': '^6.2.0' }, + }; + const main = { framework: '@storybook/svelte-vite' }; + await expect(checkSvelteKitFramework({ packageJson, main })).resolves.toBeFalsy(); + }); + + describe('in SB >= v7.0.0', () => { + it('in non-SvelteKit projects', async () => { + const packageJson = { + dependencies: { svelte: '^3.53.1', '@storybook/svelte-vite': '^7.0.0' }, + }; + const main = { + framework: '@storybook/svelte-vite', + }; + await expect(checkSvelteKitFramework({ packageJson, main })).resolves.toBeFalsy(); + }); + + it('without main', async () => { + const packageJson = { + dependencies: { '@sveltejs/kit': '^1.0.0-next.571', '@storybook/svelte': '^7.0.0' }, + }; + await expect(checkSvelteKitFramework({ packageJson })).rejects.toThrow(); + }); + + it('without framework field in main', async () => { + const packageJson = { + dependencies: { '@sveltejs/kit': '^1.0.0-next.571', '@storybook/svelte': '^7.0.0' }, + }; + const main = {}; + await expect(checkSvelteKitFramework({ packageJson, main })).rejects.toThrow(); + }); + + it('with unsupported framework', async () => { + const packageJson = { + dependencies: { + '@sveltejs/kit': '^1.0.0-next.571', + '@storybook/svelte-vite': '^7.0.0', + '@storybook/html': '^7.0.0', + }, + }; + const main = { + framework: '@storybook/html', + }; + await expect(checkSvelteKitFramework({ packageJson, main })).rejects.toThrow(); + }); + + it('with unsupported framework+builder from SB 6.5', async () => { + const packageJson = { + dependencies: { + '@sveltejs/kit': '^1.0.0-next.571', + '@storybook/svelte-webpack5': '^7.0.0', + '@storybook/svelte': '^7.0.0', + }, + }; + const main = { + framework: '@storybook/svelte', + core: { builder: '@storybook/builder-webpack5' }, + }; + await expect(checkSvelteKitFramework({ packageJson, main })).rejects.toThrow(); + }); + + it('with @storybook/svelte-webpack5 framework', async () => { + const packageJson = { + dependencies: { + '@storybook/svelte': '^7.0.0', + '@storybook/svelte-webpack5': '^7.0.0', + '@sveltejs/kit': '^1.0.0-next.571', + }, + }; + const main = { + framework: '@storybook/svelte-webpack5', + }; + await expect(checkSvelteKitFramework({ packageJson, main })).rejects.toThrow(); + }); + }); + }); + + describe('should migrate', () => { + it('from @storybook/svelte-vite', async () => { + const packageJson = { + dependencies: { + '@storybook/svelte': '^7.0.0', + '@storybook/svelte-vite': '^7.0.0', + '@sveltejs/kit': '^1.0.0-next.571', + }, + }; + const main = { + framework: '@storybook/svelte-vite', + }; + await expect(checkSvelteKitFramework({ packageJson, main })).resolves.toMatchObject({ + packageJson, + main: expect.objectContaining({}), + dependenciesToRemove: ['@storybook/svelte-vite'], + }); + }); + + it('from @storybook/svelte framework and @storybook/builder-vite builder', async () => { + const packageJson = { + dependencies: { + '@storybook/svelte': '^7.0.0', + '@storybook/builder-vite': '^7.0.0', + '@sveltejs/kit': '^1.0.0-next.571', + }, + }; + const main = { + framework: '@storybook/svelte', + core: { builder: '@storybook/builder-vite' }, + }; + await expect(checkSvelteKitFramework({ packageJson, main })).resolves.toMatchObject({ + packageJson, + main: expect.objectContaining({}), + dependenciesToRemove: ['@storybook/builder-vite'], + }); + }); + + it('from @storybook/svelte framework and storybook-builder-vite builder', async () => { + const packageJson = { + dependencies: { + '@storybook/svelte': '^7.0.0', + 'storybook-builder-vite': '^0.2.5', + '@sveltejs/kit': '^1.0.0-next.571', + }, + }; + const main = { + framework: '@storybook/svelte', + core: { builder: 'storybook-builder-vite' }, + }; + await expect(checkSvelteKitFramework({ packageJson, main })).resolves.toMatchObject({ + packageJson, + main: expect.objectContaining({}), + dependenciesToRemove: ['storybook-builder-vite'], + }); + }); + }); +}); diff --git a/code/lib/cli/src/automigrate/fixes/sveltekit-framework.ts b/code/lib/cli/src/automigrate/fixes/sveltekit-framework.ts new file mode 100644 index 000000000000..3422da2cfc61 --- /dev/null +++ b/code/lib/cli/src/automigrate/fixes/sveltekit-framework.ts @@ -0,0 +1,182 @@ +import chalk from 'chalk'; +import dedent from 'ts-dedent'; +import semver from 'semver'; +import type { ConfigFile } from '@storybook/csf-tools'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; +import { getStorybookInfo } from '@storybook/core-common'; + +import type { Fix } from '../types'; +import type { PackageJsonWithDepsAndDevDeps } from '../../js-package-manager'; +import { getStorybookVersionSpecifier } from '../../helpers'; + +const logger = console; + +interface SvelteKitFrameworkRunOptions { + main: ConfigFile; + packageJson: PackageJsonWithDepsAndDevDeps; + dependenciesToRemove: string[]; +} + +const fixId = 'sveltekitFramework'; + +/** + * Does the user have a SvelteKit project but is using a Svelte+Vite setup instead of the @storybook/sveltekit framework? + * + * If so: + * - Remove the dependencies (@storybook/svelte-vite, @storybook/builder-vite, storybook-builder-vite) + * - Add the dependencies (@storybook/sveltekit) + * - Update the main config to use the new framework + */ +export const sveltekitFramework: Fix = { + id: fixId, + + async check({ packageManager }) { + const packageJson = packageManager.retrievePackageJson(); + const allDeps = { ...packageJson.dependencies, ...packageJson.devDependencies }; + + if (!allDeps['@sveltejs/kit']) { + return null; + } + + const { mainConfig, version: storybookVersion } = getStorybookInfo(packageJson); + if (!mainConfig) { + logger.warn('Unable to find storybook main.js config, skipping'); + return null; + } + + const sbVersionCoerced = storybookVersion && semver.coerce(storybookVersion)?.version; + if (!sbVersionCoerced) { + throw new Error(dedent` + ❌ Unable to determine storybook version. + 🤔 Are you running automigrate from your project directory? + `); + } + + if (!semver.gte(sbVersionCoerced, '7.0.0')) { + return null; + } + + const main = await readConfig(mainConfig); + const frameworkConfig = main.getFieldValue(['framework']); + + if (!frameworkConfig) { + logger.warn(dedent` + ❌ Unable to determine Storybook framework, skipping ${chalk.cyan(fixId)} fix. + 🤔 Are you running automigrate from your project directory? + `); + return null; + } + + const framework = typeof frameworkConfig === 'string' ? frameworkConfig : frameworkConfig.name; + + if (framework === '@storybook/sveltekit') { + // already using the new framework + return null; + } + + if (framework === '@storybook/svelte-vite') { + // direct migration from svelte-vite projects + return { + main, + packageJson, + dependenciesToRemove: ['@storybook/svelte-vite'], + }; + } + + if (framework !== '@storybook/svelte') { + // migration from projects using Svelte but with an unrecognized framework+builder setup - not supported + logger.warn(dedent` + We've detected you are using Storybook in a SvelteKit project. + + In Storybook 7, we introduced a new framework package for SvelteKit projects: @storybook/sveltekit. + + This package provides a better experience for SvelteKit users, however it is only compatible with the Svelte framework and the Vite builder, so we can't automigrate for you, as you are using another framework and builder combination. + + If you are interested in using this package, see: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework' + )} + `); + return null; + } + + const builder = main.getFieldValue(['core', 'builder']); + + if (!['@storybook/builder-vite', 'storybook-builder-vite'].includes(builder)) { + // migration from 6.x projects using Svelte with the Webpack builder - not supported + logger.warn(dedent` + We've detected you are using Storybook in a SvelteKit project. + + In Storybook 7, we introduced a new framework package for SvelteKit projects: @storybook/sveltekit. + + This package provides a better experience for SvelteKit users, however it is only compatible with the Vite builder, so we can't automigrate for you, as you are using another builder. + + If you are interested in using this package, see: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework' + )} + `); + + return null; + } + + // migration from 6.x projects using Svelte with the Vite builder + return { + main, + packageJson, + dependenciesToRemove: [builder], + }; + }, + + prompt() { + return dedent` + We've detected you are using Storybook in a SvelteKit project. + + In Storybook 7, we introduced a new framework package for SvelteKit projects: @storybook/sveltekit + This package is a replacement for @storybook/svelte-vite and provides a better experience for SvelteKit users. + + We can automatically migrate your project to use the new SvelteKit framework package. + + To learn more about this change, see: ${chalk.yellow( + 'https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sveltekit-needs-the-storybooksveltekit-framework' + )} + `; + }, + + async run({ result: { main, packageJson, dependenciesToRemove }, packageManager, dryRun }) { + logger.info(`✅ Removing redundant packages: ${dependenciesToRemove.join(', ')}`); + if (!dryRun) { + packageManager.removeDependencies({ skipInstall: true, packageJson }, dependenciesToRemove); + } + + logger.info(`✅ Installing new dependencies: @storybook/sveltekit`); + if (!dryRun) { + const versionToInstall = getStorybookVersionSpecifier(packageJson); + packageManager.addDependencies({ installAsDevDependencies: true, packageJson }, [ + `@storybook/sveltekit@${versionToInstall}`, + ]); + } + + logger.info(`✅ Updating framework field in main.js`); + main.setFieldValue(['framework'], '@storybook/sveltekit'); + + const currentCore = main.getFieldValue(['core']); + if (currentCore.builder) { + logger.info(`✅ Updating core field in main.js`); + const { builder, ...core } = currentCore; + + if (Object.keys(core).length === 0) { + main.removeField(['core']); + } else { + main.setFieldValue(['core'], core); + } + } + + if (main.getFieldNode(['svelteOptions'])) { + logger.info(`✅ Removing svelteOptions field in main.js`); + main.removeField(['svelteOptions']); + } + + if (!dryRun) { + await writeConfig(main); + } + }, +}; diff --git a/lib/cli/src/automigrate/fixes/vue3.test.ts b/code/lib/cli/src/automigrate/fixes/vue3.test.ts similarity index 94% rename from lib/cli/src/automigrate/fixes/vue3.test.ts rename to code/lib/cli/src/automigrate/fixes/vue3.test.ts index 6fb5a71b17a2..6ca7a23eef61 100644 --- a/lib/cli/src/automigrate/fixes/vue3.test.ts +++ b/code/lib/cli/src/automigrate/fixes/vue3.test.ts @@ -1,12 +1,12 @@ /* eslint-disable no-underscore-dangle */ -import path from 'path'; -import { JsPackageManager } from '../../js-package-manager'; +import * as path from 'path'; +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; import { vue3 } from './vue3'; // eslint-disable-next-line global-require, jest/no-mocks-import jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); -const checkVue3 = async ({ packageJson, main }) => { +const checkVue3 = async ({ packageJson, main }: { packageJson: PackageJson; main: unknown }) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, diff --git a/lib/cli/src/automigrate/fixes/vue3.ts b/code/lib/cli/src/automigrate/fixes/vue3.ts similarity index 90% rename from lib/cli/src/automigrate/fixes/vue3.ts rename to code/lib/cli/src/automigrate/fixes/vue3.ts index 15a066432dbc..de38ed472123 100644 --- a/lib/cli/src/automigrate/fixes/vue3.ts +++ b/code/lib/cli/src/automigrate/fixes/vue3.ts @@ -1,8 +1,8 @@ import chalk from 'chalk'; -import dedent from 'ts-dedent'; -import semver from '@storybook/semver'; -import { ConfigFile } from '@storybook/csf-tools'; -import { Fix } from '../types'; +import { dedent } from 'ts-dedent'; +import semver from 'semver'; +import type { ConfigFile } from '@storybook/csf-tools'; +import type { Fix } from '../types'; import { webpack5 } from './webpack5'; interface Vue3RunOptions { diff --git a/lib/cli/src/automigrate/fixes/webpack5.test.ts b/code/lib/cli/src/automigrate/fixes/webpack5.test.ts similarity index 92% rename from lib/cli/src/automigrate/fixes/webpack5.test.ts rename to code/lib/cli/src/automigrate/fixes/webpack5.test.ts index 5406b2ed86f4..c231fa477e4c 100644 --- a/lib/cli/src/automigrate/fixes/webpack5.test.ts +++ b/code/lib/cli/src/automigrate/fixes/webpack5.test.ts @@ -1,12 +1,19 @@ /* eslint-disable no-underscore-dangle */ -import path from 'path'; -import { JsPackageManager } from '../../js-package-manager'; +import * as path from 'path'; +import type { StorybookConfig } from '@storybook/types'; +import type { JsPackageManager, PackageJson } from '../../js-package-manager'; import { webpack5 } from './webpack5'; // eslint-disable-next-line global-require, jest/no-mocks-import jest.mock('fs-extra', () => require('../../../../../__mocks__/fs-extra')); -const checkWebpack5 = async ({ packageJson, main }) => { +const checkWebpack5 = async ({ + packageJson, + main, +}: { + packageJson: PackageJson; + main: Partial; +}) => { // eslint-disable-next-line global-require require('fs-extra').__setMockFiles({ [path.join('.storybook', 'main.js')]: `module.exports = ${JSON.stringify(main)};`, diff --git a/lib/cli/src/automigrate/fixes/webpack5.ts b/code/lib/cli/src/automigrate/fixes/webpack5.ts similarity index 80% rename from lib/cli/src/automigrate/fixes/webpack5.ts rename to code/lib/cli/src/automigrate/fixes/webpack5.ts index 37579f65f913..9cd2839d598f 100644 --- a/lib/cli/src/automigrate/fixes/webpack5.ts +++ b/code/lib/cli/src/automigrate/fixes/webpack5.ts @@ -1,10 +1,11 @@ import chalk from 'chalk'; -import dedent from 'ts-dedent'; -import semver from '@storybook/semver'; -import { ConfigFile, readConfig, writeConfig } from '@storybook/csf-tools'; +import { dedent } from 'ts-dedent'; +import semver from 'semver'; +import type { ConfigFile } from '@storybook/csf-tools'; +import { readConfig, writeConfig } from '@storybook/csf-tools'; import { getStorybookInfo } from '@storybook/core-common'; -import { Fix } from '../types'; -import { PackageJsonWithDepsAndDevDeps } from '../../js-package-manager'; +import type { Fix } from '../types'; +import type { PackageJsonWithDepsAndDevDeps } from '../../js-package-manager'; const logger = console; @@ -38,11 +39,10 @@ export const webpack5: Fix & CheckBuilder = { const storybookCoerced = storybookVersion && semver.coerce(storybookVersion)?.version; if (!storybookCoerced) { - logger.warn(dedent` - ❌ Unable to determine storybook version, skipping ${chalk.cyan('webpack5')} fix. + throw new Error(dedent` + ❌ Unable to determine storybook version. 🤔 Are you running automigrate from your project directory? `); - return null; } if (semver.lt(storybookCoerced, '6.3.0')) { @@ -96,16 +96,15 @@ export const webpack5: Fix & CheckBuilder = { return builderInfo ? { webpackVersion, ...builderInfo } : null; }, - prompt({ webpackVersion, storybookVersion }) { + prompt({ webpackVersion }) { const webpackFormatted = chalk.cyan(`webpack ${webpackVersion}`); - const sbFormatted = chalk.cyan(`Storybook ${storybookVersion}`); return dedent` We've detected you're running ${webpackFormatted}. - ${sbFormatted} runs webpack4 by default, which may not be compatible. + Your Storybook's main.js files specifies webpack4, which is incompatible. To run Storybook in webpack5-mode, we can install Storybook's ${chalk.cyan( - 'webpack5 builder' + '@storybook/builder-webpack5' )} for you. More info: ${chalk.yellow( @@ -115,10 +114,7 @@ export const webpack5: Fix & CheckBuilder = { }, async run({ result: { main, storybookVersion, webpackVersion }, packageManager, dryRun }) { - const deps = [ - `@storybook/manager-webpack5@${storybookVersion}`, - `@storybook/builder-webpack5@${storybookVersion}`, - ]; + const deps = [`@storybook/builder-webpack5@${storybookVersion}`]; // this also gets called by 'cra5' fix so we need to add // webpack5 at the project root so that it gets hoisted if (!webpackVersion) { @@ -127,9 +123,9 @@ export const webpack5: Fix & CheckBuilder = { logger.info(`✅ Adding dependencies: ${deps}`); if (!dryRun) packageManager.addDependencies({ installAsDevDependencies: true }, deps); - logger.info('✅ Setting `core.builder` to `webpack5` in main.js'); + logger.info('✅ Setting `core.builder` to `@storybook/builder-webpack5` in main.js'); if (!dryRun) { - main.setFieldValue(['core', 'builder'], 'webpack5'); + main.setFieldValue(['core', 'builder'], '@storybook/builder-webpack5'); await writeConfig(main); } }, diff --git a/code/lib/cli/src/automigrate/helpers/cleanLog.ts b/code/lib/cli/src/automigrate/helpers/cleanLog.ts new file mode 100644 index 000000000000..ab97c9d21b0a --- /dev/null +++ b/code/lib/cli/src/automigrate/helpers/cleanLog.ts @@ -0,0 +1,12 @@ +import { EOL } from 'os'; + +export const cleanLog = (str: string) => + str + // remove chalk ANSI colors + // eslint-disable-next-line no-control-regex + .replace(/\u001b\[.*?m/g, '') + // fix boxen output + .replace(/╮│/g, '╮\n│') + .replace(/││/g, '│\n│') + .replace(/│╰/g, '│\n╰') + .replace(/⚠️ {2}failed to check/g, `${EOL}⚠️ failed to check`); diff --git a/lib/cli/src/automigrate/helpers/getEslintInfo.ts b/code/lib/cli/src/automigrate/helpers/getEslintInfo.ts similarity index 80% rename from lib/cli/src/automigrate/helpers/getEslintInfo.ts rename to code/lib/cli/src/automigrate/helpers/getEslintInfo.ts index fb153b8fe5b9..698e2c4bde7e 100644 --- a/lib/cli/src/automigrate/helpers/getEslintInfo.ts +++ b/code/lib/cli/src/automigrate/helpers/getEslintInfo.ts @@ -1,7 +1,7 @@ import fse from 'fs-extra'; -export const SUPPORTED_ESLINT_EXTENSIONS = ['js', 'cjs']; -const UNSUPPORTED_ESLINT_EXTENSIONS = ['yaml', 'yml', 'json']; +export const SUPPORTED_ESLINT_EXTENSIONS = ['js', 'cjs', 'json']; +const UNSUPPORTED_ESLINT_EXTENSIONS = ['yaml', 'yml']; export const findEslintFile = () => { const filePrefix = '.eslintrc'; diff --git a/code/lib/cli/src/automigrate/index.ts b/code/lib/cli/src/automigrate/index.ts new file mode 100644 index 000000000000..1124b8c3633e --- /dev/null +++ b/code/lib/cli/src/automigrate/index.ts @@ -0,0 +1,320 @@ +/* eslint-disable no-await-in-loop */ +import prompts from 'prompts'; +import chalk from 'chalk'; +import boxen from 'boxen'; +import { createWriteStream, move, remove } from 'fs-extra'; +import tempy from 'tempy'; +import dedent from 'ts-dedent'; + +import { join } from 'path'; +import { + JsPackageManagerFactory, + useNpmWarning, + type PackageManagerName, +} from '../js-package-manager'; + +import type { Fix } from './fixes'; +import { fixes as allFixes } from './fixes'; +import { cleanLog } from './helpers/cleanLog'; + +const logger = console; +const LOG_FILE_NAME = 'migration-storybook.log'; +const LOG_FILE_PATH = join(process.cwd(), LOG_FILE_NAME); +let TEMP_LOG_FILE_PATH = ''; + +const originalStdOutWrite = process.stdout.write.bind(process.stdout); +const originalStdErrWrite = process.stderr.write.bind(process.stdout); + +const augmentLogsToFile = () => { + TEMP_LOG_FILE_PATH = tempy.file({ name: LOG_FILE_NAME }); + const logStream = createWriteStream(TEMP_LOG_FILE_PATH); + + process.stdout.write = (d: string) => { + originalStdOutWrite(d); + return logStream.write(cleanLog(d)); + }; + process.stderr.write = (d: string) => { + return logStream.write(cleanLog(d)); + }; +}; + +const cleanup = () => { + process.stdout.write = originalStdOutWrite; + process.stderr.write = originalStdErrWrite; +}; + +type FixId = string; + +interface FixOptions { + fixId?: FixId; + list?: boolean; + yes?: boolean; + dryRun?: boolean; + useNpm?: boolean; + packageManager?: PackageManagerName; +} + +enum FixStatus { + CHECK_FAILED = 'check_failed', + UNNECESSARY = 'unnecessary', + MANUAL_SUCCEEDED = 'manual_succeeded', + MANUAL_SKIPPED = 'manual_skipped', + SKIPPED = 'skipped', + SUCCEEDED = 'succeeded', + FAILED = 'failed', +} + +type FixSummary = { + skipped: FixId[]; + manual: FixId[]; + succeeded: FixId[]; + failed: Record; +}; + +const logAvailableMigrations = () => { + const availableFixes = allFixes.map((f) => chalk.yellow(f.id)).join(', '); + logger.info(`\nThe following migrations are available: ${availableFixes}`); +}; + +export const automigrate = async ({ + fixId, + dryRun, + yes, + useNpm, + packageManager: pkgMgr, + list, +}: FixOptions = {}) => { + if (list) { + logAvailableMigrations(); + return null; + } + + if (useNpm) { + useNpmWarning(); + // eslint-disable-next-line no-param-reassign + pkgMgr = 'npm'; + } + + const fixes = fixId ? allFixes.filter((f) => f.id === fixId) : allFixes; + + if (fixId && fixes.length === 0) { + logger.info(`📭 No migrations found for ${chalk.magenta(fixId)}.`); + logAvailableMigrations(); + return null; + } + + augmentLogsToFile(); + + const packageManager = JsPackageManagerFactory.getPackageManager({ force: pkgMgr }); + + logger.info('🔎 checking possible migrations..'); + const fixResults = {} as Record; + const fixSummary: FixSummary = { succeeded: [], failed: {}, manual: [], skipped: [] }; + + for (let i = 0; i < fixes.length; i += 1) { + const f = fixes[i] as Fix; + let result; + + try { + result = await f.check({ packageManager }); + } catch (error) { + logger.info(`⚠️ failed to check fix ${chalk.bold(f.id)}`); + logger.error(`\n${error.stack}`); + fixSummary.failed[f.id] = error.message; + fixResults[f.id] = FixStatus.CHECK_FAILED; + } + + if (result) { + logger.info(`\n🔎 found a '${chalk.cyan(f.id)}' migration:`); + const message = f.prompt(result); + + logger.info( + boxen(message, { + borderStyle: 'round', + padding: 1, + borderColor: '#F1618C', + title: f.promptOnly ? 'Manual migration detected' : 'Automigration detected', + }) + ); + + let runAnswer: { fix: boolean }; + + try { + if (dryRun) { + runAnswer = { fix: false }; + } else if (yes) { + runAnswer = { fix: true }; + if (f.promptOnly) { + fixResults[f.id] = FixStatus.MANUAL_SUCCEEDED; + fixSummary.manual.push(f.id); + } + } else if (f.promptOnly) { + fixResults[f.id] = FixStatus.MANUAL_SUCCEEDED; + fixSummary.manual.push(f.id); + + logger.info(); + const { shouldContinue } = await prompts( + { + type: 'toggle', + name: 'shouldContinue', + message: + 'Select continue once you have made the required changes, or quit to exit the migration process', + initial: true, + active: 'continue', + inactive: 'quit', + }, + { + onCancel: () => { + throw new Error(); + }, + } + ); + + if (!shouldContinue) { + fixResults[f.id] = FixStatus.MANUAL_SKIPPED; + break; + } + } else { + runAnswer = await prompts( + { + type: 'confirm', + name: 'fix', + message: `Do you want to run the '${chalk.cyan(f.id)}' migration on your project?`, + initial: true, + }, + { + onCancel: () => { + throw new Error(); + }, + } + ); + } + } catch (err) { + break; + } + + if (!f.promptOnly) { + if (runAnswer.fix) { + try { + await f.run({ result, packageManager, dryRun }); + logger.info(`✅ ran ${chalk.cyan(f.id)} migration`); + + fixResults[f.id] = FixStatus.SUCCEEDED; + fixSummary.succeeded.push(f.id); + } catch (error) { + fixResults[f.id] = FixStatus.FAILED; + fixSummary.failed[f.id] = error.message; + + logger.info(`❌ error when running ${chalk.cyan(f.id)} migration`); + logger.info(error); + logger.info(); + } + } else { + fixResults[f.id] = FixStatus.SKIPPED; + fixSummary.skipped.push(f.id); + } + } + } else { + fixResults[f.id] = fixResults[f.id] || FixStatus.UNNECESSARY; + } + } + + const hasFailures = Object.values(fixResults).some( + (r) => r === FixStatus.FAILED || r === FixStatus.CHECK_FAILED + ); + + // if migration failed, display a log file in the users cwd + if (hasFailures) { + await move(TEMP_LOG_FILE_PATH, join(process.cwd(), LOG_FILE_NAME), { overwrite: true }); + } else { + await remove(TEMP_LOG_FILE_PATH); + } + + logger.info(); + logger.info(getMigrationSummary(fixResults, fixSummary, LOG_FILE_PATH)); + logger.info(); + + cleanup(); + + return fixResults; +}; + +function getMigrationSummary( + fixResults: Record, + fixSummary: FixSummary, + logFile?: string +) { + const hasNoFixes = Object.values(fixResults).every((r) => r === FixStatus.UNNECESSARY); + const hasFailures = Object.values(fixResults).some( + (r) => r === FixStatus.FAILED || r === FixStatus.CHECK_FAILED + ); + // eslint-disable-next-line no-nested-ternary + const title = hasNoFixes + ? 'No migrations were applicable to your project' + : hasFailures + ? 'Migration check ran with failures' + : 'Migration check ran successfully'; + + const successfulFixesMessage = + fixSummary.succeeded.length > 0 + ? ` + ${chalk.bold('Successful migrations:')}\n\n ${fixSummary.succeeded + .map((m) => chalk.green(m)) + .join(', ')} + ` + : ''; + + const failedFixesMessage = + Object.keys(fixSummary.failed).length > 0 + ? ` + ${chalk.bold('Failed migrations:')}\n ${Object.entries(fixSummary.failed).reduce( + (acc, [id, error]) => { + return `${acc}\n${chalk.redBright(id)}:\n${error}\n`; + }, + '' + )} + \nYou can find the full logs in ${chalk.cyan(logFile)}\n` + : ''; + + const manualFixesMessage = + fixSummary.manual.length > 0 + ? ` + ${chalk.bold('Manual migrations:')}\n\n ${fixSummary.manual + .map((m) => + fixResults[m] === FixStatus.MANUAL_SUCCEEDED ? chalk.green(m) : chalk.blue(m) + ) + .join(', ')} + ` + : ''; + + const skippedFixesMessage = + fixSummary.skipped.length > 0 + ? ` + ${chalk.bold('Skipped migrations:')}\n\n ${fixSummary.skipped + .map((m) => chalk.cyan(m)) + .join(', ')} + ` + : ''; + + const divider = hasNoFixes ? '' : '\n─────────────────────────────────────────────────\n\n'; + + const summaryMessage = dedent` + ${successfulFixesMessage}${manualFixesMessage}${failedFixesMessage}${skippedFixesMessage}${divider}If you'd like to run the migrations again, you can do so by running '${chalk.cyan( + 'npx storybook@next automigrate' + )}' + + The automigrations try to migrate common patterns in your project, but might not contain everything needed to migrate to the latest version of Storybook. + + Please check the changelog and migration guide for manual migrations and more information: ${chalk.yellow( + 'https://storybook.js.org/migration-guides/7.0' + )} + And reach out on Discord if you need help: ${chalk.yellow('https://discord.gg/storybook')} + `; + + return boxen(summaryMessage, { + borderStyle: 'round', + padding: 1, + title, + borderColor: hasFailures ? 'red' : 'green', + }); +} diff --git a/code/lib/cli/src/automigrate/types.ts b/code/lib/cli/src/automigrate/types.ts new file mode 100644 index 000000000000..c86292a4d684 --- /dev/null +++ b/code/lib/cli/src/automigrate/types.ts @@ -0,0 +1,19 @@ +import type { JsPackageManager } from '../js-package-manager'; + +export interface CheckOptions { + packageManager: JsPackageManager; +} + +export interface RunOptions { + packageManager: JsPackageManager; + result: ResultType; + dryRun?: boolean; +} + +export interface Fix { + id: string; + promptOnly?: boolean; + check: (options: CheckOptions) => Promise; + prompt: (result: ResultType) => string; + run?: (options: RunOptions) => Promise; +} diff --git a/code/lib/cli/src/babel-config.ts b/code/lib/cli/src/babel-config.ts new file mode 100644 index 000000000000..9a2b288e080b --- /dev/null +++ b/code/lib/cli/src/babel-config.ts @@ -0,0 +1,88 @@ +import { writeFile, pathExists } from 'fs-extra'; +import { logger } from '@storybook/node-logger'; +import path from 'path'; +import prompts from 'prompts'; +import { JsPackageManagerFactory } from './js-package-manager'; + +export const generateStorybookBabelConfigInCWD = async () => { + const target = process.cwd(); + return generateStorybookBabelConfig({ target }); +}; +export const generateStorybookBabelConfig = async ({ target }: { target: string }) => { + logger.info(`Generating the storybook default babel config at ${target}`); + + const fileName = '.babelrc.json'; + const location = path.join(target, fileName); + + const exists = await pathExists(location); + + if (exists) { + const { overwrite } = await prompts({ + type: 'confirm', + initial: true, + name: 'overwrite', + message: `${fileName} already exists. Would you like overwrite it?`, + }); + + if (overwrite === false) { + logger.warn(`Cancelled, babel config file was NOT written to file-system.`); + return; + } + } + + const { typescript, jsx } = await prompts([ + { + type: 'confirm', + initial: true, + name: 'typescript', + message: `Do you want to add the TypeScript preset?`, + }, + { + type: 'confirm', + initial: true, + name: 'jsx', + message: `Do you want to add the React preset?`, + }, + ]); + + const added = ['@babel/preset-env']; + const presets: (string | [string, any])[] = [['@babel/preset-env', { targets: { chrome: 100 } }]]; + + if (typescript) { + added.push('@babel/preset-typescript'); + presets.push('@babel/preset-typescript'); + } + + if (jsx) { + added.push('@babel/preset-react'); + presets.push('@babel/preset-react'); + } + + const contents = JSON.stringify( + { + sourceType: 'unambiguous', + presets, + plugins: [], + }, + null, + 2 + ); + + logger.info(`Writing file to ${location}`); + await writeFile(location, contents); + + const { runInstall } = await prompts({ + type: 'confirm', + initial: true, + name: 'runInstall', + message: `Shall we install the required dependencies now? (${added.join(', ')})`, + }); + + if (runInstall) { + logger.info(`Installing dependencies...`); + + const packageManager = JsPackageManagerFactory.getPackageManager(); + + packageManager.addDependencies({ installAsDevDependencies: true }, added); + } +}; diff --git a/code/lib/cli/src/build.ts b/code/lib/cli/src/build.ts new file mode 100644 index 000000000000..2110be45d4fa --- /dev/null +++ b/code/lib/cli/src/build.ts @@ -0,0 +1,25 @@ +import { sync as readUpSync } from 'read-pkg-up'; +import { logger } from '@storybook/node-logger'; +import { buildStaticStandalone, withTelemetry } from '@storybook/core-server'; +import { cache } from '@storybook/core-common'; + +export const build = async (cliOptions: any) => { + try { + const options = { + ...cliOptions, + configDir: cliOptions.configDir || './.storybook', + outputDir: cliOptions.outputDir || './storybook-static', + ignorePreview: !!cliOptions.previewUrl && !cliOptions.forceBuildPreview, + docsMode: !!cliOptions.docs, + configType: 'PRODUCTION', + cache, + packageJson: readUpSync({ cwd: __dirname }).packageJson, + }; + await withTelemetry('build', { cliOptions, presetOptions: options }, () => + buildStaticStandalone(options) + ); + } catch (err) { + logger.error(err); + process.exit(1); + } +}; diff --git a/lib/cli/src/detect-nextjs.test.ts b/code/lib/cli/src/detect-nextjs.test.ts similarity index 100% rename from lib/cli/src/detect-nextjs.test.ts rename to code/lib/cli/src/detect-nextjs.test.ts diff --git a/lib/cli/src/detect-nextjs.ts b/code/lib/cli/src/detect-nextjs.ts similarity index 91% rename from lib/cli/src/detect-nextjs.ts rename to code/lib/cli/src/detect-nextjs.ts index 2b9ca5ce642b..21cc8e0188ca 100644 --- a/lib/cli/src/detect-nextjs.ts +++ b/code/lib/cli/src/detect-nextjs.ts @@ -1,4 +1,4 @@ -import { JsPackageManager } from './js-package-manager'; +import type { JsPackageManager } from './js-package-manager'; const regex = /[\s"\n]next.*?(\d+).*/; diff --git a/lib/cli/src/detect-webpack.ts b/code/lib/cli/src/detect-webpack.ts similarity index 100% rename from lib/cli/src/detect-webpack.ts rename to code/lib/cli/src/detect-webpack.ts diff --git a/lib/cli/src/detect.test.ts b/code/lib/cli/src/detect.test.ts similarity index 81% rename from lib/cli/src/detect.test.ts rename to code/lib/cli/src/detect.test.ts index 11303ab1436f..597e2fc7818d 100644 --- a/lib/cli/src/detect.test.ts +++ b/code/lib/cli/src/detect.test.ts @@ -1,18 +1,14 @@ -import fs from 'fs'; +import * as fs from 'fs'; import { getBowerJson } from './helpers'; -import { isStorybookInstalled, detectFrameworkPreset, detect, detectLanguage } from './detect'; -import { ProjectType, SUPPORTED_FRAMEWORKS, SupportedLanguage } from './project_types'; -import { readPackageJson } from './js-package-manager'; +import { detect, detectFrameworkPreset, detectLanguage, isStorybookInstalled } from './detect'; +import { ProjectType, SUPPORTED_RENDERERS, SupportedLanguage } from './project_types'; +import type { PackageJsonWithMaybeDeps } from './js-package-manager'; jest.mock('./helpers', () => ({ getBowerJson: jest.fn(), })); -jest.mock('./js-package-manager', () => ({ - readPackageJson: jest.fn(), -})); - jest.mock('fs', () => ({ existsSync: jest.fn(), stat: jest.fn(), @@ -25,13 +21,10 @@ jest.mock('path', () => ({ join: jest.fn((_, p) => p), })); -const MOCK_FRAMEWORK_FILES = [ - { - name: ProjectType.METEOR, - files: { - '.meteor': 'file content', - }, - }, +const MOCK_FRAMEWORK_FILES: { + name: string; + files: Record<'package.json', PackageJsonWithMaybeDeps> | Record; +}[] = [ { name: ProjectType.SFC_VUE, files: { @@ -142,6 +135,16 @@ const MOCK_FRAMEWORK_FILES = [ }, }, }, + { + name: ProjectType.NEXTJS, + files: { + 'package.json': { + dependencies: { + next: '^9.0.0', + }, + }, + }, + }, { name: ProjectType.ANGULAR, files: { @@ -277,27 +280,39 @@ const MOCK_FRAMEWORK_FILES = [ describe('Detect', () => { it(`should return type HTML if html option is passed`, () => { - (readPackageJson as jest.Mock).mockImplementation(() => true); - expect(detect({ html: true })).toBe(ProjectType.HTML); + expect(detect({ dependencies: {} }, { html: true })).toBe(ProjectType.HTML); }); it(`should return type UNDETECTED if neither packageJson or bowerJson exist`, () => { - (readPackageJson as jest.Mock).mockImplementation(() => false); (getBowerJson as jest.Mock).mockImplementation(() => false); - expect(detect()).toBe(ProjectType.UNDETECTED); + expect(detect(undefined)).toBe(ProjectType.UNDETECTED); }); - it(`should return language typescript if the dependency is present`, () => { - (readPackageJson as jest.Mock).mockImplementation(() => ({ - dependencies: { - typescript: '1.0.0', - }, - })); - expect(detectLanguage()).toBe(SupportedLanguage.TYPESCRIPT); + it(`should return language legacy typescript if the dependency is present`, () => { + expect(detectLanguage({ dependencies: { typescript: '1.0.0' } })).toBe( + SupportedLanguage.TYPESCRIPT_LEGACY + ); + }); + + it(`should return language typescript if the dependency is >TS4.9`, () => { + expect(detectLanguage({ dependencies: { typescript: '4.9.1' } })).toBe( + SupportedLanguage.TYPESCRIPT + ); + }); + + it(`should return language typescript if the dependency is =TS4.9`, () => { + expect(detectLanguage({ dependencies: { typescript: '4.9.0' } })).toBe( + SupportedLanguage.TYPESCRIPT + ); + }); + + it(`should return language typescript if the dependency is =TS4.9beta`, () => { + expect(detectLanguage({ dependencies: { typescript: '^4.9.0-beta' } })).toBe( + SupportedLanguage.TYPESCRIPT + ); }); it(`should return language javascript by default`, () => { - (readPackageJson as jest.Mock).mockImplementation(() => true); expect(detectLanguage()).toBe(SupportedLanguage.JAVASCRIPT); }); @@ -310,7 +325,7 @@ describe('Detect', () => { expect(isStorybookInstalled({}, false)).toBe(false); }); - SUPPORTED_FRAMEWORKS.forEach((framework) => { + SUPPORTED_RENDERERS.forEach((framework) => { it(`true if devDependencies has ${framework} Storybook version`, () => { const devDependencies = { [`@storybook/${framework}`]: '4.0.0-alpha.21', @@ -337,14 +352,6 @@ describe('Detect', () => { }) ).toBe(ProjectType.ALREADY_HAS_STORYBOOK); }); - - it('UPDATE_PACKAGE_ORGANIZATIONS if legacy lib is detected', () => { - expect( - isStorybookInstalled({ - devDependencies: { '@kadira/storybook': '4.0.0-alpha.21' }, - }) - ).toBe(ProjectType.UPDATE_PACKAGE_ORGANIZATIONS); - }); }); describe('detectFrameworkPreset should return', () => { @@ -358,7 +365,9 @@ describe('Detect', () => { return Object.keys(structure.files).includes(filePath); }); - const result = detectFrameworkPreset(structure.files['package.json']); + const result = detectFrameworkPreset( + structure.files['package.json'] as PackageJsonWithMaybeDeps + ); expect(result).toBe(structure.name); }); diff --git a/code/lib/cli/src/detect.ts b/code/lib/cli/src/detect.ts new file mode 100644 index 000000000000..bf5e9efb38ec --- /dev/null +++ b/code/lib/cli/src/detect.ts @@ -0,0 +1,207 @@ +import path from 'path'; +import fs from 'fs'; +import findUp from 'find-up'; +import semver from 'semver'; + +import type { TemplateConfiguration, TemplateMatcher } from './project_types'; +import { + ProjectType, + supportedTemplates, + SUPPORTED_RENDERERS, + SupportedLanguage, + unsupportedTemplate, + CoreBuilder, +} from './project_types'; +import { getBowerJson, paddedLog } from './helpers'; +import type { JsPackageManager, PackageJson, PackageJsonWithMaybeDeps } from './js-package-manager'; +import { detectNextJS } from './detect-nextjs'; + +const viteConfigFiles = ['vite.config.ts', 'vite.config.js', 'vite.config.mjs']; + +const hasDependency = ( + packageJson: PackageJsonWithMaybeDeps, + name: string, + matcher?: (version: string) => boolean +) => { + const version = packageJson.dependencies?.[name] || packageJson.devDependencies?.[name]; + if (version && typeof matcher === 'function') { + return matcher(version); + } + return !!version; +}; + +const hasPeerDependency = ( + packageJson: PackageJsonWithMaybeDeps, + name: string, + matcher?: (version: string) => boolean +) => { + const version = packageJson.peerDependencies?.[name]; + if (version && typeof matcher === 'function') { + return matcher(version); + } + return !!version; +}; + +type SearchTuple = [string, (version: string) => boolean | undefined]; + +const getFrameworkPreset = ( + packageJson: PackageJsonWithMaybeDeps, + framework: TemplateConfiguration +): ProjectType | null => { + const matcher: TemplateMatcher = { + dependencies: [false], + peerDependencies: [false], + files: [false], + }; + + const { preset, files, dependencies, peerDependencies, matcherFunction } = framework; + + let dependencySearches = [] as SearchTuple[]; + if (Array.isArray(dependencies)) { + dependencySearches = dependencies.map((name) => [name, undefined]); + } else if (typeof dependencies === 'object') { + dependencySearches = Object.entries(dependencies); + } + + // Must check the length so the `[false]` isn't overwritten if `{ dependencies: [] }` + if (dependencySearches.length > 0) { + matcher.dependencies = dependencySearches.map(([name, matchFn]) => + hasDependency(packageJson, name, matchFn) + ); + } + + let peerDependencySearches = [] as SearchTuple[]; + if (Array.isArray(peerDependencies)) { + peerDependencySearches = peerDependencies.map((name) => [name, undefined]); + } else if (typeof peerDependencies === 'object') { + peerDependencySearches = Object.entries(peerDependencies); + } + + // Must check the length so the `[false]` isn't overwritten if `{ peerDependencies: [] }` + if (peerDependencySearches.length > 0) { + matcher.peerDependencies = peerDependencySearches.map(([name, matchFn]) => + hasPeerDependency(packageJson, name, matchFn) + ); + } + + if (Array.isArray(files) && files.length > 0) { + matcher.files = files.map((name) => fs.existsSync(path.join(process.cwd(), name))); + } + + return matcherFunction(matcher) ? preset : null; +}; + +export function detectFrameworkPreset( + packageJson = {} as PackageJsonWithMaybeDeps +): ProjectType | null { + const result = [...supportedTemplates, unsupportedTemplate].find((framework) => { + return getFrameworkPreset(packageJson, framework) !== null; + }); + + return result ? result.preset : ProjectType.UNDETECTED; +} + +/** + * Attempts to detect which builder to use, by searching for a vite config file. If one is found, the vite builder + * will be used, otherwise, webpack5 is the default. + * + * @returns CoreBuilder + */ +export function detectBuilder(packageManager: JsPackageManager) { + const viteConfig = findUp.sync(viteConfigFiles); + + if (viteConfig) { + paddedLog('Detected vite project, setting builder to @storybook/builder-vite'); + return CoreBuilder.Vite; + } + + const nextJSVersion = detectNextJS(packageManager); + if (nextJSVersion) { + if (nextJSVersion >= 11) { + return CoreBuilder.Webpack5; + } + } + + // Fallback to webpack5 + return CoreBuilder.Webpack5; +} + +export function isStorybookInstalled( + dependencies: Pick | false, + force?: boolean +) { + if (!dependencies) { + return false; + } + + if (!force && dependencies.devDependencies) { + if ( + SUPPORTED_RENDERERS.reduce( + (storybookPresent, framework) => + storybookPresent || !!dependencies.devDependencies[`@storybook/${framework}`], + false + ) + ) { + return ProjectType.ALREADY_HAS_STORYBOOK; + } + } + return false; +} + +export function detectLanguage(packageJson?: PackageJson) { + let language = SupportedLanguage.JAVASCRIPT; + + if (!packageJson) { + return language; + } + + if ( + hasDependency(packageJson, 'typescript', (version) => + semver.gte(semver.coerce(version), '4.9.0') + ) && + (!hasDependency(packageJson, 'prettier') || + hasDependency(packageJson, 'prettier', (version) => + semver.gte(semver.coerce(version), '2.8.0') + )) && + (!hasDependency(packageJson, '@babel/plugin-transform-typescript') || + hasDependency(packageJson, '@babel/plugin-transform-typescript', (version) => + semver.gte(semver.coerce(version), '7.20.0') + )) && + (!hasDependency(packageJson, '@typescript-eslint/parser') || + hasDependency(packageJson, '@typescript-eslint/parser', (version) => + semver.gte(semver.coerce(version), '5.44.0') + )) && + (!hasDependency(packageJson, 'eslint-plugin-storybook') || + hasDependency(packageJson, 'eslint-plugin-storybook', (version) => + semver.gte(semver.coerce(version), '0.6.8') + )) + ) { + language = SupportedLanguage.TYPESCRIPT; + } else if (hasDependency(packageJson, 'typescript')) { + language = SupportedLanguage.TYPESCRIPT_LEGACY; + } + + return language; +} + +export function detect( + packageJson: PackageJson, + options: { force?: boolean; html?: boolean } = {} +) { + const bowerJson = getBowerJson(); + + if (!packageJson && !bowerJson) { + return ProjectType.UNDETECTED; + } + + const storyBookInstalled = isStorybookInstalled(packageJson, options.force); + if (storyBookInstalled) { + return storyBookInstalled; + } + + if (options.html) { + return ProjectType.HTML; + } + + return detectFrameworkPreset(packageJson || bowerJson); +} diff --git a/code/lib/cli/src/dev.ts b/code/lib/cli/src/dev.ts new file mode 100644 index 000000000000..b50da7466229 --- /dev/null +++ b/code/lib/cli/src/dev.ts @@ -0,0 +1,55 @@ +import { dedent } from 'ts-dedent'; +import { sync as readUpSync } from 'read-pkg-up'; +import { logger, instance as npmLog } from '@storybook/node-logger'; +import { buildDevStandalone, withTelemetry } from '@storybook/core-server'; +import { cache } from '@storybook/core-common'; + +export const dev = async (cliOptions: any) => { + process.env.NODE_ENV = process.env.NODE_ENV || 'development'; + + try { + const options = { + ...cliOptions, + configDir: cliOptions.configDir || './.storybook', + configType: 'DEVELOPMENT', + ignorePreview: !!cliOptions.previewUrl && !cliOptions.forceBuildPreview, + docsMode: !!cliOptions.docs, + cache, + packageJson: readUpSync({ cwd: __dirname }).packageJson, + }; + await withTelemetry('dev', { cliOptions, presetOptions: options }, () => + buildDevStandalone(options) + ); + } catch (error) { + // this is a weird bugfix, somehow 'node-pre-gyp' is polluting the npmLog header + npmLog.heading = ''; + + if (error instanceof Error) { + if ((error as any).error) { + logger.error((error as any).error); + } else if ((error as any).stats && (error as any).stats.compilation.errors) { + (error as any).stats.compilation.errors.forEach((e: any) => logger.plain(e)); + } else { + logger.error(error as any); + } + } else if (error.compilation?.errors) { + error.compilation.errors.forEach((e: any) => logger.plain(e)); + } + + logger.line(); + logger.warn( + error.close + ? dedent` + FATAL broken build!, will close the process, + Fix the error below and restart storybook. + ` + : dedent` + Broken build, fix the error above. + You may need to refresh the browser. + ` + ); + logger.line(); + + process.exit(1); + } +}; diff --git a/code/lib/cli/src/dirs.ts b/code/lib/cli/src/dirs.ts new file mode 100644 index 000000000000..69a411752360 --- /dev/null +++ b/code/lib/cli/src/dirs.ts @@ -0,0 +1,12 @@ +import { dirname } from 'path'; +import type { SupportedFrameworks, SupportedRenderers } from './project_types'; + +export function getCliDir() { + return dirname(require.resolve('@storybook/cli/package.json')); +} + +export function getRendererDir(renderer: SupportedFrameworks | SupportedRenderers) { + return dirname( + require.resolve(`@storybook/${renderer}/package.json`, { paths: [process.cwd()] }) + ); +} diff --git a/lib/cli/src/extract.ts b/code/lib/cli/src/extract.ts similarity index 98% rename from lib/cli/src/extract.ts rename to code/lib/cli/src/extract.ts index 670c2a2219b8..e7e45d82d0fc 100644 --- a/lib/cli/src/extract.ts +++ b/code/lib/cli/src/extract.ts @@ -19,7 +19,6 @@ const read = async (url: string) => { `); const data = JSON.parse( await page.evaluate(async () => { - // eslint-disable-next-line no-undef return JSON.stringify(window.__STORYBOOK_STORY_STORE__.getStoriesJsonData(), null, 2); }) ); diff --git a/code/lib/cli/src/generate.ts b/code/lib/cli/src/generate.ts new file mode 100644 index 000000000000..5637d5ffb09e --- /dev/null +++ b/code/lib/cli/src/generate.ts @@ -0,0 +1,306 @@ +import program from 'commander'; +import path from 'path'; +import chalk from 'chalk'; +import envinfo from 'envinfo'; +import leven from 'leven'; +import { sync as readUpSync } from 'read-pkg-up'; + +import { logger } from '@storybook/node-logger'; + +import type { CommandOptions } from './generators/types'; +import { initiate } from './initiate'; +import { add } from './add'; +import { migrate } from './migrate'; +import { extract } from './extract'; +import { upgrade, type UpgradeOptions } from './upgrade'; +import { repro } from './repro'; +import { reproNext } from './repro-next'; +import { link } from './link'; +import { automigrate } from './automigrate'; +import { generateStorybookBabelConfigInCWD } from './babel-config'; +import { dev } from './dev'; +import { build } from './build'; +import { parseList, getEnvConfig } from './utils'; + +const pkg = readUpSync({ cwd: __dirname }).packageJson; +const consoleLogger = console; + +program + .option( + '--disable-telemetry', + 'disable sending telemetry data', + // default value is false, but if the user sets STORYBOOK_DISABLE_TELEMETRY, it can be true + process.env.STORYBOOK_DISABLE_TELEMETRY && process.env.STORYBOOK_DISABLE_TELEMETRY !== 'false' + ) + .option('--debug', 'Get more logs in debug mode', false) + .option('--enable-crash-reports', 'enable sending crash reports to telemetry data'); + +program + .command('init') + .description('Initialize Storybook into your project.') + .option('-f --force', 'Force add Storybook') + .option('-s --skip-install', 'Skip installing deps') + .option('--package-manager ', 'Force package manager for installing deps') + .option('-N --use-npm', 'Use npm to install deps (deprecated)') + .option('--use-pnp', 'Enable pnp mode for Yarn 2+') + .option('-p --parser ', 'jscodeshift parser') + .option('-t --type ', 'Add Storybook for a specific project type') + .option('-y --yes', 'Answer yes to all prompts') + .option('-b --builder ', 'Builder library') + .option('-l --linkable', 'Prepare installation for link (contributor helper)') + .action((options: CommandOptions) => + initiate(options, pkg).catch((err) => { + logger.error(err); + process.exit(1); + }) + ); + +program + .command('add ') + .description('Add an addon to your Storybook') + .option( + '--package-manager ', + 'Force package manager for installing dependencies' + ) + .option('-N --use-npm', 'Use NPM to install dependencies (deprecated)') + .option('-s --skip-postinstall', 'Skip package specific postinstall config modifications') + .action((addonName: string, options: any) => add(addonName, options)); + +program + .command('babelrc') + .description('generate the default storybook babel config into your current working directory') + .action(() => generateStorybookBabelConfigInCWD()); + +program + .command('upgrade') + .description('Upgrade your Storybook packages to the latest') + .option( + '--package-manager ', + 'Force package manager for installing dependencies' + ) + .option('-N --use-npm', 'Use NPM to install dependencies (deprecated)') + .option('-y --yes', 'Skip prompting the user') + .option('-n --dry-run', 'Only check for upgrades, do not install') + .option('-t --tag ', 'Upgrade to a certain npm dist-tag (e.g. next, prerelease)') + .option('-p --prerelease', 'Upgrade to the pre-release packages') + .option('-s --skip-check', 'Skip postinstall version and automigration checks') + .action((options: UpgradeOptions) => upgrade(options)); + +program + .command('info') + .description('Prints debugging information about the local environment') + .action(() => { + consoleLogger.log(chalk.bold('\nEnvironment Info:')); + envinfo + .run({ + System: ['OS', 'CPU'], + Binaries: ['Node', 'Yarn', 'npm'], + Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'], + npmPackages: '@storybook/*', + npmGlobalPackages: '@storybook/*', + }) + .then(consoleLogger.log); + }); + +program + .command('migrate [migration]') + .description('Run a Storybook codemod migration on your source files') + .option('-l --list', 'List available migrations') + .option('-g --glob ', 'Glob for files upon which to apply the migration', '**/*.js') + .option('-p --parser ', 'jscodeshift parser') + .option( + '-n --dry-run', + 'Dry run: verify the migration exists and show the files to which it will be applied' + ) + .option( + '-r --rename ', + 'Rename suffix of matching files after codemod has been applied, e.g. ".js:.ts"' + ) + .action((migration, { configDir, glob, dryRun, list, rename, parser }) => { + migrate(migration, { + configDir, + glob, + dryRun, + list, + rename, + parser, + logger: consoleLogger, + }).catch((err) => { + logger.error(err); + process.exit(1); + }); + }); + +program + .command('extract [location] [output]') + .description('extract stories.json from a built version') + .action((location = 'storybook-static', output = path.join(location, 'stories.json')) => + extract(location, output).catch((e) => { + logger.error(e); + process.exit(1); + }) + ); + +program + .command('repro [outputDirectory]') + .description('Create a reproduction from a set of possible templates') + .option('-f --renderer ', 'Filter on given renderer') + .option('-t --template +`; + +export const InString = () => '
    JS alert
    '; + +export const TypeModule = () => + '
    JS alert from module
    '; diff --git a/code/renderers/web-components/tsconfig.json b/code/renderers/web-components/tsconfig.json new file mode 100644 index 000000000000..789b1b8985c3 --- /dev/null +++ b/code/renderers/web-components/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "resolveJsonModule": true + }, + "include": ["src/**/*", "template/**/*"] +} diff --git a/code/tsconfig.json b/code/tsconfig.json new file mode 100644 index 000000000000..48e4547af69b --- /dev/null +++ b/code/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compileOnSave": false, + "compilerOptions": { + "baseUrl": ".", + "incremental": false, + "noImplicitAny": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "moduleResolution": "Node", + "target": "ES2020", + "module": "CommonJS", + "skipLibCheck": false, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "isolatedModules": true, + "strictBindCallApply": true, + "lib": ["dom", "dom.iterable", "esnext"], + "noUnusedLocals": true, + "types": ["jest"] + }, + "exclude": ["dist", "**/dist", "node_modules", "**/node_modules", "**/setup-jest.ts"], + "ts-node": { + "transpileOnly": true, + "files": true, + "compilerOptions": { + "types": ["node"] + } + } +} diff --git a/code/ui/.storybook/main.ts b/code/ui/.storybook/main.ts new file mode 100644 index 000000000000..52bb8b72192d --- /dev/null +++ b/code/ui/.storybook/main.ts @@ -0,0 +1,78 @@ +import pluginTurbosnap from 'vite-plugin-turbosnap'; +import type { StorybookConfig } from '../../frameworks/react-vite'; + +const isBlocksOnly = process.env.STORYBOOK_BLOCKS_ONLY === 'true'; + +const allStories = [ + '../../lib/cli/rendererAssets/common/Introduction.stories.mdx', + { + directory: '../manager/src', + titlePrefix: '@storybook-manager', + }, + { + directory: '../components/src', + titlePrefix: '@storybook-components', + }, + { + directory: '../blocks/src', + titlePrefix: '@storybook-blocks', + }, +]; + +/** + * match all stories in blocks/src/blocks, blocks/src/controls and blocks/src/examples EXCEPT blocks/src/blocks/internal + * Examples: + * + * src/blocks/Canvas.stories.tsx - MATCH + * src/blocks/internal/InternalCanvas.stories.tsx - IGNORED, internal stories + * src/blocks/internal/nested/InternalCanvas.stories.tsx - IGNORED, internal stories + * + * src/blocks/Canvas.tsx - IGNORED, not story + * src/blocks/nested/Canvas.stories.tsx - MATCH + * src/blocks/nested/deep/Canvas.stories.tsx - MATCH + * + * src/controls/Boolean.stories.tsx - MATCH + * src/controls/Boolean.tsx - IGNORED, not story + * + * src/components/ColorPalette.stories.tsx - MATCH + * src/components/ColorPalette.tsx - IGNORED, not story + */ +const blocksOnlyStories = [ + '../blocks/src/@(blocks|controls|examples)/!(internal)/**/*.@(mdx|stories.@(tsx|ts|jsx|js))', + '../blocks/src/@(blocks|controls|examples)/*.@(mdx|stories.@(tsx|ts|jsx|js))', +]; + +const config: StorybookConfig = { + stories: isBlocksOnly ? blocksOnlyStories : allStories, + addons: [ + '@storybook/addon-links', + '@storybook/addon-essentials', + '@storybook/addon-interactions', + '@storybook/addon-storysource', + ], + framework: { + name: '@storybook/react-vite', + options: {}, + }, + core: { + disableTelemetry: true, + }, + features: { + interactionsDebugger: true, + }, + viteFinal: (viteConfig, { configType }) => ({ + ...viteConfig, + plugins: [ + ...(viteConfig.plugins || []), + configType === 'PRODUCTION' ? pluginTurbosnap({ rootDir: viteConfig.root || '' }) : [], + ], + optimizeDeps: { ...viteConfig.optimizeDeps, force: true }, + build: { + ...viteConfig.build, + // disable sourcemaps in CI to not run out of memory + sourcemap: process.env.CI !== 'true', + }, + }), +}; + +export default config; diff --git a/code/ui/.storybook/manager.ts b/code/ui/.storybook/manager.ts new file mode 100644 index 000000000000..1ac61cf4d375 --- /dev/null +++ b/code/ui/.storybook/manager.ts @@ -0,0 +1,8 @@ +import { addons } from '@storybook/manager-api'; +import startCase from 'lodash/startCase.js'; + +addons.setConfig({ + sidebar: { + renderLabel: ({ name, type }) => (type === 'story' ? name : startCase(name)), + }, +}); diff --git a/code/ui/.storybook/preview-head.html b/code/ui/.storybook/preview-head.html new file mode 100644 index 000000000000..8eb8709c1b73 --- /dev/null +++ b/code/ui/.storybook/preview-head.html @@ -0,0 +1,4 @@ + diff --git a/code/ui/.storybook/preview.tsx b/code/ui/.storybook/preview.tsx new file mode 100644 index 000000000000..bb8b0a317661 --- /dev/null +++ b/code/ui/.storybook/preview.tsx @@ -0,0 +1,319 @@ +import { global } from '@storybook/global'; +import React, { Fragment, useEffect } from 'react'; +import isChromatic from 'chromatic/isChromatic'; +import { + Global, + ThemeProvider, + themes, + createReset, + convert, + styled, + useTheme, +} from '@storybook/theming'; +import { useArgs, DocsContext } from '@storybook/preview-api'; +import { Symbols } from '@storybook/components'; +import type { PreviewWeb } from '@storybook/preview-api'; +import type { ReactRenderer } from '@storybook/react'; +import type { Channel } from '@storybook/channels'; + +import { DocsContainer } from '../blocks/src/blocks/DocsContainer'; +import { DocsContent, DocsWrapper } from '../blocks/src/components'; + +const { document } = global; + +const ThemeBlock = styled.div<{ side: 'left' | 'right' }>( + { + position: 'absolute', + top: 0, + left: 0, + right: '50vw', + width: '50vw', + height: '100vh', + bottom: 0, + overflow: 'auto', + padding: 10, + }, + ({ theme }) => ({ + background: theme.background.content, + color: theme.color.defaultText, + }), + ({ side }) => + side === 'left' + ? { + left: 0, + right: '50vw', + } + : { + right: 0, + left: '50vw', + } +); + +const ThemeStack = styled.div( + { + position: 'relative', + minHeight: 'calc(50vh - 15px)', + }, + ({ theme }) => ({ + background: theme.background.content, + color: theme.color.defaultText, + }) +); + +const PlayFnNotice = styled.div( + { + position: 'absolute', + bottom: '1rem', + right: '1rem', + border: '1px solid #ccc', + borderRadius: '5px', + padding: '1rem', + fontSize: '12px', + '> *': { + display: 'block', + }, + }, + ({ theme }) => ({ + background: theme.background.content, + color: theme.color.defaultText, + }) +); + +const ThemedSetRoot = () => { + const theme = useTheme(); + + useEffect(() => { + document.body.style.background = theme.background.content; + document.body.style.color = theme.color.defaultText; + }); + + return null; +}; + +// eslint-disable-next-line no-underscore-dangle +const preview = (window as any).__STORYBOOK_PREVIEW__ as PreviewWeb; +const channel = (window as any).__STORYBOOK_ADDONS_CHANNEL__ as Channel; +export const loaders = [ + /** + * This loader adds a DocsContext to the story, which is required for the most Blocks to work. + * A story will specify which stories they need in the index with: + * parameters: { + * relativeCsfPaths: ['../stories/MyStory.stories.tsx'], // relative to the story + * } + * The DocsContext will then be added via the decorator below. + */ + async ({ parameters: { relativeCsfPaths, attached = true } }) => { + if (!relativeCsfPaths) return {}; + const csfFiles = await Promise.all( + (relativeCsfPaths as string[]).map(async (blocksRelativePath) => { + const projectRelativePath = `./ui/blocks/src/${blocksRelativePath.replace( + /^..\//, + '' + )}.tsx`; + const entry = preview.storyStore.storyIndex?.importPathToEntry(projectRelativePath); + + if (!entry) { + throw new Error( + `Couldn't find story file at ${projectRelativePath} (passed as ${blocksRelativePath})` + ); + } + + return preview.storyStore.loadCSFFileByStoryId(entry.id); + }) + ); + const docsContext = new DocsContext( + channel, + preview.storyStore, + preview.renderStoryToElement.bind(preview), + csfFiles + ); + if (attached && csfFiles[0]) { + docsContext.attachCSFFile(csfFiles[0]); + } + return { docsContext }; + }, +]; + +export const decorators = [ + // This decorator adds the DocsContext created in the loader above + (Story, { loaded: { docsContext } }) => + docsContext ? ( + + + + ) : ( + + ), + /** + * This decorator adds wrappers that contains global styles for stories to be targeted by. + * Activated with parameters.docsStyles = true + */ (Story, { parameters: { docsStyles } }) => + docsStyles ? ( + + + + + + ) : ( + + ), + /** + * This decorator adds Symbols that the sidebar icons references. + * Any sidebar story that uses the icons must set the parameter withSymbols: true . + */ + (Story, { parameters: { withSymbols } }) => ( + <> + {withSymbols && } + + + ), + /** + * This decorator renders the stories side-by-side, stacked or default based on the theme switcher in the toolbar + */ + (StoryFn, { globals, parameters, playFunction }) => { + const defaultTheme = isChromatic() && !playFunction ? 'stacked' : 'light'; + const theme = globals.theme || parameters.theme || defaultTheme; + + switch (theme) { + case 'side-by-side': { + return ( + + + + + + + + + + + + + + + + ); + } + case 'stacked': { + return ( + + + + + + + + + + + + + + + + ); + } + default: { + return ( + + + + {!parameters.theme && isChromatic() && playFunction && ( + + Detected play function. + Rendering in a single theme + + )} + + + ); + } + } + }, + /** + * This decorator shows the current state of the arg named in the + * parameters.withRawArg property, by updating the arg in the onChange function + * this also means that the arg will sync with the control panel + * + * If parameters.withRawArg is not set, this decorator will do nothing + */ + (StoryFn, { parameters, args, hooks }) => { + const [, updateArgs] = useArgs(); + if (!parameters.withRawArg) { + return ; + } + + return ( + <> + { + updateArgs({ [parameters.withRawArg]: newValue }); + args.onChange?.(newValue); + }, + }} + /> +
    + Current {parameters.withRawArg}:{' '} +
    {JSON.stringify(args[parameters.withRawArg], null, 2) || 'undefined'}
    +
    + + ); + }, +]; + +export const parameters = { + actions: { argTypesRegex: '^on.*' }, + options: { + storySort: (a, b) => + a.title === b.title ? 0 : a.id.localeCompare(b.id, undefined, { numeric: true }), + }, + docs: { + theme: themes.light, + }, + controls: { + presetColors: [ + { color: '#ff4785', title: 'Coral' }, + { color: '#1EA7FD', title: 'Ocean' }, + { color: 'rgb(252, 82, 31)', title: 'Orange' }, + { color: 'RGBA(255, 174, 0, 0.5)', title: 'Gold' }, + { color: 'hsl(101, 52%, 49%)', title: 'Green' }, + { color: 'HSLA(179,65%,53%,0.5)', title: 'Seafoam' }, + { color: '#6F2CAC', title: 'Purple' }, + { color: '#2A0481', title: 'Ultraviolet' }, + { color: 'black' }, + { color: '#333', title: 'Darkest' }, + { color: '#444', title: 'Darker' }, + { color: '#666', title: 'Dark' }, + { color: '#999', title: 'Mediumdark' }, + { color: '#ddd', title: 'Medium' }, + { color: '#EEE', title: 'Mediumlight' }, + { color: '#F3F3F3', title: 'Light' }, + { color: '#F8F8F8', title: 'Lighter' }, + { color: '#FFFFFF', title: 'Lightest' }, + '#fe4a49', + '#FED766', + 'rgba(0, 159, 183, 1)', + 'HSLA(240,11%,91%,0.5)', + 'slategray', + ], + }, +}; + +export const globalTypes = { + theme: { + name: 'Theme', + description: 'Global theme for components', + toolbar: { + icon: 'circlehollow', + title: 'Theme', + items: [ + { value: 'light', icon: 'circlehollow', title: 'light' }, + { value: 'dark', icon: 'circle', title: 'dark' }, + { value: 'side-by-side', icon: 'sidebar', title: 'side by side' }, + { value: 'stacked', icon: 'bottombar', title: 'stacked' }, + ], + }, + }, +}; diff --git a/code/ui/blocks/README.md b/code/ui/blocks/README.md new file mode 100644 index 000000000000..b2ced9125997 --- /dev/null +++ b/code/ui/blocks/README.md @@ -0,0 +1,23 @@ +# Storybook Doc Blocks + +Portable documentation components for building design systems in Storybook. + +## Blocks development + +To bootstrap, in the monorepo root: + +```sh +yarn start +``` + +To develop this package, in the monorepo root: + +```sh +yarn build blocks --watch +``` + +To run storybook, in this directory: + +```sh +yarn storybook +``` diff --git a/code/ui/blocks/jest.config.js b/code/ui/blocks/jest.config.js new file mode 100644 index 000000000000..4396fbc7010d --- /dev/null +++ b/code/ui/blocks/jest.config.js @@ -0,0 +1,7 @@ +const path = require('path'); +const baseConfig = require('../../jest.config.browser'); + +module.exports = { + ...baseConfig, + displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep), +}; diff --git a/code/ui/blocks/package.json b/code/ui/blocks/package.json new file mode 100644 index 000000000000..ee7fabe94b5b --- /dev/null +++ b/code/ui/blocks/package.json @@ -0,0 +1,85 @@ +{ + "name": "@storybook/blocks", + "version": "7.0.0-beta.25", + "description": "Storybook Doc Blocks", + "keywords": [ + "storybook" + ], + "homepage": "https://github.com/storybookjs/storybook/tree/main/code/ui/blocks", + "bugs": { + "url": "https://github.com/storybookjs/storybook/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/storybookjs/storybook.git", + "directory": "code/ui/blocks" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + }, + "license": "MIT", + "sideEffects": false, + "exports": { + ".": { + "node": "./dist/index.js", + "require": "./dist/index.js", + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, + "main": "dist/index.js", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*", + "README.md", + "*.js", + "*.d.ts" + ], + "scripts": { + "check": "../../../scripts/node_modules/.bin/tsc --noEmit", + "prep": "../../../scripts/prepare/bundle.ts" + }, + "dependencies": { + "@storybook/channels": "7.0.0-beta.25", + "@storybook/client-logger": "7.0.0-beta.25", + "@storybook/components": "7.0.0-beta.25", + "@storybook/core-events": "7.0.0-beta.25", + "@storybook/csf": "next", + "@storybook/docs-tools": "7.0.0-beta.25", + "@storybook/global": "^5.0.0", + "@storybook/manager-api": "7.0.0-beta.25", + "@storybook/preview-api": "7.0.0-beta.25", + "@storybook/theming": "7.0.0-beta.25", + "@storybook/types": "7.0.0-beta.25", + "@types/lodash": "^4.14.167", + "color-convert": "^2.0.1", + "dequal": "^2.0.2", + "lodash": "^4.17.21", + "markdown-to-jsx": "^7.1.3", + "memoizerific": "^1.11.3", + "polished": "^4.2.2", + "react-colorful": "^5.1.2", + "ts-dedent": "^2.0.0", + "util-deprecate": "^1.0.2" + }, + "devDependencies": { + "@storybook/addon-actions": "7.0.0-beta.25", + "@types/color-convert": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + }, + "publishConfig": { + "access": "public" + }, + "bundler": { + "entries": [ + "./src/index.ts" + ] + }, + "gitHead": "2109ab8d7c0667e686db757abf5afcbf3d48a6ec" +} diff --git a/code/ui/blocks/src/blocks/Anchor.stories.tsx b/code/ui/blocks/src/blocks/Anchor.stories.tsx new file mode 100644 index 000000000000..41e7e9da3046 --- /dev/null +++ b/code/ui/blocks/src/blocks/Anchor.stories.tsx @@ -0,0 +1,15 @@ +import type { Meta, StoryObj } from '@storybook/react'; +import { Anchor } from './Anchor'; + +const meta = { + component: Anchor, +} as Meta; + +export default meta; + +export const Default: StoryObj = { + args: { + children: 'This is an anchor for storyId: "default"', + storyId: 'default', + }, +}; diff --git a/code/ui/blocks/src/blocks/Anchor.tsx b/code/ui/blocks/src/blocks/Anchor.tsx new file mode 100644 index 000000000000..571c695c577a --- /dev/null +++ b/code/ui/blocks/src/blocks/Anchor.tsx @@ -0,0 +1,14 @@ +import type { FC } from 'react'; +import React from 'react'; + +export const anchorBlockIdFromId = (storyId: string) => `anchor--${storyId}`; + +export interface AnchorProps { + storyId: string; +} + +export const Anchor: FC = ({ storyId, children }) => ( +
    + {children} +
    +); diff --git a/code/ui/blocks/src/blocks/ArgsTable.tsx b/code/ui/blocks/src/blocks/ArgsTable.tsx new file mode 100644 index 000000000000..e75396f913f3 --- /dev/null +++ b/code/ui/blocks/src/blocks/ArgsTable.tsx @@ -0,0 +1,259 @@ +import type { FC } from 'react'; +import React, { useContext, useEffect, useState, useCallback } from 'react'; +import mapValues from 'lodash/mapValues.js'; +import type { ArgTypesExtractor } from '@storybook/docs-tools'; +import type { PropDescriptor } from '@storybook/preview-api'; +import { filterArgTypes } from '@storybook/preview-api'; +import type { StrictArgTypes, Args, Globals } from '@storybook/types'; +import { + STORY_ARGS_UPDATED, + UPDATE_STORY_ARGS, + RESET_STORY_ARGS, + GLOBALS_UPDATED, +} from '@storybook/core-events'; +import type { ArgsTableProps as PureArgsTableProps, SortType } from '../components'; +import { ArgsTable as PureArgsTable, ArgsTableError, TabbedArgsTable } from '../components'; + +import type { DocsContextProps } from './DocsContext'; +import { DocsContext } from './DocsContext'; +import type { Component } from './types'; +import { PRIMARY_STORY } from './types'; +import { getComponentName } from './utils'; +import { useStory } from './useStory'; + +interface BaseProps { + include?: PropDescriptor; + exclude?: PropDescriptor; + sort?: SortType; +} + +type OfProps = BaseProps & { + of: '^' | Component; +}; + +type ComponentsProps = BaseProps & { + components: { + [label: string]: Component; + }; +}; + +type StoryProps = BaseProps & { + story: '.' | '^' | string; + showComponent?: boolean; +}; + +type ArgsTableProps = BaseProps | OfProps | ComponentsProps | StoryProps; + +const useArgs = ( + storyId: string, + context: DocsContextProps +): [Args, (args: Args) => void, (argNames?: string[]) => void] => { + const storyContext = context.getStoryContext(context.storyById()); + + const [args, setArgs] = useState(storyContext.args); + useEffect(() => { + const cb = (changed: { storyId: string; args: Args }) => { + if (changed.storyId === storyId) { + setArgs(changed.args); + } + }; + context.channel.on(STORY_ARGS_UPDATED, cb); + return () => context.channel.off(STORY_ARGS_UPDATED, cb); + }, [storyId]); + const updateArgs = useCallback( + (updatedArgs) => context.channel.emit(UPDATE_STORY_ARGS, { storyId, updatedArgs }), + [storyId] + ); + const resetArgs = useCallback( + (argNames?: string[]) => context.channel.emit(RESET_STORY_ARGS, { storyId, argNames }), + [storyId] + ); + return [args, updateArgs, resetArgs]; +}; + +const useGlobals = (context: DocsContextProps): [Globals] => { + const storyContext = context.getStoryContext(context.storyById()); + const [globals, setGlobals] = useState(storyContext.globals); + + useEffect(() => { + const cb = (changed: { globals: Globals }) => { + setGlobals(changed.globals); + }; + context.channel.on(GLOBALS_UPDATED, cb); + return () => context.channel.off(GLOBALS_UPDATED, cb); + }, []); + + return [globals]; +}; + +export const extractComponentArgTypes = ( + component: Component, + context: DocsContextProps, + include?: PropDescriptor, + exclude?: PropDescriptor +): StrictArgTypes => { + const { parameters } = context.storyById(); + const { extractArgTypes }: { extractArgTypes: ArgTypesExtractor } = parameters.docs || {}; + if (!extractArgTypes) { + throw new Error(ArgsTableError.ARGS_UNSUPPORTED); + } + let argTypes = extractArgTypes(component); + argTypes = filterArgTypes(argTypes, include, exclude); + + return argTypes; +}; + +const isShortcut = (value?: string) => { + return value && [PRIMARY_STORY].includes(value); +}; + +export const getComponent = (props: ArgsTableProps = {}, context: DocsContextProps): Component => { + const { of } = props as OfProps; + const { story } = props as StoryProps; + const { component } = context.storyById(); + if (isShortcut(of) || isShortcut(story)) { + return component || null; + } + if (!of) { + throw new Error(ArgsTableError.NO_COMPONENT); + } + return of; +}; + +const addComponentTabs = ( + tabs: Record, + components: Record, + context: DocsContextProps, + include?: PropDescriptor, + exclude?: PropDescriptor, + sort?: SortType +) => ({ + ...tabs, + ...mapValues(components, (comp) => ({ + rows: extractComponentArgTypes(comp, context, include, exclude), + sort, + })), +}); + +export const StoryTable: FC< + StoryProps & { component: Component; subcomponents: Record } +> = (props) => { + const context = useContext(DocsContext); + const { + story: storyName, + component, + subcomponents, + showComponent, + include, + exclude, + sort, + } = props; + try { + let storyId; + switch (storyName) { + case PRIMARY_STORY: { + const primaryStory = context.storyById(); + storyId = primaryStory.id; + break; + } + default: { + storyId = context.storyIdByName(storyName); + } + } + + const story = useStory(storyId, context); + // eslint-disable-next-line prefer-const + let [args, updateArgs, resetArgs] = useArgs(storyId, context); + + const [globals] = useGlobals(context); + if (!story) return ; + + const argTypes = filterArgTypes(story.argTypes, include, exclude); + + const mainLabel = getComponentName(component) || 'Story'; + + let tabs = { [mainLabel]: { rows: argTypes, args, globals, updateArgs, resetArgs } } as Record< + string, + PureArgsTableProps + >; + + // Use the dynamically generated component tabs if there are no controls + const storyHasArgsWithControls = argTypes && Object.values(argTypes).find((v) => !!v?.control); + + if (!storyHasArgsWithControls) { + updateArgs = null; + resetArgs = null; + tabs = {}; + } + + if (component && (!storyHasArgsWithControls || showComponent)) { + tabs = addComponentTabs(tabs, { [mainLabel]: component }, context, include, exclude); + } + + if (subcomponents) { + if (Array.isArray(subcomponents)) { + throw new Error( + `Unexpected subcomponents array. Expected an object whose keys are tab labels and whose values are components.` + ); + } + tabs = addComponentTabs(tabs, subcomponents, context, include, exclude); + } + return ; + } catch (err) { + return ; + } +}; + +export const ComponentsTable: FC = (props) => { + const context = useContext(DocsContext); + const { components, include, exclude, sort } = props; + + const tabs = addComponentTabs({}, components, context, include, exclude); + return ; +}; + +export const ArgsTable: FC = (props) => { + const context = useContext(DocsContext); + const { + parameters: { controls }, + subcomponents, + } = context.storyById(); + + const { include, exclude, components, sort: sortProp } = props as ComponentsProps; + const { story: storyName } = props as StoryProps; + + const sort = sortProp || controls?.sort; + + const main = getComponent(props, context); + if (storyName) { + return ; + } + + if (!components && !subcomponents) { + let mainProps; + try { + mainProps = { rows: extractComponentArgTypes(main, context, include, exclude) }; + } catch (err) { + mainProps = { error: err.message }; + } + + return ; + } + + if (components) { + return ; + } + + const mainLabel = getComponentName(main); + return ( + + ); +}; + +ArgsTable.defaultProps = { + of: PRIMARY_STORY, +}; diff --git a/code/ui/blocks/src/blocks/Canvas.stories.tsx b/code/ui/blocks/src/blocks/Canvas.stories.tsx new file mode 100644 index 000000000000..329690713f78 --- /dev/null +++ b/code/ui/blocks/src/blocks/Canvas.stories.tsx @@ -0,0 +1,117 @@ +import React from 'react'; +import type { Meta, StoryObj } from '@storybook/react'; +import { Canvas, SourceState } from './Canvas'; +import { Story as StoryComponent } from './Story'; +import * as ButtonStories from '../examples/Button.stories'; + +const meta: Meta = { + component: Canvas, + parameters: { + relativeCsfPaths: ['../examples/Button.stories'], + }, + render: (args) => { + return ( + + + + ); + }, +}; +export default meta; + +type Story = StoryObj; + +export const BasicStory: Story = {}; + +export const WithSourceOpen: Story = { + args: { + withSource: SourceState.OPEN, + }, +}; +export const WithSourceClosed: Story = { + args: { + withSource: SourceState.CLOSED, + }, +}; + +export const WithMdxSource: Story = { + name: 'With MDX Source', + args: { + withSource: SourceState.OPEN, + mdxSource: ` + +); + +export const CodeExpanded = () => ( + + + +); + +export const CodeError = () => ( + + + +); + +export const Single = () => ( + + + +); + +export const Row = () => ( + + + + + + + + + +); + +export const Column = () => ( + + + + + +); + +export const GridWith3Columns = () => ( + + + + + + + + + + + + + + + + + + + + + + +); + +const buttonFn = () => ; + +export const WithToolbar = () => ( + + + +); + +const Horizontal = styled((props: ComponentProps) => )({ + display: 'grid', + gridTemplateColumns: '100px calc(100vw + 100px) 100px', +}); + +export const Wide = () => ( + + +
    START
    +
    middle
    +
    END
    +
    +
    +); + +export const WithToolbarMulti = () => ( + + + + +); + +export const WithFullscreenSingle = () => ( + + + +); + +export const WithFullscreenMulti = () => ( + + + + +); + +export const WithCenteredSingle = () => ( + + + +); + +export const WithCenteredMulti = () => ( + + + + +); + +export const WithAdditionalActions = () => ( + { + global.location.href = + 'https://github.com/storybookjs/storybook/blob/next/code/ui/blocks/src/components/Preview.stories.tsx#L165-L186'; + }, + }, + ]} + > + + +); diff --git a/code/ui/blocks/src/components/Preview.tsx b/code/ui/blocks/src/components/Preview.tsx new file mode 100644 index 000000000000..a7fa5d298fd0 --- /dev/null +++ b/code/ui/blocks/src/components/Preview.tsx @@ -0,0 +1,298 @@ +import type { ClipboardEvent, FC, ReactElement, ReactNode } from 'react'; +import React, { Children, useCallback, useState } from 'react'; +import { darken } from 'polished'; +import { styled } from '@storybook/theming'; + +import { global } from '@storybook/global'; +import { ActionBar, Zoom } from '@storybook/components'; +import type { ActionItem } from '@storybook/components'; + +import type { SourceProps } from '.'; +// eslint-disable-next-line import/no-cycle +import { Source } from '.'; +import { getBlockBackgroundStyle } from './BlockBackgroundStyles'; +import { Toolbar } from './Toolbar'; +import { ZoomContext } from './ZoomContext'; +// eslint-disable-next-line import/no-cycle +import { StorySkeleton } from './Story'; + +export interface PreviewProps { + isLoading?: true; + isColumn?: boolean; + columns?: number; + withSource?: SourceProps; + isExpanded?: boolean; + withToolbar?: boolean; + className?: string; + additionalActions?: ActionItem[]; + children?: ReactNode; +} + +type Layout = 'padded' | 'fullscreen' | 'centered'; + +const ChildrenContainer = styled.div( + ({ isColumn, columns, layout }) => ({ + display: isColumn || !columns ? 'block' : 'flex', + position: 'relative', + flexWrap: 'wrap', + overflow: 'auto', + flexDirection: isColumn ? 'column' : 'row', + + '& .innerZoomElementWrapper > *': isColumn + ? { + width: layout !== 'fullscreen' ? 'calc(100% - 20px)' : '100%', + display: 'block', + } + : { + maxWidth: layout !== 'fullscreen' ? 'calc(100% - 20px)' : '100%', + display: 'inline-block', + }, + }), + ({ layout = 'padded' }) => + layout === 'centered' || layout === 'padded' + ? { + padding: '30px 20px', + margin: -10, + '& .innerZoomElementWrapper > *': { + width: 'auto', + border: '10px solid transparent!important', + }, + } + : {}, + ({ layout = 'padded' }) => + layout === 'centered' + ? { + display: 'flex', + justifyContent: 'center', + justifyItems: 'center', + alignContent: 'center', + alignItems: 'center', + } + : {}, + ({ columns }) => + columns && columns > 1 + ? { '.innerZoomElementWrapper > *': { minWidth: `calc(100% / ${columns} - 20px)` } } + : {} +); + +const StyledSource = styled(Source)(({ theme }) => ({ + margin: 0, + borderTopLeftRadius: 0, + borderTopRightRadius: 0, + borderBottomLeftRadius: theme.appBorderRadius, + borderBottomRightRadius: theme.appBorderRadius, + border: 'none', + + background: + theme.base === 'light' ? 'rgba(0, 0, 0, 0.85)' : darken(0.05, theme.background.content), + color: theme.color.lightest, + button: { + background: + theme.base === 'light' ? 'rgba(0, 0, 0, 0.85)' : darken(0.05, theme.background.content), + }, +})); + +const PreviewContainer = styled.div( + ({ theme, withSource, isExpanded }) => ({ + position: 'relative', + overflow: 'hidden', + margin: '25px 0 40px', + ...getBlockBackgroundStyle(theme), + borderBottomLeftRadius: withSource && isExpanded && 0, + borderBottomRightRadius: withSource && isExpanded && 0, + borderBottomWidth: isExpanded && 0, + }), + ({ withToolbar }) => withToolbar && { paddingTop: 40 } +); + +interface SourceItem { + source?: ReactElement; + actionItem: ActionItem; +} + +const getSource = ( + withSource: SourceProps, + expanded: boolean, + setExpanded: Function +): SourceItem => { + switch (true) { + case !!(withSource && withSource.error): { + return { + source: null, + actionItem: { + title: 'No code available', + className: 'docblock-code-toggle docblock-code-toggle--disabled', + disabled: true, + onClick: () => setExpanded(false), + }, + }; + } + case expanded: { + return { + source: , + actionItem: { + title: 'Hide code', + className: 'docblock-code-toggle docblock-code-toggle--expanded', + onClick: () => setExpanded(false), + }, + }; + } + default: { + return { + source: , + actionItem: { + title: 'Show code', + className: 'docblock-code-toggle', + onClick: () => setExpanded(true), + }, + }; + } + } +}; +function getStoryId(children: ReactNode) { + if (Children.count(children) === 1) { + const elt = children as ReactElement; + if (elt.props) { + return elt.props.id; + } + } + return null; +} + +const PositionedToolbar = styled(Toolbar)({ + position: 'absolute', + top: 0, + left: 0, + right: 0, + height: 40, +}); + +const Relative = styled.div({ + overflow: 'hidden', + position: 'relative', +}); + +const getLayout = (children: ReactElement[]): Layout => { + return children.reduce((result, c) => { + if (result) { + return result; + } + if (typeof c === 'string' || typeof c === 'number') { + return 'padded'; + } + return (c.props && c.props.parameters && c.props.parameters.layout) || 'padded'; + }, undefined); +}; + +/** + * A preview component for showing one or more component `Story` + * items. The preview also shows the source for the component + * as a drop-down. + */ +export const Preview: FC = ({ + isLoading, + isColumn, + columns, + children, + withSource, + withToolbar = false, + isExpanded = false, + additionalActions, + className, + ...props +}) => { + const [expanded, setExpanded] = useState(isExpanded); + const { source, actionItem } = getSource(withSource, expanded, setExpanded); + const [scale, setScale] = useState(1); + const previewClasses = [className].concat(['sbdocs', 'sbdocs-preview']); + + const defaultActionItems = withSource ? [actionItem] : []; + const [additionalActionItems, setAdditionalActionItems] = useState( + additionalActions ? [...additionalActions] : [] + ); + const actionItems = [...defaultActionItems, ...additionalActionItems]; + + // @ts-expect-error (Converted from ts-ignore) + const layout = getLayout(Children.count(children) === 1 ? [children] : children); + + const { window: globalWindow } = global; + + const copyToClipboard = useCallback(async (text: string) => { + const { createCopyToClipboardFunction } = await import('@storybook/components'); + createCopyToClipboardFunction(); + }, []); + + const onCopyCapture = (e: ClipboardEvent) => { + e.preventDefault(); + if (additionalActionItems.filter((item) => item.title === 'Copied').length === 0) { + copyToClipboard(source.props.code).then(() => { + setAdditionalActionItems([ + ...additionalActionItems, + { + title: 'Copied', + onClick: () => {}, + }, + ]); + globalWindow.setTimeout( + () => + setAdditionalActionItems( + additionalActionItems.filter((item) => item.title !== 'Copied') + ), + 1500 + ); + }); + } + }; + + return ( + + {withToolbar && ( + setScale(scale * z)} + resetZoom={() => setScale(1)} + storyId={getStoryId(children)} + baseUrl="./iframe.html" + /> + )} + + + + + {Array.isArray(children) ? ( + // eslint-disable-next-line react/no-array-index-key + children.map((child, i) =>
    {child}
    ) + ) : ( +
    {children}
    + )} +
    +
    + +
    +
    + {withSource && expanded && source} +
    + ); +}; + +const StyledPreview = styled(Preview)(() => ({ + '.docs-story': { + paddingTop: 32, + paddingBottom: 40, + }, +})); + +export const PreviewSkeleton = () => ( + + + +); diff --git a/code/ui/blocks/src/components/Source.stories.tsx b/code/ui/blocks/src/components/Source.stories.tsx new file mode 100644 index 000000000000..9a2912f11ed2 --- /dev/null +++ b/code/ui/blocks/src/components/Source.stories.tsx @@ -0,0 +1,74 @@ +import { Source, SourceError } from './Source'; + +export default { + component: Source, +}; + +export const Loading = { + args: { + isLoading: true, + }, +}; + +export const JSX = { + args: { + code: ` + + a.id} /> + +`, + language: 'jsx', + format: false, + }, +}; + +export const CSSWithDarkMode = { + args: { + code: ` +@-webkit-keyframes blinker { + from { opacity: 1.0; } + to { opacity: 0.0; } +} + +.waitingForConnection { + -webkit-animation-name: blinker; + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: cubic-bezier(.5, 0, 1, 1); + -webkit-animation-duration: 1.7s; +} +`, + language: 'css', + format: false, + dark: true, + }, +}; + +export const GraphQLWithFormatting = { + args: { + code: `query HeroNameAndFriends($episode: Episode) { + hero(episode: $episode) { + name + friends { + name + } + } + } +`, + language: 'graphql', + format: true, + }, +}; + +export const NoStory = { + args: { + error: SourceError.NO_STORY, + format: false, + }, +}; + +export const SourceUnavailable = { + args: { + error: SourceError.SOURCE_UNAVAILABLE, + format: false, + }, +}; diff --git a/code/ui/blocks/src/components/Source.tsx b/code/ui/blocks/src/components/Source.tsx new file mode 100644 index 000000000000..26dc904b1b18 --- /dev/null +++ b/code/ui/blocks/src/components/Source.tsx @@ -0,0 +1,114 @@ +import type { ComponentProps, FunctionComponent } from 'react'; +import React from 'react'; +import { styled, ThemeProvider, convert, themes } from '@storybook/theming'; +import { SyntaxHighlighter } from '@storybook/components'; + +import { EmptyBlock } from './EmptyBlock'; + +const StyledSyntaxHighlighter: typeof SyntaxHighlighter = styled(SyntaxHighlighter)( + ({ theme }) => ({ + // DocBlocks-specific styling and overrides + fontSize: `${theme.typography.size.s2 - 1}px`, + lineHeight: '19px', + margin: '25px 0 40px', + borderRadius: theme.appBorderRadius, + boxShadow: + theme.base === 'light' + ? 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' + : 'rgba(0, 0, 0, 0.20) 0 2px 5px 0', + 'pre.prismjs': { + padding: 20, + background: 'inherit', + }, + }) +); + +export enum SourceError { + NO_STORY = 'There\u2019s no story here.', + SOURCE_UNAVAILABLE = 'Oh no! The source is not available.', +} + +interface SourceErrorProps { + isLoading?: boolean; + error?: SourceError; +} + +interface SourceCodeProps { + language?: string; + code?: string; + format?: ComponentProps['format']; + dark?: boolean; +} + +const SourceSkeletonWrapper = styled.div(({ theme }) => ({ + background: theme.background.content, + borderRadius: theme.appBorderRadius, + border: `1px solid ${theme.appBorderColor}`, + boxShadow: + theme.base === 'light' ? 'rgba(0, 0, 0, 0.10) 0 1px 3px 0' : 'rgba(0, 0, 0, 0.20) 0 2px 5px 0', + margin: '25px 0 40px', + padding: '20px 20px 20px 22px', +})); + +const SourceSkeletonPlaceholder = styled.div(({ theme }) => ({ + animation: `${theme.animation.glow} 1.5s ease-in-out infinite`, + background: theme.appBorderColor, + height: 17, + marginTop: 1, + width: '60%', + + [`&:first-child`]: { + margin: 0, + }, +})); + +const SourceSkeleton = () => ( + + + + + + +); + +// FIXME: Using | causes a typescript error, so stubbing it with & for now +// and making `error` optional +export type SourceProps = SourceErrorProps & SourceCodeProps; + +/** + * Syntax-highlighted source code for a component (or anything!) + */ +const Source: FunctionComponent = (props) => { + const { isLoading, error } = props as SourceErrorProps; + if (isLoading) { + return ; + } + if (error) { + return {error}; + } + + const { language, code, dark, format, ...rest } = props as SourceCodeProps; + + const syntaxHighlighter = ( + + {code} + + ); + if (typeof dark === 'undefined') { + return syntaxHighlighter; + } + const overrideTheme = dark ? themes.dark : themes.light; + return {syntaxHighlighter}; +}; + +Source.defaultProps = { + format: false, +}; +export { Source, StyledSyntaxHighlighter }; diff --git a/code/ui/blocks/src/components/Story.stories.tsx b/code/ui/blocks/src/components/Story.stories.tsx new file mode 100644 index 000000000000..df7d5583d922 --- /dev/null +++ b/code/ui/blocks/src/components/Story.stories.tsx @@ -0,0 +1,26 @@ +import React, { useState } from 'react'; +import { Button } from '@storybook/components'; +import { Story, StorySkeleton, StoryError } from './Story'; + +export default { + component: Story, +}; + +const buttonFn = () => ; + +const buttonHookFn = () => { + const [count, setCount] = useState(0); + return ( + + ); +}; + +export const Loading = () => ; + +export const Inline = () => ; + +export const Error = () => ; + +export const ReactHook = () => ; diff --git a/code/ui/blocks/src/components/Story.tsx b/code/ui/blocks/src/components/Story.tsx new file mode 100644 index 000000000000..01b677ae6a96 --- /dev/null +++ b/code/ui/blocks/src/components/Story.tsx @@ -0,0 +1,95 @@ +import { global } from '@storybook/global'; +import type { ElementType, FunctionComponent } from 'react'; +import React, { createElement, Fragment } from 'react'; +import type { Parameters } from '@storybook/types'; +import { Loader, getStoryHref } from '@storybook/components'; +// eslint-disable-next-line import/no-cycle +import { EmptyBlock } from '.'; +import { IFrame } from './IFrame'; +import { ZoomContext } from './ZoomContext'; + +const { PREVIEW_URL } = global; +const BASE_URL = PREVIEW_URL || 'iframe.html'; + +export enum StoryError { + NO_STORY = 'No component or story to display', +} + +/** error message for Story with null storyFn + * if the story id exists, it must be pointing to a non-existing story + * if there is assigned story id, the story must be empty + */ +const MISSING_STORY = (id?: string) => (id ? `Story "${id}" doesn't exist.` : StoryError.NO_STORY); + +interface CommonProps { + title?: string; + height?: string; + id: string; +} + +interface InlineStoryProps extends CommonProps { + parameters: Parameters; + storyFn: ElementType; +} + +type IFrameStoryProps = CommonProps; + +type StoryProps = InlineStoryProps | IFrameStoryProps; + +const InlineStory: FunctionComponent = ({ storyFn, height, id }) => ( + + {height ? ( + + ) : null} + + {storyFn ? createElement(storyFn) : {MISSING_STORY(id)}} + + +); + +const IFrameStory: FunctionComponent = ({ id, title, height = '500px' }) => ( +
    + + {({ scale }) => { + return ( + ### I see a "No Preview" error with a Storybook production build @@ -279,10 +308,6 @@ If you run into a situation where this is not the case, you can adjust the `conf See our documentation on how to customize the [Storyshots configuration](./writing-tests/snapshot-testing.md). -### Why are my MDX stories not working in IE11? - -Currently there's an issue when using MDX stories with IE11. This issue does not apply to [DocsPage](./writing-docs/docs-page.md). If you're interested in helping us fix this issue, read our Contribution guidelines and submit a pull request. - ### Why aren't my code blocks highlighted with Storybook MDX Out of the box, Storybook provides syntax highlighting for a set of languages (e.g., Javascript, Markdown, CSS, HTML, Typescript, GraphQL) that you can use with your code blocks. If you're writing your custom code blocks with MDX, you'll need to import the syntax highlighter manually. For example, if you're adding a code block for SCSS, adjust your story to the following: @@ -303,6 +328,30 @@ Out of the box, Storybook provides syntax highlighting for a set of languages (e Applying this small change will enable you to add syntax highlight for SCSS or any other language available. +You can also update your [`.storybook/preview.js`](../configure/overview.md#configure-story-rendering) and enable syntax highlighting globally. For example, to add support for SCSS, update your configuration to the following: + + + + + + + +Write your documentation as you usually would, and your existing SCSS code blocks will automatically be highlighted when Storybook reloads. For example: + + + + + + + ### Why aren't my MDX 2 stories working in Storybook? MDX 2 introduced some changes to how the code is rendered. For example, if you enabled it in your Storybook and you have the following code block: @@ -347,7 +396,7 @@ This is a known issue with MDX 2. We're working to fix it. For now you can apply import { Story } from '@storybook/addon-docs'; -import * as stories from './Button.stories.jsx'; +import \* as stories from './Button.stories.jsx'; ``` @@ -410,7 +459,7 @@ We're aware that the default Typescript story construct might seem outdated and // Button.stories.ts | tsx import React from 'react'; -import { ComponentStory, ComponentMeta } from '@storybook/react'; +import type { ComponentStory, ComponentMeta } from '@storybook/react'; const StoryMeta: ComponentMeta = { /* 👇 The title prop is optional. @@ -470,7 +519,7 @@ export default { There's an issue with Storybook's test runner and the latest version of Jest (i.e., version 28), which prevents it from running effectively. As a workaround, you can downgrade Jest to the previous stable version (i.e., version 27), and you'll be able to run it. See the following [issue](https://github.com/storybookjs/test-runner/issues/99) for more information. -### How does Storybook handles enviroment variables? +### How does Storybook handle environment variables? Storybook has built-in support for [environment variables](./configure/environment-variables.md). By default, environment variables are only available in Node.js code and are not available in the browser as some variables should be kept secret (e.g., API keys) and **not** exposed to anyone visiting the published Storybook. diff --git a/docs/frameworks.js b/docs/frameworks.js index 8d2e1156f7b8..ce957e01d08b 100644 --- a/docs/frameworks.js +++ b/docs/frameworks.js @@ -88,7 +88,7 @@ module.exports = { { name: 'Storyshots', unsupported: ['ember'], - path: 'workflows/unit-testing', + path: 'writing-tests/snapshot-testing', }, { name: 'storysource', diff --git a/docs/get-started/addons-walkthrough-optimized.mp4 b/docs/get-started/addons-walkthrough-optimized.mp4 index e9bbedc6f1c2..43a64b7cff09 100644 Binary files a/docs/get-started/addons-walkthrough-optimized.mp4 and b/docs/get-started/addons-walkthrough-optimized.mp4 differ diff --git a/docs/get-started/addons.png b/docs/get-started/addons.png index 7bcb209c021d..be2d9709ec70 100644 Binary files a/docs/get-started/addons.png and b/docs/get-started/addons.png differ diff --git a/docs/get-started/browse-stories.md b/docs/get-started/browse-stories.md index ff5f725c81fc..268f3a9792b2 100644 --- a/docs/get-started/browse-stories.md +++ b/docs/get-started/browse-stories.md @@ -30,10 +30,11 @@ Or use keyboard shortcuts. Click on the Storybook's menu to see the list of shor Storybook ships with time-saving tools built-in. The toolbar contains tools that allow you to adjust how the story renders in the Canvas: -![Storybook toolbar](./toolbar.png) - - 🔍 Zooming visually scales the component so you can check the details. - 🖼 Background changes the rendered background behind your component so you can verify how your component renders in different visual contexts. +- 📐 Grid renders your component on top of a grid layout so you can verify if your component is aligned correctly. +- 📏 Measure toggles a measurement overlay to help you inspect the dimensions of components. +- 🎚️ Outline displays the component's bounding box so you can verify if your component is positioned correctly. - 📱 Viewport renders the component in a variety of dimensions and orientations. It’s ideal for checking the responsiveness of components. -The [“Docs”](../writing-docs/introduction.md) tab shows auto-generated documentation about components (inferred from the source code). Usage docs are helpful when sharing reusable components with your team, for example, in a design system or component library. +The [“Docs”](../writing-docs/introduction.md) page displays auto-generated documentation for components (inferred from the source code). Usage documentation is helpful when sharing reusable components with your team, for example, in an application. @@ -61,7 +62,8 @@ Addons are plugins that extend Storybook's core functionality. You can find them ![Storybook addon examples](./addons.png) - **Controls** allows you to interact with a component’s args (inputs) dynamically. Experiment with alternate configurations of the component to discover edge cases. -- **Actions** help you verify interactions produce the correct outputs via callbacks. For instance, if you view the “Logged In” story of the Header component, we can verify that clicking the “Log out” button triggers the `onLogout` callback, which would be provided by the component that made use of the Header. +- **Actions** help you verify interactions produce the correct outputs via callbacks. For instance, if you view the “Logged In” story of the `Header` component, we can verify that clicking the “Log out” button triggers the `onLogout` callback, which would be provided by the component that made use of the Header. +- **Interactions** provides a helpful user interface for debugging [interaction tests](../writing-tests/interaction-testing.md) with the `play` function.
    -

    - -`; - -exports[`Storyshots Example/Header Logged Out 1`] = ` -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -

    - Acme -

    - - -
    -
    -
    -
    -
    -`; diff --git a/examples/html-kitchen-sink/stories/from-essentials/__snapshots__/Page.stories.storyshot b/examples/html-kitchen-sink/stories/from-essentials/__snapshots__/Page.stories.storyshot deleted file mode 100644 index 6a9ca27deff4..000000000000 --- a/examples/html-kitchen-sink/stories/from-essentials/__snapshots__/Page.stories.storyshot +++ /dev/null @@ -1,417 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Storyshots Example/Page Logged In 1`] = ` -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -

    - Acme -

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

    - Pages in Storybook -

    - - -

    - - We recommend building UIs with a - - - - - - component-driven - - - - - - process starting with atomic components and ending with pages. - -

    - - -

    - - Render pages with mock data. This makes it easy to build and review page states without - needing to navigate to them in your app. Here are some handy patterns for managing page data - in Storybook: - -

    - - -
      - - -
    • - - Use a higher-level connected component. Storybook helps you compose such data from the - "args" of child component stories - -
    • - - -
    • - - Assemble data in the page component from your services. You can mock these services out - using Storybook. - -
    • - - -
    - - -

    - - Get a guided tutorial on component-driven development at - - - - Storybook tutorials - - - - . Read more in the - - - docs - - - . - -

    - - -
    - - - - Tip - - - Adjust the width of the canvas with the - - - - - - - - - - - - - - - - Viewports addon in the toolbar - -
    - - -
    - - -
    -`; - -exports[`Storyshots Example/Page Logged Out 1`] = ` -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - -

    - Acme -

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

    - Pages in Storybook -

    - - -

    - - We recommend building UIs with a - - - - - - component-driven - - - - - - process starting with atomic components and ending with pages. - -

    - - -

    - - Render pages with mock data. This makes it easy to build and review page states without - needing to navigate to them in your app. Here are some handy patterns for managing page data - in Storybook: - -

    - - -
      - - -
    • - - Use a higher-level connected component. Storybook helps you compose such data from the - "args" of child component stories - -
    • - - -
    • - - Assemble data in the page component from your services. You can mock these services out - using Storybook. - -
    • - - -
    - - -

    - - Get a guided tutorial on component-driven development at - - - - Storybook tutorials - - - - . Read more in the - - - docs - - - . - -

    - - -
    - - - - Tip - - - Adjust the width of the canvas with the - - - - - - - - - - - - - - - - Viewports addon in the toolbar - -
    - - -
    - - -
    -`; diff --git a/examples/html-kitchen-sink/stories/from-essentials/header.css b/examples/html-kitchen-sink/stories/from-essentials/header.css deleted file mode 100644 index acadc9ec8c7f..000000000000 --- a/examples/html-kitchen-sink/stories/from-essentials/header.css +++ /dev/null @@ -1,26 +0,0 @@ -.wrapper { - font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; - border-bottom: 1px solid rgba(0, 0, 0, 0.1); - padding: 15px 20px; - display: flex; - align-items: center; - justify-content: space-between; -} - -svg { - display: inline-block; - vertical-align: top; -} - -h1 { - font-weight: 900; - font-size: 20px; - line-height: 1; - margin: 6px 0 6px 10px; - display: inline-block; - vertical-align: top; -} - -button + button { - margin-left: 10px; -} diff --git a/examples/html-kitchen-sink/stories/from-essentials/page.css b/examples/html-kitchen-sink/stories/from-essentials/page.css deleted file mode 100644 index 51c9d099a139..000000000000 --- a/examples/html-kitchen-sink/stories/from-essentials/page.css +++ /dev/null @@ -1,69 +0,0 @@ -section { - font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 24px; - padding: 48px 20px; - margin: 0 auto; - max-width: 600px; - color: #333; -} - -h2 { - font-weight: 900; - font-size: 32px; - line-height: 1; - margin: 0 0 4px; - display: inline-block; - vertical-align: top; -} - -p { - margin: 1em 0; -} - -a { - text-decoration: none; - color: #1ea7fd; -} - -ul { - padding-left: 30px; - margin: 1em 0; -} - -li { - margin-bottom: 8px; -} - -.tip { - display: inline-block; - border-radius: 1em; - font-size: 11px; - line-height: 12px; - font-weight: 700; - background: #e7fdd8; - color: #66bf3c; - padding: 4px 12px; - margin-right: 10px; - vertical-align: top; -} - -.tip-wrapper { - font-size: 13px; - line-height: 20px; - margin-top: 40px; - margin-bottom: 40px; -} - -.tip-wrapper svg { - display: inline-block; - height: 12px; - width: 12px; - margin-right: 4px; - vertical-align: top; - margin-top: 3px; -} - -.tip-wrapper svg path { - fill: #1ea7fd; -} diff --git a/examples/html-kitchen-sink/stories/loaders.stories.js b/examples/html-kitchen-sink/stories/loaders.stories.js deleted file mode 100644 index ae8b4616195d..000000000000 --- a/examples/html-kitchen-sink/stories/loaders.stories.js +++ /dev/null @@ -1,7 +0,0 @@ -export default { - title: 'Core/Loaders', - loaders: [async () => new Promise((r) => setTimeout(() => r({ kindValue: 7 }), 3000))], -}; - -export const Story = (args, { loaded }) => - `
    Loaded Value is ${JSON.stringify(loaded, null, 2)}
    `; diff --git a/examples/html-kitchen-sink/stories/logo.svg b/examples/html-kitchen-sink/stories/logo.svg deleted file mode 100644 index 4afc49cee5ed..000000000000 --- a/examples/html-kitchen-sink/stories/logo.svg +++ /dev/null @@ -1 +0,0 @@ -HTML5 Logo \ No newline at end of file diff --git a/examples/html-kitchen-sink/stories/source-loader.stories.js b/examples/html-kitchen-sink/stories/source-loader.stories.js deleted file mode 100644 index f1170d8293b8..000000000000 --- a/examples/html-kitchen-sink/stories/source-loader.stories.js +++ /dev/null @@ -1,26 +0,0 @@ -import button from './button.html'; - -const packageName = './button.html'; -const componentSubtitle = `import button from '${packageName}/lib/elements/buttons';`; - -export default { - title: 'Addons/Source loader', - parameters: { - componentSubtitle, - }, -}; - -export const Button = () => button; -Button.parameters = { - storySource: { - source: `source: ${button}`, - }, -}; - -export const SimpleStory = () => - `

    - - This is a fragment of HTML - -

    `; -SimpleStory.storyName = 'Very simple story'; diff --git a/examples/html-kitchen-sink/stories/welcome.css b/examples/html-kitchen-sink/stories/welcome.css deleted file mode 100644 index f6b49bab864f..000000000000 --- a/examples/html-kitchen-sink/stories/welcome.css +++ /dev/null @@ -1,25 +0,0 @@ -.main { - padding: 15px; - line-height: 1.4; - font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif; - background-color: #ffffff; -} - -h1 { - color: rebeccapurple; -} - -.logo { - width: 256px; - margin: 15px; -} - -.code { - font-size: 15px; - font-weight: 600; - padding: 2px 5px; - border: 1px solid #eae9e9; - border-radius: 4px; - background-color: #f3f2f2; - color: #3a3a3a; -} diff --git a/examples/html-kitchen-sink/stories/welcome.html b/examples/html-kitchen-sink/stories/welcome.html deleted file mode 100644 index af62ae262a1a..000000000000 --- a/examples/html-kitchen-sink/stories/welcome.html +++ /dev/null @@ -1,29 +0,0 @@ -
    -

    Welcome to Storybook for HTML

    -

    This is a UI component dev environment for your plain HTML snippets.

    -

    - We've added some basic stories inside the stories directory. -
    - A story is a single state of one or more UI components. You can have as many stories as you want. -
    - (Basically a story is like a visual test case.) -

    -

    - See these sample stories -

    -

    -

    - Just like that, you can add your own snippets as stories. -
    - You can also edit those snippets and see changes right away. -
    -

    -

    - Usually we create stories with smaller UI components in the app.
    - Have a look at the - - Writing Stories - - section in our documentation. -

    -
    diff --git a/examples/html-kitchen-sink/stories/welcome.stories.js b/examples/html-kitchen-sink/stories/welcome.stories.js deleted file mode 100644 index 6410a83ee835..000000000000 --- a/examples/html-kitchen-sink/stories/welcome.stories.js +++ /dev/null @@ -1,11 +0,0 @@ -import { withLinks } from '@storybook/addon-links'; - -import './welcome.css'; -import welcome from './welcome.html'; - -export default { - title: 'Welcome', - decorators: [withLinks], -}; - -export const Welcome = () => welcome; diff --git a/examples/html-kitchen-sink/tests/addon-jest.config.json b/examples/html-kitchen-sink/tests/addon-jest.config.json deleted file mode 100644 index e6e886d95ac2..000000000000 --- a/examples/html-kitchen-sink/tests/addon-jest.config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "rootDir": "../../..", - "verbose": true, - "notify": true, - "transform": { - ".*": "babel-jest" - }, - "setupFilesAfterEnv": ["/scripts/jest.init.js"], - "testMatch": ["/examples/official-storybook/tests/addon-jest.test.js"] -} diff --git a/examples/html-kitchen-sink/tests/addon-jest.test.js b/examples/html-kitchen-sink/tests/addon-jest.test.js deleted file mode 100644 index 0b4fa6ee89f8..000000000000 --- a/examples/html-kitchen-sink/tests/addon-jest.test.js +++ /dev/null @@ -1,32 +0,0 @@ -// This file is excluded from the `/scripts/test.js` script. (see root `jest.config.js` file) -test('true should be true', () => { - expect(true).toBe(true); -}); - -describe('In a describe:', () => { - test('true should still be true', () => { - expect(true).toBe(true); - }); - - test('a list should contain 3 items', () => { - expect(['a', 'b', '3']).toHaveLength(3); - }); - - test('everything is awesome', () => { - expect('everything is all right').toEqual('everything is awesome'); - }); -}); - -describe('A bunch of failing tests:', () => { - test('true should still be true', () => { - expect(true).toBe(false); - }); - - test('a list should contain 3 items', () => { - expect(['a', 'b', '3']).toContain(301); - }); - - test('should work', () => { - expect(() => {}).toThrow(); - }); -}); diff --git a/examples/html-kitchen-sink/tests/htmlshots.test.js b/examples/html-kitchen-sink/tests/htmlshots.test.js deleted file mode 100644 index f7d22dfc52ab..000000000000 --- a/examples/html-kitchen-sink/tests/htmlshots.test.js +++ /dev/null @@ -1,9 +0,0 @@ -import path from 'path'; -import initStoryshots, { multiSnapshotWithOptions } from '@storybook/addon-storyshots'; - -initStoryshots({ - framework: 'html', - integrityOptions: { cwd: path.resolve(__dirname, '../stories') }, - configPath: path.resolve(__dirname, '../.storybook'), - test: multiSnapshotWithOptions(), -}); diff --git a/examples/html-kitchen-sink/typings.d.ts b/examples/html-kitchen-sink/typings.d.ts deleted file mode 100644 index 6048f42af982..000000000000 --- a/examples/html-kitchen-sink/typings.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module 'global'; -declare module 'format-json'; -declare module '*.json' { - const value: any; - export default value; -} diff --git a/examples/official-storybook/.env b/examples/official-storybook/.env deleted file mode 100644 index 23af4d561fae..000000000000 --- a/examples/official-storybook/.env +++ /dev/null @@ -1 +0,0 @@ -DOTENV_DISPLAY_WARNING=none diff --git a/examples/official-storybook/.env.development b/examples/official-storybook/.env.development deleted file mode 100644 index 3746c482ab58..000000000000 --- a/examples/official-storybook/.env.development +++ /dev/null @@ -1 +0,0 @@ -DOTENV_DEVELOPMENT_DISPLAY_WARNING=true diff --git a/examples/official-storybook/README.md b/examples/official-storybook/README.md deleted file mode 100644 index 2ada0aa35033..000000000000 --- a/examples/official-storybook/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Official storybook - -This storybook includes stories for: - -- `@storybook/components` - reusable UI components for addon authors -- `@storybook/ui` - the UI of storybook itself -- `@storybook/addon-*` - various addons. -- `@storybook/other-*` - various examples. - -## How to make new `build-storybook`s: - -```sh -sudo ln -s ../../{new-example}/storybook-static /Users/{user}/{location-of-storybook-repo}/core/examples/official-storybook/built-storybookjs/{new-example} -``` diff --git a/examples/official-storybook/components/BaseButton.js b/examples/official-storybook/components/BaseButton.js deleted file mode 100644 index 17b2ce719fda..000000000000 --- a/examples/official-storybook/components/BaseButton.js +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -/** BaseButton component description imported from comments inside the component file */ -const BaseButton = ({ disabled, label, onClick, style }) => ( - -); - -BaseButton.defaultProps = { - disabled: false, - onClick: () => {}, - style: {}, -}; - -BaseButton.propTypes = { - /** Boolean indicating whether the button should render as disabled */ - disabled: PropTypes.bool, - /** button label. */ - label: PropTypes.string.isRequired, - /** onClick handler */ - onClick: PropTypes.func, - /** Custom styles */ - style: PropTypes.shape({}), -}; - -export default BaseButton; diff --git a/examples/official-storybook/components/ButtonGroup.js b/examples/official-storybook/components/ButtonGroup.js deleted file mode 100644 index 6b8187dac6bb..000000000000 --- a/examples/official-storybook/components/ButtonGroup.js +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -/** ButtonGroup component description from docgen */ -export const ButtonGroup = ({ background, children }) => ( -
    {children}
    -); - -ButtonGroup.defaultProps = { - background: '#ff0', - children: null, -}; - -ButtonGroup.propTypes = { - /** - * Background color for the group - */ - background: PropTypes.string, - children: PropTypes.arrayOf(PropTypes.element), -}; - -/** SubGroup component description from docgen */ -export const SubGroup = ({ background, children }) =>
    {children}
    ; - -SubGroup.defaultProps = { - background: '#0f0', - children: null, -}; - -SubGroup.propTypes = { - /** - * Background color for the sub-group - */ - background: PropTypes.string, - children: PropTypes.arrayOf(PropTypes.element), -}; diff --git a/examples/official-storybook/components/DelayedRender.js b/examples/official-storybook/components/DelayedRender.js deleted file mode 100644 index 85ec79e1a6af..000000000000 --- a/examples/official-storybook/components/DelayedRender.js +++ /dev/null @@ -1,30 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; - -export default class DelayedRender extends Component { - static propTypes = { - children: PropTypes.node.isRequired, - }; - - state = { - show: false, - }; - - componentDidMount() { - this.showTO = setTimeout(() => { - this.setState({ - show: true, - }); - }, 1000); - } - - componentWillUnmount() { - clearTimeout(this.showTO); - } - - render() { - const { show } = this.state; - const { children } = this.props; - return show ? children :
    ; - } -} diff --git a/examples/official-storybook/components/DocgenButton.js b/examples/official-storybook/components/DocgenButton.js deleted file mode 100644 index 801605b18845..000000000000 --- a/examples/official-storybook/components/DocgenButton.js +++ /dev/null @@ -1,176 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -/** - * DocgenButton component description imported from comments inside the component file, - * - * *Important Note*: Unlike with normal `` elements, setting this will - * not validate the input contents. This is because in this project we use - * Formik and Yup to validate fields at the form-level, not at the individual - * input level. It is still very important to set this value properly for - * accessibility and user experience. - * - * Here's a list to test out formatting. - * - * * `"number"` Any number not represented by a more specific type. - * * `"password"` A password. - * * `"email"` An email address. - * * `"tel"` A phone or fax number. Shows the phone number keypad on - * mobile keyboards. - * - * Here is a test for code blocks - * - * ```jsx - * const Foo = () => ( - *
    foo
    - * ); - * ``` - */ -export const DocgenButton = ({ disabled, label, onClick }) => ( - -); - -DocgenButton.defaultProps = { - disabled: false, - onClick: () => {}, - optionalString: 'Default String', - one: { key: 1 }, - two: { - thing: { - id: 2, - func: () => {}, - arr: [], - }, - }, - obj: { - key: 'value', - }, - shape: { - id: 3, - func: () => {}, - arr: [], - shape: { - shape: { - foo: 'bar', - }, - }, - }, - arrayOf: [1, 2, 3], - msg: new Set(), - enm: 'News', - enmEval: 'Photos', - union: 'hello', -}; - -/* eslint-disable react/no-unused-prop-types */ - -DocgenButton.propTypes = { - /** Boolean indicating whether the button should render as disabled */ - disabled: PropTypes.bool, - /** button label. */ - label: PropTypes.string.isRequired, - /** onClick handler */ - onClick: PropTypes.func, - /** - * A simple `objectOf` propType. - */ - one: PropTypes.objectOf(PropTypes.number), - /** - * A very complex `objectOf` propType. - */ - two: PropTypes.objectOf( - PropTypes.shape({ - /** - * Just an internal propType for a shape. - * It's also required, and as you can see it supports multi-line comments! - */ - id: PropTypes.number.isRequired, - /** - * A simple non-required function - */ - func: PropTypes.func, - /** - * An `arrayOf` shape - */ - arr: PropTypes.arrayOf( - PropTypes.shape({ - /** - * 5-level deep propType definition and still works. - */ - index: PropTypes.number.isRequired, - }) - ), - }) - ), - - /** - * Plain object propType (use shape!!) - */ - obj: PropTypes.object, // eslint-disable-line react/forbid-prop-types - - /** - * propType for shape with nested arrayOf - * - * Also, multi-line description - */ - shape: PropTypes.shape({ - /** - * Just an internal propType for a shape. - * It's also required, and as you can see it supports multi-line comments! - */ - id: PropTypes.number.isRequired, - /** - * A simple non-required function - */ - func: PropTypes.func, - /** - * An `arrayOf` shape - */ - arr: PropTypes.arrayOf( - PropTypes.shape({ - /** - * 5-level deep propType definition and still works. - */ - index: PropTypes.number.isRequired, - }) - ), - - shape: PropTypes.shape({ - shape: PropTypes.shape({ - foo: PropTypes.string, - }), - }), - }), - - /** - * array of a certain type - */ - arrayOf: PropTypes.arrayOf(PropTypes.number), - - /** - * `instanceOf` is also supported and the custom type will be shown instead of `instanceOf` - */ - msg: PropTypes.instanceOf(Set), - /** - * `oneOf` is basically an Enum which is also supported but can be pretty big. - * - * Testing a list: - * - * - `News` first - * - `Photos` second - */ - enm: PropTypes.oneOf(['News', 'Photos']), - enmEval: PropTypes.oneOf((() => ['News', 'Photos'])()), - /** - * A multi-type prop is also valid and is displayed as `Union` - */ - union: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Set)]), - /** - * test string with a comment that has - * two identical lines - * two identical lines - */ - optionalString: PropTypes.string, -}; diff --git a/examples/official-storybook/components/FlowTypeButton.js b/examples/official-storybook/components/FlowTypeButton.js deleted file mode 100644 index 827e01b2870f..000000000000 --- a/examples/official-storybook/components/FlowTypeButton.js +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-disable react/require-default-props, react/no-unused-prop-types */ -// @flow -import React from 'react'; - -const Message = {}; - -interface PropsType { - /** A multi-type prop to be rendered in the button */ - label: string; - /** Function to be called when the button is clicked */ - onClick?: Function; - /** Boolean representing whether the button is disabled */ - disabled?: boolean; - /** A plain object */ - obj?: Record; - /** A complex Object with nested types */ - shape: { - id: number, - func?: Function, - arr?: { - index: number, - }[], - shape?: { - shape?: { - foo?: string, - }, - }, - }; - /** An array of numbers */ - arrayOf?: number[]; - /** A custom type */ - msg?: typeof Message; - /** `oneOf` as Enum */ - enm?: 'News' | 'Photos'; - /** `oneOf` A multi-type prop of string or custom Message */ - union?: string | typeof Message; -} - -/** FlowTypeButton component description imported from comments inside the component file */ -const FlowTypeButton = ({ label, onClick, disabled }: PropsType) => ( - -); - -FlowTypeButton.defaultProps = { - disabled: false, - onClick: () => {}, -}; - -export default FlowTypeButton; diff --git a/examples/official-storybook/components/ForwardRefButton.js b/examples/official-storybook/components/ForwardRefButton.js deleted file mode 100644 index 67e704dd8c26..000000000000 --- a/examples/official-storybook/components/ForwardRefButton.js +++ /dev/null @@ -1,47 +0,0 @@ -import React, { forwardRef } from 'react'; -import PropTypes from 'prop-types'; -import BaseButton from './BaseButton'; - -const ForwardRefButtonRender = ({ label, ...props }, ref) => ( - -); - -ForwardRefButtonRender.propTypes = { - /** Boolean indicating whether the button should render as disabled */ - disabled: PropTypes.bool, - /** button label. */ - label: PropTypes.string.isRequired, - /** onClick handler */ - onClick: PropTypes.func, - /** Custom styles */ - style: PropTypes.shape({}), -}; - -ForwardRefButtonRender.defaultProps = { - disabled: false, - onClick: () => {}, - style: {}, -}; - -export const ForwardRefButtonInnerPropTypes = forwardRef(ForwardRefButtonRender); - -export const ForwardRefButtonOuterPropTypes = forwardRef(({ label, ...props }, ref) => ( - -)); - -ForwardRefButtonOuterPropTypes.defaultProps = { - disabled: false, - onClick: () => {}, - style: {}, -}; - -ForwardRefButtonOuterPropTypes.propTypes = { - /** Boolean indicating whether the button should render as disabled */ - disabled: PropTypes.bool, - /** button label. */ - label: PropTypes.string.isRequired, - /** onClick handler */ - onClick: PropTypes.func, - /** Custom styles */ - style: PropTypes.shape({}), -}; diff --git a/examples/official-storybook/components/ImportedPropsButton.js b/examples/official-storybook/components/ImportedPropsButton.js deleted file mode 100644 index b8a1e7e88cd6..000000000000 --- a/examples/official-storybook/components/ImportedPropsButton.js +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import { DocgenButton } from './DocgenButton'; - -/** Button component description */ -const ImportedPropsButton = ({ disabled, label, onClick }) => ( - -); - -ImportedPropsButton.defaultProps = DocgenButton.defaultProps; - -ImportedPropsButton.propTypes = DocgenButton.propTypes; - -export default ImportedPropsButton; diff --git a/examples/official-storybook/components/MemoButton.js b/examples/official-storybook/components/MemoButton.js deleted file mode 100644 index 8e8dc72a7d33..000000000000 --- a/examples/official-storybook/components/MemoButton.js +++ /dev/null @@ -1,5 +0,0 @@ -import React from 'react'; - -import BaseButton from './BaseButton'; - -export const MemoButton = React.memo(BaseButton); diff --git a/examples/official-storybook/components/NamedExportButton.js b/examples/official-storybook/components/NamedExportButton.js deleted file mode 100644 index 8a0491c24b77..000000000000 --- a/examples/official-storybook/components/NamedExportButton.js +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import BaseButton from './BaseButton'; - -const NamedExportButton = (props) => ; - -NamedExportButton.defaultProps = { - disabled: false, - onClick: () => {}, - style: {}, -}; - -NamedExportButton.propTypes = { - /** Boolean indicating whether the button should render as disabled */ - disabled: PropTypes.bool, - /** button label. */ - label: PropTypes.string.isRequired, - /** onClick handler */ - onClick: PropTypes.func, - /** Custom styles */ - style: PropTypes.shape({}), -}; - -export { NamedExportButton }; diff --git a/examples/official-storybook/components/OptionalButton.tsx b/examples/official-storybook/components/OptionalButton.tsx deleted file mode 100644 index dc10a20c4937..000000000000 --- a/examples/official-storybook/components/OptionalButton.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -// Repro #11019 -interface Props { - kind?: 'a' | 'b'; - disabled?: boolean; -} - -export const OptionalButton = ({ disabled = false, kind = 'a' }: Props) => ( - // eslint-disable-next-line react/button-has-type - -); - -export default OptionalButton; diff --git a/examples/official-storybook/components/TableComponent.js b/examples/official-storybook/components/TableComponent.js deleted file mode 100644 index 0a738c793be3..000000000000 --- a/examples/official-storybook/components/TableComponent.js +++ /dev/null @@ -1,52 +0,0 @@ -/* eslint-disable react/forbid-prop-types */ -import React from 'react'; -import PropTypes from 'prop-types'; - -const Red = (props) => ; -const TableComponent = ({ propDefinitions }) => { - const props = propDefinitions.map( - ({ property, propType, required, description, defaultValue }) => ( - - - {property} - {required ? * : null} - - {propType.name} - {JSON.stringify(defaultValue)} - {description} - - ) - ); - - return ( - - - - - - - - - - {props} -
    nametypedefaultdescription
    - ); -}; - -TableComponent.defaultProps = { - propDefinitions: [], -}; - -TableComponent.propTypes = { - propDefinitions: PropTypes.arrayOf( - PropTypes.shape({ - property: PropTypes.string.isRequired, - propType: PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired, - required: PropTypes.bool.isRequired, - description: PropTypes.string, - defaultValue: PropTypes.any, - }) - ), -}; - -export default TableComponent; diff --git a/examples/official-storybook/components/TsButton.tsx b/examples/official-storybook/components/TsButton.tsx deleted file mode 100644 index 0d3f77ead09b..000000000000 --- a/examples/official-storybook/components/TsButton.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React, { FunctionComponent } from 'react'; - -export type Type = 'default' | 'action'; - -interface Props { - /** - * Click event handler - * @default null - */ - onClick?: () => void; - - /** - * Button type yo - */ - type?: Type; -} - -const Button: FunctionComponent = ({ children, type = 'default', onClick }) => { - return ( - - ); -}; - -export default Button; diff --git a/examples/official-storybook/components/addon-a11y/Button.js b/examples/official-storybook/components/addon-a11y/Button.js deleted file mode 100644 index 293f6ca97303..000000000000 --- a/examples/official-storybook/components/addon-a11y/Button.js +++ /dev/null @@ -1,48 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -const styles = { - button: { - padding: '12px 6px', - fontSize: '12px', - lineHeight: '16px', - borderRadius: '5px', - }, - ok: { - backgroundColor: '#028402', - color: '#ffffff', - }, - wrong: { - color: '#ffffff', - backgroundColor: '#4caf50', - }, -}; - -function Button({ content, disabled, contrast }) { - return ( - - ); -} - -Button.propTypes = { - content: PropTypes.string, - disabled: PropTypes.bool, - contrast: PropTypes.oneOf(['ok', 'wrong']), -}; - -Button.defaultProps = { - content: 'null', - disabled: false, - contrast: 'ok', -}; - -export default Button; diff --git a/examples/official-storybook/components/addon-a11y/Form/Input.js b/examples/official-storybook/components/addon-a11y/Form/Input.js deleted file mode 100644 index f5fca29664d8..000000000000 --- a/examples/official-storybook/components/addon-a11y/Form/Input.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -function Input({ id, value, type, placeholder }) { - return ; -} - -Input.propTypes = { - type: PropTypes.oneOf(['text', 'password']), - id: PropTypes.string, - value: PropTypes.string, - placeholder: PropTypes.string, -}; - -Input.defaultProps = { - type: null, - id: null, - value: null, - placeholder: null, -}; - -export default Input; diff --git a/examples/official-storybook/components/addon-a11y/Form/Label.js b/examples/official-storybook/components/addon-a11y/Form/Label.js deleted file mode 100644 index 5f3799a6ac6c..000000000000 --- a/examples/official-storybook/components/addon-a11y/Form/Label.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -const styles = { - label: { - padding: '0 6px', - }, -}; - -function Label({ id, content }) { - return ( - - ); -} - -Label.propTypes = { - content: PropTypes.string.isRequired, - id: PropTypes.string.isRequired, -}; - -export default Label; diff --git a/examples/official-storybook/components/addon-a11y/Form/Row.js b/examples/official-storybook/components/addon-a11y/Form/Row.js deleted file mode 100644 index 51f87b040529..000000000000 --- a/examples/official-storybook/components/addon-a11y/Form/Row.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -import Label from './Label'; -import Input from './Input'; - -function Row({ label, input }) { - return ( -
    - {label} - {input} -
    - ); -} - -Row.propTypes = { - label: PropTypes.shape({ type: PropTypes.oneOf([Label]) }), - input: PropTypes.shape({ type: PropTypes.oneOf([Input]) }).isRequired, -}; - -Row.defaultProps = { - label: null, -}; - -export default Row; diff --git a/examples/official-storybook/components/addon-a11y/Form/index.js b/examples/official-storybook/components/addon-a11y/Form/index.js deleted file mode 100644 index c893c0a55dd6..000000000000 --- a/examples/official-storybook/components/addon-a11y/Form/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import Input from './Input'; -import Label from './Label'; -import Row from './Row'; - -export { Input, Label, Row }; diff --git a/examples/official-storybook/components/addon-measure/ShadowRoot.js b/examples/official-storybook/components/addon-measure/ShadowRoot.js deleted file mode 100644 index d0587b88d307..000000000000 --- a/examples/official-storybook/components/addon-measure/ShadowRoot.js +++ /dev/null @@ -1,65 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { drawSelectedElement } from '@storybook/addon-measure/dist/esm/box-model/visualizer'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { init, destroy } from '@storybook/addon-measure/dist/esm/box-model/canvas'; - -export const ShadowRoot = ({ label = 'Hello from shadow DOM', drawMode = 'ROOT' }) => { - const ref = React.useRef(); - - React.useEffect(() => { - if (!ref.current.attachShadow) return; - - ref.current.attachShadow({ mode: 'open' }); - - ref.current.shadowRoot.innerHTML = ` - - - `; - - init(); - drawSelectedElement(drawMode === 'ROOT' ? ref.current : ref.current.shadowRoot.children[1]); - - // eslint-disable-next-line consistent-return - return () => { - destroy(); - }; - }, []); - - return
    ; -}; - -ShadowRoot.propTypes = { - label: PropTypes.string, - drawMode: PropTypes.oneOf(['ROOT', 'NESTED']), -}; - -ShadowRoot.defaultProps = { - label: 'Hello from shadow DOM', - drawMode: 'ROOT', -}; diff --git a/examples/official-storybook/components/addon-measure/Visualization.js b/examples/official-storybook/components/addon-measure/Visualization.js deleted file mode 100644 index 6ae319f75f69..000000000000 --- a/examples/official-storybook/components/addon-measure/Visualization.js +++ /dev/null @@ -1,36 +0,0 @@ -import React, { useEffect, useRef } from 'react'; -import PropTypes from 'prop-types'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { drawSelectedElement } from '@storybook/addon-measure/dist/esm/box-model/visualizer'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { init, destroy } from '@storybook/addon-measure/dist/esm/box-model/canvas'; - -export const Visualization = ({ render }) => { - const element = useRef(null); - - useEffect(() => { - if (element.current) { - init(); - drawSelectedElement(element.current); - } - - return () => { - destroy(); - }; - }, [element]); - - return ( -
    - {render(element)} -
    - ); -}; - -Visualization.propTypes = { - render: PropTypes.func.isRequired, -}; diff --git a/examples/official-storybook/head-warning.js b/examples/official-storybook/head-warning.js deleted file mode 100644 index 3020333992e0..000000000000 --- a/examples/official-storybook/head-warning.js +++ /dev/null @@ -1,16 +0,0 @@ -import global from 'global'; - -const { document } = global; - -// HMR will cause this code to be invoked multiple times, so each warning should have a unique ID -export default function addHeadWarning(id, text) { - if (!document.getElementById(id)) { - const warning = document.createElement('h1'); - warning.textContent = text; - warning.id = id; - warning.style.backgroundColor = 'tomato'; - warning.style.padding = '10px'; - - document.body.insertBefore(warning, document.body.firstChild); - } -} diff --git a/examples/official-storybook/intro.stories.mdx b/examples/official-storybook/intro.stories.mdx deleted file mode 100644 index b192db9fded5..000000000000 --- a/examples/official-storybook/intro.stories.mdx +++ /dev/null @@ -1,5 +0,0 @@ - - -# Official-storybook - -Welcome to `official-storybook`, a collection of test cases and demos for `@storybook/react` and all its addons. diff --git a/examples/official-storybook/main.ts b/examples/official-storybook/main.ts deleted file mode 100644 index 4fe03c75fb8a..000000000000 --- a/examples/official-storybook/main.ts +++ /dev/null @@ -1,56 +0,0 @@ -/// - -import type { StorybookConfig } from '@storybook/react/types'; - -const config: StorybookConfig = { - stories: [ - { - directory: './stories/title', - titlePrefix: 'Custom Prefix', - }, - // FIXME: Breaks e2e tests './intro.stories.mdx', - '../../lib/ui/src/**/*.stories.@(js|tsx|mdx)', - '../../lib/components/src/**/*.stories.@(js|tsx|mdx)', - './stories/**/*.stories.@(js|ts|tsx|mdx)', - './../../addons/docs/**/*.stories.tsx', - './../../addons/interactions/**/*.stories.(tsx|mdx)', - ], - reactOptions: { - fastRefresh: true, - strictMode: true, - }, - addons: [ - { - name: '@storybook/addon-docs', - options: { - transcludeMarkdown: true, - // needed if you use addon-docs in conjunction - // with addon-storysource - sourceLoaderOptions: null, - }, - }, - '@storybook/addon-essentials', - '@storybook/addon-interactions', - '@storybook/addon-storysource', - '@storybook/addon-links', - '@storybook/addon-jest', - '@storybook/addon-a11y', - ], - core: { - builder: 'webpack4', - channelOptions: { allowFunction: false, maxDepth: 10 }, - disableTelemetry: true, - }, - logLevel: 'debug', - features: { - modernInlineRender: true, - interactionsDebugger: true, - }, - staticDirs: [ - './statics/public', - { from: './statics/examples/example1', to: '/example1' }, - { from: './statics/examples/example2', to: '/example2' }, - ], -}; - -module.exports = config; diff --git a/examples/official-storybook/manager-head.html b/examples/official-storybook/manager-head.html deleted file mode 100644 index 7d058f58633b..000000000000 --- a/examples/official-storybook/manager-head.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/examples/official-storybook/manager.js b/examples/official-storybook/manager.js deleted file mode 100644 index 642d6e7bfb23..000000000000 --- a/examples/official-storybook/manager.js +++ /dev/null @@ -1,68 +0,0 @@ -import React from 'react'; -import { addons } from '@storybook/addons'; -import { themes, styled } from '@storybook/theming'; -import { Icons } from '@storybook/components'; - -import addHeadWarning from './head-warning'; - -addHeadWarning('manager-head-not-loaded', 'Manager head not loaded'); - -const PrefixIcon = styled(Icons)(({ theme }) => ({ - marginRight: 8, - fontSize: 'inherit', - height: '1em', - width: '1em', - display: 'inline', - alignSelf: 'center', -})); - -addons.setConfig({ - theme: themes.light, // { base: 'dark', brandTitle: 'Storybook!' }, - previewTabs: { - canvas: null, - 'storybook/docs/panel': null, - 'storybookjs/notes/panel': { title: 'Annotations', hidden: true }, - graphiql: { - hidden: true, - }, - toolbar: { - title: { hidden: false }, - zoom: { hidden: false }, - eject: { hidden: false }, - copy: { hidden: false }, - fullscreen: { hidden: false }, - }, - }, - sidebar: { - collapsedRoots: ['other'], - renderLabel: ({ id, name }) => { - const map = { - addons: ( - <> - - {name} - - ), - 'addons-a11y': ( - <> - - {name} - - ), - 'addons-a11y-basebutton': ( - <> - - {name} - - ), - 'addons-a11y-basebutton--default': ( - <> - - {name} - - ), - }; - return map[id]; - }, - }, -}); diff --git a/examples/official-storybook/package.json b/examples/official-storybook/package.json deleted file mode 100644 index 35f2cb44eb4d..000000000000 --- a/examples/official-storybook/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "official-storybook", - "version": "6.5.0-rc.1", - "private": true, - "scripts": { - "build-storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true build-storybook -c ./", - "debug": "cross-env NODE_OPTIONS=--inspect-brk STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./", - "do-storyshots-puppeteer": "../../node_modules/.bin/jest --projects=./storyshots-puppeteer", - "generate-addon-jest-testresults": "jest --config=tests/addon-jest.config.json --json --outputFile=stories/addon-jest.testresults.json", - "storybook": "cross-env STORYBOOK_DISPLAY_WARNING=true DISPLAY_WARNING=true start-storybook -p 9011 -c ./ --no-manager-cache", - "storyshots-puppeteer": "yarn run build-storybook && yarn run do-storyshots-puppeteer" - }, - "devDependencies": { - "@emotion/jest": "^11.8.0", - "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", - "@storybook/addon-a11y": "6.5.0-rc.1", - "@storybook/addon-actions": "6.5.0-rc.1", - "@storybook/addon-backgrounds": "6.5.0-rc.1", - "@storybook/addon-controls": "6.5.0-rc.1", - "@storybook/addon-docs": "6.5.0-rc.1", - "@storybook/addon-interactions": "6.5.0-rc.1", - "@storybook/addon-jest": "6.5.0-rc.1", - "@storybook/addon-links": "6.5.0-rc.1", - "@storybook/addon-storyshots": "6.5.0-rc.1", - "@storybook/addon-storyshots-puppeteer": "6.5.0-rc.1", - "@storybook/addon-storysource": "6.5.0-rc.1", - "@storybook/addon-toolbars": "6.5.0-rc.1", - "@storybook/addon-viewport": "6.5.0-rc.1", - "@storybook/addons": "6.5.0-rc.1", - "@storybook/cli": "6.5.0-rc.1", - "@storybook/components": "6.5.0-rc.1", - "@storybook/core-events": "6.5.0-rc.1", - "@storybook/design-system": "^5.4.7", - "@storybook/jest": "^0.0.5", - "@storybook/node-logger": "6.5.0-rc.1", - "@storybook/react": "6.5.0-rc.1", - "@storybook/router": "6.5.0-rc.1", - "@storybook/source-loader": "6.5.0-rc.1", - "@storybook/testing-library": "0.0.14-next.0", - "@storybook/theming": "6.5.0-rc.1", - "@testing-library/dom": "^7.31.2", - "@testing-library/user-event": "^13.1.9", - "chromatic": "^6.0.2", - "cors": "^2.8.5", - "cross-env": "^7.0.3", - "enzyme-to-json": "^3.6.1", - "eventemitter3": "^4.0.7", - "express": "^4.17.1", - "format-json": "^1.0.3", - "global": "^4.4.0", - "lodash": "^4.17.21", - "paths.macro": "^3.0.1", - "prop-types": "^15.7.2", - "react": "16.14.0", - "react-dom": "16.14.0", - "terser-webpack-plugin": "^5.0.3", - "uuid-browser": "^3.1.0", - "webpack": "4" - }, - "peerDependencies": { - "puppeteer": "^2.0.0 || ^3.0.0" - }, - "storybook": { - "chromatic": { - "projectToken": "ab7m45tp9p" - } - } -} diff --git a/examples/official-storybook/preview-head.html b/examples/official-storybook/preview-head.html deleted file mode 100644 index 832d1d793982..000000000000 --- a/examples/official-storybook/preview-head.html +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/examples/official-storybook/preview.js b/examples/official-storybook/preview.js deleted file mode 100644 index 638d31b1af82..000000000000 --- a/examples/official-storybook/preview.js +++ /dev/null @@ -1,248 +0,0 @@ -import global from 'global'; -import React, { Fragment, useEffect } from 'react'; -import isChromatic from 'chromatic/isChromatic'; -import { - Global, - ThemeProvider, - themes, - createReset, - convert, - styled, - useTheme, -} from '@storybook/theming'; -import { Symbols } from '@storybook/components'; - -import addHeadWarning from './head-warning'; - -const { document } = global; - -if (process.env.NODE_ENV === 'development') { - if (!process.env.DOTENV_DEVELOPMENT_DISPLAY_WARNING) { - addHeadWarning('dotenv-env', 'Dotenv development file not loaded'); - } - - if (!process.env.STORYBOOK_DISPLAY_WARNING) { - addHeadWarning('env-glob', 'Global storybook env var not loaded'); - } - - if (process.env.DISPLAY_WARNING) { - addHeadWarning('env-extra', 'Global non-storybook env var loaded'); - } -} - -addHeadWarning('preview-head-not-loaded', 'Preview head not loaded'); -addHeadWarning('dotenv-file-not-loaded', 'Dotenv file not loaded'); - -const ThemeBlock = styled.div( - { - position: 'absolute', - top: 0, - left: 0, - right: '50vw', - width: '50vw', - height: '100vh', - bottom: 0, - overflow: 'auto', - padding: 10, - }, - ({ theme }) => ({ - background: theme.background.app, - color: theme.color.defaultText, - }), - ({ side }) => - side === 'left' - ? { - left: 0, - right: '50vw', - } - : { - right: 0, - left: '50vw', - } -); - -const ThemeStack = styled.div( - { - position: 'relative', - minHeight: 'calc(50vh - 15px)', - }, - ({ theme }) => ({ - background: theme.background.app, - color: theme.color.defaultText, - }) -); - -const ThemedSetRoot = () => { - const theme = useTheme(); - - useEffect(() => { - document.body.style.background = theme.background.app; - document.body.style.color = theme.defaultText; - return () => { - // - }; - }); - - return null; -}; - -export const decorators = [ - (StoryFn, { globals, parameters }) => { - const theme = globals.theme || parameters.theme || (isChromatic() ? 'stacked' : 'light'); - - switch (theme) { - case 'side-by-side': { - return ( - - - - - - - - - - - - - - - - - ); - } - case 'stacked': { - return ( - - - - - - - - - - - - - - - - - ); - } - default: { - return ( - - - - - - - ); - } - } - }, -]; - -export const parameters = { - exportedParameter: 'exportedParameter', - a11y: { - config: {}, - options: { - checks: { 'color-contrast': { options: { noScroll: true } } }, - restoreScroll: true, - }, - }, - actions: { argTypesRegex: '^on.*' }, - options: { - storySort: (a, b) => - a[1].kind === b[1].kind ? 0 : a[1].id.localeCompare(b[1].id, undefined, { numeric: true }), - }, - docs: { - theme: themes.light, - }, - controls: { - presetColors: [ - { color: '#ff4785', title: 'Coral' }, - { color: '#1EA7FD', title: 'Ocean' }, - { color: 'rgb(252, 82, 31)', title: 'Orange' }, - { color: 'RGBA(255, 174, 0, 0.5)', title: 'Gold' }, - { color: 'hsl(101, 52%, 49%)', title: 'Green' }, - { color: 'HSLA(179,65%,53%,0.5)', title: 'Seafoam' }, - { color: '#6F2CAC', title: 'Purple' }, - { color: '#2A0481', title: 'Ultraviolet' }, - { color: 'black' }, - { color: '#333', title: 'Darkest' }, - { color: '#444', title: 'Darker' }, - { color: '#666', title: 'Dark' }, - { color: '#999', title: 'Mediumdark' }, - { color: '#ddd', title: 'Medium' }, - { color: '#EEE', title: 'Mediumlight' }, - { color: '#F3F3F3', title: 'Light' }, - { color: '#F8F8F8', title: 'Lighter' }, - { color: '#FFFFFF', title: 'Lightest' }, - '#fe4a49', - '#FED766', - 'rgba(0, 159, 183, 1)', - 'HSLA(240,11%,91%,0.5)', - 'slategray', - ], - }, -}; - -export const globals = { - foo: 'fooValue', -}; - -export const globalTypes = { - foo: { defaultValue: 'fooDefaultValue' }, - bar: { defaultValue: 'barDefaultValue' }, - theme: { - name: 'Theme', - description: 'Global theme for components', - toolbar: { - icon: 'circlehollow', - title: 'Theme', - items: [ - { value: 'light', icon: 'circlehollow', title: 'light' }, - { value: 'dark', icon: 'circle', title: 'dark' }, - { value: 'side-by-side', icon: 'sidebar', title: 'side by side' }, - { value: 'stacked', icon: 'bottombar', title: 'stacked' }, - ], - }, - }, - locale: { - name: 'Locale', - description: 'Internationalization locale', - toolbar: { - icon: 'globe', - shortcuts: { - next: { - label: 'Go to next language', - keys: ['L'], - }, - previous: { - label: 'Go to previous language', - keys: ['K'], - }, - reset: { - label: 'Reset language', - keys: ['meta', 'shift', 'L'], - }, - }, - items: [ - { title: 'Reset locale', type: 'reset' }, - { value: 'en', right: '🇺🇸', title: 'English' }, - { value: 'es', right: '🇪🇸', title: 'Español' }, - { value: 'zh', right: '🇨🇳', title: '中文' }, - { value: 'kr', right: '🇰🇷', title: '한국어' }, - ], - }, - }, -}; - -export const loaders = [async () => ({ globalValue: 1 })]; - -export const argTypes = { color: { control: 'color' } }; -export const args = { color: 'red' }; diff --git a/examples/official-storybook/statics/examples/example1/example1.txt b/examples/official-storybook/statics/examples/example1/example1.txt deleted file mode 100644 index b01a2ca4d50e..000000000000 --- a/examples/official-storybook/statics/examples/example1/example1.txt +++ /dev/null @@ -1 +0,0 @@ -example1! \ No newline at end of file diff --git a/examples/official-storybook/statics/examples/example2/example2.txt b/examples/official-storybook/statics/examples/example2/example2.txt deleted file mode 100644 index 760014c6d2fb..000000000000 --- a/examples/official-storybook/statics/examples/example2/example2.txt +++ /dev/null @@ -1 +0,0 @@ -example2! \ No newline at end of file diff --git a/examples/official-storybook/statics/public/public.txt b/examples/official-storybook/statics/public/public.txt deleted file mode 100644 index e043990393f4..000000000000 --- a/examples/official-storybook/statics/public/public.txt +++ /dev/null @@ -1 +0,0 @@ -public! \ No newline at end of file diff --git a/examples/official-storybook/stories/addon-a11y/base-button.stories.js b/examples/official-storybook/stories/addon-a11y/base-button.stories.js deleted file mode 100644 index 94d91b5b9ed5..000000000000 --- a/examples/official-storybook/stories/addon-a11y/base-button.stories.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import BaseButton from '../../components/BaseButton'; -import DelayedRender from '../../components/DelayedRender'; - -const text = 'Testing the a11y addon'; - -export default { - title: 'Addons/A11y/BaseButton', - component: BaseButton, - parameters: { - options: { selectedPanel: 'storybook/a11y/panel' }, - }, -}; - -export const Default = () => ; -export const Label = () => ; -export const Disabled = () => ; - -export const InvalidContrast = () => ( - // FIXME: has no effect on score - -); -InvalidContrast.storyName = 'Invalid contrast'; - -export const DelayedRenderStory = () => ( - - - -); -DelayedRenderStory.storyName = 'delayed render'; diff --git a/examples/official-storybook/stories/addon-a11y/button.stories.js b/examples/official-storybook/stories/addon-a11y/button.stories.js deleted file mode 100644 index ba4521b71929..000000000000 --- a/examples/official-storybook/stories/addon-a11y/button.stories.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import Button from '../../components/addon-a11y/Button'; - -const text = 'Testing the a11y addon'; - -export default { - title: 'Addons/A11y/Button', - component: Button, - parameters: { - options: { selectedPanel: 'storybook/a11y/panel' }, - }, -}; - -export const Default = () => -); - -ArgTypesExample.argTypes = { - onClick: { action: 'clicked!' }, - onFocus: { action: true }, -}; - -export const ArgTypesRegexExample = (args, context) => { - const { someFunction, onClick, onFocus } = args; - return ( - - ); -}; - -ArgTypesRegexExample.parameters = { actions: { argTypesRegex: '^on.*' } }; -ArgTypesRegexExample.argTypes = { someFunction: {}, onClick: {}, onFocus: {} }; - -export const BasicExample = () => ; - -BasicExample.storyName = 'Basic example'; - -export const MultipleActions = () => ( - -); - -MultipleActions.storyName = 'Multiple actions'; - -export const MultipleActionsConfig = () => ( - -); - -MultipleActionsConfig.storyName = 'Multiple actions + config'; - -export const MultipleActionsAsObject = () => ( - -); - -MultipleActionsAsObject.storyName = 'Multiple actions as object'; - -export const MultipleActionsObjectConfig = () => ( - -); - -MultipleActionsObjectConfig.storyName = 'Multiple actions, object + config'; - -export const CircularPayload = () => { - const circular = { foo: {} }; - circular.foo.circular = circular; - return ; -}; - -export const ReservedKeywordAsName = () => ; - -ReservedKeywordAsName.storyName = 'Reserved keyword as name'; - -export const AllTypes = () => { - function A() {} - function B() {} - - const bound = B.bind({}); - - let file; - try { - file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() }); - } catch (error) { - file = error; - } - const reg = /fooBar/g; - - return ( - - - - - - - - - - - - - - - - - - - - - - - ); -}; - -AllTypes.storyName = 'All types'; - -export const ConfigureActionsDepth = () => { - configureActions({ - depth: 2, - }); - - return ( - - ); -}; - -export const PersistingTheActionLogger = () => ( - -

    Moving away from this story will persist the action logger

    - -
    -); - -PersistingTheActionLogger.storyName = 'Persisting the action logger'; - -export const LimitActionOutput = () => { - configureActions({ - limit: 2, - }); - - return ( - - - - - ); -}; - -export const SkippedViaDisableTrue = () => ( - -); - -SkippedViaDisableTrue.storyName = 'skipped via disable:true'; - -SkippedViaDisableTrue.parameters = { - actions: { disable: true }, -}; diff --git a/examples/official-storybook/stories/addon-backgrounds.stories.js b/examples/official-storybook/stories/addon-backgrounds.stories.js deleted file mode 100644 index 3ad15dc5a00b..000000000000 --- a/examples/official-storybook/stories/addon-backgrounds.stories.js +++ /dev/null @@ -1,117 +0,0 @@ -import React from 'react'; - -import BaseButton from '../components/BaseButton'; - -export default { - title: 'Addons/Backgrounds', - parameters: { - backgrounds: { - default: 'dark', - values: [ - { name: 'white', value: '#ffffff' }, - { name: 'light', value: '#eeeeee' }, - { name: 'gray', value: '#cccccc' }, - { name: 'dark', value: '#222222' }, - { name: 'black', value: '#000000' }, - ], - }, - }, -}; - -const Template = (args) => ; - -export const Story1 = Template.bind({}); -Story1.args = { - label: 'You should be able to switch backgrounds for this story', -}; - -export const Story2 = Template.bind({}); -Story2.args = { - label: 'This one too!', -}; - -export const Overridden = Template.bind({}); -Overridden.args = { - label: 'This one should have different backgrounds', -}; -Overridden.parameters = { - backgrounds: { - default: 'blue', - values: [ - { name: 'pink', value: 'hotpink' }, - { name: 'blue', value: 'deepskyblue' }, - ], - }, -}; - -export const WithGradient = Template.bind({}); -WithGradient.args = { - label: 'This one should have a nice gradient', -}; -WithGradient.parameters = { - backgrounds: { - default: 'gradient', - values: [ - { - name: 'gradient', - value: - 'linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)', - }, - ], - }, -}; - -export const WithImage = Template.bind({}); -WithImage.args = { - label: 'This one should have an image background', -}; -WithImage.parameters = { - backgrounds: { - default: 'space', - values: [ - { - name: 'space', - value: 'url(https://cdn.pixabay.com/photo/2017/08/30/01/05/milky-way-2695569_960_720.jpg)', - }, - ], - }, -}; - -export const DisabledBackgrounds = Template.bind({}); -DisabledBackgrounds.args = { - label: 'This one should not use backgrounds', -}; -DisabledBackgrounds.parameters = { - backgrounds: { disable: true }, -}; - -export const DisabledGrid = Template.bind({}); -DisabledGrid.args = { - label: 'This one should not use grid', -}; -DisabledGrid.parameters = { - backgrounds: { - grid: { disable: true }, - }, -}; -export const GridCellProperties = Template.bind({}); -GridCellProperties.args = { - label: 'This one should have different grid properties', -}; -GridCellProperties.parameters = { - backgrounds: { - grid: { - cellSize: 10, - cellAmount: 4, - opacity: 0.2, - }, - }, -}; - -export const AlignedGridWhenFullScreen = Template.bind({}); -AlignedGridWhenFullScreen.args = { - label: 'Grid should have an offset of 0 when in fullscreen', -}; -AlignedGridWhenFullScreen.parameters = { - layout: 'fullscreen', -}; diff --git a/examples/official-storybook/stories/addon-controls.stories.tsx b/examples/official-storybook/stories/addon-controls.stories.tsx deleted file mode 100644 index 94f29aa214ad..000000000000 --- a/examples/official-storybook/stories/addon-controls.stories.tsx +++ /dev/null @@ -1,207 +0,0 @@ -import React from 'react'; -import Button from '../components/TsButton'; - -export default { - title: 'Addons/Controls', - component: Button, - argTypes: { - children: { control: 'text', name: 'Children', mapping: { basic: 'BASIC' } }, - type: { name: 'Type', control: { type: 'text', maxLength: 32 } }, - json: { control: 'object', name: 'JSON' }, - imageUrls: { control: { type: 'file', accept: '.png' }, name: 'Image Urls' }, - label: { - name: 'Label', - options: ['Plain', 'Bold'], - control: { type: 'select', labels: { Bold: 'BOLD' } }, - mapping: { Bold: Bold }, - }, - background: { - name: 'Background color', - control: { - type: 'color', - presetColors: [ - '#fe4a49', - '#FED766', - 'rgba(0, 159, 183, 1)', - 'HSLA(240,11%,91%,0.5)', - 'slategray', - ], - }, - }, - mutuallyExclusiveA: { control: 'text', if: { arg: 'mutuallyExclusiveB', truthy: false } }, - mutuallyExclusiveB: { control: 'text', if: { arg: 'mutuallyExclusiveA', truthy: false } }, - colorMode: { - control: 'boolean', - }, - dynamicText: { - if: { arg: 'colorMode', truthy: false }, - control: 'text', - }, - dynamicColor: { - if: { arg: 'colorMode' }, - control: 'color', - }, - advanced: { - control: 'boolean', - }, - margin: { - control: 'number', - if: { arg: 'advanced' }, - }, - padding: { - control: 'number', - if: { arg: 'advanced' }, - }, - cornerRadius: { - control: 'number', - if: { arg: 'advanced' }, - }, - someText: { control: 'text' }, - subText: { control: 'text', if: { arg: 'someText' } }, - ifThemeExists: { control: 'text', if: { global: 'theme' } }, - ifThemeNotExists: { control: 'text', if: { global: 'theme', exists: false } }, - ifLightTheme: { control: 'text', if: { global: 'theme', eq: 'light' } }, - ifNotLightTheme: { control: 'text', if: { global: 'theme', neq: 'light' } }, - }, - parameters: { - chromatic: { disable: true }, - }, -}; - -const DEFAULT_NESTED_OBJECT = { a: 4, b: { c: 'hello', d: [1, 2, 3] } }; - -const Template = (args) => ( -
    - - {args.json &&
    {JSON.stringify(args.json, null, 2)}
    } -
    -); - -export const Basic = Template.bind({}); -Basic.args = { - children: 'basic', - json: DEFAULT_NESTED_OBJECT, -}; -Basic.parameters = { - chromatic: { disable: false }, - docs: { source: { state: 'open' } }, -}; - -export const Action = Template.bind({}); -Action.args = { - children: 'hmmm', - type: 'action', - json: null, -}; - -export const ImageFileControl = (args) => Your Example Story; -ImageFileControl.args = { - imageUrls: ['http://place-hold.it/350x150'], -}; - -export const CustomControls = Template.bind({}); -CustomControls.args = { - children: 'hmmm', - type: 'action', - json: DEFAULT_NESTED_OBJECT, -}; - -CustomControls.argTypes = { - children: { table: { disable: true } }, - type: { control: { disable: true } }, -}; - -export const NoArgs = () => ; - -const hasCycle: any = {}; -hasCycle.cycle = hasCycle; - -export const CyclicArgs = Template.bind({}); -// No warnings in tests -if (process.env.NODE_ENV !== 'test') { - CyclicArgs.args = { - hasCycle, - }; -} -CyclicArgs.parameters = { - docs: { disable: true }, - chromatic: { disable: true }, - storyshots: { disable: true }, -}; - -export const CustomControlMatchers = Template.bind({}); -CustomControlMatchers.parameters = { - controls: { - matchers: { - date: /whateverIwant/, - }, - }, - docs: { source: { state: 'open' } }, -}; -CustomControlMatchers.args = { - whateverIwant: '10/10/2020', -}; - -export const WithDisabledCustomControlMatchers = Template.bind({}); -WithDisabledCustomControlMatchers.parameters = { - controls: { - matchers: { - date: null, - color: null, - }, - }, -}; -WithDisabledCustomControlMatchers.args = { - purchaseDate: '10/10/2020', - backgroundColor: '#BADA55', -}; - -export const FilteredWithInclude = Template.bind({}); -FilteredWithInclude.parameters = { - controls: { - include: ['Children'], - }, -}; - -export const FilteredWithIncludeRegex = Template.bind({}); -FilteredWithIncludeRegex.args = { - helloWorld: 1, - helloPlanet: 1, - byeWorld: 1, -}; -FilteredWithIncludeRegex.parameters = { - controls: { - include: /hello*/, - }, -}; - -export const FilteredWithExclude = Template.bind({}); -FilteredWithExclude.args = { - helloWorld: 1, - helloPlanet: 1, - byeWorld: 1, -}; -FilteredWithExclude.parameters = { - controls: { - exclude: ['helloPlanet', 'helloWorld'], - }, -}; - -export const FilteredWithExcludeRegex = Template.bind({}); -FilteredWithExcludeRegex.args = { - helloWorld: 1, - helloPlanet: 1, - byeWorld: 1, -}; -FilteredWithExcludeRegex.parameters = { - controls: { - exclude: /hello*/, - }, -}; - -// https://github.com/storybookjs/storybook/issues/14752 -export const MissingRadioOptions = Template.bind({}); -MissingRadioOptions.argTypes = { invalidRadio: { control: 'radio' } }; -MissingRadioOptions.args = { invalidRadio: 'someValue' }; diff --git a/examples/official-storybook/stories/addon-docs/addon-docs-blocks.stories.js b/examples/official-storybook/stories/addon-docs/addon-docs-blocks.stories.js deleted file mode 100644 index 6a10bf8cc232..000000000000 --- a/examples/official-storybook/stories/addon-docs/addon-docs-blocks.stories.js +++ /dev/null @@ -1,144 +0,0 @@ -import React from 'react'; -import { Title, Subtitle, Description, Primary, ArgsTable, Stories } from '@storybook/addon-docs'; -import { DocgenButton } from '../../components/DocgenButton'; -import BaseButton from '../../components/BaseButton'; -import { ButtonGroup, SubGroup } from '../../components/ButtonGroup'; - -export default { - title: 'Addons/Docs/stories docs blocks', - component: DocgenButton, - parameters: { - docs: { - page: () => ( - <> - - <Subtitle /> - <Description /> - <Primary /> - <ArgsTable /> - <Stories /> - </> - ), - }, - }, -}; - -export const DefDocsPage = () => <div>Default docs page</div>; - -export const SmallDocsPage = () => <div>Just primary story, </div>; - -SmallDocsPage.parameters = { - docs: { - page: () => ( - <> - <Title /> - <Primary /> - </> - ), - }, -}; - -export const CheckBoxProps = () => <div>Primary props displayed with a check box </div>; - -CheckBoxProps.parameters = { - docs: { - page: () => { - const [showProps, setShowProps] = React.useState(false); - return ( - <> - <Title /> - <Subtitle /> - <Description /> - <Primary /> - <label> - <input type="checkbox" checked={showProps} onChange={() => setShowProps(!showProps)} /> - <span>display props</span> - </label> - {showProps && <ArgsTable />} - </> - ); - }, - }, -}; - -export const CustomLabels = () => <div>Display custom title, Subtitle, Description</div>; - -CustomLabels.parameters = { - docs: { - page: () => ( - <> - <Title>Custom title - Custom sub title - Custom description - - - - - ), - }, -}; - -export const CustomStoriesFilter = () =>
    Displays ALL stories (not excluding first one)
    ; - -CustomStoriesFilter.parameters = { - docs: { - page: () => , - }, -}; - -export const MultipleComponents = () => ( - - - - - -); - -MultipleComponents.storyName = 'Many Components'; - -MultipleComponents.parameters = { - component: ButtonGroup, - subcomponents: { - SubGroup, - 'Docgen Button': DocgenButton, - 'Base Button': BaseButton, - }, - docs: { - page: () => ( - <> - - <Subtitle /> - <Description /> - <Primary name="Many Components" /> - <ArgsTable /> - </> - ), - }, -}; - -export const ComponentsProps = () => <div>Display multiple prop tables in tabs</div>; - -ComponentsProps.subcomponents = { - 'Docgen Button': DocgenButton, - 'Base Button': BaseButton, -}; - -ComponentsProps.parameters = { - docs: { - page: () => ( - <> - <Title>Multiple prop tables - - Here's what happens when your component has some related components - - - - ), - }, -}; diff --git a/examples/official-storybook/stories/addon-docs/addon-docs-mdx.stories.mdx b/examples/official-storybook/stories/addon-docs/addon-docs-mdx.stories.mdx deleted file mode 100644 index edf48264b020..000000000000 --- a/examples/official-storybook/stories/addon-docs/addon-docs-mdx.stories.mdx +++ /dev/null @@ -1,219 +0,0 @@ -import { - Story, - Canvas, - ArgsTable, - Source, - Description, - ColorPalette, - ColorItem, - Meta, -} from '@storybook/addon-docs'; -import { action } from '@storybook/addon-actions'; -import { Button } from '@storybook/react/demo'; -import styled from 'styled-components'; -import TsButton from '../../components/TsButton'; -import FlowTypeButton from '../../components/FlowTypeButton'; -import { DocgenButton } from '../../components/DocgenButton'; -import MdNotes from '../notes/notes.md'; -import MdxNotes from '../notes/notes.mdx'; - -
    {storyFn()}
    ]} - parameters={{ notes: 'component notes' }} -/> - -# Selected - - - - - - - - - - - -## Transclusion - -### Markdown - - - -### MDX - - - -## A random color ColorPalette - - - - - - - - -## Getting into details - - - -export const nonStory1 = 'foo'; // a non-story export - -export const nonStory2 = () => ; // another one - - - - - - - - - - - - - - - Plain text - - - - - - - - <>This is an iframe! - - -
    {storyFn()}
    ]} -> - <>Story decorators -
    - - -

    Hello Hugh

    -
    - - - {() => { - return
    function result
    ; - }} -
    - - - - - - - -## Configurable height - - - - - -export const FixedLayoutExample = styled.div(({ theme }) => ({ - '&, header, aside, main, footer': { - position: 'fixed', - top: 0, - right: 0, - bottom: 0, - left: 0, - }, - header: { - height: '3rem', - background: 'red', - }, - 'aside, main': { - top: '3rem', - }, - aside: { - width: '10rem', - background: 'coral', - }, - main: { - left: '10rem', - background: 'yellow', - }, - footer: { - top: 'auto', - height: '3rem', - background: 'green', - }, -})); - -Fixed layout requires custom `height` since it can't be determined. - - - - -
    -
    - )} -/> - -# CSF3 Features - - - - ( -
    -
    - )} -/> - - console.log('story play')} /> diff --git a/examples/official-storybook/stories/addon-docs/docs-only.stories.mdx b/examples/official-storybook/stories/addon-docs/docs-only.stories.mdx deleted file mode 100644 index ce2bd7186767..000000000000 --- a/examples/official-storybook/stories/addon-docs/docs-only.stories.mdx +++ /dev/null @@ -1,80 +0,0 @@ -import { Meta, Canvas } from '@storybook/addon-docs'; - - - -# Documentation-only MDX - -# [Link](http://https://storybook.js.org/) in heading - -This file is a documentation-only MDX file, i.e. it doesn't contain any `` definitions. - -Therefore, it shows up in the [navigation](https://github.com/) UI as a document icon. - -It can, however, still contain a `` definition: - - -
    -

    This is a preview block within a documentation-only MDX file

    -

    - You may need to wrap certain documentation in a `Preview` in order to reset the styles for use - cases such as documenting a design system. -

    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -## Bottom - -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc faucibus urna id nibh mollis, varius facilisis sapien scelerisque. Pellentesque lobortis convallis mi, at accumsan nisl sollicitudin id. Aliquam vitae elementum libero. Nulla blandit est turpis, a consectetur ante rhoncus a. Integer eu quam eu mauris pharetra elementum. Donec ex nisl, tincidunt ut tincidunt id, bibendum ut sem. Sed in congue tortor, a congue dolor. Fusce a magna vel nulla laoreet sagittis. - -# [Link](https://storybook.js.org/) in heading - -## [Link](https://storybook.js.org/) in heading - -### [Link](https://storybook.js.org/) in heading - -#### [Link](https://storybook.js.org/) in heading - -##### [Link](https://storybook.js.org/) in heading - -###### [Link](https://storybook.js.org/) in heading - -He stared at the clinic, [Molly](https://storybook.js.org/) took him to the _[Tank War](https://storybook.js.org/)_, mouth touched with hot gold as a gliding cursor struck sparks from the wall of a **[skyscraper](https://storybook.js.org/)** canyon. diff --git a/examples/official-storybook/stories/addon-docs/dynamic-title.stories.js b/examples/official-storybook/stories/addon-docs/dynamic-title.stories.js deleted file mode 100644 index 08c5b3197bdb..000000000000 --- a/examples/official-storybook/stories/addon-docs/dynamic-title.stories.js +++ /dev/null @@ -1,9 +0,0 @@ -// const getTitle = () => `Addons/Docs/${['dynamic title'][0]}`; - -export default { - // FIXME dynamic title - // title: getTitle(), - title: 'Addons/Docs/dynamic title', -}; - -export const Basic = () => 'Story with title that is evaluated in runtime'; diff --git a/examples/official-storybook/stories/addon-docs/forward-ref-inner-proptypes.stories.js b/examples/official-storybook/stories/addon-docs/forward-ref-inner-proptypes.stories.js deleted file mode 100644 index fc6789af1dbb..000000000000 --- a/examples/official-storybook/stories/addon-docs/forward-ref-inner-proptypes.stories.js +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import { ForwardRefButtonInnerPropTypes } from '../../components/ForwardRefButton'; - -export default { - title: 'Addons/Docs/ForwardRefInnerPropTypes', - component: ForwardRefButtonInnerPropTypes, - parameters: { - chromatic: { disable: true }, - docs: { source: { type: 'dynamic' } }, - }, -}; - -export const DisplaysCorrectly = () => ; -DisplaysCorrectly.storyName = - 'Displays forward ref component w/ inner propTypes correctly w/o args'; diff --git a/examples/official-storybook/stories/addon-docs/forward-ref-outer-proptypes.stories.js b/examples/official-storybook/stories/addon-docs/forward-ref-outer-proptypes.stories.js deleted file mode 100644 index 7feb23f4050d..000000000000 --- a/examples/official-storybook/stories/addon-docs/forward-ref-outer-proptypes.stories.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { ForwardRefButtonOuterPropTypes } from '../../components/ForwardRefButton'; - -export default { - title: 'Addons/Docs/ForwardRefOuterPropTypes', - component: ForwardRefButtonOuterPropTypes, - parameters: { - chromatic: { disable: true }, - docs: { source: { type: 'dynamic' } }, - }, -}; - -export const DisplaysCorrectly = () => ; -DisplaysCorrectly.storyName = 'Displays forward ref component w/ outer propTypes correctly'; diff --git a/examples/official-storybook/stories/addon-docs/imported.stories.tsx b/examples/official-storybook/stories/addon-docs/imported.stories.tsx deleted file mode 100644 index 122fe922ee42..000000000000 --- a/examples/official-storybook/stories/addon-docs/imported.stories.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import React from 'react'; -import { Button } from '@storybook/react/demo'; - -export default { title: 'Addons/Docs/Imported', component: Button }; -export const Basic = (args: any) => - - ); - }} -
    diff --git a/examples/official-storybook/stories/addon-docs/source.stories.tsx b/examples/official-storybook/stories/addon-docs/source.stories.tsx deleted file mode 100644 index e9a671086f9a..000000000000 --- a/examples/official-storybook/stories/addon-docs/source.stories.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import Button from '../../components/TsButton'; - -export default { - title: 'Addons/Docs/Source', - component: Button, - argTypes: { - children: { control: 'text' }, - type: { control: 'text' }, - }, - parameters: { - chromatic: { disable: true }, - }, -}; - -const Template = (args) => ; - -export const ForceCodeSource = Template.bind({}); -ForceCodeSource.args = { ...Basic.args }; -ForceCodeSource.parameters = { docs: { source: { type: 'code' } } }; - -export const CustomSource = Template.bind({}); -CustomSource.args = { ...Basic.args }; -CustomSource.parameters = { docs: { source: { code: 'custom source' } } }; - -export const NoSource = Template.bind({}); -NoSource.args = { ...Basic.args }; -NoSource.parameters = { docs: { source: { code: null } } }; diff --git a/examples/official-storybook/stories/addon-docs/stories.mdx b/examples/official-storybook/stories/addon-docs/stories.mdx deleted file mode 100644 index b14b7e13abc9..000000000000 --- a/examples/official-storybook/stories/addon-docs/stories.mdx +++ /dev/null @@ -1,7 +0,0 @@ -import { Meta } from '@storybook/addon-docs'; - - - -# Stories - -Addon-docs supports `story.mdx` and `stories.mdx` for people who group their components by folder, e.g. `Button/{index.tsx,stories.mdx}`. diff --git a/examples/official-storybook/stories/addon-docs/subcomponents.stories.js b/examples/official-storybook/stories/addon-docs/subcomponents.stories.js deleted file mode 100644 index 2fa7db68a0b9..000000000000 --- a/examples/official-storybook/stories/addon-docs/subcomponents.stories.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { DocgenButton } from '../../components/DocgenButton'; -import { ButtonGroup } from '../../components/ButtonGroup'; - -export default { - title: 'Addons/Docs/ButtonGroup', - component: ButtonGroup, - parameters: { viewMode: 'docs' }, - subcomponents: { DocgenButton }, -}; - -export const Basic = () => ( - - - - -); diff --git a/examples/official-storybook/stories/addon-docs/title-generators.ts b/examples/official-storybook/stories/addon-docs/title-generators.ts deleted file mode 100644 index f5b0f0abce45..000000000000 --- a/examples/official-storybook/stories/addon-docs/title-generators.ts +++ /dev/null @@ -1 +0,0 @@ -export const titleFunction = (title: string) => `Addons/Docs/${title}`; diff --git a/examples/official-storybook/stories/addon-docs/transform-source.stories.js b/examples/official-storybook/stories/addon-docs/transform-source.stories.js deleted file mode 100644 index b6ae7a8657a8..000000000000 --- a/examples/official-storybook/stories/addon-docs/transform-source.stories.js +++ /dev/null @@ -1,25 +0,0 @@ -export default { - title: 'Addons/Docs/transformSource', - parameters: { - docs: { - transformSource(src, ctx) { - return `// We transformed this!\n const example = ${src};`; - }, - }, - }, -}; - -export const Code = () => 'StoryType "CODE" story which has source transformed'; -Code.parameters = { - docs: { source: { type: 'code' } }, -}; - -export const Dynamic = () => 'StoryType "DYNAMIC" story which has source transformed'; -Dynamic.parameters = { - docs: { source: { type: 'dynamic' } }, -}; - -export const Auto = () => 'StoryType "AUTO" story which has source transformed'; -Dynamic.parameters = { - docs: { source: { type: 'auto' } }, -}; diff --git a/examples/official-storybook/stories/addon-docs/ts-button.stories.tsx b/examples/official-storybook/stories/addon-docs/ts-button.stories.tsx deleted file mode 100644 index 2e0e56365274..000000000000 --- a/examples/official-storybook/stories/addon-docs/ts-button.stories.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from 'react'; -import { action } from '@storybook/addon-actions'; -import Button, { Type } from '../../components/TsButton'; - -export default { - title: 'Addons/Docs/TsButton', - component: Button, - parameters: { - viewMode: 'story', - }, -}; - -type Story = () => any; - -export const SimpleButton: Story = () => { - const x = 0; - return ; -}; - -const typeOptions = { - Default: 'default', - Action: 'action', -}; - -export const WithType = () => ; diff --git a/examples/official-storybook/stories/addon-jest.stories.js b/examples/official-storybook/stories/addon-jest.stories.js deleted file mode 100644 index abb0aad1ae6d..000000000000 --- a/examples/official-storybook/stories/addon-jest.stories.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { withTests as withTestsHOC } from '@storybook/addon-jest'; - -import results from './addon-jest.testresults.json'; - -export default { - title: 'Addons/Jest', - decorators: [withTestsHOC({ results })], -}; - -export const WithTests = () =>

    Hello

    ; -WithTests.parameters = { jest: 'addon-jest' }; - -export const WithInferredTests = () =>

    Inferred Tests

    ; - -export const DisabledTests = () =>

    Disabled Tests

    ; -DisabledTests.parameters = { jest: { disabled: true } }; diff --git a/examples/official-storybook/stories/addon-jest.testresults.json b/examples/official-storybook/stories/addon-jest.testresults.json deleted file mode 100644 index d6bd6709fad7..000000000000 --- a/examples/official-storybook/stories/addon-jest.testresults.json +++ /dev/null @@ -1 +0,0 @@ -{"numFailedTestSuites":1,"numFailedTests":4,"numPassedTestSuites":0,"numPassedTests":3,"numPendingTestSuites":0,"numPendingTests":2,"numRuntimeErrorTestSuites":0,"numTodoTests":2,"numTotalTestSuites":1,"numTotalTests":11,"openHandles":[],"snapshot":{"added":0,"didUpdate":false,"failure":true,"filesAdded":0,"filesRemoved":1,"filesUnmatched":0,"filesUpdated":0,"matched":0,"total":0,"unchecked":0,"uncheckedKeysByFile":[],"unmatched":0,"updated":0},"startTime":1564439110263,"success":false,"testResults":[{"assertionResults":[{"ancestorTitles":[],"failureMessages":[],"fullName":"true should be true","location":null,"status":"passed","title":"true should be true"},{"ancestorTitles":["In a describe: "],"failureMessages":[],"fullName":"In a describe: true should still be true","location":null,"status":"passed","title":"true should still be true"},{"ancestorTitles":["In a describe: "],"failureMessages":[],"fullName":"In a describe: a list should contain 3 items","location":null,"status":"passed","title":"a list should contain 3 items"},{"ancestorTitles":["In a describe: "],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoEqual\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // deep equality\u001b[22m\n\nExpected: \u001b[32m\"everything is awesome\"\u001b[39m\nReceived: \u001b[31m\"everything is all right\"\u001b[39m\n at Object.toEqual (/Users/fabianrademacher/React/storybook/examples/official-storybook/tests/addon-jest.test.js:16:39)\n at Object.asyncJestTest (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37)\n at resolve (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:43:12)\n at new Promise ()\n at mapper (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:26:19)\n at promise.then (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:73:41)\n at process._tickCallback (internal/process/next_tick.js:68:7)"],"fullName":"In a describe: everything is awesome","location":null,"status":"failed","title":"everything is awesome"},{"ancestorTitles":["A bunch of failing tests: "],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoBe\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // Object.is equality\u001b[22m\n\nExpected: \u001b[32mfalse\u001b[39m\nReceived: \u001b[31mtrue\u001b[39m\n at Object.toBe (/Users/fabianrademacher/React/storybook/examples/official-storybook/tests/addon-jest.test.js:22:18)\n at Object.asyncJestTest (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37)\n at resolve (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:43:12)\n at new Promise ()\n at mapper (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:26:19)\n at promise.then (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:73:41)\n at process._tickCallback (internal/process/next_tick.js:68:7)"],"fullName":"A bunch of failing tests: true should still be true","location":null,"status":"failed","title":"true should still be true"},{"ancestorTitles":["A bunch of failing tests: "],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoContain\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // indexOf\u001b[22m\n\nExpected value: \u001b[32m301\u001b[39m\nReceived array: \u001b[31m[\"a\", \"b\", \"3\"]\u001b[39m\n at Object.toContain (/Users/fabianrademacher/React/storybook/examples/official-storybook/tests/addon-jest.test.js:26:29)\n at Object.asyncJestTest (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37)\n at resolve (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:43:12)\n at new Promise ()\n at mapper (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:26:19)\n at promise.then (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:73:41)\n at process._tickCallback (internal/process/next_tick.js:68:7)"],"fullName":"A bunch of failing tests: a list should contain 3 items","location":null,"status":"failed","title":"a list should contain 3 items"},{"ancestorTitles":["A bunch of failing tests: "],"failureMessages":["Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoThrow\u001b[2m()\u001b[22m\n\nReceived function did not throw\n at Object.toThrow (/Users/fabianrademacher/React/storybook/examples/official-storybook/tests/addon-jest.test.js:30:22)\n at Object.asyncJestTest (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/jasmineAsyncInstall.js:102:37)\n at resolve (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:43:12)\n at new Promise ()\n at mapper (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:26:19)\n at promise.then (/Users/fabianrademacher/React/storybook/node_modules/jest-jasmine2/build/queueRunner.js:73:41)\n at process._tickCallback (internal/process/next_tick.js:68:7)"],"fullName":"A bunch of failing tests: should work","location":null,"status":"failed","title":"should work"},{"ancestorTitles":["A bunch of failing tests: "],"failureMessages":[],"fullName":"A bunch of failing tests: Test this Todo later","location":null,"status":"todo","title":"Test this Todo later"},{"ancestorTitles":["Skipped tests:"],"failureMessages":[],"fullName":"Skipped tests: Would be true if not skipped","location":null,"status":"pending","title":"Would be true if not skipped"},{"ancestorTitles":["Skipped tests:"],"failureMessages":[],"fullName":"Skipped tests: Could fail, if not skipped","location":null,"status":"pending","title":"Could fail, if not skipped"},{"ancestorTitles":["Skipped tests:"],"failureMessages":[],"fullName":"Skipped tests: Test Todo is not skipped","location":null,"status":"todo","title":"Test Todo is not skipped"}],"endTime":1564439111804,"message":"\u001b[1m\u001b[31m \u001b[1m● \u001b[1mIn a describe: › everything is awesome\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoEqual\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // deep equality\u001b[22m\n\n Expected: \u001b[32m\"everything is awesome\"\u001b[39m\n Received: \u001b[31m\"everything is all right\"\u001b[39m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 14 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 15 | \u001b[39m test(\u001b[32m'everything is awesome'\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m\u001b[31m\u001b[1m>\u001b[2m\u001b[39m\u001b[90m 16 | \u001b[39m expect(\u001b[32m'everything is all right'\u001b[39m)\u001b[33m.\u001b[39mtoEqual(\u001b[32m'everything is awesome'\u001b[39m)\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[2m\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 17 | \u001b[39m })\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 18 | \u001b[39m})\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 19 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[2mat Object.toEqual (\u001b[2m\u001b[0m\u001b[36mexamples/official-storybook/tests/addon-jest.test.js\u001b[39m\u001b[0m\u001b[2m:16:39)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mA bunch of failing tests: › true should still be true\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoBe\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // Object.is equality\u001b[22m\n\n Expected: \u001b[32mfalse\u001b[39m\n Received: \u001b[31mtrue\u001b[39m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 20 | \u001b[39mdescribe(\u001b[32m'A bunch of failing tests: '\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 21 | \u001b[39m test(\u001b[32m'true should still be true'\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m\u001b[31m\u001b[1m>\u001b[2m\u001b[39m\u001b[90m 22 | \u001b[39m expect(\u001b[36mtrue\u001b[39m)\u001b[33m.\u001b[39mtoBe(\u001b[36mfalse\u001b[39m)\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[2m\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 23 | \u001b[39m })\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 24 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 25 | \u001b[39m test(\u001b[32m'a list should contain 3 items'\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[2mat Object.toBe (\u001b[2m\u001b[0m\u001b[36mexamples/official-storybook/tests/addon-jest.test.js\u001b[39m\u001b[0m\u001b[2m:22:18)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mA bunch of failing tests: › a list should contain 3 items\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoContain\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // indexOf\u001b[22m\n\n Expected value: \u001b[32m301\u001b[39m\n Received array: \u001b[31m[\"a\", \"b\", \"3\"]\u001b[39m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 24 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 25 | \u001b[39m test(\u001b[32m'a list should contain 3 items'\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m\u001b[31m\u001b[1m>\u001b[2m\u001b[39m\u001b[90m 26 | \u001b[39m expect([\u001b[32m'a'\u001b[39m\u001b[33m,\u001b[39m \u001b[32m'b'\u001b[39m\u001b[33m,\u001b[39m \u001b[32m'3'\u001b[39m])\u001b[33m.\u001b[39mtoContain(\u001b[35m301\u001b[39m)\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[2m\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 27 | \u001b[39m })\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 28 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 29 | \u001b[39m test(\u001b[32m'should work'\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[2mat Object.toContain (\u001b[2m\u001b[0m\u001b[36mexamples/official-storybook/tests/addon-jest.test.js\u001b[39m\u001b[0m\u001b[2m:26:29)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mA bunch of failing tests: › should work\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoThrow\u001b[2m()\u001b[22m\n\n Received function did not throw\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 28 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 29 | \u001b[39m test(\u001b[32m'should work'\u001b[39m\u001b[33m,\u001b[39m () \u001b[33m=>\u001b[39m {\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m\u001b[31m\u001b[1m>\u001b[2m\u001b[39m\u001b[90m 30 | \u001b[39m expect(() \u001b[33m=>\u001b[39m {})\u001b[33m.\u001b[39mtoThrow()\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m | \u001b[39m \u001b[31m\u001b[1m^\u001b[2m\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 31 | \u001b[39m })\u001b[33m;\u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 32 | \u001b[39m\u001b[0m\u001b[22m\n\u001b[2m \u001b[0m \u001b[90m 33 | \u001b[39m test\u001b[33m.\u001b[39mtodo(\u001b[32m'Test this Todo later'\u001b[39m)\u001b[0m\u001b[22m\n\u001b[2m\u001b[22m\n\u001b[2m \u001b[2mat Object.toThrow (\u001b[2m\u001b[0m\u001b[36mexamples/official-storybook/tests/addon-jest.test.js\u001b[39m\u001b[0m\u001b[2m:30:22)\u001b[2m\u001b[22m\n","name":"/Users/fabianrademacher/React/storybook/examples/official-storybook/tests/addon-jest.test.js","startTime":1564439111282,"status":"failed","summary":""}],"wasInterrupted":false,"coverageMap":{}} \ No newline at end of file diff --git a/examples/official-storybook/stories/addon-links/button.stories.tsx b/examples/official-storybook/stories/addon-links/button.stories.tsx deleted file mode 100644 index 73b9352134cf..000000000000 --- a/examples/official-storybook/stories/addon-links/button.stories.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { linkTo } from '@storybook/addon-links'; - -export default { - title: 'Addons/Links/Button', -}; - -export const First = () => ( - -); - -export const Second = () => ( - -); diff --git a/examples/official-storybook/stories/addon-links/href.stories.js b/examples/official-storybook/stories/addon-links/href.stories.js deleted file mode 100644 index 64a912762d49..000000000000 --- a/examples/official-storybook/stories/addon-links/href.stories.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { hrefTo } from '@storybook/addon-links'; -import { action } from '@storybook/addon-actions'; - -export default { - title: 'Addons/Links/Href', -}; - -export const Log = () => { - hrefTo('Addons/Links/Href', 'log').then((href) => action('URL of this story')(href)); - - return See action logger; -}; -Log.parameters = { - options: { - panel: 'storybook/actions/panel', - }, -}; diff --git a/examples/official-storybook/stories/addon-links/link.stories.js b/examples/official-storybook/stories/addon-links/link.stories.js deleted file mode 100644 index 110ea0cb8d3b..000000000000 --- a/examples/official-storybook/stories/addon-links/link.stories.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; -import LinkTo from '@storybook/addon-links/react'; - -export default { - title: 'Addons/Links/Link', -}; - -export const First = () => Go to Second; -export const Second = () => Go to First; diff --git a/examples/official-storybook/stories/addon-links/scroll.stories.js b/examples/official-storybook/stories/addon-links/scroll.stories.js deleted file mode 100644 index 134bb026f884..000000000000 --- a/examples/official-storybook/stories/addon-links/scroll.stories.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { Fragment } from 'react'; -import LinkTo from '@storybook/addon-links/react'; - -export default { - title: 'Addons/Links/Scroll position', - decorators: [ - (storyFn) => ( - -
    Scroll down to see the link
    - {storyFn()} -
    - ), - ], -}; - -export const First = () => Go to Second; -export const Second = () => Go to First; diff --git a/examples/official-storybook/stories/addon-links/select.stories.js b/examples/official-storybook/stories/addon-links/select.stories.js deleted file mode 100644 index debbf867a386..000000000000 --- a/examples/official-storybook/stories/addon-links/select.stories.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { linkTo } from '@storybook/addon-links'; -import LinkTo from '@storybook/addon-links/react'; - -export default { - title: 'Addons/Links/Select', -}; - -export const Index = () => ( - -); - -export const First = () => Go back; -export const Second = () => Go back; -export const Third = () => Go back; diff --git a/examples/official-storybook/stories/addon-measure/BoxModel.stories.js b/examples/official-storybook/stories/addon-measure/BoxModel.stories.js deleted file mode 100644 index 17876cde74b4..000000000000 --- a/examples/official-storybook/stories/addon-measure/BoxModel.stories.js +++ /dev/null @@ -1,118 +0,0 @@ -import React from 'react'; -import { Visualization } from '../../components/addon-measure/Visualization'; - -export default { - title: 'Addons/Measure/BoxModel', - parameters: { - layout: 'fullscreen', - }, -}; - -const Template = (args) => ; - -export const MarginUniform = Template.bind({}); -MarginUniform.args = { - render: (ref) => ( -
    - ), -}; - -export const MarginAsymmetric = Template.bind({}); -MarginAsymmetric.args = { - render: (ref) => ( -
    - ), -}; - -export const PaddingUniform = Template.bind({}); -PaddingUniform.args = { - render: (ref) => ( -
    - ), -}; - -export const PaddingAsymmetric = Template.bind({}); -PaddingAsymmetric.args = { - render: (ref) => ( -
    - ), -}; - -export const BorderUniform = Template.bind({}); -BorderUniform.args = { - render: (ref) => ( -
    - ), -}; - -export const BorderAsymmetric = Template.bind({}); -BorderAsymmetric.args = { - render: (ref) => ( -
    - ), -}; - -export const DecimalSizing = Template.bind({}); -DecimalSizing.args = { - render: (ref) => ( -
    - ), -}; diff --git a/examples/official-storybook/stories/addon-measure/Grid.stories.js b/examples/official-storybook/stories/addon-measure/Grid.stories.js deleted file mode 100644 index f9849389bf6d..000000000000 --- a/examples/official-storybook/stories/addon-measure/Grid.stories.js +++ /dev/null @@ -1,46 +0,0 @@ -import React from 'react'; - -export default { - title: 'Addons/Measure/Grid', -}; - -const MeasureButton = () => ( - - - -); - -export const Basic = () => ( -
    -
    - {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((id) => ( -
    - {id} -
    - ))} -
    -

    - Click the measure button in the toolbar to enable the addon -

    -
    -); diff --git a/examples/official-storybook/stories/addon-measure/ShadowRoot.stories.js b/examples/official-storybook/stories/addon-measure/ShadowRoot.stories.js deleted file mode 100644 index eec397d9d8d7..000000000000 --- a/examples/official-storybook/stories/addon-measure/ShadowRoot.stories.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; - -import { ShadowRoot } from '../../components/addon-measure/ShadowRoot'; - -export default { - title: 'Addons/Measure/ShadowRoot', - component: ShadowRoot, -}; - -const Template = (args) => ( -
    - -
    -); - -export const Root = Template.bind({}); - -export const Nested = Template.bind({}); -Nested.args = { - drawMode: 'NESTED', -}; diff --git a/examples/official-storybook/stories/addon-measure/SmallNode.stories.js b/examples/official-storybook/stories/addon-measure/SmallNode.stories.js deleted file mode 100644 index 6a38904f5d21..000000000000 --- a/examples/official-storybook/stories/addon-measure/SmallNode.stories.js +++ /dev/null @@ -1,73 +0,0 @@ -import React from 'react'; -import { Visualization } from '../../components/addon-measure/Visualization'; - -export default { - title: 'Addons/Measure/SmallNode', - parameters: { - layout: 'fullscreen', - }, -}; - -const Template = (args) => ; - -export const Everything30px = Template.bind({}); -Everything30px.args = { - render: (ref) => ( -
    - ), -}; - -export const Short = Template.bind({}); -Short.args = { - render: (ref) => ( -
    - ), -}; - -export const Narrow = Template.bind({}); -Narrow.args = { - render: (ref) => ( -
    - ), -}; - -export const Tiny = Template.bind({}); -Tiny.args = { - render: (ref) => ( -
    - ), -}; diff --git a/examples/official-storybook/stories/addon-measure/StackingLabels.stories.js b/examples/official-storybook/stories/addon-measure/StackingLabels.stories.js deleted file mode 100644 index cd8197237dec..000000000000 --- a/examples/official-storybook/stories/addon-measure/StackingLabels.stories.js +++ /dev/null @@ -1,67 +0,0 @@ -import React from 'react'; -import { Visualization } from '../../components/addon-measure/Visualization'; - -export default { - title: 'Addons/Measure/StackingLabels', - parameters: { - layout: 'fullscreen', - }, -}; - -const Template = (args) => ; - -export const EverythingUniform = Template.bind({}); -EverythingUniform.args = { - render: (ref) => ( -
    - ), -}; - -export const Asymmetric = Template.bind({}); -Asymmetric.args = { - render: (ref) => ( -
    - ), -}; - -export const MoreAsymmetric = Template.bind({}); -MoreAsymmetric.args = { - render: (ref) => ( -
    - ), -}; diff --git a/examples/official-storybook/stories/addon-outline.stories.js b/examples/official-storybook/stories/addon-outline.stories.js deleted file mode 100644 index 714616c6ea3e..000000000000 --- a/examples/official-storybook/stories/addon-outline.stories.js +++ /dev/null @@ -1,46 +0,0 @@ -import React from 'react'; - -export default { - title: 'Addons/Outline', -}; - -const OutlineButton = () => ( - - - -); - -export const Basic = () => ( -
    -
    - {[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((id) => ( -
    - {id} -
    - ))} -
    -

    - Click the outline button in the toolbar to toggle outlines -

    -
    -); diff --git a/examples/official-storybook/stories/addon-storyshots.stories.js b/examples/official-storybook/stories/addon-storyshots.stories.js deleted file mode 100644 index 057b87c42b40..000000000000 --- a/examples/official-storybook/stories/addon-storyshots.stories.js +++ /dev/null @@ -1,41 +0,0 @@ -/* eslint-disable storybook/use-storybook-expect */ -/* eslint-disable storybook/await-interactions */ -import React, { useState } from 'react'; -import { styled } from '@storybook/theming'; - -const BlockDiv = styled.div({ - display: 'inline-block', - height: 400, - width: 400, - background: 'hotpink', -}); - -export default { - title: 'Addons/Storyshots', -}; - -export const Block = () => { - const [hover, setHover] = useState(false); - - return ( - setHover(true)} - onMouseLeave={() => setHover(false)} - > - {hover && 'I am hovered'} - - ); -}; -Block.storyName = 'Block story'; - -Block.parameters = { - async puppeteerTest(page) { - const element = await page.$('[data-test-block]'); - await element.hover(); - const textContent = await element.getProperty('textContent'); - const text = await textContent.jsonValue(); - // eslint-disable-next-line jest/no-standalone-expect - expect(text).toBe('I am hovered'); - }, -}; diff --git a/examples/official-storybook/stories/addon-toolbars.stories.js b/examples/official-storybook/stories/addon-toolbars.stories.js deleted file mode 100644 index 56b44c9992bc..000000000000 --- a/examples/official-storybook/stories/addon-toolbars.stories.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { styled } from '@storybook/theming'; - -export default { - title: 'Addons/Toolbars', - parameters: { - layout: 'centered', - }, -}; - -const getCaptionForLocale = (locale) => { - switch (locale) { - case 'es': - return 'Hola!'; - case 'fr': - return 'Bonjour!'; - case 'zh': - return '你好!'; - case 'kr': - return '안녕하세요!'; - case 'en': - default: - return 'Hello'; - } -}; - -export const Locale = (_args, { globals: { locale } }) => { - return ( - -
    Your locale is '{locale}', so I say:
    -
    note: cycle backwards and forwards with "K" & "L"
    -
    {getCaptionForLocale(locale)}
    -
    - ); -}; - -const Themed = styled.div(({ theme }) => ({ - color: theme.color.defaultText, -})); diff --git a/examples/official-storybook/stories/addon-viewport/custom-default.stories.js b/examples/official-storybook/stories/addon-viewport/custom-default.stories.js deleted file mode 100644 index 8b6700546a25..000000000000 --- a/examples/official-storybook/stories/addon-viewport/custom-default.stories.js +++ /dev/null @@ -1,46 +0,0 @@ -import React from 'react'; -import { styled } from '@storybook/theming'; -import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; - -const Panel = styled.div(); - -export default { - title: 'Addons/Viewport/Custom Default (Kindle Fire 2)', - parameters: { - viewport: { - viewports: { - ...INITIAL_VIEWPORTS, - kindleFire2: { - name: 'Kindle Fire 2', - styles: { - width: '600px', - height: '963px', - }, - }, - }, - }, - }, -}; - -export const Inherited = () => ( - - I've inherited Kindle Fire 2 viewport from my parent. - -); - -export const OverriddenViaWithViewportParameterizedDecorator = () => ( - - I respect my parents but I should be looking good on iPad. - -); -OverriddenViaWithViewportParameterizedDecorator.storyName = - 'Overridden via "withViewport" parameterized decorator'; -OverriddenViaWithViewportParameterizedDecorator.parameters = { - viewport: { defaultViewport: 'ipad' }, -}; - -export const Disabled = () => There should be no viewport selector in the toolbar; - -Disabled.parameters = { - viewport: { disable: true }, -}; diff --git a/examples/official-storybook/stories/addon-viewport/default.stories.js b/examples/official-storybook/stories/addon-viewport/default.stories.js deleted file mode 100644 index bdd2ee5ed7fe..000000000000 --- a/examples/official-storybook/stories/addon-viewport/default.stories.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { styled } from '@storybook/theming'; -import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'; - -const Panel = styled.div(); - -export default { - title: 'Addons/Viewport', - parameters: { - viewport: { - viewports: INITIAL_VIEWPORTS, - }, - }, -}; -export const DefaultFn = () => ( - I don't have problems being rendered using the default viewport. -); -DefaultFn.storyName = 'default'; diff --git a/examples/official-storybook/stories/controls-sort.stories.tsx b/examples/official-storybook/stories/controls-sort.stories.tsx deleted file mode 100644 index 46dc611795d1..000000000000 --- a/examples/official-storybook/stories/controls-sort.stories.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; - -export default { - title: 'Addons/Controls-Sort', - argTypes: { - x: { type: { required: true } }, - y: { type: { required: true }, table: { category: 'foo' } }, - z: {}, - a: { type: { required: true } }, - b: { table: { category: 'foo' } }, - c: {}, - }, - args: { - x: 'x', - y: 'y', - z: 'z', - a: 'a', - b: 'b', - c: 'c', - }, - parameters: { chromatic: { disable: true } }, -}; - -const Template = (args: any) =>
    {args &&
    {JSON.stringify(args, null, 2)}
    }
    ; - -export const None = Template.bind({}); -None.parameters = { controls: { sort: 'none' } }; - -export const Alpha = Template.bind({}); -Alpha.parameters = { controls: { sort: 'alpha' } }; - -export const RequiredFirst = Template.bind({}); -RequiredFirst.parameters = { controls: { sort: 'requiredFirst' } }; diff --git a/examples/official-storybook/stories/core/args.stories.tsx b/examples/official-storybook/stories/core/args.stories.tsx deleted file mode 100644 index 2242a1d1f023..000000000000 --- a/examples/official-storybook/stories/core/args.stories.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import React, { FC, useState } from 'react'; -import { useArgs } from '@storybook/client-api'; - -interface CustomArgs { - first?: string; - last?: string; - foo?: string; -} - -type UpdateArgs = ReturnType[1]; -type ResetArgs = ReturnType[2]; - -const ArgUpdater: FC<{ args: CustomArgs; updateArgs: UpdateArgs; resetArgs: ResetArgs }> = ({ - args, - updateArgs, - resetArgs, -}) => { - const [argsInput, updateArgsInput] = useState(JSON.stringify(args)); - - return ( -
    -

    Hooks args:

    -
    {JSON.stringify(args)}
    -
    { - e.preventDefault(); - updateArgs(JSON.parse(argsInput)); - }} - > - + ``` + + The `@value` argument is two-way bound. If the user types text into the textarea, the `@value` + argument is updated. If the `@value` argument is updated, the text in the textarea is updated. + + In the following example, the `writtenWords` property on the component will be updated as the user + types 'Lots of text' into the text area of their browser's window. + + ```app/components/word-editor.js + import Component from '@glimmer/component'; + import { tracked } from '@glimmer/tracking'; + + export default class WordEditorComponent extends Component { + @tracked writtenWords = "Lots of text that IS bound"; + } + ``` + + ```handlebars + + ``` + + If you wanted a one way binding, you could use the `\n ```\n \n The `@value` argument is two-way bound. If the user types text into the textarea, the `@value`\n argument is updated. If the `@value` argument is updated, the text in the textarea is updated.\n \n In the following example, the `writtenWords` property on the component will be updated as the user\n types 'Lots of text' into the text area of their browser's window.\n \n ```app/components/word-editor.js\n import Component from '@glimmer/component';\n import { tracked } from '@glimmer/tracking';\n \n export default class WordEditorComponent extends Component {\n @tracked writtenWords = \"Lots of text that IS bound\";\n }\n ```\n \n ```handlebars\n \n ```\n \n If you wanted a one way binding, you could use the `