diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 8d45c2a88972..569ca335626a 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -12,13 +12,8 @@
# Image Component (@styfle)
-/examples/image-component/ @timneutkens @ijjk @shuding @styfle
-/packages/next/build/webpack/loaders/next-image-loader.js @timneutkens @ijjk @shuding @styfle
-/packages/next/client/image.tsx @timneutkens @ijjk @shuding @styfle
-/packages/next/image-types/ @timneutkens @ijjk @shuding @styfle
-/packages/next/server/image-config.ts @timneutkens @ijjk @shuding @styfle
-/packages/next/server/image-optimizer.ts @timneutkens @ijjk @shuding @styfle
+/**/*image*/** @timneutkens @ijjk @shuding @styfle
+/packages/next/client/use-intersection.tsx @timneutkens @ijjk @shuding @styfle
+/packages/next/server/lib/squoosh/ @timneutkens @ijjk @shuding @styfle
/packages/next/server/serve-static.ts @timneutkens @ijjk @shuding @styfle
/packages/next/server/config.ts @timneutkens @ijjk @shuding @styfle
-/test/integration/image-optimizer/ @timneutkens @ijjk @shuding @styfle
-/test/integration/image-component/ @timneutkens @ijjk @shuding @styfle
diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml
index 7906496c0d9a..d30b8207ca2a 100644
--- a/.github/workflows/build_test_deploy.yml
+++ b/.github/workflows/build_test_deploy.yml
@@ -88,6 +88,46 @@ jobs:
- run: ./scripts/check-manifests.js
- run: yarn lint
+ rust-check:
+ runs-on: ubuntu-latest
+ needs: build
+ steps:
+ - name: Install
+ uses: actions-rs/toolchain@v1
+ if: ${{needs.build.outputs.docsChange != 'docs only change'}}
+ with:
+ profile: minimal
+ toolchain: nightly-2021-11-15
+ components: rustfmt, clippy
+
+ - name: Cache cargo registry
+ uses: actions/cache@v2
+ if: ${{needs.build.outputs.docsChange != 'docs only change'}}
+ with:
+ path: ~/.cargo/registry
+ key: stable-ubuntu-clippy-cargo-registry
+
+ - name: Cache cargo index
+ uses: actions/cache@v2
+ if: ${{needs.build.outputs.docsChange != 'docs only change'}}
+ with:
+ path: ~/.cargo/git
+ key: stable-ubuntu-clippy-cargo-index
+
+ - uses: actions/cache@v2
+ id: restore-build
+ if: ${{needs.build.outputs.docsChange != 'docs only change'}}
+ with:
+ path: ./*
+ key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt }}
+
+ - name: Check
+ if: ${{needs.build.outputs.docsChange != 'docs only change'}}
+ run: |
+ cargo fmt -- --check
+ cargo clippy --all -- -D warnings
+ working-directory: packages/next-swc
+
checkPrecompiled:
name: Check Pre-compiled
runs-on: ubuntu-latest
@@ -97,7 +137,7 @@ jobs:
steps:
- name: Setup node
uses: actions/setup-node@v2
- if: ${{ steps.docs-change.outputs.docsChange != 'docs only change' }}
+ if: ${{needs.build.outputs.docsChange != 'docs only change'}}
with:
node-version: 14
@@ -518,13 +558,6 @@ jobs:
- build
- build-wasm
- build-native
- - build-windows-i686
- - build-windows-aarch64
- - build-linux-musl
- - build-linux-arm7
- - build-linux-aarch64-gnu
- - build-android-aarch64
- - build-linux-aarch64-musl
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
steps:
@@ -606,7 +639,7 @@ jobs:
uses: actions/setup-node@v2
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
with:
- node-version: 14
+ node-version: 16
check-latest: true
- name: Install
@@ -617,18 +650,18 @@ jobs:
toolchain: nightly-2021-11-15
- name: Cache cargo registry
- uses: actions/cache@v1
+ uses: actions/cache@v2
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
with:
path: ~/.cargo/registry
- key: stable-ubuntu-18.04-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
+ key: stable-ubuntu-18.04-cargo-registry
- name: Cache cargo index
- uses: actions/cache@v1
+ uses: actions/cache@v2
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
with:
path: ~/.cargo/git
- key: stable-ubuntu-18.04-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
+ key: stable-ubuntu-18.04-cargo-index
# We use week in the turbo cache key to keep the cache from infinitely growing
- id: get-week
@@ -660,9 +693,7 @@ jobs:
# since the repo's dependencies aren't installed we need
# to install napi globally
- - run: npm i -g @napi-rs/cli@1.2.1
- - run: npm i -g turbo@1.0.28
-
+ - run: npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
- name: Build
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
run: turbo run build-native --cache-dir=".turbo"
@@ -747,95 +778,137 @@ jobs:
# Build binaries for publishing
build-native:
- needs: build
- if: ${{ needs.build.outputs.isRelease == 'true' }}
strategy:
+ fail-fast: false
matrix:
- os: [ubuntu-18.04, macos-latest, windows-latest]
- description: [default]
- include:
- - os: ubuntu-18.04
- target: x86_64-unknown-linux-gnu
- name: linux-x64-gnu
- - os: windows-latest
- target: x86_64-pc-windows-msvc
- name: win32-x64-msvc
- - os: macos-latest
- target: x86_64-apple-darwin
- name: darwin-x64
- - os: macos-latest
- target: aarch64-apple-darwin
- name: darwin-arm64
- description: m1
-
- name: next-swc - ${{ matrix.os }} - ${{ matrix.target }} - node@14
- runs-on: ${{ matrix.os }}
-
+ settings:
+ - host: macos-latest
+ target: 'x86_64-apple-darwin'
+ build: |
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
+ turbo run build-native --cache-dir=".turbo" -- --release
+ strip -x packages/next-swc/native/next-swc.*.node
+ - host: windows-latest
+ build: |
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
+ turbo run build-native --cache-dir=".turbo" -- --release
+ target: 'x86_64-pc-windows-msvc'
+ - host: windows-latest
+ build: |
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
+ turbo run build-native --cache-dir=".turbo" -- --release --target i686-pc-windows-msvc
+ target: 'i686-pc-windows-msvc'
+ - host: ubuntu-latest
+ target: 'x86_64-unknown-linux-gnu'
+ docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine-zig
+ # Node.js in Baidu need to compatible with `GLIBC_2.12`
+ build: >-
+ set -e &&
+ rustup toolchain install nightly-2021-11-15 &&
+ rustup default nightly-2021-11-15 &&
+ rustup target add x86_64-unknown-linux-gnu &&
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28 &&
+ turbo run build-native --cache-dir=".turbo" -- --release --target x86_64-unknown-linux-gnu --zig --zig-abi-suffix 2.12 &&
+ llvm-strip -x packages/next-swc/native/next-swc.*.node
+ - host: ubuntu-latest
+ target: 'x86_64-unknown-linux-musl'
+ docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
+ build: >-
+ set -e &&
+ rustup toolchain install nightly-2021-11-15 &&
+ rustup default nightly-2021-11-15 &&
+ rustup target add x86_64-unknown-linux-musl &&
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28 &&
+ turbo run build-native --cache-dir=".turbo" -- --release --target x86_64-unknown-linux-musl &&
+ strip packages/next-swc/native/next-swc.*.node
+ - host: macos-latest
+ target: 'aarch64-apple-darwin'
+ build: |
+ sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
+ export CC=$(xcrun -f clang);
+ export CXX=$(xcrun -f clang++);
+ SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
+ export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
+ turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-apple-darwin
+ strip -x packages/next-swc/native/next-swc.*.node
+ - host: ubuntu-latest
+ target: 'aarch64-unknown-linux-gnu'
+ docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine-zig
+ build: >-
+ set -e &&
+ rustup toolchain install nightly-2021-11-15 &&
+ rustup default nightly-2021-11-15 &&
+ rustup target add aarch64-unknown-linux-gnu &&
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28 &&
+ turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-gnu --zig --zig-abi-suffix 2.12 &&
+ llvm-strip -x packages/next-swc/native/next-swc.*.node
+ - host: ubuntu-18.04
+ target: 'armv7-unknown-linux-gnueabihf'
+ setup: |
+ sudo apt-get update
+ sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
+ build: |
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
+ turbo run build-native --cache-dir=".turbo" -- --release --target armv7-unknown-linux-gnueabihf
+ arm-linux-gnueabihf-strip packages/next-swc/native/next-swc.*.node
+ - host: ubuntu-latest
+ target: aarch64-linux-android
+ build: |
+ export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
+ export CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
+ export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++"
+ export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
+ turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-linux-android
+ ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-strip packages/next-swc/native/next-swc.*.node
+ - host: ubuntu-latest
+ target: armv7-linux-androideabi
+ build: |
+ export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
+ export CC="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
+ export CXX="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang++"
+ export PATH="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin:${PATH}"
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
+ turbo run build-native --cache-dir=".turbo" -- --release --target armv7-linux-androideabi
+ ${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip packages/next-swc/native/next-swc.*.node
+ - host: ubuntu-latest
+ target: 'aarch64-unknown-linux-musl'
+ docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
+ build: >-
+ set -e &&
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28 &&
+ rustup toolchain install nightly-2021-11-15 &&
+ rustup default nightly-2021-11-15 &&
+ rustup target add aarch64-unknown-linux-musl &&
+ turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-musl &&
+ llvm-strip -x packages/next-swc/native/next-swc.*.node
+ - host: windows-latest
+ target: 'aarch64-pc-windows-msvc'
+ build: |
+ npm i -g @napi-rs/cli@2.4.4 turbo@1.0.28
+ turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc
+ if: ${{ needs.build.outputs.isRelease == 'true' }}
+ needs: build
+ name: stable - ${{ matrix.settings.target }} - node@16
+ runs-on: ${{ matrix.settings.host }}
steps:
# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- if: ${{ matrix.os == 'ubuntu-18.04' }}
+ if: ${{ matrix.settings.host == 'ubuntu-18.04' }}
+ - name: tune linux network
+ run: sudo ethtool -K eth0 tx off rx off
+ if: ${{ matrix.settings.host == 'ubuntu-latest' }}
- name: tune windows network
run: Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6 -UdpIPv6
- if: ${{ matrix.os == 'windows-latest' }}
+ if: ${{ matrix.settings.host == 'windows-latest' }}
- name: tune mac network
run: sudo sysctl -w net.link.generic.system.hwcksum_tx=0 && sudo sysctl -w net.link.generic.system.hwcksum_rx=0
- if: ${{ matrix.os == 'macos-latest' }}
-
- - name: Setup node
- uses: actions/setup-node@v2
- with:
- node-version: 14
- check-latest: true
-
+ if: ${{ matrix.settings.host == 'macos-latest' }}
# we use checkout here instead of the build cache since
# it can fail to restore in different OS'
- uses: actions/checkout@v2
-
- # since the repo's dependencies aren't installed we need
- # to install napi globally
- - run: npm i -g @napi-rs/cli@1.2.1
- - run: npm i -g turbo@1.0.28
-
- - name: Install
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: nightly-2021-11-15
- target: ${{ matrix.target }}
-
- - name: Cache cargo registry
- uses: actions/cache@v1
- with:
- path: ~/.cargo/registry
- key: stable-${{ matrix.os }}-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Cache cargo index
- uses: actions/cache@v1
- with:
- path: ~/.cargo/git
- key: stable-${{ matrix.os }}-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }}
-
- - name: Turbo cache
- id: turbo-cache
- uses: actions/cache@v2
- with:
- path: .turbo
- key: turbo-${{ github.job }}-${{ matrix.name }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
- restore-keys: |
- turbo-${{ github.job }}-${{ matrix.name }}-
- turbo-${{ github.job }}-${{ matrix.name }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
- turbo-${{ github.job }}-${{ matrix.name }}-canary-${{ needs.build.outputs.weekNum }}-
-
- - name: Cross build aarch64 setup
- if: ${{ matrix.target == 'aarch64-apple-darwin' }}
- run: |
- sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*;
- export CC=$(xcrun -f clang);
- export CXX=$(xcrun -f clang++);
- SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
- export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
# We use restore-key to pick latest cache.
# We will not get exact match, but doc says
# "If there are multiple partial matches for a restore key, the action returns the most recently created cache."
@@ -844,65 +917,9 @@ jobs:
uses: actions/cache@v2
with:
path: ./packages/next-swc/target
- key: next-swc-cargo-cache-${{ matrix.os }}--${{ hashFiles('**/Cargo.lock') }}
+ key: next-swc-cargo-cache-${{ matrix.settings.target }}--${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
- next-swc-cargo-cache-${{ matrix.os }}
-
- - name: 'Build'
- shell: bash
- run: turbo run build-native --cache-dir=".turbo" -- --release --target ${{ matrix.target }}
- env:
- MACOSX_DEPLOYMENT_TARGET: '10.13'
-
- - name: Upload artifact
- uses: actions/upload-artifact@v2.2.4
- with:
- name: next-swc-binaries
- path: packages/next-swc/native/next-swc.${{ matrix.name }}.node
-
- - name: Clear the cargo caches
- run: |
- cargo install cargo-cache --no-default-features --features ci-autoclean
- cargo-cache
-
- build-windows-i686:
- needs: build
- if: ${{ needs.build.outputs.isRelease == 'true' }}
- name: next-swc - windows-i686 - node@14
- runs-on: windows-latest
- env:
- CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 32
- CARGO_PROFILE_RELEASE_LTO: 'false'
- steps:
- - name: Install node x86
- run: |
- choco install nodejs-lts --x86 -y --force
- refreshenv
-
- - name: Set 32bit Node.js path
- run: |
- echo "C:\\Program Files (x86)\\nodejs" >> $GITHUB_PATH
- shell: bash
-
- - name: Node.js arch
- run: node -e "console.log(process.arch)"
-
- # we use checkout here instead of the build cache since
- # it can fail to restore in different OS'
- - uses: actions/checkout@v2
-
- # since the repo's dependencies aren't installed we need
- # to install napi globally
- - run: npm i -g @napi-rs/cli@1.2.1
- - run: npm i -g turbo@1.0.28
- - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: nightly-2021-11-15
- override: true
- target: i686-pc-windows-msvc
-
+ next-swc-cargo-cache-${{ matrix.settings.target }}
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v2
@@ -914,349 +931,58 @@ jobs:
turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
- - name: Build
- shell: bash
- run: turbo run build-native --cache-dir=".turbo" -- --release --target i686-pc-windows-msvc
-
- - name: Upload artifact
- uses: actions/upload-artifact@v2
- with:
- name: next-swc-binaries
- path: packages/next-swc/native/next-swc.win32-ia32-msvc.node
-
- build-windows-aarch64:
- needs: build
- if: ${{ needs.build.outputs.isRelease == 'true' }}
- name: next-swc - windows-aarch64 - node@14
- runs-on: windows-latest
- steps:
- name: Setup node
uses: actions/setup-node@v2
+ if: ${{ !matrix.settings.docker }}
with:
- node-version: 14
-
- # we use checkout here instead of the build cache since
- # it can fail to restore in different OS'
- - uses: actions/checkout@v2
-
- # since the repo's dependencies aren't installed we need
- # to install napi globally
- - run: npm i -g @napi-rs/cli@1.2.1
- - run: npm i -g turbo@1.0.28
- - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: nightly-2021-11-15
- override: true
- target: aarch64-pc-windows-msvc
-
- - name: Turbo Cache
- id: turbo-cache
- uses: actions/cache@v2
- with:
- path: .turbo
- key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
- restore-keys: |
- turbo-${{ github.job }}-
- turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
- turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
-
- - name: Build
- shell: bash
- run: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-pc-windows-msvc
-
- - name: Upload artifact
- uses: actions/upload-artifact@v2
- with:
- name: next-swc-binaries
- path: packages/next-swc/native/next-swc.win32-arm64-msvc.node
-
- build-linux-musl:
- needs: build
- if: ${{ needs.build.outputs.isRelease == 'true' }}
- name: next-swc - linux-musl - node@lts
- runs-on: ubuntu-latest
- steps:
- # we use checkout here instead of the build cache since
- # it can fail to restore in different OS'
- - uses: actions/checkout@v2
-
- - name: Login to registry
- run: |
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
- env:
- DOCKER_REGISTRY_URL: ghcr.io
- DOCKER_USERNAME: ${{ github.actor }}
- DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Cache
- uses: actions/cache@v2
- with:
- path: |
- target/
- key: linux-musl-publish-integration
-
- - name: Pull docker image
- run: |
- docker pull ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
- docker tag ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine builder
-
- - name: Turbo Cache
- id: turbo-cache
- uses: actions/cache@v2
- with:
- path: .turbo
- key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
- restore-keys: |
- turbo-${{ github.job }}-
- turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
- turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
-
- - name: 'Build'
- run: |
- docker run --rm -v ~/.cargo/git:/root/.cargo/git -v ~/.cargo/registry:/root/.cargo/registry -v $(pwd):/build -w /build builder sh -c "npm i -g @napi-rs/cli@1.2.1 && npm i -g turbo@1.0.28 && turbo run build-native --cache-dir=".turbo" -- --release --target x86_64-unknown-linux-musl"
-
- - name: Upload artifact
- uses: actions/upload-artifact@v2
- with:
- name: next-swc-binaries
- path: packages/next-swc/native/next-swc.linux-x64-musl.node
-
- build-linux-aarch64-gnu:
- needs: build
- if: ${{ needs.build.outputs.isRelease == 'true' }}
- name: next-swc - aarch64-unknown-linux-gnu - node@14
- runs-on: ubuntu-18.04
- steps:
- - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
-
- - name: Setup node
- uses: actions/setup-node@v2
- with:
- node-version: 14
-
- # we use checkout here instead of the build cache since
- # it can fail to restore in different OS'
- - uses: actions/checkout@v2
-
- # since the repo's dependencies aren't installed we need
- # to install napi globally
- - run: npm i -g @napi-rs/cli@1.2.1
- - run: npm i -g turbo@1.0.28
+ node-version: 16
+ check-latest: true
+ cache: yarn
- - name: Install Rust
+ - name: Install
uses: actions-rs/toolchain@v1
+ if: ${{ !matrix.settings.docker }}
with:
profile: minimal
- toolchain: nightly-2021-11-15
override: true
- target: aarch64-unknown-linux-gnu
-
- - name: Cache
- uses: actions/cache@v2
- with:
- path: |
- target/
- key: aarch64-linux-gnu-publish-integration
-
- - name: Install cross compile toolchain
- run: |
- sudo apt-get update
- sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu -y
-
- - name: Turbo Cache
- id: turbo-cache
- uses: actions/cache@v2
- with:
- path: .turbo
- key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
- restore-keys: |
- turbo-${{ github.job }}-
- turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
- turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
-
- - name: Cross build aarch64
- if: ${{ steps.binary-cache.outputs.cache-hit != 'true' }}
- run: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-gnu
-
- - name: Upload artifact
- uses: actions/upload-artifact@v2
- with:
- name: next-swc-binaries
- path: packages/next-swc/native/next-swc.linux-arm64-gnu.node
-
- build-linux-aarch64-musl:
- needs: build
- if: ${{ needs.build.outputs.isRelease == 'true' }}
- name: next-swc - aarch64-unknown-linux-musl - node@14
- runs-on: ubuntu-18.04
- steps:
- - name: Setup node
- uses: actions/setup-node@v2
- with:
- node-version: 14
-
- # we use checkout here instead of the build cache since
- # it can fail to restore in different OS'
- - uses: actions/checkout@v2
-
- # since the repo's dependencies aren't installed we need
- # to install napi globally
- - run: npm i -g @napi-rs/cli@1.2.1
- - run: npm i -g turbo@1.0.28
- - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
toolchain: nightly-2021-11-15
- override: true
- target: aarch64-unknown-linux-musl
+ target: ${{ matrix.settings.target }}
- - name: Cache
- uses: actions/cache@v2
- with:
- path: |
- target/
- key: aarch64-linux-musl-publish-integration
-
- - name: Install cross compile toolchain
- run: |
- sudo apt-get update
- sudo apt-get install gcc-aarch64-linux-gnu -y
-
- - name: Turbo Cache
- id: turbo-cache
- uses: actions/cache@v2
- with:
- path: .turbo
- key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
- restore-keys: |
- turbo-${{ github.job }}-
- turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
- turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
-
- - name: Cross build aarch64
- run: turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-unknown-linux-musl
-
- - name: Upload artifact
- uses: actions/upload-artifact@v2
- with:
- name: next-swc-binaries
- path: packages/next-swc/native/next-swc.linux-arm64-musl.node
-
- build-linux-arm7:
- needs: build
- if: ${{ needs.build.outputs.isRelease == 'true' }}
- name: next-swc - arm7-unknown-linux-gnu - node@14
- runs-on: ubuntu-18.04
- steps:
- - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
-
- - name: Setup node
- uses: actions/setup-node@v2
- with:
- node-version: 14
-
- # we use checkout here instead of the build cache since
- # it can fail to restore in different OS'
- - uses: actions/checkout@v2
-
- # since the repo's dependencies aren't installed we need
- # to install napi globally
- - run: npm i -g @napi-rs/cli@1.2.1
- - run: npm i -g turbo@1.0.28
-
- - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: nightly-2021-11-15
- override: true
- target: armv7-unknown-linux-gnueabihf
-
- - name: Cache
+ - name: Cache cargo registry
uses: actions/cache@v2
with:
- path: |
- target/
- key: arm7-linux-gnu-publish-integration
-
- - name: Install cross compile toolchain
- run: |
- sudo apt-get update
- sudo apt-get install gcc-arm-linux-gnueabihf -y
+ path: ~/.cargo/registry
+ key: ${{ matrix.settings.target }}-cargo-registry
- - name: Turbo Cache
- id: turbo-cache
+ - name: Cache cargo index
uses: actions/cache@v2
with:
- path: .turbo
- key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
- restore-keys: |
- turbo-${{ github.job }}-
- turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
- turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
-
- - name: Cross build aarch64
- run: turbo run build-native --cache-dir=".turbo" -- --release --target armv7-unknown-linux-gnueabihf
-
- - name: Upload artifact
- uses: actions/upload-artifact@v2
- with:
- name: next-swc-binaries
- path: packages/next-swc/native/next-swc.linux-arm-gnueabihf.node
-
- build-android-aarch64:
- needs: build
- if: ${{ needs.build.outputs.isRelease == 'true' }}
- name: next-swc - Android - aarch64
- runs-on: macos-latest
- steps:
- - name: Setup node
- uses: actions/setup-node@v2
- with:
- node-version: 14
-
- # we use checkout here instead of the build cache since
- # it can fail to restore in different OS'
- - uses: actions/checkout@v2
-
- # since the repo's dependencies aren't installed we need
- # to install napi globally
- - run: npm i -g @napi-rs/cli@1.2.1
- - run: npm i -g turbo@1.0.28
+ path: ~/.cargo/git
+ key: ${{ matrix.settings.target }}-cargo-index
- - name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: nightly-2021-11-15
- override: true
- target: aarch64-linux-android
+ - name: Setup toolchain
+ run: ${{ matrix.settings.setup }}
+ if: ${{ matrix.settings.setup }}
+ shell: bash
- - name: Turbo Cache
- id: turbo-cache
- uses: actions/cache@v2
+ - name: Build in docker
+ uses: addnab/docker-run-action@v3
+ if: ${{ matrix.settings.docker }}
with:
- path: .turbo
- key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-${{ github.sha }}
- restore-keys: |
- turbo-${{ github.job }}-
- turbo-${{ github.job }}-${{ github.ref_name }}-${{ needs.build.outputs.weekNum }}-
- turbo-${{ github.job }}-canary-${{ needs.build.outputs.weekNum }}-
+ image: ${{ matrix.settings.docker }}
+ options: -v ${{ env.HOME }}/.cargo/git:/root/.cargo/git -v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry -v ${{ github.workspace }}:/build -w /build
+ run: ${{ matrix.settings.build }}
- - name: Build
+ - name: 'Build'
+ run: ${{ matrix.settings.build }}
+ if: ${{ !matrix.settings.docker }}
shell: bash
- run: |
- export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/darwin-x86_64/bin/aarch64-linux-android24-clang"
- turbo run build-native --cache-dir=".turbo" -- --release --target aarch64-linux-android
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: next-swc-binaries
- path: packages/next-swc/native/next-swc.android-arm64.node
+ path: packages/next-swc/native/next-swc.*.node
build-wasm:
needs: build
diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml
index bf90a0aaf429..41b7e8c78beb 100644
--- a/.github/workflows/lock.yml
+++ b/.github/workflows/lock.yml
@@ -20,8 +20,8 @@ jobs:
steps:
- uses: dessant/lock-threads@v3
with:
- github-token: ${{ secrets.LOCK_TOKEN }}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
issue-inactive-days: 30
- issue-comment: 'This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.'
+ issue-comment: 'This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.'
pr-inactive-days: 30
log-output: true
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 9c858d67608b..cb6abe0bc488 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -16,7 +16,7 @@ jobs:
with:
repo-token: ${{ secrets.STALE_TOKEN }}
only-labels: 'please add a complete reproduction'
- close-issue-message: 'This issue has been automatically closed after 30 days of inactivity with no reproduction. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.'
+ close-issue-message: 'This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think this was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.'
days-before-issue-close: 1
days-before-issue-stale: 30
days-before-pr-close: -1
diff --git a/docs/advanced-features/output-file-tracing.md b/docs/advanced-features/output-file-tracing.md
index dce5f2cc6286..c325d05fc3b0 100644
--- a/docs/advanced-features/output-file-tracing.md
+++ b/docs/advanced-features/output-file-tracing.md
@@ -34,7 +34,7 @@ module.exports = {
This will create a folder at `.next/standalone` which can then be deployed on it's own without installing `node_modules`.
-Additionally, a minimal `server.js` file is also output which can be used instead of `next start`. This minimal server does not copy the `.next/static` directory by default as this should ideally be handled by a CDN instead, although it can be copied to the `standalone` folder manually and the `server.js` file will serve it automatically.
+Additionally, a minimal `server.js` file is also output which can be used instead of `next start`. This minimal server does not copy the `public` or `.next/static` folders by default as these should ideally be handled by a CDN instead, although these folders can be copied to the `standalone/public` and `standalone/.next/static` folders manually, after which `server.js` file will serve these automatically.
## Caveats
diff --git a/docs/basic-features/font-optimization.md b/docs/basic-features/font-optimization.md
index a36b731b29b4..217267338e5a 100644
--- a/docs/basic-features/font-optimization.md
+++ b/docs/basic-features/font-optimization.md
@@ -23,29 +23,7 @@ By default, Next.js will automatically inline font CSS at build time, eliminatin
## Usage
-To add a web font to your Next.js application, override `next/head`. For example, you can add a font to a specific page:
-
-```js
-// pages/index.js
-
-import Head from 'next/head'
-
-export default function IndexPage() {
- return (
-
-
-
-
-
Hello world!
-
- )
-}
-```
-
-or to your entire application with a [Custom `Document`](/docs/advanced-features/custom-document.md).
+To add a web font to your Next.js application, add the font to a [Custom `Document`](/docs/advanced-features/custom-document.md).
```js
// pages/_document.js
@@ -74,6 +52,8 @@ class MyDocument extends Document {
export default MyDocument
```
+Note that we don't recommend adding fonts with `next/head`, as this only applies the font to the particular page and won't work with a streaming architecture.
+
Automatic Webfont Optimization currently supports Google Fonts and Typekit with support for other font providers coming soon. We're also planning to add control over [loading strategies](https://github.com/vercel/next.js/issues/21555) and `font-display` values.
See [Google Font Display](https://nextjs.org/docs/messages/google-font-display) for more information.
diff --git a/docs/faq.md b/docs/faq.md
index cd97832dfbcf..fe9ca6838034 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -7,7 +7,7 @@ description: Get to know more about Next.js with the frequently asked questions.
Is Next.js production ready?
Yes! Next.js is used by many of the top websites in the world. See the
- Showcase for more info.
+ Showcase for more info.
diff --git a/docs/testing.md b/docs/testing.md
index 6b4bdfaa17ce..2b3c6f692bca 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -232,7 +232,7 @@ Run `npm run build` and `npm run start`, then run `npm run test:e2e` in another
### Running Playwright on Continuous Integration (CI)
-Playwright will by default run your tests in the [headed mode](https://playwright.dev/docs/ci). To install all the Playwright dependencies, run `npx playwright install-deps`.
+Playwright will by default run your tests in the [headless mode]https://playwright.dev/docs/ci#running-headed). To install all the Playwright dependencies, run `npx playwright install-deps`.
You can learn more about Playwright and Continuous Integration from these resources:
diff --git a/errors/no-stylesheets-in-head-component.md b/errors/no-stylesheets-in-head-component.md
index 3e3901a682dd..319cae672bfe 100644
--- a/errors/no-stylesheets-in-head-component.md
+++ b/errors/no-stylesheets-in-head-component.md
@@ -18,7 +18,7 @@ Add the stylesheet in a custom `Document` component.
```jsx
// pages/_document.js
-import Document, { Html, Head, Main, NextScript } from 'next/document'
+import { Html, Head, Main, NextScript } from 'next/document'
export default function Document() {
return (
diff --git a/errors/swc-disabled.md b/errors/swc-disabled.md
index 701f260c785b..ce026dd0e882 100644
--- a/errors/swc-disabled.md
+++ b/errors/swc-disabled.md
@@ -10,8 +10,6 @@ When an application has custom Babel configuration Next.js will automatically op
Many of the integrations with external libraries that currently require custom Babel transformations will be ported to Rust-based SWC transforms in the near future. These include but are not limited to:
-- Styled Components
- Emotion
-- Relay
In order to prioritize transforms that will help you adopt SWC please provide your `.babelrc` on [the feedback thread](https://github.com/vercel/next.js/discussions/30174).
diff --git a/examples/custom-server-hapi/next-env.d.ts b/examples/custom-server-hapi/next-env.d.ts
new file mode 100644
index 000000000000..4f11a03dc6cc
--- /dev/null
+++ b/examples/custom-server-hapi/next-env.d.ts
@@ -0,0 +1,5 @@
+///
+///
+
+// NOTE: This file should not be edited
+// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/examples/custom-server-hapi/next-wrapper.js b/examples/custom-server-hapi/next-wrapper.js
deleted file mode 100644
index 431191084fa8..000000000000
--- a/examples/custom-server-hapi/next-wrapper.js
+++ /dev/null
@@ -1,26 +0,0 @@
-const nextHandlerWrapper = (app) => {
- const handler = app.getRequestHandler()
- return async ({ raw, url, query }, h) => {
- url.query = query
- await handler(raw.req, raw.res, url)
- return h.close
- }
-}
-
-const pathWrapper =
- (app, pathName, opts) =>
- async ({ raw, query, params }, h) => {
- const html = await app.render(
- raw.req,
- raw.res,
- pathName,
- { ...query, ...params },
- opts
- )
- return h.response(html).code(raw.res.statusCode)
- }
-
-module.exports = {
- pathWrapper,
- nextHandlerWrapper,
-}
diff --git a/examples/custom-server-hapi/nodemon.json b/examples/custom-server-hapi/nodemon.json
new file mode 100644
index 000000000000..c9fa4132a155
--- /dev/null
+++ b/examples/custom-server-hapi/nodemon.json
@@ -0,0 +1,5 @@
+{
+ "watch": ["server"],
+ "exec": "ts-node --project tsconfig.server.json server/server.ts",
+ "ext": "js ts"
+}
diff --git a/examples/custom-server-hapi/package.json b/examples/custom-server-hapi/package.json
index 6de2563a24e1..60b0362bd7c6 100644
--- a/examples/custom-server-hapi/package.json
+++ b/examples/custom-server-hapi/package.json
@@ -1,15 +1,24 @@
{
"private": true,
"scripts": {
- "dev": "node server.js",
- "build": "next build",
- "start": "cross-env NODE_ENV=production node server.js"
+ "dev": "nodemon",
+ "build": "next build && tsc --project tsconfig.server.json",
+ "start": "cross-env NODE_ENV=production node dist/server.js"
},
"dependencies": {
- "@hapi/hapi": "^18.3.1",
- "cross-env": "^5.2.0",
+ "@hapi/hapi": "^20.2.1",
+ "cross-env": "^7.0.3",
"next": "latest",
"react": "^17.0.2",
"react-dom": "^17.0.2"
+ },
+ "devDependencies": {
+ "@types/hapi__hapi": "^20.0.10",
+ "@types/node": "^16.11.25",
+ "@types/react": "^17.0.39",
+ "@types/react-dom": "^17.0.11",
+ "nodemon": "^2.0.15",
+ "ts-node": "^10.5.0",
+ "typescript": "^4.5.5"
}
}
diff --git a/examples/custom-server-hapi/pages/a.js b/examples/custom-server-hapi/pages/a.tsx
similarity index 100%
rename from examples/custom-server-hapi/pages/a.js
rename to examples/custom-server-hapi/pages/a.tsx
diff --git a/examples/custom-server-hapi/pages/b.js b/examples/custom-server-hapi/pages/b.tsx
similarity index 100%
rename from examples/custom-server-hapi/pages/b.js
rename to examples/custom-server-hapi/pages/b.tsx
diff --git a/examples/custom-server-hapi/pages/index.js b/examples/custom-server-hapi/pages/index.tsx
similarity index 100%
rename from examples/custom-server-hapi/pages/index.js
rename to examples/custom-server-hapi/pages/index.tsx
diff --git a/examples/custom-server-hapi/server/next-wrapper.ts b/examples/custom-server-hapi/server/next-wrapper.ts
new file mode 100644
index 000000000000..596aac18c613
--- /dev/null
+++ b/examples/custom-server-hapi/server/next-wrapper.ts
@@ -0,0 +1,16 @@
+import type { NextServer } from 'next/dist/server/next'
+import type { Lifecycle } from '@hapi/hapi'
+import type { NextUrlWithParsedQuery } from 'next/dist/server/request-meta'
+
+const nextHandlerWrapper = (app: NextServer): Lifecycle.Method => {
+ const handler = app.getRequestHandler()
+
+ return async ({ raw, url, query }, h) => {
+ const nextUrl = url as unknown as NextUrlWithParsedQuery
+ nextUrl.query = query
+ await handler(raw.req, raw.res, nextUrl)
+ return h.close
+ }
+}
+
+export { nextHandlerWrapper }
diff --git a/examples/custom-server-hapi/server.js b/examples/custom-server-hapi/server/server.ts
similarity index 81%
rename from examples/custom-server-hapi/server.js
rename to examples/custom-server-hapi/server/server.ts
index 90101efe9d8e..ea7dc52ef78e 100644
--- a/examples/custom-server-hapi/server.js
+++ b/examples/custom-server-hapi/server/server.ts
@@ -1,6 +1,6 @@
-const next = require('next')
-const Hapi = require('@hapi/hapi')
-const { /* pathWrapper, */ nextHandlerWrapper } = require('./next-wrapper')
+import next from 'next'
+import Hapi from '@hapi/hapi'
+import { nextHandlerWrapper } from './next-wrapper'
const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production'
diff --git a/examples/custom-server-hapi/tsconfig.json b/examples/custom-server-hapi/tsconfig.json
new file mode 100644
index 000000000000..fe57f7dbf638
--- /dev/null
+++ b/examples/custom-server-hapi/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "compilerOptions": {
+ "target": "es5",
+ "lib": ["dom", "dom.iterable", "esnext"],
+ "baseUrl": ".",
+ "allowJs": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "forceConsistentCasingInFileNames": true,
+ "noEmit": true,
+ "incremental": true,
+ "esModuleInterop": true,
+ "module": "esnext",
+ "moduleResolution": "node",
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "jsx": "preserve"
+ },
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
+ "exclude": ["node_modules"]
+}
diff --git a/examples/custom-server-hapi/tsconfig.server.json b/examples/custom-server-hapi/tsconfig.server.json
new file mode 100644
index 000000000000..0cf1e05d407a
--- /dev/null
+++ b/examples/custom-server-hapi/tsconfig.server.json
@@ -0,0 +1,12 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "module": "commonjs",
+ "outDir": "dist",
+ "lib": ["es2019"],
+ "target": "es2019",
+ "isolatedModules": false,
+ "noEmit": false
+ },
+ "include": ["server/**/*.ts"]
+}
diff --git a/examples/with-docker-multi-env/.dockerignore b/examples/with-docker-multi-env/.dockerignore
index 4d72057ef286..0d8280377a55 100644
--- a/examples/with-docker-multi-env/.dockerignore
+++ b/examples/with-docker-multi-env/.dockerignore
@@ -5,3 +5,4 @@ npm-debug.log
README.md
.next
docker
+.git
diff --git a/examples/with-docker/.dockerignore b/examples/with-docker/.dockerignore
index d862f96f1b93..c5500558baf2 100644
--- a/examples/with-docker/.dockerignore
+++ b/examples/with-docker/.dockerignore
@@ -3,4 +3,5 @@ Dockerfile
node_modules
npm-debug.log
README.md
-.next
\ No newline at end of file
+.next
+.git
diff --git a/examples/with-sentry/next.config.js b/examples/with-sentry/next.config.js
index 3ab525185afe..c5047243cc2b 100644
--- a/examples/with-sentry/next.config.js
+++ b/examples/with-sentry/next.config.js
@@ -9,7 +9,9 @@ const moduleExports = {
// Your existing module.exports
}
-const sentryWebpackPluginOptions = {
+// Make sure adding Sentry options is the last code to run before exporting, to
+// ensure that your source maps include changes from all other Webpack plugins
+module.exports = withSentryConfig(moduleExports, {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
@@ -17,8 +19,4 @@ const sentryWebpackPluginOptions = {
// urlPrefix, include, ignore
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
-}
-
-// Make sure adding Sentry options is the last code to run before exporting, to
-// ensure that your source maps include changes from all other Webpack plugins
-module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions)
+})
diff --git a/examples/with-supertokens/package.json b/examples/with-supertokens/package.json
index 62164f491c28..5f4e2067c308 100644
--- a/examples/with-supertokens/package.json
+++ b/examples/with-supertokens/package.json
@@ -10,9 +10,6 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"supertokens-auth-react": "^0.18.0",
- "supertokens-node": "^8.1.0"
- },
- "devDependencies": {
- "eslint-config-next": "11.0.1"
+ "supertokens-node": "^9.0.0"
}
}
diff --git a/examples/with-tailwindcss/pages/index.tsx b/examples/with-tailwindcss/pages/index.tsx
index 6efe2057f183..94e17a5facfb 100644
--- a/examples/with-tailwindcss/pages/index.tsx
+++ b/examples/with-tailwindcss/pages/index.tsx
@@ -1,6 +1,8 @@
+import type { NextPage } from 'next'
import Head from 'next/head'
+import Image from 'next/image'
-export default function Home() {
+const Home: NextPage = () => {
return (
@@ -68,15 +70,17 @@ export default function Home() {
)
}
+
+export default Home
diff --git a/examples/with-tailwindcss/prettier.config.js b/examples/with-tailwindcss/prettier.config.js
index f18d82f4928b..3f714ac456ec 100644
--- a/examples/with-tailwindcss/prettier.config.js
+++ b/examples/with-tailwindcss/prettier.config.js
@@ -1,6 +1,4 @@
module.exports = {
- arrowParens: 'always',
singleQuote: true,
- tabWidth: 2,
semi: false,
}
diff --git a/lerna.json b/lerna.json
index 3aa8531b8bb4..486aa0517869 100644
--- a/lerna.json
+++ b/lerna.json
@@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
- "version": "12.1.0"
+ "version": "12.1.1-canary.1"
}
diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json
index 4e57156340a9..b961aed66b02 100644
--- a/packages/create-next-app/package.json
+++ b/packages/create-next-app/package.json
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"keywords": [
"react",
"next",
diff --git a/packages/create-next-app/templates/default/gitignore b/packages/create-next-app/templates/default/gitignore
index 601f8c86ddb6..55175ef867e0 100644
--- a/packages/create-next-app/templates/default/gitignore
+++ b/packages/create-next-app/templates/default/gitignore
@@ -26,10 +26,7 @@ yarn-error.log*
.pnpm-debug.log*
# local env files
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
+.env*.local
# vercel
.vercel
diff --git a/packages/create-next-app/templates/typescript/gitignore b/packages/create-next-app/templates/typescript/gitignore
index 7d093c39ff4e..737d87210923 100644
--- a/packages/create-next-app/templates/typescript/gitignore
+++ b/packages/create-next-app/templates/typescript/gitignore
@@ -26,10 +26,7 @@ yarn-error.log*
.pnpm-debug.log*
# local env files
-.env.local
-.env.development.local
-.env.test.local
-.env.production.local
+.env*.local
# vercel
.vercel
diff --git a/packages/eslint-config-next/package.json b/packages/eslint-config-next/package.json
index c141e9f35c9d..19ff3b85f728 100644
--- a/packages/eslint-config-next/package.json
+++ b/packages/eslint-config-next/package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
@@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
- "@next/eslint-plugin-next": "12.1.0",
+ "@next/eslint-plugin-next": "12.1.1-canary.1",
"@rushstack/eslint-patch": "^1.0.8",
"@typescript-eslint/parser": "^5.0.0",
"eslint-import-resolver-node": "^0.3.4",
diff --git a/packages/eslint-plugin-next/package.json b/packages/eslint-plugin-next/package.json
index 16f5abeb55cb..6db6d1aa79ae 100644
--- a/packages/eslint-plugin-next/package.json
+++ b/packages/eslint-plugin-next/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"description": "ESLint plugin for NextJS.",
"main": "lib/index.js",
"license": "MIT",
diff --git a/packages/next-bundle-analyzer/package.json b/packages/next-bundle-analyzer/package.json
index 90bd9a3bccf2..39200cd66ce0 100644
--- a/packages/next-bundle-analyzer/package.json
+++ b/packages/next-bundle-analyzer/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"main": "index.js",
"license": "MIT",
"repository": {
diff --git a/packages/next-codemod/package.json b/packages/next-codemod/package.json
index 25b85d8f7df4..b74eac767ca8 100644
--- a/packages/next-codemod/package.json
+++ b/packages/next-codemod/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"license": "MIT",
"dependencies": {
"chalk": "4.1.0",
@@ -9,7 +9,7 @@
"globby": "11.0.1",
"inquirer": "7.3.3",
"is-git-clean": "1.1.0",
- "jscodeshift": "^0.6.4",
+ "jscodeshift": "0.13.1",
"meow": "7.0.1"
},
"files": [
diff --git a/packages/next-env/package.json b/packages/next-env/package.json
index 42a1b5c61c38..e07576c1a98f 100644
--- a/packages/next-env/package.json
+++ b/packages/next-env/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/env",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"keywords": [
"react",
"next",
diff --git a/packages/next-mdx/package.json b/packages/next-mdx/package.json
index 06c4c6b95eb7..f4996fbeb4f1 100644
--- a/packages/next-mdx/package.json
+++ b/packages/next-mdx/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"main": "index.js",
"license": "MIT",
"repository": {
diff --git a/packages/next-plugin-storybook/package.json b/packages/next-plugin-storybook/package.json
index 2fedae0f986f..64745c06f561 100644
--- a/packages/next-plugin-storybook/package.json
+++ b/packages/next-plugin-storybook/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
diff --git a/packages/next-polyfill-module/package.json b/packages/next-polyfill-module/package.json
index 9f6788d25e1b..92f8b50f373b 100644
--- a/packages/next-polyfill-module/package.json
+++ b/packages/next-polyfill-module/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
diff --git a/packages/next-polyfill-nomodule/package.json b/packages/next-polyfill-nomodule/package.json
index 3882f7dc5d81..c0e2b35bd6fe 100644
--- a/packages/next-polyfill-nomodule/package.json
+++ b/packages/next-polyfill-nomodule/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
diff --git a/packages/next-swc/.cargo/config.toml b/packages/next-swc/.cargo/config.toml
index 1fb099927fed..1d7e537b13c3 100644
--- a/packages/next-swc/.cargo/config.toml
+++ b/packages/next-swc/.cargo/config.toml
@@ -21,7 +21,7 @@ rustflags = [
]
[target.aarch64-unknown-linux-musl]
-linker = "aarch64-linux-gnu-gcc"
+linker = "aarch64-linux-musl-gcc"
rustflags = [
"-C",
"target-feature=-crt-static",
diff --git a/packages/next-swc/Cargo.lock b/packages/next-swc/Cargo.lock
index 603918b6e739..dd6333b29e4f 100644
--- a/packages/next-swc/Cargo.lock
+++ b/packages/next-swc/Cargo.lock
@@ -812,7 +812,7 @@ dependencies = [
"swc_css",
"swc_ecma_loader",
"swc_ecma_transforms_testing",
- "swc_ecmascript",
+ "swc_ecmascript 0.114.2",
"swc_node_base",
"swc_stylis",
"testing",
@@ -839,7 +839,7 @@ dependencies = [
"swc_bundler",
"swc_common",
"swc_ecma_loader",
- "swc_ecmascript",
+ "swc_ecmascript 0.114.2",
"swc_node_base",
]
@@ -915,9 +915,9 @@ dependencies = [
[[package]]
name = "once_cell"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
+checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
[[package]]
name = "opaque-debug"
@@ -1589,15 +1589,15 @@ dependencies = [
"serde",
"swc_atoms",
"swc_common",
- "swc_ecmascript",
+ "swc_ecmascript 0.112.6",
"tracing",
]
[[package]]
name = "swc"
-version = "0.121.7"
+version = "0.126.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6d2753ff42ccbcf55b444c5b5c75bdf8d711b9c022c6117a1945a5b259721da"
+checksum = "1c2373a6f6dddd42719a2d8fcd9989849915ae15691fd1a75f6b04d14a6cab91"
dependencies = [
"ahash",
"anyhow",
@@ -1628,7 +1628,7 @@ dependencies = [
"swc_ecma_transforms_optimization",
"swc_ecma_utils",
"swc_ecma_visit",
- "swc_ecmascript",
+ "swc_ecmascript 0.114.2",
"swc_node_comments",
"swc_visit",
"tracing",
@@ -1646,9 +1646,9 @@ dependencies = [
[[package]]
name = "swc_bundler"
-version = "0.105.0"
+version = "0.107.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6288db2c327430667c9ab30fb053a76f6dbb4868569ef9833e04d355ef1e1d96"
+checksum = "c5b6761f9b57072658a42ff25304a7edc7f8444024726ed27d5861e4644c1ffe"
dependencies = [
"ahash",
"anyhow",
@@ -1711,9 +1711,9 @@ dependencies = [
[[package]]
name = "swc_css"
-version = "0.46.0"
+version = "0.87.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75a4e8913ddbf92a39e087996c30a80dfcac5192adc3fb63cd3beabe8975b0c8"
+checksum = "9b4b570606b904949dcb186af2f32ee57a7731002d3cb72e21183edef0c1f2dc"
dependencies = [
"swc_css_ast",
"swc_css_codegen",
@@ -1724,9 +1724,9 @@ dependencies = [
[[package]]
name = "swc_css_ast"
-version = "0.42.0"
+version = "0.79.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0861c74eba5c61ade5c1ef3a14e3e0fd0699f20e5619bbc292c2ac4f9463617"
+checksum = "00c07118ba87a4139be7d78bff15ba33438195f2eb35376157a5ca2e60cc54c4"
dependencies = [
"is-macro",
"serde",
@@ -1737,9 +1737,9 @@ dependencies = [
[[package]]
name = "swc_css_codegen"
-version = "0.44.0"
+version = "0.84.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de309d82614f8d3613c27f4ccafbacc1ed524ca5bfd7792387f76314d5131df2"
+checksum = "8d192566df252168bc1d0a206f0e783e30816a2c75c43ddd04b7ddd703b9d396"
dependencies = [
"auto_impl",
"bitflags",
@@ -1764,9 +1764,9 @@ dependencies = [
[[package]]
name = "swc_css_parser"
-version = "0.46.0"
+version = "0.85.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ac061b34fb0a3afa4ac5777b705c149f91c2ab29fc5f8463acb2bf8a17e02938"
+checksum = "c2550222e793736aa09d9361b43a04ca8b9467588bb73cf02ba827484c1243a4"
dependencies = [
"bitflags",
"lexical",
@@ -1777,9 +1777,9 @@ dependencies = [
[[package]]
name = "swc_css_utils"
-version = "0.39.0"
+version = "0.76.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94cdc01e5631f63f8d4c52545d9a61ed5a6616a2d8d4d4b6235ea2ff779ae80c"
+checksum = "7ddab011e673ffd3b3d6dea612d113714caaeab1ec1673adb70b62f5a5727bbe"
dependencies = [
"swc_atoms",
"swc_common",
@@ -1789,9 +1789,9 @@ dependencies = [
[[package]]
name = "swc_css_visit"
-version = "0.41.0"
+version = "0.78.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce49ce82798c85e1a8f2a46552b6ef9530868302c333f8b135da3b5c9d5b1ca8"
+checksum = "f9489996952eb66ba087c15258c41e34f4a5466e87db90df4e54557f4f47751c"
dependencies = [
"swc_atoms",
"swc_common",
@@ -1862,13 +1862,16 @@ dependencies = [
[[package]]
name = "swc_ecma_lints"
-version = "0.13.1"
+version = "0.14.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a4c9664c8261d32d1dff6df9978c4aa3b0ac686b8bbcab9d4cc8a2f56c9efdfc"
+checksum = "9dc7e7d669e28b2df325d9a232f1d74e7b77d2606c04f0f70cc37e38dcf49ad3"
dependencies = [
+ "ahash",
"auto_impl",
+ "dashmap",
"parking_lot",
"rayon",
+ "regex",
"serde",
"swc_atoms",
"swc_common",
@@ -1899,9 +1902,9 @@ dependencies = [
[[package]]
name = "swc_ecma_minifier"
-version = "0.72.1"
+version = "0.74.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6541c47325e3b6b2c0a1ecdff32049bc3ae83765eb09e49f532ed4fcbe54a6e7"
+checksum = "184e0e6337f2a4cfff36e3456e7937846dadf0b47833b7f711654e4acd0a13aa"
dependencies = [
"ahash",
"indexmap",
@@ -1928,9 +1931,9 @@ dependencies = [
[[package]]
name = "swc_ecma_parser"
-version = "0.88.2"
+version = "0.88.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "016e15f5837f1fb954c7a693a0229fc25cba2982ab9c13773db44ce0e00dc275"
+checksum = "bfd30c93f08afdf29226b5695e45aadcc6ce452470cc63ea87a7eb53d29bb02b"
dependencies = [
"either",
"enum_kind",
@@ -1948,9 +1951,9 @@ dependencies = [
[[package]]
name = "swc_ecma_preset_env"
-version = "0.88.0"
+version = "0.90.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ebd2ffd8d26a5d52d86da8d643038da2952e86993998f120554a80e0a64e2b5"
+checksum = "5335f575d5cd4fcefe8bb3c52fa8dc8d59d461f07da43fb2ac6c31689aa88e0f"
dependencies = [
"ahash",
"anyhow",
@@ -1974,9 +1977,9 @@ dependencies = [
[[package]]
name = "swc_ecma_transforms"
-version = "0.115.3"
+version = "0.117.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "142a3d2bd7a1d78fd2112a98cb295b7b6aa67c2c590d639650882cd658fc43c9"
+checksum = "b1fa132c1a736c2c61736958f1102249348a4cc911c7f60e3a6255aa49c1c03e"
dependencies = [
"swc_atoms",
"swc_common",
@@ -2017,9 +2020,9 @@ dependencies = [
[[package]]
name = "swc_ecma_transforms_classes"
-version = "0.45.0"
+version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8fec6a1780299ff1006539b71bed431bde5e48c9773235de4ccc414467ff0f2"
+checksum = "ac8983235c6902879b65dcb1003d4084adf094408c96d94d62d3f33f44c3fa8e"
dependencies = [
"swc_atoms",
"swc_common",
@@ -2031,9 +2034,9 @@ dependencies = [
[[package]]
name = "swc_ecma_transforms_compat"
-version = "0.69.0"
+version = "0.70.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7e1ec45963836c97a27c1c43c316ddfdddeac274aa793223a0a82391ba2304f"
+checksum = "7ff9a64fc99b205b6104a6996832b0006fc059f5aa9fe61d5fb2c3b9f1885b14"
dependencies = [
"ahash",
"arrayvec 0.7.2",
@@ -2069,9 +2072,9 @@ dependencies = [
[[package]]
name = "swc_ecma_transforms_module"
-version = "0.76.1"
+version = "0.78.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "151f5f8fb7bf42d4bbc04e61af0b5fd84e31b1a3014e006f60246b1cac68274e"
+checksum = "441616e68981062a1650a923d2c63075021a8178045e2112007a90a157cdb1da"
dependencies = [
"Inflector",
"ahash",
@@ -2091,9 +2094,9 @@ dependencies = [
[[package]]
name = "swc_ecma_transforms_optimization"
-version = "0.85.0"
+version = "0.87.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57792864e708f7ba41c4fed8c8b8e2c01dba8da4a44aa43ebb70a60e07e45265"
+checksum = "e074149dd5e969d35a790851b47b0f76700b14fcfda1c05e15751c1458e2dd38"
dependencies = [
"ahash",
"dashmap",
@@ -2114,9 +2117,9 @@ dependencies = [
[[package]]
name = "swc_ecma_transforms_proposal"
-version = "0.76.0"
+version = "0.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e0c8f8ad3e3960658e4d7a4a87609b893b2a023f570e45b91f4ebe025845b43"
+checksum = "048ac8ea82e02fa9a54b9aa448dc5d15a8e994304364fcd8c4e2f650572c9141"
dependencies = [
"either",
"serde",
@@ -2134,9 +2137,9 @@ dependencies = [
[[package]]
name = "swc_ecma_transforms_react"
-version = "0.78.0"
+version = "0.80.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d93afe0884dbcb5d4f931d6b2673ba65ad17d0de4d1c88e69f2730f13817739"
+checksum = "9fb5b7c98597bf41d1503ca4039be5445fd02e7aa381ae520d1c78a8a370f7f5"
dependencies = [
"ahash",
"base64 0.13.0",
@@ -2182,9 +2185,9 @@ dependencies = [
[[package]]
name = "swc_ecma_transforms_typescript"
-version = "0.80.0"
+version = "0.82.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b136bcb8a598378542393b2e9b51231e23e34b858baa0582aa72e78a2d5fee5"
+checksum = "f7859a18a33f751d488fbc1b7a0073fb08c69d794ad1f8daa2da47bfda2d9242"
dependencies = [
"serde",
"swc_atoms",
@@ -2199,9 +2202,9 @@ dependencies = [
[[package]]
name = "swc_ecma_utils"
-version = "0.65.0"
+version = "0.65.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a372b01214518c1dbfb9f84d7e08e8e46e2098e7e1f63eb9e9f6f06025ae2863"
+checksum = "b462ac7dd5340544e7a12965bb7fbbbf9db8b26c1b32159b43c4b2430fed3fc8"
dependencies = [
"indexmap",
"once_cell",
@@ -2232,6 +2235,18 @@ name = "swc_ecmascript"
version = "0.112.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce38cf2c41ed841d82dbfb1c328379a3ec75d4e4e43900ea8c8ef3c51a44e3cb"
+dependencies = [
+ "swc_ecma_ast",
+ "swc_ecma_parser",
+ "swc_ecma_utils",
+ "swc_ecma_visit",
+]
+
+[[package]]
+name = "swc_ecmascript"
+version = "0.114.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e752c12b209c65e203a952186ab2fcefa8021a17a8a393b7d5f410e1fe1a0e87"
dependencies = [
"swc_ecma_ast",
"swc_ecma_codegen",
@@ -2313,9 +2328,9 @@ dependencies = [
[[package]]
name = "swc_stylis"
-version = "0.43.0"
+version = "0.83.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75fd0f4f37579b15bbcd762b0fd1ae3fc6ef29215777b96cbc2bcdfaacd439ab"
+checksum = "07fe7e1fea389c2a95bb8a8a46937d9f10aa573def79ca270e56a43d432822d9"
dependencies = [
"swc_atoms",
"swc_common",
@@ -2649,7 +2664,7 @@ dependencies = [
"serde_json",
"swc",
"swc_common",
- "swc_ecmascript",
+ "swc_ecmascript 0.114.2",
"tracing",
"wasm-bindgen",
"wasm-bindgen-futures",
diff --git a/packages/next-swc/crates/core/Cargo.toml b/packages/next-swc/crates/core/Cargo.toml
index 1b43fb3ebc4c..063a0129010a 100644
--- a/packages/next-swc/crates/core/Cargo.toml
+++ b/packages/next-swc/crates/core/Cargo.toml
@@ -16,14 +16,14 @@ pathdiff = "0.2.0"
serde = "1"
serde_json = "1"
styled_components = "0.14.0"
-swc = "0.121.7"
+swc = "0.126.2"
swc_atoms = "0.2.7"
swc_common = { version = "0.17.0", features = ["concurrent", "sourcemap"] }
-swc_css = "0.46.0"
+swc_css = "0.87.0"
swc_ecma_loader = { version = "0.28.0", features = ["node", "lru"] }
-swc_ecmascript = { version = "0.112.6", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
+swc_ecmascript = { version = "0.114.2", features = ["codegen", "minifier", "optimization", "parser", "react", "transforms", "typescript", "utils", "visit"] }
swc_node_base = "0.5.1"
-swc_stylis = "0.43.0"
+swc_stylis = "0.83.0"
tracing = {version = "0.1.28", features = ["release_max_level_off"]}
regex = "1.5"
diff --git a/packages/next-swc/crates/core/src/amp_attributes.rs b/packages/next-swc/crates/core/src/amp_attributes.rs
index b222d019d4a4..a5935641edd9 100644
--- a/packages/next-swc/crates/core/src/amp_attributes.rs
+++ b/packages/next-swc/crates/core/src/amp_attributes.rs
@@ -1,63 +1,63 @@
use swc_atoms::JsWord;
use swc_ecmascript::ast::{
- Ident, JSXAttr, JSXAttrName, JSXAttrOrSpread, JSXElementName, JSXOpeningElement,
+ Ident, JSXAttr, JSXAttrName, JSXAttrOrSpread, JSXElementName, JSXOpeningElement,
};
use swc_ecmascript::visit::Fold;
pub fn amp_attributes() -> impl Fold {
- AmpAttributePatcher::default()
+ AmpAttributePatcher::default()
}
#[derive(Debug, Default)]
struct AmpAttributePatcher {}
impl Fold for AmpAttributePatcher {
- fn fold_jsx_opening_element(&mut self, node: JSXOpeningElement) -> JSXOpeningElement {
- let JSXOpeningElement {
- name,
- mut attrs,
- span,
- self_closing,
- type_args,
- } = node;
- let n = name.clone();
-
- if let JSXElementName::Ident(Ident { sym, .. }) = name {
- if sym.starts_with("amp-") {
- for i in 0..attrs.len() {
- if let JSXAttrOrSpread::JSXAttr(JSXAttr {
- name:
- JSXAttrName::Ident(Ident {
- sym,
- span: s,
- optional: o,
- }),
+ fn fold_jsx_opening_element(&mut self, node: JSXOpeningElement) -> JSXOpeningElement {
+ let JSXOpeningElement {
+ name,
+ mut attrs,
span,
- value,
- }) = &attrs[i]
- {
- if sym as &str == "className" {
- attrs[i] = JSXAttrOrSpread::JSXAttr(JSXAttr {
- name: JSXAttrName::Ident(Ident {
- sym: JsWord::from("class"),
- span: s.clone(),
- optional: o.clone(),
- }),
- span: span.clone(),
- value: value.clone(),
- })
+ self_closing,
+ type_args,
+ } = node;
+ let n = name.clone();
+
+ if let JSXElementName::Ident(Ident { sym, .. }) = name {
+ if sym.starts_with("amp-") {
+ for i in &mut attrs {
+ if let JSXAttrOrSpread::JSXAttr(JSXAttr {
+ name:
+ JSXAttrName::Ident(Ident {
+ sym,
+ span: s,
+ optional: o,
+ }),
+ span,
+ value,
+ }) = &i
+ {
+ if sym as &str == "className" {
+ *i = JSXAttrOrSpread::JSXAttr(JSXAttr {
+ name: JSXAttrName::Ident(Ident {
+ sym: JsWord::from("class"),
+ span: *s,
+ optional: *o,
+ }),
+ span: *span,
+ value: value.clone(),
+ })
+ }
+ }
+ }
}
- }
}
- }
- }
- JSXOpeningElement {
- name: n,
- attrs,
- span,
- self_closing,
- type_args,
+ JSXOpeningElement {
+ name: n,
+ attrs,
+ span,
+ self_closing,
+ type_args,
+ }
}
- }
}
diff --git a/packages/next-swc/crates/core/src/auto_cjs/mod.rs b/packages/next-swc/crates/core/src/auto_cjs/mod.rs
index 3c885940fd77..5f35aa8cc1b7 100644
--- a/packages/next-swc/crates/core/src/auto_cjs/mod.rs
+++ b/packages/next-swc/crates/core/src/auto_cjs/mod.rs
@@ -18,17 +18,13 @@ struct CjsFinder {
/// does not support changing configuration based on content of the file.
impl Visit for CjsFinder {
fn visit_member_expr(&mut self, e: &MemberExpr) {
- match &*e.obj {
- Expr::Ident(obj) => match &e.prop {
- MemberProp::Ident(prop) => {
- if &*obj.sym == "module" && &*prop.sym == "exports" {
- self.found = true;
- return;
- }
+ if let Expr::Ident(obj) = &*e.obj {
+ if let MemberProp::Ident(prop) = &e.prop {
+ if &*obj.sym == "module" && &*prop.sym == "exports" {
+ self.found = true;
+ return;
}
- _ => {}
- },
- _ => {}
+ }
}
e.obj.visit_with(self);
diff --git a/packages/next-swc/crates/core/src/disallow_re_export_all_in_page.rs b/packages/next-swc/crates/core/src/disallow_re_export_all_in_page.rs
index 34f1220232f3..78983a8b32f7 100644
--- a/packages/next-swc/crates/core/src/disallow_re_export_all_in_page.rs
+++ b/packages/next-swc/crates/core/src/disallow_re_export_all_in_page.rs
@@ -4,10 +4,7 @@ use swc_ecmascript::utils::HANDLER;
use swc_ecmascript::visit::{noop_fold_type, Fold};
pub fn disallow_re_export_all_in_page(is_page_file: bool) -> impl Fold {
- Optional::new(
- DisallowReExportAllInPage,
- is_page_file
- )
+ Optional::new(DisallowReExportAllInPage, is_page_file)
}
struct DisallowReExportAllInPage;
diff --git a/packages/next-swc/crates/core/src/hook_optimizer.rs b/packages/next-swc/crates/core/src/hook_optimizer.rs
index 0516fc8e1b48..7b0726ca2256 100644
--- a/packages/next-swc/crates/core/src/hook_optimizer.rs
+++ b/packages/next-swc/crates/core/src/hook_optimizer.rs
@@ -75,8 +75,8 @@ impl HookOptimizer {
if let Expr::Call(c) = &*init.as_deref().unwrap() {
if let Callee::Expr(i) = &c.callee {
if let Expr::Ident(Ident { sym, .. }) = &**i {
- if self.hooks.contains(&sym) {
- let name = get_object_pattern(&a);
+ if self.hooks.contains(sym) {
+ let name = get_object_pattern(a);
return VarDeclarator {
name,
init: init_clone,
@@ -89,7 +89,7 @@ impl HookOptimizer {
}
}
- return decl;
+ decl
}
}
@@ -98,15 +98,16 @@ fn get_object_pattern(array_pattern: &ArrayPat) -> Pat {
.elems
.iter()
.enumerate()
- .filter_map(|(i, elem)| match elem {
- Some(elem) => Some(ObjectPatProp::KeyValue(KeyValuePatProp {
- key: PropName::Num(Number {
- value: i as f64,
- span: DUMMY_SP,
- }),
- value: Box::new(elem.clone()),
- })),
- None => None,
+ .filter_map(|(i, elem)| {
+ elem.as_ref().map(|elem| {
+ ObjectPatProp::KeyValue(KeyValuePatProp {
+ key: PropName::Num(Number {
+ value: i as f64,
+ span: DUMMY_SP,
+ }),
+ value: Box::new(elem.clone()),
+ })
+ })
})
.collect();
diff --git a/packages/next-swc/crates/core/src/lib.rs b/packages/next-swc/crates/core/src/lib.rs
index 7d4847998dbb..6e788b3cd000 100644
--- a/packages/next-swc/crates/core/src/lib.rs
+++ b/packages/next-swc/crates/core/src/lib.rs
@@ -27,7 +27,7 @@ DEALINGS IN THE SOFTWARE.
*/
#![recursion_limit = "2048"]
-//#![deny(clippy::all)]
+#![deny(clippy::all)]
use auto_cjs::contains_cjs;
use either::Either;
@@ -112,7 +112,11 @@ pub fn custom_before_pass(
#[cfg(not(target_arch = "wasm32"))]
let relay_plugin = {
if let Some(config) = &opts.relay {
- Either::Left(relay::relay(config, file.name.clone(), opts.pages_dir.clone()))
+ Either::Left(relay::relay(
+ config,
+ file.name.clone(),
+ opts.pages_dir.clone(),
+ ))
} else {
Either::Right(noop())
}
@@ -120,7 +124,7 @@ pub fn custom_before_pass(
chain!(
disallow_re_export_all_in_page::disallow_re_export_all_in_page(opts.is_page_file),
- styled_jsx::styled_jsx(cm.clone(), file.name.clone()),
+ styled_jsx::styled_jsx(cm, file.name.clone()),
hook_optimizer::hook_optimizer(),
match &opts.styled_components {
Some(config) => {
@@ -173,7 +177,7 @@ impl TransformOptions {
let should_enable_commonjs =
self.swc.config.module.is_none() && fm.src.contains("module.exports") && {
let syntax = self.swc.config.jsc.syntax.unwrap_or_default();
- let target = self.swc.config.jsc.target.unwrap_or(EsVersion::latest());
+ let target = self.swc.config.jsc.target.unwrap_or_else(EsVersion::latest);
let lexer = Lexer::new(syntax, target, StringInput::from(&*fm), None);
let mut p = Parser::new_from(lexer);
p.parse_module()
diff --git a/packages/next-swc/crates/core/src/next_dynamic.rs b/packages/next-swc/crates/core/src/next_dynamic.rs
index 01bff29ad322..87b30f968e5d 100644
--- a/packages/next-swc/crates/core/src/next_dynamic.rs
+++ b/packages/next-swc/crates/core/src/next_dynamic.rs
@@ -74,7 +74,7 @@ impl Fold for NextDynamicPatcher {
if let Callee::Expr(i) = &expr.callee {
if let Expr::Ident(identifier) = &**i {
if self.dynamic_bindings.contains(&identifier.to_id()) {
- if expr.args.len() == 0 {
+ if expr.args.is_empty() {
HANDLER.with(|handler| {
handler
.struct_span_err(
@@ -116,7 +116,7 @@ impl Fold for NextDynamicPatcher {
expr.args[0].expr = expr.args[0].expr.clone().fold_with(self);
self.is_next_dynamic_first_arg = false;
- if let None = self.dynamically_imported_specifier {
+ if self.dynamically_imported_specifier.is_none() {
return expr;
}
diff --git a/packages/next-swc/crates/core/src/next_ssg.rs b/packages/next-swc/crates/core/src/next_ssg.rs
index f744bc7e4e78..a4f389ce967a 100644
--- a/packages/next-swc/crates/core/src/next_ssg.rs
+++ b/packages/next-swc/crates/core/src/next_ssg.rs
@@ -131,11 +131,8 @@ impl Fold for Analyzer<'_> {
fn fold_expr(&mut self, e: Expr) -> Expr {
let e = e.fold_children_with(self);
- match &e {
- Expr::Ident(i) => {
- self.add_ref(i.to_id());
- }
- _ => {}
+ if let Expr::Ident(i) = &e {
+ self.add_ref(i.to_id());
}
e
@@ -216,8 +213,8 @@ impl Fold for Analyzer<'_> {
// Visit children to ensure that all references is added to the scope.
let s = s.fold_children_with(self);
- match &s {
- ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(e)) => match &e.decl {
+ if let ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(e)) = &s {
+ match &e.decl {
Decl::Fn(f) => {
// Drop getStaticProps.
if let Ok(is_data_identifier) = self.state.is_data_identifier(&f.ident) {
@@ -235,9 +232,7 @@ impl Fold for Analyzer<'_> {
}
}
_ => {}
- },
-
- _ => {}
+ }
}
s
@@ -254,11 +249,8 @@ impl Fold for Analyzer<'_> {
fn fold_prop(&mut self, p: Prop) -> Prop {
let p = p.fold_children_with(self);
- match &p {
- Prop::Shorthand(i) => {
- self.add_ref(i.to_id());
- }
- _ => {}
+ if let Prop::Shorthand(i) = &p {
+ self.add_ref(i.to_id());
}
p
@@ -267,17 +259,14 @@ impl Fold for Analyzer<'_> {
fn fold_var_declarator(&mut self, mut v: VarDeclarator) -> VarDeclarator {
let old_in_data = self.in_data_fn;
- match &v.name {
- Pat::Ident(name) => {
- if let Ok(is_data_identifier) = self.state.is_data_identifier(&name.id) {
- if is_data_identifier {
- self.in_data_fn = true;
- }
- } else {
- return v;
+ if let Pat::Ident(name) = &v.name {
+ if let Ok(is_data_identifier) = self.state.is_data_identifier(&name.id) {
+ if is_data_identifier {
+ self.in_data_fn = true;
}
+ } else {
+ return v;
}
- _ => {}
}
let old_in_lhs_of_var = self.in_lhs_of_var;
@@ -397,18 +386,15 @@ impl Fold for NextSsg {
}
fn fold_module_item(&mut self, i: ModuleItem) -> ModuleItem {
- match i {
- ModuleItem::ModuleDecl(ModuleDecl::Import(i)) => {
- let is_for_side_effect = i.specifiers.is_empty();
- let i = i.fold_with(self);
-
- if !is_for_side_effect && i.specifiers.is_empty() {
- return ModuleItem::Stmt(Stmt::Empty(EmptyStmt { span: DUMMY_SP }));
- }
+ if let ModuleItem::ModuleDecl(ModuleDecl::Import(i)) = i {
+ let is_for_side_effect = i.specifiers.is_empty();
+ let i = i.fold_with(self);
- return ModuleItem::ModuleDecl(ModuleDecl::Import(i));
+ if !is_for_side_effect && i.specifiers.is_empty() {
+ return ModuleItem::Stmt(Stmt::Empty(EmptyStmt { span: DUMMY_SP }));
}
- _ => {}
+
+ return ModuleItem::ModuleDecl(ModuleDecl::Import(i));
}
let i = i.fold_children_with(self);
@@ -427,10 +413,7 @@ impl Fold for NextSsg {
items = items.fold_children_with(self);
// Drop nodes.
- items.retain(|s| match s {
- ModuleItem::Stmt(Stmt::Empty(..)) => false,
- _ => true,
- });
+ items.retain(|s| !matches!(s, ModuleItem::Stmt(Stmt::Empty(..))));
if !self.state.done
&& !self.state.should_run_again
@@ -461,29 +444,24 @@ impl Fold for NextSsg {
let mut new = Vec::with_capacity(items.len() + 1);
for item in take(&mut items) {
- match &item {
- ModuleItem::ModuleDecl(
- ModuleDecl::ExportNamed(..)
- | ModuleDecl::ExportDecl(..)
- | ModuleDecl::ExportDefaultDecl(..)
- | ModuleDecl::ExportDefaultExpr(..),
- ) => {
- if let Some(var) = var.take() {
- new.push(ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(
- ExportDecl {
- span: DUMMY_SP,
- decl: Decl::Var(VarDecl {
- span: DUMMY_SP,
- kind: VarDeclKind::Var,
- declare: Default::default(),
- decls: vec![var],
- }),
- },
- )))
- }
+ if let ModuleItem::ModuleDecl(
+ ModuleDecl::ExportNamed(..)
+ | ModuleDecl::ExportDecl(..)
+ | ModuleDecl::ExportDefaultDecl(..)
+ | ModuleDecl::ExportDefaultExpr(..),
+ ) = &item
+ {
+ if let Some(var) = var.take() {
+ new.push(ModuleItem::ModuleDecl(ModuleDecl::ExportDecl(ExportDecl {
+ span: DUMMY_SP,
+ decl: Decl::Var(VarDecl {
+ span: DUMMY_SP,
+ kind: VarDeclKind::Var,
+ declare: Default::default(),
+ decls: vec![var],
+ }),
+ })))
}
-
- _ => {}
}
new.push(item);
@@ -511,14 +489,14 @@ impl Fold for NextSsg {
..
}) => self
.state
- .is_data_identifier(&exported)
+ .is_data_identifier(exported)
.map(|is_data_identifier| !is_data_identifier),
ExportSpecifier::Named(ExportNamedSpecifier {
orig: ModuleExportName::Ident(orig),
..
}) => self
.state
- .is_data_identifier(&orig)
+ .is_data_identifier(orig)
.map(|is_data_identifier| !is_data_identifier),
_ => Ok(true),
@@ -528,15 +506,13 @@ impl Fold for NextSsg {
Ok(false) => {
tracing::trace!("Dropping a export specifier because it's a data identifier");
- match s {
- ExportSpecifier::Named(ExportNamedSpecifier {
- orig: ModuleExportName::Ident(orig),
- ..
- }) => {
- self.state.should_run_again = true;
- self.state.refs_from_data_fn.insert(orig.to_id());
- }
- _ => {}
+ if let ExportSpecifier::Named(ExportNamedSpecifier {
+ orig: ModuleExportName::Ident(orig),
+ ..
+ }) = s
+ {
+ self.state.should_run_again = true;
+ self.state.refs_from_data_fn.insert(orig.to_id());
}
false
@@ -569,10 +545,7 @@ impl Fold for NextSsg {
}
Pat::Array(arr) => {
if !arr.elems.is_empty() {
- arr.elems.retain(|e| match e {
- Some(Pat::Invalid(..)) => return false,
- _ => true,
- });
+ arr.elems.retain(|e| !matches!(e, Some(Pat::Invalid(..))));
if arr.elems.is_empty() {
return Pat::Invalid(Invalid { span: DUMMY_SP });
@@ -627,6 +600,7 @@ impl Fold for NextSsg {
p
}
+ #[allow(clippy::single_match)]
fn fold_stmt(&mut self, mut s: Stmt) -> Stmt {
match s {
Stmt::Decl(Decl::Fn(f)) => {
diff --git a/packages/next-swc/crates/core/src/page_config.rs b/packages/next-swc/crates/core/src/page_config.rs
index 0b214038a15f..9175f4730ca8 100644
--- a/packages/next-swc/crates/core/src/page_config.rs
+++ b/packages/next-swc/crates/core/src/page_config.rs
@@ -71,76 +71,73 @@ impl Fold for PageConfig {
}
fn fold_export_decl(&mut self, export: ExportDecl) -> ExportDecl {
- match &export.decl {
- Decl::Var(var_decl) => {
- for decl in &var_decl.decls {
- let mut is_config = false;
- if let Pat::Ident(ident) = &decl.name {
- if &ident.id.sym == CONFIG_KEY {
- is_config = true;
- }
+ if let Decl::Var(var_decl) = &export.decl {
+ for decl in &var_decl.decls {
+ let mut is_config = false;
+ if let Pat::Ident(ident) = &decl.name {
+ if &ident.id.sym == CONFIG_KEY {
+ is_config = true;
}
+ }
- if is_config {
- if let Some(expr) = &decl.init {
- if let Expr::Object(obj) = &**expr {
- for prop in &obj.props {
- if let PropOrSpread::Prop(prop) = prop {
- if let Prop::KeyValue(kv) = &**prop {
- match &kv.key {
- PropName::Ident(ident) => {
- if &ident.sym == "amp" {
- if let Expr::Lit(Lit::Bool(Bool {
- value,
- ..
- })) = &*kv.value
- {
- if *value && self.is_page_file {
- self.drop_bundle = true;
- }
- } else if let Expr::Lit(Lit::Str(_)) =
- &*kv.value
- {
- // Do not replace
- // bundle
- } else {
- self.handle_error(
- "Invalid value found.",
- export.span,
- );
+ if is_config {
+ if let Some(expr) = &decl.init {
+ if let Expr::Object(obj) = &**expr {
+ for prop in &obj.props {
+ if let PropOrSpread::Prop(prop) = prop {
+ if let Prop::KeyValue(kv) = &**prop {
+ match &kv.key {
+ PropName::Ident(ident) => {
+ if &ident.sym == "amp" {
+ if let Expr::Lit(Lit::Bool(Bool {
+ value,
+ ..
+ })) = &*kv.value
+ {
+ if *value && self.is_page_file {
+ self.drop_bundle = true;
}
+ } else if let Expr::Lit(Lit::Str(_)) =
+ &*kv.value
+ {
+ // Do not replace
+ // bundle
+ } else {
+ self.handle_error(
+ "Invalid value found.",
+ export.span,
+ );
}
}
- _ => {
- self.handle_error(
- "Invalid property found.",
- export.span,
- );
- }
}
- } else {
- self.handle_error(
- "Invalid property or value.",
- export.span,
- );
+ _ => {
+ self.handle_error(
+ "Invalid property found.",
+ export.span,
+ );
+ }
}
} else {
self.handle_error(
- "Property spread is not allowed.",
+ "Invalid property or value.",
export.span,
);
}
+ } else {
+ self.handle_error(
+ "Property spread is not allowed.",
+ export.span,
+ );
}
- } else {
- self.handle_error("Expected config to be an object.", export.span);
}
} else {
self.handle_error("Expected config to be an object.", export.span);
}
+ } else {
+ self.handle_error("Expected config to be an object.", export.span);
}
}
}
- _ => {}
}
export
}
diff --git a/packages/next-swc/crates/core/src/react_remove_properties.rs b/packages/next-swc/crates/core/src/react_remove_properties.rs
index 6f51f0b9a816..f2944795537d 100644
--- a/packages/next-swc/crates/core/src/react_remove_properties.rs
+++ b/packages/next-swc/crates/core/src/react_remove_properties.rs
@@ -39,12 +39,11 @@ impl Fold for RemoveProperties {
noop_fold_type!();
fn fold_jsx_opening_element(&mut self, mut el: JSXOpeningElement) -> JSXOpeningElement {
- el.attrs.retain(|attr| match attr {
- JSXAttrOrSpread::JSXAttr(JSXAttr {
- name: JSXAttrName::Ident(ident),
- ..
- }) if self.should_remove_property(ident.sym.as_ref()) => false,
- _ => true,
+ el.attrs.retain(|attr| {
+ !matches!(attr, JSXAttrOrSpread::JSXAttr(JSXAttr {
+ name: JSXAttrName::Ident(ident),
+ ..
+ }) if self.should_remove_property(ident.sym.as_ref()))
});
el.fold_children_with(self)
}
@@ -67,6 +66,5 @@ pub fn remove_properties(config: Config) -> impl Fold {
// Keep the default regex identical to `babel-plugin-react-remove-properties`.
properties.push(Regex::new(r"^data-test").unwrap());
}
- let remover = RemoveProperties { properties };
- remover
+ RemoveProperties { properties }
}
diff --git a/packages/next-swc/crates/core/src/relay.rs b/packages/next-swc/crates/core/src/relay.rs
index b9035197bbb2..680eceb4de2d 100644
--- a/packages/next-swc/crates/core/src/relay.rs
+++ b/packages/next-swc/crates/core/src/relay.rs
@@ -53,15 +53,13 @@ fn build_require_expr_from_path(path: &str) -> Expr {
Expr::Call(CallExpr {
span: Default::default(),
callee: quote_ident!("require").as_callee(),
- args: vec![
- Lit::Str(Str {
- span: Default::default(),
- value: JsWord::from(path),
- has_escape: false,
- kind: Default::default(),
- })
- .as_arg(),
- ],
+ args: vec![Lit::Str(Str {
+ span: Default::default(),
+ value: JsWord::from(path),
+ has_escape: false,
+ kind: Default::default(),
+ })
+ .as_arg()],
type_args: None,
})
}
diff --git a/packages/next-swc/crates/core/src/remove_console.rs b/packages/next-swc/crates/core/src/remove_console.rs
index 11238eb037e4..f2b3cb18683a 100644
--- a/packages/next-swc/crates/core/src/remove_console.rs
+++ b/packages/next-swc/crates/core/src/remove_console.rs
@@ -39,12 +39,7 @@ struct RemoveConsole {
impl RemoveConsole {
fn is_global_console(&self, ident: &Ident) -> bool {
- &ident.sym == "console"
- && self
- .bindings
- .iter()
- .find(|x| x.contains(&ident.to_id()))
- .is_none()
+ &ident.sym == "console" && !self.bindings.iter().any(|x| x.contains(&ident.to_id()))
}
fn should_remove_call(&mut self, n: &CallExpr) -> bool {
@@ -73,7 +68,7 @@ impl RemoveConsole {
// Here we do an O(n) search on the list of excluded properties because the size
// should be small.
match &member_expr.prop {
- MemberProp::Ident(i) if self.exclude.iter().find(|x| **x == i.sym).is_none() => {}
+ MemberProp::Ident(i) if !self.exclude.iter().any(|x| *x == i.sym) => {}
_ => return false,
}
@@ -85,16 +80,12 @@ impl Fold for RemoveConsole {
noop_fold_type!();
fn fold_stmt(&mut self, stmt: Stmt) -> Stmt {
- match &stmt {
- Stmt::Expr(e) => match &*e.expr {
- Expr::Call(c) => {
- if self.should_remove_call(c) {
- return Stmt::Empty(EmptyStmt { span: DUMMY_SP });
- }
+ if let Stmt::Expr(e) = &stmt {
+ if let Expr::Call(c) = &*e.expr {
+ if self.should_remove_call(c) {
+ return Stmt::Empty(EmptyStmt { span: DUMMY_SP });
}
- _ => {}
- },
- _ => {}
+ }
}
stmt.fold_children_with(self)
}
@@ -135,10 +126,9 @@ pub fn remove_console(config: Config) -> impl Fold {
Config::WithOptions(x) => x.exclude,
_ => vec![],
};
- let remover = RemoveConsole {
+ RemoveConsole {
exclude,
bindings: Default::default(),
in_function_params: false,
- };
- remover
+ }
}
diff --git a/packages/next-swc/crates/core/src/shake_exports.rs b/packages/next-swc/crates/core/src/shake_exports.rs
index ba0e58ce8981..083e490967c2 100644
--- a/packages/next-swc/crates/core/src/shake_exports.rs
+++ b/packages/next-swc/crates/core/src/shake_exports.rs
@@ -26,9 +26,7 @@ struct ExportShaker {
impl Fold for ExportShaker {
fn fold_module(&mut self, module: Module) -> Module {
let module = module.fold_children_with(self);
- let module = module.fold_with(&mut dce(DCEConfig::default()));
-
- module
+ module.fold_with(&mut dce(DCEConfig::default()))
}
fn fold_module_items(&mut self, items: Vec) -> Vec {
diff --git a/packages/next-swc/crates/core/src/styled_jsx/mod.rs b/packages/next-swc/crates/core/src/styled_jsx/mod.rs
index a70666f40e32..21062867cd30 100644
--- a/packages/next-swc/crates/core/src/styled_jsx/mod.rs
+++ b/packages/next-swc/crates/core/src/styled_jsx/mod.rs
@@ -26,10 +26,9 @@ mod utils;
pub fn styled_jsx(cm: Arc, file_name: FileName) -> impl Fold {
let file_name = match file_name {
- FileName::Real(real_file_name) => match real_file_name.to_str() {
- Some(real_file_name) => Some(real_file_name.to_string()),
- None => None,
- },
+ FileName::Real(real_file_name) => real_file_name
+ .to_str()
+ .map(|real_file_name| real_file_name.to_string()),
_ => None,
};
@@ -81,6 +80,7 @@ pub struct LocalStyle {
css: String,
css_span: Span,
is_dynamic: bool,
+ #[allow(clippy::vec_box)]
expressions: Vec>,
}
@@ -105,10 +105,9 @@ impl Fold for StyledJSXTransformer {
fn fold_jsx_element(&mut self, el: JSXElement) -> JSXElement {
if is_styled_jsx(&el) {
let parent_has_styled_jsx = self.has_styled_jsx;
- if !parent_has_styled_jsx {
- if self.check_for_jsx_styles(Some(&el), &el.children).is_err() {
- return el;
- }
+ if !parent_has_styled_jsx && self.check_for_jsx_styles(Some(&el), &el.children).is_err()
+ {
+ return el;
}
let el = match self.replace_jsx_style(&el) {
Ok(el) => el,
@@ -260,14 +259,12 @@ impl Fold for StyledJSXTransformer {
fn fold_var_declarator(&mut self, declarator: VarDeclarator) -> VarDeclarator {
let declarator = declarator.fold_children_with(self);
if let Some(external_hash) = &self.external_hash.take() {
- match &declarator.name {
- Pat::Ident(BindingIdent {
- id: Ident { span, sym, .. },
- ..
- }) => {
- self.add_hash = Some(((sym.clone(), span.ctxt), external_hash.clone()));
- }
- _ => {}
+ if let Pat::Ident(BindingIdent {
+ id: Ident { span, sym, .. },
+ ..
+ }) = &declarator.name
+ {
+ self.add_hash = Some(((sym.clone(), span.ctxt), external_hash.clone()));
}
}
declarator
@@ -339,7 +336,7 @@ impl Fold for StyledJSXTransformer {
if self.file_has_styled_jsx || self.file_has_css_resolve {
prepend(
&mut new_items,
- styled_jsx_import_decl(&self.style_import_name.as_ref().unwrap()),
+ styled_jsx_import_decl(self.style_import_name.as_ref().unwrap()),
);
}
@@ -361,7 +358,7 @@ impl Fold for StyledJSXTransformer {
}
fn fold_function(&mut self, mut func: Function) -> Function {
- self.func_scope_level = self.func_scope_level + 1;
+ self.func_scope_level += 1;
let surrounding_scope_bindings = take(&mut self.nearest_scope_bindings);
self.in_function_params = true;
let mut new_params = vec![];
@@ -373,12 +370,12 @@ impl Fold for StyledJSXTransformer {
self.nearest_scope_bindings.extend(collect_decls(&func));
func.body = func.body.fold_with(self);
self.nearest_scope_bindings = surrounding_scope_bindings;
- self.func_scope_level = self.func_scope_level - 1;
+ self.func_scope_level -= 1;
func
}
fn fold_arrow_expr(&mut self, mut func: ArrowExpr) -> ArrowExpr {
- self.func_scope_level = self.func_scope_level + 1;
+ self.func_scope_level += 1;
let surrounding_scope_bindings = take(&mut self.nearest_scope_bindings);
self.in_function_params = true;
let mut new_params = vec![];
@@ -390,7 +387,7 @@ impl Fold for StyledJSXTransformer {
self.nearest_scope_bindings.extend(collect_decls(&func));
func.body = func.body.fold_with(self);
self.nearest_scope_bindings = surrounding_scope_bindings;
- self.func_scope_level = self.func_scope_level - 1;
+ self.func_scope_level -= 1;
func
}
@@ -436,10 +433,10 @@ impl StyledJSXTransformer {
if el.is_some() && is_styled_jsx(el.unwrap()) {
process_style(el.unwrap())?;
} else {
- for i in 0..children.len() {
- if let JSXElementChild::JSXElement(child_el) = &children[i] {
- if is_styled_jsx(&child_el) {
- process_style(&child_el)?;
+ for i in children {
+ if let JSXElementChild::JSXElement(child_el) = &i {
+ if is_styled_jsx(child_el) {
+ process_style(child_el)?;
}
}
}
@@ -465,8 +462,8 @@ impl StyledJSXTransformer {
match style_expr {
StyleExpr::Str(Str { value, span, .. }) => {
hasher.write(value.as_ref().as_bytes());
- css = value.to_string().clone();
- css_span = span.clone();
+ css = value.to_string();
+ css_span = *span;
is_dynamic = false;
}
StyleExpr::Tpl(
@@ -480,7 +477,7 @@ impl StyledJSXTransformer {
if exprs.is_empty() {
hasher.write(quasis[0].raw.value.as_bytes());
css = quasis[0].raw.value.to_string();
- css_span = span.clone();
+ css_span = *span;
is_dynamic = false;
} else {
drop_span(expr.clone()).hash(&mut hasher);
@@ -493,15 +490,11 @@ impl StyledJSXTransformer {
};
s = format!("{}{}{}", s, quasis[i].raw.value, placeholder)
}
- css = String::from(s);
+ css = s;
css_span = *span;
is_dynamic = if self.func_scope_level > 0 {
- let res = self.evaluator.as_mut().unwrap().eval(&expr);
- if let Some(EvalResult::Lit(_)) = res {
- false
- } else {
- true
- }
+ let res = self.evaluator.as_mut().unwrap().eval(expr);
+ !matches!(res, Some(EvalResult::Lit(_)))
} else {
false
};
@@ -554,12 +547,12 @@ impl StyledJSXTransformer {
JSXStyle::Local(style_info) => {
let css = transform_css(
self.cm.clone(),
- &style_info,
+ style_info,
is_global,
&self.static_class_name,
)?;
Ok(make_local_styled_jsx_el(
- &style_info,
+ style_info,
css,
self.style_import_name.as_ref().unwrap(),
self.static_class_name.as_ref(),
@@ -589,7 +582,7 @@ impl StyledJSXTransformer {
);
let styles = vec![style];
let (static_class_name, class_name) =
- compute_class_names(&styles, &self.style_import_name.as_ref().unwrap());
+ compute_class_names(&styles, self.style_import_name.as_ref().unwrap());
let tag = match &*tagged_tpl.tag {
Expr::Ident(Ident { sym, .. }) => sym.to_string(),
Expr::Member(MemberExpr {
@@ -606,7 +599,7 @@ impl StyledJSXTransformer {
} else {
bail!("This shouldn't happen, we already know that this is a template literal");
};
- let css = transform_css(self.cm.clone(), &style, tag == "global", &static_class_name)?;
+ let css = transform_css(self.cm.clone(), style, tag == "global", &static_class_name)?;
if tag == "resolve" {
self.file_has_css_resolve = true;
return Ok(Expr::Object(ObjectLit {
@@ -618,9 +611,9 @@ impl StyledJSXTransformer {
optional: false,
}),
value: Box::new(Expr::JSXElement(Box::new(make_local_styled_jsx_el(
- &style,
+ style,
css,
- &self.style_import_name.as_ref().unwrap(),
+ self.style_import_name.as_ref().unwrap(),
self.static_class_name.as_ref(),
)))),
}))),
@@ -796,14 +789,16 @@ fn get_existing_class_name(el: &JSXOpeningElement) -> (Option, Option (Option, Option true,
- Expr::Ident(_) => true,
- _ => false,
- };
+ let valid_spread = matches!(&**expr, Expr::Member(_) | Expr::Ident(_));
if valid_spread {
let member_dot_name = Expr::Member(MemberExpr {
@@ -875,11 +866,11 @@ fn get_existing_class_name(el: &JSXOpeningElement) -> (Option, Option) -> Expr {
let mut new_expr = spreads[0].clone();
- for i in 1..spreads.len() {
+ for i in spreads.iter().skip(1) {
new_expr = Expr::Bin(BinExpr {
op: op!("||"),
left: Box::new(new_expr.clone()),
- right: Box::new(spreads[i].clone()),
+ right: Box::new(i.clone()),
span: DUMMY_SP,
})
}
diff --git a/packages/next-swc/crates/core/src/styled_jsx/transform_css.rs b/packages/next-swc/crates/core/src/styled_jsx/transform_css.rs
index dcf00d73bf56..32e9850857e7 100644
--- a/packages/next-swc/crates/core/src/styled_jsx/transform_css.rs
+++ b/packages/next-swc/crates/core/src/styled_jsx/transform_css.rs
@@ -21,7 +21,7 @@ use tracing::{debug, trace};
use super::{hash_string, string_literal_expr, LocalStyle};
pub fn transform_css(
- cm: Arc,
+ _cm: Arc,
style_info: &LocalStyle,
is_global: bool,
class_name: &Option,
@@ -33,7 +33,6 @@ pub fn transform_css(
style_info.css_span.lo,
style_info.css_span.hi,
ParserConfig {
- parse_values: false,
allow_wrong_line_comments: true,
},
// We ignore errors because we inject placeholders for expressions which is
@@ -45,7 +44,7 @@ pub fn transform_css(
Err(err) => {
HANDLER.with(|handler| {
// Print css parsing errors
- err.to_diagnostics(&handler).emit();
+ err.to_diagnostics(handler).emit();
// TODO(kdy1): We may print css so the user can see the error, and report it.
@@ -62,7 +61,6 @@ pub fn transform_css(
};
// ? Do we need to support optionally prefixing?
ss.visit_mut_with(&mut prefixer());
- ss.visit_mut_with(&mut CssPlaceholderFixer { cm });
ss.visit_mut_with(&mut Namespacer {
class_name: match class_name {
Some(s) => s.clone(),
@@ -80,17 +78,17 @@ pub fn transform_css(
gen.emit(&ss).unwrap();
}
- if style_info.expressions.len() == 0 {
+ if style_info.expressions.is_empty() {
return Ok(string_literal_expr(&s));
}
let mut parts: Vec<&str> = s.split("__styled-jsx-placeholder-").collect();
let mut final_expressions = vec![];
- for i in 1..parts.len() {
- let (num_len, expression_index) = read_number(&parts[i]);
+ for i in parts.iter_mut().skip(1) {
+ let (num_len, expression_index) = read_number(i);
final_expressions.push(style_info.expressions[expression_index].clone());
- let substr = &parts[i][(num_len + 2)..];
- parts[i] = substr;
+ let substr = &i[(num_len + 2)..];
+ *i = substr;
}
Ok(Expr::Tpl(Tpl {
@@ -131,48 +129,6 @@ fn read_number(s: &str) -> (usize, usize) {
unreachable!("read_number(`{}`) is invalid because it is empty", s)
}
-/// This fixes invalid css which is created from interpolated expressions.
-///
-/// `__styled-jsx-placeholder-` is handled at here.
-struct CssPlaceholderFixer {
- cm: Arc,
-}
-
-impl VisitMut for CssPlaceholderFixer {
- fn visit_mut_media_query(&mut self, q: &mut MediaQuery) {
- q.visit_mut_children_with(self);
-
- match q {
- MediaQuery::Ident(q) => {
- if !q.raw.starts_with("__styled-jsx-placeholder-") {
- return;
- }
- // We need to support both of @media ($breakPoint) {} and @media $queryString {}
- // This is complex because @media (__styled-jsx-placeholder-0__) {} is valid
- // while @media __styled-jsx-placeholder-0__ {} is not
- //
- // So we check original source code to determine if we should inject
- // parenthesis.
-
- // TODO(kdy1): Avoid allocation.
- // To remove allocation, we should patch swc_common to provide a way to get
- // source code without allocation.
- //
- //
- // We need
- //
- // fn with_source_code (self: &mut Self, f: impl FnOnce(&str) -> Ret) -> _ {}
- if let Ok(source) = self.cm.span_to_snippet(q.span) {
- if source.starts_with('(') {
- q.raw = format!("({})", &q.value).into();
- }
- }
- }
- _ => {}
- }
- }
-}
-
struct Namespacer {
class_name: String,
is_global: bool,
@@ -229,9 +185,7 @@ impl VisitMut for Namespacer {
}
ComplexSelectorChildren::Combinator(v) => match v.value {
CombinatorValue::Descendant => {}
- CombinatorValue::NextSibling
- | CombinatorValue::Child
- | CombinatorValue::LaterSibling => {
+ _ => {
combinator = Some(v.clone());
new_selectors.push(sel);
@@ -251,23 +205,22 @@ impl Namespacer {
) -> Result, Error> {
let mut pseudo_index = None;
- let empty_tokens = Tokens {
- span: node.span,
- tokens: vec![],
- };
+ let empty_tokens = vec![];
let mut arg_tokens;
for (i, selector) in node.subclass_selectors.iter().enumerate() {
let (name, args) = match selector {
SubclassSelector::PseudoClass(PseudoClassSelector { name, children, .. }) => {
- match children {
- Some(PseudoSelectorChildren::Nth(v)) => {
- arg_tokens = nth_to_tokens(&v);
- (name, &arg_tokens)
- }
- Some(PseudoSelectorChildren::Tokens(v)) => (name, v),
- None => (name, &empty_tokens),
- }
+ arg_tokens = children
+ .iter()
+ .flatten()
+ .flat_map(|v| match v {
+ PseudoSelectorChildren::Nth(v) => nth_to_tokens(v).tokens,
+ PseudoSelectorChildren::PreservedToken(v) => vec![v.clone()],
+ })
+ .collect::>();
+
+ (name, &arg_tokens)
}
SubclassSelector::PseudoElement(PseudoElementSelector {
name, children, ..
@@ -280,9 +233,19 @@ impl Namespacer {
// One off global selector
if &name.value == "global" {
+ let args = args.clone();
+ let mut args = {
+ let lo = args.first().map(|v| v.span.lo).unwrap_or(BytePos(0));
+ let hi = args.last().map(|v| v.span.hi).unwrap_or(BytePos(0));
+
+ Tokens {
+ span: Span::new(lo, hi, Default::default()),
+ tokens: args,
+ }
+ };
+
let block_tokens = get_block_tokens(&args);
let mut front_tokens = get_front_selector_tokens(&args);
- let mut args = args.clone();
front_tokens.extend(args.tokens);
front_tokens.extend(block_tokens);
args.tokens = front_tokens;
@@ -291,31 +254,25 @@ impl Namespacer {
let x: ComplexSelector = parse_tokens(
&args,
ParserConfig {
- parse_values: false,
allow_wrong_line_comments: true,
},
// TODO(kdy1): We might be able to report syntax errors.
&mut vec![],
)
.unwrap();
- return x;
+ x
});
return match complex_selectors {
Ok(complex_selectors) => {
- let mut v = complex_selectors.children[1..]
- .iter()
- .cloned()
- .collect::>();
-
- match v[0] {
- ComplexSelectorChildren::Combinator(Combinator {
- value: CombinatorValue::Descendant,
- ..
- }) => {
- v.remove(0);
- }
- _ => {}
+ let mut v = complex_selectors.children[1..].to_vec();
+
+ if let ComplexSelectorChildren::Combinator(Combinator {
+ value: CombinatorValue::Descendant,
+ ..
+ }) = v[0]
+ {
+ v.remove(0);
}
if v.is_empty() {
@@ -325,27 +282,21 @@ impl Namespacer {
trace!("Combinator: {:?}", combinator);
trace!("v[0]: {:?}", v[0]);
- if combinator.is_some() {
+ if let Some(combinator) = combinator {
match v.get(0) {
Some(ComplexSelectorChildren::Combinator(..)) => {}
Some(..) => {}
_ => {
- v.push(ComplexSelectorChildren::Combinator(
- combinator.unwrap(),
- ));
+ v.push(ComplexSelectorChildren::Combinator(combinator));
}
}
}
v.iter_mut().for_each(|sel| {
if i < node.subclass_selectors.len() {
- match sel {
- ComplexSelectorChildren::CompoundSelector(sel) => {
- sel.subclass_selectors.extend(
- node.subclass_selectors[i + 1..].iter().cloned(),
- );
- }
- _ => {}
+ if let ComplexSelectorChildren::CompoundSelector(sel) = sel {
+ sel.subclass_selectors
+ .extend(node.subclass_selectors[i + 1..].iter().cloned());
}
}
});
@@ -390,7 +341,7 @@ fn get_front_selector_tokens(selector_tokens: &Tokens) -> Vec {
vec![
TokenAndSpan {
span: Span {
- lo: BytePos(start_pos + 0),
+ lo: BytePos(start_pos),
hi: BytePos(start_pos + 1),
ctxt: SyntaxContext::empty(),
},
@@ -415,7 +366,7 @@ fn get_block_tokens(selector_tokens: &Tokens) -> Vec {
vec![
TokenAndSpan {
span: Span {
- lo: BytePos(start_pos + 0),
+ lo: BytePos(start_pos),
hi: BytePos(start_pos + 1),
ctxt: SyntaxContext::empty(),
},
@@ -522,9 +473,7 @@ fn nth_to_tokens(nth: &Nth) -> Tokens {
let mut lexer = swc_css::parser::lexer::Lexer::new(
StringInput::new(&s, nth.span.lo, nth.span.hi),
ParserConfig {
- parse_values: false,
allow_wrong_line_comments: true,
- ..Default::default()
},
);
diff --git a/packages/next-swc/crates/core/src/styled_jsx/utils.rs b/packages/next-swc/crates/core/src/styled_jsx/utils.rs
index f2acbf5f22bb..c4369ca77cf6 100644
--- a/packages/next-swc/crates/core/src/styled_jsx/utils.rs
+++ b/packages/next-swc/crates/core/src/styled_jsx/utils.rs
@@ -20,7 +20,7 @@ fn tpl_element(value: &str) -> TplElement {
}
pub fn compute_class_names(
- styles: &Vec,
+ styles: &[JSXStyle],
style_import_name: &str,
) -> (Option, Option) {
let mut static_class_name = None;
@@ -45,7 +45,7 @@ pub fn compute_class_names(
}
}
- if external_styles.len() > 0 {
+ if !external_styles.is_empty() {
let mut quasis = vec![tpl_element("jsx-")];
for _i in 1..external_styles.len() {
quasis.push(tpl_element(" jsx-"))
@@ -61,7 +61,7 @@ pub fn compute_class_names(
}));
}
- if static_hashes.len() > 0 {
+ if !static_hashes.is_empty() {
static_class_name = Some(format!("jsx-{}", hash_string(&static_hashes.join(","))));
}
@@ -295,7 +295,7 @@ pub fn make_local_styled_jsx_el(
}
}
-pub fn get_usable_import_specifier(_items: &Vec) -> String {
+pub fn get_usable_import_specifier(_items: &[ModuleItem]) -> String {
// TODO
String::from("_JSXStyle")
}
@@ -323,7 +323,7 @@ pub fn styled_jsx_import_decl(style_import_name: &str) -> ModuleItem {
}
// TODO: maybe use DJBHasher (need to implement)
-pub fn hash_string(str: &String) -> String {
+pub fn hash_string(str: &str) -> String {
let mut hasher = DefaultHasher::new();
hasher.write(str.as_bytes());
let hash_result = hasher.finish();
diff --git a/packages/next-swc/crates/core/tests/errors/styled-jsx/ts-with-css-resolve/output.js b/packages/next-swc/crates/core/tests/errors/styled-jsx/ts-with-css-resolve/output.js
index 135a868443be..6fbd823e7814 100644
--- a/packages/next-swc/crates/core/tests/errors/styled-jsx/ts-with-css-resolve/output.js
+++ b/packages/next-swc/crates/core/tests/errors/styled-jsx/ts-with-css-resolve/output.js
@@ -1,5 +1,5 @@
import _JSXStyle from "styled-jsx/style";
export default {
- styles: <_JSXStyle id={"71f03d42ea0ec6"}>{".container.jsx-71f03d42ea0ec6{background:#000;\ncolor:white;\nfont-weight:700;\nheight:100px}"},
+ styles: <_JSXStyle id={"71f03d42ea0ec6"}>{".container.jsx-71f03d42ea0ec6{background:#000;color:white;font-weight:700;height:100px}"},
className: "jsx-71f03d42ea0ec6"
-};
\ No newline at end of file
+};
diff --git a/packages/next-swc/crates/core/tests/fixture/styled-jsx/css-selector-after-pseudo/output.js b/packages/next-swc/crates/core/tests/fixture/styled-jsx/css-selector-after-pseudo/output.js
index 6cb37534c641..adc37567bc9b 100644
--- a/packages/next-swc/crates/core/tests/fixture/styled-jsx/css-selector-after-pseudo/output.js
+++ b/packages/next-swc/crates/core/tests/fixture/styled-jsx/css-selector-after-pseudo/output.js
@@ -4,7 +4,7 @@ function NavigationItem({ active , className }) {
active
}, className, "navigation-item") || "")}>
- <_JSXStyle id={"2342aae4628612c6"}>{".navigation-item.jsx-2342aae4628612c6 a::after{content:attr(data-text);\ncontent: attr(data-text) / ''}"}
+ <_JSXStyle id={"2342aae4628612c6"}>{".navigation-item.jsx-2342aae4628612c6 a::after{content:attr(data-text);content:attr(data-text)/\"\"}"}
;
}
diff --git a/packages/next-swc/crates/core/tests/fixture/styled-jsx/expressions/output.js b/packages/next-swc/crates/core/tests/fixture/styled-jsx/expressions/output.js
index ea1779a5ca0e..5822f4fe70aa 100644
--- a/packages/next-swc/crates/core/tests/fixture/styled-jsx/expressions/output.js
+++ b/packages/next-swc/crates/core/tests/fixture/styled-jsx/expressions/output.js
@@ -51,8 +51,7 @@ export default (({ display })=>
0){(0,l.injectInitialization)(e,d,C,((e,t)=>{if(f)return;for(const r of b){if(r.node.static)continue;r.traverse(e,t)}}))}e=O(e);e.insertBefore([..._,...k]);if(I.length>0){e.insertAfter(I)}if(A.length>0){e.find((e=>e.isStatement()||e.isDeclaration())).insertAfter(A)}},PrivateName(e){if(this.file.get(u)!==p||e.parentPath.isPrivate({key:e.node})){return}throw e.buildCodeFrameError(`Unknown PrivateName "${e}"`)},ExportDefaultDeclaration(e){if(this.file.get(u)!==p)return;const t=e.get("declaration");if(t.isClassDeclaration()&&(0,o.hasDecorators)(t.node)){if(t.node.id){(0,n.default)(e)}else{t.node.type="ClassExpression"}}}}}}},5617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.injectInitialization=injectInitialization;t.extractComputedKeys=extractComputedKeys;var s=r(8304);var a=r(6833);const n=s.traverse.visitors.merge([{Super(e){const{node:t,parentPath:r}=e;if(r.isCallExpression({callee:t})){this.push(r)}}},a.environmentVisitor]);const i={"TSTypeAnnotation|TypeAnnotation"(e){e.skip()},ReferencedIdentifier(e){if(this.scope.hasOwnBinding(e.node.name)){this.scope.rename(e.node.name);e.skip()}}};function handleClassTDZ(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const r=t.file.addHelper("classNameTDZError");const a=s.types.callExpression(r,[s.types.stringLiteral(e.node.name)]);e.replaceWith(s.types.sequenceExpression([a,e.node]));e.skip()}}const o={ReferencedIdentifier:handleClassTDZ};function injectInitialization(e,t,r,a){if(!r.length)return;const o=!!e.node.superClass;if(!t){const r=s.types.classMethod("constructor",s.types.identifier("constructor"),[],s.types.blockStatement([]));if(o){r.params=[s.types.restElement(s.types.identifier("args"))];r.body.body.push(s.template.statement.ast`super(...args)`)}[t]=e.get("body").unshiftContainer("body",r)}if(a){a(i,{scope:t.scope})}if(o){const e=[];t.traverse(n,e);let a=true;for(const t of e){if(a){t.insertAfter(r);a=false}else{t.insertAfter(r.map((e=>s.types.cloneNode(e))))}}}else{t.get("body").unshiftContainer("body",r)}}function extractComputedKeys(e,t,r,a){const n=[];const i={classBinding:t.node.id&&t.scope.getBinding(t.node.id.name),file:a};for(const e of r){const r=e.get("key");if(r.isReferencedIdentifier()){handleClassTDZ(r,i)}else{r.traverse(o,i)}const a=e.node;if(!r.isConstantExpression()){const e=t.scope.generateUidIdentifierBasedOnNode(a.key);t.scope.push({id:e,kind:"let"});n.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.cloneNode(e),a.key)));a.key=s.types.cloneNode(e)}}return n}},6339:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertFieldTransformed=assertFieldTransformed;function assertFieldTransformed(e){if(e.node.declare){throw e.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by `+`@babel/plugin-transform-typescript.\n`+`If you have already enabled that plugin (or '@babel/preset-typescript'), make sure `+`that it runs before any plugin related to additional class features:\n`+` - @babel/plugin-proposal-class-properties\n`+` - @babel/plugin-proposal-private-methods\n`+` - @babel/plugin-proposal-decorators`)}}},3316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(8622);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var a=_interopNamespace(s);function willPathCastToBoolean(e){const t=e;const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}class AssignmentMemoiser{constructor(){this._map=void 0;this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e);const{value:r}=t;t.count--;if(t.count===0){return a.assignmentExpression("=",r,e)}return r}set(e,t,r){return this._map.set(e,{count:r,value:t})}}function toNonOptional(e,t){const{node:r}=e;if(e.isOptionalMemberExpression()){return a.memberExpression(t,r.property,r.computed)}if(e.isOptionalCallExpression()){const s=e.get("callee");if(e.node.optional&&s.isOptionalMemberExpression()){const{object:n}=s.node;const i=e.scope.maybeGenerateMemoised(n)||n;s.get("object").replaceWith(a.assignmentExpression("=",i,n));return a.callExpression(a.memberExpression(t,a.identifier("call")),[i,...r.arguments])}return a.callExpression(t,r.arguments)}return e.node}function isInDetachedTree(e){while(e){if(e.isProgram())break;const{parentPath:t,container:r,listKey:s}=e;const a=t.node;if(s){if(r!==a[s])return true}else{if(r!==a)return true}e=t}return false}const n={memoise(){},handle(e,t){const{node:r,parent:s,parentPath:n,scope:i}=e;if(e.isOptionalMemberExpression()){if(isInDetachedTree(e))return;const o=e.find((({node:t,parent:r,parentPath:s})=>{if(s.isOptionalMemberExpression()){return r.optional||r.object!==t}if(s.isOptionalCallExpression()){return t!==e.node&&r.optional||r.callee!==t}return true}));if(i.path.isPattern()){o.replaceWith(a.callExpression(a.arrowFunctionExpression([],o.node),[]));return}const l=willPathCastToBoolean(o);const c=o.parentPath;if(c.isUpdateExpression({argument:r})||c.isAssignmentExpression({left:r})){throw e.buildCodeFrameError(`can't handle assignment`)}const p=c.isUnaryExpression({operator:"delete"});if(p&&o.isOptionalMemberExpression()&&o.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let u=e;for(;;){if(u.isOptionalMemberExpression()){if(u.node.optional)break;u=u.get("object");continue}else if(u.isOptionalCallExpression()){if(u.node.optional)break;u=u.get("callee");continue}throw new Error(`Internal error: unexpected ${u.node.type}`)}const d=u.isOptionalMemberExpression()?"object":"callee";const f=u.node[d];const m=i.maybeGenerateMemoised(f);const h=m!=null?m:f;const y=n.isOptionalCallExpression({callee:r});const g=n.isCallExpression({callee:r});u.replaceWith(toNonOptional(u,h));if(y){if(s.optional){n.replaceWith(this.optionalCall(e,s.arguments))}else{n.replaceWith(this.call(e,s.arguments))}}else if(g){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}let b=e.node;for(let t=e;t!==o;){const{parentPath:e}=t;if(e===o&&y&&s.optional){b=e.node;break}b=toNonOptional(e,b);t=e}let x;const v=o.parentPath;if(a.isMemberExpression(b)&&v.isOptionalCallExpression({callee:o.node,optional:true})){const{object:t}=b;x=e.scope.maybeGenerateMemoised(t);if(x){b.object=a.assignmentExpression("=",x,t)}}let E=o;if(p){E=v;b=v.node}const w=m?a.assignmentExpression("=",a.cloneNode(h),a.cloneNode(f)):a.cloneNode(h);if(l){let e;if(t){e=a.binaryExpression("!=",w,a.nullLiteral())}else{e=a.logicalExpression("&&",a.binaryExpression("!==",w,a.nullLiteral()),a.binaryExpression("!==",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.logicalExpression("&&",e,b))}else{let e;if(t){e=a.binaryExpression("==",w,a.nullLiteral())}else{e=a.logicalExpression("||",a.binaryExpression("===",w,a.nullLiteral()),a.binaryExpression("===",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.conditionalExpression(e,p?a.booleanLiteral(true):i.buildUndefinedNode(),b))}if(x){const e=v.node;v.replaceWith(a.optionalCallExpression(a.optionalMemberExpression(e.callee,a.identifier("call"),false,true),[a.cloneNode(x),...e.arguments],false))}return}if(n.isUpdateExpression({argument:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:i}=s;this.memoise(e,2);const o=a.binaryExpression(t[0],a.unaryExpression("+",this.get(e)),a.numericLiteral(1));if(i){n.replaceWith(this.set(e,o))}else{const{scope:t}=e;const s=t.generateUidIdentifierBasedOnNode(r);t.push({id:s});o.left=a.assignmentExpression("=",a.cloneNode(s),o.left);n.replaceWith(a.sequenceExpression([this.set(e,o),a.cloneNode(s)]))}return}if(n.isAssignmentExpression({left:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:r}=s;if(t==="="){n.replaceWith(this.set(e,r))}else{const s=t.slice(0,-1);if(a.LOGICAL_OPERATORS.includes(s)){this.memoise(e,1);n.replaceWith(a.logicalExpression(s,this.get(e),this.set(e,r)))}else{this.memoise(e,2);n.replaceWith(this.set(e,a.binaryExpression(s,this.get(e),r)))}}return}if(n.isCallExpression({callee:r})){n.replaceWith(this.call(e,s.arguments));return}if(n.isOptionalCallExpression({callee:r})){if(i.path.isPattern()){n.replaceWith(a.callExpression(a.arrowFunctionExpression([],n.node),[]));return}n.replaceWith(this.optionalCall(e,s.arguments));return}if(n.isForXStatement({left:r})||n.isObjectProperty({value:r})&&n.parentPath.isObjectPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isObjectProperty({value:s})&&n.parentPath.parentPath.isObjectPattern()||n.isArrayPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isArrayPattern()||n.isRestElement()){e.replaceWith(this.destructureSet(e));return}e.replaceWith(this.get(e))}};function memberExpressionToFunctions(e,t,r){e.traverse(t,Object.assign({},n,r,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},3852:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.enableFeature=enableFeature;t.hasFeature=hasFeature;t.runtimeKey=t.featuresKey=t.FEATURES=void 0;const r=Object.freeze({unicodeFlag:1<<0,dotAllFlag:1<<1,unicodePropertyEscape:1<<2,namedCaptureGroups:1<<3});t.FEATURES=r;const s="@babel/plugin-regexp-features/featuresKey";t.featuresKey=s;const a="@babel/plugin-regexp-features/runtimeKey";t.runtimeKey=a;function enableFeature(e,t){return e|t}function hasFeature(e,t){return!!(e&t)}},6550:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createRegExpFeaturePlugin=createRegExpFeaturePlugin;var s=r(5756);var a=r(3852);var n=r(3889);var i=r(8304);var o=r(2155);function pullFlag(e,t){e.flags=e.flags.replace(t,"")}const l="7.14.5".split(".").reduce(((e,t)=>e*1e5+ +t),0);const c="@babel/plugin-regexp-features/version";function createRegExpFeaturePlugin({name:e,feature:t,options:r={}}){return{name:e,pre(){var e;const{file:s}=this;const n=(e=s.get(a.featuresKey))!=null?e:0;let i=(0,a.enableFeature)(n,a.FEATURES[t]);const{useUnicodeFlag:o,runtime:p=true}=r;if(o===false){i=(0,a.enableFeature)(i,a.FEATURES.unicodeFlag)}if(i!==n){s.set(a.featuresKey,i)}if(!p){s.set(a.runtimeKey,false)}if(!s.has(c)||s.get(c){d[e]=t}}r.pattern=s(r.pattern,r.flags,u);if(u.namedGroup&&Object.keys(d).length>0&&p&&!isRegExpTest(e)){const t=i.types.callExpression(this.addHelper("wrapRegExp"),[r,i.types.valueToNode(d)]);(0,o.default)(t);e.replaceWith(t)}if((0,a.hasFeature)(c,a.FEATURES.unicodeFlag)){pullFlag(r,"u")}if((0,a.hasFeature)(c,a.FEATURES.dotAllFlag)){pullFlag(r,"s")}}}}}function isRegExpTest(e){return e.parentPath.isMemberExpression({object:e.node,computed:false})&&e.parentPath.get("property").isIdentifier({name:"test"})}},3889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.generateRegexpuOptions=generateRegexpuOptions;var s=r(3852);function generateRegexpuOptions(e,t){let r=false,a=false,n=false,i=false;const{flags:o,pattern:l}=e;const c=o.includes("u");if(c){if(!(0,s.hasFeature)(t,s.FEATURES.unicodeFlag)){r=true}if((0,s.hasFeature)(t,s.FEATURES.unicodePropertyEscape)&&/\\[pP]{/.test(l)){n=true}}if((0,s.hasFeature)(t,s.FEATURES.dotAllFlag)&&o.indexOf("s")>=0){a=true}if((0,s.hasFeature)(t,s.FEATURES.namedCaptureGroups)&&/\(\?<(?![=!])/.test(l)){i=true}if(!i&&!n&&!a&&(!c||r)){return null}if(c&&o.indexOf("s")>=0){a=true}return{useUnicodeFlag:r,onNamedGroup:()=>{},namedGroup:i,unicodePropertyEscape:n,dotAllFlag:a,lookbehind:true}}},2062:(e,t,r)=>{"use strict";t.__esModule=true;t.stringifyTargetsMultiline=stringifyTargetsMultiline;t.stringifyTargets=stringifyTargets;t.presetEnvSilentDebugHeader=void 0;var s=r(797);const a="#__secret_key__@babel/preset-env__don't_log_debug_header_and_resolved_targets";t.presetEnvSilentDebugHeader=a;function stringifyTargetsMultiline(e){return JSON.stringify((0,s.prettifyTargets)(e),null,2)}function stringifyTargets(e){return JSON.stringify(e).replace(/,/g,", ").replace(/^\{"/,'{ "').replace(/"\}$/,'" }')}},4299:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var s=_interopRequireWildcard(r(8304));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e){if(Object.prototype.hasOwnProperty.call(e,a)){var n=s?Object.getOwnPropertyDescriptor(e,a):null;if(n&&(n.get||n.set)){Object.defineProperty(r,a,n)}else{r[a]=e[a]}}}r.default=e;if(t){t.set(e,r)}return r}const{types:a}=s.default||s;class ImportsCache{constructor(e){this._imports=new WeakMap;this._anonymousImports=new WeakMap;this._lastImports=new WeakMap;this._resolver=e}storeAnonymous(e,t,r){const s=this._normalizeKey(e,t);const n=this._ensure(this._anonymousImports,e,Set);if(n.has(s))return;const i=r(e.node.sourceType==="script",a.stringLiteral(this._resolver(t)));n.add(s);this._injectImport(e,i)}storeNamed(e,t,r,s){const n=this._normalizeKey(e,t,r);const i=this._ensure(this._imports,e,Map);if(!i.has(n)){const{node:o,name:l}=s(e.node.sourceType==="script",a.stringLiteral(this._resolver(t)),a.identifier(r));i.set(n,l);this._injectImport(e,o)}return a.identifier(i.get(n))}_injectImport(e,t){let r=this._lastImports.get(e);if(r&&r.node&&r.parent===e.node&&r.container===e.node.body){r=r.insertAfter(t)}else{r=e.unshiftContainer("body",t)}r=r[r.length-1];this._lastImports.set(e,r)}_ensure(e,t,r){let s=e.get(t);if(!s){s=new r;e.set(t,s)}return s}_normalizeKey(e,t,r=""){const{sourceType:s}=e.node;return`${r&&s}::${t}::${r}`}}t["default"]=ImportsCache},8038:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=definePolyfillProvider;var s=r(1403);var a=_interopRequireWildcard(r(797));var n=r(4182);var i=_interopRequireDefault(r(4299));var o=r(2062);var l=r(1522);var c=_interopRequireWildcard(r(9313));var p=_interopRequireWildcard(r(6814));var u=_interopRequireDefault(r(8510));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e){if(Object.prototype.hasOwnProperty.call(e,a)){var n=s?Object.getOwnPropertyDescriptor(e,a):null;if(n&&(n.get||n.set)){Object.defineProperty(r,a,n)}else{r[a]=e[a]}}}r.default=e;if(t){t.set(e,r)}return r}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var r={};var s=Object.keys(e);var a,n;for(n=0;n=0)continue;r[a]=e[a]}return r}const d=a.default.default||a.default;function resolveOptions(e,t){const{method:r,targets:s,ignoreBrowserslistConfig:a,configPath:n,debug:i,shouldInjectPolyfill:o,absoluteImports:l}=e,c=_objectWithoutPropertiesLoose(e,["method","targets","ignoreBrowserslistConfig","configPath","debug","shouldInjectPolyfill","absoluteImports"]);let p;if(r==="usage-global")p="usageGlobal";else if(r==="entry-global")p="entryGlobal";else if(r==="usage-pure")p="usagePure";else if(typeof r!=="string"){throw new Error(".method must be a string")}else{throw new Error(`.method must be one of "entry-global", "usage-global"`+` or "usage-pure" (received ${JSON.stringify(r)})`)}if(typeof o==="function"){if(e.include||e.exclude){throw new Error(`.include and .exclude are not supported when using the`+` .shouldInjectPolyfill function.`)}}else if(o!=null){throw new Error(`.shouldInjectPolyfill must be a function, or undefined`+` (received ${JSON.stringify(o)})`)}if(l!=null&&typeof l!=="boolean"&&typeof l!=="string"){throw new Error(`.absoluteImports must be a boolean, a string, or undefined`+` (received ${JSON.stringify(l)})`)}let u;if(s||n||a){const e=typeof s==="string"||Array.isArray(s)?{browsers:s}:s;u=d(e,{ignoreBrowserslistConfig:a,configPath:n})}else{u=t.targets()}return{method:r,methodName:p,targets:u,absoluteImports:l!=null?l:false,shouldInjectPolyfill:o,debug:!!i,providerOptions:c}}function instantiateProvider(e,t,r,s,o,c){const{method:d,methodName:f,targets:m,debug:h,shouldInjectPolyfill:y,providerOptions:g,absoluteImports:b}=resolveOptions(t,c);const x=(0,n.createUtilsGetter)(new i.default((e=>p.resolve(s,e,b))));let v,E;let w;let j;let S;const P=new Map;const _={babel:c,getUtils:x,method:t.method,targets:m,createMetaResolver:u.default,shouldInjectPolyfill(t){if(j===undefined){throw new Error(`Internal error in the ${e.name} provider: `+`shouldInjectPolyfill() can't be called during initialization.`)}if(!j.has(t)){console.warn(`Internal error in the ${k.name} provider: `+`unknown polyfill "${t}".`)}if(S&&!S(t))return false;let r=(0,a.isRequired)(t,m,{compatData:w,includes:v,excludes:E});if(y){r=y(t,r);if(typeof r!=="boolean"){throw new Error(`.shouldInjectPolyfill must return a boolean.`)}}return r},debug(e){o().found=true;if(!h||!e)return;if(o().polyfills.has(k.name))return;o().polyfills.set(e,w&&e&&w[e])},assertDependency(e,t="*"){if(r===false)return;if(b){return}const a=t==="*"?e:`${e}@^${t}`;const n=r.all?false:mapGetOr(P,`${e} :: ${s}`,(()=>p.has(s,e)));if(!n){o().missingDeps.add(a)}}};const k=e(_,g,s);if(typeof k[f]!=="function"){throw new Error(`The "${k.name||e.name}" provider doesn't `+`support the "${d}" polyfilling method.`)}if(Array.isArray(k.polyfills)){j=new Set(k.polyfills);S=k.filterPolyfills}else if(k.polyfills){j=new Set(Object.keys(k.polyfills));w=k.polyfills;S=k.filterPolyfills}else{j=new Set}({include:v,exclude:E}=(0,l.validateIncludeExclude)(k.name||e.name,j,g.include||[],g.exclude||[]));return{debug:h,method:d,targets:m,provider:k,callProvider(e,t){const r=x(t);k[f](e,r,t)}}}function definePolyfillProvider(e){return(0,s.declare)(((t,r,s)=>{t.assertVersion(7);const{traverse:n}=t;let i;const u=(0,l.applyMissingDependenciesDefaults)(r,t);const{debug:d,method:f,targets:m,provider:h,callProvider:y}=instantiateProvider(e,r,u,s,(()=>i),t);const g=f==="entry-global"?c.entry:c.usage;const b=h.visitor?n.visitors.merge([g(y),h.visitor]):g(y);if(d&&d!==o.presetEnvSilentDebugHeader){console.log(`${h.name}: \`DEBUG\` option`);console.log(`\nUsing targets: ${(0,o.stringifyTargetsMultiline)(m)}`);console.log(`\nUsing polyfills with \`${f}\` method:`)}return{name:"inject-polyfills",visitor:b,pre(){var e;i={polyfills:new Map,found:false,providers:new Set,missingDeps:new Set};(e=h.pre)==null?void 0:e.apply(this,arguments)},post(){var e;(e=h.post)==null?void 0:e.apply(this,arguments);if(u!==false){if(u.log==="per-file"){p.logMissing(i.missingDeps)}else{p.laterLogMissing(i.missingDeps)}}if(!d)return;if(this.filename)console.log(`\n[${this.filename}]`);if(i.polyfills.size===0){console.log(f==="entry-global"?i.found?`Based on your targets, the ${h.name} polyfill did not add any polyfill.`:`The entry point for the ${h.name} polyfill has not been found.`:`Based on your code and targets, the ${h.name} polyfill did not add any polyfill.`);return}if(f==="entry-global"){console.log(`The ${h.name} polyfill entry has been replaced with `+`the following polyfills:`)}else{console.log(`The ${h.name} polyfill added the following polyfills:`)}for(const[e,t]of i.polyfills){if(t){const r=(0,a.getInclusionReasons)(e,m,t);const s=JSON.stringify(r).replace(/,/g,", ").replace(/^\{"/,'{ "').replace(/"\}$/,'" }');console.log(` ${e} ${s}`)}else{console.log(` ${e}`)}}}}}))}function mapGetOr(e,t,r){let s=e.get(t);if(s===undefined){s=r();e.set(t,s)}return s}},8510:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=createMetaResolver;var s=r(4182);const a=new Set(["global","globalThis","self","window"]);function createMetaResolver(e){const{static:t,instance:r,global:n}=e;return e=>{if(e.kind==="global"&&n&&(0,s.has)(n,e.name)){return{kind:"global",desc:n[e.name],name:e.name}}if(e.kind==="property"||e.kind==="in"){const{placement:i,object:o,key:l}=e;if(o&&i==="static"){if(n&&a.has(o)&&(0,s.has)(n,l)){return{kind:"global",desc:n[l],name:l}}if(t&&(0,s.has)(t,o)&&(0,s.has)(t[o],l)){return{kind:"static",desc:t[o][l],name:`${o}$${l}`}}}if(r&&(0,s.has)(r,l)){return{kind:"instance",desc:r[l],name:`${l}`}}}}}},6814:(e,t,r)=>{"use strict";t.__esModule=true;t.resolve=resolve;t.has=has;t.logMissing=logMissing;t.laterLogMissing=laterLogMissing;var s=_interopRequireDefault(r(1017));var a=_interopRequireDefault(r(6240));var n=_interopRequireDefault(r(9820));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const i=parseFloat(process.versions.node)>=8.9;function resolve(e,t,r){if(r===false)return t;let a=e;if(typeof r==="string"){a=s.default.resolve(a,r)}let o,l;let c=t.indexOf("/");if(t[0]==="@"){c=t.indexOf("/",c+1)}if(c===-1){o=t;l=""}else{o=t.slice(0,c);l=t.slice(c)}try{let e;if(i){e=require.resolve(`${o}/package.json`,{paths:[a]})}else{e=n.default.sync(`${o}/package.json`,{basedir:a})}return s.default.dirname(e)+l}catch(r){if(r.code!=="MODULE_NOT_FOUND")throw r;throw Object.assign(new Error(`Failed to resolve "${t}" relative to "${e}"`),{code:"BABEL_POLYFILL_NOT_FOUND",polyfill:t,dirname:e})}}function has(e,t){try{if(i){require.resolve(t,{paths:[e]})}else{n.default.sync(t,{basedir:e})}return true}catch(e){return false}}function logMissing(e){if(e.size===0)return;const t=Array.from(e).sort().join(" ");console.warn("\nSome polyfills have been added but are not present in your dependencies.\n"+"Please run one of the following commands:\n"+`\tnpm install --save ${t}\n`+`\tyarn add ${t}\n`);process.exitCode=1}let o=new Set;const l=(0,a.default)((()=>{logMissing(o);o=new Set}),100);function laterLogMissing(e){if(e.size===0)return;e.forEach((e=>o.add(e)));l()}},1522:(e,t,r)=>{"use strict";t.__esModule=true;t.validateIncludeExclude=validateIncludeExclude;t.applyMissingDependenciesDefaults=applyMissingDependenciesDefaults;var s=r(4182);function patternToRegExp(e){if(e instanceof RegExp)return e;try{return new RegExp(`^${e}$`)}catch(e){return null}}function buildUnusedError(e,t){if(!t.length)return"";return` - The following "${e}" patterns didn't match any polyfill:\n`+t.map((e=>` ${String(e)}\n`)).join("")}function buldDuplicatesError(e){if(!e.size)return"";return` - The following polyfills were matched both by "include" and "exclude" patterns:\n`+Array.from(e,(e=>` ${e}\n`)).join("")}function validateIncludeExclude(e,t,r,a){let n;const filter=e=>{const r=patternToRegExp(e);if(!r)return false;let s=false;for(const e of t){if(r.test(e)){s=true;n.add(e)}}return!s};const i=n=new Set;const o=Array.from(r).filter(filter);const l=n=new Set;const c=Array.from(a).filter(filter);const p=(0,s.intersection)(i,l);if(p.size>0||o.length>0||c.length>0){throw new Error(`Error while validating the "${e}" provider options:\n`+buildUnusedError("include",o)+buildUnusedError("exclude",c)+buldDuplicatesError(p))}return{include:i,exclude:l}}function applyMissingDependenciesDefaults(e,t){const{missingDependencies:r={}}=e;if(r===false)return false;const s=t.caller((e=>e==null?void 0:e.name));const{log:a="deferred",inject:n=(s==="rollup-plugin-babel"?"throw":"import"),all:i=false}=r;return{log:a,inject:n,all:i}}},4182:(e,t,r)=>{"use strict";t.__esModule=true;t.intersection=intersection;t.has=has;t.resolveKey=resolveKey;t.resolveSource=resolveSource;t.getImportSource=getImportSource;t.getRequireSource=getRequireSource;t.createUtilsGetter=createUtilsGetter;var s=_interopRequireWildcard(r(8304));function _getRequireWildcardCache(){if(typeof WeakMap!=="function")return null;var e=new WeakMap;_getRequireWildcardCache=function(){return e};return e}function _interopRequireWildcard(e){if(e&&e.__esModule){return e}if(e===null||typeof e!=="object"&&typeof e!=="function"){return{default:e}}var t=_getRequireWildcardCache();if(t&&t.has(e)){return t.get(e)}var r={};var s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e){if(Object.prototype.hasOwnProperty.call(e,a)){var n=s?Object.getOwnPropertyDescriptor(e,a):null;if(n&&(n.get||n.set)){Object.defineProperty(r,a,n)}else{r[a]=e[a]}}}r.default=e;if(t){t.set(e,r)}return r}const{types:a,template:n}=s.default||s;function intersection(e,t){const r=new Set;e.forEach((e=>t.has(e)&&r.add(e)));return r}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function getType(e){return Object.prototype.toString.call(e).slice(8,-1)}function resolveId(e){if(e.isIdentifier()&&!e.scope.hasBinding(e.node.name,true)){return e.node.name}const{deopt:t}=e.evaluate();if(t&&t.isIdentifier()){return t.node.name}}function resolveKey(e,t=false){const{node:r,parent:s,scope:a}=e;if(e.isStringLiteral())return r.value;const{name:n}=r;const i=e.isIdentifier();if(i&&!(t||s.computed))return n;if(t&&e.isMemberExpression()&&e.get("object").isIdentifier({name:"Symbol"})&&!a.hasBinding("Symbol",true)){const t=resolveKey(e.get("property"),e.node.computed);if(t)return"Symbol."+t}if(!i||a.hasBinding(n,true)){const{value:t}=e.evaluate();if(typeof t==="string")return t}}function resolveSource(e){if(e.isMemberExpression()&&e.get("property").isIdentifier({name:"prototype"})){const t=resolveId(e.get("object"));if(t){return{id:t,placement:"prototype"}}return{id:null,placement:null}}const t=resolveId(e);if(t){return{id:t,placement:"static"}}const{value:r}=e.evaluate();if(r!==undefined){return{id:getType(r),placement:"prototype"}}else if(e.isRegExpLiteral()){return{id:"RegExp",placement:"prototype"}}else if(e.isFunction()){return{id:"Function",placement:"prototype"}}return{id:null,placement:null}}function getImportSource({node:e}){if(e.specifiers.length===0)return e.source.value}function getRequireSource({node:e}){if(!a.isExpressionStatement(e))return;const{expression:t}=e;const r=a.isCallExpression(t)&&a.isIdentifier(t.callee)&&t.callee.name==="require"&&t.arguments.length===1&&a.isStringLiteral(t.arguments[0]);if(r)return t.arguments[0].value}function hoist(e){e._blockHoist=3;return e}function createUtilsGetter(e){return t=>{const r=t.findParent((e=>e.isProgram()));return{injectGlobalImport(t){e.storeAnonymous(r,t,((e,t)=>e?n.statement.ast`require(${t})`:a.importDeclaration([],t)))},injectNamedImport(t,s,i=s){return e.storeNamed(r,t,s,((e,t,s)=>{const o=r.scope.generateUidIdentifier(i);return{node:e?hoist(n.statement.ast`
var ${o} = require(${t}).${s}
- `):a.importDeclaration([a.importSpecifier(o,s)],t),name:o.name}}))},injectDefaultImport(t,s=t){return e.storeNamed(r,t,"default",((e,t)=>{const i=r.scope.generateUidIdentifier(s);return{node:e?hoist(n.statement.ast`var ${i} = require(${t})`):a.importDeclaration([a.importDefaultSpecifier(i)],t),name:i.name}}))}}}}},8160:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var s=r(4182);var _default=e=>({ImportDeclaration(t){const r=(0,s.getImportSource)(t);if(!r)return;e({kind:"import",source:r},t)},Program(t){t.get("body").forEach((t=>{const r=(0,s.getRequireSource)(t);if(!r)return;e({kind:"import",source:r},t)}))}});t["default"]=_default},9313:(e,t,r)=>{"use strict";t.__esModule=true;t.entry=t.usage=void 0;var s=_interopRequireDefault(r(6527));t.usage=s.default;var a=_interopRequireDefault(r(8160));t.entry=a.default;function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},6527:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var s=r(4182);var _default=e=>{function property(t,r,s,a){return e({kind:"property",object:t,key:r,placement:s},a)}return{ReferencedIdentifier(t){const{node:{name:r},scope:s}=t;if(s.getBindingIdentifier(r))return;e({kind:"global",name:r},t)},MemberExpression(e){const t=(0,s.resolveKey)(e.get("property"),e.node.computed);if(!t||t==="prototype")return;const r=e.get("object");const a=r.scope.getBinding(r.node.name);if(a&&a.path.isImportNamespaceSpecifier())return;const n=(0,s.resolveSource)(r);return property(n.id,t,n.placement,e)},ObjectPattern(e){const{parentPath:t,parent:r}=e;let a;if(t.isVariableDeclarator()){a=t.get("init")}else if(t.isAssignmentExpression()){a=t.get("right")}else if(t.isFunction()){const s=t.parentPath;if(s.isCallExpression()||s.isNewExpression()){if(s.node.callee===r){a=s.get("arguments")[e.key]}}}let n=null;let i=null;if(a)({id:n,placement:i}=(0,s.resolveSource)(a));for(const t of e.get("properties")){if(t.isObjectProperty()){const e=(0,s.resolveKey)(t.get("key"));if(e)property(n,e,i,t)}}},BinaryExpression(t){if(t.node.operator!=="in")return;const r=(0,s.resolveSource)(t.get("right"));const a=(0,s.resolveKey)(t.get("left"),true);if(!a)return;e({kind:"in",object:r.id,key:a,placement:r.placement},t)}}};t["default"]=_default},1403:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},9820:(e,t,r)=>{var s=r(7462);s.core=r(9118);s.isCore=r(779);s.sync=r(5565);e.exports=s},7462:(e,t,r)=>{var s=r(7147);var a=r(1017);var n=r(7673);var i=r(7901);var o=r(7023);var l=r(8746);var c=s.realpath&&typeof s.realpath.native==="function"?s.realpath.native:s.realpath;var p=function isFile(e,t){s.stat(e,(function(e,r){if(!e){return t(null,r.isFile()||r.isFIFO())}if(e.code==="ENOENT"||e.code==="ENOTDIR")return t(null,false);return t(e)}))};var u=function isDirectory(e,t){s.stat(e,(function(e,r){if(!e){return t(null,r.isDirectory())}if(e.code==="ENOENT"||e.code==="ENOTDIR")return t(null,false);return t(e)}))};var d=function realpath(e,t){c(e,(function(r,s){if(r&&r.code!=="ENOENT")t(r);else t(null,r?e:s)}))};var f=function maybeRealpath(e,t,r,s){if(r&&r.preserveSymlinks===false){e(t,s)}else{s(null,t)}};var m=function defaultReadPackage(e,t,r){e(t,(function(e,t){if(e)r(e);else{try{var s=JSON.parse(t);r(null,s)}catch(e){r(null)}}}))};var h=function getPackageCandidates(e,t,r){var s=i(t,r,e);for(var n=0;n{e.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=(new Error).stack;Error.prepareStackTrace=e;return t[2].getFileName()}},9118:(e,t,r)=>{var s=process.versions&&process.versions.node&&process.versions.node.split(".")||[];function specifierIncluded(e){var t=e.split(" ");var r=t.length>1?t[0]:"=";var a=(t.length>1?t[1]:t[0]).split(".");for(var n=0;n<3;++n){var i=parseInt(s[n]||0,10);var o=parseInt(a[n]||0,10);if(i===o){continue}if(r==="<"){return i="){return i>=o}else{return false}}return r===">="}function matchesRange(e){var t=e.split(/ ?&& ?/);if(t.length===0){return false}for(var r=0;r{var s=r(8746);e.exports=function isCore(e){return s(e)}},7901:(e,t,r)=>{var s=r(1017);var a=s.parse||r(2742);var n=function getNodeModulesDirs(e,t){var r="/";if(/^([A-Za-z]:)/.test(e)){r=""}else if(/^\\\\/.test(e)){r="\\\\"}var n=[e];var i=a(e);while(i.dir!==n[n.length-1]){n.push(i.dir);i=a(i.dir)}return n.reduce((function(e,a){return e.concat(t.map((function(e){return s.resolve(r,a,e)})))}),[])};e.exports=function nodeModulesPaths(e,t,r){var s=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"];if(t&&typeof t.paths==="function"){return t.paths(r,e,(function(){return n(e,s)}),t)}var a=n(e,s);return t&&t.paths?a.concat(t.paths):a}},7023:e=>{e.exports=function(e,t){return t||{}}},5565:(e,t,r)=>{var s=r(8746);var a=r(7147);var n=r(1017);var i=r(7673);var o=r(7901);var l=r(7023);var c=a.realpathSync&&typeof a.realpathSync.native==="function"?a.realpathSync.native:a.realpathSync;var p=function isFile(e){try{var t=a.statSync(e)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR"))return false;throw e}return t.isFile()||t.isFIFO()};var u=function isDirectory(e){try{var t=a.statSync(e)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR"))return false;throw e}return t.isDirectory()};var d=function realpathSync(e){try{return c(e)}catch(e){if(e.code!=="ENOENT"){throw e}}return e};var f=function maybeRealpathSync(e,t,r){if(r&&r.preserveSymlinks===false){return e(t)}return t};var m=function defaultReadPackageSync(e,t){var r=e(t);try{var s=JSON.parse(r);return s}catch(e){}};var h=function getPackageCandidates(e,t,r){var s=o(t,r,e);for(var a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(8622);function getObjRef(e,t,r){let a;if(s.isIdentifier(e)){if(r.hasBinding(e.name)){return e}else{a=e}}else if(s.isMemberExpression(e)){a=e.object;if(s.isSuper(a)||s.isIdentifier(a)&&r.hasBinding(a.name)){return a}}else{throw new Error(`We can't explode this node type ${e["type"]}`)}const n=r.generateUidIdentifierBasedOnNode(a);r.push({id:n});t.push(s.assignmentExpression("=",s.cloneNode(n),s.cloneNode(a)));return n}function getPropRef(e,t,r){const a=e.property;if(s.isPrivateName(a)){throw new Error("We can't generate property ref for private name, please install `@babel/plugin-proposal-class-properties`")}const n=s.toComputedKey(e,a);if(s.isLiteral(n)&&s.isPureish(n))return n;const i=r.generateUidIdentifierBasedOnNode(a);r.push({id:i});t.push(s.assignmentExpression("=",s.cloneNode(i),s.cloneNode(a)));return i}function _default(e,t,r,a,n){let i;if(s.isIdentifier(e)&&n){i=e}else{i=getObjRef(e,t,a)}let o,l;if(s.isIdentifier(e)){o=s.cloneNode(e);l=i}else{const r=getPropRef(e,t,a);const n=e.computed||s.isLiteral(r);l=s.memberExpression(s.cloneNode(i),s.cloneNode(r),n);o=s.memberExpression(s.cloneNode(i),s.cloneNode(r),n)}return{uid:l,ref:o}}},550:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(3811);var a=r(153);var n=r(8622);const i=(0,a.default)(`\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n`);const o=(0,a.default)(`\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n`);const l={"ReferencedIdentifier|BindingIdentifier"(e,t){if(e.node.name!==t.name)return;const r=e.scope.getBindingIdentifier(t.name);if(r!==t.outerDeclar)return;t.selfReference=true;e.stop()}};function getNameFromLiteralId(e){if(n.isNullLiteral(e)){return"null"}if(n.isRegExpLiteral(e)){return`_${e.pattern}_${e.flags}`}if(n.isTemplateLiteral(e)){return e.quasis.map((e=>e.value.raw)).join("")}if(e.value!==undefined){return e.value+""}return""}function wrap(e,t,r,a){if(e.selfReference){if(a.hasBinding(r.name)&&!a.hasGlobal(r.name)){a.rename(r.name)}else{if(!n.isFunction(t))return;let e=i;if(t.generator){e=o}const l=e({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:a.generateUidIdentifier(r.name)}).expression;const c=l.callee.body.body[0].params;for(let e=0,r=(0,s.default)(t);e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(8622);function _default(e){const t=e.params;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=hoistVariables;var s=r(8622);const a={Scope(e,t){if(t.kind==="let")e.skip()},FunctionParent(e){e.skip()},VariableDeclaration(e,t){if(t.kind&&e.node.kind!==t.kind)return;const r=[];const a=e.get("declarations");let n;for(const e of a){n=e.node.id;if(e.node.init){r.push(s.expressionStatement(s.assignmentExpression("=",e.node.id,e.node.init)))}for(const r of Object.keys(e.getBindingIdentifiers())){t.emit(s.identifier(r),r,e.node.init!==null)}}if(e.parentPath.isFor({left:e.node})){e.replaceWith(n)}else{e.replaceWithMultiple(r)}}};function hoistVariables(e,t,r="var"){e.traverse(a,{kind:r,emit:t})}},6591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9491);var a=r(8622);class ImportBuilder{constructor(e,t,r){this._statements=[];this._resultName=null;this._scope=null;this._hub=null;this._importedSource=void 0;this._scope=t;this._hub=r;this._importedSource=e}done(){return{statements:this._statements,resultName:this._resultName}}import(){this._statements.push(a.importDeclaration([],a.stringLiteral(this._importedSource)));return this}require(){this._statements.push(a.expressionStatement(a.callExpression(a.identifier("require"),[a.stringLiteral(this._importedSource)])));return this}namespace(e="namespace"){const t=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];s(r.type==="ImportDeclaration");s(r.specifiers.length===0);r.specifiers=[a.importNamespaceSpecifier(t)];this._resultName=a.cloneNode(t);return this}default(e){e=this._scope.generateUidIdentifier(e);const t=this._statements[this._statements.length-1];s(t.type==="ImportDeclaration");s(t.specifiers.length===0);t.specifiers=[a.importDefaultSpecifier(e)];this._resultName=a.cloneNode(e);return this}named(e,t){if(t==="default")return this.default(e);e=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];s(r.type==="ImportDeclaration");s(r.specifiers.length===0);r.specifiers=[a.importSpecifier(e,a.identifier(t))];this._resultName=a.cloneNode(e);return this}var(e){e=this._scope.generateUidIdentifier(e);let t=this._statements[this._statements.length-1];if(t.type!=="ExpressionStatement"){s(this._resultName);t=a.expressionStatement(this._resultName);this._statements.push(t)}this._statements[this._statements.length-1]=a.variableDeclaration("var",[a.variableDeclarator(e,t.expression)]);this._resultName=a.cloneNode(e);return this}defaultInterop(){return this._interop(this._hub.addHelper("interopRequireDefault"))}wildcardInterop(){return this._interop(this._hub.addHelper("interopRequireWildcard"))}_interop(e){const t=this._statements[this._statements.length-1];if(t.type==="ExpressionStatement"){t.expression=a.callExpression(e,[t.expression])}else if(t.type==="VariableDeclaration"){s(t.declarations.length===1);t.declarations[0].init=a.callExpression(e,[t.declarations[0].init])}else{s.fail("Unexpected type.")}return this}prop(e){const t=this._statements[this._statements.length-1];if(t.type==="ExpressionStatement"){t.expression=a.memberExpression(t.expression,a.identifier(e))}else if(t.type==="VariableDeclaration"){s(t.declarations.length===1);t.declarations[0].init=a.memberExpression(t.declarations[0].init,a.identifier(e))}else{s.fail("Unexpected type:"+t.type)}return this}read(e){this._resultName=a.memberExpression(this._resultName,a.identifier(e))}}t["default"]=ImportBuilder},4872:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9491);var a=r(8622);var n=r(6591);var i=r(1719);class ImportInjector{constructor(e,t,r){this._defaultOpts={importedSource:null,importedType:"commonjs",importedInterop:"babel",importingInterop:"babel",ensureLiveReference:false,ensureNoContext:false,importPosition:"before"};const s=e.find((e=>e.isProgram()));this._programPath=s;this._programScope=s.scope;this._hub=s.hub;this._defaultOpts=this._applyDefaults(t,r,true)}addDefault(e,t){return this.addNamed("default",e,t)}addNamed(e,t,r){s(typeof e==="string");return this._generateImport(this._applyDefaults(t,r),e)}addNamespace(e,t){return this._generateImport(this._applyDefaults(e,t),null)}addSideEffect(e,t){return this._generateImport(this._applyDefaults(e,t),false)}_applyDefaults(e,t,r=false){const a=[];if(typeof e==="string"){a.push({importedSource:e});a.push(t)}else{s(!t,"Unexpected secondary arguments.");a.push(e)}const n=Object.assign({},this._defaultOpts);for(const e of a){if(!e)continue;Object.keys(n).forEach((t=>{if(e[t]!==undefined)n[t]=e[t]}));if(!r){if(e.nameHint!==undefined)n.nameHint=e.nameHint;if(e.blockHoist!==undefined)n.blockHoist=e.blockHoist}}return n}_generateImport(e,t){const r=t==="default";const s=!!t&&!r;const o=t===null;const{importedSource:l,importedType:c,importedInterop:p,importingInterop:u,ensureLiveReference:d,ensureNoContext:f,nameHint:m,importPosition:h,blockHoist:y}=e;let g=m||t;const b=(0,i.default)(this._programPath);const x=b&&u==="node";const v=b&&u==="babel";if(h==="after"&&!b){throw new Error(`"importPosition": "after" is only supported in modules`)}const E=new n.default(l,this._programScope,this._hub);if(c==="es6"){if(!x&&!v){throw new Error("Cannot import an ES6 module from CommonJS")}E.import();if(o){E.namespace(m||l)}else if(r||s){E.named(g,t)}}else if(c!=="commonjs"){throw new Error(`Unexpected interopType "${c}"`)}else if(p==="babel"){if(x){g=g!=="default"?g:l;const e=`${l}$es6Default`;E.import();if(o){E.default(e).var(g||l).wildcardInterop()}else if(r){if(d){E.default(e).var(g||l).defaultInterop().read("default")}else{E.default(e).var(g).defaultInterop().prop(t)}}else if(s){E.default(e).read(t)}}else if(v){E.import();if(o){E.namespace(g||l)}else if(r||s){E.named(g,t)}}else{E.require();if(o){E.var(g||l).wildcardInterop()}else if((r||s)&&d){if(r){g=g!=="default"?g:l;E.var(g).read(t);E.defaultInterop()}else{E.var(l).read(t)}}else if(r){E.var(g).defaultInterop().prop(t)}else if(s){E.var(g).prop(t)}}}else if(p==="compiled"){if(x){E.import();if(o){E.default(g||l)}else if(r||s){E.default(l).read(g)}}else if(v){E.import();if(o){E.namespace(g||l)}else if(r||s){E.named(g,t)}}else{E.require();if(o){E.var(g||l)}else if(r||s){if(d){E.var(l).read(g)}else{E.prop(t).var(g)}}}}else if(p==="uncompiled"){if(r&&d){throw new Error("No live reference for commonjs default")}if(x){E.import();if(o){E.default(g||l)}else if(r){E.default(g)}else if(s){E.default(l).read(g)}}else if(v){E.import();if(o){E.default(g||l)}else if(r){E.default(g)}else if(s){E.named(g,t)}}else{E.require();if(o){E.var(g||l)}else if(r){E.var(g)}else if(s){if(d){E.var(l).read(g)}else{E.var(g).prop(t)}}}}else{throw new Error(`Unknown importedInterop "${p}".`)}const{statements:w,resultName:j}=E.done();this._insertStatements(w,h,y);if((r||s)&&f&&j.type!=="Identifier"){return a.sequenceExpression([a.numericLiteral(0),j])}return j}_insertStatements(e,t="before",r=3){const s=this._programPath.get("body");if(t==="after"){for(let t=s.length-1;t>=0;t--){if(s[t].isImportDeclaration()){s[t].insertAfter(e);return}}}else{e.forEach((e=>{e._blockHoist=r}));const t=s.find((e=>{const t=e.node._blockHoist;return Number.isFinite(t)&&t<4}));if(t){t.insertBefore(e);return}}this._programPath.unshiftContainer("body",e)}}t["default"]=ImportInjector},9115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.addDefault=addDefault;t.addNamed=addNamed;t.addNamespace=addNamespace;t.addSideEffect=addSideEffect;Object.defineProperty(t,"ImportInjector",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"isModule",{enumerable:true,get:function(){return a.default}});var s=r(4872);var a=r(1719);function addDefault(e,t,r){return new s.default(e).addDefault(t,r)}function addNamed(e,t,r,a){return new s.default(e).addNamed(t,r,a)}function addNamespace(e,t,r){return new s.default(e).addNamespace(t,r)}function addSideEffect(e,t,r){return new s.default(e).addSideEffect(t,r)}},1719:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isModule;function isModule(e){const{sourceType:t}=e.node;if(t!=="module"&&t!=="script"){throw e.buildCodeFrameError(`Unknown sourceType "${t}", cannot transform.`)}return e.node.sourceType==="module"}},6721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=optimiseCallExpression;var s=r(8622);function optimiseCallExpression(e,t,r,a){if(r.length===1&&s.isSpreadElement(r[0])&&s.isIdentifier(r[0].argument,{name:"arguments"})){if(a){return s.optionalCallExpression(s.optionalMemberExpression(e,s.identifier("apply"),false,true),[t,r[0].argument],false)}return s.callExpression(s.memberExpression(e,s.identifier("apply")),[t,r[0].argument])}else{if(a){return s.optionalCallExpression(s.optionalMemberExpression(e,s.identifier("call"),false,true),[t,...r],false)}return s.callExpression(s.memberExpression(e,s.identifier("call")),[t,...r])}}},9055:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,r,s)=>{if(!t.assertVersion){t=Object.assign(copyApiObject(t),{assertVersion(e){throwVersionError(e,t.version)}})}return e(t,r||{},s)}}function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(6946);var a=r(2155);var n=r(8622);const i={Function(e){e.skip()},AwaitExpression(e,{wrapAwait:t}){const r=e.get("argument");if(e.parentPath.isYieldExpression()){e.replaceWith(r.node);return}e.replaceWith(n.yieldExpression(t?n.callExpression(n.cloneNode(t),[r.node]):r.node))}};function _default(e,t,r){e.traverse(i,{wrapAwait:t.wrapAwait});const o=checkIsIIFE(e);e.node.async=false;e.node.generator=true;(0,s.default)(e,n.cloneNode(t.wrapAsync),r);const l=e.isObjectMethod()||e.isClassMethod()||e.parentPath.isObjectProperty()||e.parentPath.isClassProperty();if(!l&&!o&&e.isExpression()){(0,a.default)(e)}function checkIsIIFE(e){if(e.parentPath.isCallExpression({callee:e.node})){return true}const{parentPath:t}=e;if(t.isMemberExpression()&&n.isIdentifier(t.node.property,{name:"bind"})){const{parentPath:e}=t;return e.isCallExpression()&&e.node.arguments.length===1&&n.isThisExpression(e.node.arguments[0])&&e.parentPath.isCallExpression({callee:e.node})}return false}}},6833:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.skipAllButComputedKey=skipAllButComputedKey;t["default"]=t.environmentVisitor=void 0;var s=r(7369);var a=r(7281);var n=r(6721);var i=r(8622);function getPrototypeOfExpression(e,t,r,s){e=i.cloneNode(e);const a=t||s?e:i.memberExpression(e,i.identifier("prototype"));return i.callExpression(r.addHelper("getPrototypeOf"),[a])}function skipAllButComputedKey(e){if(!e.node.computed){e.skip();return}const t=i.VISITOR_KEYS[e.type];for(const r of t){if(r!=="key")e.skipKey(r)}}const o={[`${i.staticBlock?"StaticBlock|":""}ClassPrivateProperty|TypeAnnotation`](e){e.skip()},Function(e){if(e.isMethod())return;if(e.isArrowFunctionExpression())return;e.skip()},"Method|ClassProperty"(e){skipAllButComputedKey(e)}};t.environmentVisitor=o;const l=s.default.visitors.merge([o,{Super(e,t){const{node:r,parentPath:s}=e;if(!s.isMemberExpression({object:r}))return;t.handle(s)}}]);const c=s.default.visitors.merge([o,{Scopable(e,{refName:t}){const r=e.scope.getOwnBinding(t);if(r&&r.identifier.name===t){e.scope.rename(t)}}}]);const p={memoise(e,t){const{scope:r,node:s}=e;const{computed:a,property:n}=s;if(!a){return}const i=r.maybeGenerateMemoised(n);if(!i){return}this.memoiser.set(n,i,t)},prop(e){const{computed:t,property:r}=e.node;if(this.memoiser.has(r)){return i.cloneNode(this.memoiser.get(r))}if(t){return i.cloneNode(r)}return i.stringLiteral(r.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,t){const r=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return i.callExpression(this.file.addHelper("get"),[t.memo?i.sequenceExpression([t.memo,r]):r,this.prop(e),t.this])},_getThisRefs(){if(!this.isDerivedConstructor){return{this:i.thisExpression()}}const e=this.scope.generateDeclaredUidIdentifier("thisSuper");return{memo:i.assignmentExpression("=",e,i.thisExpression()),this:i.cloneNode(e)}},set(e,t){const r=this._getThisRefs();const s=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return i.callExpression(this.file.addHelper("set"),[r.memo?i.sequenceExpression([r.memo,s]):s,this.prop(e),t,r.this,i.booleanLiteral(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,t){const r=this._getThisRefs();return(0,n.default)(this._get(e,r),i.cloneNode(r.this),t,false)},optionalCall(e,t){const r=this._getThisRefs();return(0,n.default)(this._get(e,r),i.cloneNode(r.this),t,true)}};const u=Object.assign({},p,{prop(e){const{property:t}=e.node;if(this.memoiser.has(t)){return i.cloneNode(this.memoiser.get(t))}return i.cloneNode(t)},get(e){const{isStatic:t,getSuperRef:r}=this;const{computed:s}=e.node;const a=this.prop(e);let n;if(t){var o;n=(o=r())!=null?o:i.memberExpression(i.identifier("Function"),i.identifier("prototype"))}else{var l;n=i.memberExpression((l=r())!=null?l:i.identifier("Object"),i.identifier("prototype"))}return i.memberExpression(n,a,s)},set(e,t){const{computed:r}=e.node;const s=this.prop(e);return i.assignmentExpression("=",i.memberExpression(i.thisExpression(),s,r),t)},destructureSet(e){const{computed:t}=e.node;const r=this.prop(e);return i.memberExpression(i.thisExpression(),r,t)},call(e,t){return(0,n.default)(this.get(e),i.thisExpression(),t,false)},optionalCall(e,t){return(0,n.default)(this.get(e),i.thisExpression(),t,true)}});class ReplaceSupers{constructor(e){var t;const r=e.methodPath;this.methodPath=r;this.isDerivedConstructor=r.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=r.isObjectMethod()||r.node.static||(r.isStaticBlock==null?void 0:r.isStaticBlock());this.isPrivateMethod=r.isPrivate()&&r.isMethod();this.file=e.file;this.constantSuper=(t=e.constantSuper)!=null?t:e.isLoose;this.opts=e}getObjectRef(){return i.cloneNode(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return i.cloneNode(this.opts.superRef);if(this.opts.getSuperRef)return i.cloneNode(this.opts.getSuperRef())}replace(){if(this.opts.refToPreserve){this.methodPath.traverse(c,{refName:this.opts.refToPreserve.name})}const e=this.constantSuper?u:p;(0,a.default)(this.methodPath,l,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this)},e))}}t["default"]=ReplaceSupers},7281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(8622);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var a=_interopNamespace(s);function willPathCastToBoolean(e){const t=e;const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}class AssignmentMemoiser{constructor(){this._map=void 0;this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e);const{value:r}=t;t.count--;if(t.count===0){return a.assignmentExpression("=",r,e)}return r}set(e,t,r){return this._map.set(e,{count:r,value:t})}}function toNonOptional(e,t){const{node:r}=e;if(e.isOptionalMemberExpression()){return a.memberExpression(t,r.property,r.computed)}if(e.isOptionalCallExpression()){const s=e.get("callee");if(e.node.optional&&s.isOptionalMemberExpression()){const{object:n}=s.node;const i=e.scope.maybeGenerateMemoised(n)||n;s.get("object").replaceWith(a.assignmentExpression("=",i,n));return a.callExpression(a.memberExpression(t,a.identifier("call")),[i,...r.arguments])}return a.callExpression(t,r.arguments)}return e.node}function isInDetachedTree(e){while(e){if(e.isProgram())break;const{parentPath:t,container:r,listKey:s}=e;const a=t.node;if(s){if(r!==a[s])return true}else{if(r!==a)return true}e=t}return false}const n={memoise(){},handle(e,t){const{node:r,parent:s,parentPath:n,scope:i}=e;if(e.isOptionalMemberExpression()){if(isInDetachedTree(e))return;const o=e.find((({node:t,parent:r,parentPath:s})=>{if(s.isOptionalMemberExpression()){return r.optional||r.object!==t}if(s.isOptionalCallExpression()){return t!==e.node&&r.optional||r.callee!==t}return true}));if(i.path.isPattern()){o.replaceWith(a.callExpression(a.arrowFunctionExpression([],o.node),[]));return}const l=willPathCastToBoolean(o);const c=o.parentPath;if(c.isUpdateExpression({argument:r})||c.isAssignmentExpression({left:r})){throw e.buildCodeFrameError(`can't handle assignment`)}const p=c.isUnaryExpression({operator:"delete"});if(p&&o.isOptionalMemberExpression()&&o.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let u=e;for(;;){if(u.isOptionalMemberExpression()){if(u.node.optional)break;u=u.get("object");continue}else if(u.isOptionalCallExpression()){if(u.node.optional)break;u=u.get("callee");continue}throw new Error(`Internal error: unexpected ${u.node.type}`)}const d=u.isOptionalMemberExpression()?"object":"callee";const f=u.node[d];const m=i.maybeGenerateMemoised(f);const h=m!=null?m:f;const y=n.isOptionalCallExpression({callee:r});const g=n.isCallExpression({callee:r});u.replaceWith(toNonOptional(u,h));if(y){if(s.optional){n.replaceWith(this.optionalCall(e,s.arguments))}else{n.replaceWith(this.call(e,s.arguments))}}else if(g){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}let b=e.node;for(let t=e;t!==o;){const{parentPath:e}=t;if(e===o&&y&&s.optional){b=e.node;break}b=toNonOptional(e,b);t=e}let x;const v=o.parentPath;if(a.isMemberExpression(b)&&v.isOptionalCallExpression({callee:o.node,optional:true})){const{object:t}=b;x=e.scope.maybeGenerateMemoised(t);if(x){b.object=a.assignmentExpression("=",x,t)}}let E=o;if(p){E=v;b=v.node}const w=m?a.assignmentExpression("=",a.cloneNode(h),a.cloneNode(f)):a.cloneNode(h);if(l){let e;if(t){e=a.binaryExpression("!=",w,a.nullLiteral())}else{e=a.logicalExpression("&&",a.binaryExpression("!==",w,a.nullLiteral()),a.binaryExpression("!==",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.logicalExpression("&&",e,b))}else{let e;if(t){e=a.binaryExpression("==",w,a.nullLiteral())}else{e=a.logicalExpression("||",a.binaryExpression("===",w,a.nullLiteral()),a.binaryExpression("===",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.conditionalExpression(e,p?a.booleanLiteral(true):i.buildUndefinedNode(),b))}if(x){const e=v.node;v.replaceWith(a.optionalCallExpression(a.optionalMemberExpression(e.callee,a.identifier("call"),false,true),[a.cloneNode(x),...e.arguments],false))}return}if(n.isUpdateExpression({argument:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:i}=s;this.memoise(e,2);const o=a.binaryExpression(t[0],a.unaryExpression("+",this.get(e)),a.numericLiteral(1));if(i){n.replaceWith(this.set(e,o))}else{const{scope:t}=e;const s=t.generateUidIdentifierBasedOnNode(r);t.push({id:s});o.left=a.assignmentExpression("=",a.cloneNode(s),o.left);n.replaceWith(a.sequenceExpression([this.set(e,o),a.cloneNode(s)]))}return}if(n.isAssignmentExpression({left:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:r}=s;if(t==="="){n.replaceWith(this.set(e,r))}else{const s=t.slice(0,-1);if(a.LOGICAL_OPERATORS.includes(s)){this.memoise(e,1);n.replaceWith(a.logicalExpression(s,this.get(e),this.set(e,r)))}else{this.memoise(e,2);n.replaceWith(this.set(e,a.binaryExpression(s,this.get(e),r)))}}return}if(n.isCallExpression({callee:r})){n.replaceWith(this.call(e,s.arguments));return}if(n.isOptionalCallExpression({callee:r})){if(i.path.isPattern()){n.replaceWith(a.callExpression(a.arrowFunctionExpression([],n.node),[]));return}n.replaceWith(this.optionalCall(e,s.arguments));return}if(n.isForXStatement({left:r})||n.isObjectProperty({value:r})&&n.parentPath.isObjectPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isObjectProperty({value:s})&&n.parentPath.parentPath.isObjectPattern()||n.isArrayPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isArrayPattern()||n.isRestElement()){e.replaceWith(this.destructureSet(e));return}e.replaceWith(this.get(e))}};function memberExpressionToFunctions(e,t,r){e.traverse(t,Object.assign({},n,r,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},5480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isTransparentExprWrapper=isTransparentExprWrapper;t.skipTransparentExprWrappers=skipTransparentExprWrappers;var s=r(8622);function isTransparentExprWrapper(e){return s.isTSAsExpression(e)||s.isTSTypeAssertion(e)||s.isTSNonNullExpression(e)||s.isTypeCastExpression(e)||s.isParenthesizedExpression(e)}function skipTransparentExprWrappers(e){while(isTransparentExprWrapper(e.node)){e=e.get("expression")}return e}},7058:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=splitExportDeclaration;var s=r(8622);function splitExportDeclaration(e){if(!e.isExportDeclaration()){throw new Error("Only export declarations can be split.")}const t=e.isExportDefaultDeclaration();const r=e.get("declaration");const a=r.isClassDeclaration();if(t){const t=r.isFunctionDeclaration()||a;const n=r.isScope()?r.scope.parent:r.scope;let i=r.node.id;let o=false;if(!i){o=true;i=n.generateUidIdentifier("default");if(t||r.isFunctionExpression()||r.isClassExpression()){r.node.id=s.cloneNode(i)}}const l=t?r:s.variableDeclaration("var",[s.variableDeclarator(s.cloneNode(i),r.node)]);const c=s.exportNamedDeclaration(null,[s.exportSpecifier(s.cloneNode(i),s.identifier("default"))]);e.insertAfter(c);e.replaceWith(l);if(o){n.registerDeclaration(e)}return e}if(e.get("specifiers").length>0){throw new Error("It doesn't make sense to split exported specifiers.")}const n=r.getOuterBindingIdentifiers();const i=Object.keys(n).map((e=>s.exportSpecifier(s.identifier(e),s.identifier(e))));const o=s.exportNamedDeclaration(null,i);e.insertAfter(o);e.replaceWith(r.node);return e}},8785:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.findSuggestion=findSuggestion;const{min:r}=Math;function levenshtein(e,t){let s=[],a=[],n,i;const o=e.length,l=t.length;if(!o){return l}if(!l){return o}for(i=0;i<=l;i++){s[i]=i}for(n=1;n<=o;n++){for(a=[n],i=1;i<=l;i++){a[i]=e[n-1]===t[i-1]?s[i-1]:r(s[i-1],s[i],a[i-1])+1}s=a}return a[l]}function findSuggestion(e,t){const s=t.map((t=>levenshtein(t,e)));return t[s.indexOf(r(...s))]}},7347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"OptionValidator",{enumerable:true,get:function(){return s.OptionValidator}});Object.defineProperty(t,"findSuggestion",{enumerable:true,get:function(){return a.findSuggestion}});var s=r(6885);var a=r(8785)},6885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.OptionValidator=void 0;var s=r(8785);class OptionValidator{constructor(e){this.descriptor=e}validateTopLevelOptions(e,t){const r=Object.keys(t);for(const t of Object.keys(e)){if(!r.includes(t)){throw new Error(this.formatMessage(`'${t}' is not a valid top-level option.\n- Did you mean '${(0,s.findSuggestion)(t,r)}'?`))}}}validateBooleanOption(e,t,r){if(t===undefined){return r}else{this.invariant(typeof t==="boolean",`'${e}' option must be a boolean.`)}return t}validateStringOption(e,t,r){if(t===undefined){return r}else{this.invariant(typeof t==="string",`'${e}' option must be a string.`)}return t}invariant(e,t){if(!e){throw new Error(this.formatMessage(t))}}formatMessage(e){return`${this.descriptor}: ${e}`}}t.OptionValidator=OptionValidator},6946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=wrapFunction;var s=r(550);var a=r(153);var n=r(8622);const i=a.default.expression(`\n (function () {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })()\n`);const o=a.default.expression(`\n (function () {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })()\n`);const l=(0,a.default)(`\n function NAME(PARAMS) { return REF.apply(this, arguments); }\n function REF() {\n REF = FUNCTION;\n return REF.apply(this, arguments);\n }\n`);function classOrObjectMethod(e,t){const r=e.node;const s=r.body;const a=n.functionExpression(null,[],n.blockStatement(s.body),true);s.body=[n.returnStatement(n.callExpression(n.callExpression(t,[a]),[]))];r.async=false;r.generator=false;e.get("body.body.0.argument.callee.arguments.0").unwrapFunctionEnvironment()}function plainFunction(e,t,r){const a=e.node;const c=e.isFunctionDeclaration();const p=a.id;const u=c?l:p?o:i;if(e.isArrowFunctionExpression()){e.arrowFunctionToExpression({noNewArrows:r})}a.id=null;if(c){a.type="FunctionExpression"}const d=n.callExpression(t,[a]);const f=u({NAME:p||null,REF:e.scope.generateUidIdentifier(p?p.name:"ref"),FUNCTION:d,PARAMS:a.params.reduce(((t,r)=>{t.done=t.done||n.isAssignmentPattern(r)||n.isRestElement(r);if(!t.done){t.params.push(e.scope.generateUidIdentifier("x"))}return t}),{params:[],done:false}).params});if(c){e.replaceWith(f[0]);e.insertAfter(f[1])}else{const t=f.callee.body.body[1].argument;if(!p){(0,s.default)({node:t,parent:e.parent,scope:e.scope})}if(!t||t.id||a.params.length){e.replaceWith(f)}else{e.replaceWith(d)}}}function wrapFunction(e,t,r=true){if(e.isMethod()){classOrObjectMethod(e,t)}else{plainFunction(e,t,r)}}},4920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3497);var a=r(2074);const n=["commonjs","amd","systemjs"];const i=`@babel/plugin-proposal-dynamic-import depends on a modules\ntransform plugin. Supported plugins are:\n - @babel/plugin-transform-modules-commonjs ^7.4.0\n - @babel/plugin-transform-modules-amd ^7.4.0\n - @babel/plugin-transform-modules-systemjs ^7.4.0\n\nIf you are using Webpack or Rollup and thus don't want\nBabel to transpile your imports and exports, you can use\nthe @babel/plugin-syntax-dynamic-import plugin and let your\nbundler handle dynamic imports.\n`;var o=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-dynamic-import",inherits:a.default,pre(){this.file.set("@babel/plugin-proposal-dynamic-import","7.14.5")},visitor:{Program(){const e=this.file.get("@babel/plugin-transform-modules-*");if(!n.includes(e)){throw new Error(i)}}}}}));t["default"]=o},3497:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(791);var a=r(1454);var n=r(8304);var i=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-export-namespace-from",inherits:a.default,visitor:{ExportNamedDeclaration(e){var t;const{node:r,scope:s}=e;const{specifiers:a}=r;const i=n.types.isExportDefaultSpecifier(a[0])?1:0;if(!n.types.isExportNamespaceSpecifier(a[i]))return;const o=[];if(i===1){o.push(n.types.exportNamedDeclaration(null,[a.shift()],r.source))}const l=a.shift();const{exported:c}=l;const p=s.generateUidIdentifier((t=c.name)!=null?t:c.value);o.push(n.types.importDeclaration([n.types.importNamespaceSpecifier(p)],n.types.cloneNode(r.source)),n.types.exportNamedDeclaration(null,[n.types.exportSpecifier(n.types.cloneNode(p),c)]));if(r.specifiers.length>=1){o.push(r)}const[u]=e.replaceWithMultiple(o);e.scope.registerDeclaration(u)}}}}));t["default"]=i},791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(169);var a=r(3030);var n=(0,s.declare)((e=>{e.assertVersion(7);const t=/(\\*)([\u2028\u2029])/g;function replace(e,t,r){const s=t.length%2===1;if(s)return e;return`${t}\\u${r.charCodeAt(0).toString(16)}`}return{name:"proposal-json-strings",inherits:a.default,visitor:{"DirectiveLiteral|StringLiteral"({node:e}){const{extra:r}=e;if(!(r!=null&&r.raw))return;r.raw=r.raw.replace(t,replace)}}}}));t["default"]=n},169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},1195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(7010);var a=r(5945);var n=r(8304);var i=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-logical-assignment-operators",inherits:a.default,visitor:{AssignmentExpression(e){const{node:t,scope:r}=e;const{operator:s,left:a,right:i}=t;const o=s.slice(0,-1);if(!n.types.LOGICAL_OPERATORS.includes(o)){return}const l=n.types.cloneNode(a);if(n.types.isMemberExpression(a)){const{object:e,property:t,computed:s}=a;const i=r.maybeGenerateMemoised(e);if(i){a.object=i;l.object=n.types.assignmentExpression("=",n.types.cloneNode(i),e)}if(s){const e=r.maybeGenerateMemoised(t);if(e){a.property=e;l.property=n.types.assignmentExpression("=",n.types.cloneNode(e),t)}}}e.replaceWith(n.types.logicalExpression(o,l,n.types.assignmentExpression("=",a,i)))}}}}));t["default"]=i},7010:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},5353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6080);var a=r(5879);var n=r(8304);var i=(0,s.declare)(((e,{loose:t=false})=>{var r;e.assertVersion(7);const s=(r=e.assumption("noDocumentAll"))!=null?r:t;return{name:"proposal-nullish-coalescing-operator",inherits:a.default,visitor:{LogicalExpression(e){const{node:t,scope:r}=e;if(t.operator!=="??"){return}let a;let i;if(r.isStatic(t.left)){a=t.left;i=n.types.cloneNode(t.left)}else if(r.path.isPattern()){e.replaceWith(n.template.ast`(() => ${e.node})()`);return}else{a=r.generateUidIdentifierBasedOnNode(t.left);r.push({id:n.types.cloneNode(a)});i=n.types.assignmentExpression("=",a,t.left)}e.replaceWith(n.types.conditionalExpression(s?n.types.binaryExpression("!=",i,n.types.nullLiteral()):n.types.logicalExpression("&&",n.types.binaryExpression("!==",i,n.types.nullLiteral()),n.types.binaryExpression("!==",n.types.cloneNode(a),r.buildUndefinedNode())),n.types.cloneNode(a),t.right))}}}}));t["default"]=i},6080:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(5071);var a=r(1816);function remover({node:e}){var t;const{extra:r}=e;if(r!=null&&(t=r.raw)!=null&&t.includes("_")){r.raw=r.raw.replace(/_/g,"")}}var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-numeric-separator",inherits:a.default,visitor:{NumericLiteral:remover,BigIntLiteral:remover}}}));t["default"]=n},5071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},6309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(8711);var a=r(4499);var n=r(8304);var i=r(3714);var o=r(797);var l=r(5732);const c=(()=>{const e=n.types.identifier("a");const t=n.types.objectProperty(n.types.identifier("key"),e);const r=n.types.objectPattern([t]);return n.types.isReferenced(e,t,r)?1:0})();var p=(0,s.declare)(((e,t)=>{var r,s,p,u;e.assertVersion(7);const d=e.targets();const f=!(0,o.isRequired)("es6.object.assign",d,{compatData:l});const{useBuiltIns:m=f,loose:h=false}=t;if(typeof h!=="boolean"){throw new Error(".loose must be a boolean, or undefined")}const y=(r=e.assumption("ignoreFunctionLength"))!=null?r:h;const g=(s=e.assumption("objectRestNoSymbols"))!=null?s:h;const b=(p=e.assumption("pureGetters"))!=null?p:h;const x=(u=e.assumption("setSpreadProperties"))!=null?u:h;function getExtendsHelper(e){return m?n.types.memberExpression(n.types.identifier("Object"),n.types.identifier("assign")):e.addHelper("extends")}function hasRestElement(e){let t=false;visitRestElements(e,(e=>{t=true;e.stop()}));return t}function hasObjectPatternRestElement(e){let t=false;visitRestElements(e,(e=>{if(e.parentPath.isObjectPattern()){t=true;e.stop()}}));return t}function visitRestElements(e,t){e.traverse({Expression(e){const t=e.parent.type;if(t==="AssignmentPattern"&&e.key==="right"||t==="ObjectProperty"&&e.parent.computed&&e.key==="key"){e.skip()}},RestElement:t})}function hasSpread(e){for(const t of e.properties){if(n.types.isSpreadElement(t)){return true}}return false}function extractNormalizedKeys(e){const t=e.node.properties;const r=[];let s=true;let a=false;for(const e of t){if(n.types.isIdentifier(e.key)&&!e.computed){r.push(n.types.stringLiteral(e.key.name))}else if(n.types.isTemplateLiteral(e.key)){r.push(n.types.cloneNode(e.key));a=true}else if(n.types.isLiteral(e.key)){r.push(n.types.stringLiteral(String(e.key.value)))}else{r.push(n.types.cloneNode(e.key));s=false}}return{keys:r,allLiteral:s,hasTemplateLiteral:a}}function replaceImpureComputedKeys(e,t){const r=[];for(const s of e){const e=s.get("key");if(s.node.computed&&!e.isPure()){const s=t.generateUidBasedOnNode(e.node);const a=n.types.variableDeclarator(n.types.identifier(s),e.node);r.push(a);e.replaceWith(n.types.identifier(s))}}return r}function removeUnusedExcludedKeys(e){const t=e.getOuterBindingIdentifierPaths();Object.keys(t).forEach((r=>{const s=t[r].parentPath;if(e.scope.getBinding(r).references>c||!s.isObjectProperty()){return}s.remove()}))}function createObjectRest(e,t,r){const s=e.get("properties");const a=s[s.length-1];n.types.assertRestElement(a.node);const i=n.types.cloneNode(a.node);a.remove();const o=replaceImpureComputedKeys(e.get("properties"),e.scope);const{keys:l,allLiteral:c,hasTemplateLiteral:p}=extractNormalizedKeys(e);if(l.length===0){return[o,i.argument,n.types.callExpression(getExtendsHelper(t),[n.types.objectExpression([]),n.types.cloneNode(r)])]}let u;if(!c){u=n.types.callExpression(n.types.memberExpression(n.types.arrayExpression(l),n.types.identifier("map")),[t.addHelper("toPropertyKey")])}else{u=n.types.arrayExpression(l);if(!p&&!n.types.isProgram(e.scope.block)){const t=e.findParent((e=>e.isProgram()));const r=e.scope.generateUidIdentifier("excluded");t.scope.push({id:r,init:u,kind:"const"});u=n.types.cloneNode(r)}}return[o,i.argument,n.types.callExpression(t.addHelper(`objectWithoutProperties${g?"Loose":""}`),[n.types.cloneNode(r),u])]}function replaceRestElement(e,t,r){if(t.isAssignmentPattern()){replaceRestElement(e,t.get("left"),r);return}if(t.isArrayPattern()&&hasRestElement(t)){const s=t.get("elements");for(let t=0;te.skip(),"ReferencedIdentifier|BindingIdentifier":IdentifierHandler},e.scope)}}}if(!a){for(let e=0;ee>=n-1||r.has(e);(0,i.convertFunctionParams)(e,y,shouldTransformParam,replaceRestElement)}},VariableDeclarator(e,t){if(!e.get("id").isObjectPattern()){return}let r=e;const s=e;visitRestElements(e.get("id"),(e=>{if(!e.parentPath.isObjectPattern()){return}if(s.node.id.properties.length>1&&!n.types.isIdentifier(s.node.init)){const t=e.scope.generateUidIdentifierBasedOnNode(s.node.init,"ref");s.insertBefore(n.types.variableDeclarator(t,s.node.init));s.replaceWith(n.types.variableDeclarator(s.node.id,n.types.cloneNode(t)));return}let a=s.node.init;const i=[];let o;e.findParent((e=>{if(e.isObjectProperty()){i.unshift(e)}else if(e.isVariableDeclarator()){o=e.parentPath.node.kind;return true}}));const l=replaceImpureComputedKeys(i,e.scope);i.forEach((e=>{const{node:t}=e;a=n.types.memberExpression(a,n.types.cloneNode(t.key),t.computed||n.types.isLiteral(t.key))}));const c=e.findParent((e=>e.isObjectPattern()));const[p,u,d]=createObjectRest(c,t,a);if(b){removeUnusedExcludedKeys(c)}n.types.assertIdentifier(u);r.insertBefore(p);r.insertBefore(l);r.insertAfter(n.types.variableDeclarator(u,d));r=r.getSibling(r.key+1);e.scope.registerBinding(o,r);if(c.node.properties.length===0){c.findParent((e=>e.isObjectProperty()||e.isVariableDeclarator())).remove()}}))},ExportNamedDeclaration(e){const t=e.get("declaration");if(!t.isVariableDeclaration())return;const r=t.get("declarations").some((e=>hasObjectPatternRestElement(e.get("id"))));if(!r)return;const s=[];for(const t of Object.keys(e.getOuterBindingIdentifiers(e))){s.push(n.types.exportSpecifier(n.types.identifier(t),n.types.identifier(t)))}e.replaceWith(t.node);e.insertAfter(n.types.exportNamedDeclaration(null,s))},CatchClause(e){const t=e.get("param");replaceRestElement(t.parentPath,t)},AssignmentExpression(e,t){const r=e.get("left");if(r.isObjectPattern()&&hasRestElement(r)){const s=[];const a=e.scope.generateUidBasedOnNode(e.node.right,"ref");s.push(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(a),e.node.right)]));const[i,o,l]=createObjectRest(r,t,n.types.identifier(a));if(i.length>0){s.push(n.types.variableDeclaration("var",i))}const c=n.types.cloneNode(e.node);c.right=n.types.identifier(a);s.push(n.types.expressionStatement(c));s.push(n.types.toStatement(n.types.assignmentExpression("=",o,l)));s.push(n.types.expressionStatement(n.types.identifier(a)));e.replaceWithMultiple(s)}},ForXStatement(e){const{node:t,scope:r}=e;const s=e.get("left");const a=t.left;if(!hasObjectPatternRestElement(s)){return}if(!n.types.isVariableDeclaration(a)){const s=r.generateUidIdentifier("ref");t.left=n.types.variableDeclaration("var",[n.types.variableDeclarator(s)]);e.ensureBlock();if(t.body.body.length===0&&e.isCompletionRecord()){t.body.body.unshift(n.types.expressionStatement(r.buildUndefinedNode()))}t.body.body.unshift(n.types.expressionStatement(n.types.assignmentExpression("=",a,n.types.cloneNode(s))))}else{const s=a.declarations[0].id;const i=r.generateUidIdentifier("ref");t.left=n.types.variableDeclaration(a.kind,[n.types.variableDeclarator(i,null)]);e.ensureBlock();t.body.body.unshift(n.types.variableDeclaration(t.left.kind,[n.types.variableDeclarator(s,n.types.cloneNode(i))]))}},ArrayPattern(e){const t=[];visitRestElements(e,(e=>{if(!e.parentPath.isObjectPattern()){return}const r=e.parentPath;const s=e.scope.generateUidIdentifier("ref");t.push(n.types.variableDeclarator(r.node,s));r.replaceWith(n.types.cloneNode(s));e.skip()}));if(t.length>0){const r=e.getStatementParent();r.insertAfter(n.types.variableDeclaration(r.node.kind||"var",t))}},ObjectExpression(e,t){if(!hasSpread(e.node))return;let r;if(x){r=getExtendsHelper(t)}else{try{r=t.addHelper("objectSpread2")}catch(e){this.file.declarations["objectSpread2"]=null;r=t.addHelper("objectSpread")}}let s=null;let a=[];function make(){const e=a.length>0;const t=n.types.objectExpression(a);a=[];if(!s){s=n.types.callExpression(r,[t]);return}if(b){if(e){s.arguments.push(t)}return}s=n.types.callExpression(n.types.cloneNode(r),[s,...e?[n.types.objectExpression([]),t]:[]])}for(const t of e.node.properties){if(n.types.isSpreadElement(t)){make();s.arguments.push(t.argument)}else{a.push(t)}}if(a.length)make();e.replaceWith(s)}}}}));t["default"]=p},5732:(e,t,r)=>{e.exports=r(5880)},8711:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},4195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6970);var a=r(7452);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-optional-catch-binding",inherits:a.default,visitor:{CatchClause(e){if(!e.node.param){const t=e.scope.generateUidIdentifier("unused");const r=e.get("param");r.replaceWith(t)}}}}}));t["default"]=n},6970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(2262);var a=r(79);var n=r(8304);var i=r(5480);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var o=_interopDefaultLegacy(a);function willPathCastToBoolean(e){const t=findOutermostTransparentParent(e);const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}function findOutermostTransparentParent(e){let t=e;e.findParent((e=>{if(!i.isTransparentExprWrapper(e))return true;t=e}));return t}const{ast:l}=n.template.expression;function isSimpleMemberExpression(e){e=i.skipTransparentExprWrappers(e);return n.types.isIdentifier(e)||n.types.isSuper(e)||n.types.isMemberExpression(e)&&!e.computed&&isSimpleMemberExpression(e.object)}function needsMemoize(e){let t=e;const{scope:r}=e;while(t.isOptionalMemberExpression()||t.isOptionalCallExpression()){const{node:e}=t;const s=t.isOptionalMemberExpression()?"object":"callee";const a=i.skipTransparentExprWrappers(t.get(s));if(e.optional){return!r.isStatic(a.node)}t=a}}function transform(e,{pureGetters:t,noDocumentAll:r}){const{scope:s}=e;const a=findOutermostTransparentParent(e);const{parentPath:o}=a;const c=willPathCastToBoolean(a);let p=false;const u=o.isCallExpression({callee:a.node})&&e.isOptionalMemberExpression();const d=[];let f=e;if(s.path.isPattern()&&needsMemoize(f)){e.replaceWith(n.template.ast`(() => ${e.node})()`);return}while(f.isOptionalMemberExpression()||f.isOptionalCallExpression()){const{node:e}=f;if(e.optional){d.push(e)}if(f.isOptionalMemberExpression()){f.node.type="MemberExpression";f=i.skipTransparentExprWrappers(f.get("object"))}else if(f.isOptionalCallExpression()){f.node.type="CallExpression";f=i.skipTransparentExprWrappers(f.get("callee"))}}let m=e;if(o.isUnaryExpression({operator:"delete"})){m=o;p=true}for(let e=d.length-1;e>=0;e--){const a=d[e];const o=n.types.isCallExpression(a);const f=o?"callee":"object";const y=a[f];let g=y;while(i.isTransparentExprWrapper(g)){g=g.expression}let b;let x;if(o&&n.types.isIdentifier(g,{name:"eval"})){x=b=g;a[f]=n.types.sequenceExpression([n.types.numericLiteral(0),b])}else if(t&&o&&isSimpleMemberExpression(g)){x=b=y}else{b=s.maybeGenerateMemoised(g);if(b){x=n.types.assignmentExpression("=",n.types.cloneNode(b),y);a[f]=b}else{x=b=y}}if(o&&n.types.isMemberExpression(g)){if(t&&isSimpleMemberExpression(g)){a.callee=y}else{const{object:e}=g;let t=s.maybeGenerateMemoised(e);if(t){g.object=n.types.assignmentExpression("=",t,e)}else if(n.types.isSuper(e)){t=n.types.thisExpression()}else{t=e}a.arguments.unshift(n.types.cloneNode(t));a.callee=n.types.memberExpression(a.callee,n.types.identifier("call"))}}let v=m.node;if(e===0&&u){var h;const e=i.skipTransparentExprWrappers(m.get("object")).node;let r;if(!t||!isSimpleMemberExpression(e)){r=s.maybeGenerateMemoised(e);if(r){v.object=n.types.assignmentExpression("=",r,e)}}v=n.types.callExpression(n.types.memberExpression(v,n.types.identifier("bind")),[n.types.cloneNode((h=r)!=null?h:e)])}if(c){const e=r?l`${n.types.cloneNode(x)} != null`:l`
+ `):a.importDeclaration([a.importSpecifier(o,s)],t),name:o.name}}))},injectDefaultImport(t,s=t){return e.storeNamed(r,t,"default",((e,t)=>{const i=r.scope.generateUidIdentifier(s);return{node:e?hoist(n.statement.ast`var ${i} = require(${t})`):a.importDeclaration([a.importDefaultSpecifier(i)],t),name:i.name}}))}}}}},8160:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var s=r(4182);var _default=e=>({ImportDeclaration(t){const r=(0,s.getImportSource)(t);if(!r)return;e({kind:"import",source:r},t)},Program(t){t.get("body").forEach((t=>{const r=(0,s.getRequireSource)(t);if(!r)return;e({kind:"import",source:r},t)}))}});t["default"]=_default},9313:(e,t,r)=>{"use strict";t.__esModule=true;t.entry=t.usage=void 0;var s=_interopRequireDefault(r(6527));t.usage=s.default;var a=_interopRequireDefault(r(8160));t.entry=a.default;function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}},6527:(e,t,r)=>{"use strict";t.__esModule=true;t["default"]=void 0;var s=r(4182);var _default=e=>{function property(t,r,s,a){return e({kind:"property",object:t,key:r,placement:s},a)}return{ReferencedIdentifier(t){const{node:{name:r},scope:s}=t;if(s.getBindingIdentifier(r))return;e({kind:"global",name:r},t)},MemberExpression(e){const t=(0,s.resolveKey)(e.get("property"),e.node.computed);if(!t||t==="prototype")return;const r=e.get("object");const a=r.scope.getBinding(r.node.name);if(a&&a.path.isImportNamespaceSpecifier())return;const n=(0,s.resolveSource)(r);return property(n.id,t,n.placement,e)},ObjectPattern(e){const{parentPath:t,parent:r}=e;let a;if(t.isVariableDeclarator()){a=t.get("init")}else if(t.isAssignmentExpression()){a=t.get("right")}else if(t.isFunction()){const s=t.parentPath;if(s.isCallExpression()||s.isNewExpression()){if(s.node.callee===r){a=s.get("arguments")[e.key]}}}let n=null;let i=null;if(a)({id:n,placement:i}=(0,s.resolveSource)(a));for(const t of e.get("properties")){if(t.isObjectProperty()){const e=(0,s.resolveKey)(t.get("key"));if(e)property(n,e,i,t)}}},BinaryExpression(t){if(t.node.operator!=="in")return;const r=(0,s.resolveSource)(t.get("right"));const a=(0,s.resolveKey)(t.get("left"),true);if(!a)return;e({kind:"in",object:r.id,key:a,placement:r.placement},t)}}};t["default"]=_default},1403:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},9820:(e,t,r)=>{var s=r(7462);s.core=r(9118);s.isCore=r(779);s.sync=r(5565);e.exports=s},7462:(e,t,r)=>{var s=r(7147);var a=r(1017);var n=r(7673);var i=r(7901);var o=r(7023);var l=r(8746);var c=s.realpath&&typeof s.realpath.native==="function"?s.realpath.native:s.realpath;var p=function isFile(e,t){s.stat(e,(function(e,r){if(!e){return t(null,r.isFile()||r.isFIFO())}if(e.code==="ENOENT"||e.code==="ENOTDIR")return t(null,false);return t(e)}))};var u=function isDirectory(e,t){s.stat(e,(function(e,r){if(!e){return t(null,r.isDirectory())}if(e.code==="ENOENT"||e.code==="ENOTDIR")return t(null,false);return t(e)}))};var d=function realpath(e,t){c(e,(function(r,s){if(r&&r.code!=="ENOENT")t(r);else t(null,r?e:s)}))};var f=function maybeRealpath(e,t,r,s){if(r&&r.preserveSymlinks===false){e(t,s)}else{s(null,t)}};var m=function defaultReadPackage(e,t,r){e(t,(function(e,t){if(e)r(e);else{try{var s=JSON.parse(t);r(null,s)}catch(e){r(null)}}}))};var h=function getPackageCandidates(e,t,r){var s=i(t,r,e);for(var n=0;n{e.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=(new Error).stack;Error.prepareStackTrace=e;return t[2].getFileName()}},9118:(e,t,r)=>{var s=process.versions&&process.versions.node&&process.versions.node.split(".")||[];function specifierIncluded(e){var t=e.split(" ");var r=t.length>1?t[0]:"=";var a=(t.length>1?t[1]:t[0]).split(".");for(var n=0;n<3;++n){var i=parseInt(s[n]||0,10);var o=parseInt(a[n]||0,10);if(i===o){continue}if(r==="<"){return i="){return i>=o}else{return false}}return r===">="}function matchesRange(e){var t=e.split(/ ?&& ?/);if(t.length===0){return false}for(var r=0;r{var s=r(8746);e.exports=function isCore(e){return s(e)}},7901:(e,t,r)=>{var s=r(1017);var a=s.parse||r(2742);var n=function getNodeModulesDirs(e,t){var r="/";if(/^([A-Za-z]:)/.test(e)){r=""}else if(/^\\\\/.test(e)){r="\\\\"}var n=[e];var i=a(e);while(i.dir!==n[n.length-1]){n.push(i.dir);i=a(i.dir)}return n.reduce((function(e,a){return e.concat(t.map((function(e){return s.resolve(r,a,e)})))}),[])};e.exports=function nodeModulesPaths(e,t,r){var s=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"];if(t&&typeof t.paths==="function"){return t.paths(r,e,(function(){return n(e,s)}),t)}var a=n(e,s);return t&&t.paths?a.concat(t.paths):a}},7023:e=>{e.exports=function(e,t){return t||{}}},5565:(e,t,r)=>{var s=r(8746);var a=r(7147);var n=r(1017);var i=r(7673);var o=r(7901);var l=r(7023);var c=a.realpathSync&&typeof a.realpathSync.native==="function"?a.realpathSync.native:a.realpathSync;var p=function isFile(e){try{var t=a.statSync(e)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR"))return false;throw e}return t.isFile()||t.isFIFO()};var u=function isDirectory(e){try{var t=a.statSync(e)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR"))return false;throw e}return t.isDirectory()};var d=function realpathSync(e){try{return c(e)}catch(e){if(e.code!=="ENOENT"){throw e}}return e};var f=function maybeRealpathSync(e,t,r){if(r&&r.preserveSymlinks===false){return e(t)}return t};var m=function defaultReadPackageSync(e,t){var r=e(t);try{var s=JSON.parse(r);return s}catch(e){}};var h=function getPackageCandidates(e,t,r){var s=o(t,r,e);for(var a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(8622);function getObjRef(e,t,r){let a;if(s.isIdentifier(e)){if(r.hasBinding(e.name)){return e}else{a=e}}else if(s.isMemberExpression(e)){a=e.object;if(s.isSuper(a)||s.isIdentifier(a)&&r.hasBinding(a.name)){return a}}else{throw new Error(`We can't explode this node type ${e["type"]}`)}const n=r.generateUidIdentifierBasedOnNode(a);r.push({id:n});t.push(s.assignmentExpression("=",s.cloneNode(n),s.cloneNode(a)));return n}function getPropRef(e,t,r){const a=e.property;if(s.isPrivateName(a)){throw new Error("We can't generate property ref for private name, please install `@babel/plugin-proposal-class-properties`")}const n=s.toComputedKey(e,a);if(s.isLiteral(n)&&s.isPureish(n))return n;const i=r.generateUidIdentifierBasedOnNode(a);r.push({id:i});t.push(s.assignmentExpression("=",s.cloneNode(i),s.cloneNode(a)));return i}function _default(e,t,r,a,n){let i;if(s.isIdentifier(e)&&n){i=e}else{i=getObjRef(e,t,a)}let o,l;if(s.isIdentifier(e)){o=s.cloneNode(e);l=i}else{const r=getPropRef(e,t,a);const n=e.computed||s.isLiteral(r);l=s.memberExpression(s.cloneNode(i),s.cloneNode(r),n);o=s.memberExpression(s.cloneNode(i),s.cloneNode(r),n)}return{uid:l,ref:o}}},550:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(3811);var a=r(153);var n=r(8622);const i=(0,a.default)(`\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n`);const o=(0,a.default)(`\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n`);const l={"ReferencedIdentifier|BindingIdentifier"(e,t){if(e.node.name!==t.name)return;const r=e.scope.getBindingIdentifier(t.name);if(r!==t.outerDeclar)return;t.selfReference=true;e.stop()}};function getNameFromLiteralId(e){if(n.isNullLiteral(e)){return"null"}if(n.isRegExpLiteral(e)){return`_${e.pattern}_${e.flags}`}if(n.isTemplateLiteral(e)){return e.quasis.map((e=>e.value.raw)).join("")}if(e.value!==undefined){return e.value+""}return""}function wrap(e,t,r,a){if(e.selfReference){if(a.hasBinding(r.name)&&!a.hasGlobal(r.name)){a.rename(r.name)}else{if(!n.isFunction(t))return;let e=i;if(t.generator){e=o}const l=e({FUNCTION:t,FUNCTION_ID:r,FUNCTION_KEY:a.generateUidIdentifier(r.name)}).expression;const c=l.callee.body.body[0].params;for(let e=0,r=(0,s.default)(t);e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(8622);function _default(e){const t=e.params;for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=hoistVariables;var s=r(8622);const a={Scope(e,t){if(t.kind==="let")e.skip()},FunctionParent(e){e.skip()},VariableDeclaration(e,t){if(t.kind&&e.node.kind!==t.kind)return;const r=[];const a=e.get("declarations");let n;for(const e of a){n=e.node.id;if(e.node.init){r.push(s.expressionStatement(s.assignmentExpression("=",e.node.id,e.node.init)))}for(const r of Object.keys(e.getBindingIdentifiers())){t.emit(s.identifier(r),r,e.node.init!==null)}}if(e.parentPath.isFor({left:e.node})){e.replaceWith(n)}else{e.replaceWithMultiple(r)}}};function hoistVariables(e,t,r="var"){e.traverse(a,{kind:r,emit:t})}},6591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9491);var a=r(8622);class ImportBuilder{constructor(e,t,r){this._statements=[];this._resultName=null;this._scope=null;this._hub=null;this._importedSource=void 0;this._scope=t;this._hub=r;this._importedSource=e}done(){return{statements:this._statements,resultName:this._resultName}}import(){this._statements.push(a.importDeclaration([],a.stringLiteral(this._importedSource)));return this}require(){this._statements.push(a.expressionStatement(a.callExpression(a.identifier("require"),[a.stringLiteral(this._importedSource)])));return this}namespace(e="namespace"){const t=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];s(r.type==="ImportDeclaration");s(r.specifiers.length===0);r.specifiers=[a.importNamespaceSpecifier(t)];this._resultName=a.cloneNode(t);return this}default(e){e=this._scope.generateUidIdentifier(e);const t=this._statements[this._statements.length-1];s(t.type==="ImportDeclaration");s(t.specifiers.length===0);t.specifiers=[a.importDefaultSpecifier(e)];this._resultName=a.cloneNode(e);return this}named(e,t){if(t==="default")return this.default(e);e=this._scope.generateUidIdentifier(e);const r=this._statements[this._statements.length-1];s(r.type==="ImportDeclaration");s(r.specifiers.length===0);r.specifiers=[a.importSpecifier(e,a.identifier(t))];this._resultName=a.cloneNode(e);return this}var(e){e=this._scope.generateUidIdentifier(e);let t=this._statements[this._statements.length-1];if(t.type!=="ExpressionStatement"){s(this._resultName);t=a.expressionStatement(this._resultName);this._statements.push(t)}this._statements[this._statements.length-1]=a.variableDeclaration("var",[a.variableDeclarator(e,t.expression)]);this._resultName=a.cloneNode(e);return this}defaultInterop(){return this._interop(this._hub.addHelper("interopRequireDefault"))}wildcardInterop(){return this._interop(this._hub.addHelper("interopRequireWildcard"))}_interop(e){const t=this._statements[this._statements.length-1];if(t.type==="ExpressionStatement"){t.expression=a.callExpression(e,[t.expression])}else if(t.type==="VariableDeclaration"){s(t.declarations.length===1);t.declarations[0].init=a.callExpression(e,[t.declarations[0].init])}else{s.fail("Unexpected type.")}return this}prop(e){const t=this._statements[this._statements.length-1];if(t.type==="ExpressionStatement"){t.expression=a.memberExpression(t.expression,a.identifier(e))}else if(t.type==="VariableDeclaration"){s(t.declarations.length===1);t.declarations[0].init=a.memberExpression(t.declarations[0].init,a.identifier(e))}else{s.fail("Unexpected type:"+t.type)}return this}read(e){this._resultName=a.memberExpression(this._resultName,a.identifier(e))}}t["default"]=ImportBuilder},4872:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9491);var a=r(8622);var n=r(6591);var i=r(1719);class ImportInjector{constructor(e,t,r){this._defaultOpts={importedSource:null,importedType:"commonjs",importedInterop:"babel",importingInterop:"babel",ensureLiveReference:false,ensureNoContext:false,importPosition:"before"};const s=e.find((e=>e.isProgram()));this._programPath=s;this._programScope=s.scope;this._hub=s.hub;this._defaultOpts=this._applyDefaults(t,r,true)}addDefault(e,t){return this.addNamed("default",e,t)}addNamed(e,t,r){s(typeof e==="string");return this._generateImport(this._applyDefaults(t,r),e)}addNamespace(e,t){return this._generateImport(this._applyDefaults(e,t),null)}addSideEffect(e,t){return this._generateImport(this._applyDefaults(e,t),false)}_applyDefaults(e,t,r=false){const a=[];if(typeof e==="string"){a.push({importedSource:e});a.push(t)}else{s(!t,"Unexpected secondary arguments.");a.push(e)}const n=Object.assign({},this._defaultOpts);for(const e of a){if(!e)continue;Object.keys(n).forEach((t=>{if(e[t]!==undefined)n[t]=e[t]}));if(!r){if(e.nameHint!==undefined)n.nameHint=e.nameHint;if(e.blockHoist!==undefined)n.blockHoist=e.blockHoist}}return n}_generateImport(e,t){const r=t==="default";const s=!!t&&!r;const o=t===null;const{importedSource:l,importedType:c,importedInterop:p,importingInterop:u,ensureLiveReference:d,ensureNoContext:f,nameHint:m,importPosition:h,blockHoist:y}=e;let g=m||t;const b=(0,i.default)(this._programPath);const x=b&&u==="node";const v=b&&u==="babel";if(h==="after"&&!b){throw new Error(`"importPosition": "after" is only supported in modules`)}const E=new n.default(l,this._programScope,this._hub);if(c==="es6"){if(!x&&!v){throw new Error("Cannot import an ES6 module from CommonJS")}E.import();if(o){E.namespace(m||l)}else if(r||s){E.named(g,t)}}else if(c!=="commonjs"){throw new Error(`Unexpected interopType "${c}"`)}else if(p==="babel"){if(x){g=g!=="default"?g:l;const e=`${l}$es6Default`;E.import();if(o){E.default(e).var(g||l).wildcardInterop()}else if(r){if(d){E.default(e).var(g||l).defaultInterop().read("default")}else{E.default(e).var(g).defaultInterop().prop(t)}}else if(s){E.default(e).read(t)}}else if(v){E.import();if(o){E.namespace(g||l)}else if(r||s){E.named(g,t)}}else{E.require();if(o){E.var(g||l).wildcardInterop()}else if((r||s)&&d){if(r){g=g!=="default"?g:l;E.var(g).read(t);E.defaultInterop()}else{E.var(l).read(t)}}else if(r){E.var(g).defaultInterop().prop(t)}else if(s){E.var(g).prop(t)}}}else if(p==="compiled"){if(x){E.import();if(o){E.default(g||l)}else if(r||s){E.default(l).read(g)}}else if(v){E.import();if(o){E.namespace(g||l)}else if(r||s){E.named(g,t)}}else{E.require();if(o){E.var(g||l)}else if(r||s){if(d){E.var(l).read(g)}else{E.prop(t).var(g)}}}}else if(p==="uncompiled"){if(r&&d){throw new Error("No live reference for commonjs default")}if(x){E.import();if(o){E.default(g||l)}else if(r){E.default(g)}else if(s){E.default(l).read(g)}}else if(v){E.import();if(o){E.default(g||l)}else if(r){E.default(g)}else if(s){E.named(g,t)}}else{E.require();if(o){E.var(g||l)}else if(r){E.var(g)}else if(s){if(d){E.var(l).read(g)}else{E.var(g).prop(t)}}}}else{throw new Error(`Unknown importedInterop "${p}".`)}const{statements:w,resultName:j}=E.done();this._insertStatements(w,h,y);if((r||s)&&f&&j.type!=="Identifier"){return a.sequenceExpression([a.numericLiteral(0),j])}return j}_insertStatements(e,t="before",r=3){const s=this._programPath.get("body");if(t==="after"){for(let t=s.length-1;t>=0;t--){if(s[t].isImportDeclaration()){s[t].insertAfter(e);return}}}else{e.forEach((e=>{e._blockHoist=r}));const t=s.find((e=>{const t=e.node._blockHoist;return Number.isFinite(t)&&t<4}));if(t){t.insertBefore(e);return}}this._programPath.unshiftContainer("body",e)}}t["default"]=ImportInjector},9115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.addDefault=addDefault;t.addNamed=addNamed;t.addNamespace=addNamespace;t.addSideEffect=addSideEffect;Object.defineProperty(t,"ImportInjector",{enumerable:true,get:function(){return s.default}});Object.defineProperty(t,"isModule",{enumerable:true,get:function(){return a.default}});var s=r(4872);var a=r(1719);function addDefault(e,t,r){return new s.default(e).addDefault(t,r)}function addNamed(e,t,r,a){return new s.default(e).addNamed(t,r,a)}function addNamespace(e,t,r){return new s.default(e).addNamespace(t,r)}function addSideEffect(e,t,r){return new s.default(e).addSideEffect(t,r)}},1719:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=isModule;function isModule(e){const{sourceType:t}=e.node;if(t!=="module"&&t!=="script"){throw e.buildCodeFrameError(`Unknown sourceType "${t}", cannot transform.`)}return e.node.sourceType==="module"}},6721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=optimiseCallExpression;var s=r(8622);function optimiseCallExpression(e,t,r,a){if(r.length===1&&s.isSpreadElement(r[0])&&s.isIdentifier(r[0].argument,{name:"arguments"})){if(a){return s.optionalCallExpression(s.optionalMemberExpression(e,s.identifier("apply"),false,true),[t,r[0].argument],false)}return s.callExpression(s.memberExpression(e,s.identifier("apply")),[t,r[0].argument])}else{if(a){return s.optionalCallExpression(s.optionalMemberExpression(e,s.identifier("call"),false,true),[t,...r],false)}return s.callExpression(s.memberExpression(e,s.identifier("call")),[t,...r])}}},9055:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,r,s)=>{if(!t.assertVersion){t=Object.assign(copyApiObject(t),{assertVersion(e){throwVersionError(e,t.version)}})}return e(t,r||{},s)}}function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(6946);var a=r(2155);var n=r(8622);const i={Function(e){e.skip()},AwaitExpression(e,{wrapAwait:t}){const r=e.get("argument");if(e.parentPath.isYieldExpression()){e.replaceWith(r.node);return}e.replaceWith(n.yieldExpression(t?n.callExpression(n.cloneNode(t),[r.node]):r.node))}};function _default(e,t,r){e.traverse(i,{wrapAwait:t.wrapAwait});const o=checkIsIIFE(e);e.node.async=false;e.node.generator=true;(0,s.default)(e,n.cloneNode(t.wrapAsync),r);const l=e.isObjectMethod()||e.isClassMethod()||e.parentPath.isObjectProperty()||e.parentPath.isClassProperty();if(!l&&!o&&e.isExpression()){(0,a.default)(e)}function checkIsIIFE(e){if(e.parentPath.isCallExpression({callee:e.node})){return true}const{parentPath:t}=e;if(t.isMemberExpression()&&n.isIdentifier(t.node.property,{name:"bind"})){const{parentPath:e}=t;return e.isCallExpression()&&e.node.arguments.length===1&&n.isThisExpression(e.node.arguments[0])&&e.parentPath.isCallExpression({callee:e.node})}return false}}},6833:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.skipAllButComputedKey=skipAllButComputedKey;t["default"]=t.environmentVisitor=void 0;var s=r(7369);var a=r(7281);var n=r(6721);var i=r(8622);function getPrototypeOfExpression(e,t,r,s){e=i.cloneNode(e);const a=t||s?e:i.memberExpression(e,i.identifier("prototype"));return i.callExpression(r.addHelper("getPrototypeOf"),[a])}function skipAllButComputedKey(e){if(!e.node.computed){e.skip();return}const t=i.VISITOR_KEYS[e.type];for(const r of t){if(r!=="key")e.skipKey(r)}}const o={[`${i.staticBlock?"StaticBlock|":""}ClassPrivateProperty|TypeAnnotation`](e){e.skip()},Function(e){if(e.isMethod())return;if(e.isArrowFunctionExpression())return;e.skip()},"Method|ClassProperty"(e){skipAllButComputedKey(e)}};t.environmentVisitor=o;const l=s.default.visitors.merge([o,{Super(e,t){const{node:r,parentPath:s}=e;if(!s.isMemberExpression({object:r}))return;t.handle(s)}}]);const c=s.default.visitors.merge([o,{Scopable(e,{refName:t}){const r=e.scope.getOwnBinding(t);if(r&&r.identifier.name===t){e.scope.rename(t)}}}]);const p={memoise(e,t){const{scope:r,node:s}=e;const{computed:a,property:n}=s;if(!a){return}const i=r.maybeGenerateMemoised(n);if(!i){return}this.memoiser.set(n,i,t)},prop(e){const{computed:t,property:r}=e.node;if(this.memoiser.has(r)){return i.cloneNode(this.memoiser.get(r))}if(t){return i.cloneNode(r)}return i.stringLiteral(r.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,t){const r=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return i.callExpression(this.file.addHelper("get"),[t.memo?i.sequenceExpression([t.memo,r]):r,this.prop(e),t.this])},_getThisRefs(){if(!this.isDerivedConstructor){return{this:i.thisExpression()}}const e=this.scope.generateDeclaredUidIdentifier("thisSuper");return{memo:i.assignmentExpression("=",e,i.thisExpression()),this:i.cloneNode(e)}},set(e,t){const r=this._getThisRefs();const s=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return i.callExpression(this.file.addHelper("set"),[r.memo?i.sequenceExpression([r.memo,s]):s,this.prop(e),t,r.this,i.booleanLiteral(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,t){const r=this._getThisRefs();return(0,n.default)(this._get(e,r),i.cloneNode(r.this),t,false)},optionalCall(e,t){const r=this._getThisRefs();return(0,n.default)(this._get(e,r),i.cloneNode(r.this),t,true)}};const u=Object.assign({},p,{prop(e){const{property:t}=e.node;if(this.memoiser.has(t)){return i.cloneNode(this.memoiser.get(t))}return i.cloneNode(t)},get(e){const{isStatic:t,getSuperRef:r}=this;const{computed:s}=e.node;const a=this.prop(e);let n;if(t){var o;n=(o=r())!=null?o:i.memberExpression(i.identifier("Function"),i.identifier("prototype"))}else{var l;n=i.memberExpression((l=r())!=null?l:i.identifier("Object"),i.identifier("prototype"))}return i.memberExpression(n,a,s)},set(e,t){const{computed:r}=e.node;const s=this.prop(e);return i.assignmentExpression("=",i.memberExpression(i.thisExpression(),s,r),t)},destructureSet(e){const{computed:t}=e.node;const r=this.prop(e);return i.memberExpression(i.thisExpression(),r,t)},call(e,t){return(0,n.default)(this.get(e),i.thisExpression(),t,false)},optionalCall(e,t){return(0,n.default)(this.get(e),i.thisExpression(),t,true)}});class ReplaceSupers{constructor(e){var t;const r=e.methodPath;this.methodPath=r;this.isDerivedConstructor=r.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=r.isObjectMethod()||r.node.static||(r.isStaticBlock==null?void 0:r.isStaticBlock());this.isPrivateMethod=r.isPrivate()&&r.isMethod();this.file=e.file;this.constantSuper=(t=e.constantSuper)!=null?t:e.isLoose;this.opts=e}getObjectRef(){return i.cloneNode(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return i.cloneNode(this.opts.superRef);if(this.opts.getSuperRef)return i.cloneNode(this.opts.getSuperRef())}replace(){if(this.opts.refToPreserve){this.methodPath.traverse(c,{refName:this.opts.refToPreserve.name})}const e=this.constantSuper?u:p;(0,a.default)(this.methodPath,l,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this)},e))}}t["default"]=ReplaceSupers},7281:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(8622);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var a=_interopNamespace(s);function willPathCastToBoolean(e){const t=e;const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}class AssignmentMemoiser{constructor(){this._map=void 0;this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e);const{value:r}=t;t.count--;if(t.count===0){return a.assignmentExpression("=",r,e)}return r}set(e,t,r){return this._map.set(e,{count:r,value:t})}}function toNonOptional(e,t){const{node:r}=e;if(e.isOptionalMemberExpression()){return a.memberExpression(t,r.property,r.computed)}if(e.isOptionalCallExpression()){const s=e.get("callee");if(e.node.optional&&s.isOptionalMemberExpression()){const{object:n}=s.node;const i=e.scope.maybeGenerateMemoised(n)||n;s.get("object").replaceWith(a.assignmentExpression("=",i,n));return a.callExpression(a.memberExpression(t,a.identifier("call")),[i,...r.arguments])}return a.callExpression(t,r.arguments)}return e.node}function isInDetachedTree(e){while(e){if(e.isProgram())break;const{parentPath:t,container:r,listKey:s}=e;const a=t.node;if(s){if(r!==a[s])return true}else{if(r!==a)return true}e=t}return false}const n={memoise(){},handle(e,t){const{node:r,parent:s,parentPath:n,scope:i}=e;if(e.isOptionalMemberExpression()){if(isInDetachedTree(e))return;const o=e.find((({node:t,parent:r,parentPath:s})=>{if(s.isOptionalMemberExpression()){return r.optional||r.object!==t}if(s.isOptionalCallExpression()){return t!==e.node&&r.optional||r.callee!==t}return true}));if(i.path.isPattern()){o.replaceWith(a.callExpression(a.arrowFunctionExpression([],o.node),[]));return}const l=willPathCastToBoolean(o);const c=o.parentPath;if(c.isUpdateExpression({argument:r})||c.isAssignmentExpression({left:r})){throw e.buildCodeFrameError(`can't handle assignment`)}const p=c.isUnaryExpression({operator:"delete"});if(p&&o.isOptionalMemberExpression()&&o.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let u=e;for(;;){if(u.isOptionalMemberExpression()){if(u.node.optional)break;u=u.get("object");continue}else if(u.isOptionalCallExpression()){if(u.node.optional)break;u=u.get("callee");continue}throw new Error(`Internal error: unexpected ${u.node.type}`)}const d=u.isOptionalMemberExpression()?"object":"callee";const f=u.node[d];const m=i.maybeGenerateMemoised(f);const h=m!=null?m:f;const y=n.isOptionalCallExpression({callee:r});const g=n.isCallExpression({callee:r});u.replaceWith(toNonOptional(u,h));if(y){if(s.optional){n.replaceWith(this.optionalCall(e,s.arguments))}else{n.replaceWith(this.call(e,s.arguments))}}else if(g){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}let b=e.node;for(let t=e;t!==o;){const{parentPath:e}=t;if(e===o&&y&&s.optional){b=e.node;break}b=toNonOptional(e,b);t=e}let x;const v=o.parentPath;if(a.isMemberExpression(b)&&v.isOptionalCallExpression({callee:o.node,optional:true})){const{object:t}=b;x=e.scope.maybeGenerateMemoised(t);if(x){b.object=a.assignmentExpression("=",x,t)}}let E=o;if(p){E=v;b=v.node}const w=m?a.assignmentExpression("=",a.cloneNode(h),a.cloneNode(f)):a.cloneNode(h);if(l){let e;if(t){e=a.binaryExpression("!=",w,a.nullLiteral())}else{e=a.logicalExpression("&&",a.binaryExpression("!==",w,a.nullLiteral()),a.binaryExpression("!==",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.logicalExpression("&&",e,b))}else{let e;if(t){e=a.binaryExpression("==",w,a.nullLiteral())}else{e=a.logicalExpression("||",a.binaryExpression("===",w,a.nullLiteral()),a.binaryExpression("===",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.conditionalExpression(e,p?a.booleanLiteral(true):i.buildUndefinedNode(),b))}if(x){const e=v.node;v.replaceWith(a.optionalCallExpression(a.optionalMemberExpression(e.callee,a.identifier("call"),false,true),[a.cloneNode(x),...e.arguments],false))}return}if(n.isUpdateExpression({argument:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:i}=s;this.memoise(e,2);const o=a.binaryExpression(t[0],a.unaryExpression("+",this.get(e)),a.numericLiteral(1));if(i){n.replaceWith(this.set(e,o))}else{const{scope:t}=e;const s=t.generateUidIdentifierBasedOnNode(r);t.push({id:s});o.left=a.assignmentExpression("=",a.cloneNode(s),o.left);n.replaceWith(a.sequenceExpression([this.set(e,o),a.cloneNode(s)]))}return}if(n.isAssignmentExpression({left:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:r}=s;if(t==="="){n.replaceWith(this.set(e,r))}else{const s=t.slice(0,-1);if(a.LOGICAL_OPERATORS.includes(s)){this.memoise(e,1);n.replaceWith(a.logicalExpression(s,this.get(e),this.set(e,r)))}else{this.memoise(e,2);n.replaceWith(this.set(e,a.binaryExpression(s,this.get(e),r)))}}return}if(n.isCallExpression({callee:r})){n.replaceWith(this.call(e,s.arguments));return}if(n.isOptionalCallExpression({callee:r})){if(i.path.isPattern()){n.replaceWith(a.callExpression(a.arrowFunctionExpression([],n.node),[]));return}n.replaceWith(this.optionalCall(e,s.arguments));return}if(n.isForXStatement({left:r})||n.isObjectProperty({value:r})&&n.parentPath.isObjectPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isObjectProperty({value:s})&&n.parentPath.parentPath.isObjectPattern()||n.isArrayPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isArrayPattern()||n.isRestElement()){e.replaceWith(this.destructureSet(e));return}e.replaceWith(this.get(e))}};function memberExpressionToFunctions(e,t,r){e.traverse(t,Object.assign({},n,r,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},5480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isTransparentExprWrapper=isTransparentExprWrapper;t.skipTransparentExprWrappers=skipTransparentExprWrappers;var s=r(8622);function isTransparentExprWrapper(e){return s.isTSAsExpression(e)||s.isTSTypeAssertion(e)||s.isTSNonNullExpression(e)||s.isTypeCastExpression(e)||s.isParenthesizedExpression(e)}function skipTransparentExprWrappers(e){while(isTransparentExprWrapper(e.node)){e=e.get("expression")}return e}},7058:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=splitExportDeclaration;var s=r(8622);function splitExportDeclaration(e){if(!e.isExportDeclaration()){throw new Error("Only export declarations can be split.")}const t=e.isExportDefaultDeclaration();const r=e.get("declaration");const a=r.isClassDeclaration();if(t){const t=r.isFunctionDeclaration()||a;const n=r.isScope()?r.scope.parent:r.scope;let i=r.node.id;let o=false;if(!i){o=true;i=n.generateUidIdentifier("default");if(t||r.isFunctionExpression()||r.isClassExpression()){r.node.id=s.cloneNode(i)}}const l=t?r:s.variableDeclaration("var",[s.variableDeclarator(s.cloneNode(i),r.node)]);const c=s.exportNamedDeclaration(null,[s.exportSpecifier(s.cloneNode(i),s.identifier("default"))]);e.insertAfter(c);e.replaceWith(l);if(o){n.registerDeclaration(e)}return e}if(e.get("specifiers").length>0){throw new Error("It doesn't make sense to split exported specifiers.")}const n=r.getOuterBindingIdentifiers();const i=Object.keys(n).map((e=>s.exportSpecifier(s.identifier(e),s.identifier(e))));const o=s.exportNamedDeclaration(null,i);e.insertAfter(o);e.replaceWith(r.node);return e}},8785:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.findSuggestion=findSuggestion;const{min:r}=Math;function levenshtein(e,t){let s=[],a=[],n,i;const o=e.length,l=t.length;if(!o){return l}if(!l){return o}for(i=0;i<=l;i++){s[i]=i}for(n=1;n<=o;n++){for(a=[n],i=1;i<=l;i++){a[i]=e[n-1]===t[i-1]?s[i-1]:r(s[i-1],s[i],a[i-1])+1}s=a}return a[l]}function findSuggestion(e,t){const s=t.map((t=>levenshtein(t,e)));return t[s.indexOf(r(...s))]}},7347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});Object.defineProperty(t,"OptionValidator",{enumerable:true,get:function(){return s.OptionValidator}});Object.defineProperty(t,"findSuggestion",{enumerable:true,get:function(){return a.findSuggestion}});var s=r(6885);var a=r(8785)},6885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.OptionValidator=void 0;var s=r(8785);class OptionValidator{constructor(e){this.descriptor=e}validateTopLevelOptions(e,t){const r=Object.keys(t);for(const t of Object.keys(e)){if(!r.includes(t)){throw new Error(this.formatMessage(`'${t}' is not a valid top-level option.\n- Did you mean '${(0,s.findSuggestion)(t,r)}'?`))}}}validateBooleanOption(e,t,r){if(t===undefined){return r}else{this.invariant(typeof t==="boolean",`'${e}' option must be a boolean.`)}return t}validateStringOption(e,t,r){if(t===undefined){return r}else{this.invariant(typeof t==="string",`'${e}' option must be a string.`)}return t}invariant(e,t){if(!e){throw new Error(this.formatMessage(t))}}formatMessage(e){return`${this.descriptor}: ${e}`}}t.OptionValidator=OptionValidator},6946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=wrapFunction;var s=r(550);var a=r(153);var n=r(8622);const i=a.default.expression(`\n (function () {\n var REF = FUNCTION;\n return function NAME(PARAMS) {\n return REF.apply(this, arguments);\n };\n })()\n`);const o=a.default.expression(`\n (function () {\n var REF = FUNCTION;\n function NAME(PARAMS) {\n return REF.apply(this, arguments);\n }\n return NAME;\n })()\n`);const l=(0,a.default)(`\n function NAME(PARAMS) { return REF.apply(this, arguments); }\n function REF() {\n REF = FUNCTION;\n return REF.apply(this, arguments);\n }\n`);function classOrObjectMethod(e,t){const r=e.node;const s=r.body;const a=n.functionExpression(null,[],n.blockStatement(s.body),true);s.body=[n.returnStatement(n.callExpression(n.callExpression(t,[a]),[]))];r.async=false;r.generator=false;e.get("body.body.0.argument.callee.arguments.0").unwrapFunctionEnvironment()}function plainFunction(e,t,r){const a=e.node;const c=e.isFunctionDeclaration();const p=a.id;const u=c?l:p?o:i;if(e.isArrowFunctionExpression()){e.arrowFunctionToExpression({noNewArrows:r})}a.id=null;if(c){a.type="FunctionExpression"}const d=n.callExpression(t,[a]);const f=u({NAME:p||null,REF:e.scope.generateUidIdentifier(p?p.name:"ref"),FUNCTION:d,PARAMS:a.params.reduce(((t,r)=>{t.done=t.done||n.isAssignmentPattern(r)||n.isRestElement(r);if(!t.done){t.params.push(e.scope.generateUidIdentifier("x"))}return t}),{params:[],done:false}).params});if(c){e.replaceWith(f[0]);e.insertAfter(f[1])}else{const t=f.callee.body.body[1].argument;if(!p){(0,s.default)({node:t,parent:e.parent,scope:e.scope})}if(!t||t.id||a.params.length){e.replaceWith(f)}else{e.replaceWith(d)}}}function wrapFunction(e,t,r=true){if(e.isMethod()){classOrObjectMethod(e,t)}else{plainFunction(e,t,r)}}},8027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(249);var a=r(6758);var n=(0,s.declare)(((e,t)=>{e.assertVersion(7);return(0,a.createClassFeaturePlugin)({name:"proposal-class-properties",api:e,feature:a.FEATURES.fields,loose:t.loose,manipulateOptions(e,t){t.plugins.push("classProperties","classPrivateProperties")}})}));t["default"]=n},249:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},4920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3497);var a=r(2074);const n=["commonjs","amd","systemjs"];const i=`@babel/plugin-proposal-dynamic-import depends on a modules\ntransform plugin. Supported plugins are:\n - @babel/plugin-transform-modules-commonjs ^7.4.0\n - @babel/plugin-transform-modules-amd ^7.4.0\n - @babel/plugin-transform-modules-systemjs ^7.4.0\n\nIf you are using Webpack or Rollup and thus don't want\nBabel to transpile your imports and exports, you can use\nthe @babel/plugin-syntax-dynamic-import plugin and let your\nbundler handle dynamic imports.\n`;var o=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-dynamic-import",inherits:a.default,pre(){this.file.set("@babel/plugin-proposal-dynamic-import","7.14.5")},visitor:{Program(){const e=this.file.get("@babel/plugin-transform-modules-*");if(!n.includes(e)){throw new Error(i)}}}}}));t["default"]=o},3497:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(791);var a=r(1454);var n=r(8304);var i=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-export-namespace-from",inherits:a.default,visitor:{ExportNamedDeclaration(e){var t;const{node:r,scope:s}=e;const{specifiers:a}=r;const i=n.types.isExportDefaultSpecifier(a[0])?1:0;if(!n.types.isExportNamespaceSpecifier(a[i]))return;const o=[];if(i===1){o.push(n.types.exportNamedDeclaration(null,[a.shift()],r.source))}const l=a.shift();const{exported:c}=l;const p=s.generateUidIdentifier((t=c.name)!=null?t:c.value);o.push(n.types.importDeclaration([n.types.importNamespaceSpecifier(p)],n.types.cloneNode(r.source)),n.types.exportNamedDeclaration(null,[n.types.exportSpecifier(n.types.cloneNode(p),c)]));if(r.specifiers.length>=1){o.push(r)}const[u]=e.replaceWithMultiple(o);e.scope.registerDeclaration(u)}}}}));t["default"]=i},791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(169);var a=r(3030);var n=(0,s.declare)((e=>{e.assertVersion(7);const t=/(\\*)([\u2028\u2029])/g;function replace(e,t,r){const s=t.length%2===1;if(s)return e;return`${t}\\u${r.charCodeAt(0).toString(16)}`}return{name:"proposal-json-strings",inherits:a.default,visitor:{"DirectiveLiteral|StringLiteral"({node:e}){const{extra:r}=e;if(!(r!=null&&r.raw))return;r.raw=r.raw.replace(t,replace)}}}}));t["default"]=n},169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},1195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(7010);var a=r(5945);var n=r(8304);var i=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-logical-assignment-operators",inherits:a.default,visitor:{AssignmentExpression(e){const{node:t,scope:r}=e;const{operator:s,left:a,right:i}=t;const o=s.slice(0,-1);if(!n.types.LOGICAL_OPERATORS.includes(o)){return}const l=n.types.cloneNode(a);if(n.types.isMemberExpression(a)){const{object:e,property:t,computed:s}=a;const i=r.maybeGenerateMemoised(e);if(i){a.object=i;l.object=n.types.assignmentExpression("=",n.types.cloneNode(i),e)}if(s){const e=r.maybeGenerateMemoised(t);if(e){a.property=e;l.property=n.types.assignmentExpression("=",n.types.cloneNode(e),t)}}}e.replaceWith(n.types.logicalExpression(o,l,n.types.assignmentExpression("=",a,i)))}}}}));t["default"]=i},7010:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},5353:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6080);var a=r(5879);var n=r(8304);var i=(0,s.declare)(((e,{loose:t=false})=>{var r;e.assertVersion(7);const s=(r=e.assumption("noDocumentAll"))!=null?r:t;return{name:"proposal-nullish-coalescing-operator",inherits:a.default,visitor:{LogicalExpression(e){const{node:t,scope:r}=e;if(t.operator!=="??"){return}let a;let i;if(r.isStatic(t.left)){a=t.left;i=n.types.cloneNode(t.left)}else if(r.path.isPattern()){e.replaceWith(n.template.ast`(() => ${e.node})()`);return}else{a=r.generateUidIdentifierBasedOnNode(t.left);r.push({id:n.types.cloneNode(a)});i=n.types.assignmentExpression("=",a,t.left)}e.replaceWith(n.types.conditionalExpression(s?n.types.binaryExpression("!=",i,n.types.nullLiteral()):n.types.logicalExpression("&&",n.types.binaryExpression("!==",i,n.types.nullLiteral()),n.types.binaryExpression("!==",n.types.cloneNode(a),r.buildUndefinedNode())),n.types.cloneNode(a),t.right))}}}}));t["default"]=i},6080:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(5071);var a=r(1816);function remover({node:e}){var t;const{extra:r}=e;if(r!=null&&(t=r.raw)!=null&&t.includes("_")){r.raw=r.raw.replace(/_/g,"")}}var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-numeric-separator",inherits:a.default,visitor:{NumericLiteral:remover,BigIntLiteral:remover}}}));t["default"]=n},5071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},6309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(8711);var a=r(4499);var n=r(8304);var i=r(3714);var o=r(797);var l=r(5732);const c=(()=>{const e=n.types.identifier("a");const t=n.types.objectProperty(n.types.identifier("key"),e);const r=n.types.objectPattern([t]);return n.types.isReferenced(e,t,r)?1:0})();var p=(0,s.declare)(((e,t)=>{var r,s,p,u;e.assertVersion(7);const d=e.targets();const f=!(0,o.isRequired)("es6.object.assign",d,{compatData:l});const{useBuiltIns:m=f,loose:h=false}=t;if(typeof h!=="boolean"){throw new Error(".loose must be a boolean, or undefined")}const y=(r=e.assumption("ignoreFunctionLength"))!=null?r:h;const g=(s=e.assumption("objectRestNoSymbols"))!=null?s:h;const b=(p=e.assumption("pureGetters"))!=null?p:h;const x=(u=e.assumption("setSpreadProperties"))!=null?u:h;function getExtendsHelper(e){return m?n.types.memberExpression(n.types.identifier("Object"),n.types.identifier("assign")):e.addHelper("extends")}function hasRestElement(e){let t=false;visitRestElements(e,(e=>{t=true;e.stop()}));return t}function hasObjectPatternRestElement(e){let t=false;visitRestElements(e,(e=>{if(e.parentPath.isObjectPattern()){t=true;e.stop()}}));return t}function visitRestElements(e,t){e.traverse({Expression(e){const t=e.parent.type;if(t==="AssignmentPattern"&&e.key==="right"||t==="ObjectProperty"&&e.parent.computed&&e.key==="key"){e.skip()}},RestElement:t})}function hasSpread(e){for(const t of e.properties){if(n.types.isSpreadElement(t)){return true}}return false}function extractNormalizedKeys(e){const t=e.node.properties;const r=[];let s=true;let a=false;for(const e of t){if(n.types.isIdentifier(e.key)&&!e.computed){r.push(n.types.stringLiteral(e.key.name))}else if(n.types.isTemplateLiteral(e.key)){r.push(n.types.cloneNode(e.key));a=true}else if(n.types.isLiteral(e.key)){r.push(n.types.stringLiteral(String(e.key.value)))}else{r.push(n.types.cloneNode(e.key));s=false}}return{keys:r,allLiteral:s,hasTemplateLiteral:a}}function replaceImpureComputedKeys(e,t){const r=[];for(const s of e){const e=s.get("key");if(s.node.computed&&!e.isPure()){const s=t.generateUidBasedOnNode(e.node);const a=n.types.variableDeclarator(n.types.identifier(s),e.node);r.push(a);e.replaceWith(n.types.identifier(s))}}return r}function removeUnusedExcludedKeys(e){const t=e.getOuterBindingIdentifierPaths();Object.keys(t).forEach((r=>{const s=t[r].parentPath;if(e.scope.getBinding(r).references>c||!s.isObjectProperty()){return}s.remove()}))}function createObjectRest(e,t,r){const s=e.get("properties");const a=s[s.length-1];n.types.assertRestElement(a.node);const i=n.types.cloneNode(a.node);a.remove();const o=replaceImpureComputedKeys(e.get("properties"),e.scope);const{keys:l,allLiteral:c,hasTemplateLiteral:p}=extractNormalizedKeys(e);if(l.length===0){return[o,i.argument,n.types.callExpression(getExtendsHelper(t),[n.types.objectExpression([]),n.types.cloneNode(r)])]}let u;if(!c){u=n.types.callExpression(n.types.memberExpression(n.types.arrayExpression(l),n.types.identifier("map")),[t.addHelper("toPropertyKey")])}else{u=n.types.arrayExpression(l);if(!p&&!n.types.isProgram(e.scope.block)){const t=e.findParent((e=>e.isProgram()));const r=e.scope.generateUidIdentifier("excluded");t.scope.push({id:r,init:u,kind:"const"});u=n.types.cloneNode(r)}}return[o,i.argument,n.types.callExpression(t.addHelper(`objectWithoutProperties${g?"Loose":""}`),[n.types.cloneNode(r),u])]}function replaceRestElement(e,t,r){if(t.isAssignmentPattern()){replaceRestElement(e,t.get("left"),r);return}if(t.isArrayPattern()&&hasRestElement(t)){const s=t.get("elements");for(let t=0;te.skip(),"ReferencedIdentifier|BindingIdentifier":IdentifierHandler},e.scope)}}}if(!a){for(let e=0;ee>=n-1||r.has(e);(0,i.convertFunctionParams)(e,y,shouldTransformParam,replaceRestElement)}},VariableDeclarator(e,t){if(!e.get("id").isObjectPattern()){return}let r=e;const s=e;visitRestElements(e.get("id"),(e=>{if(!e.parentPath.isObjectPattern()){return}if(s.node.id.properties.length>1&&!n.types.isIdentifier(s.node.init)){const t=e.scope.generateUidIdentifierBasedOnNode(s.node.init,"ref");s.insertBefore(n.types.variableDeclarator(t,s.node.init));s.replaceWith(n.types.variableDeclarator(s.node.id,n.types.cloneNode(t)));return}let a=s.node.init;const i=[];let o;e.findParent((e=>{if(e.isObjectProperty()){i.unshift(e)}else if(e.isVariableDeclarator()){o=e.parentPath.node.kind;return true}}));const l=replaceImpureComputedKeys(i,e.scope);i.forEach((e=>{const{node:t}=e;a=n.types.memberExpression(a,n.types.cloneNode(t.key),t.computed||n.types.isLiteral(t.key))}));const c=e.findParent((e=>e.isObjectPattern()));const[p,u,d]=createObjectRest(c,t,a);if(b){removeUnusedExcludedKeys(c)}n.types.assertIdentifier(u);r.insertBefore(p);r.insertBefore(l);r.insertAfter(n.types.variableDeclarator(u,d));r=r.getSibling(r.key+1);e.scope.registerBinding(o,r);if(c.node.properties.length===0){c.findParent((e=>e.isObjectProperty()||e.isVariableDeclarator())).remove()}}))},ExportNamedDeclaration(e){const t=e.get("declaration");if(!t.isVariableDeclaration())return;const r=t.get("declarations").some((e=>hasObjectPatternRestElement(e.get("id"))));if(!r)return;const s=[];for(const t of Object.keys(e.getOuterBindingIdentifiers(e))){s.push(n.types.exportSpecifier(n.types.identifier(t),n.types.identifier(t)))}e.replaceWith(t.node);e.insertAfter(n.types.exportNamedDeclaration(null,s))},CatchClause(e){const t=e.get("param");replaceRestElement(t.parentPath,t)},AssignmentExpression(e,t){const r=e.get("left");if(r.isObjectPattern()&&hasRestElement(r)){const s=[];const a=e.scope.generateUidBasedOnNode(e.node.right,"ref");s.push(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(a),e.node.right)]));const[i,o,l]=createObjectRest(r,t,n.types.identifier(a));if(i.length>0){s.push(n.types.variableDeclaration("var",i))}const c=n.types.cloneNode(e.node);c.right=n.types.identifier(a);s.push(n.types.expressionStatement(c));s.push(n.types.toStatement(n.types.assignmentExpression("=",o,l)));s.push(n.types.expressionStatement(n.types.identifier(a)));e.replaceWithMultiple(s)}},ForXStatement(e){const{node:t,scope:r}=e;const s=e.get("left");const a=t.left;if(!hasObjectPatternRestElement(s)){return}if(!n.types.isVariableDeclaration(a)){const s=r.generateUidIdentifier("ref");t.left=n.types.variableDeclaration("var",[n.types.variableDeclarator(s)]);e.ensureBlock();if(t.body.body.length===0&&e.isCompletionRecord()){t.body.body.unshift(n.types.expressionStatement(r.buildUndefinedNode()))}t.body.body.unshift(n.types.expressionStatement(n.types.assignmentExpression("=",a,n.types.cloneNode(s))))}else{const s=a.declarations[0].id;const i=r.generateUidIdentifier("ref");t.left=n.types.variableDeclaration(a.kind,[n.types.variableDeclarator(i,null)]);e.ensureBlock();t.body.body.unshift(n.types.variableDeclaration(t.left.kind,[n.types.variableDeclarator(s,n.types.cloneNode(i))]))}},ArrayPattern(e){const t=[];visitRestElements(e,(e=>{if(!e.parentPath.isObjectPattern()){return}const r=e.parentPath;const s=e.scope.generateUidIdentifier("ref");t.push(n.types.variableDeclarator(r.node,s));r.replaceWith(n.types.cloneNode(s));e.skip()}));if(t.length>0){const r=e.getStatementParent();r.insertAfter(n.types.variableDeclaration(r.node.kind||"var",t))}},ObjectExpression(e,t){if(!hasSpread(e.node))return;let r;if(x){r=getExtendsHelper(t)}else{try{r=t.addHelper("objectSpread2")}catch(e){this.file.declarations["objectSpread2"]=null;r=t.addHelper("objectSpread")}}let s=null;let a=[];function make(){const e=a.length>0;const t=n.types.objectExpression(a);a=[];if(!s){s=n.types.callExpression(r,[t]);return}if(b){if(e){s.arguments.push(t)}return}s=n.types.callExpression(n.types.cloneNode(r),[s,...e?[n.types.objectExpression([]),t]:[]])}for(const t of e.node.properties){if(n.types.isSpreadElement(t)){make();s.arguments.push(t.argument)}else{a.push(t)}}if(a.length)make();e.replaceWith(s)}}}}));t["default"]=p},5732:(e,t,r)=>{e.exports=r(5880)},8711:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},4195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6970);var a=r(7452);var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"proposal-optional-catch-binding",inherits:a.default,visitor:{CatchClause(e){if(!e.node.param){const t=e.scope.generateUidIdentifier("unused");const r=e.get("param");r.replaceWith(t)}}}}}));t["default"]=n},6970:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7490:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(2262);var a=r(79);var n=r(8304);var i=r(5480);function _interopDefaultLegacy(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var o=_interopDefaultLegacy(a);function willPathCastToBoolean(e){const t=findOutermostTransparentParent(e);const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}function findOutermostTransparentParent(e){let t=e;e.findParent((e=>{if(!i.isTransparentExprWrapper(e))return true;t=e}));return t}const{ast:l}=n.template.expression;function isSimpleMemberExpression(e){e=i.skipTransparentExprWrappers(e);return n.types.isIdentifier(e)||n.types.isSuper(e)||n.types.isMemberExpression(e)&&!e.computed&&isSimpleMemberExpression(e.object)}function needsMemoize(e){let t=e;const{scope:r}=e;while(t.isOptionalMemberExpression()||t.isOptionalCallExpression()){const{node:e}=t;const s=t.isOptionalMemberExpression()?"object":"callee";const a=i.skipTransparentExprWrappers(t.get(s));if(e.optional){return!r.isStatic(a.node)}t=a}}function transform(e,{pureGetters:t,noDocumentAll:r}){const{scope:s}=e;const a=findOutermostTransparentParent(e);const{parentPath:o}=a;const c=willPathCastToBoolean(a);let p=false;const u=o.isCallExpression({callee:a.node})&&e.isOptionalMemberExpression();const d=[];let f=e;if(s.path.isPattern()&&needsMemoize(f)){e.replaceWith(n.template.ast`(() => ${e.node})()`);return}while(f.isOptionalMemberExpression()||f.isOptionalCallExpression()){const{node:e}=f;if(e.optional){d.push(e)}if(f.isOptionalMemberExpression()){f.node.type="MemberExpression";f=i.skipTransparentExprWrappers(f.get("object"))}else if(f.isOptionalCallExpression()){f.node.type="CallExpression";f=i.skipTransparentExprWrappers(f.get("callee"))}}let m=e;if(o.isUnaryExpression({operator:"delete"})){m=o;p=true}for(let e=d.length-1;e>=0;e--){const a=d[e];const o=n.types.isCallExpression(a);const f=o?"callee":"object";const y=a[f];let g=y;while(i.isTransparentExprWrapper(g)){g=g.expression}let b;let x;if(o&&n.types.isIdentifier(g,{name:"eval"})){x=b=g;a[f]=n.types.sequenceExpression([n.types.numericLiteral(0),b])}else if(t&&o&&isSimpleMemberExpression(g)){x=b=y}else{b=s.maybeGenerateMemoised(g);if(b){x=n.types.assignmentExpression("=",n.types.cloneNode(b),y);a[f]=b}else{x=b=y}}if(o&&n.types.isMemberExpression(g)){if(t&&isSimpleMemberExpression(g)){a.callee=y}else{const{object:e}=g;let t=s.maybeGenerateMemoised(e);if(t){g.object=n.types.assignmentExpression("=",t,e)}else if(n.types.isSuper(e)){t=n.types.thisExpression()}else{t=e}a.arguments.unshift(n.types.cloneNode(t));a.callee=n.types.memberExpression(a.callee,n.types.identifier("call"))}}let v=m.node;if(e===0&&u){var h;const e=i.skipTransparentExprWrappers(m.get("object")).node;let r;if(!t||!isSimpleMemberExpression(e)){r=s.maybeGenerateMemoised(e);if(r){v.object=n.types.assignmentExpression("=",r,e)}}v=n.types.callExpression(n.types.memberExpression(v,n.types.identifier("bind")),[n.types.cloneNode((h=r)!=null?h:e)])}if(c){const e=r?l`${n.types.cloneNode(x)} != null`:l`
${n.types.cloneNode(x)} !== null && ${n.types.cloneNode(b)} !== void 0`;m.replaceWith(n.types.logicalExpression("&&",e,v));m=i.skipTransparentExprWrappers(m.get("right"))}else{const e=r?l`${n.types.cloneNode(x)} == null`:l`
${n.types.cloneNode(x)} === null || ${n.types.cloneNode(b)} === void 0`;const t=p?l`true`:l`void 0`;m.replaceWith(n.types.conditionalExpression(e,t,v));m=i.skipTransparentExprWrappers(m.get("alternate"))}}}var c=s.declare(((e,t)=>{var r,s;e.assertVersion(7);const{loose:a=false}=t;const n=(r=e.assumption("noDocumentAll"))!=null?r:a;const i=(s=e.assumption("pureGetters"))!=null?s:a;return{name:"proposal-optional-chaining",inherits:o["default"].default,visitor:{"OptionalCallExpression|OptionalMemberExpression"(e){transform(e,{noDocumentAll:n,pureGetters:i})}}}}));t["default"]=c;t.transform=transform},2262:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},9062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(1667);var a=r(6758);var n=(0,s.declare)(((e,t)=>{e.assertVersion(7);return(0,a.createClassFeaturePlugin)({name:"proposal-private-methods",api:e,feature:a.FEATURES.privateMethods,loose:t.loose,manipulateOptions(e,t){t.plugins.push("classPrivateMethods")}})}));t["default"]=n},1667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},2074:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-dynamic-import",manipulateOptions(e,t){t.plugins.push("dynamicImport")}}}));t["default"]=a},1454:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-export-namespace-from",manipulateOptions(e,t){t.plugins.push("exportNamespaceFrom")}}}));t["default"]=a},3030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-json-strings",manipulateOptions(e,t){t.plugins.push("jsonStrings")}}}));t["default"]=a},8926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(4476);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-jsx",manipulateOptions(e,t){if(t.plugins.some((e=>(Array.isArray(e)?e[0]:e)==="typescript"))){return}t.plugins.push("jsx")}}}));t["default"]=a},4476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},5945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-logical-assignment-operators",manipulateOptions(e,t){t.plugins.push("logicalAssignment")}}}));t["default"]=a},5879:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-nullish-coalescing-operator",manipulateOptions(e,t){t.plugins.push("nullishCoalescingOperator")}}}));t["default"]=a},1816:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-numeric-separator",manipulateOptions(e,t){t.plugins.push("numericSeparator")}}}));t["default"]=a},4499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-object-rest-spread",manipulateOptions(e,t){t.plugins.push("objectRestSpread")}}}));t["default"]=a},7452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-optional-catch-binding",manipulateOptions(e,t){t.plugins.push("optionalCatchBinding")}}}));t["default"]=a},79:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9055);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-optional-chaining",manipulateOptions(e,t){t.plugins.push("optionalChaining")}}}));t["default"]=a},4893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3799);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-top-level-await",manipulateOptions(e,t){t.plugins.push("topLevelAwait")}}}));t["default"]=a},3799:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},513:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(8845);var a=(0,s.declare)(((e,t)=>{var r;e.assertVersion(7);const s=(r=e.assumption("noNewArrows"))!=null?r:!t.spec;return{name:"transform-arrow-functions",visitor:{ArrowFunctionExpression(e){if(!e.isArrowFunctionExpression())return;e.arrowFunctionToExpression({allowInsertArrow:false,noNewArrows:s,specCompliant:!s})}}}}));t["default"]=a},8845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},6413:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(9203);var a=r(7120);var n=r(9115);var i=r(8304);var o=(0,s.declare)(((e,t)=>{e.assertVersion(7);const{method:r,module:s}=t;const o=e.assumption("noNewArrows");if(r&&s){return{name:"transform-async-to-generator",visitor:{Function(e,t){if(!e.node.async||e.node.generator)return;let l=t.methodWrapper;if(l){l=i.types.cloneNode(l)}else{l=t.methodWrapper=(0,n.addNamed)(e,r,s)}(0,a.default)(e,{wrapAsync:l},o)}}}}return{name:"transform-async-to-generator",visitor:{Function(e,t){if(!e.node.async||e.node.generator)return;(0,a.default)(e,{wrapAsync:t.addHelper("asyncToGenerator")},o)}}}}));t["default"]=o},9203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},8363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6014);var a=r(8304);var n=(0,s.declare)((e=>{e.assertVersion(7);function statementList(e,t){const r=t.get(e);for(const e of r){const t=e.node;if(!e.isFunctionDeclaration())continue;const r=a.types.variableDeclaration("let",[a.types.variableDeclarator(t.id,a.types.toExpression(t))]);r._blockHoist=2;t.id=null;e.replaceWith(r)}}return{name:"transform-block-scoped-functions",visitor:{BlockStatement(e){const{node:t,parent:r}=e;if(a.types.isFunction(r,{body:t})||a.types.isExportDeclaration(r)){return}statementList("body",e)},SwitchCase(e){statementList("consequent",e)}}}}));t["default"]=n},6014:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},1630:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(8723);var a=r(4642);var n=r(8304);const i=new WeakSet;var o=(0,s.declare)(((e,t)=>{e.assertVersion(7);const{throwIfClosureRequired:r=false,tdz:s=false}=t;if(typeof r!=="boolean"){throw new Error(`.throwIfClosureRequired must be a boolean, or undefined`)}if(typeof s!=="boolean"){throw new Error(`.tdz must be a boolean, or undefined`)}return{name:"transform-block-scoping",visitor:{VariableDeclaration(e){const{node:t,parent:r,scope:s}=e;if(!isBlockScoped(t))return;convertBlockScopedToVar(e,null,r,s,true);if(t._tdzThis){const r=[t];for(let e=0;ee.isLoop()||e.isFunction()));return t==null?void 0:t.isLoop()}function convertBlockScopedToVar(e,t,r,s,a=false){if(!t){t=e.node}if(isInLoop(e)&&!n.types.isFor(r)){for(let e=0;e0){e.traverse(p,t)}else{e.traverse(a.visitor,t)}return e.skip()}},a.visitor]);const p=n.traverse.visitors.merge([{ReferencedIdentifier(e,t){const r=t.letReferences.get(e.node.name);if(!r)return;const s=e.scope.getBindingIdentifier(e.node.name);if(s&&s!==r)return;t.closurify=true}},a.visitor]);const u={enter(e,t){const{node:r,parent:s}=e;if(e.isForStatement()){if(isVar(r.init,r)){const e=t.pushDeclar(r.init);if(e.length===1){r.init=e[0]}else{r.init=n.types.sequenceExpression(e)}}}else if(e.isFor()){if(isVar(r.left,r)){t.pushDeclar(r.left);r.left=r.left.declarations[0].id}}else if(isVar(r,s)){e.replaceWithMultiple(t.pushDeclar(r).map((e=>n.types.expressionStatement(e))))}else if(e.isFunction()){return e.skip()}}};const d={LabeledStatement({node:e},t){t.innerLabels.push(e.label.name)}};const f={enter(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){for(const r of Object.keys(e.getBindingIdentifiers())){if(t.outsideReferences.get(r)!==e.scope.getBindingIdentifier(r)){continue}t.reassignments[r]=true}}else if(e.isReturnStatement()){t.returnStatements.push(e)}}};function loopNodeTo(e){if(n.types.isBreakStatement(e)){return"break"}else if(n.types.isContinueStatement(e)){return"continue"}}const m={Loop(e,t){const r=t.ignoreLabeless;t.ignoreLabeless=true;e.traverse(m,t);t.ignoreLabeless=r;e.skip()},Function(e){e.skip()},SwitchCase(e,t){const r=t.inSwitchCase;t.inSwitchCase=true;e.traverse(m,t);t.inSwitchCase=r;e.skip()},"BreakStatement|ContinueStatement|ReturnStatement"(e,t){const{node:r,scope:s}=e;if(r[this.LOOP_IGNORE])return;let a;let i=loopNodeTo(r);if(i){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0){return}i=`${i}|${r.label.name}`}else{if(t.ignoreLabeless)return;if(n.types.isBreakStatement(r)&&t.inSwitchCase)return}t.hasBreakContinue=true;t.map[i]=r;a=n.types.stringLiteral(i)}if(e.isReturnStatement()){t.hasReturn=true;a=n.types.objectExpression([n.types.objectProperty(n.types.identifier("v"),r.argument||s.buildUndefinedNode())])}if(a){a=n.types.returnStatement(a);a[this.LOOP_IGNORE]=true;e.skip();e.replaceWith(n.types.inherits(a,r))}}};function isStrict(e){return!!e.find((({node:e})=>{if(n.types.isProgram(e)){if(e.sourceType==="module")return true}else if(!n.types.isBlockStatement(e))return false;return e.directives.some((e=>e.value.value==="use strict"))}))}class BlockScoping{constructor(e,t,r,s,a,i,o){this.parent=r;this.scope=s;this.state=o;this.throwIfClosureRequired=a;this.tdzEnabled=i;this.blockPath=t;this.block=t.node;this.outsideLetReferences=new Map;this.hasLetReferences=false;this.letReferences=new Map;this.body=[];if(e){this.loopParent=e.parent;this.loopLabel=n.types.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=e;this.loop=e.node}}run(){const e=this.block;if(i.has(e))return;i.add(e);const t=this.getLetReferences();this.checkConstants();if(n.types.isFunction(this.parent)||n.types.isProgram(this.block)){this.updateScopeInfo();return}if(!this.hasLetReferences)return;if(t){this.wrapClosure()}else{this.remap()}this.updateScopeInfo(t);if(this.loopLabel&&!n.types.isLabeledStatement(this.loopParent)){return n.types.labeledStatement(this.loopLabel,this.loop)}}checkConstants(){const e=this.scope;const t=this.state;for(const r of Object.keys(e.bindings)){const s=e.bindings[r];if(s.kind!=="const")continue;for(const e of s.constantViolations){const s=t.addHelper("readOnlyError");const a=n.types.callExpression(s,[n.types.stringLiteral(r)]);if(e.isAssignmentExpression()){const{operator:t}=e.node;if(t==="="){e.replaceWith(n.types.sequenceExpression([e.get("right").node,a]))}else if(["&&=","||=","??="].includes(t)){e.replaceWith(n.types.logicalExpression(t.slice(0,-1),e.get("left").node,n.types.sequenceExpression([e.get("right").node,a])))}else{e.replaceWith(n.types.sequenceExpression([n.types.binaryExpression(t.slice(0,-1),e.get("left").node,e.get("right").node),a]))}}else if(e.isUpdateExpression()){e.replaceWith(n.types.sequenceExpression([n.types.unaryExpression("+",e.get("argument").node),a]))}else if(e.isForXStatement()){e.ensureBlock();e.get("left").replaceWith(n.types.variableDeclaration("var",[n.types.variableDeclarator(e.scope.generateUidIdentifier(r))]));e.node.body.body.unshift(n.types.expressionStatement(a))}}}}updateScopeInfo(e){const t=this.blockPath.scope;const r=t.getFunctionParent()||t.getProgramParent();const s=this.letReferences;for(const a of s.keys()){const n=s.get(a);const i=t.getBinding(n.name);if(!i)continue;if(i.kind==="let"||i.kind==="const"){i.kind="var";if(e){if(t.hasOwnBinding(n.name)){t.removeBinding(n.name)}}else{t.moveBindingTo(n.name,r)}}}}remap(){const e=this.letReferences;const t=this.outsideLetReferences;const r=this.scope;const s=this.blockPath.scope;for(const t of e.keys()){const a=e.get(t);if(r.parentHasBinding(t)||r.hasGlobal(t)){const e=r.getOwnBinding(t);if(e){const s=r.parent.getOwnBinding(t);if(e.kind==="hoisted"&&!e.path.node.async&&!e.path.node.generator&&(!s||isVar(s.path.parent))&&!isStrict(e.path.parentPath)){continue}r.rename(a.name)}if(s.hasOwnBinding(t)){s.rename(a.name)}}}for(const r of t.keys()){const t=e.get(r);if(isInLoop(this.blockPath)&&s.hasOwnBinding(r)){s.rename(t.name)}}}wrapClosure(){if(this.throwIfClosureRequired){throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure "+"(throwIfClosureRequired).")}const e=this.block;const t=this.outsideLetReferences;if(this.loop){for(const e of Array.from(t.keys())){const r=t.get(e);if(this.scope.hasGlobal(r.name)||this.scope.parentHasBinding(r.name)){t.delete(r.name);this.letReferences.delete(r.name);this.scope.rename(r.name);this.letReferences.set(r.name,r);t.set(r.name,r)}}}this.has=this.checkLoop();this.hoistVarDeclarations();const r=Array.from(t.values(),(e=>n.types.cloneNode(e)));const s=r.map((e=>n.types.cloneNode(e)));const a=this.blockPath.isSwitchStatement();const i=n.types.functionExpression(null,s,n.types.blockStatement(a?[e]:e.body));this.addContinuations(i);let o=n.types.callExpression(n.types.nullLiteral(),r);let l=".callee";const c=n.traverse.hasType(i.body,"YieldExpression",n.types.FUNCTION_TYPES);if(c){i.generator=true;o=n.types.yieldExpression(o,true);l=".argument"+l}const p=n.traverse.hasType(i.body,"AwaitExpression",n.types.FUNCTION_TYPES);if(p){i.async=true;o=n.types.awaitExpression(o);l=".argument"+l}let u;let d;if(this.has.hasReturn||this.has.hasBreakContinue){const e=this.scope.generateUid("ret");this.body.push(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(e),o)]));u="declarations.0.init"+l;d=this.body.length-1;this.buildHas(e)}else{this.body.push(n.types.expressionStatement(o));u="expression"+l;d=this.body.length-1}let f;if(a){const{parentPath:e,listKey:t,key:r}=this.blockPath;this.blockPath.replaceWithMultiple(this.body);f=e.get(t)[r+d]}else{e.body=this.body;f=this.blockPath.get("body")[d]}const m=f.get(u);let h;if(this.loop){const e=this.scope.generateUid("loop");const t=this.loopPath.insertBefore(n.types.variableDeclaration("var",[n.types.variableDeclarator(n.types.identifier(e),i)]));m.replaceWith(n.types.identifier(e));h=t[0].get("declarations.0.init")}else{m.replaceWith(i);h=m}h.unwrapFunctionEnvironment()}addContinuations(e){const t={reassignments:{},returnStatements:[],outsideReferences:this.outsideLetReferences};this.scope.traverse(e,f,t);for(let r=0;r{e.insertBefore(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.identifier(a),n.types.identifier(i))))}));e.body.body.push(n.types.expressionStatement(n.types.assignmentExpression("=",n.types.identifier(a),n.types.identifier(i))))}}getLetReferences(){const e=this.block;const t=[];if(this.loop){const e=this.loop.left||this.loop.init;if(isBlockScoped(e)){t.push(e);const r=n.types.getBindingIdentifiers(e);for(const e of Object.keys(r)){this.outsideLetReferences.set(e,r[e])}}}const addDeclarationsFromChild=(r,s)=>{s=s||r.node;if(n.types.isClassDeclaration(s)||n.types.isFunctionDeclaration(s)||isBlockScoped(s)){if(isBlockScoped(s)){convertBlockScopedToVar(r,s,e,this.scope)}if(s.declarations){for(let e=0;ethis.state.addHelper(e)};if(isInLoop(this.blockPath)){r.loopDepth++}this.blockPath.traverse(c,r);return r.closurify}checkLoop(){const e={hasBreakContinue:false,ignoreLabeless:false,inSwitchCase:false,innerLabels:[],hasReturn:false,isLoop:!!this.loop,map:{},LOOP_IGNORE:Symbol()};this.blockPath.traverse(d,e);this.blockPath.traverse(m,e);return e}hoistVarDeclarations(){this.blockPath.traverse(u,this)}pushDeclar(e){const t=[];const r=n.types.getBindingIdentifiers(e);for(const e of Object.keys(r)){t.push(n.types.variableDeclarator(r[e]))}this.body.push(n.types.variableDeclaration(e.kind,t));const s=[];for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.visitor=void 0;var s=r(8304);function getTDZStatus(e,t){const r=t._guessExecutionStatusRelativeTo(e);if(r==="before"){return"outside"}else if(r==="after"){return"inside"}else{return"maybe"}}function buildTDZAssert(e,t){return s.types.callExpression(t.addHelper("temporalRef"),[e,s.types.stringLiteral(e.name)])}function isReference(e,t,r){const s=r.letReferences.get(e.name);if(!s)return false;return t.getBindingIdentifier(e.name)===s}const a=new WeakSet;const n={ReferencedIdentifier(e,t){if(!t.tdzEnabled)return;const{node:r,parent:n,scope:i}=e;if(e.parentPath.isFor({left:r}))return;if(!isReference(r,i,t))return;const o=i.getBinding(r.name).path;if(o.isFunctionDeclaration())return;const l=getTDZStatus(e,o);if(l==="outside")return;if(l==="maybe"){if(a.has(r)){return}a.add(r);const i=buildTDZAssert(r,t);o.parent._tdzThis=true;if(e.parentPath.isUpdateExpression()){if(n._ignoreBlockScopingTDZ)return;e.parentPath.replaceWith(s.types.sequenceExpression([i,n]))}else{e.replaceWith(i)}}else if(l==="inside"){e.replaceWith(s.template.ast`${t.addHelper("tdz")}("${r.name}")`)}},AssignmentExpression:{exit(e,t){if(!t.tdzEnabled)return;const{node:r}=e;if(r._ignoreBlockScopingTDZ)return;const a=[];const n=e.getBindingIdentifiers();for(const r of Object.keys(n)){const s=n[r];if(isReference(s,e.scope,t)){a.push(s)}}if(a.length){r._ignoreBlockScopingTDZ=true;a.push(r);e.replaceWithMultiple(a.map((e=>s.types.expressionStatement(e))))}}}};t.visitor=n},8723:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},8120:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(8432);var a=r(8304);var n=(0,s.declare)(((e,t)=>{var r;e.assertVersion(7);const s=(r=e.assumption("setComputedProperties"))!=null?r:t.loose;const n=s?pushComputedPropsLoose:pushComputedPropsSpec;const i=(0,a.template)(`\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n `);function getValue(e){if(a.types.isObjectProperty(e)){return e.value}else if(a.types.isObjectMethod(e)){return a.types.functionExpression(null,e.params,e.body,e.generator,e.async)}}function pushAssign(e,t,r){if(t.kind==="get"&&t.kind==="set"){pushMutatorDefine(e,t,r)}else{r.push(a.types.expressionStatement(a.types.assignmentExpression("=",a.types.memberExpression(a.types.cloneNode(e),t.key,t.computed||a.types.isLiteral(t.key)),getValue(t))))}}function pushMutatorDefine({body:e,getMutatorId:t,scope:r},s){let n=!s.computed&&a.types.isIdentifier(s.key)?a.types.stringLiteral(s.key.name):s.key;const o=r.maybeGenerateMemoised(n);if(o){e.push(a.types.expressionStatement(a.types.assignmentExpression("=",o,n)));n=o}e.push(...i({MUTATOR_MAP_REF:t(),KEY:a.types.cloneNode(n),VALUE:getValue(s),KIND:a.types.identifier(s.kind)}))}function pushComputedPropsLoose(e){for(const t of e.computedProps){if(t.kind==="get"||t.kind==="set"){pushMutatorDefine(e,t)}else{pushAssign(a.types.cloneNode(e.objId),t,e.body)}}}function pushComputedPropsSpec(e){const{objId:t,body:r,computedProps:s,state:n}=e;for(const i of s){const o=a.types.toComputedKey(i);if(i.kind==="get"||i.kind==="set"){pushMutatorDefine(e,i)}else{if(s.length===1){return a.types.callExpression(n.addHelper("defineProperty"),[e.initPropExpression,o,getValue(i)])}else{r.push(a.types.expressionStatement(a.types.callExpression(n.addHelper("defineProperty"),[a.types.cloneNode(t),o,getValue(i)])))}}}}return{name:"transform-computed-properties",visitor:{ObjectExpression:{exit(e,t){const{node:r,parent:s,scope:i}=e;let o=false;for(const e of r.properties){o=e.computed===true;if(o)break}if(!o)return;const l=[];const c=[];let p=false;for(const e of r.properties){if(e.computed){p=true}if(p){c.push(e)}else{l.push(e)}}const u=i.generateUidIdentifierBasedOnNode(s);const d=a.types.objectExpression(l);const f=[];f.push(a.types.variableDeclaration("var",[a.types.variableDeclarator(u,d)]));let m;const getMutatorId=function(){if(!m){m=i.generateUidIdentifier("mutatorMap");f.push(a.types.variableDeclaration("var",[a.types.variableDeclarator(m,a.types.objectExpression([]))]))}return a.types.cloneNode(m)};const h=n({scope:i,objId:u,body:f,computedProps:c,initPropExpression:d,getMutatorId:getMutatorId,state:t});if(m){f.push(a.types.expressionStatement(a.types.callExpression(t.addHelper("defineEnumerableProperties"),[a.types.cloneNode(u),a.types.cloneNode(m)])))}if(h){e.replaceWith(h)}else{f.push(a.types.expressionStatement(a.types.cloneNode(u)));e.replaceWithMultiple(f)}}}}}}));t["default"]=n},8432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(4050);var a=r(8304);function getName(e){if(a.types.isIdentifier(e)){return e.name}return e.value.toString()}var n=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-duplicate-keys",visitor:{ObjectExpression(e){const{node:t}=e;const r=t.properties.filter((e=>!a.types.isSpreadElement(e)&&!e.computed));const s=Object.create(null);const n=Object.create(null);const i=Object.create(null);for(const e of r){const t=getName(e.key);let r=false;switch(e.kind){case"get":if(s[t]||n[t]){r=true}n[t]=true;break;case"set":if(s[t]||i[t]){r=true}i[t]=true;break;default:if(s[t]||n[t]||i[t]){r=true}s[t]=true}if(r){e.computed=true;e.key=a.types.stringLiteral(t)}}}}}}));t["default"]=n},4050:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},1176:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(3651);var a=r(6951);var n=r(8304);var i=(0,s.declare)((e=>{e.assertVersion(7);return{name:"transform-exponentiation-operator",visitor:(0,a.default)({operator:"**",build(e,t){return n.types.callExpression(n.types.memberExpression(n.types.identifier("Math"),n.types.identifier("pow")),[e,t])}})}}));t["default"]=i},3651:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},9488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(2388);var a=r(8304);var n=r(8591);var i=(0,s.declare)(((e,t)=>{var r,s,i;e.assertVersion(7);{const{assumeArray:r,allowArrayLike:s,loose:a}=t;if(a===true&&r===true){throw new Error(`The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of`)}if(r===true&&s===true){throw new Error(`The assumeArray and allowArrayLike options cannot be used together in @babel/plugin-transform-for-of`)}if(s&&/^7\.\d\./.test(e.version)){throw new Error(`The allowArrayLike is only supported when using @babel/core@^7.10.0`)}}const o=(r=t.assumeArray)!=null?r:!t.loose&&e.assumption("iterableIsArray");const l=(s=t.allowArrayLike)!=null?s:e.assumption("arrayLikeIsIterable");const c=(i=e.assumption("skipForOfIteratorClosing"))!=null?i:t.loose;if(o&&l){throw new Error(`The "iterableIsArray" and "arrayLikeIsIterable" assumptions are not compatible.`)}if(o){return{name:"transform-for-of",visitor:{ForOfStatement(e){const{scope:t}=e;const{left:r,right:s,await:n}=e.node;if(n){return}const i=t.generateUidIdentifier("i");let o=t.maybeGenerateMemoised(s,true);const l=[a.types.variableDeclarator(i,a.types.numericLiteral(0))];if(o){l.push(a.types.variableDeclarator(o,s))}else{o=s}const c=a.types.memberExpression(a.types.cloneNode(o),a.types.cloneNode(i),true);let p;if(a.types.isVariableDeclaration(r)){p=r;p.declarations[0].init=c}else{p=a.types.expressionStatement(a.types.assignmentExpression("=",r,c))}let u;const d=e.get("body");if(d.isBlockStatement()&&Object.keys(e.getBindingIdentifiers()).some((e=>d.scope.hasOwnBinding(e)))){u=a.types.blockStatement([p,d.node])}else{u=a.types.toBlock(d.node);u.body.unshift(p)}e.replaceWith(a.types.forStatement(a.types.variableDeclaration("let",l),a.types.binaryExpression("<",a.types.cloneNode(i),a.types.memberExpression(a.types.cloneNode(o),a.types.identifier("length"))),a.types.updateExpression("++",a.types.cloneNode(i)),u))}}}}const p=(0,a.template)`
for (var KEY = 0, NAME = ARR; KEY < NAME.length; KEY++) BODY;
@@ -317,7 +317,7 @@
* regjsgen 0.5.1
* Copyright 2014-2019 Benjamin Tan
* Available under MIT license
- */(function(){"use strict";var r={function:true,object:true};var s=r[typeof window]&&window||this;var a=r[typeof t]&&t&&!t.nodeType&&t;var n=r["object"]&&e&&!e.nodeType;var i=a&&n&&typeof global=="object"&&global;if(i&&(i.global===i||i.window===i||i.self===i)){s=i}var o=Object.prototype.hasOwnProperty;function fromCodePoint(){var e=Number(arguments[0]);if(!isFinite(e)||e<0||e>1114111||Math.floor(e)!=e){throw RangeError("Invalid code point: "+e)}if(e<=65535){return String.fromCharCode(e)}else{e-=65536;var t=(e>>10)+55296;var r=e%1024+56320;return String.fromCharCode(t,r)}}var l={};function assertType(e,t){if(t.indexOf("|")==-1){if(e==t){return}throw Error("Invalid node type: "+e+"; expected type: "+t)}t=o.call(l,t)?l[t]:l[t]=RegExp("^(?:"+t+")$");if(t.test(e)){return}throw Error("Invalid node type: "+e+"; expected types: "+t)}function generate(e){var t=e.type;if(o.call(c,t)){return c[t](e)}throw Error("Invalid node type: "+t)}function generateAlternative(e){assertType(e.type,"alternative");var t=e.body,r=-1,s=t.length,a="";while(++r"}break;case"ignore":t+="?:";break;case"lookahead":t+="?=";break;case"negativeLookahead":t+="?!";break;case"lookbehind":t+="?<=";break;case"negativeLookbehind":t+="?"}throw new Error("Unknown reference type")}function generateTerm(e){assertType(e.type,"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|unicodePropertyEscape|value|dot");return generate(e)}function generateValue(e){assertType(e.type,"value");var t=e.kind,r=e.codePoint;if(typeof r!="number"){throw new Error("Invalid code point: "+r)}switch(t){case"controlLetter":return"\\c"+fromCodePoint(r+64);case"hexadecimalEscape":return"\\x"+("00"+r.toString(16).toUpperCase()).slice(-2);case"identifier":return"\\"+fromCodePoint(r);case"null":return"\\"+r;case"octal":return"\\"+r.toString(8);case"singleEscape":switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r";default:throw Error("Invalid code point: "+r)}case"symbol":return fromCodePoint(r);case"unicodeEscape":return"\\u"+("0000"+r.toString(16).toUpperCase()).slice(-4);case"unicodeCodePointEscape":return"\\u{"+r.toString(16).toUpperCase()+"}";default:throw Error("Unsupported node kind: "+t)}}var c={alternative:generateAlternative,anchor:generateAnchor,characterClass:generateCharacterClass,characterClassEscape:generateCharacterClassEscape,characterClassRange:generateCharacterClassRange,unicodePropertyEscape:generateUnicodePropertyEscape,disjunction:generateDisjunction,dot:generateDot,group:generateGroup,quantifier:generateQuantifier,reference:generateReference,value:generateValue};var p={generate:generate};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define((function(){return p}));s.regjsgen=p}else if(a&&n){a.generate=generate}else{s.regjsgen=p}}).call(this)},9990:e=>{(function(){var t=String.fromCodePoint||function(){var e=String.fromCharCode;var t=Math.floor;return function fromCodePoint(){var r=16384;var s=[];var a;var n;var i=-1;var o=arguments.length;if(!o){return""}var l="";while(++i1114111||t(c)!=c){throw RangeError("Invalid code point: "+c)}if(c<=65535){s.push(c)}else{c-=65536;a=(c>>10)+55296;n=c%1024+56320;s.push(a,n)}if(i+1==o||s.length>r){l+=e.apply(null,s);s.length=0}}return l}}();function parse(e,r,s){if(!s){s={}}function addRaw(t){t.raw=e.substring(t.range[0],t.range[1]);return t}function updateRawStart(e,t){e.range[0]=t;return addRaw(e)}function createAnchor(e,t){return addRaw({type:"anchor",kind:e,range:[l-t,l]})}function createValue(e,t,r,s){return addRaw({type:"value",kind:e,codePoint:t,range:[r,s]})}function createEscaped(e,t,r,s){s=s||0;return createValue(e,t,l-(r.length+s),l)}function createCharacter(e){var t=e[0];var r=t.charCodeAt(0);if(o){var s;if(t.length===1&&r>=55296&&r<=56319){s=lookahead().charCodeAt(0);if(s>=56320&&s<=57343){l++;return createValue("symbol",(r-55296)*1024+s-56320+65536,l-2,l)}}}return createValue("symbol",r,l-1,l)}function createDisjunction(e,t,r){return addRaw({type:"disjunction",body:e,range:[t,r]})}function createDot(){return addRaw({type:"dot",range:[l-1,l]})}function createCharacterClassEscape(e){return addRaw({type:"characterClassEscape",value:e,range:[l-2,l]})}function createReference(e){return addRaw({type:"reference",matchIndex:parseInt(e,10),range:[l-1-e.length,l]})}function createNamedReference(e){return addRaw({type:"reference",name:e,range:[e.range[0]-3,l]})}function createGroup(e,t,r,s){return addRaw({type:"group",behavior:e,body:t,range:[r,s]})}function createQuantifier(e,t,r,s){if(s==null){r=l-1;s=l}return addRaw({type:"quantifier",min:e,max:t,greedy:true,body:null,range:[r,s]})}function createAlternative(e,t,r){return addRaw({type:"alternative",body:e,range:[t,r]})}function createCharacterClass(e,t,r,s){return addRaw({type:"characterClass",body:e,negative:t,range:[r,s]})}function createClassRange(e,t,r,s){if(e.codePoint>t.codePoint){bail("invalid range in character class",e.raw+"-"+t.raw,r,s)}return addRaw({type:"characterClassRange",min:e,max:t,range:[r,s]})}function flattenBody(e){if(e.type==="alternative"){return e.body}else{return[e]}}function isEmpty(e){return e.type==="empty"}function incr(t){t=t||1;var r=e.substring(l,l+t);l+=t||1;return r}function skip(e){if(!match(e)){bail("character",e)}}function match(t){if(e.indexOf(t,l)===l){return incr(t.length)}}function lookahead(){return e[l]}function current(t){return e.indexOf(t,l)===l}function next(t){return e[l+1]===t}function matchReg(t){var r=e.substring(l);var s=r.match(t);if(s){s.range=[];s.range[0]=l;incr(s[0].length);s.range[1]=l}return s}function parseDisjunction(){var e=[],t=l;e.push(parseAlternative());while(match("|")){e.push(parseAlternative())}if(e.length===1){return e[0]}return createDisjunction(e,t,l)}function parseAlternative(){var e=[],t=l;var r;while(r=parseTerm()){e.push(r)}if(e.length===1){return e[0]}return createAlternative(e,t,l)}function parseTerm(){if(l>=e.length||current("|")||current(")")){return null}var t=parseAnchor();if(t){return t}var r=parseAtomAndExtendedAtom();if(!r){bail("Expected atom")}var s=parseQuantifier()||false;if(s){s.body=flattenBody(r);updateRawStart(s,r.range[0]);return s}return r}function parseGroup(e,t,r,s){var a=null,n=l;if(match(e)){a=t}else if(match(r)){a=s}else{return false}return finishGroup(a,n)}function finishGroup(e,t){var r=parseDisjunction();if(!r){bail("Expected disjunction")}skip(")");var s=createGroup(e,flattenBody(r),t,l);if(e=="normal"){if(i){n++}}return s}function parseAnchor(){var e,t=l;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var e,t=l;var r;var s,a;if(match("*")){r=createQuantifier(0)}else if(match("+")){r=createQuantifier(1)}else if(match("?")){r=createQuantifier(0,1)}else if(e=matchReg(/^\{([0-9]+)\}/)){s=parseInt(e[1],10);r=createQuantifier(s,s,e.range[0],e.range[1])}else if(e=matchReg(/^\{([0-9]+),\}/)){s=parseInt(e[1],10);r=createQuantifier(s,undefined,e.range[0],e.range[1])}else if(e=matchReg(/^\{([0-9]+),([0-9]+)\}/)){s=parseInt(e[1],10);a=parseInt(e[2],10);if(s>a){bail("numbers out of order in {} quantifier","",t,l)}r=createQuantifier(s,a,e.range[0],e.range[1])}if(r){if(match("?")){r.greedy=false;r.range[1]+=1}}return r}function parseAtomAndExtendedAtom(){var e;if(e=matchReg(/^[^^$\\.*+?()[\]{}|]/)){return createCharacter(e)}else if(!o&&(e=matchReg(/^(?:]|})/))){return createCharacter(e)}else if(match(".")){return createDot()}else if(match("\\")){e=parseAtomEscape();if(!e){if(!o&&lookahead()=="c"){return createValue("symbol",92,l-1,l)}bail("atomEscape")}return e}else if(e=parseCharacterClass()){return e}else if(s.lookbehind&&(e=parseGroup("(?<=","lookbehind","(?");var r=finishGroup("normal",t.range[0]-3);r.name=t;return r}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(e){if(o){var t,r;if(e.kind=="unicodeEscape"&&(t=e.codePoint)>=55296&&t<=56319&¤t("\\")&&next("u")){var s=l;l++;var a=parseClassEscape();if(a.kind=="unicodeEscape"&&(r=a.codePoint)>=56320&&r<=57343){e.range[1]=a.range[1];e.codePoint=(t-55296)*1024+r-56320+65536;e.type="value";e.kind="unicodeCodePointEscape";addRaw(e)}else{l=s}}}return e}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(e){var t,r=l;t=parseDecimalEscape()||parseNamedReference();if(t){return t}if(e){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){bail("\\B not possible inside of CharacterClass","",r)}else if(!o&&(t=matchReg(/^c([0-9])/))){return createEscaped("controlLetter",t[1]+16,t[1],2)}if(match("-")&&o){return createEscaped("singleEscape",45,"\\-")}}t=parseCharacterEscape();return t}function parseDecimalEscape(){var e,t;if(e=matchReg(/^(?!0)\d+/)){t=e[0];var r=parseInt(e[0],10);if(r<=n){return createReference(e[0])}else{a.push(r);incr(-e[0].length);if(e=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(e[0],8),e[0],1)}else{e=createCharacter(matchReg(/^[89]/));return updateRawStart(e,e.range[0]-1)}}}else if(e=matchReg(/^[0-7]{1,3}/)){t=e[0];if(/^0{1,3}$/.test(t)){return createEscaped("null",0,"0",t.length+1)}else{return createEscaped("octal",parseInt(t,8),t,1)}}else if(e=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(e[0])}return false}function parseNamedReference(){if(s.namedGroups&&matchReg(/^k<(?=.*?>)/)){var e=parseIdentifier();skip(">");return createNamedReference(e)}}function parseRegExpUnicodeEscapeSequence(){var e;if(e=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(e[1],16),e[1],2))}else if(o&&(e=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(e[1],16),e[1],4)}}function parseCharacterEscape(){var e;var t=l;if(e=matchReg(/^[fnrtv]/)){var r=0;switch(e[0]){case"t":r=9;break;case"n":r=10;break;case"v":r=11;break;case"f":r=12;break;case"r":r=13;break}return createEscaped("singleEscape",r,"\\"+e[0])}else if(e=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",e[1].charCodeAt(0)%32,e[1],2)}else if(e=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(e[1],16),e[1],2)}else if(e=parseRegExpUnicodeEscapeSequence()){if(!e||e.codePoint>1114111){bail("Invalid escape sequence",null,t,l)}return e}else if(s.unicodePropertyEscape&&o&&(e=matchReg(/^([pP])\{([^\}]+)\}/))){return addRaw({type:"unicodePropertyEscape",negative:e[1]==="P",value:e[2],range:[e.range[0]-1,e.range[1]],raw:e[0]})}else{return parseIdentityEscape()}}function parseIdentifierAtom(r){var s=lookahead();var a=l;if(s==="\\"){incr();var n=parseRegExpUnicodeEscapeSequence();if(!n||!r(n.codePoint)){bail("Invalid escape sequence",null,a,l)}return t(n.codePoint)}var i=s.charCodeAt(0);if(i>=55296&&i<=56319){s+=e[l+1];var o=s.charCodeAt(1);if(o>=56320&&o<=57343){i=(i-55296)*1024+o-56320+65536}}if(!r(i))return;incr();if(i>65535)incr();return s}function parseIdentifier(){var e=l;var t=parseIdentifierAtom(isIdentifierStart);if(!t){bail("Invalid identifier")}var r;while(r=parseIdentifierAtom(isIdentifierPart)){t+=r}return addRaw({type:"identifier",value:t,range:[e,l]})}function isIdentifierStart(e){var r=/[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=128&&r.test(t(e))}function isIdentifierPart(e){var r=/[0-9_\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD30-\uDD39\uDF46-\uDF50]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC66-\uDC6F\uDC7F-\uDC82\uDCB0-\uDCBA\uDCF0-\uDCF9\uDD00-\uDD02\uDD27-\uDD34\uDD36-\uDD3F\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDD0-\uDDD9\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC50-\uDC59\uDC5E\uDCB0-\uDCC3\uDCD0-\uDCD9\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDE50-\uDE59\uDEAB-\uDEB7\uDEC0-\uDEC9\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC2C-\uDC3A\uDCE0-\uDCE9\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC50-\uDC59\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD50-\uDD59\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDDA0-\uDDA9\uDEF3-\uDEF6]|\uD81A[\uDE60-\uDE69\uDEF0-\uDEF4\uDF30-\uDF36\uDF50-\uDF59]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A\uDD50-\uDD59]|\uDB40[\uDD00-\uDDEF]/;return isIdentifierStart(e)||e>=48&&e<=57||e>=128&&r.test(t(e))}function parseIdentityEscape(){var e;var t=lookahead();if(o&&/[\^\$\.\*\+\?\(\)\\\[\]\{\}\|\/]/.test(t)||!o&&t!=="c"){if(t==="k"&&s.lookbehind){return null}e=incr();return createEscaped("identifier",e.charCodeAt(0),e,1)}return null}function parseCharacterClass(){var e,t=l;if(e=matchReg(/^\[\^/)){e=parseClassRanges();skip("]");return createCharacterClass(e,true,t,l)}else if(match("[")){e=parseClassRanges();skip("]");return createCharacterClass(e,false,t,l)}return null}function parseClassRanges(){var e;if(current("]")){return[]}else{e=parseNonemptyClassRanges();if(!e){bail("nonEmptyClassRanges")}return e}}function parseHelperClassRanges(e){var t,r,s;if(current("-")&&!next("]")){skip("-");s=parseClassAtom();if(!s){bail("classAtom")}r=l;var a=parseClassRanges();if(!a){bail("classRanges")}t=e.range[0];if(a.type==="empty"){return[createClassRange(e,s,t,r)]}return[createClassRange(e,s,t,r)].concat(a)}s=parseNonemptyClassRangesNoDash();if(!s){bail("nonEmptyClassRangesNoDash")}return[e].concat(s)}function parseNonemptyClassRanges(){var e=parseClassAtom();if(!e){bail("classAtom")}if(current("]")){return[e]}return parseHelperClassRanges(e)}function parseNonemptyClassRangesNoDash(){var e=parseClassAtom();if(!e){bail("classAtom")}if(current("]")){return e}return parseHelperClassRanges(e)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var e;if(e=matchReg(/^[^\\\]-]/)){return createCharacter(e[0])}else if(match("\\")){e=parseClassEscape();if(!e){bail("classEscape")}return parseUnicodeSurrogatePairEscape(e)}}function bail(t,r,s,a){s=s==null?l:s;a=a==null?s:a;var n=Math.max(0,s-10);var i=Math.min(a+10,e.length);var o=" "+e.substring(n,i);var c=" "+new Array(s-n+1).join(" ")+"^";throw SyntaxError(t+" at position "+s+(r?": "+r:"")+"\n"+o+"\n"+c)}var a=[];var n=0;var i=true;var o=(r||"").indexOf("u")!==-1;var l=0;e=String(e);if(e===""){e="(?:)"}var c=parseDisjunction();if(c.range[1]!==e.length){bail("Could not parse entire input - got stuck","",c.range[1])}for(var p=0;p{var t=e.exports=function(e){return new Traverse(e)};function Traverse(e){this.value=e}Traverse.prototype.get=function(e){var t=this.value;for(var r=0;r{e.exports=new Set(["General_Category","Script","Script_Extensions","Alphabetic","Any","ASCII","ASCII_Hex_Digit","Assigned","Bidi_Control","Bidi_Mirrored","Case_Ignorable","Cased","Changes_When_Casefolded","Changes_When_Casemapped","Changes_When_Lowercased","Changes_When_NFKC_Casefolded","Changes_When_Titlecased","Changes_When_Uppercased","Dash","Default_Ignorable_Code_Point","Deprecated","Diacritic","Emoji","Emoji_Component","Emoji_Modifier","Emoji_Modifier_Base","Emoji_Presentation","Extended_Pictographic","Extender","Grapheme_Base","Grapheme_Extend","Hex_Digit","ID_Continue","ID_Start","Ideographic","IDS_Binary_Operator","IDS_Trinary_Operator","Join_Control","Logical_Order_Exception","Lowercase","Math","Noncharacter_Code_Point","Pattern_Syntax","Pattern_White_Space","Quotation_Mark","Radical","Regional_Indicator","Sentence_Terminal","Soft_Dotted","Terminal_Punctuation","Unified_Ideograph","Uppercase","Variation_Selector","White_Space","XID_Continue","XID_Start"])},3042:(e,t,r)=>{"use strict";const s=r(7894);const a=r(864);const matchProperty=function(e){if(s.has(e)){return e}if(a.has(e)){return a.get(e)}throw new Error(`Unknown property: ${e}`)};e.exports=matchProperty},4703:e=>{e.exports=new Map([["General_Category",new Map([["C","Other"],["Cc","Control"],["cntrl","Control"],["Cf","Format"],["Cn","Unassigned"],["Co","Private_Use"],["Cs","Surrogate"],["L","Letter"],["LC","Cased_Letter"],["Ll","Lowercase_Letter"],["Lm","Modifier_Letter"],["Lo","Other_Letter"],["Lt","Titlecase_Letter"],["Lu","Uppercase_Letter"],["M","Mark"],["Combining_Mark","Mark"],["Mc","Spacing_Mark"],["Me","Enclosing_Mark"],["Mn","Nonspacing_Mark"],["N","Number"],["Nd","Decimal_Number"],["digit","Decimal_Number"],["Nl","Letter_Number"],["No","Other_Number"],["P","Punctuation"],["punct","Punctuation"],["Pc","Connector_Punctuation"],["Pd","Dash_Punctuation"],["Pe","Close_Punctuation"],["Pf","Final_Punctuation"],["Pi","Initial_Punctuation"],["Po","Other_Punctuation"],["Ps","Open_Punctuation"],["S","Symbol"],["Sc","Currency_Symbol"],["Sk","Modifier_Symbol"],["Sm","Math_Symbol"],["So","Other_Symbol"],["Z","Separator"],["Zl","Line_Separator"],["Zp","Paragraph_Separator"],["Zs","Space_Separator"],["Other","Other"],["Control","Control"],["Format","Format"],["Unassigned","Unassigned"],["Private_Use","Private_Use"],["Surrogate","Surrogate"],["Letter","Letter"],["Cased_Letter","Cased_Letter"],["Lowercase_Letter","Lowercase_Letter"],["Modifier_Letter","Modifier_Letter"],["Other_Letter","Other_Letter"],["Titlecase_Letter","Titlecase_Letter"],["Uppercase_Letter","Uppercase_Letter"],["Mark","Mark"],["Spacing_Mark","Spacing_Mark"],["Enclosing_Mark","Enclosing_Mark"],["Nonspacing_Mark","Nonspacing_Mark"],["Number","Number"],["Decimal_Number","Decimal_Number"],["Letter_Number","Letter_Number"],["Other_Number","Other_Number"],["Punctuation","Punctuation"],["Connector_Punctuation","Connector_Punctuation"],["Dash_Punctuation","Dash_Punctuation"],["Close_Punctuation","Close_Punctuation"],["Final_Punctuation","Final_Punctuation"],["Initial_Punctuation","Initial_Punctuation"],["Other_Punctuation","Other_Punctuation"],["Open_Punctuation","Open_Punctuation"],["Symbol","Symbol"],["Currency_Symbol","Currency_Symbol"],["Modifier_Symbol","Modifier_Symbol"],["Math_Symbol","Math_Symbol"],["Other_Symbol","Other_Symbol"],["Separator","Separator"],["Line_Separator","Line_Separator"],["Paragraph_Separator","Paragraph_Separator"],["Space_Separator","Space_Separator"]])],["Script",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","Ahom"],["Arab","Arabic"],["Armi","Imperial_Aramaic"],["Armn","Armenian"],["Avst","Avestan"],["Bali","Balinese"],["Bamu","Bamum"],["Bass","Bassa_Vah"],["Batk","Batak"],["Beng","Bengali"],["Bhks","Bhaiksuki"],["Bopo","Bopomofo"],["Brah","Brahmi"],["Brai","Braille"],["Bugi","Buginese"],["Buhd","Buhid"],["Cakm","Chakma"],["Cans","Canadian_Aboriginal"],["Cari","Carian"],["Cham","Cham"],["Cher","Cherokee"],["Chrs","Chorasmian"],["Copt","Coptic"],["Qaac","Coptic"],["Cprt","Cypriot"],["Cyrl","Cyrillic"],["Deva","Devanagari"],["Diak","Dives_Akuru"],["Dogr","Dogra"],["Dsrt","Deseret"],["Dupl","Duployan"],["Egyp","Egyptian_Hieroglyphs"],["Elba","Elbasan"],["Elym","Elymaic"],["Ethi","Ethiopic"],["Geor","Georgian"],["Glag","Glagolitic"],["Gong","Gunjala_Gondi"],["Gonm","Masaram_Gondi"],["Goth","Gothic"],["Gran","Grantha"],["Grek","Greek"],["Gujr","Gujarati"],["Guru","Gurmukhi"],["Hang","Hangul"],["Hani","Han"],["Hano","Hanunoo"],["Hatr","Hatran"],["Hebr","Hebrew"],["Hira","Hiragana"],["Hluw","Anatolian_Hieroglyphs"],["Hmng","Pahawh_Hmong"],["Hmnp","Nyiakeng_Puachue_Hmong"],["Hrkt","Katakana_Or_Hiragana"],["Hung","Old_Hungarian"],["Ital","Old_Italic"],["Java","Javanese"],["Kali","Kayah_Li"],["Kana","Katakana"],["Khar","Kharoshthi"],["Khmr","Khmer"],["Khoj","Khojki"],["Kits","Khitan_Small_Script"],["Knda","Kannada"],["Kthi","Kaithi"],["Lana","Tai_Tham"],["Laoo","Lao"],["Latn","Latin"],["Lepc","Lepcha"],["Limb","Limbu"],["Lina","Linear_A"],["Linb","Linear_B"],["Lisu","Lisu"],["Lyci","Lycian"],["Lydi","Lydian"],["Mahj","Mahajani"],["Maka","Makasar"],["Mand","Mandaic"],["Mani","Manichaean"],["Marc","Marchen"],["Medf","Medefaidrin"],["Mend","Mende_Kikakui"],["Merc","Meroitic_Cursive"],["Mero","Meroitic_Hieroglyphs"],["Mlym","Malayalam"],["Modi","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Nand","Nandinagari"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["Palm","Palmyrene"],["Pauc","Pau_Cin_Hau"],["Perm","Old_Permic"],["Phag","Phags_Pa"],["Phli","Inscriptional_Pahlavi"],["Phlp","Psalter_Pahlavi"],["Phnx","Phoenician"],["Plrd","Miao"],["Prti","Inscriptional_Parthian"],["Rjng","Rejang"],["Rohg","Hanifi_Rohingya"],["Runr","Runic"],["Samr","Samaritan"],["Sarb","Old_South_Arabian"],["Saur","Saurashtra"],["Sgnw","SignWriting"],["Shaw","Shavian"],["Shrd","Sharada"],["Sidd","Siddham"],["Sind","Khudawadi"],["Sinh","Sinhala"],["Sogd","Sogdian"],["Sogo","Old_Sogdian"],["Sora","Sora_Sompeng"],["Soyo","Soyombo"],["Sund","Sundanese"],["Sylo","Syloti_Nagri"],["Syrc","Syriac"],["Tagb","Tagbanwa"],["Takr","Takri"],["Tale","Tai_Le"],["Talu","New_Tai_Lue"],["Taml","Tamil"],["Tang","Tangut"],["Tavt","Tai_Viet"],["Telu","Telugu"],["Tfng","Tifinagh"],["Tglg","Tagalog"],["Thaa","Thaana"],["Thai","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Wcho","Wancho"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yezi","Yezidi"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Chorasmian","Chorasmian"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dives_Akuru","Dives_Akuru"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Elymaic","Elymaic"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Nyiakeng_Puachue_Hmong","Nyiakeng_Puachue_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Khitan_Small_Script","Khitan_Small_Script"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Nandinagari","Nandinagari"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Wancho","Wancho"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yezidi","Yezidi"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])],["Script_Extensions",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","Ahom"],["Arab","Arabic"],["Armi","Imperial_Aramaic"],["Armn","Armenian"],["Avst","Avestan"],["Bali","Balinese"],["Bamu","Bamum"],["Bass","Bassa_Vah"],["Batk","Batak"],["Beng","Bengali"],["Bhks","Bhaiksuki"],["Bopo","Bopomofo"],["Brah","Brahmi"],["Brai","Braille"],["Bugi","Buginese"],["Buhd","Buhid"],["Cakm","Chakma"],["Cans","Canadian_Aboriginal"],["Cari","Carian"],["Cham","Cham"],["Cher","Cherokee"],["Chrs","Chorasmian"],["Copt","Coptic"],["Qaac","Coptic"],["Cprt","Cypriot"],["Cyrl","Cyrillic"],["Deva","Devanagari"],["Diak","Dives_Akuru"],["Dogr","Dogra"],["Dsrt","Deseret"],["Dupl","Duployan"],["Egyp","Egyptian_Hieroglyphs"],["Elba","Elbasan"],["Elym","Elymaic"],["Ethi","Ethiopic"],["Geor","Georgian"],["Glag","Glagolitic"],["Gong","Gunjala_Gondi"],["Gonm","Masaram_Gondi"],["Goth","Gothic"],["Gran","Grantha"],["Grek","Greek"],["Gujr","Gujarati"],["Guru","Gurmukhi"],["Hang","Hangul"],["Hani","Han"],["Hano","Hanunoo"],["Hatr","Hatran"],["Hebr","Hebrew"],["Hira","Hiragana"],["Hluw","Anatolian_Hieroglyphs"],["Hmng","Pahawh_Hmong"],["Hmnp","Nyiakeng_Puachue_Hmong"],["Hrkt","Katakana_Or_Hiragana"],["Hung","Old_Hungarian"],["Ital","Old_Italic"],["Java","Javanese"],["Kali","Kayah_Li"],["Kana","Katakana"],["Khar","Kharoshthi"],["Khmr","Khmer"],["Khoj","Khojki"],["Kits","Khitan_Small_Script"],["Knda","Kannada"],["Kthi","Kaithi"],["Lana","Tai_Tham"],["Laoo","Lao"],["Latn","Latin"],["Lepc","Lepcha"],["Limb","Limbu"],["Lina","Linear_A"],["Linb","Linear_B"],["Lisu","Lisu"],["Lyci","Lycian"],["Lydi","Lydian"],["Mahj","Mahajani"],["Maka","Makasar"],["Mand","Mandaic"],["Mani","Manichaean"],["Marc","Marchen"],["Medf","Medefaidrin"],["Mend","Mende_Kikakui"],["Merc","Meroitic_Cursive"],["Mero","Meroitic_Hieroglyphs"],["Mlym","Malayalam"],["Modi","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Nand","Nandinagari"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["Palm","Palmyrene"],["Pauc","Pau_Cin_Hau"],["Perm","Old_Permic"],["Phag","Phags_Pa"],["Phli","Inscriptional_Pahlavi"],["Phlp","Psalter_Pahlavi"],["Phnx","Phoenician"],["Plrd","Miao"],["Prti","Inscriptional_Parthian"],["Rjng","Rejang"],["Rohg","Hanifi_Rohingya"],["Runr","Runic"],["Samr","Samaritan"],["Sarb","Old_South_Arabian"],["Saur","Saurashtra"],["Sgnw","SignWriting"],["Shaw","Shavian"],["Shrd","Sharada"],["Sidd","Siddham"],["Sind","Khudawadi"],["Sinh","Sinhala"],["Sogd","Sogdian"],["Sogo","Old_Sogdian"],["Sora","Sora_Sompeng"],["Soyo","Soyombo"],["Sund","Sundanese"],["Sylo","Syloti_Nagri"],["Syrc","Syriac"],["Tagb","Tagbanwa"],["Takr","Takri"],["Tale","Tai_Le"],["Talu","New_Tai_Lue"],["Taml","Tamil"],["Tang","Tangut"],["Tavt","Tai_Viet"],["Telu","Telugu"],["Tfng","Tifinagh"],["Tglg","Tagalog"],["Thaa","Thaana"],["Thai","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Wcho","Wancho"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yezi","Yezidi"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Chorasmian","Chorasmian"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dives_Akuru","Dives_Akuru"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Elymaic","Elymaic"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Nyiakeng_Puachue_Hmong","Nyiakeng_Puachue_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Khitan_Small_Script","Khitan_Small_Script"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Nandinagari","Nandinagari"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Wancho","Wancho"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yezidi","Yezidi"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])]])},1317:(e,t,r)=>{"use strict";const s=r(4703);const matchPropertyValue=function(e,t){const r=s.get(e);if(!r){throw new Error(`Unknown property \`${e}\`.`)}const a=r.get(t);if(a){return a}throw new Error(`Unknown value \`${t}\` for property \`${e}\`.`)};e.exports=matchPropertyValue},864:e=>{e.exports=new Map([["scx","Script_Extensions"],["sc","Script"],["gc","General_Category"],["AHex","ASCII_Hex_Digit"],["Alpha","Alphabetic"],["Bidi_C","Bidi_Control"],["Bidi_M","Bidi_Mirrored"],["Cased","Cased"],["CI","Case_Ignorable"],["CWCF","Changes_When_Casefolded"],["CWCM","Changes_When_Casemapped"],["CWKCF","Changes_When_NFKC_Casefolded"],["CWL","Changes_When_Lowercased"],["CWT","Changes_When_Titlecased"],["CWU","Changes_When_Uppercased"],["Dash","Dash"],["Dep","Deprecated"],["DI","Default_Ignorable_Code_Point"],["Dia","Diacritic"],["Ext","Extender"],["Gr_Base","Grapheme_Base"],["Gr_Ext","Grapheme_Extend"],["Hex","Hex_Digit"],["IDC","ID_Continue"],["Ideo","Ideographic"],["IDS","ID_Start"],["IDSB","IDS_Binary_Operator"],["IDST","IDS_Trinary_Operator"],["Join_C","Join_Control"],["LOE","Logical_Order_Exception"],["Lower","Lowercase"],["Math","Math"],["NChar","Noncharacter_Code_Point"],["Pat_Syn","Pattern_Syntax"],["Pat_WS","Pattern_White_Space"],["QMark","Quotation_Mark"],["Radical","Radical"],["RI","Regional_Indicator"],["SD","Soft_Dotted"],["STerm","Sentence_Terminal"],["Term","Terminal_Punctuation"],["UIdeo","Unified_Ideograph"],["Upper","Uppercase"],["VS","Variation_Selector"],["WSpace","White_Space"],["space","White_Space"],["XIDC","XID_Continue"],["XIDS","XID_Start"]])},3812:(e,t,r)=>{function eslintParser(){return r(8973)}function pluginProposalClassProperties(){return r(7361)}function pluginProposalExportNamespaceFrom(){return r(9579)}function pluginProposalNumericSeparator(){return r(7300)}function pluginProposalObjectRestSpread(){return r(6309)}function pluginSyntaxBigint(){return r(6762)}function pluginSyntaxDynamicImport(){return r(5163)}function pluginSyntaxJsx(){return r(8926)}function pluginTransformDefine(){return r(9065)}function pluginTransformModulesCommonjs(){return r(6186)}function pluginTransformReactRemovePropTypes(){return r(6197)}function pluginTransformRuntime(){return r(4722)}function presetEnv(){return r(9290)}function presetReact(){return r(8277)}function presetTypescript(){return r(1068)}e.exports={eslintParser:eslintParser,pluginProposalClassProperties:pluginProposalClassProperties,pluginProposalExportNamespaceFrom:pluginProposalExportNamespaceFrom,pluginProposalNumericSeparator:pluginProposalNumericSeparator,pluginProposalObjectRestSpread:pluginProposalObjectRestSpread,pluginSyntaxBigint:pluginSyntaxBigint,pluginSyntaxDynamicImport:pluginSyntaxDynamicImport,pluginSyntaxJsx:pluginSyntaxJsx,pluginTransformDefine:pluginTransformDefine,pluginTransformModulesCommonjs:pluginTransformModulesCommonjs,pluginTransformReactRemovePropTypes:pluginTransformReactRemovePropTypes,pluginTransformRuntime:pluginTransformRuntime,presetEnv:presetEnv,presetReact:presetReact,presetTypescript:presetTypescript}},2272:(e,t,r)=>{e.exports=r(4817)},9302:(e,t,r)=>{e.exports=r(8392)},7363:(e,t,r)=>{e.exports=r(5224)},3574:(e,t,r)=>{e.exports=r(4374)},5884:(e,t,r)=>{e.exports=r(7867)},6038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getInclusionReasons=getInclusionReasons;var s=r(7849);var a=r(1610);var n=r(240);function getInclusionReasons(e,t,r){const i=r[e]||{};return Object.keys(t).reduce(((e,r)=>{const o=(0,n.getLowestImplementedVersion)(i,r);const l=t[r];if(!o){e[r]=(0,a.prettifyVersion)(l)}else{const t=(0,n.isUnreleasedVersion)(o,r);const i=(0,n.isUnreleasedVersion)(l,r);if(!i&&(t||s.lt(l.toString(),(0,n.semverify)(o)))){e[r]=(0,a.prettifyVersion)(l)}}return e}),{})}},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.targetsSupported=targetsSupported;t.isRequired=isRequired;t["default"]=filterItems;var s=r(7849);var a=r(5884);var n=r(240);function targetsSupported(e,t){const r=Object.keys(e);if(r.length===0){return false}const a=r.filter((r=>{const a=(0,n.getLowestImplementedVersion)(t,r);if(!a){return true}const i=e[r];if((0,n.isUnreleasedVersion)(i,r)){return false}if((0,n.isUnreleasedVersion)(a,r)){return true}if(!s.valid(i.toString())){throw new Error(`Invalid version passed for target "${r}": "${i}". `+"Versions must be in semver format (major.minor.patch)")}return s.gt((0,n.semverify)(a),i.toString())}));return a.length===0}function isRequired(e,t,{compatData:r=a,includes:s,excludes:n}={}){if(n!=null&&n.has(e))return false;if(s!=null&&s.has(e))return true;return!targetsSupported(t,r[e])}function filterItems(e,t,r,s,a,n,i){const o=new Set;const l={compatData:e,includes:t,excludes:r};for(const t in e){if(isRequired(t,s,l)){o.add(t)}else if(i){const e=i.get(t);if(e){o.add(e)}}}if(a){a.forEach((e=>!r.has(e)&&o.add(e)))}if(n){n.forEach((e=>!t.has(e)&&o.delete(e)))}return o}},4413:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isBrowsersQueryValid=isBrowsersQueryValid;t["default"]=getTargets;Object.defineProperty(t,"unreleasedLabels",{enumerable:true,get:function(){return o.unreleasedLabels}});Object.defineProperty(t,"TargetNames",{enumerable:true,get:function(){return l.TargetNames}});Object.defineProperty(t,"prettifyTargets",{enumerable:true,get:function(){return c.prettifyTargets}});Object.defineProperty(t,"getInclusionReasons",{enumerable:true,get:function(){return p.getInclusionReasons}});Object.defineProperty(t,"filterItems",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"isRequired",{enumerable:true,get:function(){return u.isRequired}});var s=r(4907);var a=r(7347);var n=r(9302);var i=r(240);var o=r(1915);var l=r(1888);var c=r(1610);var p=r(6038);var u=r(4486);const d=n["es6.module"];const f=new a.OptionValidator("@babel/helper-compilation-targets");function validateTargetNames(e){const t=Object.keys(l.TargetNames);for(const r of Object.keys(e)){if(!(r in l.TargetNames)){throw new Error(f.formatMessage(`'${r}' is not a valid target\n- Did you mean '${(0,a.findSuggestion)(r,t)}'?`))}}return e}function isBrowsersQueryValid(e){return typeof e==="string"||Array.isArray(e)&&e.every((e=>typeof e==="string"))}function validateBrowsers(e){f.invariant(e===undefined||isBrowsersQueryValid(e),`'${String(e)}' is not a valid browserslist query`);return e}function getLowestVersions(e){return e.reduce(((e,t)=>{const[r,s]=t.split(" ");const a=o.browserNameMap[r];if(!a){return e}try{const t=s.split("-")[0].toLowerCase();const n=(0,i.isUnreleasedVersion)(t,r);if(!e[a]){e[a]=n?t:(0,i.semverify)(t);return e}const o=e[a];const l=(0,i.isUnreleasedVersion)(o,r);if(l&&n){e[a]=(0,i.getLowestUnreleased)(o,t,r)}else if(l){e[a]=(0,i.semverify)(t)}else if(!l&&!n){const r=(0,i.semverify)(t);e[a]=(0,i.semverMin)(o,r)}}catch(e){}return e}),{})}function outputDecimalWarning(e){if(!e.length){return}console.warn("Warning, the following targets are using a decimal version:\n");e.forEach((({target:e,value:t})=>console.warn(` ${e}: ${t}`)));console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`)}function semverifyTarget(e,t){try{return(0,i.semverify)(t)}catch(r){throw new Error(f.formatMessage(`'${t}' is not a valid value for 'targets.${e}'.`))}}const m={__default(e,t){const r=(0,i.isUnreleasedVersion)(t,e)?t.toLowerCase():semverifyTarget(e,t);return[e,r]},node(e,t){const r=t===true||t==="current"?process.versions.node:semverifyTarget(e,t);return[e,r]}};function generateTargets(e){const t=Object.assign({},e);delete t.esmodules;delete t.browsers;return t}function resolveTargets(e){const t=s(e,{mobileToDesktop:true});return getLowestVersions(t)}function getTargets(e={},t={}){var r;let{browsers:a,esmodules:n}=e;const{configPath:o="."}=t;validateBrowsers(a);const l=generateTargets(e);let c=validateTargetNames(l);const p=!!a;const u=p||Object.keys(c).length>0;const f=!t.ignoreBrowserslistConfig&&!u;if(!a&&f){a=s.loadConfig({config:t.configFile,path:o,env:t.browserslistEnv});if(a==null){{a=[]}}}if(n&&(n!=="intersect"||!((r=a)!=null&&r.length))){a=Object.keys(d).map((e=>`${e} >= ${d[e]}`)).join(", ");n=false}if(a){const e=resolveTargets(a);if(n==="intersect"){for(const t of Object.keys(e)){const r=e[t];if(d[t]){e[t]=(0,i.getHighestUnreleased)(r,(0,i.semverify)(d[t]),t)}else{delete e[t]}}}c=Object.assign(e,c)}const h={};const y=[];for(const e of Object.keys(c).sort()){var g;const t=c[e];if(typeof t==="number"&&t%1!==0){y.push({target:e,value:t})}const r=(g=m[e])!=null?g:m.__default;const[s,a]=r(e,t);if(a){h[s]=a}}outputDecimalWarning(y);return h}},1888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TargetNames=void 0;const r={node:"node",chrome:"chrome",opera:"opera",edge:"edge",firefox:"firefox",safari:"safari",ie:"ie",ios:"ios",android:"android",electron:"electron",samsung:"samsung",rhino:"rhino"};t.TargetNames=r},1610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.prettifyVersion=prettifyVersion;t.prettifyTargets=prettifyTargets;var s=r(7849);var a=r(1915);function prettifyVersion(e){if(typeof e!=="string"){return e}const t=[s.major(e)];const r=s.minor(e);const a=s.patch(e);if(r||a){t.push(r)}if(a){t.push(a)}return t.join(".")}function prettifyTargets(e){return Object.keys(e).reduce(((t,r)=>{let s=e[r];const n=a.unreleasedLabels[r];if(typeof s==="string"&&n!==s){s=prettifyVersion(s)}t[r]=s;return t}),{})}},1915:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.browserNameMap=t.unreleasedLabels=void 0;const r={safari:"tp"};t.unreleasedLabels=r;const s={and_chr:"chrome",and_ff:"firefox",android:"android",chrome:"chrome",edge:"edge",firefox:"firefox",ie:"ie",ie_mob:"ie",ios_saf:"ios",node:"node",op_mob:"opera",opera:"opera",safari:"safari",samsung:"samsung"};t.browserNameMap=s},240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.semverMin=semverMin;t.semverify=semverify;t.isUnreleasedVersion=isUnreleasedVersion;t.getLowestUnreleased=getLowestUnreleased;t.getHighestUnreleased=getHighestUnreleased;t.getLowestImplementedVersion=getLowestImplementedVersion;var s=r(7849);var a=r(7347);var n=r(1915);const i=/^(\d+|\d+.\d+)$/;const o=new a.OptionValidator("@babel/helper-compilation-targets");function semverMin(e,t){return e&&s.lt(e,t)?e:t}function semverify(e){if(typeof e==="string"&&s.valid(e)){return e}o.invariant(typeof e==="number"||typeof e==="string"&&i.test(e),`'${e}' is not a valid version`);const t=e.toString().split(".");while(t.length<3){t.push("0")}return t.join(".")}function isUnreleasedVersion(e,t){const r=n.unreleasedLabels[t];return!!r&&r===e.toString().toLowerCase()}function getLowestUnreleased(e,t,r){const s=n.unreleasedLabels[r];const a=[e,t].some((e=>e===s));if(a){return e===a?t:e||t}return semverMin(e,t)}function getHighestUnreleased(e,t,r){return getLowestUnreleased(e,t,r)===e?t:e}function getLowestImplementedVersion(e,t){const r=e[t];if(!r&&t==="android"){return e.chrome}return r}},5789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(8622);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var a=_interopNamespace(s);function willPathCastToBoolean(e){const t=e;const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}class AssignmentMemoiser{constructor(){this._map=void 0;this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e);const{value:r}=t;t.count--;if(t.count===0){return a.assignmentExpression("=",r,e)}return r}set(e,t,r){return this._map.set(e,{count:r,value:t})}}function toNonOptional(e,t){const{node:r}=e;if(a.isOptionalMemberExpression(r)){return a.memberExpression(t,r.property,r.computed)}if(e.isOptionalCallExpression()){const r=e.get("callee");if(e.node.optional&&r.isOptionalMemberExpression()){const{object:s}=r.node;const n=e.scope.maybeGenerateMemoised(s)||s;r.get("object").replaceWith(a.assignmentExpression("=",n,s));return a.callExpression(a.memberExpression(t,a.identifier("call")),[n,...e.node.arguments])}return a.callExpression(t,e.node.arguments)}return e.node}function isInDetachedTree(e){while(e){if(e.isProgram())break;const{parentPath:t,container:r,listKey:s}=e;const a=t.node;if(s){if(r!==a[s])return true}else{if(r!==a)return true}e=t}return false}const n={memoise(){},handle(e,t){const{node:r,parent:s,parentPath:n,scope:i}=e;if(e.isOptionalMemberExpression()){if(isInDetachedTree(e))return;const o=e.find((({node:t,parent:r})=>{if(a.isOptionalMemberExpression(r)){return r.optional||r.object!==t}if(a.isOptionalCallExpression(r)){return t!==e.node&&r.optional||r.callee!==t}return true}));if(i.path.isPattern()){o.replaceWith(a.callExpression(a.arrowFunctionExpression([],o.node),[]));return}const l=willPathCastToBoolean(o);const c=o.parentPath;if(c.isUpdateExpression({argument:r})||c.isAssignmentExpression({left:r})){throw e.buildCodeFrameError(`can't handle assignment`)}const p=c.isUnaryExpression({operator:"delete"});if(p&&o.isOptionalMemberExpression()&&o.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let u=e;for(;;){if(u.isOptionalMemberExpression()){if(u.node.optional)break;u=u.get("object");continue}else if(u.isOptionalCallExpression()){if(u.node.optional)break;u=u.get("callee");continue}throw new Error(`Internal error: unexpected ${u.node.type}`)}const d=u.isOptionalMemberExpression()?"object":"callee";const f=u.node[d];const m=i.maybeGenerateMemoised(f);const h=m!=null?m:f;const y=n.isOptionalCallExpression({callee:r});const isOptionalCall=e=>y;const g=n.isCallExpression({callee:r});u.replaceWith(toNonOptional(u,h));if(isOptionalCall()){if(s.optional){n.replaceWith(this.optionalCall(e,s.arguments))}else{n.replaceWith(this.call(e,s.arguments))}}else if(g){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}let b=e.node;for(let t=e;t!==o;){const e=t.parentPath;if(e===o&&isOptionalCall()&&s.optional){b=e.node;break}b=toNonOptional(e,b);t=e}let x;const v=o.parentPath;if(a.isMemberExpression(b)&&v.isOptionalCallExpression({callee:o.node,optional:true})){const{object:t}=b;x=e.scope.maybeGenerateMemoised(t);if(x){b.object=a.assignmentExpression("=",x,t)}}let E=o;if(p){E=v;b=v.node}const w=m?a.assignmentExpression("=",a.cloneNode(h),a.cloneNode(f)):a.cloneNode(h);if(l){let e;if(t){e=a.binaryExpression("!=",w,a.nullLiteral())}else{e=a.logicalExpression("&&",a.binaryExpression("!==",w,a.nullLiteral()),a.binaryExpression("!==",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.logicalExpression("&&",e,b))}else{let e;if(t){e=a.binaryExpression("==",w,a.nullLiteral())}else{e=a.logicalExpression("||",a.binaryExpression("===",w,a.nullLiteral()),a.binaryExpression("===",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.conditionalExpression(e,p?a.booleanLiteral(true):i.buildUndefinedNode(),b))}if(x){const e=v.node;v.replaceWith(a.optionalCallExpression(a.optionalMemberExpression(e.callee,a.identifier("call"),false,true),[a.cloneNode(x),...e.arguments],false))}return}if(a.isUpdateExpression(s,{argument:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:i}=s;this.memoise(e,2);const o=a.binaryExpression(t[0],a.unaryExpression("+",this.get(e)),a.numericLiteral(1));if(i){n.replaceWith(this.set(e,o))}else{const{scope:t}=e;const s=t.generateUidIdentifierBasedOnNode(r);t.push({id:s});o.left=a.assignmentExpression("=",a.cloneNode(s),o.left);n.replaceWith(a.sequenceExpression([this.set(e,o),a.cloneNode(s)]))}return}if(n.isAssignmentExpression({left:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:r}=n.node;if(t==="="){n.replaceWith(this.set(e,r))}else{const s=t.slice(0,-1);if(a.LOGICAL_OPERATORS.includes(s)){this.memoise(e,1);n.replaceWith(a.logicalExpression(s,this.get(e),this.set(e,r)))}else{this.memoise(e,2);n.replaceWith(this.set(e,a.binaryExpression(s,this.get(e),r)))}}return}if(n.isCallExpression({callee:r})){n.replaceWith(this.call(e,n.node.arguments));return}if(n.isOptionalCallExpression({callee:r})){if(i.path.isPattern()){n.replaceWith(a.callExpression(a.arrowFunctionExpression([],n.node),[]));return}n.replaceWith(this.optionalCall(e,n.node.arguments));return}if(n.isForXStatement({left:r})||n.isObjectProperty({value:r})&&n.parentPath.isObjectPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isObjectProperty({value:s})&&n.parentPath.parentPath.isObjectPattern()||n.isArrayPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isArrayPattern()||n.isRestElement()){e.replaceWith(this.destructureSet(e));return}if(n.isTaggedTemplateExpression()){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}}};function memberExpressionToFunctions(e,t,r){e.traverse(t,Object.assign({},n,r,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},1626:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(558);var a=r(7490);var n=r(5480);var i=r(8304);function matchAffectedArguments(e){const t=e.findIndex((e=>i.types.isSpreadElement(e)));return t>=0&&t!==e.length-1}function shouldTransform(e){let t=e;const r=[];while(t.isOptionalMemberExpression()||t.isOptionalCallExpression()){const{node:e}=t;r.push(e);if(t.isOptionalMemberExpression()){t=n.skipTransparentExprWrappers(t.get("object"))}else if(t.isOptionalCallExpression()){t=n.skipTransparentExprWrappers(t.get("callee"))}}for(let e=0;e{e.assertVersion(7);const t=e.assumption("noDocumentAll");const r=e.assumption("pureGetters");return{name:"bugfix-v8-spread-parameters-in-optional-chaining",visitor:{"OptionalCallExpression|OptionalMemberExpression"(e){if(shouldTransform(e)){a.transform(e,{noDocumentAll:t,pureGetters:r})}}}}}));t["default"]=o},1023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(8304);const a=(0,s.template)(`\n async function wrapper() {\n var ITERATOR_ABRUPT_COMPLETION = false;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY;\n ITERATOR_ABRUPT_COMPLETION = !(STEP_KEY = await ITERATOR_KEY.next()).done;\n ITERATOR_ABRUPT_COMPLETION = false\n ) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (ITERATOR_ABRUPT_COMPLETION && ITERATOR_KEY.return != null) {\n await ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n`);function _default(e,{getAsyncIterator:t}){const{node:r,scope:n,parent:i}=e;const o=n.generateUidIdentifier("step");const l=s.types.memberExpression(o,s.types.identifier("value"));const c=r.left;let p;if(s.types.isIdentifier(c)||s.types.isPattern(c)||s.types.isMemberExpression(c)){p=s.types.expressionStatement(s.types.assignmentExpression("=",c,l))}else if(s.types.isVariableDeclaration(c)){p=s.types.variableDeclaration(c.kind,[s.types.variableDeclarator(c.declarations[0].id,l)])}let u=a({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_ABRUPT_COMPLETION:n.generateUidIdentifier("iteratorAbruptCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:n.generateUidIdentifier("iterator"),GET_ITERATOR:t,OBJECT:r.right,STEP_KEY:s.types.cloneNode(o)});u=u.body.body;const d=s.types.isLabeledStatement(i);const f=u[3].block.body;const m=f[0];if(d){f[0]=s.types.labeledStatement(i.label,m)}return{replaceParent:d,node:u,declar:p,loop:m}}},2271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=r(7120);var n=r(1079);var i=r(8304);var o=r(1023);var l=(0,s.declare)((e=>{e.assertVersion(7);const t={Function(e){e.skip()},YieldExpression({node:e},t){if(!e.delegate)return;const r=t.addHelper("asyncGeneratorDelegate");e.argument=i.types.callExpression(r,[i.types.callExpression(t.addHelper("asyncIterator"),[e.argument]),t.addHelper("awaitAsyncGenerator")])}};const r={Function(e){e.skip()},ForOfStatement(e,{file:t}){const{node:r}=e;if(!r.await)return;const s=(0,o.default)(e,{getAsyncIterator:t.addHelper("asyncIterator")});const{declar:a,loop:n}=s;const l=n.body;e.ensureBlock();if(a){l.body.push(a)}l.body=l.body.concat(r.body.body);i.types.inherits(n,r);i.types.inherits(n.body,r.body);if(s.replaceParent){e.parentPath.replaceWithMultiple(s.node)}else{e.replaceWithMultiple(s.node)}}};const s={Function(e,s){if(!e.node.async)return;e.traverse(r,s);if(!e.node.generator)return;e.traverse(t,s);(0,a.default)(e,{wrapAsync:s.addHelper("wrapAsyncGenerator"),wrapAwait:s.addHelper("awaitAsyncGenerator")})}};return{name:"proposal-async-generator-functions",inherits:n.default,visitor:{Program(e,t){e.traverse(s,t)}}}}));t["default"]=l},7361:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=r(6758);var n=(0,s.declare)(((e,t)=>{e.assertVersion(7);return(0,a.createClassFeaturePlugin)({name:"proposal-class-properties",api:e,feature:a.FEATURES.fields,loose:t.loose,manipulateOptions(e,t){t.plugins.push("classProperties","classPrivateProperties")}})}));t["default"]=n},5557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=r(8142);var n=r(6758);function generateUid(e,t){const r="";let s;let a=1;do{s=e._generateUid(r,a);a++}while(t.has(s));return s}var i=(0,s.declare)((({types:e,template:t,assertVersion:r})=>{r("^7.12.0");return{name:"proposal-class-static-block",inherits:a.default,pre(){(0,n.enableFeature)(this.file,n.FEATURES.staticBlocks,false)},visitor:{ClassBody(r){const{scope:s}=r;const a=new Set;const n=r.get("body");for(const e of n){if(e.isPrivate()){a.add(e.get("key.id").node.name)}}for(const r of n){if(!r.isStaticBlock())continue;const n=generateUid(s,a);a.add(n);const i=e.privateName(e.identifier(n));r.replaceWith(e.classPrivateProperty(i,t.expression.ast`(() => { ${r.node.body} })()`,[],true))}}}}}));t["default"]=i},3181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=r(7445);var n=r(6758);var i=r(2155);var o=(0,s.declare)((({assertVersion:e,types:t,template:r},{loose:s})=>{e(7);const o=new WeakMap;const l=new WeakMap;function unshadow(e,t,r){while(r!==t){if(r.hasOwnBinding(e))r.rename(e);r=r.parent}}function injectToFieldInit(e,r,s=false){if(e.node.value){if(s){e.get("value").insertBefore(r)}else{e.get("value").insertAfter(r)}}else{e.set("value",t.unaryExpression("void",r))}}function injectInitialization(e,r){let s;let a;for(const t of e.get("body.body")){if((t.isClassProperty()||t.isClassPrivateProperty())&&!t.node.static){s=t;break}if(!a&&t.isClassMethod({kind:"constructor"})){a=t}}if(s){injectToFieldInit(s,r,true)}else{(0,n.injectInitialization)(e,a,[t.expressionStatement(r)])}}function getWeakSetId(e,s,a,n="",l){let c=o.get(a.node);if(!c){c=s.scope.generateUidIdentifier(`${n||""} brandCheck`);o.set(a.node,c);l(a,r.expression.ast`${t.cloneNode(c)}.add(this)`);const e=t.newExpression(t.identifier("WeakSet"),[]);(0,i.default)(e);s.insertBefore(r.ast`var ${c} = ${e}`)}return t.cloneNode(c)}return{name:"proposal-private-property-in-object",inherits:a.default,pre(){(0,n.enableFeature)(this.file,n.FEATURES.privateIn,s)},visitor:{BinaryExpression(e){const{node:s}=e;if(s.operator!=="in")return;if(!t.isPrivateName(s.left))return;const{name:a}=s.left.id;let n;const i=e.findParent((e=>{if(!e.isClass())return false;n=e.get("body.body").find((({node:e})=>t.isPrivate(e)&&e.key.id.name===a));return!!n}));if(i.parentPath.scope.path.isPattern()){i.replaceWith(r.ast`(() => ${i.node})()`);return}if(n.isMethod()){if(n.node.static){if(i.node.id){unshadow(i.node.id.name,i.scope,e.scope)}else{i.set("id",e.scope.generateUidIdentifier("class"))}e.replaceWith(r.expression.ast`
+ */(function(){"use strict";var r={function:true,object:true};var s=r[typeof window]&&window||this;var a=r[typeof t]&&t&&!t.nodeType&&t;var n=r["object"]&&e&&!e.nodeType;var i=a&&n&&typeof global=="object"&&global;if(i&&(i.global===i||i.window===i||i.self===i)){s=i}var o=Object.prototype.hasOwnProperty;function fromCodePoint(){var e=Number(arguments[0]);if(!isFinite(e)||e<0||e>1114111||Math.floor(e)!=e){throw RangeError("Invalid code point: "+e)}if(e<=65535){return String.fromCharCode(e)}else{e-=65536;var t=(e>>10)+55296;var r=e%1024+56320;return String.fromCharCode(t,r)}}var l={};function assertType(e,t){if(t.indexOf("|")==-1){if(e==t){return}throw Error("Invalid node type: "+e+"; expected type: "+t)}t=o.call(l,t)?l[t]:l[t]=RegExp("^(?:"+t+")$");if(t.test(e)){return}throw Error("Invalid node type: "+e+"; expected types: "+t)}function generate(e){var t=e.type;if(o.call(c,t)){return c[t](e)}throw Error("Invalid node type: "+t)}function generateAlternative(e){assertType(e.type,"alternative");var t=e.body,r=-1,s=t.length,a="";while(++r"}break;case"ignore":t+="?:";break;case"lookahead":t+="?=";break;case"negativeLookahead":t+="?!";break;case"lookbehind":t+="?<=";break;case"negativeLookbehind":t+="?"}throw new Error("Unknown reference type")}function generateTerm(e){assertType(e.type,"anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|unicodePropertyEscape|value|dot");return generate(e)}function generateValue(e){assertType(e.type,"value");var t=e.kind,r=e.codePoint;if(typeof r!="number"){throw new Error("Invalid code point: "+r)}switch(t){case"controlLetter":return"\\c"+fromCodePoint(r+64);case"hexadecimalEscape":return"\\x"+("00"+r.toString(16).toUpperCase()).slice(-2);case"identifier":return"\\"+fromCodePoint(r);case"null":return"\\"+r;case"octal":return"\\"+r.toString(8);case"singleEscape":switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r";default:throw Error("Invalid code point: "+r)}case"symbol":return fromCodePoint(r);case"unicodeEscape":return"\\u"+("0000"+r.toString(16).toUpperCase()).slice(-4);case"unicodeCodePointEscape":return"\\u{"+r.toString(16).toUpperCase()+"}";default:throw Error("Unsupported node kind: "+t)}}var c={alternative:generateAlternative,anchor:generateAnchor,characterClass:generateCharacterClass,characterClassEscape:generateCharacterClassEscape,characterClassRange:generateCharacterClassRange,unicodePropertyEscape:generateUnicodePropertyEscape,disjunction:generateDisjunction,dot:generateDot,group:generateGroup,quantifier:generateQuantifier,reference:generateReference,value:generateValue};var p={generate:generate};if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define((function(){return p}));s.regjsgen=p}else if(a&&n){a.generate=generate}else{s.regjsgen=p}}).call(this)},9990:e=>{(function(){var t=String.fromCodePoint||function(){var e=String.fromCharCode;var t=Math.floor;return function fromCodePoint(){var r=16384;var s=[];var a;var n;var i=-1;var o=arguments.length;if(!o){return""}var l="";while(++i1114111||t(c)!=c){throw RangeError("Invalid code point: "+c)}if(c<=65535){s.push(c)}else{c-=65536;a=(c>>10)+55296;n=c%1024+56320;s.push(a,n)}if(i+1==o||s.length>r){l+=e.apply(null,s);s.length=0}}return l}}();function parse(e,r,s){if(!s){s={}}function addRaw(t){t.raw=e.substring(t.range[0],t.range[1]);return t}function updateRawStart(e,t){e.range[0]=t;return addRaw(e)}function createAnchor(e,t){return addRaw({type:"anchor",kind:e,range:[l-t,l]})}function createValue(e,t,r,s){return addRaw({type:"value",kind:e,codePoint:t,range:[r,s]})}function createEscaped(e,t,r,s){s=s||0;return createValue(e,t,l-(r.length+s),l)}function createCharacter(e){var t=e[0];var r=t.charCodeAt(0);if(o){var s;if(t.length===1&&r>=55296&&r<=56319){s=lookahead().charCodeAt(0);if(s>=56320&&s<=57343){l++;return createValue("symbol",(r-55296)*1024+s-56320+65536,l-2,l)}}}return createValue("symbol",r,l-1,l)}function createDisjunction(e,t,r){return addRaw({type:"disjunction",body:e,range:[t,r]})}function createDot(){return addRaw({type:"dot",range:[l-1,l]})}function createCharacterClassEscape(e){return addRaw({type:"characterClassEscape",value:e,range:[l-2,l]})}function createReference(e){return addRaw({type:"reference",matchIndex:parseInt(e,10),range:[l-1-e.length,l]})}function createNamedReference(e){return addRaw({type:"reference",name:e,range:[e.range[0]-3,l]})}function createGroup(e,t,r,s){return addRaw({type:"group",behavior:e,body:t,range:[r,s]})}function createQuantifier(e,t,r,s){if(s==null){r=l-1;s=l}return addRaw({type:"quantifier",min:e,max:t,greedy:true,body:null,range:[r,s]})}function createAlternative(e,t,r){return addRaw({type:"alternative",body:e,range:[t,r]})}function createCharacterClass(e,t,r,s){return addRaw({type:"characterClass",body:e,negative:t,range:[r,s]})}function createClassRange(e,t,r,s){if(e.codePoint>t.codePoint){bail("invalid range in character class",e.raw+"-"+t.raw,r,s)}return addRaw({type:"characterClassRange",min:e,max:t,range:[r,s]})}function flattenBody(e){if(e.type==="alternative"){return e.body}else{return[e]}}function isEmpty(e){return e.type==="empty"}function incr(t){t=t||1;var r=e.substring(l,l+t);l+=t||1;return r}function skip(e){if(!match(e)){bail("character",e)}}function match(t){if(e.indexOf(t,l)===l){return incr(t.length)}}function lookahead(){return e[l]}function current(t){return e.indexOf(t,l)===l}function next(t){return e[l+1]===t}function matchReg(t){var r=e.substring(l);var s=r.match(t);if(s){s.range=[];s.range[0]=l;incr(s[0].length);s.range[1]=l}return s}function parseDisjunction(){var e=[],t=l;e.push(parseAlternative());while(match("|")){e.push(parseAlternative())}if(e.length===1){return e[0]}return createDisjunction(e,t,l)}function parseAlternative(){var e=[],t=l;var r;while(r=parseTerm()){e.push(r)}if(e.length===1){return e[0]}return createAlternative(e,t,l)}function parseTerm(){if(l>=e.length||current("|")||current(")")){return null}var t=parseAnchor();if(t){return t}var r=parseAtomAndExtendedAtom();if(!r){bail("Expected atom")}var s=parseQuantifier()||false;if(s){s.body=flattenBody(r);updateRawStart(s,r.range[0]);return s}return r}function parseGroup(e,t,r,s){var a=null,n=l;if(match(e)){a=t}else if(match(r)){a=s}else{return false}return finishGroup(a,n)}function finishGroup(e,t){var r=parseDisjunction();if(!r){bail("Expected disjunction")}skip(")");var s=createGroup(e,flattenBody(r),t,l);if(e=="normal"){if(i){n++}}return s}function parseAnchor(){var e,t=l;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var e,t=l;var r;var s,a;if(match("*")){r=createQuantifier(0)}else if(match("+")){r=createQuantifier(1)}else if(match("?")){r=createQuantifier(0,1)}else if(e=matchReg(/^\{([0-9]+)\}/)){s=parseInt(e[1],10);r=createQuantifier(s,s,e.range[0],e.range[1])}else if(e=matchReg(/^\{([0-9]+),\}/)){s=parseInt(e[1],10);r=createQuantifier(s,undefined,e.range[0],e.range[1])}else if(e=matchReg(/^\{([0-9]+),([0-9]+)\}/)){s=parseInt(e[1],10);a=parseInt(e[2],10);if(s>a){bail("numbers out of order in {} quantifier","",t,l)}r=createQuantifier(s,a,e.range[0],e.range[1])}if(r){if(match("?")){r.greedy=false;r.range[1]+=1}}return r}function parseAtomAndExtendedAtom(){var e;if(e=matchReg(/^[^^$\\.*+?()[\]{}|]/)){return createCharacter(e)}else if(!o&&(e=matchReg(/^(?:]|})/))){return createCharacter(e)}else if(match(".")){return createDot()}else if(match("\\")){e=parseAtomEscape();if(!e){if(!o&&lookahead()=="c"){return createValue("symbol",92,l-1,l)}bail("atomEscape")}return e}else if(e=parseCharacterClass()){return e}else if(s.lookbehind&&(e=parseGroup("(?<=","lookbehind","(?");var r=finishGroup("normal",t.range[0]-3);r.name=t;return r}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(e){if(o){var t,r;if(e.kind=="unicodeEscape"&&(t=e.codePoint)>=55296&&t<=56319&¤t("\\")&&next("u")){var s=l;l++;var a=parseClassEscape();if(a.kind=="unicodeEscape"&&(r=a.codePoint)>=56320&&r<=57343){e.range[1]=a.range[1];e.codePoint=(t-55296)*1024+r-56320+65536;e.type="value";e.kind="unicodeCodePointEscape";addRaw(e)}else{l=s}}}return e}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(e){var t,r=l;t=parseDecimalEscape()||parseNamedReference();if(t){return t}if(e){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){bail("\\B not possible inside of CharacterClass","",r)}else if(!o&&(t=matchReg(/^c([0-9])/))){return createEscaped("controlLetter",t[1]+16,t[1],2)}if(match("-")&&o){return createEscaped("singleEscape",45,"\\-")}}t=parseCharacterEscape();return t}function parseDecimalEscape(){var e,t;if(e=matchReg(/^(?!0)\d+/)){t=e[0];var r=parseInt(e[0],10);if(r<=n){return createReference(e[0])}else{a.push(r);incr(-e[0].length);if(e=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(e[0],8),e[0],1)}else{e=createCharacter(matchReg(/^[89]/));return updateRawStart(e,e.range[0]-1)}}}else if(e=matchReg(/^[0-7]{1,3}/)){t=e[0];if(/^0{1,3}$/.test(t)){return createEscaped("null",0,"0",t.length+1)}else{return createEscaped("octal",parseInt(t,8),t,1)}}else if(e=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(e[0])}return false}function parseNamedReference(){if(s.namedGroups&&matchReg(/^k<(?=.*?>)/)){var e=parseIdentifier();skip(">");return createNamedReference(e)}}function parseRegExpUnicodeEscapeSequence(){var e;if(e=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(e[1],16),e[1],2))}else if(o&&(e=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(e[1],16),e[1],4)}}function parseCharacterEscape(){var e;var t=l;if(e=matchReg(/^[fnrtv]/)){var r=0;switch(e[0]){case"t":r=9;break;case"n":r=10;break;case"v":r=11;break;case"f":r=12;break;case"r":r=13;break}return createEscaped("singleEscape",r,"\\"+e[0])}else if(e=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",e[1].charCodeAt(0)%32,e[1],2)}else if(e=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(e[1],16),e[1],2)}else if(e=parseRegExpUnicodeEscapeSequence()){if(!e||e.codePoint>1114111){bail("Invalid escape sequence",null,t,l)}return e}else if(s.unicodePropertyEscape&&o&&(e=matchReg(/^([pP])\{([^\}]+)\}/))){return addRaw({type:"unicodePropertyEscape",negative:e[1]==="P",value:e[2],range:[e.range[0]-1,e.range[1]],raw:e[0]})}else{return parseIdentityEscape()}}function parseIdentifierAtom(r){var s=lookahead();var a=l;if(s==="\\"){incr();var n=parseRegExpUnicodeEscapeSequence();if(!n||!r(n.codePoint)){bail("Invalid escape sequence",null,a,l)}return t(n.codePoint)}var i=s.charCodeAt(0);if(i>=55296&&i<=56319){s+=e[l+1];var o=s.charCodeAt(1);if(o>=56320&&o<=57343){i=(i-55296)*1024+o-56320+65536}}if(!r(i))return;incr();if(i>65535)incr();return s}function parseIdentifier(){var e=l;var t=parseIdentifierAtom(isIdentifierStart);if(!t){bail("Invalid identifier")}var r;while(r=parseIdentifierAtom(isIdentifierPart)){t+=r}return addRaw({type:"identifier",value:t,range:[e,l]})}function isIdentifierStart(e){var r=/[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEF\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7B9\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDF00-\uDF1C\uDF27\uDF30-\uDF45]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF1A]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFF1]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;return e===36||e===95||e>=65&&e<=90||e>=97&&e<=122||e>=128&&r.test(t(e))}function isIdentifierPart(e){var r=/[0-9_\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD30-\uDD39\uDF46-\uDF50]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC66-\uDC6F\uDC7F-\uDC82\uDCB0-\uDCBA\uDCF0-\uDCF9\uDD00-\uDD02\uDD27-\uDD34\uDD36-\uDD3F\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDD0-\uDDD9\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC50-\uDC59\uDC5E\uDCB0-\uDCC3\uDCD0-\uDCD9\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDE50-\uDE59\uDEAB-\uDEB7\uDEC0-\uDEC9\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDC2C-\uDC3A\uDCE0-\uDCE9\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC50-\uDC59\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD50-\uDD59\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDDA0-\uDDA9\uDEF3-\uDEF6]|\uD81A[\uDE60-\uDE69\uDEF0-\uDEF4\uDF30-\uDF36\uDF50-\uDF59]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A\uDD50-\uDD59]|\uDB40[\uDD00-\uDDEF]/;return isIdentifierStart(e)||e>=48&&e<=57||e>=128&&r.test(t(e))}function parseIdentityEscape(){var e;var t=lookahead();if(o&&/[\^\$\.\*\+\?\(\)\\\[\]\{\}\|\/]/.test(t)||!o&&t!=="c"){if(t==="k"&&s.lookbehind){return null}e=incr();return createEscaped("identifier",e.charCodeAt(0),e,1)}return null}function parseCharacterClass(){var e,t=l;if(e=matchReg(/^\[\^/)){e=parseClassRanges();skip("]");return createCharacterClass(e,true,t,l)}else if(match("[")){e=parseClassRanges();skip("]");return createCharacterClass(e,false,t,l)}return null}function parseClassRanges(){var e;if(current("]")){return[]}else{e=parseNonemptyClassRanges();if(!e){bail("nonEmptyClassRanges")}return e}}function parseHelperClassRanges(e){var t,r,s;if(current("-")&&!next("]")){skip("-");s=parseClassAtom();if(!s){bail("classAtom")}r=l;var a=parseClassRanges();if(!a){bail("classRanges")}t=e.range[0];if(a.type==="empty"){return[createClassRange(e,s,t,r)]}return[createClassRange(e,s,t,r)].concat(a)}s=parseNonemptyClassRangesNoDash();if(!s){bail("nonEmptyClassRangesNoDash")}return[e].concat(s)}function parseNonemptyClassRanges(){var e=parseClassAtom();if(!e){bail("classAtom")}if(current("]")){return[e]}return parseHelperClassRanges(e)}function parseNonemptyClassRangesNoDash(){var e=parseClassAtom();if(!e){bail("classAtom")}if(current("]")){return e}return parseHelperClassRanges(e)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var e;if(e=matchReg(/^[^\\\]-]/)){return createCharacter(e[0])}else if(match("\\")){e=parseClassEscape();if(!e){bail("classEscape")}return parseUnicodeSurrogatePairEscape(e)}}function bail(t,r,s,a){s=s==null?l:s;a=a==null?s:a;var n=Math.max(0,s-10);var i=Math.min(a+10,e.length);var o=" "+e.substring(n,i);var c=" "+new Array(s-n+1).join(" ")+"^";throw SyntaxError(t+" at position "+s+(r?": "+r:"")+"\n"+o+"\n"+c)}var a=[];var n=0;var i=true;var o=(r||"").indexOf("u")!==-1;var l=0;e=String(e);if(e===""){e="(?:)"}var c=parseDisjunction();if(c.range[1]!==e.length){bail("Could not parse entire input - got stuck","",c.range[1])}for(var p=0;p{var t=e.exports=function(e){return new Traverse(e)};function Traverse(e){this.value=e}Traverse.prototype.get=function(e){var t=this.value;for(var r=0;r{e.exports=new Set(["General_Category","Script","Script_Extensions","Alphabetic","Any","ASCII","ASCII_Hex_Digit","Assigned","Bidi_Control","Bidi_Mirrored","Case_Ignorable","Cased","Changes_When_Casefolded","Changes_When_Casemapped","Changes_When_Lowercased","Changes_When_NFKC_Casefolded","Changes_When_Titlecased","Changes_When_Uppercased","Dash","Default_Ignorable_Code_Point","Deprecated","Diacritic","Emoji","Emoji_Component","Emoji_Modifier","Emoji_Modifier_Base","Emoji_Presentation","Extended_Pictographic","Extender","Grapheme_Base","Grapheme_Extend","Hex_Digit","ID_Continue","ID_Start","Ideographic","IDS_Binary_Operator","IDS_Trinary_Operator","Join_Control","Logical_Order_Exception","Lowercase","Math","Noncharacter_Code_Point","Pattern_Syntax","Pattern_White_Space","Quotation_Mark","Radical","Regional_Indicator","Sentence_Terminal","Soft_Dotted","Terminal_Punctuation","Unified_Ideograph","Uppercase","Variation_Selector","White_Space","XID_Continue","XID_Start"])},3042:(e,t,r)=>{"use strict";const s=r(7894);const a=r(864);const matchProperty=function(e){if(s.has(e)){return e}if(a.has(e)){return a.get(e)}throw new Error(`Unknown property: ${e}`)};e.exports=matchProperty},4703:e=>{e.exports=new Map([["General_Category",new Map([["C","Other"],["Cc","Control"],["cntrl","Control"],["Cf","Format"],["Cn","Unassigned"],["Co","Private_Use"],["Cs","Surrogate"],["L","Letter"],["LC","Cased_Letter"],["Ll","Lowercase_Letter"],["Lm","Modifier_Letter"],["Lo","Other_Letter"],["Lt","Titlecase_Letter"],["Lu","Uppercase_Letter"],["M","Mark"],["Combining_Mark","Mark"],["Mc","Spacing_Mark"],["Me","Enclosing_Mark"],["Mn","Nonspacing_Mark"],["N","Number"],["Nd","Decimal_Number"],["digit","Decimal_Number"],["Nl","Letter_Number"],["No","Other_Number"],["P","Punctuation"],["punct","Punctuation"],["Pc","Connector_Punctuation"],["Pd","Dash_Punctuation"],["Pe","Close_Punctuation"],["Pf","Final_Punctuation"],["Pi","Initial_Punctuation"],["Po","Other_Punctuation"],["Ps","Open_Punctuation"],["S","Symbol"],["Sc","Currency_Symbol"],["Sk","Modifier_Symbol"],["Sm","Math_Symbol"],["So","Other_Symbol"],["Z","Separator"],["Zl","Line_Separator"],["Zp","Paragraph_Separator"],["Zs","Space_Separator"],["Other","Other"],["Control","Control"],["Format","Format"],["Unassigned","Unassigned"],["Private_Use","Private_Use"],["Surrogate","Surrogate"],["Letter","Letter"],["Cased_Letter","Cased_Letter"],["Lowercase_Letter","Lowercase_Letter"],["Modifier_Letter","Modifier_Letter"],["Other_Letter","Other_Letter"],["Titlecase_Letter","Titlecase_Letter"],["Uppercase_Letter","Uppercase_Letter"],["Mark","Mark"],["Spacing_Mark","Spacing_Mark"],["Enclosing_Mark","Enclosing_Mark"],["Nonspacing_Mark","Nonspacing_Mark"],["Number","Number"],["Decimal_Number","Decimal_Number"],["Letter_Number","Letter_Number"],["Other_Number","Other_Number"],["Punctuation","Punctuation"],["Connector_Punctuation","Connector_Punctuation"],["Dash_Punctuation","Dash_Punctuation"],["Close_Punctuation","Close_Punctuation"],["Final_Punctuation","Final_Punctuation"],["Initial_Punctuation","Initial_Punctuation"],["Other_Punctuation","Other_Punctuation"],["Open_Punctuation","Open_Punctuation"],["Symbol","Symbol"],["Currency_Symbol","Currency_Symbol"],["Modifier_Symbol","Modifier_Symbol"],["Math_Symbol","Math_Symbol"],["Other_Symbol","Other_Symbol"],["Separator","Separator"],["Line_Separator","Line_Separator"],["Paragraph_Separator","Paragraph_Separator"],["Space_Separator","Space_Separator"]])],["Script",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","Ahom"],["Arab","Arabic"],["Armi","Imperial_Aramaic"],["Armn","Armenian"],["Avst","Avestan"],["Bali","Balinese"],["Bamu","Bamum"],["Bass","Bassa_Vah"],["Batk","Batak"],["Beng","Bengali"],["Bhks","Bhaiksuki"],["Bopo","Bopomofo"],["Brah","Brahmi"],["Brai","Braille"],["Bugi","Buginese"],["Buhd","Buhid"],["Cakm","Chakma"],["Cans","Canadian_Aboriginal"],["Cari","Carian"],["Cham","Cham"],["Cher","Cherokee"],["Chrs","Chorasmian"],["Copt","Coptic"],["Qaac","Coptic"],["Cprt","Cypriot"],["Cyrl","Cyrillic"],["Deva","Devanagari"],["Diak","Dives_Akuru"],["Dogr","Dogra"],["Dsrt","Deseret"],["Dupl","Duployan"],["Egyp","Egyptian_Hieroglyphs"],["Elba","Elbasan"],["Elym","Elymaic"],["Ethi","Ethiopic"],["Geor","Georgian"],["Glag","Glagolitic"],["Gong","Gunjala_Gondi"],["Gonm","Masaram_Gondi"],["Goth","Gothic"],["Gran","Grantha"],["Grek","Greek"],["Gujr","Gujarati"],["Guru","Gurmukhi"],["Hang","Hangul"],["Hani","Han"],["Hano","Hanunoo"],["Hatr","Hatran"],["Hebr","Hebrew"],["Hira","Hiragana"],["Hluw","Anatolian_Hieroglyphs"],["Hmng","Pahawh_Hmong"],["Hmnp","Nyiakeng_Puachue_Hmong"],["Hrkt","Katakana_Or_Hiragana"],["Hung","Old_Hungarian"],["Ital","Old_Italic"],["Java","Javanese"],["Kali","Kayah_Li"],["Kana","Katakana"],["Khar","Kharoshthi"],["Khmr","Khmer"],["Khoj","Khojki"],["Kits","Khitan_Small_Script"],["Knda","Kannada"],["Kthi","Kaithi"],["Lana","Tai_Tham"],["Laoo","Lao"],["Latn","Latin"],["Lepc","Lepcha"],["Limb","Limbu"],["Lina","Linear_A"],["Linb","Linear_B"],["Lisu","Lisu"],["Lyci","Lycian"],["Lydi","Lydian"],["Mahj","Mahajani"],["Maka","Makasar"],["Mand","Mandaic"],["Mani","Manichaean"],["Marc","Marchen"],["Medf","Medefaidrin"],["Mend","Mende_Kikakui"],["Merc","Meroitic_Cursive"],["Mero","Meroitic_Hieroglyphs"],["Mlym","Malayalam"],["Modi","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Nand","Nandinagari"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["Palm","Palmyrene"],["Pauc","Pau_Cin_Hau"],["Perm","Old_Permic"],["Phag","Phags_Pa"],["Phli","Inscriptional_Pahlavi"],["Phlp","Psalter_Pahlavi"],["Phnx","Phoenician"],["Plrd","Miao"],["Prti","Inscriptional_Parthian"],["Rjng","Rejang"],["Rohg","Hanifi_Rohingya"],["Runr","Runic"],["Samr","Samaritan"],["Sarb","Old_South_Arabian"],["Saur","Saurashtra"],["Sgnw","SignWriting"],["Shaw","Shavian"],["Shrd","Sharada"],["Sidd","Siddham"],["Sind","Khudawadi"],["Sinh","Sinhala"],["Sogd","Sogdian"],["Sogo","Old_Sogdian"],["Sora","Sora_Sompeng"],["Soyo","Soyombo"],["Sund","Sundanese"],["Sylo","Syloti_Nagri"],["Syrc","Syriac"],["Tagb","Tagbanwa"],["Takr","Takri"],["Tale","Tai_Le"],["Talu","New_Tai_Lue"],["Taml","Tamil"],["Tang","Tangut"],["Tavt","Tai_Viet"],["Telu","Telugu"],["Tfng","Tifinagh"],["Tglg","Tagalog"],["Thaa","Thaana"],["Thai","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Wcho","Wancho"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yezi","Yezidi"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Chorasmian","Chorasmian"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dives_Akuru","Dives_Akuru"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Elymaic","Elymaic"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Nyiakeng_Puachue_Hmong","Nyiakeng_Puachue_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Khitan_Small_Script","Khitan_Small_Script"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Nandinagari","Nandinagari"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Wancho","Wancho"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yezidi","Yezidi"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])],["Script_Extensions",new Map([["Adlm","Adlam"],["Aghb","Caucasian_Albanian"],["Ahom","Ahom"],["Arab","Arabic"],["Armi","Imperial_Aramaic"],["Armn","Armenian"],["Avst","Avestan"],["Bali","Balinese"],["Bamu","Bamum"],["Bass","Bassa_Vah"],["Batk","Batak"],["Beng","Bengali"],["Bhks","Bhaiksuki"],["Bopo","Bopomofo"],["Brah","Brahmi"],["Brai","Braille"],["Bugi","Buginese"],["Buhd","Buhid"],["Cakm","Chakma"],["Cans","Canadian_Aboriginal"],["Cari","Carian"],["Cham","Cham"],["Cher","Cherokee"],["Chrs","Chorasmian"],["Copt","Coptic"],["Qaac","Coptic"],["Cprt","Cypriot"],["Cyrl","Cyrillic"],["Deva","Devanagari"],["Diak","Dives_Akuru"],["Dogr","Dogra"],["Dsrt","Deseret"],["Dupl","Duployan"],["Egyp","Egyptian_Hieroglyphs"],["Elba","Elbasan"],["Elym","Elymaic"],["Ethi","Ethiopic"],["Geor","Georgian"],["Glag","Glagolitic"],["Gong","Gunjala_Gondi"],["Gonm","Masaram_Gondi"],["Goth","Gothic"],["Gran","Grantha"],["Grek","Greek"],["Gujr","Gujarati"],["Guru","Gurmukhi"],["Hang","Hangul"],["Hani","Han"],["Hano","Hanunoo"],["Hatr","Hatran"],["Hebr","Hebrew"],["Hira","Hiragana"],["Hluw","Anatolian_Hieroglyphs"],["Hmng","Pahawh_Hmong"],["Hmnp","Nyiakeng_Puachue_Hmong"],["Hrkt","Katakana_Or_Hiragana"],["Hung","Old_Hungarian"],["Ital","Old_Italic"],["Java","Javanese"],["Kali","Kayah_Li"],["Kana","Katakana"],["Khar","Kharoshthi"],["Khmr","Khmer"],["Khoj","Khojki"],["Kits","Khitan_Small_Script"],["Knda","Kannada"],["Kthi","Kaithi"],["Lana","Tai_Tham"],["Laoo","Lao"],["Latn","Latin"],["Lepc","Lepcha"],["Limb","Limbu"],["Lina","Linear_A"],["Linb","Linear_B"],["Lisu","Lisu"],["Lyci","Lycian"],["Lydi","Lydian"],["Mahj","Mahajani"],["Maka","Makasar"],["Mand","Mandaic"],["Mani","Manichaean"],["Marc","Marchen"],["Medf","Medefaidrin"],["Mend","Mende_Kikakui"],["Merc","Meroitic_Cursive"],["Mero","Meroitic_Hieroglyphs"],["Mlym","Malayalam"],["Modi","Modi"],["Mong","Mongolian"],["Mroo","Mro"],["Mtei","Meetei_Mayek"],["Mult","Multani"],["Mymr","Myanmar"],["Nand","Nandinagari"],["Narb","Old_North_Arabian"],["Nbat","Nabataean"],["Newa","Newa"],["Nkoo","Nko"],["Nshu","Nushu"],["Ogam","Ogham"],["Olck","Ol_Chiki"],["Orkh","Old_Turkic"],["Orya","Oriya"],["Osge","Osage"],["Osma","Osmanya"],["Palm","Palmyrene"],["Pauc","Pau_Cin_Hau"],["Perm","Old_Permic"],["Phag","Phags_Pa"],["Phli","Inscriptional_Pahlavi"],["Phlp","Psalter_Pahlavi"],["Phnx","Phoenician"],["Plrd","Miao"],["Prti","Inscriptional_Parthian"],["Rjng","Rejang"],["Rohg","Hanifi_Rohingya"],["Runr","Runic"],["Samr","Samaritan"],["Sarb","Old_South_Arabian"],["Saur","Saurashtra"],["Sgnw","SignWriting"],["Shaw","Shavian"],["Shrd","Sharada"],["Sidd","Siddham"],["Sind","Khudawadi"],["Sinh","Sinhala"],["Sogd","Sogdian"],["Sogo","Old_Sogdian"],["Sora","Sora_Sompeng"],["Soyo","Soyombo"],["Sund","Sundanese"],["Sylo","Syloti_Nagri"],["Syrc","Syriac"],["Tagb","Tagbanwa"],["Takr","Takri"],["Tale","Tai_Le"],["Talu","New_Tai_Lue"],["Taml","Tamil"],["Tang","Tangut"],["Tavt","Tai_Viet"],["Telu","Telugu"],["Tfng","Tifinagh"],["Tglg","Tagalog"],["Thaa","Thaana"],["Thai","Thai"],["Tibt","Tibetan"],["Tirh","Tirhuta"],["Ugar","Ugaritic"],["Vaii","Vai"],["Wara","Warang_Citi"],["Wcho","Wancho"],["Xpeo","Old_Persian"],["Xsux","Cuneiform"],["Yezi","Yezidi"],["Yiii","Yi"],["Zanb","Zanabazar_Square"],["Zinh","Inherited"],["Qaai","Inherited"],["Zyyy","Common"],["Zzzz","Unknown"],["Adlam","Adlam"],["Caucasian_Albanian","Caucasian_Albanian"],["Arabic","Arabic"],["Imperial_Aramaic","Imperial_Aramaic"],["Armenian","Armenian"],["Avestan","Avestan"],["Balinese","Balinese"],["Bamum","Bamum"],["Bassa_Vah","Bassa_Vah"],["Batak","Batak"],["Bengali","Bengali"],["Bhaiksuki","Bhaiksuki"],["Bopomofo","Bopomofo"],["Brahmi","Brahmi"],["Braille","Braille"],["Buginese","Buginese"],["Buhid","Buhid"],["Chakma","Chakma"],["Canadian_Aboriginal","Canadian_Aboriginal"],["Carian","Carian"],["Cherokee","Cherokee"],["Chorasmian","Chorasmian"],["Coptic","Coptic"],["Cypriot","Cypriot"],["Cyrillic","Cyrillic"],["Devanagari","Devanagari"],["Dives_Akuru","Dives_Akuru"],["Dogra","Dogra"],["Deseret","Deseret"],["Duployan","Duployan"],["Egyptian_Hieroglyphs","Egyptian_Hieroglyphs"],["Elbasan","Elbasan"],["Elymaic","Elymaic"],["Ethiopic","Ethiopic"],["Georgian","Georgian"],["Glagolitic","Glagolitic"],["Gunjala_Gondi","Gunjala_Gondi"],["Masaram_Gondi","Masaram_Gondi"],["Gothic","Gothic"],["Grantha","Grantha"],["Greek","Greek"],["Gujarati","Gujarati"],["Gurmukhi","Gurmukhi"],["Hangul","Hangul"],["Han","Han"],["Hanunoo","Hanunoo"],["Hatran","Hatran"],["Hebrew","Hebrew"],["Hiragana","Hiragana"],["Anatolian_Hieroglyphs","Anatolian_Hieroglyphs"],["Pahawh_Hmong","Pahawh_Hmong"],["Nyiakeng_Puachue_Hmong","Nyiakeng_Puachue_Hmong"],["Katakana_Or_Hiragana","Katakana_Or_Hiragana"],["Old_Hungarian","Old_Hungarian"],["Old_Italic","Old_Italic"],["Javanese","Javanese"],["Kayah_Li","Kayah_Li"],["Katakana","Katakana"],["Kharoshthi","Kharoshthi"],["Khmer","Khmer"],["Khojki","Khojki"],["Khitan_Small_Script","Khitan_Small_Script"],["Kannada","Kannada"],["Kaithi","Kaithi"],["Tai_Tham","Tai_Tham"],["Lao","Lao"],["Latin","Latin"],["Lepcha","Lepcha"],["Limbu","Limbu"],["Linear_A","Linear_A"],["Linear_B","Linear_B"],["Lycian","Lycian"],["Lydian","Lydian"],["Mahajani","Mahajani"],["Makasar","Makasar"],["Mandaic","Mandaic"],["Manichaean","Manichaean"],["Marchen","Marchen"],["Medefaidrin","Medefaidrin"],["Mende_Kikakui","Mende_Kikakui"],["Meroitic_Cursive","Meroitic_Cursive"],["Meroitic_Hieroglyphs","Meroitic_Hieroglyphs"],["Malayalam","Malayalam"],["Mongolian","Mongolian"],["Mro","Mro"],["Meetei_Mayek","Meetei_Mayek"],["Multani","Multani"],["Myanmar","Myanmar"],["Nandinagari","Nandinagari"],["Old_North_Arabian","Old_North_Arabian"],["Nabataean","Nabataean"],["Nko","Nko"],["Nushu","Nushu"],["Ogham","Ogham"],["Ol_Chiki","Ol_Chiki"],["Old_Turkic","Old_Turkic"],["Oriya","Oriya"],["Osage","Osage"],["Osmanya","Osmanya"],["Palmyrene","Palmyrene"],["Pau_Cin_Hau","Pau_Cin_Hau"],["Old_Permic","Old_Permic"],["Phags_Pa","Phags_Pa"],["Inscriptional_Pahlavi","Inscriptional_Pahlavi"],["Psalter_Pahlavi","Psalter_Pahlavi"],["Phoenician","Phoenician"],["Miao","Miao"],["Inscriptional_Parthian","Inscriptional_Parthian"],["Rejang","Rejang"],["Hanifi_Rohingya","Hanifi_Rohingya"],["Runic","Runic"],["Samaritan","Samaritan"],["Old_South_Arabian","Old_South_Arabian"],["Saurashtra","Saurashtra"],["SignWriting","SignWriting"],["Shavian","Shavian"],["Sharada","Sharada"],["Siddham","Siddham"],["Khudawadi","Khudawadi"],["Sinhala","Sinhala"],["Sogdian","Sogdian"],["Old_Sogdian","Old_Sogdian"],["Sora_Sompeng","Sora_Sompeng"],["Soyombo","Soyombo"],["Sundanese","Sundanese"],["Syloti_Nagri","Syloti_Nagri"],["Syriac","Syriac"],["Tagbanwa","Tagbanwa"],["Takri","Takri"],["Tai_Le","Tai_Le"],["New_Tai_Lue","New_Tai_Lue"],["Tamil","Tamil"],["Tangut","Tangut"],["Tai_Viet","Tai_Viet"],["Telugu","Telugu"],["Tifinagh","Tifinagh"],["Tagalog","Tagalog"],["Thaana","Thaana"],["Tibetan","Tibetan"],["Tirhuta","Tirhuta"],["Ugaritic","Ugaritic"],["Vai","Vai"],["Warang_Citi","Warang_Citi"],["Wancho","Wancho"],["Old_Persian","Old_Persian"],["Cuneiform","Cuneiform"],["Yezidi","Yezidi"],["Yi","Yi"],["Zanabazar_Square","Zanabazar_Square"],["Inherited","Inherited"],["Common","Common"],["Unknown","Unknown"]])]])},1317:(e,t,r)=>{"use strict";const s=r(4703);const matchPropertyValue=function(e,t){const r=s.get(e);if(!r){throw new Error(`Unknown property \`${e}\`.`)}const a=r.get(t);if(a){return a}throw new Error(`Unknown value \`${t}\` for property \`${e}\`.`)};e.exports=matchPropertyValue},864:e=>{e.exports=new Map([["scx","Script_Extensions"],["sc","Script"],["gc","General_Category"],["AHex","ASCII_Hex_Digit"],["Alpha","Alphabetic"],["Bidi_C","Bidi_Control"],["Bidi_M","Bidi_Mirrored"],["Cased","Cased"],["CI","Case_Ignorable"],["CWCF","Changes_When_Casefolded"],["CWCM","Changes_When_Casemapped"],["CWKCF","Changes_When_NFKC_Casefolded"],["CWL","Changes_When_Lowercased"],["CWT","Changes_When_Titlecased"],["CWU","Changes_When_Uppercased"],["Dash","Dash"],["Dep","Deprecated"],["DI","Default_Ignorable_Code_Point"],["Dia","Diacritic"],["Ext","Extender"],["Gr_Base","Grapheme_Base"],["Gr_Ext","Grapheme_Extend"],["Hex","Hex_Digit"],["IDC","ID_Continue"],["Ideo","Ideographic"],["IDS","ID_Start"],["IDSB","IDS_Binary_Operator"],["IDST","IDS_Trinary_Operator"],["Join_C","Join_Control"],["LOE","Logical_Order_Exception"],["Lower","Lowercase"],["Math","Math"],["NChar","Noncharacter_Code_Point"],["Pat_Syn","Pattern_Syntax"],["Pat_WS","Pattern_White_Space"],["QMark","Quotation_Mark"],["Radical","Radical"],["RI","Regional_Indicator"],["SD","Soft_Dotted"],["STerm","Sentence_Terminal"],["Term","Terminal_Punctuation"],["UIdeo","Unified_Ideograph"],["Upper","Uppercase"],["VS","Variation_Selector"],["WSpace","White_Space"],["space","White_Space"],["XIDC","XID_Continue"],["XIDS","XID_Start"]])},3812:(e,t,r)=>{function eslintParser(){return r(8973)}function pluginProposalClassProperties(){return r(8027)}function pluginProposalExportNamespaceFrom(){return r(9579)}function pluginProposalNumericSeparator(){return r(7300)}function pluginProposalObjectRestSpread(){return r(6309)}function pluginSyntaxBigint(){return r(6762)}function pluginSyntaxDynamicImport(){return r(5163)}function pluginSyntaxJsx(){return r(8926)}function pluginTransformDefine(){return r(9065)}function pluginTransformModulesCommonjs(){return r(6186)}function pluginTransformReactRemovePropTypes(){return r(6197)}function pluginTransformRuntime(){return r(4722)}function presetEnv(){return r(9290)}function presetReact(){return r(8277)}function presetTypescript(){return r(1068)}e.exports={eslintParser:eslintParser,pluginProposalClassProperties:pluginProposalClassProperties,pluginProposalExportNamespaceFrom:pluginProposalExportNamespaceFrom,pluginProposalNumericSeparator:pluginProposalNumericSeparator,pluginProposalObjectRestSpread:pluginProposalObjectRestSpread,pluginSyntaxBigint:pluginSyntaxBigint,pluginSyntaxDynamicImport:pluginSyntaxDynamicImport,pluginSyntaxJsx:pluginSyntaxJsx,pluginTransformDefine:pluginTransformDefine,pluginTransformModulesCommonjs:pluginTransformModulesCommonjs,pluginTransformReactRemovePropTypes:pluginTransformReactRemovePropTypes,pluginTransformRuntime:pluginTransformRuntime,presetEnv:presetEnv,presetReact:presetReact,presetTypescript:presetTypescript}},2272:(e,t,r)=>{e.exports=r(4817)},9302:(e,t,r)=>{e.exports=r(8392)},7363:(e,t,r)=>{e.exports=r(5224)},3574:(e,t,r)=>{e.exports=r(4374)},5884:(e,t,r)=>{e.exports=r(7867)},6038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getInclusionReasons=getInclusionReasons;var s=r(7849);var a=r(1610);var n=r(240);function getInclusionReasons(e,t,r){const i=r[e]||{};return Object.keys(t).reduce(((e,r)=>{const o=(0,n.getLowestImplementedVersion)(i,r);const l=t[r];if(!o){e[r]=(0,a.prettifyVersion)(l)}else{const t=(0,n.isUnreleasedVersion)(o,r);const i=(0,n.isUnreleasedVersion)(l,r);if(!i&&(t||s.lt(l.toString(),(0,n.semverify)(o)))){e[r]=(0,a.prettifyVersion)(l)}}return e}),{})}},4486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.targetsSupported=targetsSupported;t.isRequired=isRequired;t["default"]=filterItems;var s=r(7849);var a=r(5884);var n=r(240);function targetsSupported(e,t){const r=Object.keys(e);if(r.length===0){return false}const a=r.filter((r=>{const a=(0,n.getLowestImplementedVersion)(t,r);if(!a){return true}const i=e[r];if((0,n.isUnreleasedVersion)(i,r)){return false}if((0,n.isUnreleasedVersion)(a,r)){return true}if(!s.valid(i.toString())){throw new Error(`Invalid version passed for target "${r}": "${i}". `+"Versions must be in semver format (major.minor.patch)")}return s.gt((0,n.semverify)(a),i.toString())}));return a.length===0}function isRequired(e,t,{compatData:r=a,includes:s,excludes:n}={}){if(n!=null&&n.has(e))return false;if(s!=null&&s.has(e))return true;return!targetsSupported(t,r[e])}function filterItems(e,t,r,s,a,n,i){const o=new Set;const l={compatData:e,includes:t,excludes:r};for(const t in e){if(isRequired(t,s,l)){o.add(t)}else if(i){const e=i.get(t);if(e){o.add(e)}}}if(a){a.forEach((e=>!r.has(e)&&o.add(e)))}if(n){n.forEach((e=>!t.has(e)&&o.delete(e)))}return o}},4413:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isBrowsersQueryValid=isBrowsersQueryValid;t["default"]=getTargets;Object.defineProperty(t,"unreleasedLabels",{enumerable:true,get:function(){return o.unreleasedLabels}});Object.defineProperty(t,"TargetNames",{enumerable:true,get:function(){return l.TargetNames}});Object.defineProperty(t,"prettifyTargets",{enumerable:true,get:function(){return c.prettifyTargets}});Object.defineProperty(t,"getInclusionReasons",{enumerable:true,get:function(){return p.getInclusionReasons}});Object.defineProperty(t,"filterItems",{enumerable:true,get:function(){return u.default}});Object.defineProperty(t,"isRequired",{enumerable:true,get:function(){return u.isRequired}});var s=r(4907);var a=r(7347);var n=r(9302);var i=r(240);var o=r(1915);var l=r(1888);var c=r(1610);var p=r(6038);var u=r(4486);const d=n["es6.module"];const f=new a.OptionValidator("@babel/helper-compilation-targets");function validateTargetNames(e){const t=Object.keys(l.TargetNames);for(const r of Object.keys(e)){if(!(r in l.TargetNames)){throw new Error(f.formatMessage(`'${r}' is not a valid target\n- Did you mean '${(0,a.findSuggestion)(r,t)}'?`))}}return e}function isBrowsersQueryValid(e){return typeof e==="string"||Array.isArray(e)&&e.every((e=>typeof e==="string"))}function validateBrowsers(e){f.invariant(e===undefined||isBrowsersQueryValid(e),`'${String(e)}' is not a valid browserslist query`);return e}function getLowestVersions(e){return e.reduce(((e,t)=>{const[r,s]=t.split(" ");const a=o.browserNameMap[r];if(!a){return e}try{const t=s.split("-")[0].toLowerCase();const n=(0,i.isUnreleasedVersion)(t,r);if(!e[a]){e[a]=n?t:(0,i.semverify)(t);return e}const o=e[a];const l=(0,i.isUnreleasedVersion)(o,r);if(l&&n){e[a]=(0,i.getLowestUnreleased)(o,t,r)}else if(l){e[a]=(0,i.semverify)(t)}else if(!l&&!n){const r=(0,i.semverify)(t);e[a]=(0,i.semverMin)(o,r)}}catch(e){}return e}),{})}function outputDecimalWarning(e){if(!e.length){return}console.warn("Warning, the following targets are using a decimal version:\n");e.forEach((({target:e,value:t})=>console.warn(` ${e}: ${t}`)));console.warn(`\nWe recommend using a string for minor/patch versions to avoid numbers like 6.10\ngetting parsed as 6.1, which can lead to unexpected behavior.\n`)}function semverifyTarget(e,t){try{return(0,i.semverify)(t)}catch(r){throw new Error(f.formatMessage(`'${t}' is not a valid value for 'targets.${e}'.`))}}const m={__default(e,t){const r=(0,i.isUnreleasedVersion)(t,e)?t.toLowerCase():semverifyTarget(e,t);return[e,r]},node(e,t){const r=t===true||t==="current"?process.versions.node:semverifyTarget(e,t);return[e,r]}};function generateTargets(e){const t=Object.assign({},e);delete t.esmodules;delete t.browsers;return t}function resolveTargets(e){const t=s(e,{mobileToDesktop:true});return getLowestVersions(t)}function getTargets(e={},t={}){var r;let{browsers:a,esmodules:n}=e;const{configPath:o="."}=t;validateBrowsers(a);const l=generateTargets(e);let c=validateTargetNames(l);const p=!!a;const u=p||Object.keys(c).length>0;const f=!t.ignoreBrowserslistConfig&&!u;if(!a&&f){a=s.loadConfig({config:t.configFile,path:o,env:t.browserslistEnv});if(a==null){{a=[]}}}if(n&&(n!=="intersect"||!((r=a)!=null&&r.length))){a=Object.keys(d).map((e=>`${e} >= ${d[e]}`)).join(", ");n=false}if(a){const e=resolveTargets(a);if(n==="intersect"){for(const t of Object.keys(e)){const r=e[t];if(d[t]){e[t]=(0,i.getHighestUnreleased)(r,(0,i.semverify)(d[t]),t)}else{delete e[t]}}}c=Object.assign(e,c)}const h={};const y=[];for(const e of Object.keys(c).sort()){var g;const t=c[e];if(typeof t==="number"&&t%1!==0){y.push({target:e,value:t})}const r=(g=m[e])!=null?g:m.__default;const[s,a]=r(e,t);if(a){h[s]=a}}outputDecimalWarning(y);return h}},1888:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TargetNames=void 0;const r={node:"node",chrome:"chrome",opera:"opera",edge:"edge",firefox:"firefox",safari:"safari",ie:"ie",ios:"ios",android:"android",electron:"electron",samsung:"samsung",rhino:"rhino"};t.TargetNames=r},1610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.prettifyVersion=prettifyVersion;t.prettifyTargets=prettifyTargets;var s=r(7849);var a=r(1915);function prettifyVersion(e){if(typeof e!=="string"){return e}const t=[s.major(e)];const r=s.minor(e);const a=s.patch(e);if(r||a){t.push(r)}if(a){t.push(a)}return t.join(".")}function prettifyTargets(e){return Object.keys(e).reduce(((t,r)=>{let s=e[r];const n=a.unreleasedLabels[r];if(typeof s==="string"&&n!==s){s=prettifyVersion(s)}t[r]=s;return t}),{})}},1915:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.browserNameMap=t.unreleasedLabels=void 0;const r={safari:"tp"};t.unreleasedLabels=r;const s={and_chr:"chrome",and_ff:"firefox",android:"android",chrome:"chrome",edge:"edge",firefox:"firefox",ie:"ie",ie_mob:"ie",ios_saf:"ios",node:"node",op_mob:"opera",opera:"opera",safari:"safari",samsung:"samsung"};t.browserNameMap=s},240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.semverMin=semverMin;t.semverify=semverify;t.isUnreleasedVersion=isUnreleasedVersion;t.getLowestUnreleased=getLowestUnreleased;t.getHighestUnreleased=getHighestUnreleased;t.getLowestImplementedVersion=getLowestImplementedVersion;var s=r(7849);var a=r(7347);var n=r(1915);const i=/^(\d+|\d+.\d+)$/;const o=new a.OptionValidator("@babel/helper-compilation-targets");function semverMin(e,t){return e&&s.lt(e,t)?e:t}function semverify(e){if(typeof e==="string"&&s.valid(e)){return e}o.invariant(typeof e==="number"||typeof e==="string"&&i.test(e),`'${e}' is not a valid version`);const t=e.toString().split(".");while(t.length<3){t.push("0")}return t.join(".")}function isUnreleasedVersion(e,t){const r=n.unreleasedLabels[t];return!!r&&r===e.toString().toLowerCase()}function getLowestUnreleased(e,t,r){const s=n.unreleasedLabels[r];const a=[e,t].some((e=>e===s));if(a){return e===a?t:e||t}return semverMin(e,t)}function getHighestUnreleased(e,t,r){return getLowestUnreleased(e,t,r)===e?t:e}function getLowestImplementedVersion(e,t){const r=e[t];if(!r&&t==="android"){return e.chrome}return r}},5789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(8622);function _interopNamespace(e){if(e&&e.__esModule)return e;var t=Object.create(null);if(e){Object.keys(e).forEach((function(r){if(r!=="default"){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:true,get:function(){return e[r]}})}}))}t["default"]=e;return Object.freeze(t)}var a=_interopNamespace(s);function willPathCastToBoolean(e){const t=e;const{node:r,parentPath:s}=t;if(s.isLogicalExpression()){const{operator:e,right:t}=s.node;if(e==="&&"||e==="||"||e==="??"&&r===t){return willPathCastToBoolean(s)}}if(s.isSequenceExpression()){const{expressions:e}=s.node;if(e[e.length-1]===r){return willPathCastToBoolean(s)}else{return true}}return s.isConditional({test:r})||s.isUnaryExpression({operator:"!"})||s.isLoop({test:r})}class AssignmentMemoiser{constructor(){this._map=void 0;this._map=new WeakMap}has(e){return this._map.has(e)}get(e){if(!this.has(e))return;const t=this._map.get(e);const{value:r}=t;t.count--;if(t.count===0){return a.assignmentExpression("=",r,e)}return r}set(e,t,r){return this._map.set(e,{count:r,value:t})}}function toNonOptional(e,t){const{node:r}=e;if(a.isOptionalMemberExpression(r)){return a.memberExpression(t,r.property,r.computed)}if(e.isOptionalCallExpression()){const r=e.get("callee");if(e.node.optional&&r.isOptionalMemberExpression()){const{object:s}=r.node;const n=e.scope.maybeGenerateMemoised(s)||s;r.get("object").replaceWith(a.assignmentExpression("=",n,s));return a.callExpression(a.memberExpression(t,a.identifier("call")),[n,...e.node.arguments])}return a.callExpression(t,e.node.arguments)}return e.node}function isInDetachedTree(e){while(e){if(e.isProgram())break;const{parentPath:t,container:r,listKey:s}=e;const a=t.node;if(s){if(r!==a[s])return true}else{if(r!==a)return true}e=t}return false}const n={memoise(){},handle(e,t){const{node:r,parent:s,parentPath:n,scope:i}=e;if(e.isOptionalMemberExpression()){if(isInDetachedTree(e))return;const o=e.find((({node:t,parent:r})=>{if(a.isOptionalMemberExpression(r)){return r.optional||r.object!==t}if(a.isOptionalCallExpression(r)){return t!==e.node&&r.optional||r.callee!==t}return true}));if(i.path.isPattern()){o.replaceWith(a.callExpression(a.arrowFunctionExpression([],o.node),[]));return}const l=willPathCastToBoolean(o);const c=o.parentPath;if(c.isUpdateExpression({argument:r})||c.isAssignmentExpression({left:r})){throw e.buildCodeFrameError(`can't handle assignment`)}const p=c.isUnaryExpression({operator:"delete"});if(p&&o.isOptionalMemberExpression()&&o.get("property").isPrivateName()){throw e.buildCodeFrameError(`can't delete a private class element`)}let u=e;for(;;){if(u.isOptionalMemberExpression()){if(u.node.optional)break;u=u.get("object");continue}else if(u.isOptionalCallExpression()){if(u.node.optional)break;u=u.get("callee");continue}throw new Error(`Internal error: unexpected ${u.node.type}`)}const d=u.isOptionalMemberExpression()?"object":"callee";const f=u.node[d];const m=i.maybeGenerateMemoised(f);const h=m!=null?m:f;const y=n.isOptionalCallExpression({callee:r});const isOptionalCall=e=>y;const g=n.isCallExpression({callee:r});u.replaceWith(toNonOptional(u,h));if(isOptionalCall()){if(s.optional){n.replaceWith(this.optionalCall(e,s.arguments))}else{n.replaceWith(this.call(e,s.arguments))}}else if(g){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}let b=e.node;for(let t=e;t!==o;){const e=t.parentPath;if(e===o&&isOptionalCall()&&s.optional){b=e.node;break}b=toNonOptional(e,b);t=e}let x;const v=o.parentPath;if(a.isMemberExpression(b)&&v.isOptionalCallExpression({callee:o.node,optional:true})){const{object:t}=b;x=e.scope.maybeGenerateMemoised(t);if(x){b.object=a.assignmentExpression("=",x,t)}}let E=o;if(p){E=v;b=v.node}const w=m?a.assignmentExpression("=",a.cloneNode(h),a.cloneNode(f)):a.cloneNode(h);if(l){let e;if(t){e=a.binaryExpression("!=",w,a.nullLiteral())}else{e=a.logicalExpression("&&",a.binaryExpression("!==",w,a.nullLiteral()),a.binaryExpression("!==",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.logicalExpression("&&",e,b))}else{let e;if(t){e=a.binaryExpression("==",w,a.nullLiteral())}else{e=a.logicalExpression("||",a.binaryExpression("===",w,a.nullLiteral()),a.binaryExpression("===",a.cloneNode(h),i.buildUndefinedNode()))}E.replaceWith(a.conditionalExpression(e,p?a.booleanLiteral(true):i.buildUndefinedNode(),b))}if(x){const e=v.node;v.replaceWith(a.optionalCallExpression(a.optionalMemberExpression(e.callee,a.identifier("call"),false,true),[a.cloneNode(x),...e.arguments],false))}return}if(a.isUpdateExpression(s,{argument:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,prefix:i}=s;this.memoise(e,2);const o=a.binaryExpression(t[0],a.unaryExpression("+",this.get(e)),a.numericLiteral(1));if(i){n.replaceWith(this.set(e,o))}else{const{scope:t}=e;const s=t.generateUidIdentifierBasedOnNode(r);t.push({id:s});o.left=a.assignmentExpression("=",a.cloneNode(s),o.left);n.replaceWith(a.sequenceExpression([this.set(e,o),a.cloneNode(s)]))}return}if(n.isAssignmentExpression({left:r})){if(this.simpleSet){e.replaceWith(this.simpleSet(e));return}const{operator:t,right:r}=n.node;if(t==="="){n.replaceWith(this.set(e,r))}else{const s=t.slice(0,-1);if(a.LOGICAL_OPERATORS.includes(s)){this.memoise(e,1);n.replaceWith(a.logicalExpression(s,this.get(e),this.set(e,r)))}else{this.memoise(e,2);n.replaceWith(this.set(e,a.binaryExpression(s,this.get(e),r)))}}return}if(n.isCallExpression({callee:r})){n.replaceWith(this.call(e,n.node.arguments));return}if(n.isOptionalCallExpression({callee:r})){if(i.path.isPattern()){n.replaceWith(a.callExpression(a.arrowFunctionExpression([],n.node),[]));return}n.replaceWith(this.optionalCall(e,n.node.arguments));return}if(n.isForXStatement({left:r})||n.isObjectProperty({value:r})&&n.parentPath.isObjectPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isObjectProperty({value:s})&&n.parentPath.parentPath.isObjectPattern()||n.isArrayPattern()||n.isAssignmentPattern({left:r})&&n.parentPath.isArrayPattern()||n.isRestElement()){e.replaceWith(this.destructureSet(e));return}if(n.isTaggedTemplateExpression()){e.replaceWith(this.boundGet(e))}else{e.replaceWith(this.get(e))}}};function memberExpressionToFunctions(e,t,r){e.traverse(t,Object.assign({},n,r,{memoiser:new AssignmentMemoiser}))}t["default"]=memberExpressionToFunctions},558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},1626:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var s=r(558);var a=r(7490);var n=r(5480);var i=r(8304);function matchAffectedArguments(e){const t=e.findIndex((e=>i.types.isSpreadElement(e)));return t>=0&&t!==e.length-1}function shouldTransform(e){let t=e;const r=[];while(t.isOptionalMemberExpression()||t.isOptionalCallExpression()){const{node:e}=t;r.push(e);if(t.isOptionalMemberExpression()){t=n.skipTransparentExprWrappers(t.get("object"))}else if(t.isOptionalCallExpression()){t=n.skipTransparentExprWrappers(t.get("callee"))}}for(let e=0;e{e.assertVersion(7);const t=e.assumption("noDocumentAll");const r=e.assumption("pureGetters");return{name:"bugfix-v8-spread-parameters-in-optional-chaining",visitor:{"OptionalCallExpression|OptionalMemberExpression"(e){if(shouldTransform(e)){a.transform(e,{noDocumentAll:t,pureGetters:r})}}}}}));t["default"]=o},1023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(8304);const a=(0,s.template)(`\n async function wrapper() {\n var ITERATOR_ABRUPT_COMPLETION = false;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY;\n try {\n for (\n var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY;\n ITERATOR_ABRUPT_COMPLETION = !(STEP_KEY = await ITERATOR_KEY.next()).done;\n ITERATOR_ABRUPT_COMPLETION = false\n ) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (ITERATOR_ABRUPT_COMPLETION && ITERATOR_KEY.return != null) {\n await ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n }\n`);function _default(e,{getAsyncIterator:t}){const{node:r,scope:n,parent:i}=e;const o=n.generateUidIdentifier("step");const l=s.types.memberExpression(o,s.types.identifier("value"));const c=r.left;let p;if(s.types.isIdentifier(c)||s.types.isPattern(c)||s.types.isMemberExpression(c)){p=s.types.expressionStatement(s.types.assignmentExpression("=",c,l))}else if(s.types.isVariableDeclaration(c)){p=s.types.variableDeclaration(c.kind,[s.types.variableDeclarator(c.declarations[0].id,l)])}let u=a({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_ABRUPT_COMPLETION:n.generateUidIdentifier("iteratorAbruptCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:n.generateUidIdentifier("iterator"),GET_ITERATOR:t,OBJECT:r.right,STEP_KEY:s.types.cloneNode(o)});u=u.body.body;const d=s.types.isLabeledStatement(i);const f=u[3].block.body;const m=f[0];if(d){f[0]=s.types.labeledStatement(i.label,m)}return{replaceParent:d,node:u,declar:p,loop:m}}},2271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=r(7120);var n=r(1079);var i=r(8304);var o=r(1023);var l=(0,s.declare)((e=>{e.assertVersion(7);const t={Function(e){e.skip()},YieldExpression({node:e},t){if(!e.delegate)return;const r=t.addHelper("asyncGeneratorDelegate");e.argument=i.types.callExpression(r,[i.types.callExpression(t.addHelper("asyncIterator"),[e.argument]),t.addHelper("awaitAsyncGenerator")])}};const r={Function(e){e.skip()},ForOfStatement(e,{file:t}){const{node:r}=e;if(!r.await)return;const s=(0,o.default)(e,{getAsyncIterator:t.addHelper("asyncIterator")});const{declar:a,loop:n}=s;const l=n.body;e.ensureBlock();if(a){l.body.push(a)}l.body=l.body.concat(r.body.body);i.types.inherits(n,r);i.types.inherits(n.body,r.body);if(s.replaceParent){e.parentPath.replaceWithMultiple(s.node)}else{e.replaceWithMultiple(s.node)}}};const s={Function(e,s){if(!e.node.async)return;e.traverse(r,s);if(!e.node.generator)return;e.traverse(t,s);(0,a.default)(e,{wrapAsync:s.addHelper("wrapAsyncGenerator"),wrapAwait:s.addHelper("awaitAsyncGenerator")})}};return{name:"proposal-async-generator-functions",inherits:n.default,visitor:{Program(e,t){e.traverse(s,t)}}}}));t["default"]=l},5557:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=r(8142);var n=r(6758);function generateUid(e,t){const r="";let s;let a=1;do{s=e._generateUid(r,a);a++}while(t.has(s));return s}var i=(0,s.declare)((({types:e,template:t,assertVersion:r})=>{r("^7.12.0");return{name:"proposal-class-static-block",inherits:a.default,pre(){(0,n.enableFeature)(this.file,n.FEATURES.staticBlocks,false)},visitor:{ClassBody(r){const{scope:s}=r;const a=new Set;const n=r.get("body");for(const e of n){if(e.isPrivate()){a.add(e.get("key.id").node.name)}}for(const r of n){if(!r.isStaticBlock())continue;const n=generateUid(s,a);a.add(n);const i=e.privateName(e.identifier(n));r.replaceWith(e.classPrivateProperty(i,t.expression.ast`(() => { ${r.node.body} })()`,[],true))}}}}}));t["default"]=i},3181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=r(7445);var n=r(6758);var i=r(2155);var o=(0,s.declare)((({assertVersion:e,types:t,template:r},{loose:s})=>{e(7);const o=new WeakMap;const l=new WeakMap;function unshadow(e,t,r){while(r!==t){if(r.hasOwnBinding(e))r.rename(e);r=r.parent}}function injectToFieldInit(e,r,s=false){if(e.node.value){if(s){e.get("value").insertBefore(r)}else{e.get("value").insertAfter(r)}}else{e.set("value",t.unaryExpression("void",r))}}function injectInitialization(e,r){let s;let a;for(const t of e.get("body.body")){if((t.isClassProperty()||t.isClassPrivateProperty())&&!t.node.static){s=t;break}if(!a&&t.isClassMethod({kind:"constructor"})){a=t}}if(s){injectToFieldInit(s,r,true)}else{(0,n.injectInitialization)(e,a,[t.expressionStatement(r)])}}function getWeakSetId(e,s,a,n="",l){let c=o.get(a.node);if(!c){c=s.scope.generateUidIdentifier(`${n||""} brandCheck`);o.set(a.node,c);l(a,r.expression.ast`${t.cloneNode(c)}.add(this)`);const e=t.newExpression(t.identifier("WeakSet"),[]);(0,i.default)(e);s.insertBefore(r.ast`var ${c} = ${e}`)}return t.cloneNode(c)}return{name:"proposal-private-property-in-object",inherits:a.default,pre(){(0,n.enableFeature)(this.file,n.FEATURES.privateIn,s)},visitor:{BinaryExpression(e){const{node:s}=e;if(s.operator!=="in")return;if(!t.isPrivateName(s.left))return;const{name:a}=s.left.id;let n;const i=e.findParent((e=>{if(!e.isClass())return false;n=e.get("body.body").find((({node:e})=>t.isPrivate(e)&&e.key.id.name===a));return!!n}));if(i.parentPath.scope.path.isPattern()){i.replaceWith(r.ast`(() => ${i.node})()`);return}if(n.isMethod()){if(n.node.static){if(i.node.id){unshadow(i.node.id.name,i.scope,e.scope)}else{i.set("id",e.scope.generateUidIdentifier("class"))}e.replaceWith(r.expression.ast`
${t.cloneNode(i.node.id)} === ${e.node.right}
`)}else{var c;const t=getWeakSetId(o,i,i,(c=i.node.id)==null?void 0:c.name,injectInitialization);e.replaceWith(r.expression.ast`${t}.has(${e.node.right})`)}}else{const t=getWeakSetId(l,i,n,n.node.key.id.name,injectToFieldInit);e.replaceWith(r.expression.ast`${t}.has(${e.node.right})`)}}}}}));t["default"]=o},6092:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(6550);var a=r(558);var n=(0,a.declare)(((e,t)=>{e.assertVersion(7);const{useUnicodeFlag:r=true}=t;if(typeof r!=="boolean"){throw new Error(".useUnicodeFlag must be a boolean, or undefined")}return(0,s.createRegExpFeaturePlugin)({name:"proposal-unicode-property-regex",feature:"unicodePropertyEscape",options:{useUnicodeFlag:r}})}));t["default"]=n},1079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(631);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-async-generators",manipulateOptions(e,t){t.plugins.push("asyncGenerators")}}}));t["default"]=a},631:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,r,s)=>{if(!t.assertVersion){t=Object.assign(copyApiObject(t),{assertVersion(e){throwVersionError(e,t.version)}})}return e(t,r||{},s)}}function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},6762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(8853);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-bigint",manipulateOptions(e,t){t.plugins.push("bigInt")}}}));t["default"]=a},8853:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,r,s)=>{if(!t.assertVersion){t=Object.assign(copyApiObject(t),{assertVersion(e){throwVersionError(e,t.version)}})}return e(t,r||{},s)}}function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(93);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-class-properties",manipulateOptions(e,t){t.plugins.push("classProperties","classPrivateProperties","classPrivateMethods")}}}));t["default"]=a},93:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,s,a)=>{var n;let i;for(const e of Object.keys(r)){var o;if(t[e])continue;i=(o=i)!=null?o:copyApiObject(t);i[e]=r[e](i)}return e((n=i)!=null?n:t,s||{},a)}}const r={assertVersion:e=>t=>{throwVersionError(t,e.version)},targets:()=>()=>({}),assumption:()=>()=>{}};function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},8142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-class-static-block",manipulateOptions(e,t){t.plugins.push("classStaticBlock")}}}));t["default"]=a},5163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(2083);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-dynamic-import",manipulateOptions(e,t){t.plugins.push("dynamicImport")}}}));t["default"]=a},2083:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.declare=declare;function declare(e){return(t,r,s)=>{if(!t.assertVersion){t=Object.assign(copyApiObject(t),{assertVersion(e){throwVersionError(e,t.version)}})}return e(t,r||{},s)}}function copyApiObject(e){let t=null;if(typeof e.version==="string"&&/^7\./.test(e.version)){t=Object.getPrototypeOf(e);if(t&&(!has(t,"version")||!has(t,"transform")||!has(t,"template")||!has(t,"types"))){t=null}}return Object.assign({},t,e)}function has(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function throwVersionError(e,t){if(typeof e==="number"){if(!Number.isInteger(e)){throw new Error("Expected string or integer value.")}e=`^${e}.0.0-0`}if(typeof e!=="string"){throw new Error("Expected string or integer value.")}const r=Error.stackTraceLimit;if(typeof r==="number"&&r<25){Error.stackTraceLimit=25}let s;if(t.slice(0,2)==="7."){s=new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${t}". `+`You'll need to update your @babel/core version.`)}else{s=new Error(`Requires Babel "${e}", but was loaded with "${t}". `+`If you are sure you have a compatible version of @babel/core, `+`it is likely that something in your build process is loading the `+`wrong version. Inspect the stack trace of this error to look for `+`the first entry that doesn't mention "@babel/core" or "babel-core" `+`to see what is calling Babel.`)}if(typeof r==="number"){Error.stackTraceLimit=r}throw Object.assign(s,{code:"BABEL_VERSION_UNSUPPORTED",version:t,range:e})}},7445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=(0,s.declare)((e=>{e.assertVersion(7);return{name:"syntax-private-property-in-object",manipulateOptions(e,t){t.plugins.push("privateIn")}}}));t["default"]=a},6050:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);function removePlugin(e,t){const r=[];e.forEach(((e,s)=>{const a=Array.isArray(e)?e[0]:e;if(a===t){r.unshift(s)}}));for(const t of r){e.splice(t,1)}}var a=(0,s.declare)(((e,{isTSX:t})=>{e.assertVersion(7);return{name:"syntax-typescript",manipulateOptions(e,r){const{plugins:s}=r;removePlugin(s,"flow");removePlugin(s,"jsx");r.plugins.push("typescript","classProperties");{r.plugins.push("objectRestSpread")}if(t){r.plugins.push("jsx")}}}}));t["default"]=a},6408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var s=r(558);var a=r(2155);var n=r(550);var i=r(7058);var o=r(8304);var l=r(5548);var c=r(4546);const getBuiltinClasses=e=>Object.keys(l[e]).filter((e=>/^[A-Z]/.test(e)));const p=new Set([...getBuiltinClasses("builtin"),...getBuiltinClasses("browser")]);var u=(0,s.declare)(((e,t)=>{var r,s,l,u;e.assertVersion(7);const{loose:d}=t;const f=(r=e.assumption("setClassMethods"))!=null?r:t.loose;const m=(s=e.assumption("constantSuper"))!=null?s:t.loose;const h=(l=e.assumption("superIsCallableConstructor"))!=null?l:t.loose;const y=(u=e.assumption("noClassCalls"))!=null?u:t.loose;const g=Symbol();return{name:"transform-classes",visitor:{ExportDefaultDeclaration(e){if(!e.get("declaration").isClassDeclaration())return;(0,i.default)(e)},ClassDeclaration(e){const{node:t}=e;const r=t.id||e.scope.generateUidIdentifier("class");e.replaceWith(o.types.variableDeclaration("let",[o.types.variableDeclarator(r,o.types.toExpression(t))]))},ClassExpression(e,t){const{node:r}=e;if(r[g])return;const s=(0,n.default)(e);if(s&&s!==r){e.replaceWith(s);return}r[g]=true;e.replaceWith((0,c.default)(e,t.file,p,d,{setClassMethods:f,constantSuper:m,superIsCallableConstructor:h,noClassCalls:y}));if(e.isCallExpression()){(0,a.default)(e);const t=e.get("callee");if(t.isArrowFunctionExpression()){t.arrowFunctionToExpression()}}}}}}));t["default"]=u},7677:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=addCreateSuperHelper;var s=r(8304);const a=new WeakMap;function addCreateSuperHelper(e){if(a.has(e)){return(s.types.cloneNode||s.types.clone)(a.get(e))}try{return e.addHelper("createSuper")}catch(e){}const t=e.scope.generateUidIdentifier("createSuper");a.set(e,t);const r=n({CREATE_SUPER:t,GET_PROTOTYPE_OF:e.addHelper("getPrototypeOf"),POSSIBLE_CONSTRUCTOR_RETURN:e.addHelper("possibleConstructorReturn")});e.path.unshiftContainer("body",[r]);e.scope.registerDeclaration(e.path.get("body.0"));return s.types.cloneNode(t)}const n=s.template.statement`
function CREATE_SUPER(Derived) {
@@ -443,7 +443,7 @@
// writable is false by default
value: ${o.name}
});
- `}function buildPrivateMethodDeclaration(e,t,r=false){const a=t.get(e.node.key.id.name);const{id:n,methodId:i,getId:o,setId:l,getterDeclared:c,setterDeclared:p,static:u}=a;const{params:d,body:f,generator:m,async:h}=e.node;const y=o&&!c&&d.length===0;const g=l&&!p&&d.length>0;let b=i;if(y){t.set(e.node.key.id.name,Object.assign({},a,{getterDeclared:true}));b=o}else if(g){t.set(e.node.key.id.name,Object.assign({},a,{setterDeclared:true}));b=l}else if(u&&!r){b=n}return s.types.functionDeclaration(s.types.cloneNode(b),d,f,m,h)}const f=s.traverse.visitors.merge([{ThisExpression(e,t){t.needsClassRef=true;e.replaceWith(s.types.cloneNode(t.classRef))},MetaProperty(e){const t=e.get("meta");const r=e.get("property");const{scope:s}=e;if(t.isIdentifier({name:"new"})&&r.isIdentifier({name:"target"})){e.replaceWith(s.buildUndefinedNode())}}},a.environmentVisitor]);const m={ReferencedIdentifier(e,t){if(e.scope.bindingIdentifierEquals(e.node.name,t.innerBinding)){t.needsClassRef=true;e.node.name=t.classRef.name}}};function replaceThisContext(e,t,r,n,i,o,l){var c;const p={classRef:t,needsClassRef:false,innerBinding:l};const u=new a.default({methodPath:e,constantSuper:o,file:n,refToPreserve:t,getSuperRef:r,getObjectRef(){p.needsClassRef=true;return i||e.node.static?t:s.types.memberExpression(t,s.types.identifier("prototype"))}});u.replace();if(i||e.isProperty()){e.traverse(f,p)}if((c=p.classRef)!=null&&c.name&&p.classRef.name!==(l==null?void 0:l.name)){e.traverse(m,p)}return p.needsClassRef}function buildFieldsInitNodes(e,t,r,a,n,i,o,c,p){let u=false;let d;const f=[];const m=[];const h=[];const y=s.types.isIdentifier(t)?()=>t:()=>{var e;(e=d)!=null?e:d=r[0].scope.generateUidIdentifierBasedOnNode(t);return d};for(const t of r){t.isClassProperty()&&l.assertFieldTransformed(t);const r=t.node.static;const d=!r;const g=t.isPrivate();const b=!g;const x=t.isProperty();const v=!x;const E=t.isStaticBlock==null?void 0:t.isStaticBlock();if(r||v&&g||E){const r=replaceThisContext(t,e,y,n,E,c,p);u=u||r}switch(true){case E:f.push(s.template.statement.ast`(() => ${s.types.blockStatement(t.node.body)})()`);break;case r&&g&&x&&o:u=true;f.push(buildPrivateFieldInitLoose(s.types.cloneNode(e),t,a));break;case r&&g&&x&&!o:u=true;f.push(buildPrivateStaticFieldInitSpec(t,a));break;case r&&b&&x&&i:u=true;f.push(buildPublicFieldInitLoose(s.types.cloneNode(e),t));break;case r&&b&&x&&!i:u=true;f.push(buildPublicFieldInitSpec(s.types.cloneNode(e),t,n));break;case d&&g&&x&&o:m.push(buildPrivateFieldInitLoose(s.types.thisExpression(),t,a));break;case d&&g&&x&&!o:m.push(buildPrivateInstanceFieldInitSpec(s.types.thisExpression(),t,a));break;case d&&g&&v&&o:m.unshift(buildPrivateMethodInitLoose(s.types.thisExpression(),t,a));h.push(buildPrivateMethodDeclaration(t,a,o));break;case d&&g&&v&&!o:m.unshift(buildPrivateInstanceMethodInitSpec(s.types.thisExpression(),t,a));h.push(buildPrivateMethodDeclaration(t,a,o));break;case r&&g&&v&&!o:u=true;f.unshift(buildPrivateStaticFieldInitSpec(t,a));h.push(buildPrivateMethodDeclaration(t,a,o));break;case r&&g&&v&&o:u=true;f.unshift(buildPrivateStaticMethodInitLoose(s.types.cloneNode(e),t,n,a));h.push(buildPrivateMethodDeclaration(t,a,o));break;case d&&b&&x&&i:m.push(buildPublicFieldInitLoose(s.types.thisExpression(),t));break;case d&&b&&x&&!i:m.push(buildPublicFieldInitSpec(s.types.thisExpression(),t,n));break;default:throw new Error("Unreachable.")}}return{staticNodes:f.filter(Boolean),instanceNodes:m.filter(Boolean),pureStaticNodes:h.filter(Boolean),wrapClass(t){for(const e of r){e.remove()}if(d){t.scope.push({id:s.types.cloneNode(d)});t.set("superClass",s.types.assignmentExpression("=",d,t.node.superClass))}if(!u)return t;if(t.isClassExpression()){t.scope.push({id:e});t.replaceWith(s.types.assignmentExpression("=",s.types.cloneNode(e),t.node))}else if(!t.node.id){t.node.id=e}return t}}}},738:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createClassFeaturePlugin=createClassFeaturePlugin;Object.defineProperty(t,"injectInitialization",{enumerable:true,get:function(){return l.injectInitialization}});Object.defineProperty(t,"enableFeature",{enumerable:true,get:function(){return c.enableFeature}});Object.defineProperty(t,"FEATURES",{enumerable:true,get:function(){return c.FEATURES}});var s=r(8304);var a=r(550);var n=r(7058);var i=r(196);var o=r(7055);var l=r(3235);var c=r(5123);const p="7.15.0".split(".").reduce(((e,t)=>e*1e5+ +t),0);const u="@babel/plugin-class-features/version";function createClassFeaturePlugin({name:e,feature:t,loose:r,manipulateOptions:d,api:f={assumption:()=>void 0}}){const m=f.assumption("setPublicClassFields");const h=f.assumption("privateFieldsAsProperties");const y=f.assumption("constantSuper");const g=f.assumption("noDocumentAll");if(r===true){const t=[];if(m!==undefined){t.push(`"setPublicClassFields"`)}if(h!==undefined){t.push(`"privateFieldsAsProperties"`)}if(t.length!==0){console.warn(`[${e}]: You are using the "loose: true" option and you are`+` explicitly setting a value for the ${t.join(" and ")}`+` assumption${t.length>1?"s":""}. The "loose" option`+` can cause incompatibilities with the other class features`+` plugins, so it's recommended that you replace it with the`+` following top-level option:\n`+`\t"assumptions": {\n`+`\t\t"setPublicClassFields": true,\n`+`\t\t"privateFieldsAsProperties": true\n`+`\t}`)}}return{name:e,manipulateOptions:d,pre(){(0,c.enableFeature)(this.file,t,r);if(!this.file.get(u)||this.file.get(u)
0){(0,l.injectInitialization)(e,d,A,((e,t)=>{if(f)return;for(const r of b){if(r.node.static)continue;r.traverse(e,t)}}))}const D=O(e);D.insertBefore([..._,...k]);if(I.length>0){D.insertAfter(I)}if(C.length>0){D.find((e=>e.isStatement()||e.isDeclaration())).insertAfter(C)}},PrivateName(e){if(this.file.get(u)!==p||e.parentPath.isPrivate({key:e.node})){return}throw e.buildCodeFrameError(`Unknown PrivateName "${e}"`)},ExportDefaultDeclaration(e){if(this.file.get(u)!==p)return;const t=e.get("declaration");if(t.isClassDeclaration()&&(0,o.hasDecorators)(t.node)){if(t.node.id){(0,n.default)(e)}else{t.node.type="ClassExpression"}}}}}}},3235:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.injectInitialization=injectInitialization;t.extractComputedKeys=extractComputedKeys;var s=r(8304);var a=r(4725);const n=s.traverse.visitors.merge([{Super(e){const{node:t,parentPath:r}=e;if(r.isCallExpression({callee:t})){this.push(r)}}},a.environmentVisitor]);const i={"TSTypeAnnotation|TypeAnnotation"(e){e.skip()},ReferencedIdentifier(e){if(this.scope.hasOwnBinding(e.node.name)){this.scope.rename(e.node.name);e.skip()}}};function handleClassTDZ(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const r=t.file.addHelper("classNameTDZError");const a=s.types.callExpression(r,[s.types.stringLiteral(e.node.name)]);e.replaceWith(s.types.sequenceExpression([a,e.node]));e.skip()}}const o={ReferencedIdentifier:handleClassTDZ};function injectInitialization(e,t,r,a){if(!r.length)return;const o=!!e.node.superClass;if(!t){const r=s.types.classMethod("constructor",s.types.identifier("constructor"),[],s.types.blockStatement([]));if(o){r.params=[s.types.restElement(s.types.identifier("args"))];r.body.body.push(s.template.statement.ast`super(...args)`)}[t]=e.get("body").unshiftContainer("body",r)}if(a){a(i,{scope:t.scope})}if(o){const e=[];t.traverse(n,e);let a=true;for(const t of e){if(a){t.insertAfter(r);a=false}else{t.insertAfter(r.map((e=>s.types.cloneNode(e))))}}}else{t.get("body").unshiftContainer("body",r)}}function extractComputedKeys(e,t,r,a){const n=[];const i={classBinding:t.node.id&&t.scope.getBinding(t.node.id.name),file:a};for(const e of r){const r=e.get("key");if(r.isReferencedIdentifier()){handleClassTDZ(r,i)}else{r.traverse(o,i)}const a=e.node;if(!r.isConstantExpression()){const e=t.scope.generateUidIdentifierBasedOnNode(a.key);t.scope.push({id:e,kind:"let"});n.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.cloneNode(e),a.key)));a.key=s.types.cloneNode(e)}}return n}},5464:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertFieldTransformed=assertFieldTransformed;function assertFieldTransformed(e){if(e.node.declare){throw e.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by `+`@babel/plugin-transform-typescript.\n`+`If you have already enabled that plugin (or '@babel/preset-typescript'), make sure `+`that it runs before any plugin related to additional class features:\n`+` - @babel/plugin-proposal-class-properties\n`+` - @babel/plugin-proposal-private-methods\n`+` - @babel/plugin-proposal-decorators`)}}},4725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.skipAllButComputedKey=skipAllButComputedKey;t["default"]=t.environmentVisitor=void 0;var s=r(7369);var a=r(5789);var n=r(6721);var i=r(8622);function getPrototypeOfExpression(e,t,r,s){e=i.cloneNode(e);const a=t||s?e:i.memberExpression(e,i.identifier("prototype"));return i.callExpression(r.addHelper("getPrototypeOf"),[a])}function skipAllButComputedKey(e){if(!e.node.computed){e.skip();return}const t=i.VISITOR_KEYS[e.type];for(const r of t){if(r!=="key")e.skipKey(r)}}const o={[`${i.staticBlock?"StaticBlock|":""}ClassPrivateProperty|TypeAnnotation`](e){e.skip()},Function(e){if(e.isMethod())return;if(e.isArrowFunctionExpression())return;e.skip()},"Method|ClassProperty"(e){skipAllButComputedKey(e)}};t.environmentVisitor=o;const l=s.default.visitors.merge([o,{Super(e,t){const{node:r,parentPath:s}=e;if(!s.isMemberExpression({object:r}))return;t.handle(s)}}]);const c=s.default.visitors.merge([o,{Scopable(e,{refName:t}){const r=e.scope.getOwnBinding(t);if(r&&r.identifier.name===t){e.scope.rename(t)}}}]);const p={memoise(e,t){const{scope:r,node:s}=e;const{computed:a,property:n}=s;if(!a){return}const i=r.maybeGenerateMemoised(n);if(!i){return}this.memoiser.set(n,i,t)},prop(e){const{computed:t,property:r}=e.node;if(this.memoiser.has(r)){return i.cloneNode(this.memoiser.get(r))}if(t){return i.cloneNode(r)}return i.stringLiteral(r.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,t){const r=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return i.callExpression(this.file.addHelper("get"),[t.memo?i.sequenceExpression([t.memo,r]):r,this.prop(e),t.this])},_getThisRefs(){if(!this.isDerivedConstructor){return{this:i.thisExpression()}}const e=this.scope.generateDeclaredUidIdentifier("thisSuper");return{memo:i.assignmentExpression("=",e,i.thisExpression()),this:i.cloneNode(e)}},set(e,t){const r=this._getThisRefs();const s=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return i.callExpression(this.file.addHelper("set"),[r.memo?i.sequenceExpression([r.memo,s]):s,this.prop(e),t,r.this,i.booleanLiteral(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,t){const r=this._getThisRefs();return(0,n.default)(this._get(e,r),i.cloneNode(r.this),t,false)},optionalCall(e,t){const r=this._getThisRefs();return(0,n.default)(this._get(e,r),i.cloneNode(r.this),t,true)}};const u=Object.assign({},p,{prop(e){const{property:t}=e.node;if(this.memoiser.has(t)){return i.cloneNode(this.memoiser.get(t))}return i.cloneNode(t)},get(e){const{isStatic:t,getSuperRef:r}=this;const{computed:s}=e.node;const a=this.prop(e);let n;if(t){var o;n=(o=r())!=null?o:i.memberExpression(i.identifier("Function"),i.identifier("prototype"))}else{var l;n=i.memberExpression((l=r())!=null?l:i.identifier("Object"),i.identifier("prototype"))}return i.memberExpression(n,a,s)},set(e,t){const{computed:r}=e.node;const s=this.prop(e);return i.assignmentExpression("=",i.memberExpression(i.thisExpression(),s,r),t)},destructureSet(e){const{computed:t}=e.node;const r=this.prop(e);return i.memberExpression(i.thisExpression(),r,t)},call(e,t){return(0,n.default)(this.get(e),i.thisExpression(),t,false)},optionalCall(e,t){return(0,n.default)(this.get(e),i.thisExpression(),t,true)}});class ReplaceSupers{constructor(e){var t;const r=e.methodPath;this.methodPath=r;this.isDerivedConstructor=r.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=r.isObjectMethod()||r.node.static||(r.isStaticBlock==null?void 0:r.isStaticBlock());this.isPrivateMethod=r.isPrivate()&&r.isMethod();this.file=e.file;this.constantSuper=(t=e.constantSuper)!=null?t:e.isLoose;this.opts=e}getObjectRef(){return i.cloneNode(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return i.cloneNode(this.opts.superRef);if(this.opts.getSuperRef)return i.cloneNode(this.opts.getSuperRef())}replace(){if(this.opts.refToPreserve){this.methodPath.traverse(c,{refName:this.opts.refToPreserve.name})}const e=this.constantSuper?u:p;(0,a.default)(this.methodPath,l,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:e.get},e))}}t["default"]=ReplaceSupers},4951:e=>{const t=new Set(["proposal-class-static-block"]);const r={"proposal-async-generator-functions":"syntax-async-generators","proposal-class-properties":"syntax-class-properties","proposal-class-static-block":"syntax-class-static-block","proposal-json-strings":"syntax-json-strings","proposal-nullish-coalescing-operator":"syntax-nullish-coalescing-operator","proposal-numeric-separator":"syntax-numeric-separator","proposal-object-rest-spread":"syntax-object-rest-spread","proposal-optional-catch-binding":"syntax-optional-catch-binding","proposal-optional-chaining":"syntax-optional-chaining","proposal-private-methods":"syntax-class-properties","proposal-private-property-in-object":"syntax-private-property-in-object","proposal-unicode-property-regex":null};const s=Object.keys(r).map((function(e){return[e,r[e]]}));const a=new Map(s);e.exports={pluginSyntaxMap:a,proposalPlugins:t}},9199:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.minVersions=t["default"]=void 0;var s=r(1079);var a=r(947);var n=r(8142);var i=r(5163);var o=r(1454);var l=r(3030);var c=r(5945);var p=r(5879);var u=r(1816);var d=r(4499);var f=r(7452);var m=r(79);var h=r(7445);var y=r(4893);var g=r(2271);var b=r(7361);var x=r(5557);var v=r(4920);var E=r(9579);var w=r(7703);var j=r(1195);var S=r(5353);var P=r(7300);var _=r(6309);var k=r(4195);var I=r(7490);var A=r(9062);var C=r(3181);var O=r(6092);var D=r(6413);var N=r(513);var R=r(8363);var M=r(1630);var L=r(6408);var F=r(8120);var B=r(5157);var U=r(5843);var V=r(7850);var W=r(1176);var $=r(9488);var q=r(715);var H=r(5072);var z=r(4674);var G=r(8657);var K=r(6186);var X=r(730);var J=r(9942);var Y=r(8447);var Q=r(9545);var Z=r(570);var ee=r(3714);var te=r(2970);var re=r(5628);var se=r(8720);var ae=r(8648);var ne=r(8476);var ie=r(1245);var oe=r(5356);var le=r(5502);var ce=r(3448);var pe=r(4122);var ue=r(9453);var de=r(489);var fe=r(3258);var me=r(3744);var he=r(5899);var ye=r(6668);var ge=r(1626);var be={"bugfix/transform-async-arrows-in-class":()=>ue,"bugfix/transform-edge-default-parameters":()=>de,"bugfix/transform-edge-function-name":()=>fe,"bugfix/transform-safari-block-shadowing":()=>he,"bugfix/transform-safari-for-shadowing":()=>ye,"bugfix/transform-tagged-template-caching":()=>me,"bugfix/transform-v8-spread-parameters-in-optional-chaining":()=>ge.default,"proposal-async-generator-functions":()=>g.default,"proposal-class-properties":()=>b.default,"proposal-class-static-block":()=>x.default,"proposal-dynamic-import":()=>v.default,"proposal-export-namespace-from":()=>E.default,"proposal-json-strings":()=>w.default,"proposal-logical-assignment-operators":()=>j.default,"proposal-nullish-coalescing-operator":()=>S.default,"proposal-numeric-separator":()=>P.default,"proposal-object-rest-spread":()=>_.default,"proposal-optional-catch-binding":()=>k.default,"proposal-optional-chaining":()=>I.default,"proposal-private-methods":()=>A.default,"proposal-private-property-in-object":()=>C.default,"proposal-unicode-property-regex":()=>O.default,"syntax-async-generators":()=>s,"syntax-class-properties":()=>a,"syntax-class-static-block":()=>n.default,"syntax-dynamic-import":()=>i,"syntax-export-namespace-from":()=>o,"syntax-json-strings":()=>l,"syntax-logical-assignment-operators":()=>c,"syntax-nullish-coalescing-operator":()=>p,"syntax-numeric-separator":()=>u,"syntax-object-rest-spread":()=>d,"syntax-optional-catch-binding":()=>f,"syntax-optional-chaining":()=>m,"syntax-private-property-in-object":()=>h.default,"syntax-top-level-await":()=>y.default,"transform-arrow-functions":()=>N.default,"transform-async-to-generator":()=>D.default,"transform-block-scoped-functions":()=>R.default,"transform-block-scoping":()=>M.default,"transform-classes":()=>L.default,"transform-computed-properties":()=>F.default,"transform-destructuring":()=>B.default,"transform-dotall-regex":()=>U.default,"transform-duplicate-keys":()=>V.default,"transform-exponentiation-operator":()=>W.default,"transform-for-of":()=>$.default,"transform-function-name":()=>q.default,"transform-literals":()=>H.default,"transform-member-expression-literals":()=>z.default,"transform-modules-amd":()=>G.default,"transform-modules-commonjs":()=>K.default,"transform-modules-systemjs":()=>X.default,"transform-modules-umd":()=>J.default,"transform-named-capturing-groups-regex":()=>Y.default,"transform-new-target":()=>Q.default,"transform-object-super":()=>Z.default,"transform-parameters":()=>ee.default,"transform-property-literals":()=>te.default,"transform-regenerator":()=>re.default,"transform-reserved-words":()=>se.default,"transform-shorthand-properties":()=>ae.default,"transform-spread":()=>ne.default,"transform-sticky-regex":()=>ie.default,"transform-template-literals":()=>oe.default,"transform-typeof-symbol":()=>le.default,"transform-unicode-escapes":()=>ce.default,"transform-unicode-regex":()=>pe.default};t["default"]=be;const xe={"proposal-class-static-block":"7.12.0","proposal-private-property-in-object":"7.10.0"};t.minVersions=xe},4188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.logPlugin=void 0;var s=r(4413);const logPlugin=(e,t,r)=>{const a=(0,s.getInclusionReasons)(e,t,r);const n=r[e];if(!n){console.log(` ${e}`);return}let i=`{`;let o=true;for(const e of Object.keys(a)){if(!o)i+=`,`;o=false;i+=` ${e}`;if(n[e])i+=` < ${n[e]}`}i+=` }`;console.log(` ${e} ${i}`)};t.logPlugin=logPlugin},2709:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.removeUnnecessaryItems=removeUnnecessaryItems;t.removeUnsupportedItems=removeUnsupportedItems;var s=r(7849);var a=r(9199);const n=Function.call.bind(Object.hasOwnProperty);function removeUnnecessaryItems(e,t){e.forEach((r=>{var s;(s=t[r])==null?void 0:s.forEach((t=>e.delete(t)))}))}function removeUnsupportedItems(e,t){e.forEach((r=>{if(n(a.minVersions,r)&&(0,s.lt)(t,a.minVersions[r])){e.delete(r)}}))}},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;const r=["transform-typeof-symbol"];function _default({loose:e}){return e?r:null}},9290:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isPluginRequired=isPluginRequired;t["default"]=t.getPolyfillPlugins=t.getModulesPluginNames=t.transformIncludesAndExcludes=void 0;var s=r(7849);var a=r(4188);var n=r(2196);var i=r(2709);var o=r(7538);var l=r(4820);var c=r(4951);var p=r(1119);var u=r(7363);var d=r(8170);var f=r(3867);var m=r(9897);var h=r(5825);var y=r(7973);var g=r(4413);var b=r(9199);var x=r(558);const v=m.default||m;const E=h.default||h;const w=y.default||y;function isPluginRequired(e,t){return(0,g.isRequired)("fake-name",e,{compatData:{"fake-name":t}})}function filterStageFromList(e,t){return Object.keys(e).reduce(((r,s)=>{if(!t.has(s)){r[s]=e[s]}return r}),{})}const j={withProposals:{withoutBugfixes:p.plugins,withBugfixes:Object.assign({},p.plugins,p.pluginsBugfixes)},withoutProposals:{withoutBugfixes:filterStageFromList(p.plugins,c.proposalPlugins),withBugfixes:filterStageFromList(Object.assign({},p.plugins,p.pluginsBugfixes),c.proposalPlugins)}};function getPluginList(e,t){if(e){if(t)return j.withProposals.withBugfixes;else return j.withProposals.withoutBugfixes}else{if(t)return j.withoutProposals.withBugfixes;else return j.withoutProposals.withoutBugfixes}}const getPlugin=e=>{const t=b.default[e]();if(!t){throw new Error(`Could not find plugin "${e}". Ensure there is an entry in ./available-plugins.js for it.`)}return t};const transformIncludesAndExcludes=e=>e.reduce(((e,t)=>{const r=t.match(/^(es|es6|es7|esnext|web)\./)?"builtIns":"plugins";e[r].add(t);return e}),{all:e,plugins:new Set,builtIns:new Set});t.transformIncludesAndExcludes=transformIncludesAndExcludes;const getModulesPluginNames=({modules:e,transformations:t,shouldTransformESM:r,shouldTransformDynamicImport:s,shouldTransformExportNamespaceFrom:a,shouldParseTopLevelAwait:n})=>{const i=[];if(e!==false&&t[e]){if(r){i.push(t[e])}if(s&&r&&e!=="umd"){i.push("proposal-dynamic-import")}else{if(s){console.warn("Dynamic import can only be supported when transforming ES modules"+" to AMD, CommonJS or SystemJS. Only the parser plugin will be enabled.")}i.push("syntax-dynamic-import")}}else{i.push("syntax-dynamic-import")}if(a){i.push("proposal-export-namespace-from")}else{i.push("syntax-export-namespace-from")}if(n){i.push("syntax-top-level-await")}return i};t.getModulesPluginNames=getModulesPluginNames;const getPolyfillPlugins=({useBuiltIns:e,corejs:t,polyfillTargets:r,include:s,exclude:a,proposals:n,shippedProposals:i,regenerator:o,debug:l})=>{const c=[];if(e==="usage"||e==="entry"){const p={method:`${e}-global`,version:t?t.toString():undefined,targets:r,include:s,exclude:a,proposals:n,shippedProposals:i,debug:l};if(t){if(e==="usage"){if(t.major===2){c.push([v,p],[f.default,{usage:true}])}else{c.push([E,p],[f.default,{usage:true,deprecated:true}])}if(o){c.push([w,{method:"usage-global",debug:l}])}}else{if(t.major===2){c.push([f.default,{regenerator:o}],[v,p])}else{c.push([E,p],[f.default,{deprecated:true}]);if(!o){c.push([d.default,p])}}}}}return c};t.getPolyfillPlugins=getPolyfillPlugins;function getLocalTargets(e,t,r,s){if(e!=null&&e.esmodules&&e.browsers){console.warn(`\n@babel/preset-env: esmodules and browsers targets have been specified together.\n\`browsers\` target, \`${e.browsers.toString()}\` will be ignored.\n`)}return(0,g.default)(e,{ignoreBrowserslistConfig:t,configPath:r,browserslistEnv:s})}function supportsStaticESM(e){return!!(e!=null&&e.supportsStaticESM)}function supportsDynamicImport(e){return!!(e!=null&&e.supportsDynamicImport)}function supportsExportNamespaceFrom(e){return!!(e!=null&&e.supportsExportNamespaceFrom)}function supportsTopLevelAwait(e){return!!(e!=null&&e.supportsTopLevelAwait)}var S=(0,x.declare)(((e,t)=>{e.assertVersion(7);const r=e.targets();const{bugfixes:p,configPath:d,debug:f,exclude:m,forceAllTransforms:h,ignoreBrowserslistConfig:y,include:b,loose:x,modules:v,shippedProposals:E,spec:w,targets:j,useBuiltIns:S,corejs:{version:P,proposals:_},browserslistEnv:k}=(0,l.default)(t);let I=r;if((0,s.lt)(e.version,"7.13.0")||t.targets||t.configPath||t.browserslistEnv||t.ignoreBrowserslistConfig){{var A=false;if(j!=null&&j.uglify){A=true;delete j.uglify;console.warn(`\nThe uglify target has been deprecated. Set the top level\noption \`forceAllTransforms: true\` instead.\n`)}}I=getLocalTargets(j,y,d,k)}const C=h||A?{}:I;const O=transformIncludesAndExcludes(b);const D=transformIncludesAndExcludes(m);const N=getPluginList(E,p);const R=v==="auto"&&(e.caller==null?void 0:e.caller(supportsExportNamespaceFrom))||v===false&&!(0,g.isRequired)("proposal-export-namespace-from",C,{compatData:N,includes:O.plugins,excludes:D.plugins});const M=getModulesPluginNames({modules:v,transformations:o.default,shouldTransformESM:v!=="auto"||!(e.caller!=null&&e.caller(supportsStaticESM)),shouldTransformDynamicImport:v!=="auto"||!(e.caller!=null&&e.caller(supportsDynamicImport)),shouldTransformExportNamespaceFrom:!R,shouldParseTopLevelAwait:!e.caller||e.caller(supportsTopLevelAwait)});const L=(0,g.filterItems)(N,O.plugins,D.plugins,C,M,(0,n.default)({loose:x}),c.pluginSyntaxMap);(0,i.removeUnnecessaryItems)(L,u);(0,i.removeUnsupportedItems)(L,e.version);const F=getPolyfillPlugins({useBuiltIns:S,corejs:P,polyfillTargets:I,include:O.builtIns,exclude:D.builtIns,proposals:_,shippedProposals:E,regenerator:L.has("transform-regenerator"),debug:f});const B=S!==false;const U=Array.from(L).map((e=>{if(e==="proposal-class-properties"||e==="proposal-private-methods"||e==="proposal-private-property-in-object"){return[getPlugin(e),{loose:x?"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error":"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"}]}return[getPlugin(e),{spec:w,loose:x,useBuiltIns:B}]})).concat(F);if(f){console.log("@babel/preset-env: `DEBUG` option");console.log("\nUsing targets:");console.log(JSON.stringify((0,g.prettifyTargets)(I),null,2));console.log(`\nUsing modules transform: ${v.toString()}`);console.log("\nUsing plugins:");L.forEach((e=>{(0,a.logPlugin)(e,I,N)}));if(!S){console.log("\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.")}}return{plugins:U}}));t["default"]=S},7538:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r={auto:"transform-modules-commonjs",amd:"transform-modules-amd",commonjs:"transform-modules-commonjs",cjs:"transform-modules-commonjs",systemjs:"transform-modules-systemjs",umd:"transform-modules-umd"};t["default"]=r},4820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.normalizeCoreJSOption=normalizeCoreJSOption;t["default"]=normalizeOptions;t.validateUseBuiltInsOption=t.validateModulesOption=t.checkDuplicateIncludeExcludes=t.normalizePluginName=void 0;var s=r(6578);var a=r(7849);var n=r(2272);var i=r(1119);var o=r(7538);var l=r(7619);var c=r(7347);const p=["web.timers","web.immediate","web.dom.iterable"];const u=new c.OptionValidator("@babel/preset-env");const d=Object.keys(i.plugins);const f=["proposal-dynamic-import",...Object.keys(o.default).map((e=>o.default[e]))];const getValidIncludesAndExcludes=(e,t)=>new Set([...d,...e==="exclude"?f:[],...t?t==2?[...Object.keys(n),...p]:Object.keys(s):[]]);const pluginToRegExp=e=>{if(e instanceof RegExp)return e;try{return new RegExp(`^${normalizePluginName(e)}$`)}catch(e){return null}};const selectPlugins=(e,t,r)=>Array.from(getValidIncludesAndExcludes(t,r)).filter((t=>e instanceof RegExp&&e.test(t)));const flatten=e=>[].concat(...e);const expandIncludesAndExcludes=(e=[],t,r)=>{if(e.length===0)return[];const s=e.map((e=>selectPlugins(pluginToRegExp(e),t,r)));const a=e.filter(((e,t)=>s[t].length===0));u.invariant(a.length===0,`The plugins/built-ins '${a.join(", ")}' passed to the '${t}' option are not\n valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env`);return flatten(s)};const normalizePluginName=e=>e.replace(/^(@babel\/|babel-)(plugin-)?/,"");t.normalizePluginName=normalizePluginName;const checkDuplicateIncludeExcludes=(e=[],t=[])=>{const r=e.filter((e=>t.indexOf(e)>=0));u.invariant(r.length===0,`The plugins/built-ins '${r.join(", ")}' were found in both the "include" and\n "exclude" options.`)};t.checkDuplicateIncludeExcludes=checkDuplicateIncludeExcludes;const normalizeTargets=e=>{if(typeof e==="string"||Array.isArray(e)){return{browsers:e}}return Object.assign({},e)};const validateModulesOption=(e=l.ModulesOption.auto)=>{u.invariant(l.ModulesOption[e.toString()]||e===l.ModulesOption.false,`The 'modules' option must be one of \n`+` - 'false' to indicate no module processing\n`+` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'`+` - 'auto' (default) which will automatically select 'false' if the current\n`+` process is known to support ES module syntax, or "commonjs" otherwise\n`);return e};t.validateModulesOption=validateModulesOption;const validateUseBuiltInsOption=(e=false)=>{u.invariant(l.UseBuiltInsOption[e.toString()]||e===l.UseBuiltInsOption.false,`The 'useBuiltIns' option must be either\n 'false' (default) to indicate no polyfill,\n '"entry"' to indicate replacing the entry polyfill, or\n '"usage"' to import only used polyfills per file`);return e};t.validateUseBuiltInsOption=validateUseBuiltInsOption;function normalizeCoreJSOption(e,t){let r=false;let s;if(t&&e===undefined){s=2;console.warn("\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a "+"core-js version. Currently, we assume version 2.x when no version "+"is passed. Since this default version will likely change in future "+"versions of Babel, we recommend explicitly setting the core-js version "+"you are using via the `corejs` option.\n"+"\nYou should also be sure that the version you pass to the `corejs` "+"option matches the version specified in your `package.json`'s "+"`dependencies` section. If it doesn't, you need to run one of the "+"following commands:\n\n"+" npm install --save core-js@2 npm install --save core-js@3\n"+" yarn add core-js@2 yarn add core-js@3\n\n"+"More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\n"+"More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs")}else if(typeof e==="object"&&e!==null){s=e.version;r=Boolean(e.proposals)}else{s=e}const n=s?(0,a.coerce)(String(s)):false;if(!t&&n){console.warn("\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n")}if(t&&(!n||n.major<2||n.major>3)){throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, "+"only core-js@2 and core-js@3 are supported.")}return{version:n,proposals:r}}function normalizeOptions(e){u.validateTopLevelOptions(e,l.TopLevelOptions);const t=validateUseBuiltInsOption(e.useBuiltIns);const r=normalizeCoreJSOption(e.corejs,t);const s=expandIncludesAndExcludes(e.include,l.TopLevelOptions.include,!!r.version&&r.version.major);const a=expandIncludesAndExcludes(e.exclude,l.TopLevelOptions.exclude,!!r.version&&r.version.major);checkDuplicateIncludeExcludes(s,a);return{bugfixes:u.validateBooleanOption(l.TopLevelOptions.bugfixes,e.bugfixes,false),configPath:u.validateStringOption(l.TopLevelOptions.configPath,e.configPath,process.cwd()),corejs:r,debug:u.validateBooleanOption(l.TopLevelOptions.debug,e.debug,false),include:s,exclude:a,forceAllTransforms:u.validateBooleanOption(l.TopLevelOptions.forceAllTransforms,e.forceAllTransforms,false),ignoreBrowserslistConfig:u.validateBooleanOption(l.TopLevelOptions.ignoreBrowserslistConfig,e.ignoreBrowserslistConfig,false),loose:u.validateBooleanOption(l.TopLevelOptions.loose,e.loose),modules:validateModulesOption(e.modules),shippedProposals:u.validateBooleanOption(l.TopLevelOptions.shippedProposals,e.shippedProposals,false),spec:u.validateBooleanOption(l.TopLevelOptions.spec,e.spec,false),targets:normalizeTargets(e.targets),useBuiltIns:t,browserslistEnv:u.validateStringOption(l.TopLevelOptions.browserslistEnv,e.browserslistEnv)}}},7619:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UseBuiltInsOption=t.ModulesOption=t.TopLevelOptions=void 0;const r={bugfixes:"bugfixes",configPath:"configPath",corejs:"corejs",debug:"debug",exclude:"exclude",forceAllTransforms:"forceAllTransforms",ignoreBrowserslistConfig:"ignoreBrowserslistConfig",include:"include",loose:"loose",modules:"modules",shippedProposals:"shippedProposals",spec:"spec",targets:"targets",useBuiltIns:"useBuiltIns",browserslistEnv:"browserslistEnv"};t.TopLevelOptions=r;const s={false:false,auto:"auto",amd:"amd",commonjs:"commonjs",cjs:"cjs",systemjs:"systemjs",umd:"umd"};t.ModulesOption=s;const a={false:false,entry:"entry",usage:"usage"};t.UseBuiltInsOption=a},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pluginsBugfixes=t.plugins=void 0;var s=r(5884);var a=r(3574);var n=r(9199);const i={};t.plugins=i;const o={};t.pluginsBugfixes=o;for(const e of Object.keys(s)){if(Object.hasOwnProperty.call(n.default,e)){i[e]=s[e]}}for(const e of Object.keys(a)){if(Object.hasOwnProperty.call(n.default,e)){o[e]=a[e]}}i["proposal-class-properties"]=i["proposal-private-methods"]},3867:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(3931);var a=r(8622);const n=`\n \`@babel/polyfill\` is deprecated. Please, use required parts of \`core-js\`\n and \`regenerator-runtime/runtime\` separately`;const i=`\n When setting \`useBuiltIns: 'usage'\`, polyfills are automatically imported when needed.\n Please remove the direct import of \`SPECIFIER\` or use \`useBuiltIns: 'entry'\` instead.`;function _default({template:e},{regenerator:t,deprecated:r,usage:a}){return{name:"preset-env/replace-babel-polyfill",visitor:{ImportDeclaration(o){const l=(0,s.getImportSource)(o);if(a&&(0,s.isPolyfillSource)(l)){console.warn(i.replace("SPECIFIER",l));if(!r)o.remove()}else if(l==="@babel/polyfill"){if(r){console.warn(n)}else if(t){o.replaceWithMultiple(e.ast`
+ `}function buildPrivateMethodDeclaration(e,t,r=false){const a=t.get(e.node.key.id.name);const{id:n,methodId:i,getId:o,setId:l,getterDeclared:c,setterDeclared:p,static:u}=a;const{params:d,body:f,generator:m,async:h}=e.node;const y=o&&!c&&d.length===0;const g=l&&!p&&d.length>0;let b=i;if(y){t.set(e.node.key.id.name,Object.assign({},a,{getterDeclared:true}));b=o}else if(g){t.set(e.node.key.id.name,Object.assign({},a,{setterDeclared:true}));b=l}else if(u&&!r){b=n}return s.types.functionDeclaration(s.types.cloneNode(b),d,f,m,h)}const f=s.traverse.visitors.merge([{ThisExpression(e,t){t.needsClassRef=true;e.replaceWith(s.types.cloneNode(t.classRef))},MetaProperty(e){const t=e.get("meta");const r=e.get("property");const{scope:s}=e;if(t.isIdentifier({name:"new"})&&r.isIdentifier({name:"target"})){e.replaceWith(s.buildUndefinedNode())}}},a.environmentVisitor]);const m={ReferencedIdentifier(e,t){if(e.scope.bindingIdentifierEquals(e.node.name,t.innerBinding)){t.needsClassRef=true;e.node.name=t.classRef.name}}};function replaceThisContext(e,t,r,n,i,o,l){var c;const p={classRef:t,needsClassRef:false,innerBinding:l};const u=new a.default({methodPath:e,constantSuper:o,file:n,refToPreserve:t,getSuperRef:r,getObjectRef(){p.needsClassRef=true;return i||e.node.static?t:s.types.memberExpression(t,s.types.identifier("prototype"))}});u.replace();if(i||e.isProperty()){e.traverse(f,p)}if((c=p.classRef)!=null&&c.name&&p.classRef.name!==(l==null?void 0:l.name)){e.traverse(m,p)}return p.needsClassRef}function buildFieldsInitNodes(e,t,r,a,n,i,o,c,p){let u=false;let d;const f=[];const m=[];const h=[];const y=s.types.isIdentifier(t)?()=>t:()=>{var e;(e=d)!=null?e:d=r[0].scope.generateUidIdentifierBasedOnNode(t);return d};for(const t of r){t.isClassProperty()&&l.assertFieldTransformed(t);const r=t.node.static;const d=!r;const g=t.isPrivate();const b=!g;const x=t.isProperty();const v=!x;const E=t.isStaticBlock==null?void 0:t.isStaticBlock();if(r||v&&g||E){const r=replaceThisContext(t,e,y,n,E,c,p);u=u||r}switch(true){case E:f.push(s.template.statement.ast`(() => ${s.types.blockStatement(t.node.body)})()`);break;case r&&g&&x&&o:u=true;f.push(buildPrivateFieldInitLoose(s.types.cloneNode(e),t,a));break;case r&&g&&x&&!o:u=true;f.push(buildPrivateStaticFieldInitSpec(t,a));break;case r&&b&&x&&i:u=true;f.push(buildPublicFieldInitLoose(s.types.cloneNode(e),t));break;case r&&b&&x&&!i:u=true;f.push(buildPublicFieldInitSpec(s.types.cloneNode(e),t,n));break;case d&&g&&x&&o:m.push(buildPrivateFieldInitLoose(s.types.thisExpression(),t,a));break;case d&&g&&x&&!o:m.push(buildPrivateInstanceFieldInitSpec(s.types.thisExpression(),t,a));break;case d&&g&&v&&o:m.unshift(buildPrivateMethodInitLoose(s.types.thisExpression(),t,a));h.push(buildPrivateMethodDeclaration(t,a,o));break;case d&&g&&v&&!o:m.unshift(buildPrivateInstanceMethodInitSpec(s.types.thisExpression(),t,a));h.push(buildPrivateMethodDeclaration(t,a,o));break;case r&&g&&v&&!o:u=true;f.unshift(buildPrivateStaticFieldInitSpec(t,a));h.push(buildPrivateMethodDeclaration(t,a,o));break;case r&&g&&v&&o:u=true;f.unshift(buildPrivateStaticMethodInitLoose(s.types.cloneNode(e),t,n,a));h.push(buildPrivateMethodDeclaration(t,a,o));break;case d&&b&&x&&i:m.push(buildPublicFieldInitLoose(s.types.thisExpression(),t));break;case d&&b&&x&&!i:m.push(buildPublicFieldInitSpec(s.types.thisExpression(),t,n));break;default:throw new Error("Unreachable.")}}return{staticNodes:f.filter(Boolean),instanceNodes:m.filter(Boolean),pureStaticNodes:h.filter(Boolean),wrapClass(t){for(const e of r){e.remove()}if(d){t.scope.push({id:s.types.cloneNode(d)});t.set("superClass",s.types.assignmentExpression("=",d,t.node.superClass))}if(!u)return t;if(t.isClassExpression()){t.scope.push({id:e});t.replaceWith(s.types.assignmentExpression("=",s.types.cloneNode(e),t.node))}else if(!t.node.id){t.node.id=e}return t}}}},738:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.createClassFeaturePlugin=createClassFeaturePlugin;Object.defineProperty(t,"injectInitialization",{enumerable:true,get:function(){return l.injectInitialization}});Object.defineProperty(t,"enableFeature",{enumerable:true,get:function(){return c.enableFeature}});Object.defineProperty(t,"FEATURES",{enumerable:true,get:function(){return c.FEATURES}});var s=r(8304);var a=r(550);var n=r(7058);var i=r(196);var o=r(7055);var l=r(3235);var c=r(5123);const p="7.15.0".split(".").reduce(((e,t)=>e*1e5+ +t),0);const u="@babel/plugin-class-features/version";function createClassFeaturePlugin({name:e,feature:t,loose:r,manipulateOptions:d,api:f={assumption:()=>void 0}}){const m=f.assumption("setPublicClassFields");const h=f.assumption("privateFieldsAsProperties");const y=f.assumption("constantSuper");const g=f.assumption("noDocumentAll");if(r===true){const t=[];if(m!==undefined){t.push(`"setPublicClassFields"`)}if(h!==undefined){t.push(`"privateFieldsAsProperties"`)}if(t.length!==0){console.warn(`[${e}]: You are using the "loose: true" option and you are`+` explicitly setting a value for the ${t.join(" and ")}`+` assumption${t.length>1?"s":""}. The "loose" option`+` can cause incompatibilities with the other class features`+` plugins, so it's recommended that you replace it with the`+` following top-level option:\n`+`\t"assumptions": {\n`+`\t\t"setPublicClassFields": true,\n`+`\t\t"privateFieldsAsProperties": true\n`+`\t}`)}}return{name:e,manipulateOptions:d,pre(){(0,c.enableFeature)(this.file,t,r);if(!this.file.get(u)||this.file.get(u)
0){(0,l.injectInitialization)(e,d,A,((e,t)=>{if(f)return;for(const r of b){if(r.node.static)continue;r.traverse(e,t)}}))}const D=O(e);D.insertBefore([..._,...k]);if(I.length>0){D.insertAfter(I)}if(C.length>0){D.find((e=>e.isStatement()||e.isDeclaration())).insertAfter(C)}},PrivateName(e){if(this.file.get(u)!==p||e.parentPath.isPrivate({key:e.node})){return}throw e.buildCodeFrameError(`Unknown PrivateName "${e}"`)},ExportDefaultDeclaration(e){if(this.file.get(u)!==p)return;const t=e.get("declaration");if(t.isClassDeclaration()&&(0,o.hasDecorators)(t.node)){if(t.node.id){(0,n.default)(e)}else{t.node.type="ClassExpression"}}}}}}},3235:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.injectInitialization=injectInitialization;t.extractComputedKeys=extractComputedKeys;var s=r(8304);var a=r(4725);const n=s.traverse.visitors.merge([{Super(e){const{node:t,parentPath:r}=e;if(r.isCallExpression({callee:t})){this.push(r)}}},a.environmentVisitor]);const i={"TSTypeAnnotation|TypeAnnotation"(e){e.skip()},ReferencedIdentifier(e){if(this.scope.hasOwnBinding(e.node.name)){this.scope.rename(e.node.name);e.skip()}}};function handleClassTDZ(e,t){if(t.classBinding&&t.classBinding===e.scope.getBinding(e.node.name)){const r=t.file.addHelper("classNameTDZError");const a=s.types.callExpression(r,[s.types.stringLiteral(e.node.name)]);e.replaceWith(s.types.sequenceExpression([a,e.node]));e.skip()}}const o={ReferencedIdentifier:handleClassTDZ};function injectInitialization(e,t,r,a){if(!r.length)return;const o=!!e.node.superClass;if(!t){const r=s.types.classMethod("constructor",s.types.identifier("constructor"),[],s.types.blockStatement([]));if(o){r.params=[s.types.restElement(s.types.identifier("args"))];r.body.body.push(s.template.statement.ast`super(...args)`)}[t]=e.get("body").unshiftContainer("body",r)}if(a){a(i,{scope:t.scope})}if(o){const e=[];t.traverse(n,e);let a=true;for(const t of e){if(a){t.insertAfter(r);a=false}else{t.insertAfter(r.map((e=>s.types.cloneNode(e))))}}}else{t.get("body").unshiftContainer("body",r)}}function extractComputedKeys(e,t,r,a){const n=[];const i={classBinding:t.node.id&&t.scope.getBinding(t.node.id.name),file:a};for(const e of r){const r=e.get("key");if(r.isReferencedIdentifier()){handleClassTDZ(r,i)}else{r.traverse(o,i)}const a=e.node;if(!r.isConstantExpression()){const e=t.scope.generateUidIdentifierBasedOnNode(a.key);t.scope.push({id:e,kind:"let"});n.push(s.types.expressionStatement(s.types.assignmentExpression("=",s.types.cloneNode(e),a.key)));a.key=s.types.cloneNode(e)}}return n}},5464:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.assertFieldTransformed=assertFieldTransformed;function assertFieldTransformed(e){if(e.node.declare){throw e.buildCodeFrameError(`TypeScript 'declare' fields must first be transformed by `+`@babel/plugin-transform-typescript.\n`+`If you have already enabled that plugin (or '@babel/preset-typescript'), make sure `+`that it runs before any plugin related to additional class features:\n`+` - @babel/plugin-proposal-class-properties\n`+` - @babel/plugin-proposal-private-methods\n`+` - @babel/plugin-proposal-decorators`)}}},4725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.skipAllButComputedKey=skipAllButComputedKey;t["default"]=t.environmentVisitor=void 0;var s=r(7369);var a=r(5789);var n=r(6721);var i=r(8622);function getPrototypeOfExpression(e,t,r,s){e=i.cloneNode(e);const a=t||s?e:i.memberExpression(e,i.identifier("prototype"));return i.callExpression(r.addHelper("getPrototypeOf"),[a])}function skipAllButComputedKey(e){if(!e.node.computed){e.skip();return}const t=i.VISITOR_KEYS[e.type];for(const r of t){if(r!=="key")e.skipKey(r)}}const o={[`${i.staticBlock?"StaticBlock|":""}ClassPrivateProperty|TypeAnnotation`](e){e.skip()},Function(e){if(e.isMethod())return;if(e.isArrowFunctionExpression())return;e.skip()},"Method|ClassProperty"(e){skipAllButComputedKey(e)}};t.environmentVisitor=o;const l=s.default.visitors.merge([o,{Super(e,t){const{node:r,parentPath:s}=e;if(!s.isMemberExpression({object:r}))return;t.handle(s)}}]);const c=s.default.visitors.merge([o,{Scopable(e,{refName:t}){const r=e.scope.getOwnBinding(t);if(r&&r.identifier.name===t){e.scope.rename(t)}}}]);const p={memoise(e,t){const{scope:r,node:s}=e;const{computed:a,property:n}=s;if(!a){return}const i=r.maybeGenerateMemoised(n);if(!i){return}this.memoiser.set(n,i,t)},prop(e){const{computed:t,property:r}=e.node;if(this.memoiser.has(r)){return i.cloneNode(this.memoiser.get(r))}if(t){return i.cloneNode(r)}return i.stringLiteral(r.name)},get(e){return this._get(e,this._getThisRefs())},_get(e,t){const r=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return i.callExpression(this.file.addHelper("get"),[t.memo?i.sequenceExpression([t.memo,r]):r,this.prop(e),t.this])},_getThisRefs(){if(!this.isDerivedConstructor){return{this:i.thisExpression()}}const e=this.scope.generateDeclaredUidIdentifier("thisSuper");return{memo:i.assignmentExpression("=",e,i.thisExpression()),this:i.cloneNode(e)}},set(e,t){const r=this._getThisRefs();const s=getPrototypeOfExpression(this.getObjectRef(),this.isStatic,this.file,this.isPrivateMethod);return i.callExpression(this.file.addHelper("set"),[r.memo?i.sequenceExpression([r.memo,s]):s,this.prop(e),t,r.this,i.booleanLiteral(e.isInStrictMode())])},destructureSet(e){throw e.buildCodeFrameError(`Destructuring to a super field is not supported yet.`)},call(e,t){const r=this._getThisRefs();return(0,n.default)(this._get(e,r),i.cloneNode(r.this),t,false)},optionalCall(e,t){const r=this._getThisRefs();return(0,n.default)(this._get(e,r),i.cloneNode(r.this),t,true)}};const u=Object.assign({},p,{prop(e){const{property:t}=e.node;if(this.memoiser.has(t)){return i.cloneNode(this.memoiser.get(t))}return i.cloneNode(t)},get(e){const{isStatic:t,getSuperRef:r}=this;const{computed:s}=e.node;const a=this.prop(e);let n;if(t){var o;n=(o=r())!=null?o:i.memberExpression(i.identifier("Function"),i.identifier("prototype"))}else{var l;n=i.memberExpression((l=r())!=null?l:i.identifier("Object"),i.identifier("prototype"))}return i.memberExpression(n,a,s)},set(e,t){const{computed:r}=e.node;const s=this.prop(e);return i.assignmentExpression("=",i.memberExpression(i.thisExpression(),s,r),t)},destructureSet(e){const{computed:t}=e.node;const r=this.prop(e);return i.memberExpression(i.thisExpression(),r,t)},call(e,t){return(0,n.default)(this.get(e),i.thisExpression(),t,false)},optionalCall(e,t){return(0,n.default)(this.get(e),i.thisExpression(),t,true)}});class ReplaceSupers{constructor(e){var t;const r=e.methodPath;this.methodPath=r;this.isDerivedConstructor=r.isClassMethod({kind:"constructor"})&&!!e.superRef;this.isStatic=r.isObjectMethod()||r.node.static||(r.isStaticBlock==null?void 0:r.isStaticBlock());this.isPrivateMethod=r.isPrivate()&&r.isMethod();this.file=e.file;this.constantSuper=(t=e.constantSuper)!=null?t:e.isLoose;this.opts=e}getObjectRef(){return i.cloneNode(this.opts.objectRef||this.opts.getObjectRef())}getSuperRef(){if(this.opts.superRef)return i.cloneNode(this.opts.superRef);if(this.opts.getSuperRef)return i.cloneNode(this.opts.getSuperRef())}replace(){if(this.opts.refToPreserve){this.methodPath.traverse(c,{refName:this.opts.refToPreserve.name})}const e=this.constantSuper?u:p;(0,a.default)(this.methodPath,l,Object.assign({file:this.file,scope:this.methodPath.scope,isDerivedConstructor:this.isDerivedConstructor,isStatic:this.isStatic,isPrivateMethod:this.isPrivateMethod,getObjectRef:this.getObjectRef.bind(this),getSuperRef:this.getSuperRef.bind(this),boundGet:e.get},e))}}t["default"]=ReplaceSupers},4951:e=>{const t=new Set(["proposal-class-static-block"]);const r={"proposal-async-generator-functions":"syntax-async-generators","proposal-class-properties":"syntax-class-properties","proposal-class-static-block":"syntax-class-static-block","proposal-json-strings":"syntax-json-strings","proposal-nullish-coalescing-operator":"syntax-nullish-coalescing-operator","proposal-numeric-separator":"syntax-numeric-separator","proposal-object-rest-spread":"syntax-object-rest-spread","proposal-optional-catch-binding":"syntax-optional-catch-binding","proposal-optional-chaining":"syntax-optional-chaining","proposal-private-methods":"syntax-class-properties","proposal-private-property-in-object":"syntax-private-property-in-object","proposal-unicode-property-regex":null};const s=Object.keys(r).map((function(e){return[e,r[e]]}));const a=new Map(s);e.exports={pluginSyntaxMap:a,proposalPlugins:t}},9199:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.minVersions=t["default"]=void 0;var s=r(1079);var a=r(947);var n=r(8142);var i=r(5163);var o=r(1454);var l=r(3030);var c=r(5945);var p=r(5879);var u=r(1816);var d=r(4499);var f=r(7452);var m=r(79);var h=r(7445);var y=r(4893);var g=r(2271);var b=r(8027);var x=r(5557);var v=r(4920);var E=r(9579);var w=r(7703);var j=r(1195);var S=r(5353);var P=r(7300);var _=r(6309);var k=r(4195);var I=r(7490);var A=r(9062);var C=r(3181);var O=r(6092);var D=r(6413);var N=r(513);var R=r(8363);var M=r(1630);var L=r(6408);var F=r(8120);var B=r(5157);var U=r(5843);var V=r(7850);var W=r(1176);var $=r(9488);var q=r(715);var H=r(5072);var z=r(4674);var G=r(8657);var K=r(6186);var X=r(730);var J=r(9942);var Y=r(8447);var Q=r(9545);var Z=r(570);var ee=r(3714);var te=r(2970);var re=r(5628);var se=r(8720);var ae=r(8648);var ne=r(8476);var ie=r(1245);var oe=r(5356);var le=r(5502);var ce=r(3448);var pe=r(4122);var ue=r(9453);var de=r(489);var fe=r(3258);var me=r(3744);var he=r(5899);var ye=r(6668);var ge=r(1626);var be={"bugfix/transform-async-arrows-in-class":()=>ue,"bugfix/transform-edge-default-parameters":()=>de,"bugfix/transform-edge-function-name":()=>fe,"bugfix/transform-safari-block-shadowing":()=>he,"bugfix/transform-safari-for-shadowing":()=>ye,"bugfix/transform-tagged-template-caching":()=>me,"bugfix/transform-v8-spread-parameters-in-optional-chaining":()=>ge.default,"proposal-async-generator-functions":()=>g.default,"proposal-class-properties":()=>b.default,"proposal-class-static-block":()=>x.default,"proposal-dynamic-import":()=>v.default,"proposal-export-namespace-from":()=>E.default,"proposal-json-strings":()=>w.default,"proposal-logical-assignment-operators":()=>j.default,"proposal-nullish-coalescing-operator":()=>S.default,"proposal-numeric-separator":()=>P.default,"proposal-object-rest-spread":()=>_.default,"proposal-optional-catch-binding":()=>k.default,"proposal-optional-chaining":()=>I.default,"proposal-private-methods":()=>A.default,"proposal-private-property-in-object":()=>C.default,"proposal-unicode-property-regex":()=>O.default,"syntax-async-generators":()=>s,"syntax-class-properties":()=>a,"syntax-class-static-block":()=>n.default,"syntax-dynamic-import":()=>i,"syntax-export-namespace-from":()=>o,"syntax-json-strings":()=>l,"syntax-logical-assignment-operators":()=>c,"syntax-nullish-coalescing-operator":()=>p,"syntax-numeric-separator":()=>u,"syntax-object-rest-spread":()=>d,"syntax-optional-catch-binding":()=>f,"syntax-optional-chaining":()=>m,"syntax-private-property-in-object":()=>h.default,"syntax-top-level-await":()=>y.default,"transform-arrow-functions":()=>N.default,"transform-async-to-generator":()=>D.default,"transform-block-scoped-functions":()=>R.default,"transform-block-scoping":()=>M.default,"transform-classes":()=>L.default,"transform-computed-properties":()=>F.default,"transform-destructuring":()=>B.default,"transform-dotall-regex":()=>U.default,"transform-duplicate-keys":()=>V.default,"transform-exponentiation-operator":()=>W.default,"transform-for-of":()=>$.default,"transform-function-name":()=>q.default,"transform-literals":()=>H.default,"transform-member-expression-literals":()=>z.default,"transform-modules-amd":()=>G.default,"transform-modules-commonjs":()=>K.default,"transform-modules-systemjs":()=>X.default,"transform-modules-umd":()=>J.default,"transform-named-capturing-groups-regex":()=>Y.default,"transform-new-target":()=>Q.default,"transform-object-super":()=>Z.default,"transform-parameters":()=>ee.default,"transform-property-literals":()=>te.default,"transform-regenerator":()=>re.default,"transform-reserved-words":()=>se.default,"transform-shorthand-properties":()=>ae.default,"transform-spread":()=>ne.default,"transform-sticky-regex":()=>ie.default,"transform-template-literals":()=>oe.default,"transform-typeof-symbol":()=>le.default,"transform-unicode-escapes":()=>ce.default,"transform-unicode-regex":()=>pe.default};t["default"]=be;const xe={"proposal-class-static-block":"7.12.0","proposal-private-property-in-object":"7.10.0"};t.minVersions=xe},4188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.logPlugin=void 0;var s=r(4413);const logPlugin=(e,t,r)=>{const a=(0,s.getInclusionReasons)(e,t,r);const n=r[e];if(!n){console.log(` ${e}`);return}let i=`{`;let o=true;for(const e of Object.keys(a)){if(!o)i+=`,`;o=false;i+=` ${e}`;if(n[e])i+=` < ${n[e]}`}i+=` }`;console.log(` ${e} ${i}`)};t.logPlugin=logPlugin},2709:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.removeUnnecessaryItems=removeUnnecessaryItems;t.removeUnsupportedItems=removeUnsupportedItems;var s=r(7849);var a=r(9199);const n=Function.call.bind(Object.hasOwnProperty);function removeUnnecessaryItems(e,t){e.forEach((r=>{var s;(s=t[r])==null?void 0:s.forEach((t=>e.delete(t)))}))}function removeUnsupportedItems(e,t){e.forEach((r=>{if(n(a.minVersions,r)&&(0,s.lt)(t,a.minVersions[r])){e.delete(r)}}))}},2196:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;const r=["transform-typeof-symbol"];function _default({loose:e}){return e?r:null}},9290:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.isPluginRequired=isPluginRequired;t["default"]=t.getPolyfillPlugins=t.getModulesPluginNames=t.transformIncludesAndExcludes=void 0;var s=r(7849);var a=r(4188);var n=r(2196);var i=r(2709);var o=r(7538);var l=r(4820);var c=r(4951);var p=r(1119);var u=r(7363);var d=r(8170);var f=r(3867);var m=r(9897);var h=r(5825);var y=r(7973);var g=r(4413);var b=r(9199);var x=r(558);const v=m.default||m;const E=h.default||h;const w=y.default||y;function isPluginRequired(e,t){return(0,g.isRequired)("fake-name",e,{compatData:{"fake-name":t}})}function filterStageFromList(e,t){return Object.keys(e).reduce(((r,s)=>{if(!t.has(s)){r[s]=e[s]}return r}),{})}const j={withProposals:{withoutBugfixes:p.plugins,withBugfixes:Object.assign({},p.plugins,p.pluginsBugfixes)},withoutProposals:{withoutBugfixes:filterStageFromList(p.plugins,c.proposalPlugins),withBugfixes:filterStageFromList(Object.assign({},p.plugins,p.pluginsBugfixes),c.proposalPlugins)}};function getPluginList(e,t){if(e){if(t)return j.withProposals.withBugfixes;else return j.withProposals.withoutBugfixes}else{if(t)return j.withoutProposals.withBugfixes;else return j.withoutProposals.withoutBugfixes}}const getPlugin=e=>{const t=b.default[e]();if(!t){throw new Error(`Could not find plugin "${e}". Ensure there is an entry in ./available-plugins.js for it.`)}return t};const transformIncludesAndExcludes=e=>e.reduce(((e,t)=>{const r=t.match(/^(es|es6|es7|esnext|web)\./)?"builtIns":"plugins";e[r].add(t);return e}),{all:e,plugins:new Set,builtIns:new Set});t.transformIncludesAndExcludes=transformIncludesAndExcludes;const getModulesPluginNames=({modules:e,transformations:t,shouldTransformESM:r,shouldTransformDynamicImport:s,shouldTransformExportNamespaceFrom:a,shouldParseTopLevelAwait:n})=>{const i=[];if(e!==false&&t[e]){if(r){i.push(t[e])}if(s&&r&&e!=="umd"){i.push("proposal-dynamic-import")}else{if(s){console.warn("Dynamic import can only be supported when transforming ES modules"+" to AMD, CommonJS or SystemJS. Only the parser plugin will be enabled.")}i.push("syntax-dynamic-import")}}else{i.push("syntax-dynamic-import")}if(a){i.push("proposal-export-namespace-from")}else{i.push("syntax-export-namespace-from")}if(n){i.push("syntax-top-level-await")}return i};t.getModulesPluginNames=getModulesPluginNames;const getPolyfillPlugins=({useBuiltIns:e,corejs:t,polyfillTargets:r,include:s,exclude:a,proposals:n,shippedProposals:i,regenerator:o,debug:l})=>{const c=[];if(e==="usage"||e==="entry"){const p={method:`${e}-global`,version:t?t.toString():undefined,targets:r,include:s,exclude:a,proposals:n,shippedProposals:i,debug:l};if(t){if(e==="usage"){if(t.major===2){c.push([v,p],[f.default,{usage:true}])}else{c.push([E,p],[f.default,{usage:true,deprecated:true}])}if(o){c.push([w,{method:"usage-global",debug:l}])}}else{if(t.major===2){c.push([f.default,{regenerator:o}],[v,p])}else{c.push([E,p],[f.default,{deprecated:true}]);if(!o){c.push([d.default,p])}}}}}return c};t.getPolyfillPlugins=getPolyfillPlugins;function getLocalTargets(e,t,r,s){if(e!=null&&e.esmodules&&e.browsers){console.warn(`\n@babel/preset-env: esmodules and browsers targets have been specified together.\n\`browsers\` target, \`${e.browsers.toString()}\` will be ignored.\n`)}return(0,g.default)(e,{ignoreBrowserslistConfig:t,configPath:r,browserslistEnv:s})}function supportsStaticESM(e){return!!(e!=null&&e.supportsStaticESM)}function supportsDynamicImport(e){return!!(e!=null&&e.supportsDynamicImport)}function supportsExportNamespaceFrom(e){return!!(e!=null&&e.supportsExportNamespaceFrom)}function supportsTopLevelAwait(e){return!!(e!=null&&e.supportsTopLevelAwait)}var S=(0,x.declare)(((e,t)=>{e.assertVersion(7);const r=e.targets();const{bugfixes:p,configPath:d,debug:f,exclude:m,forceAllTransforms:h,ignoreBrowserslistConfig:y,include:b,loose:x,modules:v,shippedProposals:E,spec:w,targets:j,useBuiltIns:S,corejs:{version:P,proposals:_},browserslistEnv:k}=(0,l.default)(t);let I=r;if((0,s.lt)(e.version,"7.13.0")||t.targets||t.configPath||t.browserslistEnv||t.ignoreBrowserslistConfig){{var A=false;if(j!=null&&j.uglify){A=true;delete j.uglify;console.warn(`\nThe uglify target has been deprecated. Set the top level\noption \`forceAllTransforms: true\` instead.\n`)}}I=getLocalTargets(j,y,d,k)}const C=h||A?{}:I;const O=transformIncludesAndExcludes(b);const D=transformIncludesAndExcludes(m);const N=getPluginList(E,p);const R=v==="auto"&&(e.caller==null?void 0:e.caller(supportsExportNamespaceFrom))||v===false&&!(0,g.isRequired)("proposal-export-namespace-from",C,{compatData:N,includes:O.plugins,excludes:D.plugins});const M=getModulesPluginNames({modules:v,transformations:o.default,shouldTransformESM:v!=="auto"||!(e.caller!=null&&e.caller(supportsStaticESM)),shouldTransformDynamicImport:v!=="auto"||!(e.caller!=null&&e.caller(supportsDynamicImport)),shouldTransformExportNamespaceFrom:!R,shouldParseTopLevelAwait:!e.caller||e.caller(supportsTopLevelAwait)});const L=(0,g.filterItems)(N,O.plugins,D.plugins,C,M,(0,n.default)({loose:x}),c.pluginSyntaxMap);(0,i.removeUnnecessaryItems)(L,u);(0,i.removeUnsupportedItems)(L,e.version);const F=getPolyfillPlugins({useBuiltIns:S,corejs:P,polyfillTargets:I,include:O.builtIns,exclude:D.builtIns,proposals:_,shippedProposals:E,regenerator:L.has("transform-regenerator"),debug:f});const B=S!==false;const U=Array.from(L).map((e=>{if(e==="proposal-class-properties"||e==="proposal-private-methods"||e==="proposal-private-property-in-object"){return[getPlugin(e),{loose:x?"#__internal__@babel/preset-env__prefer-true-but-false-is-ok-if-it-prevents-an-error":"#__internal__@babel/preset-env__prefer-false-but-true-is-ok-if-it-prevents-an-error"}]}return[getPlugin(e),{spec:w,loose:x,useBuiltIns:B}]})).concat(F);if(f){console.log("@babel/preset-env: `DEBUG` option");console.log("\nUsing targets:");console.log(JSON.stringify((0,g.prettifyTargets)(I),null,2));console.log(`\nUsing modules transform: ${v.toString()}`);console.log("\nUsing plugins:");L.forEach((e=>{(0,a.logPlugin)(e,I,N)}));if(!S){console.log("\nUsing polyfills: No polyfills were added, since the `useBuiltIns` option was not set.")}}return{plugins:U}}));t["default"]=S},7538:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=void 0;var r={auto:"transform-modules-commonjs",amd:"transform-modules-amd",commonjs:"transform-modules-commonjs",cjs:"transform-modules-commonjs",systemjs:"transform-modules-systemjs",umd:"transform-modules-umd"};t["default"]=r},4820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.normalizeCoreJSOption=normalizeCoreJSOption;t["default"]=normalizeOptions;t.validateUseBuiltInsOption=t.validateModulesOption=t.checkDuplicateIncludeExcludes=t.normalizePluginName=void 0;var s=r(6578);var a=r(7849);var n=r(2272);var i=r(1119);var o=r(7538);var l=r(7619);var c=r(7347);const p=["web.timers","web.immediate","web.dom.iterable"];const u=new c.OptionValidator("@babel/preset-env");const d=Object.keys(i.plugins);const f=["proposal-dynamic-import",...Object.keys(o.default).map((e=>o.default[e]))];const getValidIncludesAndExcludes=(e,t)=>new Set([...d,...e==="exclude"?f:[],...t?t==2?[...Object.keys(n),...p]:Object.keys(s):[]]);const pluginToRegExp=e=>{if(e instanceof RegExp)return e;try{return new RegExp(`^${normalizePluginName(e)}$`)}catch(e){return null}};const selectPlugins=(e,t,r)=>Array.from(getValidIncludesAndExcludes(t,r)).filter((t=>e instanceof RegExp&&e.test(t)));const flatten=e=>[].concat(...e);const expandIncludesAndExcludes=(e=[],t,r)=>{if(e.length===0)return[];const s=e.map((e=>selectPlugins(pluginToRegExp(e),t,r)));const a=e.filter(((e,t)=>s[t].length===0));u.invariant(a.length===0,`The plugins/built-ins '${a.join(", ")}' passed to the '${t}' option are not\n valid. Please check data/[plugin-features|built-in-features].js in babel-preset-env`);return flatten(s)};const normalizePluginName=e=>e.replace(/^(@babel\/|babel-)(plugin-)?/,"");t.normalizePluginName=normalizePluginName;const checkDuplicateIncludeExcludes=(e=[],t=[])=>{const r=e.filter((e=>t.indexOf(e)>=0));u.invariant(r.length===0,`The plugins/built-ins '${r.join(", ")}' were found in both the "include" and\n "exclude" options.`)};t.checkDuplicateIncludeExcludes=checkDuplicateIncludeExcludes;const normalizeTargets=e=>{if(typeof e==="string"||Array.isArray(e)){return{browsers:e}}return Object.assign({},e)};const validateModulesOption=(e=l.ModulesOption.auto)=>{u.invariant(l.ModulesOption[e.toString()]||e===l.ModulesOption.false,`The 'modules' option must be one of \n`+` - 'false' to indicate no module processing\n`+` - a specific module type: 'commonjs', 'amd', 'umd', 'systemjs'`+` - 'auto' (default) which will automatically select 'false' if the current\n`+` process is known to support ES module syntax, or "commonjs" otherwise\n`);return e};t.validateModulesOption=validateModulesOption;const validateUseBuiltInsOption=(e=false)=>{u.invariant(l.UseBuiltInsOption[e.toString()]||e===l.UseBuiltInsOption.false,`The 'useBuiltIns' option must be either\n 'false' (default) to indicate no polyfill,\n '"entry"' to indicate replacing the entry polyfill, or\n '"usage"' to import only used polyfills per file`);return e};t.validateUseBuiltInsOption=validateUseBuiltInsOption;function normalizeCoreJSOption(e,t){let r=false;let s;if(t&&e===undefined){s=2;console.warn("\nWARNING (@babel/preset-env): We noticed you're using the `useBuiltIns` option without declaring a "+"core-js version. Currently, we assume version 2.x when no version "+"is passed. Since this default version will likely change in future "+"versions of Babel, we recommend explicitly setting the core-js version "+"you are using via the `corejs` option.\n"+"\nYou should also be sure that the version you pass to the `corejs` "+"option matches the version specified in your `package.json`'s "+"`dependencies` section. If it doesn't, you need to run one of the "+"following commands:\n\n"+" npm install --save core-js@2 npm install --save core-js@3\n"+" yarn add core-js@2 yarn add core-js@3\n\n"+"More info about useBuiltIns: https://babeljs.io/docs/en/babel-preset-env#usebuiltins\n"+"More info about core-js: https://babeljs.io/docs/en/babel-preset-env#corejs")}else if(typeof e==="object"&&e!==null){s=e.version;r=Boolean(e.proposals)}else{s=e}const n=s?(0,a.coerce)(String(s)):false;if(!t&&n){console.warn("\nWARNING (@babel/preset-env): The `corejs` option only has an effect when the `useBuiltIns` option is not `false`\n")}if(t&&(!n||n.major<2||n.major>3)){throw new RangeError("Invalid Option: The version passed to `corejs` is invalid. Currently, "+"only core-js@2 and core-js@3 are supported.")}return{version:n,proposals:r}}function normalizeOptions(e){u.validateTopLevelOptions(e,l.TopLevelOptions);const t=validateUseBuiltInsOption(e.useBuiltIns);const r=normalizeCoreJSOption(e.corejs,t);const s=expandIncludesAndExcludes(e.include,l.TopLevelOptions.include,!!r.version&&r.version.major);const a=expandIncludesAndExcludes(e.exclude,l.TopLevelOptions.exclude,!!r.version&&r.version.major);checkDuplicateIncludeExcludes(s,a);return{bugfixes:u.validateBooleanOption(l.TopLevelOptions.bugfixes,e.bugfixes,false),configPath:u.validateStringOption(l.TopLevelOptions.configPath,e.configPath,process.cwd()),corejs:r,debug:u.validateBooleanOption(l.TopLevelOptions.debug,e.debug,false),include:s,exclude:a,forceAllTransforms:u.validateBooleanOption(l.TopLevelOptions.forceAllTransforms,e.forceAllTransforms,false),ignoreBrowserslistConfig:u.validateBooleanOption(l.TopLevelOptions.ignoreBrowserslistConfig,e.ignoreBrowserslistConfig,false),loose:u.validateBooleanOption(l.TopLevelOptions.loose,e.loose),modules:validateModulesOption(e.modules),shippedProposals:u.validateBooleanOption(l.TopLevelOptions.shippedProposals,e.shippedProposals,false),spec:u.validateBooleanOption(l.TopLevelOptions.spec,e.spec,false),targets:normalizeTargets(e.targets),useBuiltIns:t,browserslistEnv:u.validateStringOption(l.TopLevelOptions.browserslistEnv,e.browserslistEnv)}}},7619:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.UseBuiltInsOption=t.ModulesOption=t.TopLevelOptions=void 0;const r={bugfixes:"bugfixes",configPath:"configPath",corejs:"corejs",debug:"debug",exclude:"exclude",forceAllTransforms:"forceAllTransforms",ignoreBrowserslistConfig:"ignoreBrowserslistConfig",include:"include",loose:"loose",modules:"modules",shippedProposals:"shippedProposals",spec:"spec",targets:"targets",useBuiltIns:"useBuiltIns",browserslistEnv:"browserslistEnv"};t.TopLevelOptions=r;const s={false:false,auto:"auto",amd:"amd",commonjs:"commonjs",cjs:"cjs",systemjs:"systemjs",umd:"umd"};t.ModulesOption=s;const a={false:false,entry:"entry",usage:"usage"};t.UseBuiltInsOption=a},1119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.pluginsBugfixes=t.plugins=void 0;var s=r(5884);var a=r(3574);var n=r(9199);const i={};t.plugins=i;const o={};t.pluginsBugfixes=o;for(const e of Object.keys(s)){if(Object.hasOwnProperty.call(n.default,e)){i[e]=s[e]}}for(const e of Object.keys(a)){if(Object.hasOwnProperty.call(n.default,e)){o[e]=a[e]}}i["proposal-class-properties"]=i["proposal-private-methods"]},3867:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t["default"]=_default;var s=r(3931);var a=r(8622);const n=`\n \`@babel/polyfill\` is deprecated. Please, use required parts of \`core-js\`\n and \`regenerator-runtime/runtime\` separately`;const i=`\n When setting \`useBuiltIns: 'usage'\`, polyfills are automatically imported when needed.\n Please remove the direct import of \`SPECIFIER\` or use \`useBuiltIns: 'entry'\` instead.`;function _default({template:e},{regenerator:t,deprecated:r,usage:a}){return{name:"preset-env/replace-babel-polyfill",visitor:{ImportDeclaration(o){const l=(0,s.getImportSource)(o);if(a&&(0,s.isPolyfillSource)(l)){console.warn(i.replace("SPECIFIER",l));if(!r)o.remove()}else if(l==="@babel/polyfill"){if(r){console.warn(n)}else if(t){o.replaceWithMultiple(e.ast`
import "core-js";
import "regenerator-runtime/runtime.js";
`)}else{o.replaceWith(e.ast`
diff --git a/packages/next/image-types/global.d.ts b/packages/next/image-types/global.d.ts
index 1a1c9642b8b3..4c5a72d84bb7 100644
--- a/packages/next/image-types/global.d.ts
+++ b/packages/next/image-types/global.d.ts
@@ -1,15 +1,8 @@
// this file is conditionally added/removed to next-env.d.ts
// if the static image import handling is enabled
-interface StaticImageData {
- src: string
- height: number
- width: number
- blurDataURL?: string
-}
-
declare module '*.png' {
- const content: StaticImageData
+ const content: import('../dist/client/image').StaticImageData
export default content
}
@@ -26,43 +19,43 @@ declare module '*.svg' {
}
declare module '*.jpg' {
- const content: StaticImageData
+ const content: import('../dist/client/image').StaticImageData
export default content
}
declare module '*.jpeg' {
- const content: StaticImageData
+ const content: import('../dist/client/image').StaticImageData
export default content
}
declare module '*.gif' {
- const content: StaticImageData
+ const content: import('../dist/client/image').StaticImageData
export default content
}
declare module '*.webp' {
- const content: StaticImageData
+ const content: import('../dist/client/image').StaticImageData
export default content
}
declare module '*.avif' {
- const content: StaticImageData
+ const content: import('../dist/client/image').StaticImageData
export default content
}
declare module '*.ico' {
- const content: StaticImageData
+ const content: import('../dist/client/image').StaticImageData
export default content
}
declare module '*.bmp' {
- const content: StaticImageData
+ const content: import('../dist/client/image').StaticImageData
export default content
}
diff --git a/packages/next/lib/worker.ts b/packages/next/lib/worker.ts
index 8182f2b6b0ea..023d9166e53f 100644
--- a/packages/next/lib/worker.ts
+++ b/packages/next/lib/worker.ts
@@ -85,4 +85,13 @@ export class Worker {
this._worker = undefined
return worker.end()
}
+
+ /**
+ * Quietly end the worker if it exists
+ */
+ close(): void {
+ if (this._worker) {
+ this._worker.end()
+ }
+ }
}
diff --git a/packages/next/package.json b/packages/next/package.json
index 316aee06f97a..6942656b6535 100644
--- a/packages/next/package.json
+++ b/packages/next/package.json
@@ -1,6 +1,6 @@
{
"name": "next",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
@@ -69,7 +69,7 @@
]
},
"dependencies": {
- "@next/env": "12.1.0",
+ "@next/env": "12.1.1-canary.1",
"caniuse-lite": "^1.0.30001283",
"postcss": "8.4.5",
"styled-jsx": "5.0.0",
@@ -115,13 +115,13 @@
"@babel/traverse": "7.15.0",
"@babel/types": "7.15.0",
"@hapi/accept": "5.0.2",
- "@napi-rs/cli": "1.2.1",
+ "@napi-rs/cli": "2.4.4",
"@napi-rs/triples": "1.0.3",
- "@next/polyfill-module": "12.1.0",
- "@next/polyfill-nomodule": "12.1.0",
- "@next/react-dev-overlay": "12.1.0",
- "@next/react-refresh-utils": "12.1.0",
- "@next/swc": "12.1.0",
+ "@next/polyfill-module": "12.1.1-canary.1",
+ "@next/polyfill-nomodule": "12.1.1-canary.1",
+ "@next/react-dev-overlay": "12.1.1-canary.1",
+ "@next/react-refresh-utils": "12.1.1-canary.1",
+ "@next/swc": "12.1.1-canary.1",
"@peculiar/webcrypto": "1.1.7",
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
diff --git a/packages/next/pages/_document.tsx b/packages/next/pages/_document.tsx
index 6af1f81fc86a..309ae6321dcb 100644
--- a/packages/next/pages/_document.tsx
+++ b/packages/next/pages/_document.tsx
@@ -492,7 +492,6 @@ export class Head extends Component<
unstable_runtimeJS,
unstable_JsPreload,
disableOptimizedLoading,
- useMaybeDeferContent,
optimizeCss,
optimizeFonts,
runtime,
@@ -610,36 +609,96 @@ export class Head extends Component<
inAmpMode
)
- // Must use nested component to allow use of a custom hook
- const DeferrableHead = () => {
- const getDynamicHeadContent = () => {
- return (
+ return (
+
+ {!hasConcurrentFeatures && this.context.isDevelopment && (
<>
- {head}
-
+
>
- )
- }
+ )}
+ {head}
+
+
+ {children}
+ {optimizeFonts && }
- const getDynamicScriptPreloads = () => {
- return (
+ {inAmpMode && (
<>
+
+ {!hasCanonicalRel && (
+
+ )}
+ {/* https://www.ampproject.org/docs/fundamentals/optimize_amp#optimize-the-amp-runtime-loading */}
+
+
+
+
+
+ >
+ )}
+ {!inAmpMode && (
+ <>
+ {!hasAmphtmlRel && hybridAmp && (
+
+ )}
+ {!optimizeCss && this.getCssLinks(files)}
+ {!optimizeCss && }
+
{!disableRuntimeJS &&
!disableJsPreload &&
this.getPreloadDynamicChunks()}
{!disableRuntimeJS &&
!disableJsPreload &&
this.getPreloadMainLinks(files)}
- >
- )
- }
- const getDynamicScriptContent = () => {
- return (
- <>
+ {!disableOptimizedLoading &&
+ !disableRuntimeJS &&
+ this.getPolyfillScripts()}
+
{!disableOptimizedLoading &&
!disableRuntimeJS &&
this.getPreNextScripts()}
@@ -649,120 +708,21 @@ export class Head extends Component<
{!disableOptimizedLoading &&
!disableRuntimeJS &&
this.getScripts(files)}
- >
- )
- }
- const [isDeferred] = useMaybeDeferContent('HEAD', () => {
- return (
- <>
- {getDynamicHeadContent()}
- {getDynamicScriptPreloads()}
- {getDynamicScriptContent()}
+ {optimizeCss && this.getCssLinks(files)}
+ {optimizeCss && }
+ {this.context.isDevelopment && (
+ // this element is used to mount development styles so the
+ // ordering matches production
+ // (by default, style-loader injects at the bottom of )
+
+ )}
+ {styles || null}
>
- )
- })
-
- return (
-
- {!hasConcurrentFeatures && this.context.isDevelopment && (
- <>
-
-
- >
- )}
- {!isDeferred && getDynamicHeadContent()}
-
- {children}
- {optimizeFonts && }
-
- {inAmpMode && (
- <>
-
- {!hasCanonicalRel && (
-
- )}
- {/* https://www.ampproject.org/docs/fundamentals/optimize_amp#optimize-the-amp-runtime-loading */}
-
-
-
-
-
- >
- )}
- {!inAmpMode && (
- <>
- {!hasAmphtmlRel && hybridAmp && (
-
- )}
- {!optimizeCss && this.getCssLinks(files)}
- {!optimizeCss && }
-
- {!isDeferred && getDynamicScriptPreloads()}
-
- {!disableOptimizedLoading &&
- !disableRuntimeJS &&
- this.getPolyfillScripts()}
-
- {!isDeferred && getDynamicScriptContent()}
-
- {optimizeCss && this.getCssLinks(files)}
- {optimizeCss && }
- {this.context.isDevelopment && (
- // this element is used to mount development styles so the
- // ordering matches production
- // (by default, style-loader injects at the bottom of )
-
- )}
- {styles || null}
- >
- )}
- {React.createElement(React.Fragment, {}, ...(headTags || []))}
-
- )
- }
-
- return
+ )}
+ {React.createElement(React.Fragment, {}, ...(headTags || []))}
+
+ )
}
}
@@ -835,110 +795,99 @@ export class NextScript extends Component {
docComponentsRendered,
devOnlyCacheBusterQueryString,
disableOptimizedLoading,
- useMaybeDeferContent,
crossOrigin,
} = this.context
const disableRuntimeJS = unstable_runtimeJS === false
docComponentsRendered.NextScript = true
- // Must nest component to use custom hook
- const DeferrableNextScript = () => {
- const [, content] = useMaybeDeferContent('NEXT_SCRIPT', () => {
- if (inAmpMode) {
- const ampDevFiles = [
- ...buildManifest.devFiles,
- ...buildManifest.polyfillFiles,
- ...buildManifest.ampDevFiles,
- ]
-
- return (
- <>
- {disableRuntimeJS ? null : (
-
- )}
- {ampDevFiles.map((file) => (
-
- ))}
- >
- )
- }
+ if (inAmpMode) {
+ if (process.env.NODE_ENV === 'production') {
+ return null
+ }
+ const ampDevFiles = [
+ ...buildManifest.devFiles,
+ ...buildManifest.polyfillFiles,
+ ...buildManifest.ampDevFiles,
+ ]
- if (process.env.NODE_ENV !== 'production') {
- if (this.props.crossOrigin)
- console.warn(
- 'Warning: `NextScript` attribute `crossOrigin` is deprecated. https://nextjs.org/docs/messages/doc-crossorigin-deprecated'
- )
- }
+ return (
+ <>
+ {disableRuntimeJS ? null : (
+
+ )}
+ {ampDevFiles.map((file) => (
+
+ ))}
+ >
+ )
+ }
- const files: DocumentFiles = getDocumentFiles(
- this.context.buildManifest,
- this.context.__NEXT_DATA__.page,
- inAmpMode
+ if (process.env.NODE_ENV !== 'production') {
+ if (this.props.crossOrigin)
+ console.warn(
+ 'Warning: `NextScript` attribute `crossOrigin` is deprecated. https://nextjs.org/docs/messages/doc-crossorigin-deprecated'
)
+ }
- return (
- <>
- {!disableRuntimeJS && buildManifest.devFiles
- ? buildManifest.devFiles.map((file: string) => (
-
- ))
- : null}
- {disableRuntimeJS ? null : (
+ const files: DocumentFiles = getDocumentFiles(
+ this.context.buildManifest,
+ this.context.__NEXT_DATA__.page,
+ inAmpMode
+ )
+
+ return (
+ <>
+ {!disableRuntimeJS && buildManifest.devFiles
+ ? buildManifest.devFiles.map((file: string) => (
- )}
- {disableOptimizedLoading &&
- !disableRuntimeJS &&
- this.getPolyfillScripts()}
- {disableOptimizedLoading &&
- !disableRuntimeJS &&
- this.getPreNextScripts()}
- {disableOptimizedLoading &&
- !disableRuntimeJS &&
- this.getDynamicChunks(files)}
- {disableOptimizedLoading &&
- !disableRuntimeJS &&
- this.getScripts(files)}
- >
- )
- })
- if (inAmpMode && process.env.NODE_ENV === 'production') {
- return null
- }
- return content
- }
-
- return
+ ))
+ : null}
+ {disableRuntimeJS ? null : (
+
+ )}
+ {disableOptimizedLoading &&
+ !disableRuntimeJS &&
+ this.getPolyfillScripts()}
+ {disableOptimizedLoading &&
+ !disableRuntimeJS &&
+ this.getPreNextScripts()}
+ {disableOptimizedLoading &&
+ !disableRuntimeJS &&
+ this.getDynamicChunks(files)}
+ {disableOptimizedLoading && !disableRuntimeJS && this.getScripts(files)}
+ >
+ )
}
}
diff --git a/packages/next/server/base-http/node.ts b/packages/next/server/base-http/node.ts
index 5d5c54ce0064..d1d720d80989 100644
--- a/packages/next/server/base-http/node.ts
+++ b/packages/next/server/base-http/node.ts
@@ -7,6 +7,11 @@ import { NEXT_REQUEST_META, RequestMeta } from '../request-meta'
import { BaseNextRequest, BaseNextResponse } from './index'
+type Req = IncomingMessage & {
+ [NEXT_REQUEST_META]?: RequestMeta
+ cookies?: NextApiRequestCookies
+}
+
export class NodeNextRequest extends BaseNextRequest {
public headers = this._req.headers;
@@ -21,12 +26,11 @@ export class NodeNextRequest extends BaseNextRequest {
return this._req
}
- constructor(
- private _req: IncomingMessage & {
- [NEXT_REQUEST_META]?: RequestMeta
- cookies?: NextApiRequestCookies
- }
- ) {
+ set originalRequest(value: Req) {
+ this._req = value
+ }
+
+ constructor(private _req: Req) {
super(_req.method!.toUpperCase(), _req.url!, _req)
}
diff --git a/packages/next/server/base-server.ts b/packages/next/server/base-server.ts
index 77160619770f..6daf2ff74739 100644
--- a/packages/next/server/base-server.ts
+++ b/packages/next/server/base-server.ts
@@ -62,7 +62,7 @@ import { MIDDLEWARE_ROUTE } from '../lib/constants'
import { addRequestMeta, getRequestMeta } from './request-meta'
import { createHeaderRoute, createRedirectRoute } from './server-route-utils'
import { PrerenderManifest } from '../build'
-import { ImageConfigComplete } from './image-config'
+import { ImageConfigComplete } from '../shared/lib/image-config'
export type FindComponentsResult = {
components: LoadComponentsReturnType
@@ -1122,7 +1122,7 @@ export default abstract class Server {
const isSSG = !!components.getStaticProps
const hasServerProps = !!components.getServerSideProps
const hasStaticPaths = !!components.getStaticPaths
- const hasGetInitialProps = !!(components.Component as any).getInitialProps
+ const hasGetInitialProps = !!components.Component?.getInitialProps
// Toggle whether or not this is a Data request
const isDataReq = !!query._nextDataReq && (isSSG || hasServerProps)
diff --git a/packages/next/server/body-streams.ts b/packages/next/server/body-streams.ts
new file mode 100644
index 000000000000..5ce9a0b3abde
--- /dev/null
+++ b/packages/next/server/body-streams.ts
@@ -0,0 +1,87 @@
+import type { IncomingMessage } from 'http'
+import { Readable } from 'stream'
+import { TransformStream } from 'next/dist/compiled/web-streams-polyfill'
+
+type BodyStream = ReadableStream
+
+/**
+ * Creates a ReadableStream from a Node.js HTTP request
+ */
+function requestToBodyStream(request: IncomingMessage): BodyStream {
+ const transform = new TransformStream({
+ start(controller) {
+ request.on('data', (chunk) => controller.enqueue(chunk))
+ request.on('end', () => controller.terminate())
+ request.on('error', (err) => controller.error(err))
+ },
+ })
+
+ return transform.readable as unknown as ReadableStream
+}
+
+function bodyStreamToNodeStream(bodyStream: BodyStream): Readable {
+ const reader = bodyStream.getReader()
+ return Readable.from(
+ (async function* () {
+ while (true) {
+ const { done, value } = await reader.read()
+ if (done) {
+ return
+ }
+ yield value
+ }
+ })()
+ )
+}
+
+function replaceRequestBody(
+ base: T,
+ stream: Readable
+): T {
+ for (const key in stream) {
+ let v = stream[key as keyof Readable] as any
+ if (typeof v === 'function') {
+ v = v.bind(stream)
+ }
+ base[key as keyof T] = v
+ }
+
+ return base
+}
+
+/**
+ * An interface that encapsulates body stream cloning
+ * of an incoming request.
+ */
+export function clonableBodyForRequest(
+ incomingMessage: T
+) {
+ let bufferedBodyStream: BodyStream | null = null
+
+ return {
+ /**
+ * Replaces the original request body if necessary.
+ * This is done because once we read the body from the original request,
+ * we can't read it again.
+ */
+ finalize(): void {
+ if (bufferedBodyStream) {
+ replaceRequestBody(
+ incomingMessage,
+ bodyStreamToNodeStream(bufferedBodyStream)
+ )
+ }
+ },
+ /**
+ * Clones the body stream
+ * to pass into a middleware
+ */
+ cloneBodyStream(): BodyStream {
+ const originalStream =
+ bufferedBodyStream ?? requestToBodyStream(incomingMessage)
+ const [stream1, stream2] = originalStream.tee()
+ bufferedBodyStream = stream1
+ return stream2
+ },
+ }
+}
diff --git a/packages/next/server/config-shared.ts b/packages/next/server/config-shared.ts
index 4c74d58775c5..a580ee537efb 100644
--- a/packages/next/server/config-shared.ts
+++ b/packages/next/server/config-shared.ts
@@ -5,7 +5,7 @@ import {
ImageConfig,
ImageConfigComplete,
imageConfigDefault,
-} from './image-config'
+} from '../shared/lib/image-config'
export type NextConfigComplete = Required & {
images: Required
diff --git a/packages/next/server/config.ts b/packages/next/server/config.ts
index 2e334084a915..ea2d27db1b24 100644
--- a/packages/next/server/config.ts
+++ b/packages/next/server/config.ts
@@ -14,7 +14,11 @@ import {
normalizeConfig,
} from './config-shared'
import { loadWebpackHook } from './config-utils'
-import { ImageConfig, imageConfigDefault, VALID_LOADERS } from './image-config'
+import {
+ ImageConfig,
+ imageConfigDefault,
+ VALID_LOADERS,
+} from '../shared/lib/image-config'
import { loadEnvConfig } from '@next/env'
import { hasNextSupport } from '../telemetry/ci-info'
diff --git a/packages/next/server/dev/hot-reloader.ts b/packages/next/server/dev/hot-reloader.ts
index 92847d189629..0c6454f8072b 100644
--- a/packages/next/server/dev/hot-reloader.ts
+++ b/packages/next/server/dev/hot-reloader.ts
@@ -336,6 +336,8 @@ export default class HotReloader {
)
)
+ const hasEdgeRuntimePages = this.runtime === 'edge'
+
return webpackConfigSpan
.traceChild('generate-webpack-config')
.traceAsyncFn(() =>
@@ -363,7 +365,7 @@ export default class HotReloader {
}),
// For the edge runtime, we need an extra compiler to generate the
// web-targeted server bundle for now.
- this.runtime === 'edge'
+ hasEdgeRuntimePages
? getBaseWebpackConfig(this.dir, {
dev: true,
isServer: true,
diff --git a/packages/next/server/image-optimizer.ts b/packages/next/server/image-optimizer.ts
index 35c10f24ed43..747d07ce5d4e 100644
--- a/packages/next/server/image-optimizer.ts
+++ b/packages/next/server/image-optimizer.ts
@@ -259,7 +259,13 @@ export class ImageError extends Error {
constructor(statusCode: number, message: string) {
super(message)
- this.statusCode = statusCode
+
+ // ensure an error status is used > 400
+ if (statusCode >= 400) {
+ this.statusCode = statusCode
+ } else {
+ this.statusCode = 500
+ }
}
}
diff --git a/packages/next/server/load-components.ts b/packages/next/server/load-components.ts
index e4c86fee8bcb..b4d4b02a0ac0 100644
--- a/packages/next/server/load-components.ts
+++ b/packages/next/server/load-components.ts
@@ -1,3 +1,8 @@
+import type {
+ AppType,
+ DocumentType,
+ NextComponentType,
+} from '../shared/lib/utils'
import {
BUILD_MANIFEST,
REACT_LOADABLE_MANIFEST,
@@ -5,7 +10,6 @@ import {
import { join } from 'path'
import { requirePage } from './require'
import { BuildManifest } from './get-page-files'
-import { AppType, DocumentType } from '../shared/lib/utils'
import { interopDefault } from '../lib/interop-default'
import {
PageConfig,
@@ -22,7 +26,7 @@ export type ManifestItem = {
export type ReactLoadableManifest = { [moduleId: string]: ManifestItem }
export type LoadComponentsReturnType = {
- Component: React.ComponentType
+ Component: NextComponentType
pageConfig: PageConfig
buildManifest: BuildManifest
reactLoadableManifest: ReactLoadableManifest
diff --git a/packages/next/server/next-server.ts b/packages/next/server/next-server.ts
index 4c7779481822..a19c4477d793 100644
--- a/packages/next/server/next-server.ts
+++ b/packages/next/server/next-server.ts
@@ -8,6 +8,7 @@ import type { ParsedNextUrl } from '../shared/lib/router/utils/parse-next-url'
import type { PrerenderManifest } from '../build'
import type { Rewrite } from '../lib/load-custom-routes'
import type { BaseNextRequest, BaseNextResponse } from './base-http'
+import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin'
import { execOnce } from '../shared/lib/utils'
import {
@@ -34,11 +35,10 @@ import {
CLIENT_PUBLIC_FILES_PATH,
SERVERLESS_DIRECTORY,
} from '../shared/lib/constants'
-import { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin'
import { recursiveReadDirSync } from './lib/recursive-readdir-sync'
import { format as formatUrl, UrlWithParsedQuery } from 'url'
import compression from 'next/dist/compiled/compression'
-import Proxy from 'next/dist/compiled/http-proxy'
+import HttpProxy from 'next/dist/compiled/http-proxy'
import { route } from './router'
import { run } from './web/sandbox'
@@ -73,6 +73,8 @@ import { loadEnvConfig } from '@next/env'
import { getCustomRoute } from './server-route-utils'
import { urlQueryToSearchParams } from '../shared/lib/router/utils/querystring'
import ResponseCache from '../server/response-cache'
+import { removePathTrailingSlash } from '../client/normalize-trailing-slash'
+import { clonableBodyForRequest } from './body-streams'
export * from './base-server'
@@ -485,7 +487,7 @@ export default class NextNodeServer extends BaseServer {
parsedUrl.search = stringifyQuery(req, query)
const target = formatUrl(parsedUrl)
- const proxy = new Proxy({
+ const proxy = new HttpProxy({
target,
changeOrigin: true,
ignorePath: true,
@@ -1029,7 +1031,8 @@ export default class NextNodeServer extends BaseServer {
},
})
- if (!this.middleware?.some((m) => m.match(parsedUrl.pathname))) {
+ const normalizedPathname = removePathTrailingSlash(parsedUrl.pathname)
+ if (!this.middleware?.some((m) => m.match(normalizedPathname))) {
return { finished: false }
}
@@ -1211,6 +1214,9 @@ export default class NextNodeServer extends BaseServer {
onWarning?: (warning: Error) => void
}): Promise {
this.middlewareBetaWarning()
+ const normalizedPathname = removePathTrailingSlash(
+ params.parsedUrl.pathname
+ )
// For middleware to "fetch" we must always provide an absolute URL
const url = getRequestMeta(params.request, '__NEXT_INIT_URL')!
@@ -1221,11 +1227,11 @@ export default class NextNodeServer extends BaseServer {
}
const page: { name?: string; params?: { [key: string]: string } } = {}
- if (await this.hasPage(params.parsedUrl.pathname)) {
+ if (await this.hasPage(normalizedPathname)) {
page.name = params.parsedUrl.pathname
} else if (this.dynamicRoutes) {
for (const dynamicRoute of this.dynamicRoutes) {
- const matchParams = dynamicRoute.match(params.parsedUrl.pathname)
+ const matchParams = dynamicRoute.match(normalizedPathname)
if (matchParams) {
page.name = dynamicRoute.page
page.params = matchParams
@@ -1236,16 +1242,20 @@ export default class NextNodeServer extends BaseServer {
const allHeaders = new Headers()
let result: FetchEventResult | null = null
+ const method = (params.request.method || 'GET').toUpperCase()
+ let originalBody =
+ method !== 'GET' && method !== 'HEAD'
+ ? clonableBodyForRequest(params.request.body)
+ : undefined
for (const middleware of this.middleware || []) {
- if (middleware.match(params.parsedUrl.pathname)) {
+ if (middleware.match(normalizedPathname)) {
if (!(await this.hasMiddleware(middleware.page, middleware.ssr))) {
console.warn(`The Edge Function for ${middleware.page} was not found`)
continue
}
await this.ensureMiddleware(middleware.page, middleware.ssr)
-
const middlewareInfo = this.getMiddlewareInfo(middleware.page)
result = await run({
@@ -1254,7 +1264,7 @@ export default class NextNodeServer extends BaseServer {
env: middlewareInfo.env,
request: {
headers: params.request.headers,
- method: params.request.method || 'GET',
+ method,
nextConfig: {
basePath: this.nextConfig.basePath,
i18n: this.nextConfig.i18n,
@@ -1262,6 +1272,7 @@ export default class NextNodeServer extends BaseServer {
},
url: url,
page: page,
+ body: originalBody?.cloneBodyStream(),
},
useCache: !this.nextConfig.experimental.runtime,
onWarning: (warning: Error) => {
@@ -1298,6 +1309,8 @@ export default class NextNodeServer extends BaseServer {
}
}
+ originalBody?.finalize()
+
return result
}
diff --git a/packages/next/server/render.tsx b/packages/next/server/render.tsx
index d18e1f336b00..014b6c104a12 100644
--- a/packages/next/server/render.tsx
+++ b/packages/next/server/render.tsx
@@ -1,10 +1,29 @@
-import { IncomingMessage, ServerResponse } from 'http'
-import { ParsedUrlQuery, stringify as stringifyQuery } from 'querystring'
+import type { IncomingMessage, ServerResponse } from 'http'
+import type { NextRouter } from '../shared/lib/router/router'
+import type { HtmlProps } from '../shared/lib/html-context'
+import type { DomainLocale } from './config'
+import type {
+ AppType,
+ DocumentInitialProps,
+ DocumentProps,
+ DocumentContext,
+ NextComponentType,
+ RenderPage,
+ RenderPageResult,
+} from '../shared/lib/utils'
+import type { ImageConfigComplete } from '../shared/lib/image-config'
+import type { Redirect } from '../lib/load-custom-routes'
+import type { NextApiRequestCookies, __ApiPreviewProps } from './api-utils'
+import type { FontManifest } from './font-utils'
+import type { LoadComponentsReturnType, ManifestItem } from './load-components'
+import type { GetServerSideProps, GetStaticProps, PreviewData } from '../types'
+import type { UnwrapPromise } from '../lib/coalesced-function'
+
import React from 'react'
+import { ParsedUrlQuery, stringify as stringifyQuery } from 'querystring'
import { createFromReadableStream } from 'next/dist/compiled/react-server-dom-webpack'
import { renderToReadableStream } from 'next/dist/compiled/react-server-dom-webpack/writer.browser.server'
import { StyleRegistry, createStyleRegistry } from 'styled-jsx'
-import { UnwrapPromise } from '../lib/coalesced-function'
import {
GSP_NO_RETURNED_VALUE,
GSSP_COMPONENT_MEMBER_ERROR,
@@ -15,56 +34,38 @@ import {
SSG_GET_INITIAL_PROPS_CONFLICT,
UNSTABLE_REVALIDATE_RENAME_ERROR,
} from '../lib/constants'
-import { isSerializableProps } from '../lib/is-serializable-props'
-import { GetServerSideProps, GetStaticProps, PreviewData } from '../types'
-import { isInAmpMode } from '../shared/lib/amp'
-import { AmpStateContext } from '../shared/lib/amp-context'
import {
SERVER_PROPS_ID,
STATIC_PROPS_ID,
STATIC_STATUS_PAGES,
} from '../shared/lib/constants'
+import { isSerializableProps } from '../lib/is-serializable-props'
+import { isInAmpMode } from '../shared/lib/amp'
+import { AmpStateContext } from '../shared/lib/amp-context'
import { defaultHead } from '../shared/lib/head'
import { HeadManagerContext } from '../shared/lib/head-manager-context'
import Loadable from '../shared/lib/loadable'
import { LoadableContext } from '../shared/lib/loadable-context'
import { RouterContext } from '../shared/lib/router-context'
-import { NextRouter } from '../shared/lib/router/router'
import { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'
import {
- AppType,
ComponentsEnhancer,
- DocumentInitialProps,
- DocumentProps,
- DocumentContext,
getDisplayName,
isResSent,
loadGetInitialProps,
- NextComponentType,
- RenderPage,
- RenderPageResult,
} from '../shared/lib/utils'
-
import { HtmlContext } from '../shared/lib/html-context'
-import type { HtmlProps } from '../shared/lib/html-context'
-
-import type { NextApiRequestCookies, __ApiPreviewProps } from './api-utils'
import { denormalizePagePath } from './denormalize-page-path'
-import type { FontManifest } from './font-utils'
-import type { LoadComponentsReturnType, ManifestItem } from './load-components'
import { normalizePagePath } from './normalize-page-path'
import { getRequestMeta, NextParsedUrlQuery } from './request-meta'
import {
allowedStatusCodes,
getRedirectStatus,
- Redirect,
} from '../lib/load-custom-routes'
-import { DomainLocale } from './config'
import RenderResult from './render-result'
import isError from '../lib/is-error'
import { readableStreamTee } from './web/utils'
import { ImageConfigContext } from '../shared/lib/image-config-context'
-import { ImageConfigComplete } from './image-config'
import { FlushEffectsContext } from '../shared/lib/flush-effects'
let optimizeAmp: typeof import('./optimize-amp').default
@@ -545,7 +546,7 @@ export async function renderToHTML(
const defaultAppGetInitialProps =
App.getInitialProps === (App as any).origGetInitialProps
- const hasPageGetInitialProps = !!(Component as any).getInitialProps
+ const hasPageGetInitialProps = !!(Component as any)?.getInitialProps
const pageIsDynamic = isDynamicRoute(pathname)
@@ -561,7 +562,7 @@ export async function renderToHTML(
'getServerSideProps',
'getStaticPaths',
]) {
- if ((Component as any)[methodName]) {
+ if ((Component as any)?.[methodName]) {
throw new Error(
`page ${pathname} ${methodName} ${GSSP_COMPONENT_MEMBER_ERROR}`
)
@@ -1248,6 +1249,13 @@ export async function renderToHTML(
*/
const generateStaticHTML = supportsDynamicHTML !== true
const renderDocument = async () => {
+ if (runtime === 'edge' && Document.getInitialProps) {
+ // In the Edge runtime, Document.getInitialProps isn't supported.
+ throw new Error(
+ '`getInitialProps` in Document component is not supported with the Edge Runtime.'
+ )
+ }
+
if (!runtime && Document.getInitialProps) {
const renderPage: RenderPage = (
options: ComponentsEnhancer = {}
@@ -1474,7 +1482,6 @@ export async function renderToHTML(
head: documentResult.head,
headTags: documentResult.headTags,
styles: documentResult.styles,
- useMaybeDeferContent,
crossOrigin: renderOpts.crossOrigin,
optimizeCss: renderOpts.optimizeCss,
optimizeFonts: renderOpts.optimizeFonts,
@@ -1985,10 +1992,3 @@ async function streamToString(stream: ReadableStream): Promise {
bufferedString += value
}
}
-
-export function useMaybeDeferContent(
- _name: string,
- contentFn: () => JSX.Element
-): [boolean, JSX.Element] {
- return [false, contentFn()]
-}
diff --git a/packages/next/server/web/adapter.ts b/packages/next/server/web/adapter.ts
index ff7f3559453c..6252ea738f5c 100644
--- a/packages/next/server/web/adapter.ts
+++ b/packages/next/server/web/adapter.ts
@@ -16,6 +16,7 @@ export async function adapter(params: {
page: params.page,
input: params.request.url,
init: {
+ body: params.request.body,
geo: params.request.geo,
headers: fromNodeHeaders(params.request.headers),
ip: params.request.ip,
diff --git a/packages/next/server/web/sandbox/context.ts b/packages/next/server/web/sandbox/context.ts
index de3876ffae94..42f480bb6a31 100644
--- a/packages/next/server/web/sandbox/context.ts
+++ b/packages/next/server/web/sandbox/context.ts
@@ -202,6 +202,7 @@ function createContext(options: {
File,
FormData,
process: {
+ ...polyfills.process,
env: buildEnvironmentVariablesFrom(options.env),
},
ReadableStream: polyfills.ReadableStream,
diff --git a/packages/next/server/web/sandbox/polyfills.ts b/packages/next/server/web/sandbox/polyfills.ts
index 3b47e18af6cf..ce0834745265 100644
--- a/packages/next/server/web/sandbox/polyfills.ts
+++ b/packages/next/server/web/sandbox/polyfills.ts
@@ -1,6 +1,7 @@
import { Crypto as WebCrypto } from 'next/dist/compiled/@peculiar/webcrypto'
import { CryptoKey } from 'next/dist/compiled/@peculiar/webcrypto'
import { v4 as uuid } from 'next/dist/compiled/uuid'
+import processPolyfill from 'next/dist/compiled/process'
import { ReadableStream } from './readable-stream'
import crypto from 'crypto'
@@ -13,7 +14,7 @@ export function btoa(str: string) {
return Buffer.from(str, 'binary').toString('base64')
}
-export { CryptoKey, ReadableStream }
+export { CryptoKey, ReadableStream, processPolyfill as process }
export class Crypto extends WebCrypto {
// @ts-ignore Remove once types are updated and we deprecate node 12
diff --git a/packages/next/server/web/spec-extension/response.ts b/packages/next/server/web/spec-extension/response.ts
index e9993f74720a..c34ba8a1df56 100644
--- a/packages/next/server/web/spec-extension/response.ts
+++ b/packages/next/server/web/spec-extension/response.ts
@@ -87,7 +87,7 @@ export class NextResponse extends Response {
})
}
- static rewrite(destination: string | NextURL) {
+ static rewrite(destination: string | NextURL | URL) {
return new NextResponse(null, {
headers: {
'x-middleware-rewrite': validateURL(destination),
diff --git a/packages/next/server/web/types.ts b/packages/next/server/web/types.ts
index 5a6d48fde63b..029a1024d462 100644
--- a/packages/next/server/web/types.ts
+++ b/packages/next/server/web/types.ts
@@ -39,6 +39,7 @@ export interface RequestData {
params?: { [key: string]: string }
}
url: string
+ body?: ReadableStream
}
export interface FetchEventResult {
diff --git a/packages/next/shared/lib/html-context.ts b/packages/next/shared/lib/html-context.ts
index 25baecbd7bd0..68ecc266d645 100644
--- a/packages/next/shared/lib/html-context.ts
+++ b/packages/next/shared/lib/html-context.ts
@@ -1,5 +1,5 @@
import type { BuildManifest } from '../../server/get-page-files'
-import type { NEXT_DATA, MaybeDeferContentHook } from './utils'
+import type { NEXT_DATA } from './utils'
import { createContext } from 'react'
@@ -29,7 +29,6 @@ export type HtmlProps = {
disableOptimizedLoading?: boolean
styles?: React.ReactElement[] | React.ReactFragment
head?: Array
- useMaybeDeferContent: MaybeDeferContentHook
crossOrigin?: string
optimizeCss?: boolean
optimizeFonts?: boolean
diff --git a/packages/next/shared/lib/image-config-context.ts b/packages/next/shared/lib/image-config-context.ts
index c880933f4431..a27c0446eda9 100644
--- a/packages/next/shared/lib/image-config-context.ts
+++ b/packages/next/shared/lib/image-config-context.ts
@@ -1,8 +1,5 @@
import React from 'react'
-import {
- ImageConfigComplete,
- imageConfigDefault,
-} from '../../server/image-config'
+import { ImageConfigComplete, imageConfigDefault } from './image-config'
export const ImageConfigContext =
React.createContext(imageConfigDefault)
diff --git a/packages/next/server/image-config.ts b/packages/next/shared/lib/image-config.ts
similarity index 100%
rename from packages/next/server/image-config.ts
rename to packages/next/shared/lib/image-config.ts
diff --git a/packages/next/shared/lib/utils.ts b/packages/next/shared/lib/utils.ts
index f18e19f6cf45..c5aa734135bf 100644
--- a/packages/next/shared/lib/utils.ts
+++ b/packages/next/shared/lib/utils.ts
@@ -187,11 +187,6 @@ export type DocumentInitialProps = RenderPageResult & {
export type DocumentProps = DocumentInitialProps & HtmlProps
-export type MaybeDeferContentHook = (
- name: string,
- contentFn: () => JSX.Element
-) => [boolean, JSX.Element]
-
/**
* Next `API` route request
*/
diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json
index ddcf7c62d2f9..05eb6a32cc15 100644
--- a/packages/next/tsconfig.json
+++ b/packages/next/tsconfig.json
@@ -7,5 +7,5 @@
"moduleResolution": "node",
"jsx": "react"
},
- "exclude": ["dist", "./*.d.ts"]
+ "exclude": ["dist", "./*.d.ts", "image-types/global.d.ts"]
}
diff --git a/packages/next/types/misc.d.ts b/packages/next/types/misc.d.ts
index 555d3ad83d6e..cbbc83ee852e 100644
--- a/packages/next/types/misc.d.ts
+++ b/packages/next/types/misc.d.ts
@@ -331,6 +331,11 @@ declare module 'next/dist/compiled/comment-json' {
export = m
}
+declare module 'next/dist/compiled/process' {
+ import m from 'process'
+ export = m
+}
+
declare module 'pnp-webpack-plugin' {
import webpack from 'webpack4'
diff --git a/packages/react-dev-overlay/package.json b/packages/react-dev-overlay/package.json
index a1d512c8a6f7..c087bfefef7d 100644
--- a/packages/react-dev-overlay/package.json
+++ b/packages/react-dev-overlay/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/react-dev-overlay",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"description": "A development-only overlay for developing React applications.",
"repository": {
"url": "vercel/next.js",
diff --git a/packages/react-dev-overlay/src/client.ts b/packages/react-dev-overlay/src/client.ts
index f3acdd5b9287..8a4a83be0b50 100644
--- a/packages/react-dev-overlay/src/client.ts
+++ b/packages/react-dev-overlay/src/client.ts
@@ -87,6 +87,7 @@ function onRefresh() {
Bus.emit({ type: Bus.TYPE_REFRESH })
}
+export { getErrorByType } from './internal/helpers/getErrorByType'
export { getNodeError } from './internal/helpers/nodeStackFrames'
export { default as ReactDevOverlay } from './internal/ReactDevOverlay'
export {
diff --git a/packages/react-dev-overlay/src/internal/ReactDevOverlay.tsx b/packages/react-dev-overlay/src/internal/ReactDevOverlay.tsx
index 60023315c9c2..53446cf6014a 100644
--- a/packages/react-dev-overlay/src/internal/ReactDevOverlay.tsx
+++ b/packages/react-dev-overlay/src/internal/ReactDevOverlay.tsx
@@ -58,8 +58,14 @@ function reducer(state: OverlayState, ev: Bus.BusEvent): OverlayState {
}
}
+type ErrorType = 'runtime' | 'build' | 'full-refresh'
+
const ReactDevOverlay: React.FunctionComponent = function ReactDevOverlay({
children,
+ preventDisplay,
+}: {
+ children?: React.ReactNode
+ preventDisplay?: ErrorType[]
}) {
const [state, dispatch] = React.useReducer<
React.Reducer
@@ -90,6 +96,7 @@ const ReactDevOverlay: React.FunctionComponent = function ReactDevOverlay({
const isAboutToFullRefresh = state.isAboutToFullRefresh
const isMounted = hasBuildError || hasRuntimeErrors || isAboutToFullRefresh
+
return (
@@ -101,7 +108,16 @@ const ReactDevOverlay: React.FunctionComponent = function ReactDevOverlay({
- {hasBuildError ? (
+ {shouldPreventDisplay(
+ hasBuildError
+ ? 'build'
+ : hasRuntimeErrors
+ ? 'runtime'
+ : isAboutToFullRefresh
+ ? 'full-refresh'
+ : null,
+ preventDisplay
+ ) ? null : hasBuildError ? (
) : hasRuntimeErrors ? (
@@ -114,4 +130,14 @@ const ReactDevOverlay: React.FunctionComponent = function ReactDevOverlay({
)
}
+const shouldPreventDisplay = (
+ errorType?: ErrorType | null,
+ preventType?: ErrorType[] | null
+) => {
+ if (!preventType || !errorType) {
+ return false
+ }
+ return preventType.includes(errorType)
+}
+
export default ReactDevOverlay
diff --git a/packages/react-dev-overlay/src/internal/container/Errors.tsx b/packages/react-dev-overlay/src/internal/container/Errors.tsx
index c77339b0c6b3..556d3bd29d99 100644
--- a/packages/react-dev-overlay/src/internal/container/Errors.tsx
+++ b/packages/react-dev-overlay/src/internal/container/Errors.tsx
@@ -14,12 +14,9 @@ import {
import { LeftRightDialogHeader } from '../components/LeftRightDialogHeader'
import { Overlay } from '../components/Overlay'
import { Toast } from '../components/Toast'
+import { getErrorByType, ReadyRuntimeError } from '../helpers/getErrorByType'
import { isNodeError } from '../helpers/nodeStackFrames'
import { noop as css } from '../helpers/noop-template'
-import {
- getOriginalStackFrames,
- OriginalStackFrame,
-} from '../helpers/stack-frame'
import { RuntimeError } from './RuntimeError'
export type SupportedErrorEvent = {
@@ -28,13 +25,6 @@ export type SupportedErrorEvent = {
}
export type ErrorsProps = { errors: SupportedErrorEvent[] }
-export type ReadyRuntimeError = {
- id: number
-
- runtime: true
- error: Error
- frames: OriginalStackFrame[]
-}
type ReadyErrorEvent = ReadyRuntimeError
function getErrorSignature(ev: SupportedErrorEvent): string {
@@ -82,32 +72,6 @@ const HotlinkedText: React.FC<{
)
}
-async function getErrorByType(
- ev: SupportedErrorEvent
-): Promise {
- const { id, event } = ev
- switch (event.type) {
- case TYPE_UNHANDLED_ERROR:
- case TYPE_UNHANDLED_REJECTION: {
- return {
- id,
- runtime: true,
- error: event.reason,
- frames: await getOriginalStackFrames(
- isNodeError(event.reason),
- event.frames
- ),
- }
- }
- default: {
- break
- }
- }
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- const _: never = event
- throw new Error('type system invariant violation')
-}
-
export const Errors: React.FC = function Errors({ errors }) {
const [lookups, setLookups] = React.useState(
{} as { [eventId: string]: ReadyErrorEvent }
diff --git a/packages/react-dev-overlay/src/internal/container/RuntimeError.tsx b/packages/react-dev-overlay/src/internal/container/RuntimeError.tsx
index e1b82ca5d7b2..74665ef24c62 100644
--- a/packages/react-dev-overlay/src/internal/container/RuntimeError.tsx
+++ b/packages/react-dev-overlay/src/internal/container/RuntimeError.tsx
@@ -1,9 +1,9 @@
import * as React from 'react'
import { StackFrame } from 'stacktrace-parser'
import { CodeFrame } from '../components/CodeFrame'
+import { ReadyRuntimeError } from '../helpers/getErrorByType'
import { noop as css } from '../helpers/noop-template'
import { getFrameSource, OriginalStackFrame } from '../helpers/stack-frame'
-import { ReadyRuntimeError } from './Errors'
export type RuntimeErrorProps = { error: ReadyRuntimeError }
diff --git a/packages/react-dev-overlay/src/internal/helpers/getErrorByType.ts b/packages/react-dev-overlay/src/internal/helpers/getErrorByType.ts
new file mode 100644
index 000000000000..6e5276d1fdb5
--- /dev/null
+++ b/packages/react-dev-overlay/src/internal/helpers/getErrorByType.ts
@@ -0,0 +1,37 @@
+import { TYPE_UNHANDLED_ERROR, TYPE_UNHANDLED_REJECTION } from '../bus'
+import { SupportedErrorEvent } from '../container/Errors'
+import { isNodeError } from './nodeStackFrames'
+import { getOriginalStackFrames, OriginalStackFrame } from './stack-frame'
+
+export type ReadyRuntimeError = {
+ id: number
+ runtime: true
+ error: Error
+ frames: OriginalStackFrame[]
+}
+
+export async function getErrorByType(
+ ev: SupportedErrorEvent
+): Promise {
+ const { id, event } = ev
+ switch (event.type) {
+ case TYPE_UNHANDLED_ERROR:
+ case TYPE_UNHANDLED_REJECTION: {
+ return {
+ id,
+ runtime: true,
+ error: event.reason,
+ frames: await getOriginalStackFrames(
+ isNodeError(event.reason),
+ event.frames
+ ),
+ }
+ }
+ default: {
+ break
+ }
+ }
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ const _: never = event
+ throw new Error('type system invariant violation')
+}
diff --git a/packages/react-refresh-utils/package.json b/packages/react-refresh-utils/package.json
index f797514e1ac9..9adbbecf61d0 100644
--- a/packages/react-refresh-utils/package.json
+++ b/packages/react-refresh-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@next/react-refresh-utils",
- "version": "12.1.0",
+ "version": "12.1.1-canary.1",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
diff --git a/plopfile.js b/plopfile.js
index 2dc8b7e619e0..44cbe6eec120 100644
--- a/plopfile.js
+++ b/plopfile.js
@@ -15,7 +15,18 @@ module.exports = function (plop) {
type: 'list',
name: 'type',
message: 'Test type',
- choices: ['e2e', 'unit', 'production', 'development'],
+ choices: [
+ {
+ name: 'e2e - Test "next dev" and "next build && next start"',
+ value: 'e2e',
+ },
+ {
+ name: 'production - Test "next build && next start"',
+ value: 'production',
+ },
+ { name: 'development - Test "next dev"', value: 'development' },
+ { name: 'unit - Test individual files', value: 'unit' },
+ ],
},
],
actions: function (data) {
diff --git a/scripts/install-native.mjs b/scripts/install-native.mjs
index a52305df8881..198b6385e13b 100644
--- a/scripts/install-native.mjs
+++ b/scripts/install-native.mjs
@@ -19,6 +19,7 @@ import fs from 'fs-extra'
version: '1.0.0',
optionalDependencies: {
'@next/swc-android-arm64': 'canary',
+ '@next/swc-android-arm-eabi': 'canary',
'@next/swc-darwin-arm64': 'canary',
'@next/swc-darwin-x64': 'canary',
'@next/swc-linux-arm-gnueabihf': 'canary',
diff --git a/test/.stats-app/stats-config.js b/test/.stats-app/stats-config.js
index 82741d746daa..7996360ebeb5 100644
--- a/test/.stats-app/stats-config.js
+++ b/test/.stats-app/stats-config.js
@@ -9,7 +9,7 @@ const imagePageData = fs.readFileSync(
const clientGlobs = [
{
- name: 'Client Bundles (main, webpack, commons)',
+ name: 'Client Bundles (main, webpack)',
globs: [
'.next/static/runtime/+(main|webpack)-*',
'.next/static/chunks/!(polyfills*)',
diff --git a/test/e2e/yarn-pnp/test/utils.ts b/test/e2e/yarn-pnp/test/utils.ts
index d7b3f89d810b..1d616f084cd9 100644
--- a/test/e2e/yarn-pnp/test/utils.ts
+++ b/test/e2e/yarn-pnp/test/utils.ts
@@ -31,7 +31,7 @@ export function runTests(example = '') {
prev.push(`${cur}@${dependencies[cur]}`)
return prev
}, [] as string[])
- return `yarn set version berry && yarn config set enableGlobalCache true && yarn config set compressionLevel 0 && yarn add ${pkgs.join(
+ return `yarn set version 3.1.1 && yarn config set enableGlobalCache true && yarn config set compressionLevel 0 && yarn add ${pkgs.join(
' '
)}`
},
diff --git a/test/integration/image-component/default/pages/layout-fill-inside-nonrelative.js b/test/integration/image-component/default/pages/layout-fill-inside-nonrelative.js
index 855c370058fe..2c831a789e89 100644
--- a/test/integration/image-component/default/pages/layout-fill-inside-nonrelative.js
+++ b/test/integration/image-component/default/pages/layout-fill-inside-nonrelative.js
@@ -2,6 +2,7 @@ import React from 'react'
import Image from 'next/image'
import jpg from '../public/test.jpg'
import png from '../public/test.png'
+import avif from '../public/test.avif'
import webp from '../public/test.webp'
const Page = () => {
@@ -14,6 +15,9 @@ const Page = () => {