diff --git a/.dockerignore b/.dockerignore
index 64bcb6983..786c22ff9 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,10 +1,37 @@
-.git
-.idea
+# ignored Files
+.dockerignore
+.editorconfig
+.git*
+.prettier*
+electron*
+entitlements.plist
+forge.config.cjs
+nodemon.json
+renovate.json
+trilium.iml
+Dockerfile
+Dockerfile.*
+npm-debug.log
+/src/**/*.spec.ts
+
+# ignored folders
+/.cache
+/.git
+/.github
+/.idea
+/.vscode
/bin
+/build
/dist
/docs
-/npm-debug.log
-node_modules
+/dump-db
+/e2e
+/integration-tests
+/spec
+/test
+/test-etapi
+/node_modules
-src/**/*.ts
-!src/services/asset_path.ts
\ No newline at end of file
+
+# exceptions
+!/bin/copy-dist.ts
\ No newline at end of file
diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml
index d2ad631b0..f5e30323d 100644
--- a/.github/workflows/dev.yml
+++ b/.github/workflows/dev.yml
@@ -44,16 +44,6 @@ jobs:
- test_dev
steps:
- uses: actions/checkout@v4
- - name: Set up node & dependencies
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: "npm"
- - run: npm ci
- - name: Run the TypeScript build
- run: npx tsc
- - name: Create server-package.json
- run: cat package.json | grep -v electron > server-package.json
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
@@ -82,20 +72,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- - name: Set up node & dependencies
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: "npm"
-
- - run: npm ci
-
- - name: Run the TypeScript build
- run: npx tsc
-
- - name: Create server-package.json
- run: cat package.json | grep -v electron > server-package.json
-
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
diff --git a/.github/workflows/main-docker.yml b/.github/workflows/main-docker.yml
index 0c1be531a..085ae836e 100644
--- a/.github/workflows/main-docker.yml
+++ b/.github/workflows/main-docker.yml
@@ -57,9 +57,6 @@ jobs:
- name: Run the TypeScript build
run: npx tsc
- - name: Create server-package.json
- run: cat package.json | grep -v electron > server-package.json
-
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
@@ -154,18 +151,6 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
- - name: Set up node & dependencies
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: "npm"
- - run: npm ci
- - name: Run the TypeScript build
- run: npx tsc
- - name: Create server-package.json
- run: cat package.json | grep -v electron > server-package.json
-
- name: Login to GHCR
uses: docker/login-action@v3
with:
diff --git a/.prettierignore b/.prettierignore
index 42a133ba8..5e1d8fad5 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -2,4 +2,5 @@
*.md
*.yml
libraries/*
-docs/*
\ No newline at end of file
+docs/*
+src/public/app/doc_notes/**/*
\ No newline at end of file
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index 7fc3d9975..5eb23aafc 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,3 +1,7 @@
{
- "recommendations": ["lokalise.i18n-ally", "editorconfig.editorconfig"]
+ "recommendations": [
+ "lokalise.i18n-ally",
+ "editorconfig.editorconfig",
+ "vitest.explorer"
+ ]
}
diff --git a/.vscode/launch.json b/.vscode/launch.json
index cf21b9ce1..f8d4780a1 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,8 +5,8 @@
{
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
- "name": "nodemon server:start",
- "program": "${workspaceFolder}/src/main",
+ "name": "nodemon start-server",
+ "program": "${workspaceFolder}/src/www",
"request": "launch",
"restart": true,
"runtimeExecutable": "nodemon",
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 0733583d4..dd0be9432 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -19,5 +19,12 @@
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
- "npm.exclude": ["**/build", "**/dist", "**/out/**"]
+ "npm.exclude": [
+ "**/build",
+ "**/dist",
+ "**/out/**"
+ ],
+ "[xml]": {
+ "editor.defaultFormatter": "redhat.vscode-xml"
+ }
}
diff --git a/Dockerfile b/Dockerfile
index 365e4d07f..2436a8124 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,62 +1,46 @@
# Build stage
FROM node:22.14.0-bullseye-slim AS builder
-# Configure build dependencies in a single layer
-RUN apt-get update && apt-get install -y --no-install-recommends \
- autoconf \
- automake \
- g++ \
- gcc \
- libtool \
- make \
- nasm \
- libpng-dev \
- python3 \
- && rm -rf /var/lib/apt/lists/*
-
-WORKDIR /usr/src/app
+WORKDIR /usr/src/app/build
# Copy only necessary files for build
COPY . .
-COPY server-package.json package.json
# Build and cleanup in a single layer
-RUN cp -R build/src/* src/. && \
- cp build/docker_healthcheck.js . && \
- rm docker_healthcheck.ts && \
- npm install && \
- npm run build:webpack && \
- npm prune --omit=dev && \
+RUN npm ci && \
+ npm run build:prepare-dist && \
npm cache clean --force && \
- cp -r src/public/app/doc_notes src/public/app-dist/. && \
- rm -rf src/public/app/* && \
- mkdir -p src/public/app/services && \
- cp -r build/src/public/app/services/mime_type_definitions.js src/public/app/services/mime_type_definitions.js && \
- rm src/services/asset_path.ts && \
- rm -r build
+ rm -rf dist/node_modules && \
+ mv dist/* \
+ start-docker.sh \
+ /usr/src/app/ && \
+ rm -rf \
+ /usr/src/app/build \
+ /tmp/node-compile-cache
+
+#TODO: improve node_modules handling in copy-dist/Dockerfile -> remove duplicated work
+# currently copy-dist will copy certain node_module folders, but in the Dockerfile we delete them again (to keep image size down),
+# as we install necessary dependencies in runtime buildstage anyways
# Runtime stage
FROM node:22.14.0-bullseye-slim
-# Install only runtime dependencies
-RUN apt-get update && apt-get install -y --no-install-recommends \
- gosu \
- && rm -rf /var/lib/apt/lists/* && \
- rm -rf /var/cache/apt/*
-
WORKDIR /usr/src/app
-# Copy only necessary files from builder
-COPY --from=builder /usr/src/app/node_modules ./node_modules
-COPY --from=builder /usr/src/app/src ./src
-COPY --from=builder /usr/src/app/db ./db
-COPY --from=builder /usr/src/app/docker_healthcheck.js .
-COPY --from=builder /usr/src/app/start-docker.sh .
-COPY --from=builder /usr/src/app/package.json .
-COPY --from=builder /usr/src/app/config-sample.ini .
-COPY --from=builder /usr/src/app/images ./images
-COPY --from=builder /usr/src/app/translations ./translations
-COPY --from=builder /usr/src/app/libraries ./libraries
+# Install only runtime dependencies
+RUN apt-get update && \
+ apt-get install -y --no-install-recommends \
+ gosu && \
+ rm -rf \
+ /var/lib/apt/lists/* \
+ /var/cache/apt/*
+
+COPY --from=builder /usr/src/app ./
+
+RUN sed -i "/electron/d" package.json && \
+ npm ci --omit=dev && \
+ npm cache clean --force && \
+ rm -rf /tmp/node-compile-cache
# Configure container
EXPOSE 8080
diff --git a/Dockerfile.alpine b/Dockerfile.alpine
index 36d6f0b7b..9370bd6da 100644
--- a/Dockerfile.alpine
+++ b/Dockerfile.alpine
@@ -1,38 +1,26 @@
# Build stage
FROM node:22.14.0-alpine AS builder
-# Configure build dependencies
-RUN apk add --no-cache --virtual .build-dependencies \
- autoconf \
- automake \
- g++ \
- gcc \
- libtool \
- make \
- nasm \
- libpng-dev \
- python3
-
-WORKDIR /usr/src/app
+WORKDIR /usr/src/app/build
# Copy only necessary files for build
COPY . .
-COPY server-package.json package.json
# Build and cleanup in a single layer
-RUN cp -R build/src/* src/. && \
- cp build/docker_healthcheck.js . && \
- rm docker_healthcheck.ts && \
- npm install && \
- npm run build:webpack && \
- npm prune --omit=dev && \
+RUN npm ci && \
+ npm run build:prepare-dist && \
npm cache clean --force && \
- cp -r src/public/app/doc_notes src/public/app-dist/. && \
- rm -rf src/public/app && \
- mkdir -p src/public/app/services && \
- cp -r build/src/public/app/services/mime_type_definitions.js src/public/app/services/mime_type_definitions.js && \
- rm src/services/asset_path.ts && \
- rm -r build
+ rm -rf dist/node_modules && \
+ mv dist/* \
+ start-docker.sh \
+ /usr/src/app/ && \
+ rm -rf \
+ /usr/src/app/build \
+ /tmp/node-compile-cache
+
+#TODO: improve node_modules handling in copy-dist/Dockerfile -> remove duplicated work
+# currently copy-dist will copy certain node_module folders, but in the Dockerfile we delete them again (to keep image size down),
+# as we install necessary dependencies in runtime buildstage anyways
# Runtime stage
FROM node:22.14.0-alpine
@@ -42,17 +30,12 @@ RUN apk add --no-cache su-exec shadow
WORKDIR /usr/src/app
-# Copy only necessary files from builder
-COPY --from=builder /usr/src/app/node_modules ./node_modules
-COPY --from=builder /usr/src/app/src ./src
-COPY --from=builder /usr/src/app/db ./db
-COPY --from=builder /usr/src/app/docker_healthcheck.js .
-COPY --from=builder /usr/src/app/start-docker.sh .
-COPY --from=builder /usr/src/app/package.json .
-COPY --from=builder /usr/src/app/config-sample.ini .
-COPY --from=builder /usr/src/app/images ./images
-COPY --from=builder /usr/src/app/translations ./translations
-COPY --from=builder /usr/src/app/libraries ./libraries
+COPY --from=builder /usr/src/app ./
+
+RUN sed -i "/electron/d" package.json && \
+ npm ci --omit=dev && \
+ npm cache clean --force && \
+ rm -rf /tmp/node-compile-cache
# Add application user
RUN adduser -s /bin/false node; exit 0
diff --git a/bin/build-docker.sh b/bin/build-docker.sh
index a765930db..d95c289d4 100755
--- a/bin/build-docker.sh
+++ b/bin/build-docker.sh
@@ -5,11 +5,6 @@ set -e # Fail on any command error
VERSION=`jq -r ".version" package.json`
SERIES=${VERSION:0:4}-latest
-cat package.json | grep -v electron > server-package.json
-
-echo "Compiling typescript..."
-npx tsc
-
sudo docker build -t triliumnext/notes:$VERSION --network host -t triliumnext/notes:$SERIES .
if [[ $VERSION != *"beta"* ]]; then
diff --git a/bin/build-server.sh b/bin/build-server.sh
index 47bfe9397..ff2912470 100755
--- a/bin/build-server.sh
+++ b/bin/build-server.sh
@@ -66,8 +66,6 @@ chmod 755 $PKG_DIR/trilium.sh
cp bin/tpl/anonymize-database.sql $PKG_DIR/
cp -r translations $PKG_DIR/
-cp -r dump-db $PKG_DIR/
-rm -rf $PKG_DIR/dump-db/node_modules
VERSION=`jq -r ".version" package.json`
diff --git a/bin/copy-dist.ts b/bin/copy-dist.ts
index 2a2b75d56..289334321 100644
--- a/bin/copy-dist.ts
+++ b/bin/copy-dist.ts
@@ -2,8 +2,6 @@ import fs from "fs-extra";
import path from "path";
const DEST_DIR = "./dist";
-const DEST_DIR_SRC = path.join(DEST_DIR, "src");
-const DEST_DIR_NODE_MODULES = path.join(DEST_DIR, "node_modules");
const VERBOSE = process.env.VERBOSE;
@@ -13,43 +11,37 @@ function log(...args: any[]) {
}
}
-async function copyNodeModuleFileOrFolder(source: string) {
- const adjustedSource = source.substring(13);
- const destination = path.join(DEST_DIR_NODE_MODULES, adjustedSource);
-
+function copyNodeModuleFileOrFolder(source: string) {
+ const destination = path.join(DEST_DIR, source);
log(`Copying ${source} to ${destination}`);
- await fs.ensureDir(path.dirname(destination));
- await fs.copy(source, destination);
+ fs.ensureDirSync(path.dirname(destination));
+ fs.copySync(source, destination);
}
-const copy = async () => {
- for (const srcFile of fs.readdirSync("build")) {
- const destFile = path.join(DEST_DIR, path.basename(srcFile));
- log(`Copying source ${srcFile} -> ${destFile}.`);
- fs.copySync(path.join("build", srcFile), destFile, { recursive: true });
- }
+try {
- const filesToCopy = [
- "config-sample.ini",
- "tsconfig.webpack.json",
+ const assetsToCopy = new Set([
+ "./images",
+ "./libraries",
+ "./translations",
+ "./db",
+ "./config-sample.ini",
+ "./package-lock.json",
+ "./package.json",
+ "./src/views/",
"./src/etapi/etapi.openapi.yaml",
- "./src/routes/api/openapi.json"
- ];
- for (const file of filesToCopy) {
- log(`Copying ${file}`);
- await fs.copy(file, path.join(DEST_DIR, file));
- }
+ "./src/routes/api/openapi.json",
+ "./src/public/icon.png",
+ "./src/public/manifest.webmanifest",
+ "./src/public/robots.txt",
+ "./src/public/fonts",
+ "./src/public/stylesheets",
+ "./src/public/translations"
+ ]);
- const dirsToCopy = ["images", "libraries", "translations", "db"];
- for (const dir of dirsToCopy) {
- log(`Copying ${dir}`);
- await fs.copy(dir, path.join(DEST_DIR, dir));
- }
-
- const srcDirsToCopy = ["./src/public", "./src/views", "./build"];
- for (const dir of srcDirsToCopy) {
- log(`Copying ${dir}`);
- await fs.copy(dir, path.join(DEST_DIR_SRC, path.basename(dir)));
+ for (const asset of assetsToCopy) {
+ log(`Copying ${asset}`);
+ fs.copySync(asset, path.join(DEST_DIR, asset));
}
/**
@@ -58,10 +50,10 @@ const copy = async () => {
const publicDirsToCopy = ["./src/public/app/doc_notes"];
const PUBLIC_DIR = path.join(DEST_DIR, "src", "public", "app-dist");
for (const dir of publicDirsToCopy) {
- await fs.copy(dir, path.join(PUBLIC_DIR, path.basename(dir)));
+ fs.copySync(dir, path.join(PUBLIC_DIR, path.basename(dir)));
}
- const nodeModulesFile = [
+ const nodeModulesFile = new Set([
"node_modules/react/umd/react.production.min.js",
"node_modules/react/umd/react.development.js",
"node_modules/react-dom/umd/react-dom.production.min.js",
@@ -71,13 +63,9 @@ const copy = async () => {
"node_modules/katex/dist/contrib/auto-render.min.js",
"node_modules/@highlightjs/cdn-assets/highlight.min.js",
"node_modules/@mind-elixir/node-menu/dist/node-menu.umd.cjs"
- ];
+ ]);
- for (const file of nodeModulesFile) {
- await copyNodeModuleFileOrFolder(file);
- }
-
- const nodeModulesFolder = [
+ const nodeModulesFolder = new Set([
"node_modules/@excalidraw/excalidraw/dist/",
"node_modules/katex/dist/",
"node_modules/dayjs/",
@@ -104,13 +92,15 @@ const copy = async () => {
"node_modules/@highlightjs/cdn-assets/languages",
"node_modules/@highlightjs/cdn-assets/styles",
"node_modules/leaflet/dist"
- ];
+ ]);
- for (const folder of nodeModulesFolder) {
- await copyNodeModuleFileOrFolder(folder);
+
+
+ for (const nodeModuleItem of [...nodeModulesFile, ...nodeModulesFolder]) {
+ copyNodeModuleFileOrFolder(nodeModuleItem);
}
-};
+ console.log("Copying complete!")
-copy()
- .then(() => console.log("Copying complete!"))
- .catch((err) => console.error("Error during copy:", err));
+} catch(err) {
+ console.error("Error during copy:", err)
+}
\ No newline at end of file
diff --git a/bin/copy-trilium.sh b/bin/copy-trilium.sh
index e1d0e197f..f62b180a0 100755
--- a/bin/copy-trilium.sh
+++ b/bin/copy-trilium.sh
@@ -14,7 +14,7 @@ fi
# Trigger the TypeScript build
echo TypeScript build start
-npx tsc
+npm run build:ts
echo TypeScript build finished
# Copy the TypeScript artifacts
diff --git a/bin/generate-openapi.ts b/bin/generate-openapi.ts
index 4bd97a76f..4a2334bc5 100644
--- a/bin/generate-openapi.ts
+++ b/bin/generate-openapi.ts
@@ -1,6 +1,6 @@
import { fileURLToPath } from "url";
import { dirname, join } from "path";
-import swaggerJsdoc from 'swagger-jsdoc';
+import swaggerJsdoc from "swagger-jsdoc";
import fs from "fs";
/*
@@ -11,28 +11,30 @@ import fs from "fs";
*/
const options = {
- definition: {
- openapi: '3.1.1',
- info: {
- title: 'Trilium Notes - Sync server API',
- version: '0.96.6',
- description: "This is the internal sync server API used by Trilium Notes / TriliumNext Notes.\n\n_If you're looking for the officially supported External Trilium API, see [here](https://triliumnext.github.io/Docs/Wiki/etapi.html)._\n\nThis page does not yet list all routes. For a full list, see the [route controller](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/routes.ts).",
- contact: {
- name: "TriliumNext issue tracker",
- url: "https://github.com/TriliumNext/Notes/issues",
- },
- license: {
- name: "GNU Free Documentation License 1.3 (or later)",
- url: "https://www.gnu.org/licenses/fdl-1.3",
- },
+ definition: {
+ openapi: "3.1.1",
+ info: {
+ title: "Trilium Notes - Sync server API",
+ version: "0.96.6",
+ description:
+ "This is the internal sync server API used by Trilium Notes / TriliumNext Notes.\n\n_If you're looking for the officially supported External Trilium API, see [here](https://triliumnext.github.io/Docs/Wiki/etapi.html)._\n\nThis page does not yet list all routes. For a full list, see the [route controller](https://github.com/TriliumNext/Notes/blob/v0.91.6/src/routes/routes.ts).",
+ contact: {
+ name: "TriliumNext issue tracker",
+ url: "https://github.com/TriliumNext/Notes/issues"
+ },
+ license: {
+ name: "GNU Free Documentation License 1.3 (or later)",
+ url: "https://www.gnu.org/licenses/fdl-1.3"
+ }
+ }
},
- },
- apis: [
- // Put individual files here to have them ordered first.
- './src/routes/api/setup.ts',
- // all other files
- './src/routes/api/*.ts', './bin/generate-openapi.js'
- ],
+ apis: [
+ // Put individual files here to have them ordered first.
+ "./src/routes/api/setup.ts",
+ // all other files
+ "./src/routes/api/*.ts",
+ "./bin/generate-openapi.js"
+ ]
};
const openapiSpecification = swaggerJsdoc(options);
diff --git a/bin/release.sh b/bin/release.sh
index 6d7093bc2..db3c62e4b 100755
--- a/bin/release.sh
+++ b/bin/release.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+set -e
+
if [[ $# -eq 0 ]] ; then
echo "Missing argument of new version"
exit 1
diff --git a/db/migrations/0229__tasks.sql b/db/migrations/0229__tasks.sql
deleted file mode 100644
index 4d0381db2..000000000
--- a/db/migrations/0229__tasks.sql
+++ /dev/null
@@ -1,10 +0,0 @@
-CREATE TABLE IF NOT EXISTS "tasks"
-(
- "taskId" TEXT NOT NULL PRIMARY KEY,
- "parentNoteId" TEXT NOT NULL,
- "title" TEXT NOT NULL DEFAULT "",
- "dueDate" INTEGER,
- "isDone" INTEGER NOT NULL DEFAULT 0,
- "isDeleted" INTEGER NOT NULL DEFAULT 0,
- "utcDateModified" TEXT NOT NULL
-);
\ No newline at end of file
diff --git a/db/schema.sql b/db/schema.sql
index 77361f5ed..1b4c46321 100644
--- a/db/schema.sql
+++ b/db/schema.sql
@@ -132,14 +132,3 @@ CREATE INDEX IDX_attachments_ownerId_role
CREATE INDEX IDX_notes_blobId on notes (blobId);
CREATE INDEX IDX_revisions_blobId on revisions (blobId);
CREATE INDEX IDX_attachments_blobId on attachments (blobId);
-
-CREATE TABLE IF NOT EXISTS "tasks"
-(
- "taskId" TEXT NOT NULL PRIMARY KEY,
- "parentNoteId" TEXT NOT NULL,
- "title" TEXT NOT NULL DEFAULT "",
- "dueDate" INTEGER,
- "isDone" INTEGER NOT NULL DEFAULT 0,
- "isDeleted" INTEGER NOT NULL DEFAULT 0,
- "utcDateModified" TEXT NOT NULL
-);
\ No newline at end of file
diff --git a/dump-db/README.md b/dump-db/README.md
index 081bbcf96..be828d052 100644
--- a/dump-db/README.md
+++ b/dump-db/README.md
@@ -14,7 +14,7 @@ npm install
## Running
-See output of `npx esrun dump.ts --help`:
+See output of `npx tsx dump.ts --help`:
```
dump-db.ts
diff --git a/dump-db/package-lock.json b/dump-db/package-lock.json
index 8c04cbd8b..657af257e 100644
--- a/dump-db/package-lock.json
+++ b/dump-db/package-lock.json
@@ -10,9 +10,9 @@
"license": "ISC",
"dependencies": {
"better-sqlite3": "^11.1.2",
- "esrun": "^3.2.26",
"mime-types": "^2.1.34",
"sanitize-filename": "^1.6.3",
+ "tsx": "^4.19.3",
"yargs": "^17.3.1"
},
"devDependencies": {
@@ -21,16 +21,26 @@
"@types/yargs": "^17.0.33"
}
},
- "node_modules/@digitak/grubber": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@digitak/grubber/-/grubber-3.1.4.tgz",
- "integrity": "sha512-pqsnp2BUYlDoTXWG34HWgEJse/Eo1okRgNex8IG84wHrJp8h3SakeR5WhB4VxSA2+/D+frNYJ0ch3yXzsfNDoA==",
- "license": "MIT"
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz",
+ "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
},
"node_modules/@esbuild/android-arm": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz",
- "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz",
+ "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==",
"cpu": [
"arm"
],
@@ -40,13 +50,13 @@
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz",
- "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz",
+ "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==",
"cpu": [
"arm64"
],
@@ -56,13 +66,13 @@
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz",
- "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz",
+ "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==",
"cpu": [
"x64"
],
@@ -72,13 +82,13 @@
"android"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz",
- "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz",
+ "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==",
"cpu": [
"arm64"
],
@@ -88,13 +98,13 @@
"darwin"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz",
- "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz",
+ "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==",
"cpu": [
"x64"
],
@@ -104,13 +114,13 @@
"darwin"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz",
- "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==",
"cpu": [
"arm64"
],
@@ -120,13 +130,13 @@
"freebsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz",
- "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz",
+ "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==",
"cpu": [
"x64"
],
@@ -136,13 +146,13 @@
"freebsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz",
- "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz",
+ "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==",
"cpu": [
"arm"
],
@@ -152,13 +162,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz",
- "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz",
+ "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==",
"cpu": [
"arm64"
],
@@ -168,13 +178,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz",
- "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz",
+ "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==",
"cpu": [
"ia32"
],
@@ -184,13 +194,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz",
- "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz",
+ "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==",
"cpu": [
"loong64"
],
@@ -200,13 +210,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz",
- "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz",
+ "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==",
"cpu": [
"mips64el"
],
@@ -216,13 +226,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz",
- "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz",
+ "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==",
"cpu": [
"ppc64"
],
@@ -232,13 +242,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz",
- "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz",
+ "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==",
"cpu": [
"riscv64"
],
@@ -248,13 +258,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz",
- "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz",
+ "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==",
"cpu": [
"s390x"
],
@@ -264,13 +274,13 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz",
- "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz",
+ "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==",
"cpu": [
"x64"
],
@@ -280,13 +290,29 @@
"linux"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz",
- "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz",
+ "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==",
"cpu": [
"x64"
],
@@ -296,13 +322,29 @@
"netbsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==",
+ "cpu": [
+ "arm64"
+ ],
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz",
- "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz",
+ "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==",
"cpu": [
"x64"
],
@@ -312,13 +354,13 @@
"openbsd"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/sunos-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz",
- "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz",
+ "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==",
"cpu": [
"x64"
],
@@ -328,13 +370,13 @@
"sunos"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz",
- "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz",
+ "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==",
"cpu": [
"arm64"
],
@@ -344,13 +386,13 @@
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz",
- "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz",
+ "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==",
"cpu": [
"ia32"
],
@@ -360,13 +402,13 @@
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz",
- "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz",
+ "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==",
"cpu": [
"x64"
],
@@ -376,7 +418,7 @@
"win32"
],
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/@types/better-sqlite3": {
@@ -430,19 +472,6 @@
"node": ">=8"
}
},
- "node_modules/anymatch": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
- "license": "ISC",
- "dependencies": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- },
- "engines": {
- "node": ">= 8"
- }
- },
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -473,18 +502,6 @@
"prebuild-install": "^7.1.1"
}
},
- "node_modules/binary-extensions": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
- "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
- "license": "MIT",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
@@ -505,18 +522,6 @@
"readable-stream": "^3.4.0"
}
},
- "node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
- "license": "MIT",
- "dependencies": {
- "fill-range": "^7.1.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
@@ -541,30 +546,6 @@
"ieee754": "^1.1.13"
}
},
- "node_modules/chokidar": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
- "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
- "license": "MIT",
- "dependencies": {
- "anymatch": "~3.1.2",
- "braces": "~3.0.2",
- "glob-parent": "~5.1.2",
- "is-binary-path": "~2.1.0",
- "is-glob": "~4.0.1",
- "normalize-path": "~3.0.0",
- "readdirp": "~3.6.0"
- },
- "engines": {
- "node": ">= 8.10.0"
- },
- "funding": {
- "url": "https://paulmillr.com/funding/"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- }
- },
"node_modules/chownr": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
@@ -632,40 +613,43 @@
}
},
"node_modules/esbuild": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz",
- "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz",
+ "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==",
"hasInstallScript": true,
"license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
- "node": ">=12"
+ "node": ">=18"
},
"optionalDependencies": {
- "@esbuild/android-arm": "0.17.19",
- "@esbuild/android-arm64": "0.17.19",
- "@esbuild/android-x64": "0.17.19",
- "@esbuild/darwin-arm64": "0.17.19",
- "@esbuild/darwin-x64": "0.17.19",
- "@esbuild/freebsd-arm64": "0.17.19",
- "@esbuild/freebsd-x64": "0.17.19",
- "@esbuild/linux-arm": "0.17.19",
- "@esbuild/linux-arm64": "0.17.19",
- "@esbuild/linux-ia32": "0.17.19",
- "@esbuild/linux-loong64": "0.17.19",
- "@esbuild/linux-mips64el": "0.17.19",
- "@esbuild/linux-ppc64": "0.17.19",
- "@esbuild/linux-riscv64": "0.17.19",
- "@esbuild/linux-s390x": "0.17.19",
- "@esbuild/linux-x64": "0.17.19",
- "@esbuild/netbsd-x64": "0.17.19",
- "@esbuild/openbsd-x64": "0.17.19",
- "@esbuild/sunos-x64": "0.17.19",
- "@esbuild/win32-arm64": "0.17.19",
- "@esbuild/win32-ia32": "0.17.19",
- "@esbuild/win32-x64": "0.17.19"
+ "@esbuild/aix-ppc64": "0.25.0",
+ "@esbuild/android-arm": "0.25.0",
+ "@esbuild/android-arm64": "0.25.0",
+ "@esbuild/android-x64": "0.25.0",
+ "@esbuild/darwin-arm64": "0.25.0",
+ "@esbuild/darwin-x64": "0.25.0",
+ "@esbuild/freebsd-arm64": "0.25.0",
+ "@esbuild/freebsd-x64": "0.25.0",
+ "@esbuild/linux-arm": "0.25.0",
+ "@esbuild/linux-arm64": "0.25.0",
+ "@esbuild/linux-ia32": "0.25.0",
+ "@esbuild/linux-loong64": "0.25.0",
+ "@esbuild/linux-mips64el": "0.25.0",
+ "@esbuild/linux-ppc64": "0.25.0",
+ "@esbuild/linux-riscv64": "0.25.0",
+ "@esbuild/linux-s390x": "0.25.0",
+ "@esbuild/linux-x64": "0.25.0",
+ "@esbuild/netbsd-arm64": "0.25.0",
+ "@esbuild/netbsd-x64": "0.25.0",
+ "@esbuild/openbsd-arm64": "0.25.0",
+ "@esbuild/openbsd-x64": "0.25.0",
+ "@esbuild/sunos-x64": "0.25.0",
+ "@esbuild/win32-arm64": "0.25.0",
+ "@esbuild/win32-ia32": "0.25.0",
+ "@esbuild/win32-x64": "0.25.0"
}
},
"node_modules/escalade": {
@@ -676,23 +660,6 @@
"node": ">=6"
}
},
- "node_modules/esrun": {
- "version": "3.2.26",
- "resolved": "https://registry.npmjs.org/esrun/-/esrun-3.2.26.tgz",
- "integrity": "sha512-gDjP87qj4RW0BryZXPY3/L161hPo9uG6luBTjLsuHG3cKnhSMrzB7eNzSzvDyBLg7OgugyvzSgB2ov7mZ/oa7Q==",
- "license": "ISC",
- "dependencies": {
- "@digitak/grubber": "^3.1.4",
- "chokidar": "^3.5.1",
- "esbuild": "^0.17.4"
- },
- "bin": {
- "esrun": "bin.js"
- },
- "engines": {
- "node": ">=14.0"
- }
- },
"node_modules/expand-template": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
@@ -708,18 +675,6 @@
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"license": "MIT"
},
- "node_modules/fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
- "license": "MIT",
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
@@ -748,24 +703,24 @@
"node": "6.* || 8.* || >= 10.*"
}
},
+ "node_modules/get-tsconfig": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz",
+ "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==",
+ "license": "MIT",
+ "dependencies": {
+ "resolve-pkg-maps": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
+ }
+ },
"node_modules/github-from-package": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
"license": "MIT"
},
- "node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "license": "ISC",
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
@@ -798,27 +753,6 @@
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
"license": "ISC"
},
- "node_modules/is-binary-path": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
- "license": "MIT",
- "dependencies": {
- "binary-extensions": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
@@ -827,27 +761,6 @@
"node": ">=8"
}
},
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "license": "MIT",
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "license": "MIT",
- "engines": {
- "node": ">=0.12.0"
- }
- },
"node_modules/mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@@ -912,15 +825,6 @@
"node": ">=10"
}
},
- "node_modules/normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -930,18 +834,6 @@
"wrappy": "1"
}
},
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "license": "MIT",
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/prebuild-install": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz",
@@ -1007,18 +899,6 @@
"node": ">= 6"
}
},
- "node_modules/readdirp": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
- "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
- "license": "MIT",
- "dependencies": {
- "picomatch": "^2.2.1"
- },
- "engines": {
- "node": ">=8.10.0"
- }
- },
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -1027,6 +907,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
+ }
+ },
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -1183,18 +1072,6 @@
"node": ">=6"
}
},
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "license": "MIT",
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
"node_modules/truncate-utf8-bytes": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
@@ -1203,6 +1080,25 @@
"utf8-byte-length": "^1.0.1"
}
},
+ "node_modules/tsx": {
+ "version": "4.19.3",
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz",
+ "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==",
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "~0.25.0",
+ "get-tsconfig": "^4.7.5"
+ },
+ "bin": {
+ "tsx": "dist/cli.mjs"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ }
+ },
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@@ -1320,141 +1216,154 @@
}
},
"dependencies": {
- "@digitak/grubber": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@digitak/grubber/-/grubber-3.1.4.tgz",
- "integrity": "sha512-pqsnp2BUYlDoTXWG34HWgEJse/Eo1okRgNex8IG84wHrJp8h3SakeR5WhB4VxSA2+/D+frNYJ0ch3yXzsfNDoA=="
+ "@esbuild/aix-ppc64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.0.tgz",
+ "integrity": "sha512-O7vun9Sf8DFjH2UtqK8Ku3LkquL9SZL8OLY1T5NZkA34+wG3OQF7cl4Ql8vdNzM6fzBbYfLaiRLIOZ+2FOCgBQ==",
+ "optional": true
},
"@esbuild/android-arm": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz",
- "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.0.tgz",
+ "integrity": "sha512-PTyWCYYiU0+1eJKmw21lWtC+d08JDZPQ5g+kFyxP0V+es6VPPSUhM6zk8iImp2jbV6GwjX4pap0JFbUQN65X1g==",
"optional": true
},
"@esbuild/android-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz",
- "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.0.tgz",
+ "integrity": "sha512-grvv8WncGjDSyUBjN9yHXNt+cq0snxXbDxy5pJtzMKGmmpPxeAmAhWxXI+01lU5rwZomDgD3kJwulEnhTRUd6g==",
"optional": true
},
"@esbuild/android-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz",
- "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.0.tgz",
+ "integrity": "sha512-m/ix7SfKG5buCnxasr52+LI78SQ+wgdENi9CqyCXwjVR2X4Jkz+BpC3le3AoBPYTC9NHklwngVXvbJ9/Akhrfg==",
"optional": true
},
"@esbuild/darwin-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz",
- "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.0.tgz",
+ "integrity": "sha512-mVwdUb5SRkPayVadIOI78K7aAnPamoeFR2bT5nszFUZ9P8UpK4ratOdYbZZXYSqPKMHfS1wdHCJk1P1EZpRdvw==",
"optional": true
},
"@esbuild/darwin-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz",
- "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.0.tgz",
+ "integrity": "sha512-DgDaYsPWFTS4S3nWpFcMn/33ZZwAAeAFKNHNa1QN0rI4pUjgqf0f7ONmXf6d22tqTY+H9FNdgeaAa+YIFUn2Rg==",
"optional": true
},
"@esbuild/freebsd-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz",
- "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-VN4ocxy6dxefN1MepBx/iD1dH5K8qNtNe227I0mnTRjry8tj5MRk4zprLEdG8WPyAPb93/e4pSgi1SoHdgOa4w==",
"optional": true
},
"@esbuild/freebsd-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz",
- "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.0.tgz",
+ "integrity": "sha512-mrSgt7lCh07FY+hDD1TxiTyIHyttn6vnjesnPoVDNmDfOmggTLXRv8Id5fNZey1gl/V2dyVK1VXXqVsQIiAk+A==",
"optional": true
},
"@esbuild/linux-arm": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz",
- "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.0.tgz",
+ "integrity": "sha512-vkB3IYj2IDo3g9xX7HqhPYxVkNQe8qTK55fraQyTzTX/fxaDtXiEnavv9geOsonh2Fd2RMB+i5cbhu2zMNWJwg==",
"optional": true
},
"@esbuild/linux-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz",
- "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.0.tgz",
+ "integrity": "sha512-9QAQjTWNDM/Vk2bgBl17yWuZxZNQIF0OUUuPZRKoDtqF2k4EtYbpyiG5/Dk7nqeK6kIJWPYldkOcBqjXjrUlmg==",
"optional": true
},
"@esbuild/linux-ia32": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz",
- "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.0.tgz",
+ "integrity": "sha512-43ET5bHbphBegyeqLb7I1eYn2P/JYGNmzzdidq/w0T8E2SsYL1U6un2NFROFRg1JZLTzdCoRomg8Rvf9M6W6Gg==",
"optional": true
},
"@esbuild/linux-loong64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz",
- "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.0.tgz",
+ "integrity": "sha512-fC95c/xyNFueMhClxJmeRIj2yrSMdDfmqJnyOY4ZqsALkDrrKJfIg5NTMSzVBr5YW1jf+l7/cndBfP3MSDpoHw==",
"optional": true
},
"@esbuild/linux-mips64el": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz",
- "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.0.tgz",
+ "integrity": "sha512-nkAMFju7KDW73T1DdH7glcyIptm95a7Le8irTQNO/qtkoyypZAnjchQgooFUDQhNAy4iu08N79W4T4pMBwhPwQ==",
"optional": true
},
"@esbuild/linux-ppc64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz",
- "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.0.tgz",
+ "integrity": "sha512-NhyOejdhRGS8Iwv+KKR2zTq2PpysF9XqY+Zk77vQHqNbo/PwZCzB5/h7VGuREZm1fixhs4Q/qWRSi5zmAiO4Fw==",
"optional": true
},
"@esbuild/linux-riscv64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz",
- "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.0.tgz",
+ "integrity": "sha512-5S/rbP5OY+GHLC5qXp1y/Mx//e92L1YDqkiBbO9TQOvuFXM+iDqUNG5XopAnXoRH3FjIUDkeGcY1cgNvnXp/kA==",
"optional": true
},
"@esbuild/linux-s390x": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz",
- "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.0.tgz",
+ "integrity": "sha512-XM2BFsEBz0Fw37V0zU4CXfcfuACMrppsMFKdYY2WuTS3yi8O1nFOhil/xhKTmE1nPmVyvQJjJivgDT+xh8pXJA==",
"optional": true
},
"@esbuild/linux-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz",
- "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.0.tgz",
+ "integrity": "sha512-9yl91rHw/cpwMCNytUDxwj2XjFpxML0y9HAOH9pNVQDpQrBxHy01Dx+vaMu0N1CKa/RzBD2hB4u//nfc+Sd3Cw==",
+ "optional": true
+ },
+ "@esbuild/netbsd-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-RuG4PSMPFfrkH6UwCAqBzauBWTygTvb1nxWasEJooGSJ/NwRw7b2HOwyRTQIU97Hq37l3npXoZGYMy3b3xYvPw==",
"optional": true
},
"@esbuild/netbsd-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz",
- "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.0.tgz",
+ "integrity": "sha512-jl+qisSB5jk01N5f7sPCsBENCOlPiS/xptD5yxOx2oqQfyourJwIKLRA2yqWdifj3owQZCL2sn6o08dBzZGQzA==",
+ "optional": true
+ },
+ "@esbuild/openbsd-arm64": {
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.0.tgz",
+ "integrity": "sha512-21sUNbq2r84YE+SJDfaQRvdgznTD8Xc0oc3p3iW/a1EVWeNj/SdUCbm5U0itZPQYRuRTW20fPMWMpcrciH2EJw==",
"optional": true
},
"@esbuild/openbsd-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz",
- "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.0.tgz",
+ "integrity": "sha512-2gwwriSMPcCFRlPlKx3zLQhfN/2WjJ2NSlg5TKLQOJdV0mSxIcYNTMhk3H3ulL/cak+Xj0lY1Ym9ysDV1igceg==",
"optional": true
},
"@esbuild/sunos-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz",
- "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.0.tgz",
+ "integrity": "sha512-bxI7ThgLzPrPz484/S9jLlvUAHYMzy6I0XiU1ZMeAEOBcS0VePBFxh1JjTQt3Xiat5b6Oh4x7UC7IwKQKIJRIg==",
"optional": true
},
"@esbuild/win32-arm64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz",
- "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.0.tgz",
+ "integrity": "sha512-ZUAc2YK6JW89xTbXvftxdnYy3m4iHIkDtK3CLce8wg8M2L+YZhIvO1DKpxrd0Yr59AeNNkTiic9YLf6FTtXWMw==",
"optional": true
},
"@esbuild/win32-ia32": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz",
- "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.0.tgz",
+ "integrity": "sha512-eSNxISBu8XweVEWG31/JzjkIGbGIJN/TrRoiSVZwZ6pkC6VX4Im/WV2cz559/TXLcYbcrDN8JtKgd9DJVIo8GA==",
"optional": true
},
"@esbuild/win32-x64": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz",
- "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.0.tgz",
+ "integrity": "sha512-ZENoHJBxA20C2zFzh6AI4fT6RraMzjYw4xKWemRTRmRVtN9c5DcH9r/f2ihEkMjOW5eGgrwCslG/+Y/3bL+DHQ==",
"optional": true
},
"@types/better-sqlite3": {
@@ -1501,15 +1410,6 @@
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
},
- "anymatch": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
- "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
- "requires": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- }
- },
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -1524,11 +1424,6 @@
"prebuild-install": "^7.1.1"
}
},
- "binary-extensions": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
- "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="
- },
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
@@ -1547,14 +1442,6 @@
"readable-stream": "^3.4.0"
}
},
- "braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
- "requires": {
- "fill-range": "^7.1.1"
- }
- },
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
@@ -1564,21 +1451,6 @@
"ieee754": "^1.1.13"
}
},
- "chokidar": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
- "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
- "requires": {
- "anymatch": "~3.1.2",
- "braces": "~3.0.2",
- "fsevents": "~2.3.2",
- "glob-parent": "~5.1.2",
- "is-binary-path": "~2.1.0",
- "is-glob": "~4.0.1",
- "normalize-path": "~3.0.0",
- "readdirp": "~3.6.0"
- }
- },
"chownr": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
@@ -1626,32 +1498,35 @@
}
},
"esbuild": {
- "version": "0.17.19",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz",
- "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==",
+ "version": "0.25.0",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.0.tgz",
+ "integrity": "sha512-BXq5mqc8ltbaN34cDqWuYKyNhX8D/Z0J1xdtdQ8UcIIIyJyz+ZMKUt58tF3SrZ85jcfN/PZYhjR5uDQAYNVbuw==",
"requires": {
- "@esbuild/android-arm": "0.17.19",
- "@esbuild/android-arm64": "0.17.19",
- "@esbuild/android-x64": "0.17.19",
- "@esbuild/darwin-arm64": "0.17.19",
- "@esbuild/darwin-x64": "0.17.19",
- "@esbuild/freebsd-arm64": "0.17.19",
- "@esbuild/freebsd-x64": "0.17.19",
- "@esbuild/linux-arm": "0.17.19",
- "@esbuild/linux-arm64": "0.17.19",
- "@esbuild/linux-ia32": "0.17.19",
- "@esbuild/linux-loong64": "0.17.19",
- "@esbuild/linux-mips64el": "0.17.19",
- "@esbuild/linux-ppc64": "0.17.19",
- "@esbuild/linux-riscv64": "0.17.19",
- "@esbuild/linux-s390x": "0.17.19",
- "@esbuild/linux-x64": "0.17.19",
- "@esbuild/netbsd-x64": "0.17.19",
- "@esbuild/openbsd-x64": "0.17.19",
- "@esbuild/sunos-x64": "0.17.19",
- "@esbuild/win32-arm64": "0.17.19",
- "@esbuild/win32-ia32": "0.17.19",
- "@esbuild/win32-x64": "0.17.19"
+ "@esbuild/aix-ppc64": "0.25.0",
+ "@esbuild/android-arm": "0.25.0",
+ "@esbuild/android-arm64": "0.25.0",
+ "@esbuild/android-x64": "0.25.0",
+ "@esbuild/darwin-arm64": "0.25.0",
+ "@esbuild/darwin-x64": "0.25.0",
+ "@esbuild/freebsd-arm64": "0.25.0",
+ "@esbuild/freebsd-x64": "0.25.0",
+ "@esbuild/linux-arm": "0.25.0",
+ "@esbuild/linux-arm64": "0.25.0",
+ "@esbuild/linux-ia32": "0.25.0",
+ "@esbuild/linux-loong64": "0.25.0",
+ "@esbuild/linux-mips64el": "0.25.0",
+ "@esbuild/linux-ppc64": "0.25.0",
+ "@esbuild/linux-riscv64": "0.25.0",
+ "@esbuild/linux-s390x": "0.25.0",
+ "@esbuild/linux-x64": "0.25.0",
+ "@esbuild/netbsd-arm64": "0.25.0",
+ "@esbuild/netbsd-x64": "0.25.0",
+ "@esbuild/openbsd-arm64": "0.25.0",
+ "@esbuild/openbsd-x64": "0.25.0",
+ "@esbuild/sunos-x64": "0.25.0",
+ "@esbuild/win32-arm64": "0.25.0",
+ "@esbuild/win32-ia32": "0.25.0",
+ "@esbuild/win32-x64": "0.25.0"
}
},
"escalade": {
@@ -1659,16 +1534,6 @@
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
},
- "esrun": {
- "version": "3.2.26",
- "resolved": "https://registry.npmjs.org/esrun/-/esrun-3.2.26.tgz",
- "integrity": "sha512-gDjP87qj4RW0BryZXPY3/L161hPo9uG6luBTjLsuHG3cKnhSMrzB7eNzSzvDyBLg7OgugyvzSgB2ov7mZ/oa7Q==",
- "requires": {
- "@digitak/grubber": "^3.1.4",
- "chokidar": "^3.5.1",
- "esbuild": "^0.17.4"
- }
- },
"expand-template": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
@@ -1679,14 +1544,6 @@
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
},
- "fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
- "requires": {
- "to-regex-range": "^5.0.1"
- }
- },
"fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
@@ -1703,19 +1560,19 @@
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
+ "get-tsconfig": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.0.tgz",
+ "integrity": "sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==",
+ "requires": {
+ "resolve-pkg-maps": "^1.0.0"
+ }
+ },
"github-from-package": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
},
- "glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "requires": {
- "is-glob": "^4.0.1"
- }
- },
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
@@ -1731,37 +1588,11 @@
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
},
- "is-binary-path": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
- "requires": {
- "binary-extensions": "^2.0.0"
- }
- },
- "is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="
- },
"is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="
},
- "is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "requires": {
- "is-extglob": "^2.1.1"
- }
- },
- "is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
- },
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
@@ -1803,11 +1634,6 @@
"semver": "^7.3.5"
}
},
- "normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
- },
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -1816,11 +1642,6 @@
"wrappy": "1"
}
},
- "picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
- },
"prebuild-install": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz",
@@ -1870,19 +1691,16 @@
"util-deprecate": "^1.0.1"
}
},
- "readdirp": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
- "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
- "requires": {
- "picomatch": "^2.2.1"
- }
- },
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
+ "resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw=="
+ },
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
@@ -1970,14 +1788,6 @@
"readable-stream": "^3.1.1"
}
},
- "to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "requires": {
- "is-number": "^7.0.0"
- }
- },
"truncate-utf8-bytes": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz",
@@ -1986,6 +1796,16 @@
"utf8-byte-length": "^1.0.1"
}
},
+ "tsx": {
+ "version": "4.19.3",
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.3.tgz",
+ "integrity": "sha512-4H8vUNGNjQ4V2EOoGw005+c+dGuPSnhpPBPHBtsZdGZBk/iJb4kguGlPWaZTZ3q5nMtFOEsY0nRDlh9PJyd6SQ==",
+ "requires": {
+ "esbuild": "~0.25.0",
+ "fsevents": "~2.3.3",
+ "get-tsconfig": "^4.7.5"
+ }
+ },
"tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
diff --git a/dump-db/package.json b/dump-db/package.json
index 39f98a45d..051cdbd2e 100644
--- a/dump-db/package.json
+++ b/dump-db/package.json
@@ -18,9 +18,9 @@
"homepage": "https://github.com/TriliumNext/Notes/blob/master/dump-db/README.md",
"dependencies": {
"better-sqlite3": "^11.1.2",
- "esrun": "^3.2.26",
"mime-types": "^2.1.34",
"sanitize-filename": "^1.6.3",
+ "tsx": "^4.19.3",
"yargs": "^17.3.1"
},
"devDependencies": {
diff --git a/e2e/i18n.spec.ts b/e2e/i18n.spec.ts
index 70713f097..1f711b060 100644
--- a/e2e/i18n.spec.ts
+++ b/e2e/i18n.spec.ts
@@ -11,16 +11,14 @@ test("Displays translation on desktop", async ({ page, context }) => {
const app = new App(page, context);
await app.goto();
- await expect(page.locator("#left-pane .quick-search input"))
- .toHaveAttribute("placeholder", "Quick search");
+ await expect(page.locator("#left-pane .quick-search input")).toHaveAttribute("placeholder", "Quick search");
});
test("Displays translation on mobile", async ({ page, context }) => {
const app = new App(page, context);
await app.goto({ isMobile: true });
- await expect(page.locator("#mobile-sidebar-wrapper .quick-search input"))
- .toHaveAttribute("placeholder", "Quick search");
+ await expect(page.locator("#mobile-sidebar-wrapper .quick-search input")).toHaveAttribute("placeholder", "Quick search");
});
test("Displays translations in Settings", async ({ page, context }) => {
@@ -44,14 +42,16 @@ test("User can change language from settings", async ({ page, context }) => {
// Check that the default value (English) is set.
await expect(app.currentNoteSplit).toContainText("Theme");
- const languageCombobox = await app.currentNoteSplit.getByRole("combobox").first();
+ const languageCombobox = app.currentNoteSplit.getByRole("combobox").first();
await expect(languageCombobox).toHaveValue("en");
// Select Chinese and ensure the translation is set.
await languageCombobox.selectOption("cn");
await expect(app.currentNoteSplit).toContainText("主题", { timeout: 15000 });
+ await expect(languageCombobox).toHaveValue("cn");
// Select English again.
await languageCombobox.selectOption("en");
await expect(app.currentNoteSplit).toContainText("Language", { timeout: 15000 });
+ await expect(languageCombobox).toHaveValue("en");
});
diff --git a/e2e/layout/tab_bar.spec.ts b/e2e/layout/tab_bar.spec.ts
index 99391c115..e6df6f328 100644
--- a/e2e/layout/tab_bar.spec.ts
+++ b/e2e/layout/tab_bar.spec.ts
@@ -19,13 +19,13 @@ test("Can drag tabs around", async ({ page, context }) => {
let tab = app.getTab(0);
// Drag the first tab at the end
- await tab.dragTo(app.getTab(2), { targetPosition: { x: 50, y: 0 }});
+ await tab.dragTo(app.getTab(2), { targetPosition: { x: 50, y: 0 } });
tab = app.getTab(2);
await expect(tab).toContainText(NOTE_TITLE);
// Drag the tab to the left
- await tab.dragTo(app.getTab(0), { targetPosition: { x: 50, y: 0 }});
+ await tab.dragTo(app.getTab(0), { targetPosition: { x: 50, y: 0 } });
await expect(app.getTab(0)).toContainText(NOTE_TITLE);
});
diff --git a/e2e/note_types/code.spec.ts b/e2e/note_types/code.spec.ts
index f0f204fcc..29084ff84 100644
--- a/e2e/note_types/code.spec.ts
+++ b/e2e/note_types/code.spec.ts
@@ -39,7 +39,9 @@ test("Displays lint errors for backend script", async ({ page, context }) => {
});
async function expectTooltip(page: Page, tooltip: string) {
- await expect(page.locator(".CodeMirror-lint-tooltip:visible", {
- "hasText": tooltip
- })).toBeVisible();
+ await expect(
+ page.locator(".CodeMirror-lint-tooltip:visible", {
+ hasText: tooltip
+ })
+ ).toBeVisible();
}
diff --git a/e2e/note_types/mermaid.spec.ts b/e2e/note_types/mermaid.spec.ts
index fd24b4385..f7a0dd401 100644
--- a/e2e/note_types/mermaid.spec.ts
+++ b/e2e/note_types/mermaid.spec.ts
@@ -3,7 +3,8 @@ import App from "../support/app";
test("renders ELK flowchart", async ({ page, context }) => {
await testAriaSnapshot({
- page, context,
+ page,
+ context,
noteTitle: "Flowchart ELK on",
snapshot: `
- document:
@@ -22,12 +23,13 @@ test("renders ELK flowchart", async ({ page, context }) => {
- paragraph: Guarantee
- text: Interfaces for B
`
- })
+ });
});
test("renders standard flowchart", async ({ page, context }) => {
await testAriaSnapshot({
- page, context,
+ page,
+ context,
noteTitle: "Flowchart ELK off",
snapshot: `
- document:
@@ -46,7 +48,7 @@ test("renders standard flowchart", async ({ page, context }) => {
- paragraph: C
- text: Interfaces for B
`
- })
+ });
});
interface AriaTestOpts {
diff --git a/e2e/note_types/text.spec.ts b/e2e/note_types/text.spec.ts
index 542eb4e33..71e2da2cc 100644
--- a/e2e/note_types/text.spec.ts
+++ b/e2e/note_types/text.spec.ts
@@ -44,8 +44,8 @@ test("Highlights list is displayed", async ({ page, context }) => {
await expect(app.sidebar).toContainText("Highlights List");
const rootList = app.sidebar.locator(".highlights-list ol");
- let index=0;
- for (const highlightedEl of [ "Bold 1", "Italic 1", "Underline 1", "Colored text 1", "Background text 1", "Bold 2", "Italic 2", "Underline 2", "Colored text 2", "Background text 2" ]) {
+ let index = 0;
+ for (const highlightedEl of ["Bold 1", "Italic 1", "Underline 1", "Colored text 1", "Background text 1", "Bold 2", "Italic 2", "Underline 2", "Colored text 2", "Background text 2"]) {
await expect(rootList.locator("li").nth(index++)).toContainText(highlightedEl);
}
});
@@ -54,7 +54,7 @@ test("Displays math popup", async ({ page, context }) => {
const app = new App(page, context);
await app.goto();
await app.goToNoteInNewTab("Empty text");
- const noteContent = app.currentNoteSplit.locator(".note-detail-editable-text-editor")
+ const noteContent = app.currentNoteSplit.locator(".note-detail-editable-text-editor");
await noteContent.fill("Hello world");
await noteContent.press("ControlOrMeta+M");
diff --git a/e2e/support/app.ts b/e2e/support/app.ts
index 400af51d2..64e60d74e 100644
--- a/e2e/support/app.ts
+++ b/e2e/support/app.ts
@@ -25,7 +25,7 @@ export default class App {
this.tabBar = page.locator(".tab-row-widget-container");
this.noteTree = page.locator(".tree-wrapper");
this.launcherBar = page.locator("#launcher-container");
- this.currentNoteSplit = page.locator(".note-split:not(.hidden-ext)")
+ this.currentNoteSplit = page.locator(".note-split:not(.hidden-ext)");
this.sidebar = page.locator("#right-pane");
}
@@ -42,12 +42,11 @@ export default class App {
url = "/";
}
- await this.page.goto(url, { waitUntil: "networkidle" });
+ await this.page.goto(url, { waitUntil: "networkidle", timeout: 30_000 });
// Wait for the page to load.
if (url === "/") {
- await expect(this.page.locator(".tree"))
- .toContainText("Trilium Integration Test");
+ await expect(this.page.locator(".tree")).toContainText("Trilium Integration Test");
await this.closeAllTabs();
}
}
@@ -109,11 +108,12 @@ export default class App {
});
expect(csrfToken).toBeTruthy();
- await expect(await this.page.request.put(`${BASE_URL}/api/options/${key}/${value}`, {
- headers: {
- "x-csrf-token": csrfToken
- }
- })).toBeOK();
+ await expect(
+ await this.page.request.put(`${BASE_URL}/api/options/${key}/${value}`, {
+ headers: {
+ "x-csrf-token": csrfToken
+ }
+ })
+ ).toBeOK();
}
-
}
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 000000000..55ad4d9a2
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,43 @@
+import eslint from "@eslint/js";
+import tseslint from "typescript-eslint";
+
+export default tseslint.config(
+ eslint.configs.recommended,
+ tseslint.configs.recommended,
+ // consider using rules below, once we have a full TS codebase and can be more strict
+ // tseslint.configs.strictTypeChecked,
+ // tseslint.configs.stylisticTypeChecked,
+ // tseslint.configs.recommendedTypeChecked,
+ {
+ languageOptions: {
+ parserOptions: {
+ projectService: true,
+ tsconfigRootDir: import.meta.dirname
+ }
+ }
+ },
+ {
+ rules: {
+ // add rule overrides here
+ "no-undef": "off",
+ "no-unused-vars": "off",
+ "@typescript-eslint/no-unused-vars": [
+ "error",
+ {
+ "argsIgnorePattern": "^_",
+ "varsIgnorePattern": "^_",
+ }
+ ]
+ }
+ },
+ {
+ ignores: [
+ "build/*",
+ "dist/*",
+ "docs/*",
+ "libraries/*",
+ "src/public/app-dist/*",
+ "src/public/app/doc_notes/*"
+ ]
+ }
+);
diff --git a/integration-tests/db/document.db b/integration-tests/db/document.db
index 519c5dad5..c9f96195b 100644
Binary files a/integration-tests/db/document.db and b/integration-tests/db/document.db differ
diff --git a/libraries/codemirror/eslint.js b/libraries/codemirror/eslint.js
index 9efda72ea..55f367884 100644
--- a/libraries/codemirror/eslint.js
+++ b/libraries/codemirror/eslint.js
@@ -35,39 +35,13 @@
return [];
}
- await glob.requireLibrary(glob.ESLINT);
-
if (text.length > 20000) {
console.log("Skipping linting because of large size: ", text.length);
return [];
}
- const errors = new eslint().verify(text, {
- root: true,
- parserOptions: {
- ecmaVersion: "2019"
- },
- extends: ['eslint:recommended', 'airbnb-base'],
- env: {
- 'browser': true,
- 'node': true
- },
- rules: {
- 'import/no-unresolved': 'off',
- 'func-names': 'off',
- 'comma-dangle': ['warn'],
- 'padded-blocks': 'off',
- 'linebreak-style': 'off',
- 'class-methods-use-this': 'off',
- 'no-unused-vars': ['warn', { vars: 'local', args: 'after-used' }],
- 'no-nested-ternary': 'off',
- 'no-underscore-dangle': ['error', {'allow': ['_super', '_lookupFactory']}]
- },
- globals: {
- "api": "readonly"
- }
- });
+ const errors = await glob.linter(text);
console.log(errors);
diff --git a/libraries/eslint/eslint.js b/libraries/eslint/eslint.js
deleted file mode 100644
index dd3f418f1..000000000
--- a/libraries/eslint/eslint.js
+++ /dev/null
@@ -1,112883 +0,0 @@
-(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 2 ? arguments[2] : undefined;
- var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
- var inc = 1;
- if (from < to && to < from + count) {
- inc = -1;
- from += count - 1;
- to += count - 1;
- }
- while (count-- > 0) {
- if (from in O) O[to] = O[from];
- else delete O[to];
- to += inc;
- from += inc;
- } return O;
-};
-
-},{"114":114,"118":118,"119":119}],9:[function(_dereq_,module,exports){
-// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
-'use strict';
-var toObject = _dereq_(119);
-var toAbsoluteIndex = _dereq_(114);
-var toLength = _dereq_(118);
-module.exports = function fill(value /* , start = 0, end = @length */) {
- var O = toObject(this);
- var length = toLength(O.length);
- var aLen = arguments.length;
- var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
- var end = aLen > 2 ? arguments[2] : undefined;
- var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
- while (endPos > index) O[index++] = value;
- return O;
-};
-
-},{"114":114,"118":118,"119":119}],10:[function(_dereq_,module,exports){
-var forOf = _dereq_(39);
-
-module.exports = function (iter, ITERATOR) {
- var result = [];
- forOf(iter, false, result.push, result, ITERATOR);
- return result;
-};
-
-},{"39":39}],11:[function(_dereq_,module,exports){
-// false -> Array#indexOf
-// true -> Array#includes
-var toIObject = _dereq_(117);
-var toLength = _dereq_(118);
-var toAbsoluteIndex = _dereq_(114);
-module.exports = function (IS_INCLUDES) {
- return function ($this, el, fromIndex) {
- var O = toIObject($this);
- var length = toLength(O.length);
- var index = toAbsoluteIndex(fromIndex, length);
- var value;
- // Array#includes uses SameValueZero equality algorithm
- // eslint-disable-next-line no-self-compare
- if (IS_INCLUDES && el != el) while (length > index) {
- value = O[index++];
- // eslint-disable-next-line no-self-compare
- if (value != value) return true;
- // Array#indexOf ignores holes, Array#includes - not
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
- if (O[index] === el) return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
-};
-
-},{"114":114,"117":117,"118":118}],12:[function(_dereq_,module,exports){
-// 0 -> Array#forEach
-// 1 -> Array#map
-// 2 -> Array#filter
-// 3 -> Array#some
-// 4 -> Array#every
-// 5 -> Array#find
-// 6 -> Array#findIndex
-var ctx = _dereq_(25);
-var IObject = _dereq_(47);
-var toObject = _dereq_(119);
-var toLength = _dereq_(118);
-var asc = _dereq_(15);
-module.exports = function (TYPE, $create) {
- var IS_MAP = TYPE == 1;
- var IS_FILTER = TYPE == 2;
- var IS_SOME = TYPE == 3;
- var IS_EVERY = TYPE == 4;
- var IS_FIND_INDEX = TYPE == 6;
- var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
- var create = $create || asc;
- return function ($this, callbackfn, that) {
- var O = toObject($this);
- var self = IObject(O);
- var f = ctx(callbackfn, that, 3);
- var length = toLength(self.length);
- var index = 0;
- var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
- var val, res;
- for (;length > index; index++) if (NO_HOLES || index in self) {
- val = self[index];
- res = f(val, index, O);
- if (TYPE) {
- if (IS_MAP) result[index] = res; // map
- else if (res) switch (TYPE) {
- case 3: return true; // some
- case 5: return val; // find
- case 6: return index; // findIndex
- case 2: result.push(val); // filter
- } else if (IS_EVERY) return false; // every
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
- };
-};
-
-},{"118":118,"119":119,"15":15,"25":25,"47":47}],13:[function(_dereq_,module,exports){
-var aFunction = _dereq_(3);
-var toObject = _dereq_(119);
-var IObject = _dereq_(47);
-var toLength = _dereq_(118);
-
-module.exports = function (that, callbackfn, aLen, memo, isRight) {
- aFunction(callbackfn);
- var O = toObject(that);
- var self = IObject(O);
- var length = toLength(O.length);
- var index = isRight ? length - 1 : 0;
- var i = isRight ? -1 : 1;
- if (aLen < 2) for (;;) {
- if (index in self) {
- memo = self[index];
- index += i;
- break;
- }
- index += i;
- if (isRight ? index < 0 : length <= index) {
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
- memo = callbackfn(memo, self[index], index, O);
- }
- return memo;
-};
-
-},{"118":118,"119":119,"3":3,"47":47}],14:[function(_dereq_,module,exports){
-var isObject = _dereq_(51);
-var isArray = _dereq_(49);
-var SPECIES = _dereq_(128)('species');
-
-module.exports = function (original) {
- var C;
- if (isArray(original)) {
- C = original.constructor;
- // cross-realm fallback
- if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
- if (isObject(C)) {
- C = C[SPECIES];
- if (C === null) C = undefined;
- }
- } return C === undefined ? Array : C;
-};
-
-},{"128":128,"49":49,"51":51}],15:[function(_dereq_,module,exports){
-// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
-var speciesConstructor = _dereq_(14);
-
-module.exports = function (original, length) {
- return new (speciesConstructor(original))(length);
-};
-
-},{"14":14}],16:[function(_dereq_,module,exports){
-'use strict';
-var aFunction = _dereq_(3);
-var isObject = _dereq_(51);
-var invoke = _dereq_(46);
-var arraySlice = [].slice;
-var factories = {};
-
-var construct = function (F, len, args) {
- if (!(len in factories)) {
- for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
- // eslint-disable-next-line no-new-func
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
- } return factories[len](F, args);
-};
-
-module.exports = Function.bind || function bind(that /* , ...args */) {
- var fn = aFunction(this);
- var partArgs = arraySlice.call(arguments, 1);
- var bound = function (/* args... */) {
- var args = partArgs.concat(arraySlice.call(arguments));
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
- };
- if (isObject(fn.prototype)) bound.prototype = fn.prototype;
- return bound;
-};
-
-},{"3":3,"46":46,"51":51}],17:[function(_dereq_,module,exports){
-// getting tag from 19.1.3.6 Object.prototype.toString()
-var cof = _dereq_(18);
-var TAG = _dereq_(128)('toStringTag');
-// ES3 wrong here
-var ARG = cof(function () { return arguments; }()) == 'Arguments';
-
-// fallback for IE11 Script Access Denied error
-var tryGet = function (it, key) {
- try {
- return it[key];
- } catch (e) { /* empty */ }
-};
-
-module.exports = function (it) {
- var O, T, B;
- return it === undefined ? 'Undefined' : it === null ? 'Null'
- // @@toStringTag case
- : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
- // builtinTag case
- : ARG ? cof(O)
- // ES3 arguments fallback
- : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
-};
-
-},{"128":128,"18":18}],18:[function(_dereq_,module,exports){
-var toString = {}.toString;
-
-module.exports = function (it) {
- return toString.call(it).slice(8, -1);
-};
-
-},{}],19:[function(_dereq_,module,exports){
-'use strict';
-var dP = _dereq_(72).f;
-var create = _dereq_(71);
-var redefineAll = _dereq_(93);
-var ctx = _dereq_(25);
-var anInstance = _dereq_(6);
-var forOf = _dereq_(39);
-var $iterDefine = _dereq_(55);
-var step = _dereq_(57);
-var setSpecies = _dereq_(100);
-var DESCRIPTORS = _dereq_(29);
-var fastKey = _dereq_(66).fastKey;
-var validate = _dereq_(125);
-var SIZE = DESCRIPTORS ? '_s' : 'size';
-
-var getEntry = function (that, key) {
- // fast case
- var index = fastKey(key);
- var entry;
- if (index !== 'F') return that._i[index];
- // frozen object case
- for (entry = that._f; entry; entry = entry.n) {
- if (entry.k == key) return entry;
- }
-};
-
-module.exports = {
- getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
- var C = wrapper(function (that, iterable) {
- anInstance(that, C, NAME, '_i');
- that._t = NAME; // collection type
- that._i = create(null); // index
- that._f = undefined; // first entry
- that._l = undefined; // last entry
- that[SIZE] = 0; // size
- if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
- });
- redefineAll(C.prototype, {
- // 23.1.3.1 Map.prototype.clear()
- // 23.2.3.2 Set.prototype.clear()
- clear: function clear() {
- for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
- entry.r = true;
- if (entry.p) entry.p = entry.p.n = undefined;
- delete data[entry.i];
- }
- that._f = that._l = undefined;
- that[SIZE] = 0;
- },
- // 23.1.3.3 Map.prototype.delete(key)
- // 23.2.3.4 Set.prototype.delete(value)
- 'delete': function (key) {
- var that = validate(this, NAME);
- var entry = getEntry(that, key);
- if (entry) {
- var next = entry.n;
- var prev = entry.p;
- delete that._i[entry.i];
- entry.r = true;
- if (prev) prev.n = next;
- if (next) next.p = prev;
- if (that._f == entry) that._f = next;
- if (that._l == entry) that._l = prev;
- that[SIZE]--;
- } return !!entry;
- },
- // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
- // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
- forEach: function forEach(callbackfn /* , that = undefined */) {
- validate(this, NAME);
- var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
- var entry;
- while (entry = entry ? entry.n : this._f) {
- f(entry.v, entry.k, this);
- // revert to the last existing entry
- while (entry && entry.r) entry = entry.p;
- }
- },
- // 23.1.3.7 Map.prototype.has(key)
- // 23.2.3.7 Set.prototype.has(value)
- has: function has(key) {
- return !!getEntry(validate(this, NAME), key);
- }
- });
- if (DESCRIPTORS) dP(C.prototype, 'size', {
- get: function () {
- return validate(this, NAME)[SIZE];
- }
- });
- return C;
- },
- def: function (that, key, value) {
- var entry = getEntry(that, key);
- var prev, index;
- // change existing entry
- if (entry) {
- entry.v = value;
- // create new entry
- } else {
- that._l = entry = {
- i: index = fastKey(key, true), // <- index
- k: key, // <- key
- v: value, // <- value
- p: prev = that._l, // <- previous entry
- n: undefined, // <- next entry
- r: false // <- removed
- };
- if (!that._f) that._f = entry;
- if (prev) prev.n = entry;
- that[SIZE]++;
- // add to index
- if (index !== 'F') that._i[index] = entry;
- } return that;
- },
- getEntry: getEntry,
- setStrong: function (C, NAME, IS_MAP) {
- // add .keys, .values, .entries, [@@iterator]
- // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
- $iterDefine(C, NAME, function (iterated, kind) {
- this._t = validate(iterated, NAME); // target
- this._k = kind; // kind
- this._l = undefined; // previous
- }, function () {
- var that = this;
- var kind = that._k;
- var entry = that._l;
- // revert to the last existing entry
- while (entry && entry.r) entry = entry.p;
- // get next entry
- if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
- // or finish the iteration
- that._t = undefined;
- return step(1);
- }
- // return step by kind
- if (kind == 'keys') return step(0, entry.k);
- if (kind == 'values') return step(0, entry.v);
- return step(0, [entry.k, entry.v]);
- }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
-
- // add [@@species], 23.1.2.2, 23.2.2.2
- setSpecies(NAME);
- }
-};
-
-},{"100":100,"125":125,"25":25,"29":29,"39":39,"55":55,"57":57,"6":6,"66":66,"71":71,"72":72,"93":93}],20:[function(_dereq_,module,exports){
-// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var classof = _dereq_(17);
-var from = _dereq_(10);
-module.exports = function (NAME) {
- return function toJSON() {
- if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
- return from(this);
- };
-};
-
-},{"10":10,"17":17}],21:[function(_dereq_,module,exports){
-'use strict';
-var redefineAll = _dereq_(93);
-var getWeak = _dereq_(66).getWeak;
-var anObject = _dereq_(7);
-var isObject = _dereq_(51);
-var anInstance = _dereq_(6);
-var forOf = _dereq_(39);
-var createArrayMethod = _dereq_(12);
-var $has = _dereq_(41);
-var validate = _dereq_(125);
-var arrayFind = createArrayMethod(5);
-var arrayFindIndex = createArrayMethod(6);
-var id = 0;
-
-// fallback for uncaught frozen keys
-var uncaughtFrozenStore = function (that) {
- return that._l || (that._l = new UncaughtFrozenStore());
-};
-var UncaughtFrozenStore = function () {
- this.a = [];
-};
-var findUncaughtFrozen = function (store, key) {
- return arrayFind(store.a, function (it) {
- return it[0] === key;
- });
-};
-UncaughtFrozenStore.prototype = {
- get: function (key) {
- var entry = findUncaughtFrozen(this, key);
- if (entry) return entry[1];
- },
- has: function (key) {
- return !!findUncaughtFrozen(this, key);
- },
- set: function (key, value) {
- var entry = findUncaughtFrozen(this, key);
- if (entry) entry[1] = value;
- else this.a.push([key, value]);
- },
- 'delete': function (key) {
- var index = arrayFindIndex(this.a, function (it) {
- return it[0] === key;
- });
- if (~index) this.a.splice(index, 1);
- return !!~index;
- }
-};
-
-module.exports = {
- getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
- var C = wrapper(function (that, iterable) {
- anInstance(that, C, NAME, '_i');
- that._t = NAME; // collection type
- that._i = id++; // collection id
- that._l = undefined; // leak store for uncaught frozen objects
- if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
- });
- redefineAll(C.prototype, {
- // 23.3.3.2 WeakMap.prototype.delete(key)
- // 23.4.3.3 WeakSet.prototype.delete(value)
- 'delete': function (key) {
- if (!isObject(key)) return false;
- var data = getWeak(key);
- if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
- return data && $has(data, this._i) && delete data[this._i];
- },
- // 23.3.3.4 WeakMap.prototype.has(key)
- // 23.4.3.4 WeakSet.prototype.has(value)
- has: function has(key) {
- if (!isObject(key)) return false;
- var data = getWeak(key);
- if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
- return data && $has(data, this._i);
- }
- });
- return C;
- },
- def: function (that, key, value) {
- var data = getWeak(anObject(key), true);
- if (data === true) uncaughtFrozenStore(that).set(key, value);
- else data[that._i] = value;
- return that;
- },
- ufstore: uncaughtFrozenStore
-};
-
-},{"12":12,"125":125,"39":39,"41":41,"51":51,"6":6,"66":66,"7":7,"93":93}],22:[function(_dereq_,module,exports){
-'use strict';
-var global = _dereq_(40);
-var $export = _dereq_(33);
-var redefine = _dereq_(94);
-var redefineAll = _dereq_(93);
-var meta = _dereq_(66);
-var forOf = _dereq_(39);
-var anInstance = _dereq_(6);
-var isObject = _dereq_(51);
-var fails = _dereq_(35);
-var $iterDetect = _dereq_(56);
-var setToStringTag = _dereq_(101);
-var inheritIfRequired = _dereq_(45);
-
-module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
- var Base = global[NAME];
- var C = Base;
- var ADDER = IS_MAP ? 'set' : 'add';
- var proto = C && C.prototype;
- var O = {};
- var fixMethod = function (KEY) {
- var fn = proto[KEY];
- redefine(proto, KEY,
- KEY == 'delete' ? function (a) {
- return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
- } : KEY == 'has' ? function has(a) {
- return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
- } : KEY == 'get' ? function get(a) {
- return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
- } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
- : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
- );
- };
- if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
- new C().entries().next();
- }))) {
- // create collection constructor
- C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
- redefineAll(C.prototype, methods);
- meta.NEED = true;
- } else {
- var instance = new C();
- // early implementations not supports chaining
- var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
- // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
- var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
- // most early implementations doesn't supports iterables, most modern - not close it correctly
- var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
- // for early implementations -0 and +0 not the same
- var BUGGY_ZERO = !IS_WEAK && fails(function () {
- // V8 ~ Chromium 42- fails only with 5+ elements
- var $instance = new C();
- var index = 5;
- while (index--) $instance[ADDER](index, index);
- return !$instance.has(-0);
- });
- if (!ACCEPT_ITERABLES) {
- C = wrapper(function (target, iterable) {
- anInstance(target, C, NAME);
- var that = inheritIfRequired(new Base(), target, C);
- if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
- return that;
- });
- C.prototype = proto;
- proto.constructor = C;
- }
- if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
- fixMethod('delete');
- fixMethod('has');
- IS_MAP && fixMethod('get');
- }
- if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
- // weak collections should not contains .clear method
- if (IS_WEAK && proto.clear) delete proto.clear;
- }
-
- setToStringTag(C, NAME);
-
- O[NAME] = C;
- $export($export.G + $export.W + $export.F * (C != Base), O);
-
- if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
-
- return C;
-};
-
-},{"101":101,"33":33,"35":35,"39":39,"40":40,"45":45,"51":51,"56":56,"6":6,"66":66,"93":93,"94":94}],23:[function(_dereq_,module,exports){
-var core = module.exports = { version: '2.5.0' };
-if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
-
-},{}],24:[function(_dereq_,module,exports){
-'use strict';
-var $defineProperty = _dereq_(72);
-var createDesc = _dereq_(92);
-
-module.exports = function (object, index, value) {
- if (index in object) $defineProperty.f(object, index, createDesc(0, value));
- else object[index] = value;
-};
-
-},{"72":72,"92":92}],25:[function(_dereq_,module,exports){
-// optional / simple context binding
-var aFunction = _dereq_(3);
-module.exports = function (fn, that, length) {
- aFunction(fn);
- if (that === undefined) return fn;
- switch (length) {
- case 1: return function (a) {
- return fn.call(that, a);
- };
- case 2: return function (a, b) {
- return fn.call(that, a, b);
- };
- case 3: return function (a, b, c) {
- return fn.call(that, a, b, c);
- };
- }
- return function (/* ...args */) {
- return fn.apply(that, arguments);
- };
-};
-
-},{"3":3}],26:[function(_dereq_,module,exports){
-'use strict';
-// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
-var fails = _dereq_(35);
-var getTime = Date.prototype.getTime;
-var $toISOString = Date.prototype.toISOString;
-
-var lz = function (num) {
- return num > 9 ? num : '0' + num;
-};
-
-// PhantomJS / old WebKit has a broken implementations
-module.exports = (fails(function () {
- return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
-}) || !fails(function () {
- $toISOString.call(new Date(NaN));
-})) ? function toISOString() {
- if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
- var d = this;
- var y = d.getUTCFullYear();
- var m = d.getUTCMilliseconds();
- var s = y < 0 ? '-' : y > 9999 ? '+' : '';
- return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
- '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
- 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
- ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
-} : $toISOString;
-
-},{"35":35}],27:[function(_dereq_,module,exports){
-'use strict';
-var anObject = _dereq_(7);
-var toPrimitive = _dereq_(120);
-var NUMBER = 'number';
-
-module.exports = function (hint) {
- if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
- return toPrimitive(anObject(this), hint != NUMBER);
-};
-
-},{"120":120,"7":7}],28:[function(_dereq_,module,exports){
-// 7.2.1 RequireObjectCoercible(argument)
-module.exports = function (it) {
- if (it == undefined) throw TypeError("Can't call method on " + it);
- return it;
-};
-
-},{}],29:[function(_dereq_,module,exports){
-// Thank's IE8 for his funny defineProperty
-module.exports = !_dereq_(35)(function () {
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
-});
-
-},{"35":35}],30:[function(_dereq_,module,exports){
-var isObject = _dereq_(51);
-var document = _dereq_(40).document;
-// typeof document.createElement is 'object' in old IE
-var is = isObject(document) && isObject(document.createElement);
-module.exports = function (it) {
- return is ? document.createElement(it) : {};
-};
-
-},{"40":40,"51":51}],31:[function(_dereq_,module,exports){
-// IE 8- don't enum bug keys
-module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
-).split(',');
-
-},{}],32:[function(_dereq_,module,exports){
-// all enumerable object keys, includes symbols
-var getKeys = _dereq_(81);
-var gOPS = _dereq_(78);
-var pIE = _dereq_(82);
-module.exports = function (it) {
- var result = getKeys(it);
- var getSymbols = gOPS.f;
- if (getSymbols) {
- var symbols = getSymbols(it);
- var isEnum = pIE.f;
- var i = 0;
- var key;
- while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
- } return result;
-};
-
-},{"78":78,"81":81,"82":82}],33:[function(_dereq_,module,exports){
-var global = _dereq_(40);
-var core = _dereq_(23);
-var hide = _dereq_(42);
-var redefine = _dereq_(94);
-var ctx = _dereq_(25);
-var PROTOTYPE = 'prototype';
-
-var $export = function (type, name, source) {
- var IS_FORCED = type & $export.F;
- var IS_GLOBAL = type & $export.G;
- var IS_STATIC = type & $export.S;
- var IS_PROTO = type & $export.P;
- var IS_BIND = type & $export.B;
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
- var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
- var key, own, out, exp;
- if (IS_GLOBAL) source = name;
- for (key in source) {
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- // export native or passed
- out = (own ? target : source)[key];
- // bind timers to global for call from export context
- exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // extend global
- if (target) redefine(target, key, out, type & $export.U);
- // export
- if (exports[key] != out) hide(exports, key, exp);
- if (IS_PROTO && expProto[key] != out) expProto[key] = out;
- }
-};
-global.core = core;
-// type bitmap
-$export.F = 1; // forced
-$export.G = 2; // global
-$export.S = 4; // static
-$export.P = 8; // proto
-$export.B = 16; // bind
-$export.W = 32; // wrap
-$export.U = 64; // safe
-$export.R = 128; // real proto method for `library`
-module.exports = $export;
-
-},{"23":23,"25":25,"40":40,"42":42,"94":94}],34:[function(_dereq_,module,exports){
-var MATCH = _dereq_(128)('match');
-module.exports = function (KEY) {
- var re = /./;
- try {
- '/./'[KEY](re);
- } catch (e) {
- try {
- re[MATCH] = false;
- return !'/./'[KEY](re);
- } catch (f) { /* empty */ }
- } return true;
-};
-
-},{"128":128}],35:[function(_dereq_,module,exports){
-module.exports = function (exec) {
- try {
- return !!exec();
- } catch (e) {
- return true;
- }
-};
-
-},{}],36:[function(_dereq_,module,exports){
-'use strict';
-var hide = _dereq_(42);
-var redefine = _dereq_(94);
-var fails = _dereq_(35);
-var defined = _dereq_(28);
-var wks = _dereq_(128);
-
-module.exports = function (KEY, length, exec) {
- var SYMBOL = wks(KEY);
- var fns = exec(defined, SYMBOL, ''[KEY]);
- var strfn = fns[0];
- var rxfn = fns[1];
- if (fails(function () {
- var O = {};
- O[SYMBOL] = function () { return 7; };
- return ''[KEY](O) != 7;
- })) {
- redefine(String.prototype, KEY, strfn);
- hide(RegExp.prototype, SYMBOL, length == 2
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
- ? function (string, arg) { return rxfn.call(string, this, arg); }
- // 21.2.5.6 RegExp.prototype[@@match](string)
- // 21.2.5.9 RegExp.prototype[@@search](string)
- : function (string) { return rxfn.call(string, this); }
- );
- }
-};
-
-},{"128":128,"28":28,"35":35,"42":42,"94":94}],37:[function(_dereq_,module,exports){
-'use strict';
-// 21.2.5.3 get RegExp.prototype.flags
-var anObject = _dereq_(7);
-module.exports = function () {
- var that = anObject(this);
- var result = '';
- if (that.global) result += 'g';
- if (that.ignoreCase) result += 'i';
- if (that.multiline) result += 'm';
- if (that.unicode) result += 'u';
- if (that.sticky) result += 'y';
- return result;
-};
-
-},{"7":7}],38:[function(_dereq_,module,exports){
-'use strict';
-// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
-var isArray = _dereq_(49);
-var isObject = _dereq_(51);
-var toLength = _dereq_(118);
-var ctx = _dereq_(25);
-var IS_CONCAT_SPREADABLE = _dereq_(128)('isConcatSpreadable');
-
-function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
- var targetIndex = start;
- var sourceIndex = 0;
- var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
- var element, spreadable;
-
- while (sourceIndex < sourceLen) {
- if (sourceIndex in source) {
- element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
-
- spreadable = false;
- if (isObject(element)) {
- spreadable = element[IS_CONCAT_SPREADABLE];
- spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
- }
-
- if (spreadable && depth > 0) {
- targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
- } else {
- if (targetIndex >= 0x1fffffffffffff) throw TypeError();
- target[targetIndex] = element;
- }
-
- targetIndex++;
- }
- sourceIndex++;
- }
- return targetIndex;
-}
-
-module.exports = flattenIntoArray;
-
-},{"118":118,"128":128,"25":25,"49":49,"51":51}],39:[function(_dereq_,module,exports){
-var ctx = _dereq_(25);
-var call = _dereq_(53);
-var isArrayIter = _dereq_(48);
-var anObject = _dereq_(7);
-var toLength = _dereq_(118);
-var getIterFn = _dereq_(129);
-var BREAK = {};
-var RETURN = {};
-var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
- var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
- var f = ctx(fn, that, entries ? 2 : 1);
- var index = 0;
- var length, step, iterator, result;
- if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
- // fast case for arrays with default iterator
- if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
- result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
- if (result === BREAK || result === RETURN) return result;
- } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
- result = call(iterator, f, step.value, entries);
- if (result === BREAK || result === RETURN) return result;
- }
-};
-exports.BREAK = BREAK;
-exports.RETURN = RETURN;
-
-},{"118":118,"129":129,"25":25,"48":48,"53":53,"7":7}],40:[function(_dereq_,module,exports){
-// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
-var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self
- // eslint-disable-next-line no-new-func
- : Function('return this')();
-if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
-
-},{}],41:[function(_dereq_,module,exports){
-var hasOwnProperty = {}.hasOwnProperty;
-module.exports = function (it, key) {
- return hasOwnProperty.call(it, key);
-};
-
-},{}],42:[function(_dereq_,module,exports){
-var dP = _dereq_(72);
-var createDesc = _dereq_(92);
-module.exports = _dereq_(29) ? function (object, key, value) {
- return dP.f(object, key, createDesc(1, value));
-} : function (object, key, value) {
- object[key] = value;
- return object;
-};
-
-},{"29":29,"72":72,"92":92}],43:[function(_dereq_,module,exports){
-var document = _dereq_(40).document;
-module.exports = document && document.documentElement;
-
-},{"40":40}],44:[function(_dereq_,module,exports){
-module.exports = !_dereq_(29) && !_dereq_(35)(function () {
- return Object.defineProperty(_dereq_(30)('div'), 'a', { get: function () { return 7; } }).a != 7;
-});
-
-},{"29":29,"30":30,"35":35}],45:[function(_dereq_,module,exports){
-var isObject = _dereq_(51);
-var setPrototypeOf = _dereq_(99).set;
-module.exports = function (that, target, C) {
- var S = target.constructor;
- var P;
- if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
- setPrototypeOf(that, P);
- } return that;
-};
-
-},{"51":51,"99":99}],46:[function(_dereq_,module,exports){
-// fast apply, http://jsperf.lnkit.com/fast-apply/5
-module.exports = function (fn, args, that) {
- var un = that === undefined;
- switch (args.length) {
- case 0: return un ? fn()
- : fn.call(that);
- case 1: return un ? fn(args[0])
- : fn.call(that, args[0]);
- case 2: return un ? fn(args[0], args[1])
- : fn.call(that, args[0], args[1]);
- case 3: return un ? fn(args[0], args[1], args[2])
- : fn.call(that, args[0], args[1], args[2]);
- case 4: return un ? fn(args[0], args[1], args[2], args[3])
- : fn.call(that, args[0], args[1], args[2], args[3]);
- } return fn.apply(that, args);
-};
-
-},{}],47:[function(_dereq_,module,exports){
-// fallback for non-array-like ES3 and non-enumerable old V8 strings
-var cof = _dereq_(18);
-// eslint-disable-next-line no-prototype-builtins
-module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
- return cof(it) == 'String' ? it.split('') : Object(it);
-};
-
-},{"18":18}],48:[function(_dereq_,module,exports){
-// check on default Array iterator
-var Iterators = _dereq_(58);
-var ITERATOR = _dereq_(128)('iterator');
-var ArrayProto = Array.prototype;
-
-module.exports = function (it) {
- return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
-};
-
-},{"128":128,"58":58}],49:[function(_dereq_,module,exports){
-// 7.2.2 IsArray(argument)
-var cof = _dereq_(18);
-module.exports = Array.isArray || function isArray(arg) {
- return cof(arg) == 'Array';
-};
-
-},{"18":18}],50:[function(_dereq_,module,exports){
-// 20.1.2.3 Number.isInteger(number)
-var isObject = _dereq_(51);
-var floor = Math.floor;
-module.exports = function isInteger(it) {
- return !isObject(it) && isFinite(it) && floor(it) === it;
-};
-
-},{"51":51}],51:[function(_dereq_,module,exports){
-module.exports = function (it) {
- return typeof it === 'object' ? it !== null : typeof it === 'function';
-};
-
-},{}],52:[function(_dereq_,module,exports){
-// 7.2.8 IsRegExp(argument)
-var isObject = _dereq_(51);
-var cof = _dereq_(18);
-var MATCH = _dereq_(128)('match');
-module.exports = function (it) {
- var isRegExp;
- return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
-};
-
-},{"128":128,"18":18,"51":51}],53:[function(_dereq_,module,exports){
-// call something on iterator step with safe closing on error
-var anObject = _dereq_(7);
-module.exports = function (iterator, fn, value, entries) {
- try {
- return entries ? fn(anObject(value)[0], value[1]) : fn(value);
- // 7.4.6 IteratorClose(iterator, completion)
- } catch (e) {
- var ret = iterator['return'];
- if (ret !== undefined) anObject(ret.call(iterator));
- throw e;
- }
-};
-
-},{"7":7}],54:[function(_dereq_,module,exports){
-'use strict';
-var create = _dereq_(71);
-var descriptor = _dereq_(92);
-var setToStringTag = _dereq_(101);
-var IteratorPrototype = {};
-
-// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
-_dereq_(42)(IteratorPrototype, _dereq_(128)('iterator'), function () { return this; });
-
-module.exports = function (Constructor, NAME, next) {
- Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
- setToStringTag(Constructor, NAME + ' Iterator');
-};
-
-},{"101":101,"128":128,"42":42,"71":71,"92":92}],55:[function(_dereq_,module,exports){
-'use strict';
-var LIBRARY = _dereq_(60);
-var $export = _dereq_(33);
-var redefine = _dereq_(94);
-var hide = _dereq_(42);
-var has = _dereq_(41);
-var Iterators = _dereq_(58);
-var $iterCreate = _dereq_(54);
-var setToStringTag = _dereq_(101);
-var getPrototypeOf = _dereq_(79);
-var ITERATOR = _dereq_(128)('iterator');
-var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
-var FF_ITERATOR = '@@iterator';
-var KEYS = 'keys';
-var VALUES = 'values';
-
-var returnThis = function () { return this; };
-
-module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
- $iterCreate(Constructor, NAME, next);
- var getMethod = function (kind) {
- if (!BUGGY && kind in proto) return proto[kind];
- switch (kind) {
- case KEYS: return function keys() { return new Constructor(this, kind); };
- case VALUES: return function values() { return new Constructor(this, kind); };
- } return function entries() { return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator';
- var DEF_VALUES = DEFAULT == VALUES;
- var VALUES_BUG = false;
- var proto = Base.prototype;
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
- var $default = $native || getMethod(DEFAULT);
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
- var methods, key, IteratorPrototype;
- // Fix native
- if ($anyNative) {
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
- }
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if (DEF_VALUES && $native && $native.name !== VALUES) {
- VALUES_BUG = true;
- $default = function values() { return $native.call(this); };
- }
- // Define iterator
- if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if (DEFAULT) {
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
- };
- if (FORCED) for (key in methods) {
- if (!(key in proto)) redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
-};
-
-},{"101":101,"128":128,"33":33,"41":41,"42":42,"54":54,"58":58,"60":60,"79":79,"94":94}],56:[function(_dereq_,module,exports){
-var ITERATOR = _dereq_(128)('iterator');
-var SAFE_CLOSING = false;
-
-try {
- var riter = [7][ITERATOR]();
- riter['return'] = function () { SAFE_CLOSING = true; };
- // eslint-disable-next-line no-throw-literal
- Array.from(riter, function () { throw 2; });
-} catch (e) { /* empty */ }
-
-module.exports = function (exec, skipClosing) {
- if (!skipClosing && !SAFE_CLOSING) return false;
- var safe = false;
- try {
- var arr = [7];
- var iter = arr[ITERATOR]();
- iter.next = function () { return { done: safe = true }; };
- arr[ITERATOR] = function () { return iter; };
- exec(arr);
- } catch (e) { /* empty */ }
- return safe;
-};
-
-},{"128":128}],57:[function(_dereq_,module,exports){
-module.exports = function (done, value) {
- return { value: value, done: !!done };
-};
-
-},{}],58:[function(_dereq_,module,exports){
-module.exports = {};
-
-},{}],59:[function(_dereq_,module,exports){
-var getKeys = _dereq_(81);
-var toIObject = _dereq_(117);
-module.exports = function (object, el) {
- var O = toIObject(object);
- var keys = getKeys(O);
- var length = keys.length;
- var index = 0;
- var key;
- while (length > index) if (O[key = keys[index++]] === el) return key;
-};
-
-},{"117":117,"81":81}],60:[function(_dereq_,module,exports){
-module.exports = false;
-
-},{}],61:[function(_dereq_,module,exports){
-// 20.2.2.14 Math.expm1(x)
-var $expm1 = Math.expm1;
-module.exports = (!$expm1
- // Old FF bug
- || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
- // Tor Browser bug
- || $expm1(-2e-17) != -2e-17
-) ? function expm1(x) {
- return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
-} : $expm1;
-
-},{}],62:[function(_dereq_,module,exports){
-// 20.2.2.16 Math.fround(x)
-var sign = _dereq_(65);
-var pow = Math.pow;
-var EPSILON = pow(2, -52);
-var EPSILON32 = pow(2, -23);
-var MAX32 = pow(2, 127) * (2 - EPSILON32);
-var MIN32 = pow(2, -126);
-
-var roundTiesToEven = function (n) {
- return n + 1 / EPSILON - 1 / EPSILON;
-};
-
-module.exports = Math.fround || function fround(x) {
- var $abs = Math.abs(x);
- var $sign = sign(x);
- var a, result;
- if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
- a = (1 + EPSILON32 / EPSILON) * $abs;
- result = a - (a - $abs);
- // eslint-disable-next-line no-self-compare
- if (result > MAX32 || result != result) return $sign * Infinity;
- return $sign * result;
-};
-
-},{"65":65}],63:[function(_dereq_,module,exports){
-// 20.2.2.20 Math.log1p(x)
-module.exports = Math.log1p || function log1p(x) {
- return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
-};
-
-},{}],64:[function(_dereq_,module,exports){
-// https://rwaldron.github.io/proposal-math-extensions/
-module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
- if (
- arguments.length === 0
- // eslint-disable-next-line no-self-compare
- || x != x
- // eslint-disable-next-line no-self-compare
- || inLow != inLow
- // eslint-disable-next-line no-self-compare
- || inHigh != inHigh
- // eslint-disable-next-line no-self-compare
- || outLow != outLow
- // eslint-disable-next-line no-self-compare
- || outHigh != outHigh
- ) return NaN;
- if (x === Infinity || x === -Infinity) return x;
- return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
-};
-
-},{}],65:[function(_dereq_,module,exports){
-// 20.2.2.28 Math.sign(x)
-module.exports = Math.sign || function sign(x) {
- // eslint-disable-next-line no-self-compare
- return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
-};
-
-},{}],66:[function(_dereq_,module,exports){
-var META = _dereq_(124)('meta');
-var isObject = _dereq_(51);
-var has = _dereq_(41);
-var setDesc = _dereq_(72).f;
-var id = 0;
-var isExtensible = Object.isExtensible || function () {
- return true;
-};
-var FREEZE = !_dereq_(35)(function () {
- return isExtensible(Object.preventExtensions({}));
-});
-var setMeta = function (it) {
- setDesc(it, META, { value: {
- i: 'O' + ++id, // object ID
- w: {} // weak collections IDs
- } });
-};
-var fastKey = function (it, create) {
- // return primitive with prefix
- if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
- if (!has(it, META)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return 'F';
- // not necessary to add metadata
- if (!create) return 'E';
- // add missing metadata
- setMeta(it);
- // return object ID
- } return it[META].i;
-};
-var getWeak = function (it, create) {
- if (!has(it, META)) {
- // can't set metadata to uncaught frozen object
- if (!isExtensible(it)) return true;
- // not necessary to add metadata
- if (!create) return false;
- // add missing metadata
- setMeta(it);
- // return hash weak collections IDs
- } return it[META].w;
-};
-// add metadata on freeze-family methods calling
-var onFreeze = function (it) {
- if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
- return it;
-};
-var meta = module.exports = {
- KEY: META,
- NEED: false,
- fastKey: fastKey,
- getWeak: getWeak,
- onFreeze: onFreeze
-};
-
-},{"124":124,"35":35,"41":41,"51":51,"72":72}],67:[function(_dereq_,module,exports){
-var Map = _dereq_(160);
-var $export = _dereq_(33);
-var shared = _dereq_(103)('metadata');
-var store = shared.store || (shared.store = new (_dereq_(266))());
-
-var getOrCreateMetadataMap = function (target, targetKey, create) {
- var targetMetadata = store.get(target);
- if (!targetMetadata) {
- if (!create) return undefined;
- store.set(target, targetMetadata = new Map());
- }
- var keyMetadata = targetMetadata.get(targetKey);
- if (!keyMetadata) {
- if (!create) return undefined;
- targetMetadata.set(targetKey, keyMetadata = new Map());
- } return keyMetadata;
-};
-var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
-};
-var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
- var metadataMap = getOrCreateMetadataMap(O, P, false);
- return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
-};
-var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
- getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
-};
-var ordinaryOwnMetadataKeys = function (target, targetKey) {
- var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
- var keys = [];
- if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
- return keys;
-};
-var toMetaKey = function (it) {
- return it === undefined || typeof it == 'symbol' ? it : String(it);
-};
-var exp = function (O) {
- $export($export.S, 'Reflect', O);
-};
-
-module.exports = {
- store: store,
- map: getOrCreateMetadataMap,
- has: ordinaryHasOwnMetadata,
- get: ordinaryGetOwnMetadata,
- set: ordinaryDefineOwnMetadata,
- keys: ordinaryOwnMetadataKeys,
- key: toMetaKey,
- exp: exp
-};
-
-},{"103":103,"160":160,"266":266,"33":33}],68:[function(_dereq_,module,exports){
-var global = _dereq_(40);
-var macrotask = _dereq_(113).set;
-var Observer = global.MutationObserver || global.WebKitMutationObserver;
-var process = global.process;
-var Promise = global.Promise;
-var isNode = _dereq_(18)(process) == 'process';
-
-module.exports = function () {
- var head, last, notify;
-
- var flush = function () {
- var parent, fn;
- if (isNode && (parent = process.domain)) parent.exit();
- while (head) {
- fn = head.fn;
- head = head.next;
- try {
- fn();
- } catch (e) {
- if (head) notify();
- else last = undefined;
- throw e;
- }
- } last = undefined;
- if (parent) parent.enter();
- };
-
- // Node.js
- if (isNode) {
- notify = function () {
- process.nextTick(flush);
- };
- // browsers with MutationObserver
- } else if (Observer) {
- var toggle = true;
- var node = document.createTextNode('');
- new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
- notify = function () {
- node.data = toggle = !toggle;
- };
- // environments with maybe non-completely correct, but existent Promise
- } else if (Promise && Promise.resolve) {
- var promise = Promise.resolve();
- notify = function () {
- promise.then(flush);
- };
- // for other environments - macrotask based on:
- // - setImmediate
- // - MessageChannel
- // - window.postMessag
- // - onreadystatechange
- // - setTimeout
- } else {
- notify = function () {
- // strange IE + webpack dev server bug - use .call(global)
- macrotask.call(global, flush);
- };
- }
-
- return function (fn) {
- var task = { fn: fn, next: undefined };
- if (last) last.next = task;
- if (!head) {
- head = task;
- notify();
- } last = task;
- };
-};
-
-},{"113":113,"18":18,"40":40}],69:[function(_dereq_,module,exports){
-'use strict';
-// 25.4.1.5 NewPromiseCapability(C)
-var aFunction = _dereq_(3);
-
-function PromiseCapability(C) {
- var resolve, reject;
- this.promise = new C(function ($$resolve, $$reject) {
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
- resolve = $$resolve;
- reject = $$reject;
- });
- this.resolve = aFunction(resolve);
- this.reject = aFunction(reject);
-}
-
-module.exports.f = function (C) {
- return new PromiseCapability(C);
-};
-
-},{"3":3}],70:[function(_dereq_,module,exports){
-'use strict';
-// 19.1.2.1 Object.assign(target, source, ...)
-var getKeys = _dereq_(81);
-var gOPS = _dereq_(78);
-var pIE = _dereq_(82);
-var toObject = _dereq_(119);
-var IObject = _dereq_(47);
-var $assign = Object.assign;
-
-// should work with symbols and should have deterministic property order (V8 bug)
-module.exports = !$assign || _dereq_(35)(function () {
- var A = {};
- var B = {};
- // eslint-disable-next-line no-undef
- var S = Symbol();
- var K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function (k) { B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
-}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
- var T = toObject(target);
- var aLen = arguments.length;
- var index = 1;
- var getSymbols = gOPS.f;
- var isEnum = pIE.f;
- while (aLen > index) {
- var S = IObject(arguments[index++]);
- var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
- while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
- } return T;
-} : $assign;
-
-},{"119":119,"35":35,"47":47,"78":78,"81":81,"82":82}],71:[function(_dereq_,module,exports){
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-var anObject = _dereq_(7);
-var dPs = _dereq_(73);
-var enumBugKeys = _dereq_(31);
-var IE_PROTO = _dereq_(102)('IE_PROTO');
-var Empty = function () { /* empty */ };
-var PROTOTYPE = 'prototype';
-
-// Create object with fake `null` prototype: use iframe Object with cleared prototype
-var createDict = function () {
- // Thrash, waste and sodomy: IE GC bug
- var iframe = _dereq_(30)('iframe');
- var i = enumBugKeys.length;
- var lt = '<';
- var gt = '>';
- var iframeDocument;
- iframe.style.display = 'none';
- _dereq_(43).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
-};
-
-module.exports = Object.create || function create(O, Properties) {
- var result;
- if (O !== null) {
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty();
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
-};
-
-},{"102":102,"30":30,"31":31,"43":43,"7":7,"73":73}],72:[function(_dereq_,module,exports){
-var anObject = _dereq_(7);
-var IE8_DOM_DEFINE = _dereq_(44);
-var toPrimitive = _dereq_(120);
-var dP = Object.defineProperty;
-
-exports.f = _dereq_(29) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if (IE8_DOM_DEFINE) try {
- return dP(O, P, Attributes);
- } catch (e) { /* empty */ }
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
- if ('value' in Attributes) O[P] = Attributes.value;
- return O;
-};
-
-},{"120":120,"29":29,"44":44,"7":7}],73:[function(_dereq_,module,exports){
-var dP = _dereq_(72);
-var anObject = _dereq_(7);
-var getKeys = _dereq_(81);
-
-module.exports = _dereq_(29) ? Object.defineProperties : function defineProperties(O, Properties) {
- anObject(O);
- var keys = getKeys(Properties);
- var length = keys.length;
- var i = 0;
- var P;
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
- return O;
-};
-
-},{"29":29,"7":7,"72":72,"81":81}],74:[function(_dereq_,module,exports){
-'use strict';
-// Forced replacement prototype accessors methods
-module.exports = _dereq_(60) || !_dereq_(35)(function () {
- var K = Math.random();
- // In FF throws only define methods
- // eslint-disable-next-line no-undef, no-useless-call
- __defineSetter__.call(null, K, function () { /* empty */ });
- delete _dereq_(40)[K];
-});
-
-},{"35":35,"40":40,"60":60}],75:[function(_dereq_,module,exports){
-var pIE = _dereq_(82);
-var createDesc = _dereq_(92);
-var toIObject = _dereq_(117);
-var toPrimitive = _dereq_(120);
-var has = _dereq_(41);
-var IE8_DOM_DEFINE = _dereq_(44);
-var gOPD = Object.getOwnPropertyDescriptor;
-
-exports.f = _dereq_(29) ? gOPD : function getOwnPropertyDescriptor(O, P) {
- O = toIObject(O);
- P = toPrimitive(P, true);
- if (IE8_DOM_DEFINE) try {
- return gOPD(O, P);
- } catch (e) { /* empty */ }
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
-};
-
-},{"117":117,"120":120,"29":29,"41":41,"44":44,"82":82,"92":92}],76:[function(_dereq_,module,exports){
-// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
-var toIObject = _dereq_(117);
-var gOPN = _dereq_(77).f;
-var toString = {}.toString;
-
-var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
- ? Object.getOwnPropertyNames(window) : [];
-
-var getWindowNames = function (it) {
- try {
- return gOPN(it);
- } catch (e) {
- return windowNames.slice();
- }
-};
-
-module.exports.f = function getOwnPropertyNames(it) {
- return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
-};
-
-},{"117":117,"77":77}],77:[function(_dereq_,module,exports){
-// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
-var $keys = _dereq_(80);
-var hiddenKeys = _dereq_(31).concat('length', 'prototype');
-
-exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
- return $keys(O, hiddenKeys);
-};
-
-},{"31":31,"80":80}],78:[function(_dereq_,module,exports){
-exports.f = Object.getOwnPropertySymbols;
-
-},{}],79:[function(_dereq_,module,exports){
-// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
-var has = _dereq_(41);
-var toObject = _dereq_(119);
-var IE_PROTO = _dereq_(102)('IE_PROTO');
-var ObjectProto = Object.prototype;
-
-module.exports = Object.getPrototypeOf || function (O) {
- O = toObject(O);
- if (has(O, IE_PROTO)) return O[IE_PROTO];
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
- return O.constructor.prototype;
- } return O instanceof Object ? ObjectProto : null;
-};
-
-},{"102":102,"119":119,"41":41}],80:[function(_dereq_,module,exports){
-var has = _dereq_(41);
-var toIObject = _dereq_(117);
-var arrayIndexOf = _dereq_(11)(false);
-var IE_PROTO = _dereq_(102)('IE_PROTO');
-
-module.exports = function (object, names) {
- var O = toIObject(object);
- var i = 0;
- var result = [];
- var key;
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while (names.length > i) if (has(O, key = names[i++])) {
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
-};
-
-},{"102":102,"11":11,"117":117,"41":41}],81:[function(_dereq_,module,exports){
-// 19.1.2.14 / 15.2.3.14 Object.keys(O)
-var $keys = _dereq_(80);
-var enumBugKeys = _dereq_(31);
-
-module.exports = Object.keys || function keys(O) {
- return $keys(O, enumBugKeys);
-};
-
-},{"31":31,"80":80}],82:[function(_dereq_,module,exports){
-exports.f = {}.propertyIsEnumerable;
-
-},{}],83:[function(_dereq_,module,exports){
-// most Object methods by ES6 should accept primitives
-var $export = _dereq_(33);
-var core = _dereq_(23);
-var fails = _dereq_(35);
-module.exports = function (KEY, exec) {
- var fn = (core.Object || {})[KEY] || Object[KEY];
- var exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
-};
-
-},{"23":23,"33":33,"35":35}],84:[function(_dereq_,module,exports){
-var getKeys = _dereq_(81);
-var toIObject = _dereq_(117);
-var isEnum = _dereq_(82).f;
-module.exports = function (isEntries) {
- return function (it) {
- var O = toIObject(it);
- var keys = getKeys(O);
- var length = keys.length;
- var i = 0;
- var result = [];
- var key;
- while (length > i) if (isEnum.call(O, key = keys[i++])) {
- result.push(isEntries ? [key, O[key]] : O[key]);
- } return result;
- };
-};
-
-},{"117":117,"81":81,"82":82}],85:[function(_dereq_,module,exports){
-// all object keys, includes non-enumerable and symbols
-var gOPN = _dereq_(77);
-var gOPS = _dereq_(78);
-var anObject = _dereq_(7);
-var Reflect = _dereq_(40).Reflect;
-module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
- var keys = gOPN.f(anObject(it));
- var getSymbols = gOPS.f;
- return getSymbols ? keys.concat(getSymbols(it)) : keys;
-};
-
-},{"40":40,"7":7,"77":77,"78":78}],86:[function(_dereq_,module,exports){
-var $parseFloat = _dereq_(40).parseFloat;
-var $trim = _dereq_(111).trim;
-
-module.exports = 1 / $parseFloat(_dereq_(112) + '-0') !== -Infinity ? function parseFloat(str) {
- var string = $trim(String(str), 3);
- var result = $parseFloat(string);
- return result === 0 && string.charAt(0) == '-' ? -0 : result;
-} : $parseFloat;
-
-},{"111":111,"112":112,"40":40}],87:[function(_dereq_,module,exports){
-var $parseInt = _dereq_(40).parseInt;
-var $trim = _dereq_(111).trim;
-var ws = _dereq_(112);
-var hex = /^[-+]?0[xX]/;
-
-module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
- var string = $trim(String(str), 3);
- return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
-} : $parseInt;
-
-},{"111":111,"112":112,"40":40}],88:[function(_dereq_,module,exports){
-'use strict';
-var path = _dereq_(89);
-var invoke = _dereq_(46);
-var aFunction = _dereq_(3);
-module.exports = function (/* ...pargs */) {
- var fn = aFunction(this);
- var length = arguments.length;
- var pargs = Array(length);
- var i = 0;
- var _ = path._;
- var holder = false;
- while (length > i) if ((pargs[i] = arguments[i++]) === _) holder = true;
- return function (/* ...args */) {
- var that = this;
- var aLen = arguments.length;
- var j = 0;
- var k = 0;
- var args;
- if (!holder && !aLen) return invoke(fn, pargs, that);
- args = pargs.slice();
- if (holder) for (;length > j; j++) if (args[j] === _) args[j] = arguments[k++];
- while (aLen > k) args.push(arguments[k++]);
- return invoke(fn, args, that);
- };
-};
-
-},{"3":3,"46":46,"89":89}],89:[function(_dereq_,module,exports){
-module.exports = _dereq_(40);
-
-},{"40":40}],90:[function(_dereq_,module,exports){
-module.exports = function (exec) {
- try {
- return { e: false, v: exec() };
- } catch (e) {
- return { e: true, v: e };
- }
-};
-
-},{}],91:[function(_dereq_,module,exports){
-var newPromiseCapability = _dereq_(69);
-
-module.exports = function (C, x) {
- var promiseCapability = newPromiseCapability.f(C);
- var resolve = promiseCapability.resolve;
- resolve(x);
- return promiseCapability.promise;
-};
-
-},{"69":69}],92:[function(_dereq_,module,exports){
-module.exports = function (bitmap, value) {
- return {
- enumerable: !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value: value
- };
-};
-
-},{}],93:[function(_dereq_,module,exports){
-var redefine = _dereq_(94);
-module.exports = function (target, src, safe) {
- for (var key in src) redefine(target, key, src[key], safe);
- return target;
-};
-
-},{"94":94}],94:[function(_dereq_,module,exports){
-var global = _dereq_(40);
-var hide = _dereq_(42);
-var has = _dereq_(41);
-var SRC = _dereq_(124)('src');
-var TO_STRING = 'toString';
-var $toString = Function[TO_STRING];
-var TPL = ('' + $toString).split(TO_STRING);
-
-_dereq_(23).inspectSource = function (it) {
- return $toString.call(it);
-};
-
-(module.exports = function (O, key, val, safe) {
- var isFunction = typeof val == 'function';
- if (isFunction) has(val, 'name') || hide(val, 'name', key);
- if (O[key] === val) return;
- if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
- if (O === global) {
- O[key] = val;
- } else if (!safe) {
- delete O[key];
- hide(O, key, val);
- } else if (O[key]) {
- O[key] = val;
- } else {
- hide(O, key, val);
- }
-// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
-})(Function.prototype, TO_STRING, function toString() {
- return typeof this == 'function' && this[SRC] || $toString.call(this);
-});
-
-},{"124":124,"23":23,"40":40,"41":41,"42":42}],95:[function(_dereq_,module,exports){
-module.exports = function (regExp, replace) {
- var replacer = replace === Object(replace) ? function (part) {
- return replace[part];
- } : replace;
- return function (it) {
- return String(it).replace(regExp, replacer);
- };
-};
-
-},{}],96:[function(_dereq_,module,exports){
-// 7.2.9 SameValue(x, y)
-module.exports = Object.is || function is(x, y) {
- // eslint-disable-next-line no-self-compare
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
-};
-
-},{}],97:[function(_dereq_,module,exports){
-'use strict';
-// https://tc39.github.io/proposal-setmap-offrom/
-var $export = _dereq_(33);
-var aFunction = _dereq_(3);
-var ctx = _dereq_(25);
-var forOf = _dereq_(39);
-
-module.exports = function (COLLECTION) {
- $export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
- var mapFn = arguments[1];
- var mapping, A, n, cb;
- aFunction(this);
- mapping = mapFn !== undefined;
- if (mapping) aFunction(mapFn);
- if (source == undefined) return new this();
- A = [];
- if (mapping) {
- n = 0;
- cb = ctx(mapFn, arguments[2], 2);
- forOf(source, false, function (nextItem) {
- A.push(cb(nextItem, n++));
- });
- } else {
- forOf(source, false, A.push, A);
- }
- return new this(A);
- } });
-};
-
-},{"25":25,"3":3,"33":33,"39":39}],98:[function(_dereq_,module,exports){
-'use strict';
-// https://tc39.github.io/proposal-setmap-offrom/
-var $export = _dereq_(33);
-
-module.exports = function (COLLECTION) {
- $export($export.S, COLLECTION, { of: function of() {
- var length = arguments.length;
- var A = Array(length);
- while (length--) A[length] = arguments[length];
- return new this(A);
- } });
-};
-
-},{"33":33}],99:[function(_dereq_,module,exports){
-// Works with __proto__ only. Old v8 can't work with null proto objects.
-/* eslint-disable no-proto */
-var isObject = _dereq_(51);
-var anObject = _dereq_(7);
-var check = function (O, proto) {
- anObject(O);
- if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
-};
-module.exports = {
- set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
- function (test, buggy, set) {
- try {
- set = _dereq_(25)(Function.call, _dereq_(75).f(Object.prototype, '__proto__').set, 2);
- set(test, []);
- buggy = !(test instanceof Array);
- } catch (e) { buggy = true; }
- return function setPrototypeOf(O, proto) {
- check(O, proto);
- if (buggy) O.__proto__ = proto;
- else set(O, proto);
- return O;
- };
- }({}, false) : undefined),
- check: check
-};
-
-},{"25":25,"51":51,"7":7,"75":75}],100:[function(_dereq_,module,exports){
-'use strict';
-var global = _dereq_(40);
-var dP = _dereq_(72);
-var DESCRIPTORS = _dereq_(29);
-var SPECIES = _dereq_(128)('species');
-
-module.exports = function (KEY) {
- var C = global[KEY];
- if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
- configurable: true,
- get: function () { return this; }
- });
-};
-
-},{"128":128,"29":29,"40":40,"72":72}],101:[function(_dereq_,module,exports){
-var def = _dereq_(72).f;
-var has = _dereq_(41);
-var TAG = _dereq_(128)('toStringTag');
-
-module.exports = function (it, tag, stat) {
- if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
-};
-
-},{"128":128,"41":41,"72":72}],102:[function(_dereq_,module,exports){
-var shared = _dereq_(103)('keys');
-var uid = _dereq_(124);
-module.exports = function (key) {
- return shared[key] || (shared[key] = uid(key));
-};
-
-},{"103":103,"124":124}],103:[function(_dereq_,module,exports){
-var global = _dereq_(40);
-var SHARED = '__core-js_shared__';
-var store = global[SHARED] || (global[SHARED] = {});
-module.exports = function (key) {
- return store[key] || (store[key] = {});
-};
-
-},{"40":40}],104:[function(_dereq_,module,exports){
-// 7.3.20 SpeciesConstructor(O, defaultConstructor)
-var anObject = _dereq_(7);
-var aFunction = _dereq_(3);
-var SPECIES = _dereq_(128)('species');
-module.exports = function (O, D) {
- var C = anObject(O).constructor;
- var S;
- return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
-};
-
-},{"128":128,"3":3,"7":7}],105:[function(_dereq_,module,exports){
-'use strict';
-var fails = _dereq_(35);
-
-module.exports = function (method, arg) {
- return !!method && fails(function () {
- // eslint-disable-next-line no-useless-call
- arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
- });
-};
-
-},{"35":35}],106:[function(_dereq_,module,exports){
-var toInteger = _dereq_(116);
-var defined = _dereq_(28);
-// true -> String#at
-// false -> String#codePointAt
-module.exports = function (TO_STRING) {
- return function (that, pos) {
- var s = String(defined(that));
- var i = toInteger(pos);
- var l = s.length;
- var a, b;
- if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
- a = s.charCodeAt(i);
- return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
- ? TO_STRING ? s.charAt(i) : a
- : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
- };
-};
-
-},{"116":116,"28":28}],107:[function(_dereq_,module,exports){
-// helper for String#{startsWith, endsWith, includes}
-var isRegExp = _dereq_(52);
-var defined = _dereq_(28);
-
-module.exports = function (that, searchString, NAME) {
- if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
- return String(defined(that));
-};
-
-},{"28":28,"52":52}],108:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var fails = _dereq_(35);
-var defined = _dereq_(28);
-var quot = /"/g;
-// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
-var createHTML = function (string, tag, attribute, value) {
- var S = String(defined(string));
- var p1 = '<' + tag;
- if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"';
- return p1 + '>' + S + '' + tag + '>';
-};
-module.exports = function (NAME, exec) {
- var O = {};
- O[NAME] = exec(createHTML);
- $export($export.P + $export.F * fails(function () {
- var test = ''[NAME]('"');
- return test !== test.toLowerCase() || test.split('"').length > 3;
- }), 'String', O);
-};
-
-},{"28":28,"33":33,"35":35}],109:[function(_dereq_,module,exports){
-// https://github.com/tc39/proposal-string-pad-start-end
-var toLength = _dereq_(118);
-var repeat = _dereq_(110);
-var defined = _dereq_(28);
-
-module.exports = function (that, maxLength, fillString, left) {
- var S = String(defined(that));
- var stringLength = S.length;
- var fillStr = fillString === undefined ? ' ' : String(fillString);
- var intMaxLength = toLength(maxLength);
- if (intMaxLength <= stringLength || fillStr == '') return S;
- var fillLen = intMaxLength - stringLength;
- var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
- if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
- return left ? stringFiller + S : S + stringFiller;
-};
-
-},{"110":110,"118":118,"28":28}],110:[function(_dereq_,module,exports){
-'use strict';
-var toInteger = _dereq_(116);
-var defined = _dereq_(28);
-
-module.exports = function repeat(count) {
- var str = String(defined(this));
- var res = '';
- var n = toInteger(count);
- if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
- for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
- return res;
-};
-
-},{"116":116,"28":28}],111:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var defined = _dereq_(28);
-var fails = _dereq_(35);
-var spaces = _dereq_(112);
-var space = '[' + spaces + ']';
-var non = '\u200b\u0085';
-var ltrim = RegExp('^' + space + space + '*');
-var rtrim = RegExp(space + space + '*$');
-
-var exporter = function (KEY, exec, ALIAS) {
- var exp = {};
- var FORCE = fails(function () {
- return !!spaces[KEY]() || non[KEY]() != non;
- });
- var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
- if (ALIAS) exp[ALIAS] = fn;
- $export($export.P + $export.F * FORCE, 'String', exp);
-};
-
-// 1 -> String#trimLeft
-// 2 -> String#trimRight
-// 3 -> String#trim
-var trim = exporter.trim = function (string, TYPE) {
- string = String(defined(string));
- if (TYPE & 1) string = string.replace(ltrim, '');
- if (TYPE & 2) string = string.replace(rtrim, '');
- return string;
-};
-
-module.exports = exporter;
-
-},{"112":112,"28":28,"33":33,"35":35}],112:[function(_dereq_,module,exports){
-module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
- '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
-
-},{}],113:[function(_dereq_,module,exports){
-var ctx = _dereq_(25);
-var invoke = _dereq_(46);
-var html = _dereq_(43);
-var cel = _dereq_(30);
-var global = _dereq_(40);
-var process = global.process;
-var setTask = global.setImmediate;
-var clearTask = global.clearImmediate;
-var MessageChannel = global.MessageChannel;
-var Dispatch = global.Dispatch;
-var counter = 0;
-var queue = {};
-var ONREADYSTATECHANGE = 'onreadystatechange';
-var defer, channel, port;
-var run = function () {
- var id = +this;
- // eslint-disable-next-line no-prototype-builtins
- if (queue.hasOwnProperty(id)) {
- var fn = queue[id];
- delete queue[id];
- fn();
- }
-};
-var listener = function (event) {
- run.call(event.data);
-};
-// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
-if (!setTask || !clearTask) {
- setTask = function setImmediate(fn) {
- var args = [];
- var i = 1;
- while (arguments.length > i) args.push(arguments[i++]);
- queue[++counter] = function () {
- // eslint-disable-next-line no-new-func
- invoke(typeof fn == 'function' ? fn : Function(fn), args);
- };
- defer(counter);
- return counter;
- };
- clearTask = function clearImmediate(id) {
- delete queue[id];
- };
- // Node.js 0.8-
- if (_dereq_(18)(process) == 'process') {
- defer = function (id) {
- process.nextTick(ctx(run, id, 1));
- };
- // Sphere (JS game engine) Dispatch API
- } else if (Dispatch && Dispatch.now) {
- defer = function (id) {
- Dispatch.now(ctx(run, id, 1));
- };
- // Browsers with MessageChannel, includes WebWorkers
- } else if (MessageChannel) {
- channel = new MessageChannel();
- port = channel.port2;
- channel.port1.onmessage = listener;
- defer = ctx(port.postMessage, port, 1);
- // Browsers with postMessage, skip WebWorkers
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
- } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
- defer = function (id) {
- global.postMessage(id + '', '*');
- };
- global.addEventListener('message', listener, false);
- // IE8-
- } else if (ONREADYSTATECHANGE in cel('script')) {
- defer = function (id) {
- html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
- html.removeChild(this);
- run.call(id);
- };
- };
- // Rest old browsers
- } else {
- defer = function (id) {
- setTimeout(ctx(run, id, 1), 0);
- };
- }
-}
-module.exports = {
- set: setTask,
- clear: clearTask
-};
-
-},{"18":18,"25":25,"30":30,"40":40,"43":43,"46":46}],114:[function(_dereq_,module,exports){
-var toInteger = _dereq_(116);
-var max = Math.max;
-var min = Math.min;
-module.exports = function (index, length) {
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
-};
-
-},{"116":116}],115:[function(_dereq_,module,exports){
-// https://tc39.github.io/ecma262/#sec-toindex
-var toInteger = _dereq_(116);
-var toLength = _dereq_(118);
-module.exports = function (it) {
- if (it === undefined) return 0;
- var number = toInteger(it);
- var length = toLength(number);
- if (number !== length) throw RangeError('Wrong length!');
- return length;
-};
-
-},{"116":116,"118":118}],116:[function(_dereq_,module,exports){
-// 7.1.4 ToInteger
-var ceil = Math.ceil;
-var floor = Math.floor;
-module.exports = function (it) {
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
-};
-
-},{}],117:[function(_dereq_,module,exports){
-// to indexed object, toObject with fallback for non-array-like ES3 strings
-var IObject = _dereq_(47);
-var defined = _dereq_(28);
-module.exports = function (it) {
- return IObject(defined(it));
-};
-
-},{"28":28,"47":47}],118:[function(_dereq_,module,exports){
-// 7.1.15 ToLength
-var toInteger = _dereq_(116);
-var min = Math.min;
-module.exports = function (it) {
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
-};
-
-},{"116":116}],119:[function(_dereq_,module,exports){
-// 7.1.13 ToObject(argument)
-var defined = _dereq_(28);
-module.exports = function (it) {
- return Object(defined(it));
-};
-
-},{"28":28}],120:[function(_dereq_,module,exports){
-// 7.1.1 ToPrimitive(input [, PreferredType])
-var isObject = _dereq_(51);
-// instead of the ES6 spec version, we didn't implement @@toPrimitive case
-// and the second argument - flag - preferred type is a string
-module.exports = function (it, S) {
- if (!isObject(it)) return it;
- var fn, val;
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- throw TypeError("Can't convert object to primitive value");
-};
-
-},{"51":51}],121:[function(_dereq_,module,exports){
-'use strict';
-if (_dereq_(29)) {
- var LIBRARY = _dereq_(60);
- var global = _dereq_(40);
- var fails = _dereq_(35);
- var $export = _dereq_(33);
- var $typed = _dereq_(123);
- var $buffer = _dereq_(122);
- var ctx = _dereq_(25);
- var anInstance = _dereq_(6);
- var propertyDesc = _dereq_(92);
- var hide = _dereq_(42);
- var redefineAll = _dereq_(93);
- var toInteger = _dereq_(116);
- var toLength = _dereq_(118);
- var toIndex = _dereq_(115);
- var toAbsoluteIndex = _dereq_(114);
- var toPrimitive = _dereq_(120);
- var has = _dereq_(41);
- var classof = _dereq_(17);
- var isObject = _dereq_(51);
- var toObject = _dereq_(119);
- var isArrayIter = _dereq_(48);
- var create = _dereq_(71);
- var getPrototypeOf = _dereq_(79);
- var gOPN = _dereq_(77).f;
- var getIterFn = _dereq_(129);
- var uid = _dereq_(124);
- var wks = _dereq_(128);
- var createArrayMethod = _dereq_(12);
- var createArrayIncludes = _dereq_(11);
- var speciesConstructor = _dereq_(104);
- var ArrayIterators = _dereq_(141);
- var Iterators = _dereq_(58);
- var $iterDetect = _dereq_(56);
- var setSpecies = _dereq_(100);
- var arrayFill = _dereq_(9);
- var arrayCopyWithin = _dereq_(8);
- var $DP = _dereq_(72);
- var $GOPD = _dereq_(75);
- var dP = $DP.f;
- var gOPD = $GOPD.f;
- var RangeError = global.RangeError;
- var TypeError = global.TypeError;
- var Uint8Array = global.Uint8Array;
- var ARRAY_BUFFER = 'ArrayBuffer';
- var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
- var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
- var PROTOTYPE = 'prototype';
- var ArrayProto = Array[PROTOTYPE];
- var $ArrayBuffer = $buffer.ArrayBuffer;
- var $DataView = $buffer.DataView;
- var arrayForEach = createArrayMethod(0);
- var arrayFilter = createArrayMethod(2);
- var arraySome = createArrayMethod(3);
- var arrayEvery = createArrayMethod(4);
- var arrayFind = createArrayMethod(5);
- var arrayFindIndex = createArrayMethod(6);
- var arrayIncludes = createArrayIncludes(true);
- var arrayIndexOf = createArrayIncludes(false);
- var arrayValues = ArrayIterators.values;
- var arrayKeys = ArrayIterators.keys;
- var arrayEntries = ArrayIterators.entries;
- var arrayLastIndexOf = ArrayProto.lastIndexOf;
- var arrayReduce = ArrayProto.reduce;
- var arrayReduceRight = ArrayProto.reduceRight;
- var arrayJoin = ArrayProto.join;
- var arraySort = ArrayProto.sort;
- var arraySlice = ArrayProto.slice;
- var arrayToString = ArrayProto.toString;
- var arrayToLocaleString = ArrayProto.toLocaleString;
- var ITERATOR = wks('iterator');
- var TAG = wks('toStringTag');
- var TYPED_CONSTRUCTOR = uid('typed_constructor');
- var DEF_CONSTRUCTOR = uid('def_constructor');
- var ALL_CONSTRUCTORS = $typed.CONSTR;
- var TYPED_ARRAY = $typed.TYPED;
- var VIEW = $typed.VIEW;
- var WRONG_LENGTH = 'Wrong length!';
-
- var $map = createArrayMethod(1, function (O, length) {
- return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
- });
-
- var LITTLE_ENDIAN = fails(function () {
- // eslint-disable-next-line no-undef
- return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
- });
-
- var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
- new Uint8Array(1).set({});
- });
-
- var toOffset = function (it, BYTES) {
- var offset = toInteger(it);
- if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
- return offset;
- };
-
- var validate = function (it) {
- if (isObject(it) && TYPED_ARRAY in it) return it;
- throw TypeError(it + ' is not a typed array!');
- };
-
- var allocate = function (C, length) {
- if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
- throw TypeError('It is not a typed array constructor!');
- } return new C(length);
- };
-
- var speciesFromList = function (O, list) {
- return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
- };
-
- var fromList = function (C, list) {
- var index = 0;
- var length = list.length;
- var result = allocate(C, length);
- while (length > index) result[index] = list[index++];
- return result;
- };
-
- var addGetter = function (it, key, internal) {
- dP(it, key, { get: function () { return this._d[internal]; } });
- };
-
- var $from = function from(source /* , mapfn, thisArg */) {
- var O = toObject(source);
- var aLen = arguments.length;
- var mapfn = aLen > 1 ? arguments[1] : undefined;
- var mapping = mapfn !== undefined;
- var iterFn = getIterFn(O);
- var i, length, values, result, step, iterator;
- if (iterFn != undefined && !isArrayIter(iterFn)) {
- for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
- values.push(step.value);
- } O = values;
- }
- if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
- for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
- result[i] = mapping ? mapfn(O[i], i) : O[i];
- }
- return result;
- };
-
- var $of = function of(/* ...items */) {
- var index = 0;
- var length = arguments.length;
- var result = allocate(this, length);
- while (length > index) result[index] = arguments[index++];
- return result;
- };
-
- // iOS Safari 6.x fails here
- var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
-
- var $toLocaleString = function toLocaleString() {
- return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
- };
-
- var proto = {
- copyWithin: function copyWithin(target, start /* , end */) {
- return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
- },
- every: function every(callbackfn /* , thisArg */) {
- return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
- return arrayFill.apply(validate(this), arguments);
- },
- filter: function filter(callbackfn /* , thisArg */) {
- return speciesFromList(this, arrayFilter(validate(this), callbackfn,
- arguments.length > 1 ? arguments[1] : undefined));
- },
- find: function find(predicate /* , thisArg */) {
- return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- findIndex: function findIndex(predicate /* , thisArg */) {
- return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
- },
- forEach: function forEach(callbackfn /* , thisArg */) {
- arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- indexOf: function indexOf(searchElement /* , fromIndex */) {
- return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- includes: function includes(searchElement /* , fromIndex */) {
- return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
- },
- join: function join(separator) { // eslint-disable-line no-unused-vars
- return arrayJoin.apply(validate(this), arguments);
- },
- lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
- return arrayLastIndexOf.apply(validate(this), arguments);
- },
- map: function map(mapfn /* , thisArg */) {
- return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
- return arrayReduce.apply(validate(this), arguments);
- },
- reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
- return arrayReduceRight.apply(validate(this), arguments);
- },
- reverse: function reverse() {
- var that = this;
- var length = validate(that).length;
- var middle = Math.floor(length / 2);
- var index = 0;
- var value;
- while (index < middle) {
- value = that[index];
- that[index++] = that[--length];
- that[length] = value;
- } return that;
- },
- some: function some(callbackfn /* , thisArg */) {
- return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- },
- sort: function sort(comparefn) {
- return arraySort.call(validate(this), comparefn);
- },
- subarray: function subarray(begin, end) {
- var O = validate(this);
- var length = O.length;
- var $begin = toAbsoluteIndex(begin, length);
- return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
- O.buffer,
- O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
- toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
- );
- }
- };
-
- var $slice = function slice(start, end) {
- return speciesFromList(this, arraySlice.call(validate(this), start, end));
- };
-
- var $set = function set(arrayLike /* , offset */) {
- validate(this);
- var offset = toOffset(arguments[1], 1);
- var length = this.length;
- var src = toObject(arrayLike);
- var len = toLength(src.length);
- var index = 0;
- if (len + offset > length) throw RangeError(WRONG_LENGTH);
- while (index < len) this[offset + index] = src[index++];
- };
-
- var $iterators = {
- entries: function entries() {
- return arrayEntries.call(validate(this));
- },
- keys: function keys() {
- return arrayKeys.call(validate(this));
- },
- values: function values() {
- return arrayValues.call(validate(this));
- }
- };
-
- var isTAIndex = function (target, key) {
- return isObject(target)
- && target[TYPED_ARRAY]
- && typeof key != 'symbol'
- && key in target
- && String(+key) == String(key);
- };
- var $getDesc = function getOwnPropertyDescriptor(target, key) {
- return isTAIndex(target, key = toPrimitive(key, true))
- ? propertyDesc(2, target[key])
- : gOPD(target, key);
- };
- var $setDesc = function defineProperty(target, key, desc) {
- if (isTAIndex(target, key = toPrimitive(key, true))
- && isObject(desc)
- && has(desc, 'value')
- && !has(desc, 'get')
- && !has(desc, 'set')
- // TODO: add validation descriptor w/o calling accessors
- && !desc.configurable
- && (!has(desc, 'writable') || desc.writable)
- && (!has(desc, 'enumerable') || desc.enumerable)
- ) {
- target[key] = desc.value;
- return target;
- } return dP(target, key, desc);
- };
-
- if (!ALL_CONSTRUCTORS) {
- $GOPD.f = $getDesc;
- $DP.f = $setDesc;
- }
-
- $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
- getOwnPropertyDescriptor: $getDesc,
- defineProperty: $setDesc
- });
-
- if (fails(function () { arrayToString.call({}); })) {
- arrayToString = arrayToLocaleString = function toString() {
- return arrayJoin.call(this);
- };
- }
-
- var $TypedArrayPrototype$ = redefineAll({}, proto);
- redefineAll($TypedArrayPrototype$, $iterators);
- hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
- redefineAll($TypedArrayPrototype$, {
- slice: $slice,
- set: $set,
- constructor: function () { /* noop */ },
- toString: arrayToString,
- toLocaleString: $toLocaleString
- });
- addGetter($TypedArrayPrototype$, 'buffer', 'b');
- addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
- addGetter($TypedArrayPrototype$, 'byteLength', 'l');
- addGetter($TypedArrayPrototype$, 'length', 'e');
- dP($TypedArrayPrototype$, TAG, {
- get: function () { return this[TYPED_ARRAY]; }
- });
-
- // eslint-disable-next-line max-statements
- module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
- CLAMPED = !!CLAMPED;
- var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
- var GETTER = 'get' + KEY;
- var SETTER = 'set' + KEY;
- var TypedArray = global[NAME];
- var Base = TypedArray || {};
- var TAC = TypedArray && getPrototypeOf(TypedArray);
- var FORCED = !TypedArray || !$typed.ABV;
- var O = {};
- var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
- var getter = function (that, index) {
- var data = that._d;
- return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
- };
- var setter = function (that, index, value) {
- var data = that._d;
- if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
- data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
- };
- var addElement = function (that, index) {
- dP(that, index, {
- get: function () {
- return getter(this, index);
- },
- set: function (value) {
- return setter(this, index, value);
- },
- enumerable: true
- });
- };
- if (FORCED) {
- TypedArray = wrapper(function (that, data, $offset, $length) {
- anInstance(that, TypedArray, NAME, '_d');
- var index = 0;
- var offset = 0;
- var buffer, byteLength, length, klass;
- if (!isObject(data)) {
- length = toIndex(data);
- byteLength = length * BYTES;
- buffer = new $ArrayBuffer(byteLength);
- } else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
- buffer = data;
- offset = toOffset($offset, BYTES);
- var $len = data.byteLength;
- if ($length === undefined) {
- if ($len % BYTES) throw RangeError(WRONG_LENGTH);
- byteLength = $len - offset;
- if (byteLength < 0) throw RangeError(WRONG_LENGTH);
- } else {
- byteLength = toLength($length) * BYTES;
- if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
- }
- length = byteLength / BYTES;
- } else if (TYPED_ARRAY in data) {
- return fromList(TypedArray, data);
- } else {
- return $from.call(TypedArray, data);
- }
- hide(that, '_d', {
- b: buffer,
- o: offset,
- l: byteLength,
- e: length,
- v: new $DataView(buffer)
- });
- while (index < length) addElement(that, index++);
- });
- TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
- hide(TypedArrayPrototype, 'constructor', TypedArray);
- } else if (!fails(function () {
- TypedArray(1);
- }) || !fails(function () {
- new TypedArray(-1); // eslint-disable-line no-new
- }) || !$iterDetect(function (iter) {
- new TypedArray(); // eslint-disable-line no-new
- new TypedArray(null); // eslint-disable-line no-new
- new TypedArray(1.5); // eslint-disable-line no-new
- new TypedArray(iter); // eslint-disable-line no-new
- }, true)) {
- TypedArray = wrapper(function (that, data, $offset, $length) {
- anInstance(that, TypedArray, NAME);
- var klass;
- // `ws` module bug, temporarily remove validation length for Uint8Array
- // https://github.com/websockets/ws/pull/645
- if (!isObject(data)) return new Base(toIndex(data));
- if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
- return $length !== undefined
- ? new Base(data, toOffset($offset, BYTES), $length)
- : $offset !== undefined
- ? new Base(data, toOffset($offset, BYTES))
- : new Base(data);
- }
- if (TYPED_ARRAY in data) return fromList(TypedArray, data);
- return $from.call(TypedArray, data);
- });
- arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
- if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
- });
- TypedArray[PROTOTYPE] = TypedArrayPrototype;
- if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
- }
- var $nativeIterator = TypedArrayPrototype[ITERATOR];
- var CORRECT_ITER_NAME = !!$nativeIterator
- && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
- var $iterator = $iterators.values;
- hide(TypedArray, TYPED_CONSTRUCTOR, true);
- hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
- hide(TypedArrayPrototype, VIEW, true);
- hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
-
- if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
- dP(TypedArrayPrototype, TAG, {
- get: function () { return NAME; }
- });
- }
-
- O[NAME] = TypedArray;
-
- $export($export.G + $export.W + $export.F * (TypedArray != Base), O);
-
- $export($export.S, NAME, {
- BYTES_PER_ELEMENT: BYTES
- });
-
- $export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
- from: $from,
- of: $of
- });
-
- if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
-
- $export($export.P, NAME, proto);
-
- setSpecies(NAME);
-
- $export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
-
- $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
-
- if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
-
- $export($export.P + $export.F * fails(function () {
- new TypedArray(1).slice();
- }), NAME, { slice: $slice });
-
- $export($export.P + $export.F * (fails(function () {
- return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
- }) || !fails(function () {
- TypedArrayPrototype.toLocaleString.call([1, 2]);
- })), NAME, { toLocaleString: $toLocaleString });
-
- Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
- if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
- };
-} else module.exports = function () { /* empty */ };
-
-},{"100":100,"104":104,"11":11,"114":114,"115":115,"116":116,"118":118,"119":119,"12":12,"120":120,"122":122,"123":123,"124":124,"128":128,"129":129,"141":141,"17":17,"25":25,"29":29,"33":33,"35":35,"40":40,"41":41,"42":42,"48":48,"51":51,"56":56,"58":58,"6":6,"60":60,"71":71,"72":72,"75":75,"77":77,"79":79,"8":8,"9":9,"92":92,"93":93}],122:[function(_dereq_,module,exports){
-'use strict';
-var global = _dereq_(40);
-var DESCRIPTORS = _dereq_(29);
-var LIBRARY = _dereq_(60);
-var $typed = _dereq_(123);
-var hide = _dereq_(42);
-var redefineAll = _dereq_(93);
-var fails = _dereq_(35);
-var anInstance = _dereq_(6);
-var toInteger = _dereq_(116);
-var toLength = _dereq_(118);
-var toIndex = _dereq_(115);
-var gOPN = _dereq_(77).f;
-var dP = _dereq_(72).f;
-var arrayFill = _dereq_(9);
-var setToStringTag = _dereq_(101);
-var ARRAY_BUFFER = 'ArrayBuffer';
-var DATA_VIEW = 'DataView';
-var PROTOTYPE = 'prototype';
-var WRONG_LENGTH = 'Wrong length!';
-var WRONG_INDEX = 'Wrong index!';
-var $ArrayBuffer = global[ARRAY_BUFFER];
-var $DataView = global[DATA_VIEW];
-var Math = global.Math;
-var RangeError = global.RangeError;
-// eslint-disable-next-line no-shadow-restricted-names
-var Infinity = global.Infinity;
-var BaseBuffer = $ArrayBuffer;
-var abs = Math.abs;
-var pow = Math.pow;
-var floor = Math.floor;
-var log = Math.log;
-var LN2 = Math.LN2;
-var BUFFER = 'buffer';
-var BYTE_LENGTH = 'byteLength';
-var BYTE_OFFSET = 'byteOffset';
-var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
-var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
-var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
-
-// IEEE754 conversions based on https://github.com/feross/ieee754
-function packIEEE754(value, mLen, nBytes) {
- var buffer = Array(nBytes);
- var eLen = nBytes * 8 - mLen - 1;
- var eMax = (1 << eLen) - 1;
- var eBias = eMax >> 1;
- var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
- var i = 0;
- var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
- var e, m, c;
- value = abs(value);
- // eslint-disable-next-line no-self-compare
- if (value != value || value === Infinity) {
- // eslint-disable-next-line no-self-compare
- m = value != value ? 1 : 0;
- e = eMax;
- } else {
- e = floor(log(value) / LN2);
- if (value * (c = pow(2, -e)) < 1) {
- e--;
- c *= 2;
- }
- if (e + eBias >= 1) {
- value += rt / c;
- } else {
- value += rt * pow(2, 1 - eBias);
- }
- if (value * c >= 2) {
- e++;
- c /= 2;
- }
- if (e + eBias >= eMax) {
- m = 0;
- e = eMax;
- } else if (e + eBias >= 1) {
- m = (value * c - 1) * pow(2, mLen);
- e = e + eBias;
- } else {
- m = value * pow(2, eBias - 1) * pow(2, mLen);
- e = 0;
- }
- }
- for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
- e = e << mLen | m;
- eLen += mLen;
- for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
- buffer[--i] |= s * 128;
- return buffer;
-}
-function unpackIEEE754(buffer, mLen, nBytes) {
- var eLen = nBytes * 8 - mLen - 1;
- var eMax = (1 << eLen) - 1;
- var eBias = eMax >> 1;
- var nBits = eLen - 7;
- var i = nBytes - 1;
- var s = buffer[i--];
- var e = s & 127;
- var m;
- s >>= 7;
- for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
- m = e & (1 << -nBits) - 1;
- e >>= -nBits;
- nBits += mLen;
- for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
- if (e === 0) {
- e = 1 - eBias;
- } else if (e === eMax) {
- return m ? NaN : s ? -Infinity : Infinity;
- } else {
- m = m + pow(2, mLen);
- e = e - eBias;
- } return (s ? -1 : 1) * m * pow(2, e - mLen);
-}
-
-function unpackI32(bytes) {
- return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
-}
-function packI8(it) {
- return [it & 0xff];
-}
-function packI16(it) {
- return [it & 0xff, it >> 8 & 0xff];
-}
-function packI32(it) {
- return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
-}
-function packF64(it) {
- return packIEEE754(it, 52, 8);
-}
-function packF32(it) {
- return packIEEE754(it, 23, 4);
-}
-
-function addGetter(C, key, internal) {
- dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
-}
-
-function get(view, bytes, index, isLittleEndian) {
- var numIndex = +index;
- var intIndex = toIndex(numIndex);
- if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b;
- var start = intIndex + view[$OFFSET];
- var pack = store.slice(start, start + bytes);
- return isLittleEndian ? pack : pack.reverse();
-}
-function set(view, bytes, index, conversion, value, isLittleEndian) {
- var numIndex = +index;
- var intIndex = toIndex(numIndex);
- if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
- var store = view[$BUFFER]._b;
- var start = intIndex + view[$OFFSET];
- var pack = conversion(+value);
- for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
-}
-
-if (!$typed.ABV) {
- $ArrayBuffer = function ArrayBuffer(length) {
- anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
- var byteLength = toIndex(length);
- this._b = arrayFill.call(Array(byteLength), 0);
- this[$LENGTH] = byteLength;
- };
-
- $DataView = function DataView(buffer, byteOffset, byteLength) {
- anInstance(this, $DataView, DATA_VIEW);
- anInstance(buffer, $ArrayBuffer, DATA_VIEW);
- var bufferLength = buffer[$LENGTH];
- var offset = toInteger(byteOffset);
- if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
- byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
- if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
- this[$BUFFER] = buffer;
- this[$OFFSET] = offset;
- this[$LENGTH] = byteLength;
- };
-
- if (DESCRIPTORS) {
- addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
- addGetter($DataView, BUFFER, '_b');
- addGetter($DataView, BYTE_LENGTH, '_l');
- addGetter($DataView, BYTE_OFFSET, '_o');
- }
-
- redefineAll($DataView[PROTOTYPE], {
- getInt8: function getInt8(byteOffset) {
- return get(this, 1, byteOffset)[0] << 24 >> 24;
- },
- getUint8: function getUint8(byteOffset) {
- return get(this, 1, byteOffset)[0];
- },
- getInt16: function getInt16(byteOffset /* , littleEndian */) {
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
- },
- getUint16: function getUint16(byteOffset /* , littleEndian */) {
- var bytes = get(this, 2, byteOffset, arguments[1]);
- return bytes[1] << 8 | bytes[0];
- },
- getInt32: function getInt32(byteOffset /* , littleEndian */) {
- return unpackI32(get(this, 4, byteOffset, arguments[1]));
- },
- getUint32: function getUint32(byteOffset /* , littleEndian */) {
- return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
- },
- getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
- return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
- },
- getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
- return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
- },
- setInt8: function setInt8(byteOffset, value) {
- set(this, 1, byteOffset, packI8, value);
- },
- setUint8: function setUint8(byteOffset, value) {
- set(this, 1, byteOffset, packI8, value);
- },
- setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
- set(this, 2, byteOffset, packI16, value, arguments[2]);
- },
- setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
- set(this, 4, byteOffset, packI32, value, arguments[2]);
- },
- setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
- set(this, 4, byteOffset, packF32, value, arguments[2]);
- },
- setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
- set(this, 8, byteOffset, packF64, value, arguments[2]);
- }
- });
-} else {
- if (!fails(function () {
- $ArrayBuffer(1);
- }) || !fails(function () {
- new $ArrayBuffer(-1); // eslint-disable-line no-new
- }) || fails(function () {
- new $ArrayBuffer(); // eslint-disable-line no-new
- new $ArrayBuffer(1.5); // eslint-disable-line no-new
- new $ArrayBuffer(NaN); // eslint-disable-line no-new
- return $ArrayBuffer.name != ARRAY_BUFFER;
- })) {
- $ArrayBuffer = function ArrayBuffer(length) {
- anInstance(this, $ArrayBuffer);
- return new BaseBuffer(toIndex(length));
- };
- var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
- for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
- if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
- }
- if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
- }
- // iOS Safari 7.x bug
- var view = new $DataView(new $ArrayBuffer(2));
- var $setInt8 = $DataView[PROTOTYPE].setInt8;
- view.setInt8(0, 2147483648);
- view.setInt8(1, 2147483649);
- if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
- setInt8: function setInt8(byteOffset, value) {
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- },
- setUint8: function setUint8(byteOffset, value) {
- $setInt8.call(this, byteOffset, value << 24 >> 24);
- }
- }, true);
-}
-setToStringTag($ArrayBuffer, ARRAY_BUFFER);
-setToStringTag($DataView, DATA_VIEW);
-hide($DataView[PROTOTYPE], $typed.VIEW, true);
-exports[ARRAY_BUFFER] = $ArrayBuffer;
-exports[DATA_VIEW] = $DataView;
-
-},{"101":101,"115":115,"116":116,"118":118,"123":123,"29":29,"35":35,"40":40,"42":42,"6":6,"60":60,"72":72,"77":77,"9":9,"93":93}],123:[function(_dereq_,module,exports){
-var global = _dereq_(40);
-var hide = _dereq_(42);
-var uid = _dereq_(124);
-var TYPED = uid('typed_array');
-var VIEW = uid('view');
-var ABV = !!(global.ArrayBuffer && global.DataView);
-var CONSTR = ABV;
-var i = 0;
-var l = 9;
-var Typed;
-
-var TypedArrayConstructors = (
- 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
-).split(',');
-
-while (i < l) {
- if (Typed = global[TypedArrayConstructors[i++]]) {
- hide(Typed.prototype, TYPED, true);
- hide(Typed.prototype, VIEW, true);
- } else CONSTR = false;
-}
-
-module.exports = {
- ABV: ABV,
- CONSTR: CONSTR,
- TYPED: TYPED,
- VIEW: VIEW
-};
-
-},{"124":124,"40":40,"42":42}],124:[function(_dereq_,module,exports){
-var id = 0;
-var px = Math.random();
-module.exports = function (key) {
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
-};
-
-},{}],125:[function(_dereq_,module,exports){
-var isObject = _dereq_(51);
-module.exports = function (it, TYPE) {
- if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
- return it;
-};
-
-},{"51":51}],126:[function(_dereq_,module,exports){
-var global = _dereq_(40);
-var core = _dereq_(23);
-var LIBRARY = _dereq_(60);
-var wksExt = _dereq_(127);
-var defineProperty = _dereq_(72).f;
-module.exports = function (name) {
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
-};
-
-},{"127":127,"23":23,"40":40,"60":60,"72":72}],127:[function(_dereq_,module,exports){
-exports.f = _dereq_(128);
-
-},{"128":128}],128:[function(_dereq_,module,exports){
-var store = _dereq_(103)('wks');
-var uid = _dereq_(124);
-var Symbol = _dereq_(40).Symbol;
-var USE_SYMBOL = typeof Symbol == 'function';
-
-var $exports = module.exports = function (name) {
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
-};
-
-$exports.store = store;
-
-},{"103":103,"124":124,"40":40}],129:[function(_dereq_,module,exports){
-var classof = _dereq_(17);
-var ITERATOR = _dereq_(128)('iterator');
-var Iterators = _dereq_(58);
-module.exports = _dereq_(23).getIteratorMethod = function (it) {
- if (it != undefined) return it[ITERATOR]
- || it['@@iterator']
- || Iterators[classof(it)];
-};
-
-},{"128":128,"17":17,"23":23,"58":58}],130:[function(_dereq_,module,exports){
-// https://github.com/benjamingr/RexExp.escape
-var $export = _dereq_(33);
-var $re = _dereq_(95)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
-
-$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });
-
-},{"33":33,"95":95}],131:[function(_dereq_,module,exports){
-// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
-var $export = _dereq_(33);
-
-$export($export.P, 'Array', { copyWithin: _dereq_(8) });
-
-_dereq_(5)('copyWithin');
-
-},{"33":33,"5":5,"8":8}],132:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $every = _dereq_(12)(4);
-
-$export($export.P + $export.F * !_dereq_(105)([].every, true), 'Array', {
- // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
- every: function every(callbackfn /* , thisArg */) {
- return $every(this, callbackfn, arguments[1]);
- }
-});
-
-},{"105":105,"12":12,"33":33}],133:[function(_dereq_,module,exports){
-// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
-var $export = _dereq_(33);
-
-$export($export.P, 'Array', { fill: _dereq_(9) });
-
-_dereq_(5)('fill');
-
-},{"33":33,"5":5,"9":9}],134:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $filter = _dereq_(12)(2);
-
-$export($export.P + $export.F * !_dereq_(105)([].filter, true), 'Array', {
- // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
- filter: function filter(callbackfn /* , thisArg */) {
- return $filter(this, callbackfn, arguments[1]);
- }
-});
-
-},{"105":105,"12":12,"33":33}],135:[function(_dereq_,module,exports){
-'use strict';
-// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
-var $export = _dereq_(33);
-var $find = _dereq_(12)(6);
-var KEY = 'findIndex';
-var forced = true;
-// Shouldn't skip holes
-if (KEY in []) Array(1)[KEY](function () { forced = false; });
-$export($export.P + $export.F * forced, 'Array', {
- findIndex: function findIndex(callbackfn /* , that = undefined */) {
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-_dereq_(5)(KEY);
-
-},{"12":12,"33":33,"5":5}],136:[function(_dereq_,module,exports){
-'use strict';
-// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
-var $export = _dereq_(33);
-var $find = _dereq_(12)(5);
-var KEY = 'find';
-var forced = true;
-// Shouldn't skip holes
-if (KEY in []) Array(1)[KEY](function () { forced = false; });
-$export($export.P + $export.F * forced, 'Array', {
- find: function find(callbackfn /* , that = undefined */) {
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-_dereq_(5)(KEY);
-
-},{"12":12,"33":33,"5":5}],137:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $forEach = _dereq_(12)(0);
-var STRICT = _dereq_(105)([].forEach, true);
-
-$export($export.P + $export.F * !STRICT, 'Array', {
- // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
- forEach: function forEach(callbackfn /* , thisArg */) {
- return $forEach(this, callbackfn, arguments[1]);
- }
-});
-
-},{"105":105,"12":12,"33":33}],138:[function(_dereq_,module,exports){
-'use strict';
-var ctx = _dereq_(25);
-var $export = _dereq_(33);
-var toObject = _dereq_(119);
-var call = _dereq_(53);
-var isArrayIter = _dereq_(48);
-var toLength = _dereq_(118);
-var createProperty = _dereq_(24);
-var getIterFn = _dereq_(129);
-
-$export($export.S + $export.F * !_dereq_(56)(function (iter) { Array.from(iter); }), 'Array', {
- // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
- from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
- var O = toObject(arrayLike);
- var C = typeof this == 'function' ? this : Array;
- var aLen = arguments.length;
- var mapfn = aLen > 1 ? arguments[1] : undefined;
- var mapping = mapfn !== undefined;
- var index = 0;
- var iterFn = getIterFn(O);
- var length, result, step, iterator;
- if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
- // if object isn't iterable or it's array with default iterator - use simple case
- if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
- for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
- createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
- }
- } else {
- length = toLength(O.length);
- for (result = new C(length); length > index; index++) {
- createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
- }
- }
- result.length = index;
- return result;
- }
-});
-
-},{"118":118,"119":119,"129":129,"24":24,"25":25,"33":33,"48":48,"53":53,"56":56}],139:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $indexOf = _dereq_(11)(false);
-var $native = [].indexOf;
-var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
-
-$export($export.P + $export.F * (NEGATIVE_ZERO || !_dereq_(105)($native)), 'Array', {
- // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
- indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
- return NEGATIVE_ZERO
- // convert -0 to +0
- ? $native.apply(this, arguments) || 0
- : $indexOf(this, searchElement, arguments[1]);
- }
-});
-
-},{"105":105,"11":11,"33":33}],140:[function(_dereq_,module,exports){
-// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
-var $export = _dereq_(33);
-
-$export($export.S, 'Array', { isArray: _dereq_(49) });
-
-},{"33":33,"49":49}],141:[function(_dereq_,module,exports){
-'use strict';
-var addToUnscopables = _dereq_(5);
-var step = _dereq_(57);
-var Iterators = _dereq_(58);
-var toIObject = _dereq_(117);
-
-// 22.1.3.4 Array.prototype.entries()
-// 22.1.3.13 Array.prototype.keys()
-// 22.1.3.29 Array.prototype.values()
-// 22.1.3.30 Array.prototype[@@iterator]()
-module.exports = _dereq_(55)(Array, 'Array', function (iterated, kind) {
- this._t = toIObject(iterated); // target
- this._i = 0; // next index
- this._k = kind; // kind
-// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
-}, function () {
- var O = this._t;
- var kind = this._k;
- var index = this._i++;
- if (!O || index >= O.length) {
- this._t = undefined;
- return step(1);
- }
- if (kind == 'keys') return step(0, index);
- if (kind == 'values') return step(0, O[index]);
- return step(0, [index, O[index]]);
-}, 'values');
-
-// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
-Iterators.Arguments = Iterators.Array;
-
-addToUnscopables('keys');
-addToUnscopables('values');
-addToUnscopables('entries');
-
-},{"117":117,"5":5,"55":55,"57":57,"58":58}],142:[function(_dereq_,module,exports){
-'use strict';
-// 22.1.3.13 Array.prototype.join(separator)
-var $export = _dereq_(33);
-var toIObject = _dereq_(117);
-var arrayJoin = [].join;
-
-// fallback for not array-like strings
-$export($export.P + $export.F * (_dereq_(47) != Object || !_dereq_(105)(arrayJoin)), 'Array', {
- join: function join(separator) {
- return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
- }
-});
-
-},{"105":105,"117":117,"33":33,"47":47}],143:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var toIObject = _dereq_(117);
-var toInteger = _dereq_(116);
-var toLength = _dereq_(118);
-var $native = [].lastIndexOf;
-var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
-
-$export($export.P + $export.F * (NEGATIVE_ZERO || !_dereq_(105)($native)), 'Array', {
- // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
- lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
- // convert -0 to +0
- if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
- var O = toIObject(this);
- var length = toLength(O.length);
- var index = length - 1;
- if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
- if (index < 0) index = length + index;
- for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
- return -1;
- }
-});
-
-},{"105":105,"116":116,"117":117,"118":118,"33":33}],144:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $map = _dereq_(12)(1);
-
-$export($export.P + $export.F * !_dereq_(105)([].map, true), 'Array', {
- // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
- map: function map(callbackfn /* , thisArg */) {
- return $map(this, callbackfn, arguments[1]);
- }
-});
-
-},{"105":105,"12":12,"33":33}],145:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var createProperty = _dereq_(24);
-
-// WebKit Array.of isn't generic
-$export($export.S + $export.F * _dereq_(35)(function () {
- function F() { /* empty */ }
- return !(Array.of.call(F) instanceof F);
-}), 'Array', {
- // 22.1.2.3 Array.of( ...items)
- of: function of(/* ...args */) {
- var index = 0;
- var aLen = arguments.length;
- var result = new (typeof this == 'function' ? this : Array)(aLen);
- while (aLen > index) createProperty(result, index, arguments[index++]);
- result.length = aLen;
- return result;
- }
-});
-
-},{"24":24,"33":33,"35":35}],146:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $reduce = _dereq_(13);
-
-$export($export.P + $export.F * !_dereq_(105)([].reduceRight, true), 'Array', {
- // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
- reduceRight: function reduceRight(callbackfn /* , initialValue */) {
- return $reduce(this, callbackfn, arguments.length, arguments[1], true);
- }
-});
-
-},{"105":105,"13":13,"33":33}],147:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $reduce = _dereq_(13);
-
-$export($export.P + $export.F * !_dereq_(105)([].reduce, true), 'Array', {
- // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
- reduce: function reduce(callbackfn /* , initialValue */) {
- return $reduce(this, callbackfn, arguments.length, arguments[1], false);
- }
-});
-
-},{"105":105,"13":13,"33":33}],148:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var html = _dereq_(43);
-var cof = _dereq_(18);
-var toAbsoluteIndex = _dereq_(114);
-var toLength = _dereq_(118);
-var arraySlice = [].slice;
-
-// fallback for not array-like ES3 strings and DOM objects
-$export($export.P + $export.F * _dereq_(35)(function () {
- if (html) arraySlice.call(html);
-}), 'Array', {
- slice: function slice(begin, end) {
- var len = toLength(this.length);
- var klass = cof(this);
- end = end === undefined ? len : end;
- if (klass == 'Array') return arraySlice.call(this, begin, end);
- var start = toAbsoluteIndex(begin, len);
- var upTo = toAbsoluteIndex(end, len);
- var size = toLength(upTo - start);
- var cloned = Array(size);
- var i = 0;
- for (; i < size; i++) cloned[i] = klass == 'String'
- ? this.charAt(start + i)
- : this[start + i];
- return cloned;
- }
-});
-
-},{"114":114,"118":118,"18":18,"33":33,"35":35,"43":43}],149:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $some = _dereq_(12)(3);
-
-$export($export.P + $export.F * !_dereq_(105)([].some, true), 'Array', {
- // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
- some: function some(callbackfn /* , thisArg */) {
- return $some(this, callbackfn, arguments[1]);
- }
-});
-
-},{"105":105,"12":12,"33":33}],150:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var aFunction = _dereq_(3);
-var toObject = _dereq_(119);
-var fails = _dereq_(35);
-var $sort = [].sort;
-var test = [1, 2, 3];
-
-$export($export.P + $export.F * (fails(function () {
- // IE8-
- test.sort(undefined);
-}) || !fails(function () {
- // V8 bug
- test.sort(null);
- // Old WebKit
-}) || !_dereq_(105)($sort)), 'Array', {
- // 22.1.3.25 Array.prototype.sort(comparefn)
- sort: function sort(comparefn) {
- return comparefn === undefined
- ? $sort.call(toObject(this))
- : $sort.call(toObject(this), aFunction(comparefn));
- }
-});
-
-},{"105":105,"119":119,"3":3,"33":33,"35":35}],151:[function(_dereq_,module,exports){
-_dereq_(100)('Array');
-
-},{"100":100}],152:[function(_dereq_,module,exports){
-// 20.3.3.1 / 15.9.4.4 Date.now()
-var $export = _dereq_(33);
-
-$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
-
-},{"33":33}],153:[function(_dereq_,module,exports){
-// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
-var $export = _dereq_(33);
-var toISOString = _dereq_(26);
-
-// PhantomJS / old WebKit has a broken implementations
-$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
- toISOString: toISOString
-});
-
-},{"26":26,"33":33}],154:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var toObject = _dereq_(119);
-var toPrimitive = _dereq_(120);
-
-$export($export.P + $export.F * _dereq_(35)(function () {
- return new Date(NaN).toJSON() !== null
- || Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
-}), 'Date', {
- // eslint-disable-next-line no-unused-vars
- toJSON: function toJSON(key) {
- var O = toObject(this);
- var pv = toPrimitive(O);
- return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
- }
-});
-
-},{"119":119,"120":120,"33":33,"35":35}],155:[function(_dereq_,module,exports){
-var TO_PRIMITIVE = _dereq_(128)('toPrimitive');
-var proto = Date.prototype;
-
-if (!(TO_PRIMITIVE in proto)) _dereq_(42)(proto, TO_PRIMITIVE, _dereq_(27));
-
-},{"128":128,"27":27,"42":42}],156:[function(_dereq_,module,exports){
-var DateProto = Date.prototype;
-var INVALID_DATE = 'Invalid Date';
-var TO_STRING = 'toString';
-var $toString = DateProto[TO_STRING];
-var getTime = DateProto.getTime;
-if (new Date(NaN) + '' != INVALID_DATE) {
- _dereq_(94)(DateProto, TO_STRING, function toString() {
- var value = getTime.call(this);
- // eslint-disable-next-line no-self-compare
- return value === value ? $toString.call(this) : INVALID_DATE;
- });
-}
-
-},{"94":94}],157:[function(_dereq_,module,exports){
-// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
-var $export = _dereq_(33);
-
-$export($export.P, 'Function', { bind: _dereq_(16) });
-
-},{"16":16,"33":33}],158:[function(_dereq_,module,exports){
-'use strict';
-var isObject = _dereq_(51);
-var getPrototypeOf = _dereq_(79);
-var HAS_INSTANCE = _dereq_(128)('hasInstance');
-var FunctionProto = Function.prototype;
-// 19.2.3.6 Function.prototype[@@hasInstance](V)
-if (!(HAS_INSTANCE in FunctionProto)) _dereq_(72).f(FunctionProto, HAS_INSTANCE, { value: function (O) {
- if (typeof this != 'function' || !isObject(O)) return false;
- if (!isObject(this.prototype)) return O instanceof this;
- // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
- while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
- return false;
-} });
-
-},{"128":128,"51":51,"72":72,"79":79}],159:[function(_dereq_,module,exports){
-var dP = _dereq_(72).f;
-var FProto = Function.prototype;
-var nameRE = /^\s*function ([^ (]*)/;
-var NAME = 'name';
-
-// 19.2.4.2 name
-NAME in FProto || _dereq_(29) && dP(FProto, NAME, {
- configurable: true,
- get: function () {
- try {
- return ('' + this).match(nameRE)[1];
- } catch (e) {
- return '';
- }
- }
-});
-
-},{"29":29,"72":72}],160:[function(_dereq_,module,exports){
-'use strict';
-var strong = _dereq_(19);
-var validate = _dereq_(125);
-var MAP = 'Map';
-
-// 23.1 Map Objects
-module.exports = _dereq_(22)(MAP, function (get) {
- return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
-}, {
- // 23.1.3.6 Map.prototype.get(key)
- get: function get(key) {
- var entry = strong.getEntry(validate(this, MAP), key);
- return entry && entry.v;
- },
- // 23.1.3.9 Map.prototype.set(key, value)
- set: function set(key, value) {
- return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
- }
-}, strong, true);
-
-},{"125":125,"19":19,"22":22}],161:[function(_dereq_,module,exports){
-// 20.2.2.3 Math.acosh(x)
-var $export = _dereq_(33);
-var log1p = _dereq_(63);
-var sqrt = Math.sqrt;
-var $acosh = Math.acosh;
-
-$export($export.S + $export.F * !($acosh
- // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
- && Math.floor($acosh(Number.MAX_VALUE)) == 710
- // Tor Browser bug: Math.acosh(Infinity) -> NaN
- && $acosh(Infinity) == Infinity
-), 'Math', {
- acosh: function acosh(x) {
- return (x = +x) < 1 ? NaN : x > 94906265.62425156
- ? Math.log(x) + Math.LN2
- : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
- }
-});
-
-},{"33":33,"63":63}],162:[function(_dereq_,module,exports){
-// 20.2.2.5 Math.asinh(x)
-var $export = _dereq_(33);
-var $asinh = Math.asinh;
-
-function asinh(x) {
- return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
-}
-
-// Tor Browser bug: Math.asinh(0) -> -0
-$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
-
-},{"33":33}],163:[function(_dereq_,module,exports){
-// 20.2.2.7 Math.atanh(x)
-var $export = _dereq_(33);
-var $atanh = Math.atanh;
-
-// Tor Browser bug: Math.atanh(-0) -> 0
-$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
- atanh: function atanh(x) {
- return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
- }
-});
-
-},{"33":33}],164:[function(_dereq_,module,exports){
-// 20.2.2.9 Math.cbrt(x)
-var $export = _dereq_(33);
-var sign = _dereq_(65);
-
-$export($export.S, 'Math', {
- cbrt: function cbrt(x) {
- return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
- }
-});
-
-},{"33":33,"65":65}],165:[function(_dereq_,module,exports){
-// 20.2.2.11 Math.clz32(x)
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- clz32: function clz32(x) {
- return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
- }
-});
-
-},{"33":33}],166:[function(_dereq_,module,exports){
-// 20.2.2.12 Math.cosh(x)
-var $export = _dereq_(33);
-var exp = Math.exp;
-
-$export($export.S, 'Math', {
- cosh: function cosh(x) {
- return (exp(x = +x) + exp(-x)) / 2;
- }
-});
-
-},{"33":33}],167:[function(_dereq_,module,exports){
-// 20.2.2.14 Math.expm1(x)
-var $export = _dereq_(33);
-var $expm1 = _dereq_(61);
-
-$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
-
-},{"33":33,"61":61}],168:[function(_dereq_,module,exports){
-// 20.2.2.16 Math.fround(x)
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', { fround: _dereq_(62) });
-
-},{"33":33,"62":62}],169:[function(_dereq_,module,exports){
-// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
-var $export = _dereq_(33);
-var abs = Math.abs;
-
-$export($export.S, 'Math', {
- hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
- var sum = 0;
- var i = 0;
- var aLen = arguments.length;
- var larg = 0;
- var arg, div;
- while (i < aLen) {
- arg = abs(arguments[i++]);
- if (larg < arg) {
- div = larg / arg;
- sum = sum * div * div + 1;
- larg = arg;
- } else if (arg > 0) {
- div = arg / larg;
- sum += div * div;
- } else sum += arg;
- }
- return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
- }
-});
-
-},{"33":33}],170:[function(_dereq_,module,exports){
-// 20.2.2.18 Math.imul(x, y)
-var $export = _dereq_(33);
-var $imul = Math.imul;
-
-// some WebKit versions fails with big numbers, some has wrong arity
-$export($export.S + $export.F * _dereq_(35)(function () {
- return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
-}), 'Math', {
- imul: function imul(x, y) {
- var UINT16 = 0xffff;
- var xn = +x;
- var yn = +y;
- var xl = UINT16 & xn;
- var yl = UINT16 & yn;
- return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
- }
-});
-
-},{"33":33,"35":35}],171:[function(_dereq_,module,exports){
-// 20.2.2.21 Math.log10(x)
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- log10: function log10(x) {
- return Math.log(x) * Math.LOG10E;
- }
-});
-
-},{"33":33}],172:[function(_dereq_,module,exports){
-// 20.2.2.20 Math.log1p(x)
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', { log1p: _dereq_(63) });
-
-},{"33":33,"63":63}],173:[function(_dereq_,module,exports){
-// 20.2.2.22 Math.log2(x)
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- log2: function log2(x) {
- return Math.log(x) / Math.LN2;
- }
-});
-
-},{"33":33}],174:[function(_dereq_,module,exports){
-// 20.2.2.28 Math.sign(x)
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', { sign: _dereq_(65) });
-
-},{"33":33,"65":65}],175:[function(_dereq_,module,exports){
-// 20.2.2.30 Math.sinh(x)
-var $export = _dereq_(33);
-var expm1 = _dereq_(61);
-var exp = Math.exp;
-
-// V8 near Chromium 38 has a problem with very small numbers
-$export($export.S + $export.F * _dereq_(35)(function () {
- return !Math.sinh(-2e-17) != -2e-17;
-}), 'Math', {
- sinh: function sinh(x) {
- return Math.abs(x = +x) < 1
- ? (expm1(x) - expm1(-x)) / 2
- : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
- }
-});
-
-},{"33":33,"35":35,"61":61}],176:[function(_dereq_,module,exports){
-// 20.2.2.33 Math.tanh(x)
-var $export = _dereq_(33);
-var expm1 = _dereq_(61);
-var exp = Math.exp;
-
-$export($export.S, 'Math', {
- tanh: function tanh(x) {
- var a = expm1(x = +x);
- var b = expm1(-x);
- return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
- }
-});
-
-},{"33":33,"61":61}],177:[function(_dereq_,module,exports){
-// 20.2.2.34 Math.trunc(x)
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- trunc: function trunc(it) {
- return (it > 0 ? Math.floor : Math.ceil)(it);
- }
-});
-
-},{"33":33}],178:[function(_dereq_,module,exports){
-'use strict';
-var global = _dereq_(40);
-var has = _dereq_(41);
-var cof = _dereq_(18);
-var inheritIfRequired = _dereq_(45);
-var toPrimitive = _dereq_(120);
-var fails = _dereq_(35);
-var gOPN = _dereq_(77).f;
-var gOPD = _dereq_(75).f;
-var dP = _dereq_(72).f;
-var $trim = _dereq_(111).trim;
-var NUMBER = 'Number';
-var $Number = global[NUMBER];
-var Base = $Number;
-var proto = $Number.prototype;
-// Opera ~12 has broken Object#toString
-var BROKEN_COF = cof(_dereq_(71)(proto)) == NUMBER;
-var TRIM = 'trim' in String.prototype;
-
-// 7.1.3 ToNumber(argument)
-var toNumber = function (argument) {
- var it = toPrimitive(argument, false);
- if (typeof it == 'string' && it.length > 2) {
- it = TRIM ? it.trim() : $trim(it, 3);
- var first = it.charCodeAt(0);
- var third, radix, maxCode;
- if (first === 43 || first === 45) {
- third = it.charCodeAt(2);
- if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
- } else if (first === 48) {
- switch (it.charCodeAt(1)) {
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
- default: return +it;
- }
- for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
- code = digits.charCodeAt(i);
- // parseInt parses a string to a first unavailable symbol
- // but ToNumber should return NaN if a string contains unavailable symbols
- if (code < 48 || code > maxCode) return NaN;
- } return parseInt(digits, radix);
- }
- } return +it;
-};
-
-if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
- $Number = function Number(value) {
- var it = arguments.length < 1 ? 0 : value;
- var that = this;
- return that instanceof $Number
- // check on 1..constructor(foo) case
- && (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
- ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
- };
- for (var keys = _dereq_(29) ? gOPN(Base) : (
- // ES3:
- 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
- // ES6 (in case, if modules with ES6 Number statics required before):
- 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
- 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
- ).split(','), j = 0, key; keys.length > j; j++) {
- if (has(Base, key = keys[j]) && !has($Number, key)) {
- dP($Number, key, gOPD(Base, key));
- }
- }
- $Number.prototype = proto;
- proto.constructor = $Number;
- _dereq_(94)(global, NUMBER, $Number);
-}
-
-},{"111":111,"120":120,"18":18,"29":29,"35":35,"40":40,"41":41,"45":45,"71":71,"72":72,"75":75,"77":77,"94":94}],179:[function(_dereq_,module,exports){
-// 20.1.2.1 Number.EPSILON
-var $export = _dereq_(33);
-
-$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
-
-},{"33":33}],180:[function(_dereq_,module,exports){
-// 20.1.2.2 Number.isFinite(number)
-var $export = _dereq_(33);
-var _isFinite = _dereq_(40).isFinite;
-
-$export($export.S, 'Number', {
- isFinite: function isFinite(it) {
- return typeof it == 'number' && _isFinite(it);
- }
-});
-
-},{"33":33,"40":40}],181:[function(_dereq_,module,exports){
-// 20.1.2.3 Number.isInteger(number)
-var $export = _dereq_(33);
-
-$export($export.S, 'Number', { isInteger: _dereq_(50) });
-
-},{"33":33,"50":50}],182:[function(_dereq_,module,exports){
-// 20.1.2.4 Number.isNaN(number)
-var $export = _dereq_(33);
-
-$export($export.S, 'Number', {
- isNaN: function isNaN(number) {
- // eslint-disable-next-line no-self-compare
- return number != number;
- }
-});
-
-},{"33":33}],183:[function(_dereq_,module,exports){
-// 20.1.2.5 Number.isSafeInteger(number)
-var $export = _dereq_(33);
-var isInteger = _dereq_(50);
-var abs = Math.abs;
-
-$export($export.S, 'Number', {
- isSafeInteger: function isSafeInteger(number) {
- return isInteger(number) && abs(number) <= 0x1fffffffffffff;
- }
-});
-
-},{"33":33,"50":50}],184:[function(_dereq_,module,exports){
-// 20.1.2.6 Number.MAX_SAFE_INTEGER
-var $export = _dereq_(33);
-
-$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
-
-},{"33":33}],185:[function(_dereq_,module,exports){
-// 20.1.2.10 Number.MIN_SAFE_INTEGER
-var $export = _dereq_(33);
-
-$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
-
-},{"33":33}],186:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var $parseFloat = _dereq_(86);
-// 20.1.2.12 Number.parseFloat(string)
-$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
-
-},{"33":33,"86":86}],187:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var $parseInt = _dereq_(87);
-// 20.1.2.13 Number.parseInt(string, radix)
-$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
-
-},{"33":33,"87":87}],188:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var toInteger = _dereq_(116);
-var aNumberValue = _dereq_(4);
-var repeat = _dereq_(110);
-var $toFixed = 1.0.toFixed;
-var floor = Math.floor;
-var data = [0, 0, 0, 0, 0, 0];
-var ERROR = 'Number.toFixed: incorrect invocation!';
-var ZERO = '0';
-
-var multiply = function (n, c) {
- var i = -1;
- var c2 = c;
- while (++i < 6) {
- c2 += n * data[i];
- data[i] = c2 % 1e7;
- c2 = floor(c2 / 1e7);
- }
-};
-var divide = function (n) {
- var i = 6;
- var c = 0;
- while (--i >= 0) {
- c += data[i];
- data[i] = floor(c / n);
- c = (c % n) * 1e7;
- }
-};
-var numToString = function () {
- var i = 6;
- var s = '';
- while (--i >= 0) {
- if (s !== '' || i === 0 || data[i] !== 0) {
- var t = String(data[i]);
- s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
- }
- } return s;
-};
-var pow = function (x, n, acc) {
- return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
-};
-var log = function (x) {
- var n = 0;
- var x2 = x;
- while (x2 >= 4096) {
- n += 12;
- x2 /= 4096;
- }
- while (x2 >= 2) {
- n += 1;
- x2 /= 2;
- } return n;
-};
-
-$export($export.P + $export.F * (!!$toFixed && (
- 0.00008.toFixed(3) !== '0.000' ||
- 0.9.toFixed(0) !== '1' ||
- 1.255.toFixed(2) !== '1.25' ||
- 1000000000000000128.0.toFixed(0) !== '1000000000000000128'
-) || !_dereq_(35)(function () {
- // V8 ~ Android 4.3-
- $toFixed.call({});
-})), 'Number', {
- toFixed: function toFixed(fractionDigits) {
- var x = aNumberValue(this, ERROR);
- var f = toInteger(fractionDigits);
- var s = '';
- var m = ZERO;
- var e, z, j, k;
- if (f < 0 || f > 20) throw RangeError(ERROR);
- // eslint-disable-next-line no-self-compare
- if (x != x) return 'NaN';
- if (x <= -1e21 || x >= 1e21) return String(x);
- if (x < 0) {
- s = '-';
- x = -x;
- }
- if (x > 1e-21) {
- e = log(x * pow(2, 69, 1)) - 69;
- z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
- z *= 0x10000000000000;
- e = 52 - e;
- if (e > 0) {
- multiply(0, z);
- j = f;
- while (j >= 7) {
- multiply(1e7, 0);
- j -= 7;
- }
- multiply(pow(10, j, 1), 0);
- j = e - 1;
- while (j >= 23) {
- divide(1 << 23);
- j -= 23;
- }
- divide(1 << j);
- multiply(1, 1);
- divide(2);
- m = numToString();
- } else {
- multiply(0, z);
- multiply(1 << -e, 0);
- m = numToString() + repeat.call(ZERO, f);
- }
- }
- if (f > 0) {
- k = m.length;
- m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
- } else {
- m = s + m;
- } return m;
- }
-});
-
-},{"110":110,"116":116,"33":33,"35":35,"4":4}],189:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $fails = _dereq_(35);
-var aNumberValue = _dereq_(4);
-var $toPrecision = 1.0.toPrecision;
-
-$export($export.P + $export.F * ($fails(function () {
- // IE7-
- return $toPrecision.call(1, undefined) !== '1';
-}) || !$fails(function () {
- // V8 ~ Android 4.3-
- $toPrecision.call({});
-})), 'Number', {
- toPrecision: function toPrecision(precision) {
- var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
- return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
- }
-});
-
-},{"33":33,"35":35,"4":4}],190:[function(_dereq_,module,exports){
-// 19.1.3.1 Object.assign(target, source)
-var $export = _dereq_(33);
-
-$export($export.S + $export.F, 'Object', { assign: _dereq_(70) });
-
-},{"33":33,"70":70}],191:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
-$export($export.S, 'Object', { create: _dereq_(71) });
-
-},{"33":33,"71":71}],192:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
-$export($export.S + $export.F * !_dereq_(29), 'Object', { defineProperties: _dereq_(73) });
-
-},{"29":29,"33":33,"73":73}],193:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
-$export($export.S + $export.F * !_dereq_(29), 'Object', { defineProperty: _dereq_(72).f });
-
-},{"29":29,"33":33,"72":72}],194:[function(_dereq_,module,exports){
-// 19.1.2.5 Object.freeze(O)
-var isObject = _dereq_(51);
-var meta = _dereq_(66).onFreeze;
-
-_dereq_(83)('freeze', function ($freeze) {
- return function freeze(it) {
- return $freeze && isObject(it) ? $freeze(meta(it)) : it;
- };
-});
-
-},{"51":51,"66":66,"83":83}],195:[function(_dereq_,module,exports){
-// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
-var toIObject = _dereq_(117);
-var $getOwnPropertyDescriptor = _dereq_(75).f;
-
-_dereq_(83)('getOwnPropertyDescriptor', function () {
- return function getOwnPropertyDescriptor(it, key) {
- return $getOwnPropertyDescriptor(toIObject(it), key);
- };
-});
-
-},{"117":117,"75":75,"83":83}],196:[function(_dereq_,module,exports){
-// 19.1.2.7 Object.getOwnPropertyNames(O)
-_dereq_(83)('getOwnPropertyNames', function () {
- return _dereq_(76).f;
-});
-
-},{"76":76,"83":83}],197:[function(_dereq_,module,exports){
-// 19.1.2.9 Object.getPrototypeOf(O)
-var toObject = _dereq_(119);
-var $getPrototypeOf = _dereq_(79);
-
-_dereq_(83)('getPrototypeOf', function () {
- return function getPrototypeOf(it) {
- return $getPrototypeOf(toObject(it));
- };
-});
-
-},{"119":119,"79":79,"83":83}],198:[function(_dereq_,module,exports){
-// 19.1.2.11 Object.isExtensible(O)
-var isObject = _dereq_(51);
-
-_dereq_(83)('isExtensible', function ($isExtensible) {
- return function isExtensible(it) {
- return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
- };
-});
-
-},{"51":51,"83":83}],199:[function(_dereq_,module,exports){
-// 19.1.2.12 Object.isFrozen(O)
-var isObject = _dereq_(51);
-
-_dereq_(83)('isFrozen', function ($isFrozen) {
- return function isFrozen(it) {
- return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
- };
-});
-
-},{"51":51,"83":83}],200:[function(_dereq_,module,exports){
-// 19.1.2.13 Object.isSealed(O)
-var isObject = _dereq_(51);
-
-_dereq_(83)('isSealed', function ($isSealed) {
- return function isSealed(it) {
- return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
- };
-});
-
-},{"51":51,"83":83}],201:[function(_dereq_,module,exports){
-// 19.1.3.10 Object.is(value1, value2)
-var $export = _dereq_(33);
-$export($export.S, 'Object', { is: _dereq_(96) });
-
-},{"33":33,"96":96}],202:[function(_dereq_,module,exports){
-// 19.1.2.14 Object.keys(O)
-var toObject = _dereq_(119);
-var $keys = _dereq_(81);
-
-_dereq_(83)('keys', function () {
- return function keys(it) {
- return $keys(toObject(it));
- };
-});
-
-},{"119":119,"81":81,"83":83}],203:[function(_dereq_,module,exports){
-// 19.1.2.15 Object.preventExtensions(O)
-var isObject = _dereq_(51);
-var meta = _dereq_(66).onFreeze;
-
-_dereq_(83)('preventExtensions', function ($preventExtensions) {
- return function preventExtensions(it) {
- return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
- };
-});
-
-},{"51":51,"66":66,"83":83}],204:[function(_dereq_,module,exports){
-// 19.1.2.17 Object.seal(O)
-var isObject = _dereq_(51);
-var meta = _dereq_(66).onFreeze;
-
-_dereq_(83)('seal', function ($seal) {
- return function seal(it) {
- return $seal && isObject(it) ? $seal(meta(it)) : it;
- };
-});
-
-},{"51":51,"66":66,"83":83}],205:[function(_dereq_,module,exports){
-// 19.1.3.19 Object.setPrototypeOf(O, proto)
-var $export = _dereq_(33);
-$export($export.S, 'Object', { setPrototypeOf: _dereq_(99).set });
-
-},{"33":33,"99":99}],206:[function(_dereq_,module,exports){
-'use strict';
-// 19.1.3.6 Object.prototype.toString()
-var classof = _dereq_(17);
-var test = {};
-test[_dereq_(128)('toStringTag')] = 'z';
-if (test + '' != '[object z]') {
- _dereq_(94)(Object.prototype, 'toString', function toString() {
- return '[object ' + classof(this) + ']';
- }, true);
-}
-
-},{"128":128,"17":17,"94":94}],207:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var $parseFloat = _dereq_(86);
-// 18.2.4 parseFloat(string)
-$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
-
-},{"33":33,"86":86}],208:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var $parseInt = _dereq_(87);
-// 18.2.5 parseInt(string, radix)
-$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
-
-},{"33":33,"87":87}],209:[function(_dereq_,module,exports){
-'use strict';
-var LIBRARY = _dereq_(60);
-var global = _dereq_(40);
-var ctx = _dereq_(25);
-var classof = _dereq_(17);
-var $export = _dereq_(33);
-var isObject = _dereq_(51);
-var aFunction = _dereq_(3);
-var anInstance = _dereq_(6);
-var forOf = _dereq_(39);
-var speciesConstructor = _dereq_(104);
-var task = _dereq_(113).set;
-var microtask = _dereq_(68)();
-var newPromiseCapabilityModule = _dereq_(69);
-var perform = _dereq_(90);
-var promiseResolve = _dereq_(91);
-var PROMISE = 'Promise';
-var TypeError = global.TypeError;
-var process = global.process;
-var $Promise = global[PROMISE];
-var isNode = classof(process) == 'process';
-var empty = function () { /* empty */ };
-var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
-var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
-
-var USE_NATIVE = !!function () {
- try {
- // correct subclassing with @@species support
- var promise = $Promise.resolve(1);
- var FakePromise = (promise.constructor = {})[_dereq_(128)('species')] = function (exec) {
- exec(empty, empty);
- };
- // unhandled rejections tracking support, NodeJS Promise without it fails @@species test
- return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise;
- } catch (e) { /* empty */ }
-}();
-
-// helpers
-var sameConstructor = LIBRARY ? function (a, b) {
- // with library wrapper special case
- return a === b || a === $Promise && b === Wrapper;
-} : function (a, b) {
- return a === b;
-};
-var isThenable = function (it) {
- var then;
- return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
-};
-var notify = function (promise, isReject) {
- if (promise._n) return;
- promise._n = true;
- var chain = promise._c;
- microtask(function () {
- var value = promise._v;
- var ok = promise._s == 1;
- var i = 0;
- var run = function (reaction) {
- var handler = ok ? reaction.ok : reaction.fail;
- var resolve = reaction.resolve;
- var reject = reaction.reject;
- var domain = reaction.domain;
- var result, then;
- try {
- if (handler) {
- if (!ok) {
- if (promise._h == 2) onHandleUnhandled(promise);
- promise._h = 1;
- }
- if (handler === true) result = value;
- else {
- if (domain) domain.enter();
- result = handler(value);
- if (domain) domain.exit();
- }
- if (result === reaction.promise) {
- reject(TypeError('Promise-chain cycle'));
- } else if (then = isThenable(result)) {
- then.call(result, resolve, reject);
- } else resolve(result);
- } else reject(value);
- } catch (e) {
- reject(e);
- }
- };
- while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
- promise._c = [];
- promise._n = false;
- if (isReject && !promise._h) onUnhandled(promise);
- });
-};
-var onUnhandled = function (promise) {
- task.call(global, function () {
- var value = promise._v;
- var unhandled = isUnhandled(promise);
- var result, handler, console;
- if (unhandled) {
- result = perform(function () {
- if (isNode) {
- process.emit('unhandledRejection', value, promise);
- } else if (handler = global.onunhandledrejection) {
- handler({ promise: promise, reason: value });
- } else if ((console = global.console) && console.error) {
- console.error('Unhandled promise rejection', value);
- }
- });
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
- promise._h = isNode || isUnhandled(promise) ? 2 : 1;
- } promise._a = undefined;
- if (unhandled && result.e) throw result.v;
- });
-};
-var isUnhandled = function (promise) {
- if (promise._h == 1) return false;
- var chain = promise._a || promise._c;
- var i = 0;
- var reaction;
- while (chain.length > i) {
- reaction = chain[i++];
- if (reaction.fail || !isUnhandled(reaction.promise)) return false;
- } return true;
-};
-var onHandleUnhandled = function (promise) {
- task.call(global, function () {
- var handler;
- if (isNode) {
- process.emit('rejectionHandled', promise);
- } else if (handler = global.onrejectionhandled) {
- handler({ promise: promise, reason: promise._v });
- }
- });
-};
-var $reject = function (value) {
- var promise = this;
- if (promise._d) return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- promise._v = value;
- promise._s = 2;
- if (!promise._a) promise._a = promise._c.slice();
- notify(promise, true);
-};
-var $resolve = function (value) {
- var promise = this;
- var then;
- if (promise._d) return;
- promise._d = true;
- promise = promise._w || promise; // unwrap
- try {
- if (promise === value) throw TypeError("Promise can't be resolved itself");
- if (then = isThenable(value)) {
- microtask(function () {
- var wrapper = { _w: promise, _d: false }; // wrap
- try {
- then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
- } catch (e) {
- $reject.call(wrapper, e);
- }
- });
- } else {
- promise._v = value;
- promise._s = 1;
- notify(promise, false);
- }
- } catch (e) {
- $reject.call({ _w: promise, _d: false }, e); // wrap
- }
-};
-
-// constructor polyfill
-if (!USE_NATIVE) {
- // 25.4.3.1 Promise(executor)
- $Promise = function Promise(executor) {
- anInstance(this, $Promise, PROMISE, '_h');
- aFunction(executor);
- Internal.call(this);
- try {
- executor(ctx($resolve, this, 1), ctx($reject, this, 1));
- } catch (err) {
- $reject.call(this, err);
- }
- };
- // eslint-disable-next-line no-unused-vars
- Internal = function Promise(executor) {
- this._c = []; // <- awaiting reactions
- this._a = undefined; // <- checked in isUnhandled reactions
- this._s = 0; // <- state
- this._d = false; // <- done
- this._v = undefined; // <- value
- this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
- this._n = false; // <- notify
- };
- Internal.prototype = _dereq_(93)($Promise.prototype, {
- // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
- then: function then(onFulfilled, onRejected) {
- var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
- reaction.fail = typeof onRejected == 'function' && onRejected;
- reaction.domain = isNode ? process.domain : undefined;
- this._c.push(reaction);
- if (this._a) this._a.push(reaction);
- if (this._s) notify(this, false);
- return reaction.promise;
- },
- // 25.4.5.1 Promise.prototype.catch(onRejected)
- 'catch': function (onRejected) {
- return this.then(undefined, onRejected);
- }
- });
- OwnPromiseCapability = function () {
- var promise = new Internal();
- this.promise = promise;
- this.resolve = ctx($resolve, promise, 1);
- this.reject = ctx($reject, promise, 1);
- };
- newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
- return sameConstructor($Promise, C)
- ? new OwnPromiseCapability(C)
- : newGenericPromiseCapability(C);
- };
-}
-
-$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
-_dereq_(101)($Promise, PROMISE);
-_dereq_(100)(PROMISE);
-Wrapper = _dereq_(23)[PROMISE];
-
-// statics
-$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
- // 25.4.4.5 Promise.reject(r)
- reject: function reject(r) {
- var capability = newPromiseCapability(this);
- var $$reject = capability.reject;
- $$reject(r);
- return capability.promise;
- }
-});
-$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
- // 25.4.4.6 Promise.resolve(x)
- resolve: function resolve(x) {
- // instanceof instead of internal slot check because we should fix it without replacement native Promise core
- if (x instanceof $Promise && sameConstructor(x.constructor, this)) return x;
- return promiseResolve(this, x);
- }
-});
-$export($export.S + $export.F * !(USE_NATIVE && _dereq_(56)(function (iter) {
- $Promise.all(iter)['catch'](empty);
-})), PROMISE, {
- // 25.4.4.1 Promise.all(iterable)
- all: function all(iterable) {
- var C = this;
- var capability = newPromiseCapability(C);
- var resolve = capability.resolve;
- var reject = capability.reject;
- var result = perform(function () {
- var values = [];
- var index = 0;
- var remaining = 1;
- forOf(iterable, false, function (promise) {
- var $index = index++;
- var alreadyCalled = false;
- values.push(undefined);
- remaining++;
- C.resolve(promise).then(function (value) {
- if (alreadyCalled) return;
- alreadyCalled = true;
- values[$index] = value;
- --remaining || resolve(values);
- }, reject);
- });
- --remaining || resolve(values);
- });
- if (result.e) reject(result.v);
- return capability.promise;
- },
- // 25.4.4.4 Promise.race(iterable)
- race: function race(iterable) {
- var C = this;
- var capability = newPromiseCapability(C);
- var reject = capability.reject;
- var result = perform(function () {
- forOf(iterable, false, function (promise) {
- C.resolve(promise).then(capability.resolve, reject);
- });
- });
- if (result.e) reject(result.v);
- return capability.promise;
- }
-});
-
-},{"100":100,"101":101,"104":104,"113":113,"128":128,"17":17,"23":23,"25":25,"3":3,"33":33,"39":39,"40":40,"51":51,"56":56,"6":6,"60":60,"68":68,"69":69,"90":90,"91":91,"93":93}],210:[function(_dereq_,module,exports){
-// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
-var $export = _dereq_(33);
-var aFunction = _dereq_(3);
-var anObject = _dereq_(7);
-var rApply = (_dereq_(40).Reflect || {}).apply;
-var fApply = Function.apply;
-// MS Edge argumentsList argument is optional
-$export($export.S + $export.F * !_dereq_(35)(function () {
- rApply(function () { /* empty */ });
-}), 'Reflect', {
- apply: function apply(target, thisArgument, argumentsList) {
- var T = aFunction(target);
- var L = anObject(argumentsList);
- return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
- }
-});
-
-},{"3":3,"33":33,"35":35,"40":40,"7":7}],211:[function(_dereq_,module,exports){
-// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
-var $export = _dereq_(33);
-var create = _dereq_(71);
-var aFunction = _dereq_(3);
-var anObject = _dereq_(7);
-var isObject = _dereq_(51);
-var fails = _dereq_(35);
-var bind = _dereq_(16);
-var rConstruct = (_dereq_(40).Reflect || {}).construct;
-
-// MS Edge supports only 2 arguments and argumentsList argument is optional
-// FF Nightly sets third argument as `new.target`, but does not create `this` from it
-var NEW_TARGET_BUG = fails(function () {
- function F() { /* empty */ }
- return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
-});
-var ARGS_BUG = !fails(function () {
- rConstruct(function () { /* empty */ });
-});
-
-$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
- construct: function construct(Target, args /* , newTarget */) {
- aFunction(Target);
- anObject(args);
- var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
- if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
- if (Target == newTarget) {
- // w/o altered newTarget, optimization for 0-4 arguments
- switch (args.length) {
- case 0: return new Target();
- case 1: return new Target(args[0]);
- case 2: return new Target(args[0], args[1]);
- case 3: return new Target(args[0], args[1], args[2]);
- case 4: return new Target(args[0], args[1], args[2], args[3]);
- }
- // w/o altered newTarget, lot of arguments case
- var $args = [null];
- $args.push.apply($args, args);
- return new (bind.apply(Target, $args))();
- }
- // with altered newTarget, not support built-in constructors
- var proto = newTarget.prototype;
- var instance = create(isObject(proto) ? proto : Object.prototype);
- var result = Function.apply.call(Target, instance, args);
- return isObject(result) ? result : instance;
- }
-});
-
-},{"16":16,"3":3,"33":33,"35":35,"40":40,"51":51,"7":7,"71":71}],212:[function(_dereq_,module,exports){
-// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
-var dP = _dereq_(72);
-var $export = _dereq_(33);
-var anObject = _dereq_(7);
-var toPrimitive = _dereq_(120);
-
-// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
-$export($export.S + $export.F * _dereq_(35)(function () {
- // eslint-disable-next-line no-undef
- Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
-}), 'Reflect', {
- defineProperty: function defineProperty(target, propertyKey, attributes) {
- anObject(target);
- propertyKey = toPrimitive(propertyKey, true);
- anObject(attributes);
- try {
- dP.f(target, propertyKey, attributes);
- return true;
- } catch (e) {
- return false;
- }
- }
-});
-
-},{"120":120,"33":33,"35":35,"7":7,"72":72}],213:[function(_dereq_,module,exports){
-// 26.1.4 Reflect.deleteProperty(target, propertyKey)
-var $export = _dereq_(33);
-var gOPD = _dereq_(75).f;
-var anObject = _dereq_(7);
-
-$export($export.S, 'Reflect', {
- deleteProperty: function deleteProperty(target, propertyKey) {
- var desc = gOPD(anObject(target), propertyKey);
- return desc && !desc.configurable ? false : delete target[propertyKey];
- }
-});
-
-},{"33":33,"7":7,"75":75}],214:[function(_dereq_,module,exports){
-'use strict';
-// 26.1.5 Reflect.enumerate(target)
-var $export = _dereq_(33);
-var anObject = _dereq_(7);
-var Enumerate = function (iterated) {
- this._t = anObject(iterated); // target
- this._i = 0; // next index
- var keys = this._k = []; // keys
- var key;
- for (key in iterated) keys.push(key);
-};
-_dereq_(54)(Enumerate, 'Object', function () {
- var that = this;
- var keys = that._k;
- var key;
- do {
- if (that._i >= keys.length) return { value: undefined, done: true };
- } while (!((key = keys[that._i++]) in that._t));
- return { value: key, done: false };
-});
-
-$export($export.S, 'Reflect', {
- enumerate: function enumerate(target) {
- return new Enumerate(target);
- }
-});
-
-},{"33":33,"54":54,"7":7}],215:[function(_dereq_,module,exports){
-// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
-var gOPD = _dereq_(75);
-var $export = _dereq_(33);
-var anObject = _dereq_(7);
-
-$export($export.S, 'Reflect', {
- getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
- return gOPD.f(anObject(target), propertyKey);
- }
-});
-
-},{"33":33,"7":7,"75":75}],216:[function(_dereq_,module,exports){
-// 26.1.8 Reflect.getPrototypeOf(target)
-var $export = _dereq_(33);
-var getProto = _dereq_(79);
-var anObject = _dereq_(7);
-
-$export($export.S, 'Reflect', {
- getPrototypeOf: function getPrototypeOf(target) {
- return getProto(anObject(target));
- }
-});
-
-},{"33":33,"7":7,"79":79}],217:[function(_dereq_,module,exports){
-// 26.1.6 Reflect.get(target, propertyKey [, receiver])
-var gOPD = _dereq_(75);
-var getPrototypeOf = _dereq_(79);
-var has = _dereq_(41);
-var $export = _dereq_(33);
-var isObject = _dereq_(51);
-var anObject = _dereq_(7);
-
-function get(target, propertyKey /* , receiver */) {
- var receiver = arguments.length < 3 ? target : arguments[2];
- var desc, proto;
- if (anObject(target) === receiver) return target[propertyKey];
- if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
- ? desc.value
- : desc.get !== undefined
- ? desc.get.call(receiver)
- : undefined;
- if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
-}
-
-$export($export.S, 'Reflect', { get: get });
-
-},{"33":33,"41":41,"51":51,"7":7,"75":75,"79":79}],218:[function(_dereq_,module,exports){
-// 26.1.9 Reflect.has(target, propertyKey)
-var $export = _dereq_(33);
-
-$export($export.S, 'Reflect', {
- has: function has(target, propertyKey) {
- return propertyKey in target;
- }
-});
-
-},{"33":33}],219:[function(_dereq_,module,exports){
-// 26.1.10 Reflect.isExtensible(target)
-var $export = _dereq_(33);
-var anObject = _dereq_(7);
-var $isExtensible = Object.isExtensible;
-
-$export($export.S, 'Reflect', {
- isExtensible: function isExtensible(target) {
- anObject(target);
- return $isExtensible ? $isExtensible(target) : true;
- }
-});
-
-},{"33":33,"7":7}],220:[function(_dereq_,module,exports){
-// 26.1.11 Reflect.ownKeys(target)
-var $export = _dereq_(33);
-
-$export($export.S, 'Reflect', { ownKeys: _dereq_(85) });
-
-},{"33":33,"85":85}],221:[function(_dereq_,module,exports){
-// 26.1.12 Reflect.preventExtensions(target)
-var $export = _dereq_(33);
-var anObject = _dereq_(7);
-var $preventExtensions = Object.preventExtensions;
-
-$export($export.S, 'Reflect', {
- preventExtensions: function preventExtensions(target) {
- anObject(target);
- try {
- if ($preventExtensions) $preventExtensions(target);
- return true;
- } catch (e) {
- return false;
- }
- }
-});
-
-},{"33":33,"7":7}],222:[function(_dereq_,module,exports){
-// 26.1.14 Reflect.setPrototypeOf(target, proto)
-var $export = _dereq_(33);
-var setProto = _dereq_(99);
-
-if (setProto) $export($export.S, 'Reflect', {
- setPrototypeOf: function setPrototypeOf(target, proto) {
- setProto.check(target, proto);
- try {
- setProto.set(target, proto);
- return true;
- } catch (e) {
- return false;
- }
- }
-});
-
-},{"33":33,"99":99}],223:[function(_dereq_,module,exports){
-// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
-var dP = _dereq_(72);
-var gOPD = _dereq_(75);
-var getPrototypeOf = _dereq_(79);
-var has = _dereq_(41);
-var $export = _dereq_(33);
-var createDesc = _dereq_(92);
-var anObject = _dereq_(7);
-var isObject = _dereq_(51);
-
-function set(target, propertyKey, V /* , receiver */) {
- var receiver = arguments.length < 4 ? target : arguments[3];
- var ownDesc = gOPD.f(anObject(target), propertyKey);
- var existingDescriptor, proto;
- if (!ownDesc) {
- if (isObject(proto = getPrototypeOf(target))) {
- return set(proto, propertyKey, V, receiver);
- }
- ownDesc = createDesc(0);
- }
- if (has(ownDesc, 'value')) {
- if (ownDesc.writable === false || !isObject(receiver)) return false;
- existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0);
- existingDescriptor.value = V;
- dP.f(receiver, propertyKey, existingDescriptor);
- return true;
- }
- return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
-}
-
-$export($export.S, 'Reflect', { set: set });
-
-},{"33":33,"41":41,"51":51,"7":7,"72":72,"75":75,"79":79,"92":92}],224:[function(_dereq_,module,exports){
-var global = _dereq_(40);
-var inheritIfRequired = _dereq_(45);
-var dP = _dereq_(72).f;
-var gOPN = _dereq_(77).f;
-var isRegExp = _dereq_(52);
-var $flags = _dereq_(37);
-var $RegExp = global.RegExp;
-var Base = $RegExp;
-var proto = $RegExp.prototype;
-var re1 = /a/g;
-var re2 = /a/g;
-// "new" creates a new object, old webkit buggy here
-var CORRECT_NEW = new $RegExp(re1) !== re1;
-
-if (_dereq_(29) && (!CORRECT_NEW || _dereq_(35)(function () {
- re2[_dereq_(128)('match')] = false;
- // RegExp constructor can alter flags and IsRegExp works correct with @@match
- return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
-}))) {
- $RegExp = function RegExp(p, f) {
- var tiRE = this instanceof $RegExp;
- var piRE = isRegExp(p);
- var fiU = f === undefined;
- return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
- : inheritIfRequired(CORRECT_NEW
- ? new Base(piRE && !fiU ? p.source : p, f)
- : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
- , tiRE ? this : proto, $RegExp);
- };
- var proxy = function (key) {
- key in $RegExp || dP($RegExp, key, {
- configurable: true,
- get: function () { return Base[key]; },
- set: function (it) { Base[key] = it; }
- });
- };
- for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
- proto.constructor = $RegExp;
- $RegExp.prototype = proto;
- _dereq_(94)(global, 'RegExp', $RegExp);
-}
-
-_dereq_(100)('RegExp');
-
-},{"100":100,"128":128,"29":29,"35":35,"37":37,"40":40,"45":45,"52":52,"72":72,"77":77,"94":94}],225:[function(_dereq_,module,exports){
-// 21.2.5.3 get RegExp.prototype.flags()
-if (_dereq_(29) && /./g.flags != 'g') _dereq_(72).f(RegExp.prototype, 'flags', {
- configurable: true,
- get: _dereq_(37)
-});
-
-},{"29":29,"37":37,"72":72}],226:[function(_dereq_,module,exports){
-// @@match logic
-_dereq_(36)('match', 1, function (defined, MATCH, $match) {
- // 21.1.3.11 String.prototype.match(regexp)
- return [function match(regexp) {
- 'use strict';
- var O = defined(this);
- var fn = regexp == undefined ? undefined : regexp[MATCH];
- return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
- }, $match];
-});
-
-},{"36":36}],227:[function(_dereq_,module,exports){
-// @@replace logic
-_dereq_(36)('replace', 2, function (defined, REPLACE, $replace) {
- // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)
- return [function replace(searchValue, replaceValue) {
- 'use strict';
- var O = defined(this);
- var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
- return fn !== undefined
- ? fn.call(searchValue, O, replaceValue)
- : $replace.call(String(O), searchValue, replaceValue);
- }, $replace];
-});
-
-},{"36":36}],228:[function(_dereq_,module,exports){
-// @@search logic
-_dereq_(36)('search', 1, function (defined, SEARCH, $search) {
- // 21.1.3.15 String.prototype.search(regexp)
- return [function search(regexp) {
- 'use strict';
- var O = defined(this);
- var fn = regexp == undefined ? undefined : regexp[SEARCH];
- return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
- }, $search];
-});
-
-},{"36":36}],229:[function(_dereq_,module,exports){
-// @@split logic
-_dereq_(36)('split', 2, function (defined, SPLIT, $split) {
- 'use strict';
- var isRegExp = _dereq_(52);
- var _split = $split;
- var $push = [].push;
- var $SPLIT = 'split';
- var LENGTH = 'length';
- var LAST_INDEX = 'lastIndex';
- if (
- 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
- 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
- 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
- '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
- '.'[$SPLIT](/()()/)[LENGTH] > 1 ||
- ''[$SPLIT](/.?/)[LENGTH]
- ) {
- var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group
- // based on es5-shim implementation, need to rework it
- $split = function (separator, limit) {
- var string = String(this);
- if (separator === undefined && limit === 0) return [];
- // If `separator` is not a regex, use native split
- if (!isRegExp(separator)) return _split.call(string, separator, limit);
- var output = [];
- var flags = (separator.ignoreCase ? 'i' : '') +
- (separator.multiline ? 'm' : '') +
- (separator.unicode ? 'u' : '') +
- (separator.sticky ? 'y' : '');
- var lastLastIndex = 0;
- var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
- // Make `global` and avoid `lastIndex` issues by working with a copy
- var separatorCopy = new RegExp(separator.source, flags + 'g');
- var separator2, match, lastIndex, lastLength, i;
- // Doesn't need flags gy, but they don't hurt
- if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags);
- while (match = separatorCopy.exec(string)) {
- // `separatorCopy.lastIndex` is not reliable cross-browser
- lastIndex = match.index + match[0][LENGTH];
- if (lastIndex > lastLastIndex) {
- output.push(string.slice(lastLastIndex, match.index));
- // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG
- // eslint-disable-next-line no-loop-func
- if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {
- for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;
- });
- if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
- lastLength = match[0][LENGTH];
- lastLastIndex = lastIndex;
- if (output[LENGTH] >= splitLimit) break;
- }
- if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
- }
- if (lastLastIndex === string[LENGTH]) {
- if (lastLength || !separatorCopy.test('')) output.push('');
- } else output.push(string.slice(lastLastIndex));
- return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
- };
- // Chakra, V8
- } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
- $split = function (separator, limit) {
- return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);
- };
- }
- // 21.1.3.17 String.prototype.split(separator, limit)
- return [function split(separator, limit) {
- var O = defined(this);
- var fn = separator == undefined ? undefined : separator[SPLIT];
- return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);
- }, $split];
-});
-
-},{"36":36,"52":52}],230:[function(_dereq_,module,exports){
-'use strict';
-_dereq_(225);
-var anObject = _dereq_(7);
-var $flags = _dereq_(37);
-var DESCRIPTORS = _dereq_(29);
-var TO_STRING = 'toString';
-var $toString = /./[TO_STRING];
-
-var define = function (fn) {
- _dereq_(94)(RegExp.prototype, TO_STRING, fn, true);
-};
-
-// 21.2.5.14 RegExp.prototype.toString()
-if (_dereq_(35)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
- define(function toString() {
- var R = anObject(this);
- return '/'.concat(R.source, '/',
- 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
- });
-// FF44- RegExp#toString has a wrong name
-} else if ($toString.name != TO_STRING) {
- define(function toString() {
- return $toString.call(this);
- });
-}
-
-},{"225":225,"29":29,"35":35,"37":37,"7":7,"94":94}],231:[function(_dereq_,module,exports){
-'use strict';
-var strong = _dereq_(19);
-var validate = _dereq_(125);
-var SET = 'Set';
-
-// 23.2 Set Objects
-module.exports = _dereq_(22)(SET, function (get) {
- return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
-}, {
- // 23.2.3.1 Set.prototype.add(value)
- add: function add(value) {
- return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
- }
-}, strong);
-
-},{"125":125,"19":19,"22":22}],232:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.2 String.prototype.anchor(name)
-_dereq_(108)('anchor', function (createHTML) {
- return function anchor(name) {
- return createHTML(this, 'a', 'name', name);
- };
-});
-
-},{"108":108}],233:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.3 String.prototype.big()
-_dereq_(108)('big', function (createHTML) {
- return function big() {
- return createHTML(this, 'big', '', '');
- };
-});
-
-},{"108":108}],234:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.4 String.prototype.blink()
-_dereq_(108)('blink', function (createHTML) {
- return function blink() {
- return createHTML(this, 'blink', '', '');
- };
-});
-
-},{"108":108}],235:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.5 String.prototype.bold()
-_dereq_(108)('bold', function (createHTML) {
- return function bold() {
- return createHTML(this, 'b', '', '');
- };
-});
-
-},{"108":108}],236:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $at = _dereq_(106)(false);
-$export($export.P, 'String', {
- // 21.1.3.3 String.prototype.codePointAt(pos)
- codePointAt: function codePointAt(pos) {
- return $at(this, pos);
- }
-});
-
-},{"106":106,"33":33}],237:[function(_dereq_,module,exports){
-// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
-'use strict';
-var $export = _dereq_(33);
-var toLength = _dereq_(118);
-var context = _dereq_(107);
-var ENDS_WITH = 'endsWith';
-var $endsWith = ''[ENDS_WITH];
-
-$export($export.P + $export.F * _dereq_(34)(ENDS_WITH), 'String', {
- endsWith: function endsWith(searchString /* , endPosition = @length */) {
- var that = context(this, searchString, ENDS_WITH);
- var endPosition = arguments.length > 1 ? arguments[1] : undefined;
- var len = toLength(that.length);
- var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
- var search = String(searchString);
- return $endsWith
- ? $endsWith.call(that, search, end)
- : that.slice(end - search.length, end) === search;
- }
-});
-
-},{"107":107,"118":118,"33":33,"34":34}],238:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.6 String.prototype.fixed()
-_dereq_(108)('fixed', function (createHTML) {
- return function fixed() {
- return createHTML(this, 'tt', '', '');
- };
-});
-
-},{"108":108}],239:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.7 String.prototype.fontcolor(color)
-_dereq_(108)('fontcolor', function (createHTML) {
- return function fontcolor(color) {
- return createHTML(this, 'font', 'color', color);
- };
-});
-
-},{"108":108}],240:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.8 String.prototype.fontsize(size)
-_dereq_(108)('fontsize', function (createHTML) {
- return function fontsize(size) {
- return createHTML(this, 'font', 'size', size);
- };
-});
-
-},{"108":108}],241:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var toAbsoluteIndex = _dereq_(114);
-var fromCharCode = String.fromCharCode;
-var $fromCodePoint = String.fromCodePoint;
-
-// length should be 1, old FF problem
-$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
- // 21.1.2.2 String.fromCodePoint(...codePoints)
- fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
- var res = [];
- var aLen = arguments.length;
- var i = 0;
- var code;
- while (aLen > i) {
- code = +arguments[i++];
- if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
- res.push(code < 0x10000
- ? fromCharCode(code)
- : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
- );
- } return res.join('');
- }
-});
-
-},{"114":114,"33":33}],242:[function(_dereq_,module,exports){
-// 21.1.3.7 String.prototype.includes(searchString, position = 0)
-'use strict';
-var $export = _dereq_(33);
-var context = _dereq_(107);
-var INCLUDES = 'includes';
-
-$export($export.P + $export.F * _dereq_(34)(INCLUDES), 'String', {
- includes: function includes(searchString /* , position = 0 */) {
- return !!~context(this, searchString, INCLUDES)
- .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-
-},{"107":107,"33":33,"34":34}],243:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.9 String.prototype.italics()
-_dereq_(108)('italics', function (createHTML) {
- return function italics() {
- return createHTML(this, 'i', '', '');
- };
-});
-
-},{"108":108}],244:[function(_dereq_,module,exports){
-'use strict';
-var $at = _dereq_(106)(true);
-
-// 21.1.3.27 String.prototype[@@iterator]()
-_dereq_(55)(String, 'String', function (iterated) {
- this._t = String(iterated); // target
- this._i = 0; // next index
-// 21.1.5.2.1 %StringIteratorPrototype%.next()
-}, function () {
- var O = this._t;
- var index = this._i;
- var point;
- if (index >= O.length) return { value: undefined, done: true };
- point = $at(O, index);
- this._i += point.length;
- return { value: point, done: false };
-});
-
-},{"106":106,"55":55}],245:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.10 String.prototype.link(url)
-_dereq_(108)('link', function (createHTML) {
- return function link(url) {
- return createHTML(this, 'a', 'href', url);
- };
-});
-
-},{"108":108}],246:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var toIObject = _dereq_(117);
-var toLength = _dereq_(118);
-
-$export($export.S, 'String', {
- // 21.1.2.4 String.raw(callSite, ...substitutions)
- raw: function raw(callSite) {
- var tpl = toIObject(callSite.raw);
- var len = toLength(tpl.length);
- var aLen = arguments.length;
- var res = [];
- var i = 0;
- while (len > i) {
- res.push(String(tpl[i++]));
- if (i < aLen) res.push(String(arguments[i]));
- } return res.join('');
- }
-});
-
-},{"117":117,"118":118,"33":33}],247:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-
-$export($export.P, 'String', {
- // 21.1.3.13 String.prototype.repeat(count)
- repeat: _dereq_(110)
-});
-
-},{"110":110,"33":33}],248:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.11 String.prototype.small()
-_dereq_(108)('small', function (createHTML) {
- return function small() {
- return createHTML(this, 'small', '', '');
- };
-});
-
-},{"108":108}],249:[function(_dereq_,module,exports){
-// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
-'use strict';
-var $export = _dereq_(33);
-var toLength = _dereq_(118);
-var context = _dereq_(107);
-var STARTS_WITH = 'startsWith';
-var $startsWith = ''[STARTS_WITH];
-
-$export($export.P + $export.F * _dereq_(34)(STARTS_WITH), 'String', {
- startsWith: function startsWith(searchString /* , position = 0 */) {
- var that = context(this, searchString, STARTS_WITH);
- var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
- var search = String(searchString);
- return $startsWith
- ? $startsWith.call(that, search, index)
- : that.slice(index, index + search.length) === search;
- }
-});
-
-},{"107":107,"118":118,"33":33,"34":34}],250:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.12 String.prototype.strike()
-_dereq_(108)('strike', function (createHTML) {
- return function strike() {
- return createHTML(this, 'strike', '', '');
- };
-});
-
-},{"108":108}],251:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.13 String.prototype.sub()
-_dereq_(108)('sub', function (createHTML) {
- return function sub() {
- return createHTML(this, 'sub', '', '');
- };
-});
-
-},{"108":108}],252:[function(_dereq_,module,exports){
-'use strict';
-// B.2.3.14 String.prototype.sup()
-_dereq_(108)('sup', function (createHTML) {
- return function sup() {
- return createHTML(this, 'sup', '', '');
- };
-});
-
-},{"108":108}],253:[function(_dereq_,module,exports){
-'use strict';
-// 21.1.3.25 String.prototype.trim()
-_dereq_(111)('trim', function ($trim) {
- return function trim() {
- return $trim(this, 3);
- };
-});
-
-},{"111":111}],254:[function(_dereq_,module,exports){
-'use strict';
-// ECMAScript 6 symbols shim
-var global = _dereq_(40);
-var has = _dereq_(41);
-var DESCRIPTORS = _dereq_(29);
-var $export = _dereq_(33);
-var redefine = _dereq_(94);
-var META = _dereq_(66).KEY;
-var $fails = _dereq_(35);
-var shared = _dereq_(103);
-var setToStringTag = _dereq_(101);
-var uid = _dereq_(124);
-var wks = _dereq_(128);
-var wksExt = _dereq_(127);
-var wksDefine = _dereq_(126);
-var keyOf = _dereq_(59);
-var enumKeys = _dereq_(32);
-var isArray = _dereq_(49);
-var anObject = _dereq_(7);
-var toIObject = _dereq_(117);
-var toPrimitive = _dereq_(120);
-var createDesc = _dereq_(92);
-var _create = _dereq_(71);
-var gOPNExt = _dereq_(76);
-var $GOPD = _dereq_(75);
-var $DP = _dereq_(72);
-var $keys = _dereq_(81);
-var gOPD = $GOPD.f;
-var dP = $DP.f;
-var gOPN = gOPNExt.f;
-var $Symbol = global.Symbol;
-var $JSON = global.JSON;
-var _stringify = $JSON && $JSON.stringify;
-var PROTOTYPE = 'prototype';
-var HIDDEN = wks('_hidden');
-var TO_PRIMITIVE = wks('toPrimitive');
-var isEnum = {}.propertyIsEnumerable;
-var SymbolRegistry = shared('symbol-registry');
-var AllSymbols = shared('symbols');
-var OPSymbols = shared('op-symbols');
-var ObjectProto = Object[PROTOTYPE];
-var USE_NATIVE = typeof $Symbol == 'function';
-var QObject = global.QObject;
-// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
-var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
-
-// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
-var setSymbolDesc = DESCRIPTORS && $fails(function () {
- return _create(dP({}, 'a', {
- get: function () { return dP(this, 'a', { value: 7 }).a; }
- })).a != 7;
-}) ? function (it, key, D) {
- var protoDesc = gOPD(ObjectProto, key);
- if (protoDesc) delete ObjectProto[key];
- dP(it, key, D);
- if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
-} : dP;
-
-var wrap = function (tag) {
- var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
- sym._k = tag;
- return sym;
-};
-
-var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
- return typeof it == 'symbol';
-} : function (it) {
- return it instanceof $Symbol;
-};
-
-var $defineProperty = function defineProperty(it, key, D) {
- if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
- anObject(it);
- key = toPrimitive(key, true);
- anObject(D);
- if (has(AllSymbols, key)) {
- if (!D.enumerable) {
- if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
- it[HIDDEN][key] = true;
- } else {
- if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
- D = _create(D, { enumerable: createDesc(0, false) });
- } return setSymbolDesc(it, key, D);
- } return dP(it, key, D);
-};
-var $defineProperties = function defineProperties(it, P) {
- anObject(it);
- var keys = enumKeys(P = toIObject(P));
- var i = 0;
- var l = keys.length;
- var key;
- while (l > i) $defineProperty(it, key = keys[i++], P[key]);
- return it;
-};
-var $create = function create(it, P) {
- return P === undefined ? _create(it) : $defineProperties(_create(it), P);
-};
-var $propertyIsEnumerable = function propertyIsEnumerable(key) {
- var E = isEnum.call(this, key = toPrimitive(key, true));
- if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
- return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
-};
-var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
- it = toIObject(it);
- key = toPrimitive(key, true);
- if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
- var D = gOPD(it, key);
- if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
- return D;
-};
-var $getOwnPropertyNames = function getOwnPropertyNames(it) {
- var names = gOPN(toIObject(it));
- var result = [];
- var i = 0;
- var key;
- while (names.length > i) {
- if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
- } return result;
-};
-var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
- var IS_OP = it === ObjectProto;
- var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
- var result = [];
- var i = 0;
- var key;
- while (names.length > i) {
- if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
- } return result;
-};
-
-// 19.4.1.1 Symbol([description])
-if (!USE_NATIVE) {
- $Symbol = function Symbol() {
- if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
- var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
- var $set = function (value) {
- if (this === ObjectProto) $set.call(OPSymbols, value);
- if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
- setSymbolDesc(this, tag, createDesc(1, value));
- };
- if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
- return wrap(tag);
- };
- redefine($Symbol[PROTOTYPE], 'toString', function toString() {
- return this._k;
- });
-
- $GOPD.f = $getOwnPropertyDescriptor;
- $DP.f = $defineProperty;
- _dereq_(77).f = gOPNExt.f = $getOwnPropertyNames;
- _dereq_(82).f = $propertyIsEnumerable;
- _dereq_(78).f = $getOwnPropertySymbols;
-
- if (DESCRIPTORS && !_dereq_(60)) {
- redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
- }
-
- wksExt.f = function (name) {
- return wrap(wks(name));
- };
-}
-
-$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
-
-for (var es6Symbols = (
- // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
- 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
-).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
-
-for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
-
-$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
- // 19.4.2.1 Symbol.for(key)
- 'for': function (key) {
- return has(SymbolRegistry, key += '')
- ? SymbolRegistry[key]
- : SymbolRegistry[key] = $Symbol(key);
- },
- // 19.4.2.5 Symbol.keyFor(sym)
- keyFor: function keyFor(key) {
- if (isSymbol(key)) return keyOf(SymbolRegistry, key);
- throw TypeError(key + ' is not a symbol!');
- },
- useSetter: function () { setter = true; },
- useSimple: function () { setter = false; }
-});
-
-$export($export.S + $export.F * !USE_NATIVE, 'Object', {
- // 19.1.2.2 Object.create(O [, Properties])
- create: $create,
- // 19.1.2.4 Object.defineProperty(O, P, Attributes)
- defineProperty: $defineProperty,
- // 19.1.2.3 Object.defineProperties(O, Properties)
- defineProperties: $defineProperties,
- // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
- getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
- // 19.1.2.7 Object.getOwnPropertyNames(O)
- getOwnPropertyNames: $getOwnPropertyNames,
- // 19.1.2.8 Object.getOwnPropertySymbols(O)
- getOwnPropertySymbols: $getOwnPropertySymbols
-});
-
-// 24.3.2 JSON.stringify(value [, replacer [, space]])
-$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
- var S = $Symbol();
- // MS Edge converts symbol values to JSON as {}
- // WebKit converts symbol values to JSON as null
- // V8 throws on boxed symbols
- return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
-})), 'JSON', {
- stringify: function stringify(it) {
- if (it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
- var args = [it];
- var i = 1;
- var replacer, $replacer;
- while (arguments.length > i) args.push(arguments[i++]);
- replacer = args[1];
- if (typeof replacer == 'function') $replacer = replacer;
- if ($replacer || !isArray(replacer)) replacer = function (key, value) {
- if ($replacer) value = $replacer.call(this, key, value);
- if (!isSymbol(value)) return value;
- };
- args[1] = replacer;
- return _stringify.apply($JSON, args);
- }
-});
-
-// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
-$Symbol[PROTOTYPE][TO_PRIMITIVE] || _dereq_(42)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
-// 19.4.3.5 Symbol.prototype[@@toStringTag]
-setToStringTag($Symbol, 'Symbol');
-// 20.2.1.9 Math[@@toStringTag]
-setToStringTag(Math, 'Math', true);
-// 24.3.3 JSON[@@toStringTag]
-setToStringTag(global.JSON, 'JSON', true);
-
-},{"101":101,"103":103,"117":117,"120":120,"124":124,"126":126,"127":127,"128":128,"29":29,"32":32,"33":33,"35":35,"40":40,"41":41,"42":42,"49":49,"59":59,"60":60,"66":66,"7":7,"71":71,"72":72,"75":75,"76":76,"77":77,"78":78,"81":81,"82":82,"92":92,"94":94}],255:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var $typed = _dereq_(123);
-var buffer = _dereq_(122);
-var anObject = _dereq_(7);
-var toAbsoluteIndex = _dereq_(114);
-var toLength = _dereq_(118);
-var isObject = _dereq_(51);
-var ArrayBuffer = _dereq_(40).ArrayBuffer;
-var speciesConstructor = _dereq_(104);
-var $ArrayBuffer = buffer.ArrayBuffer;
-var $DataView = buffer.DataView;
-var $isView = $typed.ABV && ArrayBuffer.isView;
-var $slice = $ArrayBuffer.prototype.slice;
-var VIEW = $typed.VIEW;
-var ARRAY_BUFFER = 'ArrayBuffer';
-
-$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
-
-$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
- // 24.1.3.1 ArrayBuffer.isView(arg)
- isView: function isView(it) {
- return $isView && $isView(it) || isObject(it) && VIEW in it;
- }
-});
-
-$export($export.P + $export.U + $export.F * _dereq_(35)(function () {
- return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
-}), ARRAY_BUFFER, {
- // 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
- slice: function slice(start, end) {
- if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
- var len = anObject(this).byteLength;
- var first = toAbsoluteIndex(start, len);
- var final = toAbsoluteIndex(end === undefined ? len : end, len);
- var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first));
- var viewS = new $DataView(this);
- var viewT = new $DataView(result);
- var index = 0;
- while (first < final) {
- viewT.setUint8(index++, viewS.getUint8(first++));
- } return result;
- }
-});
-
-_dereq_(100)(ARRAY_BUFFER);
-
-},{"100":100,"104":104,"114":114,"118":118,"122":122,"123":123,"33":33,"35":35,"40":40,"51":51,"7":7}],256:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-$export($export.G + $export.W + $export.F * !_dereq_(123).ABV, {
- DataView: _dereq_(122).DataView
-});
-
-},{"122":122,"123":123,"33":33}],257:[function(_dereq_,module,exports){
-_dereq_(121)('Float32', 4, function (init) {
- return function Float32Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
-
-},{"121":121}],258:[function(_dereq_,module,exports){
-_dereq_(121)('Float64', 8, function (init) {
- return function Float64Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
-
-},{"121":121}],259:[function(_dereq_,module,exports){
-_dereq_(121)('Int16', 2, function (init) {
- return function Int16Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
-
-},{"121":121}],260:[function(_dereq_,module,exports){
-_dereq_(121)('Int32', 4, function (init) {
- return function Int32Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
-
-},{"121":121}],261:[function(_dereq_,module,exports){
-_dereq_(121)('Int8', 1, function (init) {
- return function Int8Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
-
-},{"121":121}],262:[function(_dereq_,module,exports){
-_dereq_(121)('Uint16', 2, function (init) {
- return function Uint16Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
-
-},{"121":121}],263:[function(_dereq_,module,exports){
-_dereq_(121)('Uint32', 4, function (init) {
- return function Uint32Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
-
-},{"121":121}],264:[function(_dereq_,module,exports){
-_dereq_(121)('Uint8', 1, function (init) {
- return function Uint8Array(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-});
-
-},{"121":121}],265:[function(_dereq_,module,exports){
-_dereq_(121)('Uint8', 1, function (init) {
- return function Uint8ClampedArray(data, byteOffset, length) {
- return init(this, data, byteOffset, length);
- };
-}, true);
-
-},{"121":121}],266:[function(_dereq_,module,exports){
-'use strict';
-var each = _dereq_(12)(0);
-var redefine = _dereq_(94);
-var meta = _dereq_(66);
-var assign = _dereq_(70);
-var weak = _dereq_(21);
-var isObject = _dereq_(51);
-var fails = _dereq_(35);
-var validate = _dereq_(125);
-var WEAK_MAP = 'WeakMap';
-var getWeak = meta.getWeak;
-var isExtensible = Object.isExtensible;
-var uncaughtFrozenStore = weak.ufstore;
-var tmp = {};
-var InternalMap;
-
-var wrapper = function (get) {
- return function WeakMap() {
- return get(this, arguments.length > 0 ? arguments[0] : undefined);
- };
-};
-
-var methods = {
- // 23.3.3.3 WeakMap.prototype.get(key)
- get: function get(key) {
- if (isObject(key)) {
- var data = getWeak(key);
- if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
- return data ? data[this._i] : undefined;
- }
- },
- // 23.3.3.5 WeakMap.prototype.set(key, value)
- set: function set(key, value) {
- return weak.def(validate(this, WEAK_MAP), key, value);
- }
-};
-
-// 23.3 WeakMap Objects
-var $WeakMap = module.exports = _dereq_(22)(WEAK_MAP, wrapper, methods, weak, true, true);
-
-// IE11 WeakMap frozen keys fix
-if (fails(function () { return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; })) {
- InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
- assign(InternalMap.prototype, methods);
- meta.NEED = true;
- each(['delete', 'has', 'get', 'set'], function (key) {
- var proto = $WeakMap.prototype;
- var method = proto[key];
- redefine(proto, key, function (a, b) {
- // store frozen objects on internal weakmap shim
- if (isObject(a) && !isExtensible(a)) {
- if (!this._f) this._f = new InternalMap();
- var result = this._f[key](a, b);
- return key == 'set' ? this : result;
- // store all the rest on native weakmap
- } return method.call(this, a, b);
- });
- });
-}
-
-},{"12":12,"125":125,"21":21,"22":22,"35":35,"51":51,"66":66,"70":70,"94":94}],267:[function(_dereq_,module,exports){
-'use strict';
-var weak = _dereq_(21);
-var validate = _dereq_(125);
-var WEAK_SET = 'WeakSet';
-
-// 23.4 WeakSet Objects
-_dereq_(22)(WEAK_SET, function (get) {
- return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
-}, {
- // 23.4.3.1 WeakSet.prototype.add(value)
- add: function add(value) {
- return weak.def(validate(this, WEAK_SET), value, true);
- }
-}, weak, false, true);
-
-},{"125":125,"21":21,"22":22}],268:[function(_dereq_,module,exports){
-'use strict';
-// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
-var $export = _dereq_(33);
-var flattenIntoArray = _dereq_(38);
-var toObject = _dereq_(119);
-var toLength = _dereq_(118);
-var aFunction = _dereq_(3);
-var arraySpeciesCreate = _dereq_(15);
-
-$export($export.P, 'Array', {
- flatMap: function flatMap(callbackfn /* , thisArg */) {
- var O = toObject(this);
- var sourceLen, A;
- aFunction(callbackfn);
- sourceLen = toLength(O.length);
- A = arraySpeciesCreate(O, 0);
- flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
- return A;
- }
-});
-
-_dereq_(5)('flatMap');
-
-},{"118":118,"119":119,"15":15,"3":3,"33":33,"38":38,"5":5}],269:[function(_dereq_,module,exports){
-'use strict';
-// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten
-var $export = _dereq_(33);
-var flattenIntoArray = _dereq_(38);
-var toObject = _dereq_(119);
-var toLength = _dereq_(118);
-var toInteger = _dereq_(116);
-var arraySpeciesCreate = _dereq_(15);
-
-$export($export.P, 'Array', {
- flatten: function flatten(/* depthArg = 1 */) {
- var depthArg = arguments[0];
- var O = toObject(this);
- var sourceLen = toLength(O.length);
- var A = arraySpeciesCreate(O, 0);
- flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
- return A;
- }
-});
-
-_dereq_(5)('flatten');
-
-},{"116":116,"118":118,"119":119,"15":15,"33":33,"38":38,"5":5}],270:[function(_dereq_,module,exports){
-'use strict';
-// https://github.com/tc39/Array.prototype.includes
-var $export = _dereq_(33);
-var $includes = _dereq_(11)(true);
-
-$export($export.P, 'Array', {
- includes: function includes(el /* , fromIndex = 0 */) {
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-
-_dereq_(5)('includes');
-
-},{"11":11,"33":33,"5":5}],271:[function(_dereq_,module,exports){
-// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
-var $export = _dereq_(33);
-var microtask = _dereq_(68)();
-var process = _dereq_(40).process;
-var isNode = _dereq_(18)(process) == 'process';
-
-$export($export.G, {
- asap: function asap(fn) {
- var domain = isNode && process.domain;
- microtask(domain ? domain.bind(fn) : fn);
- }
-});
-
-},{"18":18,"33":33,"40":40,"68":68}],272:[function(_dereq_,module,exports){
-// https://github.com/ljharb/proposal-is-error
-var $export = _dereq_(33);
-var cof = _dereq_(18);
-
-$export($export.S, 'Error', {
- isError: function isError(it) {
- return cof(it) === 'Error';
- }
-});
-
-},{"18":18,"33":33}],273:[function(_dereq_,module,exports){
-// https://github.com/tc39/proposal-global
-var $export = _dereq_(33);
-
-$export($export.G, { global: _dereq_(40) });
-
-},{"33":33,"40":40}],274:[function(_dereq_,module,exports){
-// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
-_dereq_(97)('Map');
-
-},{"97":97}],275:[function(_dereq_,module,exports){
-// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
-_dereq_(98)('Map');
-
-},{"98":98}],276:[function(_dereq_,module,exports){
-// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var $export = _dereq_(33);
-
-$export($export.P + $export.R, 'Map', { toJSON: _dereq_(20)('Map') });
-
-},{"20":20,"33":33}],277:[function(_dereq_,module,exports){
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- clamp: function clamp(x, lower, upper) {
- return Math.min(upper, Math.max(lower, x));
- }
-});
-
-},{"33":33}],278:[function(_dereq_,module,exports){
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });
-
-},{"33":33}],279:[function(_dereq_,module,exports){
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = _dereq_(33);
-var RAD_PER_DEG = 180 / Math.PI;
-
-$export($export.S, 'Math', {
- degrees: function degrees(radians) {
- return radians * RAD_PER_DEG;
- }
-});
-
-},{"33":33}],280:[function(_dereq_,module,exports){
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = _dereq_(33);
-var scale = _dereq_(64);
-var fround = _dereq_(62);
-
-$export($export.S, 'Math', {
- fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
- return fround(scale(x, inLow, inHigh, outLow, outHigh));
- }
-});
-
-},{"33":33,"62":62,"64":64}],281:[function(_dereq_,module,exports){
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- iaddh: function iaddh(x0, x1, y0, y1) {
- var $x0 = x0 >>> 0;
- var $x1 = x1 >>> 0;
- var $y0 = y0 >>> 0;
- return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
- }
-});
-
-},{"33":33}],282:[function(_dereq_,module,exports){
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- imulh: function imulh(u, v) {
- var UINT16 = 0xffff;
- var $u = +u;
- var $v = +v;
- var u0 = $u & UINT16;
- var v0 = $v & UINT16;
- var u1 = $u >> 16;
- var v1 = $v >> 16;
- var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
- }
-});
-
-},{"33":33}],283:[function(_dereq_,module,exports){
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- isubh: function isubh(x0, x1, y0, y1) {
- var $x0 = x0 >>> 0;
- var $x1 = x1 >>> 0;
- var $y0 = y0 >>> 0;
- return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
- }
-});
-
-},{"33":33}],284:[function(_dereq_,module,exports){
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });
-
-},{"33":33}],285:[function(_dereq_,module,exports){
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = _dereq_(33);
-var DEG_PER_RAD = Math.PI / 180;
-
-$export($export.S, 'Math', {
- radians: function radians(degrees) {
- return degrees * DEG_PER_RAD;
- }
-});
-
-},{"33":33}],286:[function(_dereq_,module,exports){
-// https://rwaldron.github.io/proposal-math-extensions/
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', { scale: _dereq_(64) });
-
-},{"33":33,"64":64}],287:[function(_dereq_,module,exports){
-// http://jfbastien.github.io/papers/Math.signbit.html
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', { signbit: function signbit(x) {
- // eslint-disable-next-line no-self-compare
- return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
-} });
-
-},{"33":33}],288:[function(_dereq_,module,exports){
-// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
-var $export = _dereq_(33);
-
-$export($export.S, 'Math', {
- umulh: function umulh(u, v) {
- var UINT16 = 0xffff;
- var $u = +u;
- var $v = +v;
- var u0 = $u & UINT16;
- var v0 = $v & UINT16;
- var u1 = $u >>> 16;
- var v1 = $v >>> 16;
- var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
- return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
- }
-});
-
-},{"33":33}],289:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var toObject = _dereq_(119);
-var aFunction = _dereq_(3);
-var $defineProperty = _dereq_(72);
-
-// B.2.2.2 Object.prototype.__defineGetter__(P, getter)
-_dereq_(29) && $export($export.P + _dereq_(74), 'Object', {
- __defineGetter__: function __defineGetter__(P, getter) {
- $defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
- }
-});
-
-},{"119":119,"29":29,"3":3,"33":33,"72":72,"74":74}],290:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var toObject = _dereq_(119);
-var aFunction = _dereq_(3);
-var $defineProperty = _dereq_(72);
-
-// B.2.2.3 Object.prototype.__defineSetter__(P, setter)
-_dereq_(29) && $export($export.P + _dereq_(74), 'Object', {
- __defineSetter__: function __defineSetter__(P, setter) {
- $defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
- }
-});
-
-},{"119":119,"29":29,"3":3,"33":33,"72":72,"74":74}],291:[function(_dereq_,module,exports){
-// https://github.com/tc39/proposal-object-values-entries
-var $export = _dereq_(33);
-var $entries = _dereq_(84)(true);
-
-$export($export.S, 'Object', {
- entries: function entries(it) {
- return $entries(it);
- }
-});
-
-},{"33":33,"84":84}],292:[function(_dereq_,module,exports){
-// https://github.com/tc39/proposal-object-getownpropertydescriptors
-var $export = _dereq_(33);
-var ownKeys = _dereq_(85);
-var toIObject = _dereq_(117);
-var gOPD = _dereq_(75);
-var createProperty = _dereq_(24);
-
-$export($export.S, 'Object', {
- getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
- var O = toIObject(object);
- var getDesc = gOPD.f;
- var keys = ownKeys(O);
- var result = {};
- var i = 0;
- var key, desc;
- while (keys.length > i) {
- desc = getDesc(O, key = keys[i++]);
- if (desc !== undefined) createProperty(result, key, desc);
- }
- return result;
- }
-});
-
-},{"117":117,"24":24,"33":33,"75":75,"85":85}],293:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var toObject = _dereq_(119);
-var toPrimitive = _dereq_(120);
-var getPrototypeOf = _dereq_(79);
-var getOwnPropertyDescriptor = _dereq_(75).f;
-
-// B.2.2.4 Object.prototype.__lookupGetter__(P)
-_dereq_(29) && $export($export.P + _dereq_(74), 'Object', {
- __lookupGetter__: function __lookupGetter__(P) {
- var O = toObject(this);
- var K = toPrimitive(P, true);
- var D;
- do {
- if (D = getOwnPropertyDescriptor(O, K)) return D.get;
- } while (O = getPrototypeOf(O));
- }
-});
-
-},{"119":119,"120":120,"29":29,"33":33,"74":74,"75":75,"79":79}],294:[function(_dereq_,module,exports){
-'use strict';
-var $export = _dereq_(33);
-var toObject = _dereq_(119);
-var toPrimitive = _dereq_(120);
-var getPrototypeOf = _dereq_(79);
-var getOwnPropertyDescriptor = _dereq_(75).f;
-
-// B.2.2.5 Object.prototype.__lookupSetter__(P)
-_dereq_(29) && $export($export.P + _dereq_(74), 'Object', {
- __lookupSetter__: function __lookupSetter__(P) {
- var O = toObject(this);
- var K = toPrimitive(P, true);
- var D;
- do {
- if (D = getOwnPropertyDescriptor(O, K)) return D.set;
- } while (O = getPrototypeOf(O));
- }
-});
-
-},{"119":119,"120":120,"29":29,"33":33,"74":74,"75":75,"79":79}],295:[function(_dereq_,module,exports){
-// https://github.com/tc39/proposal-object-values-entries
-var $export = _dereq_(33);
-var $values = _dereq_(84)(false);
-
-$export($export.S, 'Object', {
- values: function values(it) {
- return $values(it);
- }
-});
-
-},{"33":33,"84":84}],296:[function(_dereq_,module,exports){
-'use strict';
-// https://github.com/zenparsing/es-observable
-var $export = _dereq_(33);
-var global = _dereq_(40);
-var core = _dereq_(23);
-var microtask = _dereq_(68)();
-var OBSERVABLE = _dereq_(128)('observable');
-var aFunction = _dereq_(3);
-var anObject = _dereq_(7);
-var anInstance = _dereq_(6);
-var redefineAll = _dereq_(93);
-var hide = _dereq_(42);
-var forOf = _dereq_(39);
-var RETURN = forOf.RETURN;
-
-var getMethod = function (fn) {
- return fn == null ? undefined : aFunction(fn);
-};
-
-var cleanupSubscription = function (subscription) {
- var cleanup = subscription._c;
- if (cleanup) {
- subscription._c = undefined;
- cleanup();
- }
-};
-
-var subscriptionClosed = function (subscription) {
- return subscription._o === undefined;
-};
-
-var closeSubscription = function (subscription) {
- if (!subscriptionClosed(subscription)) {
- subscription._o = undefined;
- cleanupSubscription(subscription);
- }
-};
-
-var Subscription = function (observer, subscriber) {
- anObject(observer);
- this._c = undefined;
- this._o = observer;
- observer = new SubscriptionObserver(this);
- try {
- var cleanup = subscriber(observer);
- var subscription = cleanup;
- if (cleanup != null) {
- if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };
- else aFunction(cleanup);
- this._c = cleanup;
- }
- } catch (e) {
- observer.error(e);
- return;
- } if (subscriptionClosed(this)) cleanupSubscription(this);
-};
-
-Subscription.prototype = redefineAll({}, {
- unsubscribe: function unsubscribe() { closeSubscription(this); }
-});
-
-var SubscriptionObserver = function (subscription) {
- this._s = subscription;
-};
-
-SubscriptionObserver.prototype = redefineAll({}, {
- next: function next(value) {
- var subscription = this._s;
- if (!subscriptionClosed(subscription)) {
- var observer = subscription._o;
- try {
- var m = getMethod(observer.next);
- if (m) return m.call(observer, value);
- } catch (e) {
- try {
- closeSubscription(subscription);
- } finally {
- throw e;
- }
- }
- }
- },
- error: function error(value) {
- var subscription = this._s;
- if (subscriptionClosed(subscription)) throw value;
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.error);
- if (!m) throw value;
- value = m.call(observer, value);
- } catch (e) {
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- },
- complete: function complete(value) {
- var subscription = this._s;
- if (!subscriptionClosed(subscription)) {
- var observer = subscription._o;
- subscription._o = undefined;
- try {
- var m = getMethod(observer.complete);
- value = m ? m.call(observer, value) : undefined;
- } catch (e) {
- try {
- cleanupSubscription(subscription);
- } finally {
- throw e;
- }
- } cleanupSubscription(subscription);
- return value;
- }
- }
-});
-
-var $Observable = function Observable(subscriber) {
- anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
-};
-
-redefineAll($Observable.prototype, {
- subscribe: function subscribe(observer) {
- return new Subscription(observer, this._f);
- },
- forEach: function forEach(fn) {
- var that = this;
- return new (core.Promise || global.Promise)(function (resolve, reject) {
- aFunction(fn);
- var subscription = that.subscribe({
- next: function (value) {
- try {
- return fn(value);
- } catch (e) {
- reject(e);
- subscription.unsubscribe();
- }
- },
- error: reject,
- complete: resolve
- });
- });
- }
-});
-
-redefineAll($Observable, {
- from: function from(x) {
- var C = typeof this === 'function' ? this : $Observable;
- var method = getMethod(anObject(x)[OBSERVABLE]);
- if (method) {
- var observable = anObject(method.call(x));
- return observable.constructor === C ? observable : new C(function (observer) {
- return observable.subscribe(observer);
- });
- }
- return new C(function (observer) {
- var done = false;
- microtask(function () {
- if (!done) {
- try {
- if (forOf(x, false, function (it) {
- observer.next(it);
- if (done) return RETURN;
- }) === RETURN) return;
- } catch (e) {
- if (done) throw e;
- observer.error(e);
- return;
- } observer.complete();
- }
- });
- return function () { done = true; };
- });
- },
- of: function of() {
- for (var i = 0, l = arguments.length, items = Array(l); i < l;) items[i] = arguments[i++];
- return new (typeof this === 'function' ? this : $Observable)(function (observer) {
- var done = false;
- microtask(function () {
- if (!done) {
- for (var j = 0; j < items.length; ++j) {
- observer.next(items[j]);
- if (done) return;
- } observer.complete();
- }
- });
- return function () { done = true; };
- });
- }
-});
-
-hide($Observable.prototype, OBSERVABLE, function () { return this; });
-
-$export($export.G, { Observable: $Observable });
-
-_dereq_(100)('Observable');
-
-},{"100":100,"128":128,"23":23,"3":3,"33":33,"39":39,"40":40,"42":42,"6":6,"68":68,"7":7,"93":93}],297:[function(_dereq_,module,exports){
-// https://github.com/tc39/proposal-promise-finally
-'use strict';
-var $export = _dereq_(33);
-var core = _dereq_(23);
-var global = _dereq_(40);
-var speciesConstructor = _dereq_(104);
-var promiseResolve = _dereq_(91);
-
-$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
- var C = speciesConstructor(this, core.Promise || global.Promise);
- var isFunction = typeof onFinally == 'function';
- return this.then(
- isFunction ? function (x) {
- return promiseResolve(C, onFinally()).then(function () { return x; });
- } : onFinally,
- isFunction ? function (e) {
- return promiseResolve(C, onFinally()).then(function () { throw e; });
- } : onFinally
- );
-} });
-
-},{"104":104,"23":23,"33":33,"40":40,"91":91}],298:[function(_dereq_,module,exports){
-'use strict';
-// https://github.com/tc39/proposal-promise-try
-var $export = _dereq_(33);
-var newPromiseCapability = _dereq_(69);
-var perform = _dereq_(90);
-
-$export($export.S, 'Promise', { 'try': function (callbackfn) {
- var promiseCapability = newPromiseCapability.f(this);
- var result = perform(callbackfn);
- (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
- return promiseCapability.promise;
-} });
-
-},{"33":33,"69":69,"90":90}],299:[function(_dereq_,module,exports){
-var metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var toMetaKey = metadata.key;
-var ordinaryDefineOwnMetadata = metadata.set;
-
-metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
- ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
-} });
-
-},{"67":67,"7":7}],300:[function(_dereq_,module,exports){
-var metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var toMetaKey = metadata.key;
-var getOrCreateMetadataMap = metadata.map;
-var store = metadata.store;
-
-metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
- var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
- var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
- if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
- if (metadataMap.size) return true;
- var targetMetadata = store.get(target);
- targetMetadata['delete'](targetKey);
- return !!targetMetadata.size || store['delete'](target);
-} });
-
-},{"67":67,"7":7}],301:[function(_dereq_,module,exports){
-var Set = _dereq_(231);
-var from = _dereq_(10);
-var metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var getPrototypeOf = _dereq_(79);
-var ordinaryOwnMetadataKeys = metadata.keys;
-var toMetaKey = metadata.key;
-
-var ordinaryMetadataKeys = function (O, P) {
- var oKeys = ordinaryOwnMetadataKeys(O, P);
- var parent = getPrototypeOf(O);
- if (parent === null) return oKeys;
- var pKeys = ordinaryMetadataKeys(parent, P);
- return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
-};
-
-metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
- return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
-} });
-
-},{"10":10,"231":231,"67":67,"7":7,"79":79}],302:[function(_dereq_,module,exports){
-var metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var getPrototypeOf = _dereq_(79);
-var ordinaryHasOwnMetadata = metadata.has;
-var ordinaryGetOwnMetadata = metadata.get;
-var toMetaKey = metadata.key;
-
-var ordinaryGetMetadata = function (MetadataKey, O, P) {
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
-};
-
-metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
- return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-} });
-
-},{"67":67,"7":7,"79":79}],303:[function(_dereq_,module,exports){
-var metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var ordinaryOwnMetadataKeys = metadata.keys;
-var toMetaKey = metadata.key;
-
-metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
- return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
-} });
-
-},{"67":67,"7":7}],304:[function(_dereq_,module,exports){
-var metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var ordinaryGetOwnMetadata = metadata.get;
-var toMetaKey = metadata.key;
-
-metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
- return ordinaryGetOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-} });
-
-},{"67":67,"7":7}],305:[function(_dereq_,module,exports){
-var metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var getPrototypeOf = _dereq_(79);
-var ordinaryHasOwnMetadata = metadata.has;
-var toMetaKey = metadata.key;
-
-var ordinaryHasMetadata = function (MetadataKey, O, P) {
- var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
- if (hasOwn) return true;
- var parent = getPrototypeOf(O);
- return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
-};
-
-metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
- return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-} });
-
-},{"67":67,"7":7,"79":79}],306:[function(_dereq_,module,exports){
-var metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var ordinaryHasOwnMetadata = metadata.has;
-var toMetaKey = metadata.key;
-
-metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
- return ordinaryHasOwnMetadata(metadataKey, anObject(target)
- , arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
-} });
-
-},{"67":67,"7":7}],307:[function(_dereq_,module,exports){
-var $metadata = _dereq_(67);
-var anObject = _dereq_(7);
-var aFunction = _dereq_(3);
-var toMetaKey = $metadata.key;
-var ordinaryDefineOwnMetadata = $metadata.set;
-
-$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
- return function decorator(target, targetKey) {
- ordinaryDefineOwnMetadata(
- metadataKey, metadataValue,
- (targetKey !== undefined ? anObject : aFunction)(target),
- toMetaKey(targetKey)
- );
- };
-} });
-
-},{"3":3,"67":67,"7":7}],308:[function(_dereq_,module,exports){
-// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
-_dereq_(97)('Set');
-
-},{"97":97}],309:[function(_dereq_,module,exports){
-// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
-_dereq_(98)('Set');
-
-},{"98":98}],310:[function(_dereq_,module,exports){
-// https://github.com/DavidBruant/Map-Set.prototype.toJSON
-var $export = _dereq_(33);
-
-$export($export.P + $export.R, 'Set', { toJSON: _dereq_(20)('Set') });
-
-},{"20":20,"33":33}],311:[function(_dereq_,module,exports){
-'use strict';
-// https://github.com/mathiasbynens/String.prototype.at
-var $export = _dereq_(33);
-var $at = _dereq_(106)(true);
-
-$export($export.P, 'String', {
- at: function at(pos) {
- return $at(this, pos);
- }
-});
-
-},{"106":106,"33":33}],312:[function(_dereq_,module,exports){
-'use strict';
-// https://tc39.github.io/String.prototype.matchAll/
-var $export = _dereq_(33);
-var defined = _dereq_(28);
-var toLength = _dereq_(118);
-var isRegExp = _dereq_(52);
-var getFlags = _dereq_(37);
-var RegExpProto = RegExp.prototype;
-
-var $RegExpStringIterator = function (regexp, string) {
- this._r = regexp;
- this._s = string;
-};
-
-_dereq_(54)($RegExpStringIterator, 'RegExp String', function next() {
- var match = this._r.exec(this._s);
- return { value: match, done: match === null };
-});
-
-$export($export.P, 'String', {
- matchAll: function matchAll(regexp) {
- defined(this);
- if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');
- var S = String(this);
- var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);
- var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
- rx.lastIndex = toLength(regexp.lastIndex);
- return new $RegExpStringIterator(rx, S);
- }
-});
-
-},{"118":118,"28":28,"33":33,"37":37,"52":52,"54":54}],313:[function(_dereq_,module,exports){
-'use strict';
-// https://github.com/tc39/proposal-string-pad-start-end
-var $export = _dereq_(33);
-var $pad = _dereq_(109);
-
-$export($export.P, 'String', {
- padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
- return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
- }
-});
-
-},{"109":109,"33":33}],314:[function(_dereq_,module,exports){
-'use strict';
-// https://github.com/tc39/proposal-string-pad-start-end
-var $export = _dereq_(33);
-var $pad = _dereq_(109);
-
-$export($export.P, 'String', {
- padStart: function padStart(maxLength /* , fillString = ' ' */) {
- return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
- }
-});
-
-},{"109":109,"33":33}],315:[function(_dereq_,module,exports){
-'use strict';
-// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
-_dereq_(111)('trimLeft', function ($trim) {
- return function trimLeft() {
- return $trim(this, 1);
- };
-}, 'trimStart');
-
-},{"111":111}],316:[function(_dereq_,module,exports){
-'use strict';
-// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
-_dereq_(111)('trimRight', function ($trim) {
- return function trimRight() {
- return $trim(this, 2);
- };
-}, 'trimEnd');
-
-},{"111":111}],317:[function(_dereq_,module,exports){
-_dereq_(126)('asyncIterator');
-
-},{"126":126}],318:[function(_dereq_,module,exports){
-_dereq_(126)('observable');
-
-},{"126":126}],319:[function(_dereq_,module,exports){
-// https://github.com/tc39/proposal-global
-var $export = _dereq_(33);
-
-$export($export.S, 'System', { global: _dereq_(40) });
-
-},{"33":33,"40":40}],320:[function(_dereq_,module,exports){
-// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
-_dereq_(97)('WeakMap');
-
-},{"97":97}],321:[function(_dereq_,module,exports){
-// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
-_dereq_(98)('WeakMap');
-
-},{"98":98}],322:[function(_dereq_,module,exports){
-// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
-_dereq_(97)('WeakSet');
-
-},{"97":97}],323:[function(_dereq_,module,exports){
-// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
-_dereq_(98)('WeakSet');
-
-},{"98":98}],324:[function(_dereq_,module,exports){
-var $iterators = _dereq_(141);
-var getKeys = _dereq_(81);
-var redefine = _dereq_(94);
-var global = _dereq_(40);
-var hide = _dereq_(42);
-var Iterators = _dereq_(58);
-var wks = _dereq_(128);
-var ITERATOR = wks('iterator');
-var TO_STRING_TAG = wks('toStringTag');
-var ArrayValues = Iterators.Array;
-
-var DOMIterables = {
- CSSRuleList: true, // TODO: Not spec compliant, should be false.
- CSSStyleDeclaration: false,
- CSSValueList: false,
- ClientRectList: false,
- DOMRectList: false,
- DOMStringList: false,
- DOMTokenList: true,
- DataTransferItemList: false,
- FileList: false,
- HTMLAllCollection: false,
- HTMLCollection: false,
- HTMLFormElement: false,
- HTMLSelectElement: false,
- MediaList: true, // TODO: Not spec compliant, should be false.
- MimeTypeArray: false,
- NamedNodeMap: false,
- NodeList: true,
- PaintRequestList: false,
- Plugin: false,
- PluginArray: false,
- SVGLengthList: false,
- SVGNumberList: false,
- SVGPathSegList: false,
- SVGPointList: false,
- SVGStringList: false,
- SVGTransformList: false,
- SourceBufferList: false,
- StyleSheetList: true, // TODO: Not spec compliant, should be false.
- TextTrackCueList: false,
- TextTrackList: false,
- TouchList: false
-};
-
-for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
- var NAME = collections[i];
- var explicit = DOMIterables[NAME];
- var Collection = global[NAME];
- var proto = Collection && Collection.prototype;
- var key;
- if (proto) {
- if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
- if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
- Iterators[NAME] = ArrayValues;
- if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
- }
-}
-
-},{"128":128,"141":141,"40":40,"42":42,"58":58,"81":81,"94":94}],325:[function(_dereq_,module,exports){
-var $export = _dereq_(33);
-var $task = _dereq_(113);
-$export($export.G + $export.B, {
- setImmediate: $task.set,
- clearImmediate: $task.clear
-});
-
-},{"113":113,"33":33}],326:[function(_dereq_,module,exports){
-// ie9- setTimeout & setInterval additional parameters fix
-var global = _dereq_(40);
-var $export = _dereq_(33);
-var invoke = _dereq_(46);
-var partial = _dereq_(88);
-var navigator = global.navigator;
-var MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
-var wrap = function (set) {
- return MSIE ? function (fn, time /* , ...args */) {
- return set(invoke(
- partial,
- [].slice.call(arguments, 2),
- // eslint-disable-next-line no-new-func
- typeof fn == 'function' ? fn : Function(fn)
- ), time);
- } : set;
-};
-$export($export.G + $export.B + $export.F * MSIE, {
- setTimeout: wrap(global.setTimeout),
- setInterval: wrap(global.setInterval)
-});
-
-},{"33":33,"40":40,"46":46,"88":88}],327:[function(_dereq_,module,exports){
-_dereq_(254);
-_dereq_(191);
-_dereq_(193);
-_dereq_(192);
-_dereq_(195);
-_dereq_(197);
-_dereq_(202);
-_dereq_(196);
-_dereq_(194);
-_dereq_(204);
-_dereq_(203);
-_dereq_(199);
-_dereq_(200);
-_dereq_(198);
-_dereq_(190);
-_dereq_(201);
-_dereq_(205);
-_dereq_(206);
-_dereq_(157);
-_dereq_(159);
-_dereq_(158);
-_dereq_(208);
-_dereq_(207);
-_dereq_(178);
-_dereq_(188);
-_dereq_(189);
-_dereq_(179);
-_dereq_(180);
-_dereq_(181);
-_dereq_(182);
-_dereq_(183);
-_dereq_(184);
-_dereq_(185);
-_dereq_(186);
-_dereq_(187);
-_dereq_(161);
-_dereq_(162);
-_dereq_(163);
-_dereq_(164);
-_dereq_(165);
-_dereq_(166);
-_dereq_(167);
-_dereq_(168);
-_dereq_(169);
-_dereq_(170);
-_dereq_(171);
-_dereq_(172);
-_dereq_(173);
-_dereq_(174);
-_dereq_(175);
-_dereq_(176);
-_dereq_(177);
-_dereq_(241);
-_dereq_(246);
-_dereq_(253);
-_dereq_(244);
-_dereq_(236);
-_dereq_(237);
-_dereq_(242);
-_dereq_(247);
-_dereq_(249);
-_dereq_(232);
-_dereq_(233);
-_dereq_(234);
-_dereq_(235);
-_dereq_(238);
-_dereq_(239);
-_dereq_(240);
-_dereq_(243);
-_dereq_(245);
-_dereq_(248);
-_dereq_(250);
-_dereq_(251);
-_dereq_(252);
-_dereq_(152);
-_dereq_(154);
-_dereq_(153);
-_dereq_(156);
-_dereq_(155);
-_dereq_(140);
-_dereq_(138);
-_dereq_(145);
-_dereq_(142);
-_dereq_(148);
-_dereq_(150);
-_dereq_(137);
-_dereq_(144);
-_dereq_(134);
-_dereq_(149);
-_dereq_(132);
-_dereq_(147);
-_dereq_(146);
-_dereq_(139);
-_dereq_(143);
-_dereq_(131);
-_dereq_(133);
-_dereq_(136);
-_dereq_(135);
-_dereq_(151);
-_dereq_(141);
-_dereq_(224);
-_dereq_(230);
-_dereq_(225);
-_dereq_(226);
-_dereq_(227);
-_dereq_(228);
-_dereq_(229);
-_dereq_(209);
-_dereq_(160);
-_dereq_(231);
-_dereq_(266);
-_dereq_(267);
-_dereq_(255);
-_dereq_(256);
-_dereq_(261);
-_dereq_(264);
-_dereq_(265);
-_dereq_(259);
-_dereq_(262);
-_dereq_(260);
-_dereq_(263);
-_dereq_(257);
-_dereq_(258);
-_dereq_(210);
-_dereq_(211);
-_dereq_(212);
-_dereq_(213);
-_dereq_(214);
-_dereq_(217);
-_dereq_(215);
-_dereq_(216);
-_dereq_(218);
-_dereq_(219);
-_dereq_(220);
-_dereq_(221);
-_dereq_(223);
-_dereq_(222);
-_dereq_(270);
-_dereq_(268);
-_dereq_(269);
-_dereq_(311);
-_dereq_(314);
-_dereq_(313);
-_dereq_(315);
-_dereq_(316);
-_dereq_(312);
-_dereq_(317);
-_dereq_(318);
-_dereq_(292);
-_dereq_(295);
-_dereq_(291);
-_dereq_(289);
-_dereq_(290);
-_dereq_(293);
-_dereq_(294);
-_dereq_(276);
-_dereq_(310);
-_dereq_(275);
-_dereq_(309);
-_dereq_(321);
-_dereq_(323);
-_dereq_(274);
-_dereq_(308);
-_dereq_(320);
-_dereq_(322);
-_dereq_(273);
-_dereq_(319);
-_dereq_(272);
-_dereq_(277);
-_dereq_(278);
-_dereq_(279);
-_dereq_(280);
-_dereq_(281);
-_dereq_(283);
-_dereq_(282);
-_dereq_(284);
-_dereq_(285);
-_dereq_(286);
-_dereq_(288);
-_dereq_(287);
-_dereq_(297);
-_dereq_(298);
-_dereq_(299);
-_dereq_(300);
-_dereq_(302);
-_dereq_(301);
-_dereq_(304);
-_dereq_(303);
-_dereq_(305);
-_dereq_(306);
-_dereq_(307);
-_dereq_(271);
-_dereq_(296);
-_dereq_(326);
-_dereq_(325);
-_dereq_(324);
-module.exports = _dereq_(23);
-
-},{"131":131,"132":132,"133":133,"134":134,"135":135,"136":136,"137":137,"138":138,"139":139,"140":140,"141":141,"142":142,"143":143,"144":144,"145":145,"146":146,"147":147,"148":148,"149":149,"150":150,"151":151,"152":152,"153":153,"154":154,"155":155,"156":156,"157":157,"158":158,"159":159,"160":160,"161":161,"162":162,"163":163,"164":164,"165":165,"166":166,"167":167,"168":168,"169":169,"170":170,"171":171,"172":172,"173":173,"174":174,"175":175,"176":176,"177":177,"178":178,"179":179,"180":180,"181":181,"182":182,"183":183,"184":184,"185":185,"186":186,"187":187,"188":188,"189":189,"190":190,"191":191,"192":192,"193":193,"194":194,"195":195,"196":196,"197":197,"198":198,"199":199,"200":200,"201":201,"202":202,"203":203,"204":204,"205":205,"206":206,"207":207,"208":208,"209":209,"210":210,"211":211,"212":212,"213":213,"214":214,"215":215,"216":216,"217":217,"218":218,"219":219,"220":220,"221":221,"222":222,"223":223,"224":224,"225":225,"226":226,"227":227,"228":228,"229":229,"23":23,"230":230,"231":231,"232":232,"233":233,"234":234,"235":235,"236":236,"237":237,"238":238,"239":239,"240":240,"241":241,"242":242,"243":243,"244":244,"245":245,"246":246,"247":247,"248":248,"249":249,"250":250,"251":251,"252":252,"253":253,"254":254,"255":255,"256":256,"257":257,"258":258,"259":259,"260":260,"261":261,"262":262,"263":263,"264":264,"265":265,"266":266,"267":267,"268":268,"269":269,"270":270,"271":271,"272":272,"273":273,"274":274,"275":275,"276":276,"277":277,"278":278,"279":279,"280":280,"281":281,"282":282,"283":283,"284":284,"285":285,"286":286,"287":287,"288":288,"289":289,"290":290,"291":291,"292":292,"293":293,"294":294,"295":295,"296":296,"297":297,"298":298,"299":299,"300":300,"301":301,"302":302,"303":303,"304":304,"305":305,"306":306,"307":307,"308":308,"309":309,"310":310,"311":311,"312":312,"313":313,"314":314,"315":315,"316":316,"317":317,"318":318,"319":319,"320":320,"321":321,"322":322,"323":323,"324":324,"325":325,"326":326}],328:[function(_dereq_,module,exports){
-(function (global){
-/**
- * Copyright (c) 2014, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
- * additional grant of patent rights can be found in the PATENTS file in
- * the same directory.
- */
-
-!(function(global) {
- "use strict";
-
- var Op = Object.prototype;
- var hasOwn = Op.hasOwnProperty;
- var undefined; // More compressible than void 0.
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
-
- var inModule = typeof module === "object";
- var runtime = global.regeneratorRuntime;
- if (runtime) {
- if (inModule) {
- // If regeneratorRuntime is defined globally and we're in a module,
- // make the exports object identical to regeneratorRuntime.
- module.exports = runtime;
- }
- // Don't bother evaluating the rest of this file if the runtime was
- // already defined globally.
- return;
- }
-
- // Define the runtime globally (as expected by generated code) as either
- // module.exports (if we're in a module) or a new, empty object.
- runtime = global.regeneratorRuntime = inModule ? module.exports : {};
-
- function wrap(innerFn, outerFn, self, tryLocsList) {
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
- var generator = Object.create(protoGenerator.prototype);
- var context = new Context(tryLocsList || []);
-
- // The ._invoke method unifies the implementations of the .next,
- // .throw, and .return methods.
- generator._invoke = makeInvokeMethod(innerFn, self, context);
-
- return generator;
- }
- runtime.wrap = wrap;
-
- // Try/catch helper to minimize deoptimizations. Returns a completion
- // record like context.tryEntries[i].completion. This interface could
- // have been (and was previously) designed to take a closure to be
- // invoked without arguments, but in all the cases we care about we
- // already have an existing method we want to call, so there's no need
- // to create a new function object. We can even get away with assuming
- // the method takes exactly one argument, since that happens to be true
- // in every case, so we don't have to touch the arguments object. The
- // only additional allocation required is the completion record, which
- // has a stable shape and so hopefully should be cheap to allocate.
- function tryCatch(fn, obj, arg) {
- try {
- return { type: "normal", arg: fn.call(obj, arg) };
- } catch (err) {
- return { type: "throw", arg: err };
- }
- }
-
- var GenStateSuspendedStart = "suspendedStart";
- var GenStateSuspendedYield = "suspendedYield";
- var GenStateExecuting = "executing";
- var GenStateCompleted = "completed";
-
- // Returning this object from the innerFn has the same effect as
- // breaking out of the dispatch switch statement.
- var ContinueSentinel = {};
-
- // Dummy constructor functions that we use as the .constructor and
- // .constructor.prototype properties for functions that return Generator
- // objects. For full spec compliance, you may wish to configure your
- // minifier not to mangle the names of these two functions.
- function Generator() {}
- function GeneratorFunction() {}
- function GeneratorFunctionPrototype() {}
-
- // This is a polyfill for %IteratorPrototype% for environments that
- // don't natively support it.
- var IteratorPrototype = {};
- IteratorPrototype[iteratorSymbol] = function () {
- return this;
- };
-
- var getProto = Object.getPrototypeOf;
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
- if (NativeIteratorPrototype &&
- NativeIteratorPrototype !== Op &&
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
- // This environment has a native %IteratorPrototype%; use it instead
- // of the polyfill.
- IteratorPrototype = NativeIteratorPrototype;
- }
-
- var Gp = GeneratorFunctionPrototype.prototype =
- Generator.prototype = Object.create(IteratorPrototype);
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
- GeneratorFunctionPrototype[toStringTagSymbol] =
- GeneratorFunction.displayName = "GeneratorFunction";
-
- // Helper for defining the .next, .throw, and .return methods of the
- // Iterator interface in terms of a single ._invoke method.
- function defineIteratorMethods(prototype) {
- ["next", "throw", "return"].forEach(function(method) {
- prototype[method] = function(arg) {
- return this._invoke(method, arg);
- };
- });
- }
-
- runtime.isGeneratorFunction = function(genFun) {
- var ctor = typeof genFun === "function" && genFun.constructor;
- return ctor
- ? ctor === GeneratorFunction ||
- // For the native GeneratorFunction constructor, the best we can
- // do is to check its .name property.
- (ctor.displayName || ctor.name) === "GeneratorFunction"
- : false;
- };
-
- runtime.mark = function(genFun) {
- if (Object.setPrototypeOf) {
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
- } else {
- genFun.__proto__ = GeneratorFunctionPrototype;
- if (!(toStringTagSymbol in genFun)) {
- genFun[toStringTagSymbol] = "GeneratorFunction";
- }
- }
- genFun.prototype = Object.create(Gp);
- return genFun;
- };
-
- // Within the body of any async function, `await x` is transformed to
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
- // meant to be awaited.
- runtime.awrap = function(arg) {
- return { __await: arg };
- };
-
- function AsyncIterator(generator) {
- function invoke(method, arg, resolve, reject) {
- var record = tryCatch(generator[method], generator, arg);
- if (record.type === "throw") {
- reject(record.arg);
- } else {
- var result = record.arg;
- var value = result.value;
- if (value &&
- typeof value === "object" &&
- hasOwn.call(value, "__await")) {
- return Promise.resolve(value.__await).then(function(value) {
- invoke("next", value, resolve, reject);
- }, function(err) {
- invoke("throw", err, resolve, reject);
- });
- }
-
- return Promise.resolve(value).then(function(unwrapped) {
- // When a yielded Promise is resolved, its final value becomes
- // the .value of the Promise<{value,done}> result for the
- // current iteration. If the Promise is rejected, however, the
- // result for this iteration will be rejected with the same
- // reason. Note that rejections of yielded Promises are not
- // thrown back into the generator function, as is the case
- // when an awaited Promise is rejected. This difference in
- // behavior between yield and await is important, because it
- // allows the consumer to decide what to do with the yielded
- // rejection (swallow it and continue, manually .throw it back
- // into the generator, abandon iteration, whatever). With
- // await, by contrast, there is no opportunity to examine the
- // rejection reason outside the generator function, so the
- // only option is to throw it from the await expression, and
- // let the generator function handle the exception.
- result.value = unwrapped;
- resolve(result);
- }, reject);
- }
- }
-
- if (typeof global.process === "object" && global.process.domain) {
- invoke = global.process.domain.bind(invoke);
- }
-
- var previousPromise;
-
- function enqueue(method, arg) {
- function callInvokeWithMethodAndArg() {
- return new Promise(function(resolve, reject) {
- invoke(method, arg, resolve, reject);
- });
- }
-
- return previousPromise =
- // If enqueue has been called before, then we want to wait until
- // all previous Promises have been resolved before calling invoke,
- // so that results are always delivered in the correct order. If
- // enqueue has not been called before, then it is important to
- // call invoke immediately, without waiting on a callback to fire,
- // so that the async generator function has the opportunity to do
- // any necessary setup in a predictable way. This predictability
- // is why the Promise constructor synchronously invokes its
- // executor callback, and why async functions synchronously
- // execute code before the first await. Since we implement simple
- // async functions in terms of async generators, it is especially
- // important to get this right, even though it requires care.
- previousPromise ? previousPromise.then(
- callInvokeWithMethodAndArg,
- // Avoid propagating failures to Promises returned by later
- // invocations of the iterator.
- callInvokeWithMethodAndArg
- ) : callInvokeWithMethodAndArg();
- }
-
- // Define the unified helper method that is used to implement .next,
- // .throw, and .return (see defineIteratorMethods).
- this._invoke = enqueue;
- }
-
- defineIteratorMethods(AsyncIterator.prototype);
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
- return this;
- };
- runtime.AsyncIterator = AsyncIterator;
-
- // Note that simple async functions are implemented on top of
- // AsyncIterator objects; they just return a Promise for the value of
- // the final result produced by the iterator.
- runtime.async = function(innerFn, outerFn, self, tryLocsList) {
- var iter = new AsyncIterator(
- wrap(innerFn, outerFn, self, tryLocsList)
- );
-
- return runtime.isGeneratorFunction(outerFn)
- ? iter // If outerFn is a generator, return the full iterator.
- : iter.next().then(function(result) {
- return result.done ? result.value : iter.next();
- });
- };
-
- function makeInvokeMethod(innerFn, self, context) {
- var state = GenStateSuspendedStart;
-
- return function invoke(method, arg) {
- if (state === GenStateExecuting) {
- throw new Error("Generator is already running");
- }
-
- if (state === GenStateCompleted) {
- if (method === "throw") {
- throw arg;
- }
-
- // Be forgiving, per 25.3.3.3.3 of the spec:
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
- return doneResult();
- }
-
- context.method = method;
- context.arg = arg;
-
- while (true) {
- var delegate = context.delegate;
- if (delegate) {
- var delegateResult = maybeInvokeDelegate(delegate, context);
- if (delegateResult) {
- if (delegateResult === ContinueSentinel) continue;
- return delegateResult;
- }
- }
-
- if (context.method === "next") {
- // Setting context._sent for legacy support of Babel's
- // function.sent implementation.
- context.sent = context._sent = context.arg;
-
- } else if (context.method === "throw") {
- if (state === GenStateSuspendedStart) {
- state = GenStateCompleted;
- throw context.arg;
- }
-
- context.dispatchException(context.arg);
-
- } else if (context.method === "return") {
- context.abrupt("return", context.arg);
- }
-
- state = GenStateExecuting;
-
- var record = tryCatch(innerFn, self, context);
- if (record.type === "normal") {
- // If an exception is thrown from innerFn, we leave state ===
- // GenStateExecuting and loop back for another invocation.
- state = context.done
- ? GenStateCompleted
- : GenStateSuspendedYield;
-
- if (record.arg === ContinueSentinel) {
- continue;
- }
-
- return {
- value: record.arg,
- done: context.done
- };
-
- } else if (record.type === "throw") {
- state = GenStateCompleted;
- // Dispatch the exception by looping back around to the
- // context.dispatchException(context.arg) call above.
- context.method = "throw";
- context.arg = record.arg;
- }
- }
- };
- }
-
- // Call delegate.iterator[context.method](context.arg) and handle the
- // result, either by returning a { value, done } result from the
- // delegate iterator, or by modifying context.method and context.arg,
- // setting context.delegate to null, and returning the ContinueSentinel.
- function maybeInvokeDelegate(delegate, context) {
- var method = delegate.iterator[context.method];
- if (method === undefined) {
- // A .throw or .return when the delegate iterator has no .throw
- // method always terminates the yield* loop.
- context.delegate = null;
-
- if (context.method === "throw") {
- if (delegate.iterator.return) {
- // If the delegate iterator has a return method, give it a
- // chance to clean up.
- context.method = "return";
- context.arg = undefined;
- maybeInvokeDelegate(delegate, context);
-
- if (context.method === "throw") {
- // If maybeInvokeDelegate(context) changed context.method from
- // "return" to "throw", let that override the TypeError below.
- return ContinueSentinel;
- }
- }
-
- context.method = "throw";
- context.arg = new TypeError(
- "The iterator does not provide a 'throw' method");
- }
-
- return ContinueSentinel;
- }
-
- var record = tryCatch(method, delegate.iterator, context.arg);
-
- if (record.type === "throw") {
- context.method = "throw";
- context.arg = record.arg;
- context.delegate = null;
- return ContinueSentinel;
- }
-
- var info = record.arg;
-
- if (! info) {
- context.method = "throw";
- context.arg = new TypeError("iterator result is not an object");
- context.delegate = null;
- return ContinueSentinel;
- }
-
- if (info.done) {
- // Assign the result of the finished delegate to the temporary
- // variable specified by delegate.resultName (see delegateYield).
- context[delegate.resultName] = info.value;
-
- // Resume execution at the desired location (see delegateYield).
- context.next = delegate.nextLoc;
-
- // If context.method was "throw" but the delegate handled the
- // exception, let the outer generator proceed normally. If
- // context.method was "next", forget context.arg since it has been
- // "consumed" by the delegate iterator. If context.method was
- // "return", allow the original .return call to continue in the
- // outer generator.
- if (context.method !== "return") {
- context.method = "next";
- context.arg = undefined;
- }
-
- } else {
- // Re-yield the result returned by the delegate method.
- return info;
- }
-
- // The delegate iterator is finished, so forget it and continue with
- // the outer generator.
- context.delegate = null;
- return ContinueSentinel;
- }
-
- // Define Generator.prototype.{next,throw,return} in terms of the
- // unified ._invoke helper method.
- defineIteratorMethods(Gp);
-
- Gp[toStringTagSymbol] = "Generator";
-
- // A Generator should always return itself as the iterator object when the
- // @@iterator function is called on it. Some browsers' implementations of the
- // iterator prototype chain incorrectly implement this, causing the Generator
- // object to not be returned from this call. This ensures that doesn't happen.
- // See https://github.com/facebook/regenerator/issues/274 for more details.
- Gp[iteratorSymbol] = function() {
- return this;
- };
-
- Gp.toString = function() {
- return "[object Generator]";
- };
-
- function pushTryEntry(locs) {
- var entry = { tryLoc: locs[0] };
-
- if (1 in locs) {
- entry.catchLoc = locs[1];
- }
-
- if (2 in locs) {
- entry.finallyLoc = locs[2];
- entry.afterLoc = locs[3];
- }
-
- this.tryEntries.push(entry);
- }
-
- function resetTryEntry(entry) {
- var record = entry.completion || {};
- record.type = "normal";
- delete record.arg;
- entry.completion = record;
- }
-
- function Context(tryLocsList) {
- // The root entry object (effectively a try statement without a catch
- // or a finally block) gives us a place to store values thrown from
- // locations where there is no enclosing try statement.
- this.tryEntries = [{ tryLoc: "root" }];
- tryLocsList.forEach(pushTryEntry, this);
- this.reset(true);
- }
-
- runtime.keys = function(object) {
- var keys = [];
- for (var key in object) {
- keys.push(key);
- }
- keys.reverse();
-
- // Rather than returning an object with a next method, we keep
- // things simple and return the next function itself.
- return function next() {
- while (keys.length) {
- var key = keys.pop();
- if (key in object) {
- next.value = key;
- next.done = false;
- return next;
- }
- }
-
- // To avoid creating an additional object, we just hang the .value
- // and .done properties off the next function object itself. This
- // also ensures that the minifier will not anonymize the function.
- next.done = true;
- return next;
- };
- };
-
- function values(iterable) {
- if (iterable) {
- var iteratorMethod = iterable[iteratorSymbol];
- if (iteratorMethod) {
- return iteratorMethod.call(iterable);
- }
-
- if (typeof iterable.next === "function") {
- return iterable;
- }
-
- if (!isNaN(iterable.length)) {
- var i = -1, next = function next() {
- while (++i < iterable.length) {
- if (hasOwn.call(iterable, i)) {
- next.value = iterable[i];
- next.done = false;
- return next;
- }
- }
-
- next.value = undefined;
- next.done = true;
-
- return next;
- };
-
- return next.next = next;
- }
- }
-
- // Return an iterator with no values.
- return { next: doneResult };
- }
- runtime.values = values;
-
- function doneResult() {
- return { value: undefined, done: true };
- }
-
- Context.prototype = {
- constructor: Context,
-
- reset: function(skipTempReset) {
- this.prev = 0;
- this.next = 0;
- // Resetting context._sent for legacy support of Babel's
- // function.sent implementation.
- this.sent = this._sent = undefined;
- this.done = false;
- this.delegate = null;
-
- this.method = "next";
- this.arg = undefined;
-
- this.tryEntries.forEach(resetTryEntry);
-
- if (!skipTempReset) {
- for (var name in this) {
- // Not sure about the optimal order of these conditions:
- if (name.charAt(0) === "t" &&
- hasOwn.call(this, name) &&
- !isNaN(+name.slice(1))) {
- this[name] = undefined;
- }
- }
- }
- },
-
- stop: function() {
- this.done = true;
-
- var rootEntry = this.tryEntries[0];
- var rootRecord = rootEntry.completion;
- if (rootRecord.type === "throw") {
- throw rootRecord.arg;
- }
-
- return this.rval;
- },
-
- dispatchException: function(exception) {
- if (this.done) {
- throw exception;
- }
-
- var context = this;
- function handle(loc, caught) {
- record.type = "throw";
- record.arg = exception;
- context.next = loc;
-
- if (caught) {
- // If the dispatched exception was caught by a catch block,
- // then let that catch block handle the exception normally.
- context.method = "next";
- context.arg = undefined;
- }
-
- return !! caught;
- }
-
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- var record = entry.completion;
-
- if (entry.tryLoc === "root") {
- // Exception thrown outside of any try block that could handle
- // it, so set the completion value of the entire function to
- // throw the exception.
- return handle("end");
- }
-
- if (entry.tryLoc <= this.prev) {
- var hasCatch = hasOwn.call(entry, "catchLoc");
- var hasFinally = hasOwn.call(entry, "finallyLoc");
-
- if (hasCatch && hasFinally) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- } else if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
-
- } else if (hasCatch) {
- if (this.prev < entry.catchLoc) {
- return handle(entry.catchLoc, true);
- }
-
- } else if (hasFinally) {
- if (this.prev < entry.finallyLoc) {
- return handle(entry.finallyLoc);
- }
-
- } else {
- throw new Error("try statement without catch or finally");
- }
- }
- }
- },
-
- abrupt: function(type, arg) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc <= this.prev &&
- hasOwn.call(entry, "finallyLoc") &&
- this.prev < entry.finallyLoc) {
- var finallyEntry = entry;
- break;
- }
- }
-
- if (finallyEntry &&
- (type === "break" ||
- type === "continue") &&
- finallyEntry.tryLoc <= arg &&
- arg <= finallyEntry.finallyLoc) {
- // Ignore the finally entry if control is not jumping to a
- // location outside the try/catch block.
- finallyEntry = null;
- }
-
- var record = finallyEntry ? finallyEntry.completion : {};
- record.type = type;
- record.arg = arg;
-
- if (finallyEntry) {
- this.method = "next";
- this.next = finallyEntry.finallyLoc;
- return ContinueSentinel;
- }
-
- return this.complete(record);
- },
-
- complete: function(record, afterLoc) {
- if (record.type === "throw") {
- throw record.arg;
- }
-
- if (record.type === "break" ||
- record.type === "continue") {
- this.next = record.arg;
- } else if (record.type === "return") {
- this.rval = this.arg = record.arg;
- this.method = "return";
- this.next = "end";
- } else if (record.type === "normal" && afterLoc) {
- this.next = afterLoc;
- }
-
- return ContinueSentinel;
- },
-
- finish: function(finallyLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.finallyLoc === finallyLoc) {
- this.complete(entry.completion, entry.afterLoc);
- resetTryEntry(entry);
- return ContinueSentinel;
- }
- }
- },
-
- "catch": function(tryLoc) {
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
- var entry = this.tryEntries[i];
- if (entry.tryLoc === tryLoc) {
- var record = entry.completion;
- if (record.type === "throw") {
- var thrown = record.arg;
- resetTryEntry(entry);
- }
- return thrown;
- }
- }
-
- // The context.catch method must only be called with a location
- // argument that corresponds to a known catch block.
- throw new Error("illegal catch attempt");
- },
-
- delegateYield: function(iterable, resultName, nextLoc) {
- this.delegate = {
- iterator: values(iterable),
- resultName: resultName,
- nextLoc: nextLoc
- };
-
- if (this.method === "next") {
- // Deliberately forget the last sent value so that we don't
- // accidentally pass it on to the delegate.
- this.arg = undefined;
- }
-
- return ContinueSentinel;
- }
- };
-})(
- // Among the various tricks for obtaining a reference to the global
- // object, this seems to be the most reliable technique that does not
- // use indirect eval (which violates Content Security Policy).
- typeof global === "object" ? global :
- typeof window === "object" ? window :
- typeof self === "object" ? self : this
-);
-
-}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{}]},{},[1]);
-require=(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i...', true, true);
-
-var tok = {
- jsxName: new TokenType('jsxName'),
- jsxText: new TokenType('jsxText', { beforeExpr: true }),
- jsxTagStart: new TokenType('jsxTagStart'),
- jsxTagEnd: new TokenType('jsxTagEnd')
-};
-
-tok.jsxTagStart.updateContext = function () {
- this.context.push(tc_expr); // treat as beginning of JSX expression
- this.context.push(tc_oTag); // start opening tag context
- this.exprAllowed = false;
-};
-tok.jsxTagEnd.updateContext = function (prevType) {
- var out = this.context.pop();
- if (out === tc_oTag && prevType === tt.slash || out === tc_cTag) {
- this.context.pop();
- this.exprAllowed = this.curContext() === tc_expr;
- } else {
- this.exprAllowed = true;
- }
-};
-
-// Transforms JSX element name to string.
-
-function getQualifiedJSXName(object) {
- if (!object) return object;
-
- if (object.type === 'JSXIdentifier') return object.name;
-
- if (object.type === 'JSXNamespacedName') return object.namespace.name + ':' + object.name.name;
-
- if (object.type === 'JSXMemberExpression') return getQualifiedJSXName(object.object) + '.' + getQualifiedJSXName(object.property);
-}
-
-module.exports = function (options) {
- options = options || {};
- return function (Parser) {
- return plugin({
- allowNamespaces: options.allowNamespaces !== false,
- allowNamespacedObjects: !!options.allowNamespacedObjects
- }, Parser);
- };
-};
-module.exports.tokTypes = tok;
-
-function plugin(options, Parser) {
- return function (_Parser) {
- _inherits(_class, _Parser);
-
- function _class() {
- _classCallCheck(this, _class);
-
- return _possibleConstructorReturn(this, (_class.__proto__ || Object.getPrototypeOf(_class)).apply(this, arguments));
- }
-
- _createClass(_class, [{
- key: 'jsx_readToken',
-
- // Reads inline JSX contents token.
- value: function jsx_readToken() {
- var out = '',
- chunkStart = this.pos;
- for (;;) {
- if (this.pos >= this.input.length) this.raise(this.start, 'Unterminated JSX contents');
- var ch = this.input.charCodeAt(this.pos);
-
- switch (ch) {
- case 60: // '<'
- case 123:
- // '{'
- if (this.pos === this.start) {
- if (ch === 60 && this.exprAllowed) {
- ++this.pos;
- return this.finishToken(tok.jsxTagStart);
- }
- return this.getTokenFromCode(ch);
- }
- out += this.input.slice(chunkStart, this.pos);
- return this.finishToken(tok.jsxText, out);
-
- case 38:
- // '&'
- out += this.input.slice(chunkStart, this.pos);
- out += this.jsx_readEntity();
- chunkStart = this.pos;
- break;
-
- default:
- if (isNewLine(ch)) {
- out += this.input.slice(chunkStart, this.pos);
- out += this.jsx_readNewLine(true);
- chunkStart = this.pos;
- } else {
- ++this.pos;
- }
- }
- }
- }
- }, {
- key: 'jsx_readNewLine',
- value: function jsx_readNewLine(normalizeCRLF) {
- var ch = this.input.charCodeAt(this.pos);
- var out = void 0;
- ++this.pos;
- if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
- ++this.pos;
- out = normalizeCRLF ? '\n' : '\r\n';
- } else {
- out = String.fromCharCode(ch);
- }
- if (this.options.locations) {
- ++this.curLine;
- this.lineStart = this.pos;
- }
-
- return out;
- }
- }, {
- key: 'jsx_readString',
- value: function jsx_readString(quote) {
- var out = '',
- chunkStart = ++this.pos;
- for (;;) {
- if (this.pos >= this.input.length) this.raise(this.start, 'Unterminated string constant');
- var ch = this.input.charCodeAt(this.pos);
- if (ch === quote) break;
- if (ch === 38) {
- // '&'
- out += this.input.slice(chunkStart, this.pos);
- out += this.jsx_readEntity();
- chunkStart = this.pos;
- } else if (isNewLine(ch)) {
- out += this.input.slice(chunkStart, this.pos);
- out += this.jsx_readNewLine(false);
- chunkStart = this.pos;
- } else {
- ++this.pos;
- }
- }
- out += this.input.slice(chunkStart, this.pos++);
- return this.finishToken(tt.string, out);
- }
- }, {
- key: 'jsx_readEntity',
- value: function jsx_readEntity() {
- var str = '',
- count = 0,
- entity = void 0;
- var ch = this.input[this.pos];
- if (ch !== '&') this.raise(this.pos, 'Entity must start with an ampersand');
- var startPos = ++this.pos;
- while (this.pos < this.input.length && count++ < 10) {
- ch = this.input[this.pos++];
- if (ch === ';') {
- if (str[0] === '#') {
- if (str[1] === 'x') {
- str = str.substr(2);
- if (hexNumber.test(str)) entity = String.fromCharCode(parseInt(str, 16));
- } else {
- str = str.substr(1);
- if (decimalNumber.test(str)) entity = String.fromCharCode(parseInt(str, 10));
- }
- } else {
- entity = XHTMLEntities[str];
- }
- break;
- }
- str += ch;
- }
- if (!entity) {
- this.pos = startPos;
- return '&';
- }
- return entity;
- }
-
- // Read a JSX identifier (valid tag or attribute name).
- //
- // Optimized version since JSX identifiers can't contain
- // escape characters and so can be read as single slice.
- // Also assumes that first character was already checked
- // by isIdentifierStart in readToken.
-
- }, {
- key: 'jsx_readWord',
- value: function jsx_readWord() {
- var ch = void 0,
- start = this.pos;
- do {
- ch = this.input.charCodeAt(++this.pos);
- } while (isIdentifierChar(ch) || ch === 45); // '-'
- return this.finishToken(tok.jsxName, this.input.slice(start, this.pos));
- }
-
- // Parse next token as JSX identifier
-
- }, {
- key: 'jsx_parseIdentifier',
- value: function jsx_parseIdentifier() {
- var node = this.startNode();
- if (this.type === tok.jsxName) node.name = this.value;else if (this.type.keyword) node.name = this.type.keyword;else this.unexpected();
- this.next();
- return this.finishNode(node, 'JSXIdentifier');
- }
-
- // Parse namespaced identifier.
-
- }, {
- key: 'jsx_parseNamespacedName',
- value: function jsx_parseNamespacedName() {
- var startPos = this.start,
- startLoc = this.startLoc;
- var name = this.jsx_parseIdentifier();
- if (!options.allowNamespaces || !this.eat(tt.colon)) return name;
- var node = this.startNodeAt(startPos, startLoc);
- node.namespace = name;
- node.name = this.jsx_parseIdentifier();
- return this.finishNode(node, 'JSXNamespacedName');
- }
-
- // Parses element name in any form - namespaced, member
- // or single identifier.
-
- }, {
- key: 'jsx_parseElementName',
- value: function jsx_parseElementName() {
- if (this.type === tok.jsxTagEnd) return '';
- var startPos = this.start,
- startLoc = this.startLoc;
- var node = this.jsx_parseNamespacedName();
- if (this.type === tt.dot && node.type === 'JSXNamespacedName' && !options.allowNamespacedObjects) {
- this.unexpected();
- }
- while (this.eat(tt.dot)) {
- var newNode = this.startNodeAt(startPos, startLoc);
- newNode.object = node;
- newNode.property = this.jsx_parseIdentifier();
- node = this.finishNode(newNode, 'JSXMemberExpression');
- }
- return node;
- }
-
- // Parses any type of JSX attribute value.
-
- }, {
- key: 'jsx_parseAttributeValue',
- value: function jsx_parseAttributeValue() {
- switch (this.type) {
- case tt.braceL:
- var node = this.jsx_parseExpressionContainer();
- if (node.expression.type === 'JSXEmptyExpression') this.raise(node.start, 'JSX attributes must only be assigned a non-empty expression');
- return node;
-
- case tok.jsxTagStart:
- case tt.string:
- return this.parseExprAtom();
-
- default:
- this.raise(this.start, 'JSX value should be either an expression or a quoted JSX text');
- }
- }
-
- // JSXEmptyExpression is unique type since it doesn't actually parse anything,
- // and so it should start at the end of last read token (left brace) and finish
- // at the beginning of the next one (right brace).
-
- }, {
- key: 'jsx_parseEmptyExpression',
- value: function jsx_parseEmptyExpression() {
- var node = this.startNodeAt(this.lastTokEnd, this.lastTokEndLoc);
- return this.finishNodeAt(node, 'JSXEmptyExpression', this.start, this.startLoc);
- }
-
- // Parses JSX expression enclosed into curly brackets.
-
- }, {
- key: 'jsx_parseExpressionContainer',
- value: function jsx_parseExpressionContainer() {
- var node = this.startNode();
- this.next();
- node.expression = this.type === tt.braceR ? this.jsx_parseEmptyExpression() : this.parseExpression();
- this.expect(tt.braceR);
- return this.finishNode(node, 'JSXExpressionContainer');
- }
-
- // Parses following JSX attribute name-value pair.
-
- }, {
- key: 'jsx_parseAttribute',
- value: function jsx_parseAttribute() {
- var node = this.startNode();
- if (this.eat(tt.braceL)) {
- this.expect(tt.ellipsis);
- node.argument = this.parseMaybeAssign();
- this.expect(tt.braceR);
- return this.finishNode(node, 'JSXSpreadAttribute');
- }
- node.name = this.jsx_parseNamespacedName();
- node.value = this.eat(tt.eq) ? this.jsx_parseAttributeValue() : null;
- return this.finishNode(node, 'JSXAttribute');
- }
-
- // Parses JSX opening tag starting after '<'.
-
- }, {
- key: 'jsx_parseOpeningElementAt',
- value: function jsx_parseOpeningElementAt(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
- node.attributes = [];
- var nodeName = this.jsx_parseElementName();
- if (nodeName) node.name = nodeName;
- while (this.type !== tt.slash && this.type !== tok.jsxTagEnd) {
- node.attributes.push(this.jsx_parseAttribute());
- }node.selfClosing = this.eat(tt.slash);
- this.expect(tok.jsxTagEnd);
- return this.finishNode(node, nodeName ? 'JSXOpeningElement' : 'JSXOpeningFragment');
- }
-
- // Parses JSX closing tag starting after ''.
-
- }, {
- key: 'jsx_parseClosingElementAt',
- value: function jsx_parseClosingElementAt(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
- var nodeName = this.jsx_parseElementName();
- if (nodeName) node.name = nodeName;
- this.expect(tok.jsxTagEnd);
- return this.finishNode(node, nodeName ? 'JSXClosingElement' : 'JSXClosingFragment');
- }
-
- // Parses entire JSX element, including it's opening tag
- // (starting after '<'), attributes, contents and closing tag.
-
- }, {
- key: 'jsx_parseElementAt',
- value: function jsx_parseElementAt(startPos, startLoc) {
- var node = this.startNodeAt(startPos, startLoc);
- var children = [];
- var openingElement = this.jsx_parseOpeningElementAt(startPos, startLoc);
- var closingElement = null;
-
- if (!openingElement.selfClosing) {
- contents: for (;;) {
- switch (this.type) {
- case tok.jsxTagStart:
- startPos = this.start;startLoc = this.startLoc;
- this.next();
- if (this.eat(tt.slash)) {
- closingElement = this.jsx_parseClosingElementAt(startPos, startLoc);
- break contents;
- }
- children.push(this.jsx_parseElementAt(startPos, startLoc));
- break;
-
- case tok.jsxText:
- children.push(this.parseExprAtom());
- break;
-
- case tt.braceL:
- children.push(this.jsx_parseExpressionContainer());
- break;
-
- default:
- this.unexpected();
- }
- }
- if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
- this.raise(closingElement.start, 'Expected corresponding JSX closing tag for <' + getQualifiedJSXName(openingElement.name) + '>');
- }
- }
- var fragmentOrElement = openingElement.name ? 'Element' : 'Fragment';
-
- node['opening' + fragmentOrElement] = openingElement;
- node['closing' + fragmentOrElement] = closingElement;
- node.children = children;
- if (this.type === tt.relational && this.value === "<") {
- this.raise(this.start, "Adjacent JSX elements must be wrapped in an enclosing tag");
- }
- return this.finishNode(node, 'JSX' + fragmentOrElement);
- }
-
- // Parse JSX text
-
- }, {
- key: 'jsx_parseText',
- value: function jsx_parseText(value) {
- var node = this.parseLiteral(value);
- node.type = "JSXText";
- return node;
- }
-
- // Parses entire JSX element from current position.
-
- }, {
- key: 'jsx_parseElement',
- value: function jsx_parseElement() {
- var startPos = this.start,
- startLoc = this.startLoc;
- this.next();
- return this.jsx_parseElementAt(startPos, startLoc);
- }
- }, {
- key: 'parseExprAtom',
- value: function parseExprAtom(refShortHandDefaultPos) {
- if (this.type === tok.jsxText) return this.jsx_parseText(this.value);else if (this.type === tok.jsxTagStart) return this.jsx_parseElement();else return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'parseExprAtom', this).call(this, refShortHandDefaultPos);
- }
- }, {
- key: 'readToken',
- value: function readToken(code) {
- var context = this.curContext();
-
- if (context === tc_expr) return this.jsx_readToken();
-
- if (context === tc_oTag || context === tc_cTag) {
- if (isIdentifierStart(code)) return this.jsx_readWord();
-
- if (code == 62) {
- ++this.pos;
- return this.finishToken(tok.jsxTagEnd);
- }
-
- if ((code === 34 || code === 39) && context == tc_oTag) return this.jsx_readString(code);
- }
-
- if (code === 60 && this.exprAllowed && this.input.charCodeAt(this.pos + 1) !== 33) {
- ++this.pos;
- return this.finishToken(tok.jsxTagStart);
- }
- return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'readToken', this).call(this, code);
- }
- }, {
- key: 'updateContext',
- value: function updateContext(prevType) {
- if (this.type == tt.braceL) {
- var curContext = this.curContext();
- if (curContext == tc_oTag) this.context.push(tokContexts.b_expr);else if (curContext == tc_expr) this.context.push(tokContexts.b_tmpl);else _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'updateContext', this).call(this, prevType);
- this.exprAllowed = true;
- } else if (this.type === tt.slash && prevType === tok.jsxTagStart) {
- this.context.length -= 2; // do not consider JSX expr -> JSX open tag -> ... anymore
- this.context.push(tc_cTag); // reconsider as closing tag context
- this.exprAllowed = false;
- } else {
- return _get(_class.prototype.__proto__ || Object.getPrototypeOf(_class.prototype), 'updateContext', this).call(this, prevType);
- }
- }
- }]);
-
- return _class;
- }(Parser);
-}
-
-},{"./xhtml":2,"acorn":3}],2:[function(require,module,exports){
-'use strict';
-
-module.exports = {
- quot: '"',
- amp: '&',
- apos: '\'',
- lt: '<',
- gt: '>',
- nbsp: '\xA0',
- iexcl: '\xA1',
- cent: '\xA2',
- pound: '\xA3',
- curren: '\xA4',
- yen: '\xA5',
- brvbar: '\xA6',
- sect: '\xA7',
- uml: '\xA8',
- copy: '\xA9',
- ordf: '\xAA',
- laquo: '\xAB',
- not: '\xAC',
- shy: '\xAD',
- reg: '\xAE',
- macr: '\xAF',
- deg: '\xB0',
- plusmn: '\xB1',
- sup2: '\xB2',
- sup3: '\xB3',
- acute: '\xB4',
- micro: '\xB5',
- para: '\xB6',
- middot: '\xB7',
- cedil: '\xB8',
- sup1: '\xB9',
- ordm: '\xBA',
- raquo: '\xBB',
- frac14: '\xBC',
- frac12: '\xBD',
- frac34: '\xBE',
- iquest: '\xBF',
- Agrave: '\xC0',
- Aacute: '\xC1',
- Acirc: '\xC2',
- Atilde: '\xC3',
- Auml: '\xC4',
- Aring: '\xC5',
- AElig: '\xC6',
- Ccedil: '\xC7',
- Egrave: '\xC8',
- Eacute: '\xC9',
- Ecirc: '\xCA',
- Euml: '\xCB',
- Igrave: '\xCC',
- Iacute: '\xCD',
- Icirc: '\xCE',
- Iuml: '\xCF',
- ETH: '\xD0',
- Ntilde: '\xD1',
- Ograve: '\xD2',
- Oacute: '\xD3',
- Ocirc: '\xD4',
- Otilde: '\xD5',
- Ouml: '\xD6',
- times: '\xD7',
- Oslash: '\xD8',
- Ugrave: '\xD9',
- Uacute: '\xDA',
- Ucirc: '\xDB',
- Uuml: '\xDC',
- Yacute: '\xDD',
- THORN: '\xDE',
- szlig: '\xDF',
- agrave: '\xE0',
- aacute: '\xE1',
- acirc: '\xE2',
- atilde: '\xE3',
- auml: '\xE4',
- aring: '\xE5',
- aelig: '\xE6',
- ccedil: '\xE7',
- egrave: '\xE8',
- eacute: '\xE9',
- ecirc: '\xEA',
- euml: '\xEB',
- igrave: '\xEC',
- iacute: '\xED',
- icirc: '\xEE',
- iuml: '\xEF',
- eth: '\xF0',
- ntilde: '\xF1',
- ograve: '\xF2',
- oacute: '\xF3',
- ocirc: '\xF4',
- otilde: '\xF5',
- ouml: '\xF6',
- divide: '\xF7',
- oslash: '\xF8',
- ugrave: '\xF9',
- uacute: '\xFA',
- ucirc: '\xFB',
- uuml: '\xFC',
- yacute: '\xFD',
- thorn: '\xFE',
- yuml: '\xFF',
- OElig: '\u0152',
- oelig: '\u0153',
- Scaron: '\u0160',
- scaron: '\u0161',
- Yuml: '\u0178',
- fnof: '\u0192',
- circ: '\u02C6',
- tilde: '\u02DC',
- Alpha: '\u0391',
- Beta: '\u0392',
- Gamma: '\u0393',
- Delta: '\u0394',
- Epsilon: '\u0395',
- Zeta: '\u0396',
- Eta: '\u0397',
- Theta: '\u0398',
- Iota: '\u0399',
- Kappa: '\u039A',
- Lambda: '\u039B',
- Mu: '\u039C',
- Nu: '\u039D',
- Xi: '\u039E',
- Omicron: '\u039F',
- Pi: '\u03A0',
- Rho: '\u03A1',
- Sigma: '\u03A3',
- Tau: '\u03A4',
- Upsilon: '\u03A5',
- Phi: '\u03A6',
- Chi: '\u03A7',
- Psi: '\u03A8',
- Omega: '\u03A9',
- alpha: '\u03B1',
- beta: '\u03B2',
- gamma: '\u03B3',
- delta: '\u03B4',
- epsilon: '\u03B5',
- zeta: '\u03B6',
- eta: '\u03B7',
- theta: '\u03B8',
- iota: '\u03B9',
- kappa: '\u03BA',
- lambda: '\u03BB',
- mu: '\u03BC',
- nu: '\u03BD',
- xi: '\u03BE',
- omicron: '\u03BF',
- pi: '\u03C0',
- rho: '\u03C1',
- sigmaf: '\u03C2',
- sigma: '\u03C3',
- tau: '\u03C4',
- upsilon: '\u03C5',
- phi: '\u03C6',
- chi: '\u03C7',
- psi: '\u03C8',
- omega: '\u03C9',
- thetasym: '\u03D1',
- upsih: '\u03D2',
- piv: '\u03D6',
- ensp: '\u2002',
- emsp: '\u2003',
- thinsp: '\u2009',
- zwnj: '\u200C',
- zwj: '\u200D',
- lrm: '\u200E',
- rlm: '\u200F',
- ndash: '\u2013',
- mdash: '\u2014',
- lsquo: '\u2018',
- rsquo: '\u2019',
- sbquo: '\u201A',
- ldquo: '\u201C',
- rdquo: '\u201D',
- bdquo: '\u201E',
- dagger: '\u2020',
- Dagger: '\u2021',
- bull: '\u2022',
- hellip: '\u2026',
- permil: '\u2030',
- prime: '\u2032',
- Prime: '\u2033',
- lsaquo: '\u2039',
- rsaquo: '\u203A',
- oline: '\u203E',
- frasl: '\u2044',
- euro: '\u20AC',
- image: '\u2111',
- weierp: '\u2118',
- real: '\u211C',
- trade: '\u2122',
- alefsym: '\u2135',
- larr: '\u2190',
- uarr: '\u2191',
- rarr: '\u2192',
- darr: '\u2193',
- harr: '\u2194',
- crarr: '\u21B5',
- lArr: '\u21D0',
- uArr: '\u21D1',
- rArr: '\u21D2',
- dArr: '\u21D3',
- hArr: '\u21D4',
- forall: '\u2200',
- part: '\u2202',
- exist: '\u2203',
- empty: '\u2205',
- nabla: '\u2207',
- isin: '\u2208',
- notin: '\u2209',
- ni: '\u220B',
- prod: '\u220F',
- sum: '\u2211',
- minus: '\u2212',
- lowast: '\u2217',
- radic: '\u221A',
- prop: '\u221D',
- infin: '\u221E',
- ang: '\u2220',
- and: '\u2227',
- or: '\u2228',
- cap: '\u2229',
- cup: '\u222A',
- 'int': '\u222B',
- there4: '\u2234',
- sim: '\u223C',
- cong: '\u2245',
- asymp: '\u2248',
- ne: '\u2260',
- equiv: '\u2261',
- le: '\u2264',
- ge: '\u2265',
- sub: '\u2282',
- sup: '\u2283',
- nsub: '\u2284',
- sube: '\u2286',
- supe: '\u2287',
- oplus: '\u2295',
- otimes: '\u2297',
- perp: '\u22A5',
- sdot: '\u22C5',
- lceil: '\u2308',
- rceil: '\u2309',
- lfloor: '\u230A',
- rfloor: '\u230B',
- lang: '\u2329',
- rang: '\u232A',
- loz: '\u25CA',
- spades: '\u2660',
- clubs: '\u2663',
- hearts: '\u2665',
- diams: '\u2666'
-};
-
-},{}],3:[function(require,module,exports){
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-(function (global, factory) {
- (typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : factory(global.acorn = {});
-})(undefined, function (exports) {
- 'use strict';
-
- // Reserved word lists for various dialects of the language
-
- var reservedWords = {
- 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
- 5: "class enum extends super const export import",
- 6: "enum",
- strict: "implements interface let package private protected public static yield",
- strictBind: "eval arguments"
- };
-
- // And the keywords
-
- var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
-
- var keywords = {
- 5: ecma5AndLessKeywords,
- 6: ecma5AndLessKeywords + " const class extends export import super"
- };
-
- var keywordRelationalOperator = /^in(stanceof)?$/;
-
- // ## Character categories
-
- // Big ugly regular expressions that match characters in the
- // whitespace, identifier, and identifier-start categories. These
- // are only applied when a character is found to actually have a
- // code point above 128.
- // Generated by `bin/generate-identifier-regex.js`.
-
- var nonASCIIidentifierStartChars = '\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';
- var nonASCIIidentifierChars = '\u200C\u200D\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\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';
-
- var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
- var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
-
- nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
-
- // These are a run-length and offset encoded representation of the
- // >0xffff code points that are a valid part of identifiers. The
- // offset starts at 0x10000, and each pair of numbers represents an
- // offset to the next range, and then a size of the range. They were
- // generated by bin/generate-identifier-regex.js
-
- // eslint-disable-next-line comma-spacing
- var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 477, 28, 11, 0, 9, 21, 190, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 26, 230, 43, 117, 63, 32, 0, 257, 0, 11, 39, 8, 0, 22, 0, 12, 39, 3, 3, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 270, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 68, 12, 0, 67, 12, 65, 1, 31, 6129, 15, 754, 9486, 286, 82, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541];
-
- // eslint-disable-next-line comma-spacing
- var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 525, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 280, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239];
-
- // This has a complexity linear to the value of the code. The
- // assumption is that looking up astral identifier characters is
- // rare.
- function isInAstralSet(code, set) {
- var pos = 0x10000;
- for (var i = 0; i < set.length; i += 2) {
- pos += set[i];
- if (pos > code) {
- return false;
- }
- pos += set[i + 1];
- if (pos >= code) {
- return true;
- }
- }
- }
-
- // Test whether a given character code starts an identifier.
-
- function isIdentifierStart(code, astral) {
- if (code < 65) {
- return code === 36;
- }
- if (code < 91) {
- return true;
- }
- if (code < 97) {
- return code === 95;
- }
- if (code < 123) {
- return true;
- }
- if (code <= 0xffff) {
- return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
- }
- if (astral === false) {
- return false;
- }
- return isInAstralSet(code, astralIdentifierStartCodes);
- }
-
- // Test whether a given character is part of an identifier.
-
- function isIdentifierChar(code, astral) {
- if (code < 48) {
- return code === 36;
- }
- if (code < 58) {
- return true;
- }
- if (code < 65) {
- return false;
- }
- if (code < 91) {
- return true;
- }
- if (code < 97) {
- return code === 95;
- }
- if (code < 123) {
- return true;
- }
- if (code <= 0xffff) {
- return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
- }
- if (astral === false) {
- return false;
- }
- return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
- }
-
- // ## Token types
-
- // The assignment of fine-grained, information-carrying type objects
- // allows the tokenizer to store the information it has about a
- // token in a way that is very cheap for the parser to look up.
-
- // All token type variables start with an underscore, to make them
- // easy to recognize.
-
- // The `beforeExpr` property is used to disambiguate between regular
- // expressions and divisions. It is set on all token types that can
- // be followed by an expression (thus, a slash after them would be a
- // regular expression).
- //
- // The `startsExpr` property is used to check if the token ends a
- // `yield` expression. It is set on all token types that either can
- // directly start an expression (like a quotation mark) or can
- // continue an expression (like the body of a string).
- //
- // `isLoop` marks a keyword as starting a loop, which is important
- // to know when parsing a label, in order to allow or disallow
- // continue jumps to that label.
-
- var TokenType = function TokenType(label, conf) {
- if (conf === void 0) conf = {};
-
- this.label = label;
- this.keyword = conf.keyword;
- this.beforeExpr = !!conf.beforeExpr;
- this.startsExpr = !!conf.startsExpr;
- this.isLoop = !!conf.isLoop;
- this.isAssign = !!conf.isAssign;
- this.prefix = !!conf.prefix;
- this.postfix = !!conf.postfix;
- this.binop = conf.binop || null;
- this.updateContext = null;
- };
-
- function binop(name, prec) {
- return new TokenType(name, { beforeExpr: true, binop: prec });
- }
- var beforeExpr = { beforeExpr: true };
- var startsExpr = { startsExpr: true };
-
- // Map keyword names to token types.
-
- var keywords$1 = {};
-
- // Succinct definitions of keyword token types
- function kw(name, options) {
- if (options === void 0) options = {};
-
- options.keyword = name;
- return keywords$1[name] = new TokenType(name, options);
- }
-
- var types = {
- num: new TokenType("num", startsExpr),
- regexp: new TokenType("regexp", startsExpr),
- string: new TokenType("string", startsExpr),
- name: new TokenType("name", startsExpr),
- eof: new TokenType("eof"),
-
- // Punctuation token types.
- bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
- bracketR: new TokenType("]"),
- braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
- braceR: new TokenType("}"),
- parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
- parenR: new TokenType(")"),
- comma: new TokenType(",", beforeExpr),
- semi: new TokenType(";", beforeExpr),
- colon: new TokenType(":", beforeExpr),
- dot: new TokenType("."),
- question: new TokenType("?", beforeExpr),
- arrow: new TokenType("=>", beforeExpr),
- template: new TokenType("template"),
- invalidTemplate: new TokenType("invalidTemplate"),
- ellipsis: new TokenType("...", beforeExpr),
- backQuote: new TokenType("`", startsExpr),
- dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),
-
- // Operators. These carry several kinds of properties to help the
- // parser use them properly (the presence of these properties is
- // what categorizes them as operators).
- //
- // `binop`, when present, specifies that this operator is a binary
- // operator, and will refer to its precedence.
- //
- // `prefix` and `postfix` mark the operator as a prefix or postfix
- // unary operator.
- //
- // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
- // binary operators with a very low precedence, that should result
- // in AssignmentExpression nodes.
-
- eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
- assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
- incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
- prefix: new TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }),
- logicalOR: binop("||", 1),
- logicalAND: binop("&&", 2),
- bitwiseOR: binop("|", 3),
- bitwiseXOR: binop("^", 4),
- bitwiseAND: binop("&", 5),
- equality: binop("==/!=/===/!==", 6),
- relational: binop(">/<=/>=", 7),
- bitShift: binop("<>>/>>>", 8),
- plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
- modulo: binop("%", 10),
- star: binop("*", 10),
- slash: binop("/", 10),
- starstar: new TokenType("**", { beforeExpr: true }),
-
- // Keyword token types.
- _break: kw("break"),
- _case: kw("case", beforeExpr),
- _catch: kw("catch"),
- _continue: kw("continue"),
- _debugger: kw("debugger"),
- _default: kw("default", beforeExpr),
- _do: kw("do", { isLoop: true, beforeExpr: true }),
- _else: kw("else", beforeExpr),
- _finally: kw("finally"),
- _for: kw("for", { isLoop: true }),
- _function: kw("function", startsExpr),
- _if: kw("if"),
- _return: kw("return", beforeExpr),
- _switch: kw("switch"),
- _throw: kw("throw", beforeExpr),
- _try: kw("try"),
- _var: kw("var"),
- _const: kw("const"),
- _while: kw("while", { isLoop: true }),
- _with: kw("with"),
- _new: kw("new", { beforeExpr: true, startsExpr: true }),
- _this: kw("this", startsExpr),
- _super: kw("super", startsExpr),
- _class: kw("class", startsExpr),
- _extends: kw("extends", beforeExpr),
- _export: kw("export"),
- _import: kw("import"),
- _null: kw("null", startsExpr),
- _true: kw("true", startsExpr),
- _false: kw("false", startsExpr),
- _in: kw("in", { beforeExpr: true, binop: 7 }),
- _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }),
- _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }),
- _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }),
- _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true })
- };
-
- // Matches a whole line break (where CRLF is considered a single
- // line break). Used to count lines.
-
- var lineBreak = /\r\n?|\n|\u2028|\u2029/;
- var lineBreakG = new RegExp(lineBreak.source, "g");
-
- function isNewLine(code, ecma2019String) {
- return code === 10 || code === 13 || !ecma2019String && (code === 0x2028 || code === 0x2029);
- }
-
- var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
-
- var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
-
- var ref = Object.prototype;
- var hasOwnProperty = ref.hasOwnProperty;
- var toString = ref.toString;
-
- // Checks if an object has a property.
-
- function has(obj, propName) {
- return hasOwnProperty.call(obj, propName);
- }
-
- var isArray = Array.isArray || function (obj) {
- return toString.call(obj) === "[object Array]";
- };
-
- // These are used when `options.locations` is on, for the
- // `startLoc` and `endLoc` properties.
-
- var Position = function Position(line, col) {
- this.line = line;
- this.column = col;
- };
-
- Position.prototype.offset = function offset(n) {
- return new Position(this.line, this.column + n);
- };
-
- var SourceLocation = function SourceLocation(p, start, end) {
- this.start = start;
- this.end = end;
- if (p.sourceFile !== null) {
- this.source = p.sourceFile;
- }
- };
-
- // The `getLineInfo` function is mostly useful when the
- // `locations` option is off (for performance reasons) and you
- // want to find the line/column position for a given character
- // offset. `input` should be the code string that the offset refers
- // into.
-
- function getLineInfo(input, offset) {
- for (var line = 1, cur = 0;;) {
- lineBreakG.lastIndex = cur;
- var match = lineBreakG.exec(input);
- if (match && match.index < offset) {
- ++line;
- cur = match.index + match[0].length;
- } else {
- return new Position(line, offset - cur);
- }
- }
- }
-
- // A second optional argument can be given to further configure
- // the parser process. These options are recognized:
-
- var defaultOptions = {
- // `ecmaVersion` indicates the ECMAScript version to parse. Must be
- // either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), or 10
- // (2019). This influences support for strict mode, the set of
- // reserved words, and support for new syntax features. The default
- // is 9.
- ecmaVersion: 9,
- // `sourceType` indicates the mode the code should be parsed in.
- // Can be either `"script"` or `"module"`. This influences global
- // strict mode and parsing of `import` and `export` declarations.
- sourceType: "script",
- // `onInsertedSemicolon` can be a callback that will be called
- // when a semicolon is automatically inserted. It will be passed
- // th position of the comma as an offset, and if `locations` is
- // enabled, it is given the location as a `{line, column}` object
- // as second argument.
- onInsertedSemicolon: null,
- // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
- // trailing commas.
- onTrailingComma: null,
- // By default, reserved words are only enforced if ecmaVersion >= 5.
- // Set `allowReserved` to a boolean value to explicitly turn this on
- // an off. When this option has the value "never", reserved words
- // and keywords can also not be used as property names.
- allowReserved: null,
- // When enabled, a return at the top level is not considered an
- // error.
- allowReturnOutsideFunction: false,
- // When enabled, import/export statements are not constrained to
- // appearing at the top of the program.
- allowImportExportEverywhere: false,
- // When enabled, await identifiers are allowed to appear at the top-level scope,
- // but they are still not allowed in non-async functions.
- allowAwaitOutsideFunction: false,
- // When enabled, hashbang directive in the beginning of file
- // is allowed and treated as a line comment.
- allowHashBang: false,
- // When `locations` is on, `loc` properties holding objects with
- // `start` and `end` properties in `{line, column}` form (with
- // line being 1-based and column 0-based) will be attached to the
- // nodes.
- locations: false,
- // A function can be passed as `onToken` option, which will
- // cause Acorn to call that function with object in the same
- // format as tokens returned from `tokenizer().getToken()`. Note
- // that you are not allowed to call the parser from the
- // callback—that will corrupt its internal state.
- onToken: null,
- // A function can be passed as `onComment` option, which will
- // cause Acorn to call that function with `(block, text, start,
- // end)` parameters whenever a comment is skipped. `block` is a
- // boolean indicating whether this is a block (`/* */`) comment,
- // `text` is the content of the comment, and `start` and `end` are
- // character offsets that denote the start and end of the comment.
- // When the `locations` option is on, two more parameters are
- // passed, the full `{line, column}` locations of the start and
- // end of the comments. Note that you are not allowed to call the
- // parser from the callback—that will corrupt its internal state.
- onComment: null,
- // Nodes have their start and end characters offsets recorded in
- // `start` and `end` properties (directly on the node, rather than
- // the `loc` object, which holds line/column data. To also add a
- // [semi-standardized][range] `range` property holding a `[start,
- // end]` array with the same numbers, set the `ranges` option to
- // `true`.
- //
- // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
- ranges: false,
- // It is possible to parse multiple files into a single AST by
- // passing the tree produced by parsing the first file as
- // `program` option in subsequent parses. This will add the
- // toplevel forms of the parsed file to the `Program` (top) node
- // of an existing parse tree.
- program: null,
- // When `locations` is on, you can pass this to record the source
- // file in every node's `loc` object.
- sourceFile: null,
- // This value, if given, is stored in every node, whether
- // `locations` is on or off.
- directSourceFile: null,
- // When enabled, parenthesized expressions are represented by
- // (non-standard) ParenthesizedExpression nodes
- preserveParens: false
- };
-
- // Interpret and default an options object
-
- function getOptions(opts) {
- var options = {};
-
- for (var opt in defaultOptions) {
- options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt];
- }
-
- if (options.ecmaVersion >= 2015) {
- options.ecmaVersion -= 2009;
- }
-
- if (options.allowReserved == null) {
- options.allowReserved = options.ecmaVersion < 5;
- }
-
- if (isArray(options.onToken)) {
- var tokens = options.onToken;
- options.onToken = function (token) {
- return tokens.push(token);
- };
- }
- if (isArray(options.onComment)) {
- options.onComment = pushComment(options, options.onComment);
- }
-
- return options;
- }
-
- function pushComment(options, array) {
- return function (block, text, start, end, startLoc, endLoc) {
- var comment = {
- type: block ? "Block" : "Line",
- value: text,
- start: start,
- end: end
- };
- if (options.locations) {
- comment.loc = new SourceLocation(this, startLoc, endLoc);
- }
- if (options.ranges) {
- comment.range = [start, end];
- }
- array.push(comment);
- };
- }
-
- // Each scope gets a bitset that may contain these flags
- var SCOPE_TOP = 1;
- var SCOPE_FUNCTION = 2;
- var SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION;
- var SCOPE_ASYNC = 4;
- var SCOPE_GENERATOR = 8;
- var SCOPE_ARROW = 16;
- var SCOPE_SIMPLE_CATCH = 32;
- var SCOPE_SUPER = 64;
- var SCOPE_DIRECT_SUPER = 128;
-
- function functionFlags(async, generator) {
- return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0);
- }
-
- // Used in checkLVal and declareName to determine the type of a binding
- var BIND_NONE = 0;
- var BIND_VAR = 1;
- var BIND_LEXICAL = 2;
- var BIND_FUNCTION = 3;
- var BIND_SIMPLE_CATCH = 4;
- var BIND_OUTSIDE = 5; // Special case for function names as bound inside the function
-
- function keywordRegexp(words) {
- return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$");
- }
-
- var Parser = function Parser(options, input, startPos) {
- this.options = options = getOptions(options);
- this.sourceFile = options.sourceFile;
- this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]);
- var reserved = "";
- if (!options.allowReserved) {
- for (var v = options.ecmaVersion;; v--) {
- if (reserved = reservedWords[v]) {
- break;
- }
- }
- if (options.sourceType === "module") {
- reserved += " await";
- }
- }
- this.reservedWords = keywordRegexp(reserved);
- var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict;
- this.reservedWordsStrict = keywordRegexp(reservedStrict);
- this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind);
- this.input = String(input);
-
- // Used to signal to callers of `readWord1` whether the word
- // contained any escape sequences. This is needed because words with
- // escape sequences must not be interpreted as keywords.
- this.containsEsc = false;
-
- // Set up token state
-
- // The current position of the tokenizer in the input.
- if (startPos) {
- this.pos = startPos;
- this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1;
- this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
- } else {
- this.pos = this.lineStart = 0;
- this.curLine = 1;
- }
-
- // Properties of the current token:
- // Its type
- this.type = types.eof;
- // For tokens that include more information than their type, the value
- this.value = null;
- // Its start and end offset
- this.start = this.end = this.pos;
- // And, if locations are used, the {line, column} object
- // corresponding to those offsets
- this.startLoc = this.endLoc = this.curPosition();
-
- // Position information for the previous token
- this.lastTokEndLoc = this.lastTokStartLoc = null;
- this.lastTokStart = this.lastTokEnd = this.pos;
-
- // The context stack is used to superficially track syntactic
- // context to predict whether a regular expression is allowed in a
- // given position.
- this.context = this.initialContext();
- this.exprAllowed = true;
-
- // Figure out if it's a module code.
- this.inModule = options.sourceType === "module";
- this.strict = this.inModule || this.strictDirective(this.pos);
-
- // Used to signify the start of a potential arrow function
- this.potentialArrowAt = -1;
-
- // Positions to delayed-check that yield/await does not exist in default parameters.
- this.yieldPos = this.awaitPos = 0;
- // Labels in scope.
- this.labels = [];
-
- // If enabled, skip leading hashbang line.
- if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") {
- this.skipLineComment(2);
- }
-
- // Scope tracking for duplicate variable names (see scope.js)
- this.scopeStack = [];
- this.enterScope(SCOPE_TOP);
-
- // For RegExp validation
- this.regexpState = null;
- };
-
- var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true } };
-
- Parser.prototype.parse = function parse() {
- var node = this.options.program || this.startNode();
- this.nextToken();
- return this.parseTopLevel(node);
- };
-
- prototypeAccessors.inFunction.get = function () {
- return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
- };
- prototypeAccessors.inGenerator.get = function () {
- return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0;
- };
- prototypeAccessors.inAsync.get = function () {
- return (this.currentVarScope().flags & SCOPE_ASYNC) > 0;
- };
- prototypeAccessors.allowSuper.get = function () {
- return (this.currentThisScope().flags & SCOPE_SUPER) > 0;
- };
- prototypeAccessors.allowDirectSuper.get = function () {
- return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0;
- };
-
- // Switch to a getter for 7.0.0.
- Parser.prototype.inNonArrowFunction = function inNonArrowFunction() {
- return (this.currentThisScope().flags & SCOPE_FUNCTION) > 0;
- };
-
- Parser.extend = function extend() {
- var plugins = [],
- len = arguments.length;
- while (len--) {
- plugins[len] = arguments[len];
- }var cls = this;
- for (var i = 0; i < plugins.length; i++) {
- cls = plugins[i](cls);
- }
- return cls;
- };
-
- Parser.parse = function parse(input, options) {
- return new this(options, input).parse();
- };
-
- Parser.parseExpressionAt = function parseExpressionAt(input, pos, options) {
- var parser = new this(options, input, pos);
- parser.nextToken();
- return parser.parseExpression();
- };
-
- Parser.tokenizer = function tokenizer(input, options) {
- return new this(options, input);
- };
-
- Object.defineProperties(Parser.prototype, prototypeAccessors);
-
- var pp = Parser.prototype;
-
- // ## Parser utilities
-
- var literal = /^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/;
- pp.strictDirective = function (start) {
- var this$1 = this;
-
- for (;;) {
- skipWhiteSpace.lastIndex = start;
- start += skipWhiteSpace.exec(this$1.input)[0].length;
- var match = literal.exec(this$1.input.slice(start));
- if (!match) {
- return false;
- }
- if ((match[1] || match[2]) === "use strict") {
- return true;
- }
- start += match[0].length;
- }
- };
-
- // Predicate that tests whether the next token is of the given
- // type, and if yes, consumes it as a side effect.
-
- pp.eat = function (type) {
- if (this.type === type) {
- this.next();
- return true;
- } else {
- return false;
- }
- };
-
- // Tests whether parsed token is a contextual keyword.
-
- pp.isContextual = function (name) {
- return this.type === types.name && this.value === name && !this.containsEsc;
- };
-
- // Consumes contextual keyword if possible.
-
- pp.eatContextual = function (name) {
- if (!this.isContextual(name)) {
- return false;
- }
- this.next();
- return true;
- };
-
- // Asserts that following token is given contextual keyword.
-
- pp.expectContextual = function (name) {
- if (!this.eatContextual(name)) {
- this.unexpected();
- }
- };
-
- // Test whether a semicolon can be inserted at the current position.
-
- pp.canInsertSemicolon = function () {
- return this.type === types.eof || this.type === types.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
- };
-
- pp.insertSemicolon = function () {
- if (this.canInsertSemicolon()) {
- if (this.options.onInsertedSemicolon) {
- this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
- }
- return true;
- }
- };
-
- // Consume a semicolon, or, failing that, see if we are allowed to
- // pretend that there is a semicolon at this position.
-
- pp.semicolon = function () {
- if (!this.eat(types.semi) && !this.insertSemicolon()) {
- this.unexpected();
- }
- };
-
- pp.afterTrailingComma = function (tokType, notNext) {
- if (this.type === tokType) {
- if (this.options.onTrailingComma) {
- this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
- }
- if (!notNext) {
- this.next();
- }
- return true;
- }
- };
-
- // Expect a token of a given type. If found, consume it, otherwise,
- // raise an unexpected token error.
-
- pp.expect = function (type) {
- this.eat(type) || this.unexpected();
- };
-
- // Raise an unexpected token error.
-
- pp.unexpected = function (pos) {
- this.raise(pos != null ? pos : this.start, "Unexpected token");
- };
-
- function DestructuringErrors() {
- this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1;
- }
-
- pp.checkPatternErrors = function (refDestructuringErrors, isAssign) {
- if (!refDestructuringErrors) {
- return;
- }
- if (refDestructuringErrors.trailingComma > -1) {
- this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element");
- }
- var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
- if (parens > -1) {
- this.raiseRecoverable(parens, "Parenthesized pattern");
- }
- };
-
- pp.checkExpressionErrors = function (refDestructuringErrors, andThrow) {
- if (!refDestructuringErrors) {
- return false;
- }
- var shorthandAssign = refDestructuringErrors.shorthandAssign;
- var doubleProto = refDestructuringErrors.doubleProto;
- if (!andThrow) {
- return shorthandAssign >= 0 || doubleProto >= 0;
- }
- if (shorthandAssign >= 0) {
- this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns");
- }
- if (doubleProto >= 0) {
- this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property");
- }
- };
-
- pp.checkYieldAwaitInDefaultParams = function () {
- if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) {
- this.raise(this.yieldPos, "Yield expression cannot be a default value");
- }
- if (this.awaitPos) {
- this.raise(this.awaitPos, "Await expression cannot be a default value");
- }
- };
-
- pp.isSimpleAssignTarget = function (expr) {
- if (expr.type === "ParenthesizedExpression") {
- return this.isSimpleAssignTarget(expr.expression);
- }
- return expr.type === "Identifier" || expr.type === "MemberExpression";
- };
-
- var pp$1 = Parser.prototype;
-
- // ### Statement parsing
-
- // Parse a program. Initializes the parser, reads any number of
- // statements, and wraps them in a Program node. Optionally takes a
- // `program` argument. If present, the statements will be appended
- // to its body instead of creating a new node.
-
- pp$1.parseTopLevel = function (node) {
- var this$1 = this;
-
- var exports = {};
- if (!node.body) {
- node.body = [];
- }
- while (this.type !== types.eof) {
- var stmt = this$1.parseStatement(null, true, exports);
- node.body.push(stmt);
- }
- this.adaptDirectivePrologue(node.body);
- this.next();
- if (this.options.ecmaVersion >= 6) {
- node.sourceType = this.options.sourceType;
- }
- return this.finishNode(node, "Program");
- };
-
- var loopLabel = { kind: "loop" };
- var switchLabel = { kind: "switch" };
-
- pp$1.isLet = function () {
- if (this.options.ecmaVersion < 6 || !this.isContextual("let")) {
- return false;
- }
- skipWhiteSpace.lastIndex = this.pos;
- var skip = skipWhiteSpace.exec(this.input);
- var next = this.pos + skip[0].length,
- nextCh = this.input.charCodeAt(next);
- if (nextCh === 91 || nextCh === 123) {
- return true;
- } // '{' and '['
- if (isIdentifierStart(nextCh, true)) {
- var pos = next + 1;
- while (isIdentifierChar(this.input.charCodeAt(pos), true)) {
- ++pos;
- }
- var ident = this.input.slice(next, pos);
- if (!keywordRelationalOperator.test(ident)) {
- return true;
- }
- }
- return false;
- };
-
- // check 'async [no LineTerminator here] function'
- // - 'async /*foo*/ function' is OK.
- // - 'async /*\n*/ function' is invalid.
- pp$1.isAsyncFunction = function () {
- if (this.options.ecmaVersion < 8 || !this.isContextual("async")) {
- return false;
- }
-
- skipWhiteSpace.lastIndex = this.pos;
- var skip = skipWhiteSpace.exec(this.input);
- var next = this.pos + skip[0].length;
- return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !isIdentifierChar(this.input.charAt(next + 8)));
- };
-
- // Parse a single statement.
- //
- // If expecting a statement and finding a slash operator, parse a
- // regular expression literal. This is to handle cases like
- // `if (foo) /blah/.exec(foo)`, where looking at the previous token
- // does not help.
-
- pp$1.parseStatement = function (context, topLevel, exports) {
- var starttype = this.type,
- node = this.startNode(),
- kind;
-
- if (this.isLet()) {
- starttype = types._var;
- kind = "let";
- }
-
- // Most types of statements are recognized by the keyword they
- // start with. Many are trivial to parse, some require a bit of
- // complexity.
-
- switch (starttype) {
- case types._break:case types._continue:
- return this.parseBreakContinueStatement(node, starttype.keyword);
- case types._debugger:
- return this.parseDebuggerStatement(node);
- case types._do:
- return this.parseDoStatement(node);
- case types._for:
- return this.parseForStatement(node);
- case types._function:
- if (context && (this.strict || context !== "if") && this.options.ecmaVersion >= 6) {
- this.unexpected();
- }
- return this.parseFunctionStatement(node, false, !context);
- case types._class:
- if (context) {
- this.unexpected();
- }
- return this.parseClass(node, true);
- case types._if:
- return this.parseIfStatement(node);
- case types._return:
- return this.parseReturnStatement(node);
- case types._switch:
- return this.parseSwitchStatement(node);
- case types._throw:
- return this.parseThrowStatement(node);
- case types._try:
- return this.parseTryStatement(node);
- case types._const:case types._var:
- kind = kind || this.value;
- if (context && kind !== "var") {
- this.unexpected();
- }
- return this.parseVarStatement(node, kind);
- case types._while:
- return this.parseWhileStatement(node);
- case types._with:
- return this.parseWithStatement(node);
- case types.braceL:
- return this.parseBlock(true, node);
- case types.semi:
- return this.parseEmptyStatement(node);
- case types._export:
- case types._import:
- if (!this.options.allowImportExportEverywhere) {
- if (!topLevel) {
- this.raise(this.start, "'import' and 'export' may only appear at the top level");
- }
- if (!this.inModule) {
- this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
- }
- }
- return starttype === types._import ? this.parseImport(node) : this.parseExport(node, exports);
-
- // If the statement does not start with a statement keyword or a
- // brace, it's an ExpressionStatement or LabeledStatement. We
- // simply start parsing an expression, and afterwards, if the
- // next token is a colon and the expression was a simple
- // Identifier node, we switch to interpreting it as a label.
- default:
- if (this.isAsyncFunction()) {
- if (context) {
- this.unexpected();
- }
- this.next();
- return this.parseFunctionStatement(node, true, !context);
- }
-
- var maybeName = this.value,
- expr = this.parseExpression();
- if (starttype === types.name && expr.type === "Identifier" && this.eat(types.colon)) {
- return this.parseLabeledStatement(node, maybeName, expr, context);
- } else {
- return this.parseExpressionStatement(node, expr);
- }
- }
- };
-
- pp$1.parseBreakContinueStatement = function (node, keyword) {
- var this$1 = this;
-
- var isBreak = keyword === "break";
- this.next();
- if (this.eat(types.semi) || this.insertSemicolon()) {
- node.label = null;
- } else if (this.type !== types.name) {
- this.unexpected();
- } else {
- node.label = this.parseIdent();
- this.semicolon();
- }
-
- // Verify that there is an actual destination to break or
- // continue to.
- var i = 0;
- for (; i < this.labels.length; ++i) {
- var lab = this$1.labels[i];
- if (node.label == null || lab.name === node.label.name) {
- if (lab.kind != null && (isBreak || lab.kind === "loop")) {
- break;
- }
- if (node.label && isBreak) {
- break;
- }
- }
- }
- if (i === this.labels.length) {
- this.raise(node.start, "Unsyntactic " + keyword);
- }
- return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
- };
-
- pp$1.parseDebuggerStatement = function (node) {
- this.next();
- this.semicolon();
- return this.finishNode(node, "DebuggerStatement");
- };
-
- pp$1.parseDoStatement = function (node) {
- this.next();
- this.labels.push(loopLabel);
- node.body = this.parseStatement("do");
- this.labels.pop();
- this.expect(types._while);
- node.test = this.parseParenExpression();
- if (this.options.ecmaVersion >= 6) {
- this.eat(types.semi);
- } else {
- this.semicolon();
- }
- return this.finishNode(node, "DoWhileStatement");
- };
-
- // Disambiguating between a `for` and a `for`/`in` or `for`/`of`
- // loop is non-trivial. Basically, we have to parse the init `var`
- // statement or expression, disallowing the `in` operator (see
- // the second parameter to `parseExpression`), and then check
- // whether the next token is `in` or `of`. When there is no init
- // part (semicolon immediately after the opening parenthesis), it
- // is a regular `for` loop.
-
- pp$1.parseForStatement = function (node) {
- this.next();
- var awaitAt = this.options.ecmaVersion >= 9 && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction) && this.eatContextual("await") ? this.lastTokStart : -1;
- this.labels.push(loopLabel);
- this.enterScope(0);
- this.expect(types.parenL);
- if (this.type === types.semi) {
- if (awaitAt > -1) {
- this.unexpected(awaitAt);
- }
- return this.parseFor(node, null);
- }
- var isLet = this.isLet();
- if (this.type === types._var || this.type === types._const || isLet) {
- var init$1 = this.startNode(),
- kind = isLet ? "let" : this.value;
- this.next();
- this.parseVar(init$1, true, kind);
- this.finishNode(init$1, "VariableDeclaration");
- if ((this.type === types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1 && !(kind !== "var" && init$1.declarations[0].init)) {
- if (this.options.ecmaVersion >= 9) {
- if (this.type === types._in) {
- if (awaitAt > -1) {
- this.unexpected(awaitAt);
- }
- } else {
- node.await = awaitAt > -1;
- }
- }
- return this.parseForIn(node, init$1);
- }
- if (awaitAt > -1) {
- this.unexpected(awaitAt);
- }
- return this.parseFor(node, init$1);
- }
- var refDestructuringErrors = new DestructuringErrors();
- var init = this.parseExpression(true, refDestructuringErrors);
- if (this.type === types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) {
- if (this.options.ecmaVersion >= 9) {
- if (this.type === types._in) {
- if (awaitAt > -1) {
- this.unexpected(awaitAt);
- }
- } else {
- node.await = awaitAt > -1;
- }
- }
- this.toAssignable(init, false, refDestructuringErrors);
- this.checkLVal(init);
- return this.parseForIn(node, init);
- } else {
- this.checkExpressionErrors(refDestructuringErrors, true);
- }
- if (awaitAt > -1) {
- this.unexpected(awaitAt);
- }
- return this.parseFor(node, init);
- };
-
- pp$1.parseFunctionStatement = function (node, isAsync, declarationPosition) {
- this.next();
- return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
- };
-
- pp$1.parseIfStatement = function (node) {
- this.next();
- node.test = this.parseParenExpression();
- // allow function declarations in branches, but only in non-strict mode
- node.consequent = this.parseStatement("if");
- node.alternate = this.eat(types._else) ? this.parseStatement("if") : null;
- return this.finishNode(node, "IfStatement");
- };
-
- pp$1.parseReturnStatement = function (node) {
- if (!this.inFunction && !this.options.allowReturnOutsideFunction) {
- this.raise(this.start, "'return' outside of function");
- }
- this.next();
-
- // In `return` (and `break`/`continue`), the keywords with
- // optional arguments, we eagerly look for a semicolon or the
- // possibility to insert one.
-
- if (this.eat(types.semi) || this.insertSemicolon()) {
- node.argument = null;
- } else {
- node.argument = this.parseExpression();this.semicolon();
- }
- return this.finishNode(node, "ReturnStatement");
- };
-
- pp$1.parseSwitchStatement = function (node) {
- var this$1 = this;
-
- this.next();
- node.discriminant = this.parseParenExpression();
- node.cases = [];
- this.expect(types.braceL);
- this.labels.push(switchLabel);
- this.enterScope(0);
-
- // Statements under must be grouped (by label) in SwitchCase
- // nodes. `cur` is used to keep the node that we are currently
- // adding statements to.
-
- var cur;
- for (var sawDefault = false; this.type !== types.braceR;) {
- if (this$1.type === types._case || this$1.type === types._default) {
- var isCase = this$1.type === types._case;
- if (cur) {
- this$1.finishNode(cur, "SwitchCase");
- }
- node.cases.push(cur = this$1.startNode());
- cur.consequent = [];
- this$1.next();
- if (isCase) {
- cur.test = this$1.parseExpression();
- } else {
- if (sawDefault) {
- this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses");
- }
- sawDefault = true;
- cur.test = null;
- }
- this$1.expect(types.colon);
- } else {
- if (!cur) {
- this$1.unexpected();
- }
- cur.consequent.push(this$1.parseStatement(null));
- }
- }
- this.exitScope();
- if (cur) {
- this.finishNode(cur, "SwitchCase");
- }
- this.next(); // Closing brace
- this.labels.pop();
- return this.finishNode(node, "SwitchStatement");
- };
-
- pp$1.parseThrowStatement = function (node) {
- this.next();
- if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) {
- this.raise(this.lastTokEnd, "Illegal newline after throw");
- }
- node.argument = this.parseExpression();
- this.semicolon();
- return this.finishNode(node, "ThrowStatement");
- };
-
- // Reused empty array added for node fields that are always empty.
-
- var empty = [];
-
- pp$1.parseTryStatement = function (node) {
- this.next();
- node.block = this.parseBlock();
- node.handler = null;
- if (this.type === types._catch) {
- var clause = this.startNode();
- this.next();
- if (this.eat(types.parenL)) {
- clause.param = this.parseBindingAtom();
- var simple = clause.param.type === "Identifier";
- this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0);
- this.checkLVal(clause.param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL);
- this.expect(types.parenR);
- } else {
- if (this.options.ecmaVersion < 10) {
- this.unexpected();
- }
- clause.param = null;
- this.enterScope(0);
- }
- clause.body = this.parseBlock(false);
- this.exitScope();
- node.handler = this.finishNode(clause, "CatchClause");
- }
- node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;
- if (!node.handler && !node.finalizer) {
- this.raise(node.start, "Missing catch or finally clause");
- }
- return this.finishNode(node, "TryStatement");
- };
-
- pp$1.parseVarStatement = function (node, kind) {
- this.next();
- this.parseVar(node, false, kind);
- this.semicolon();
- return this.finishNode(node, "VariableDeclaration");
- };
-
- pp$1.parseWhileStatement = function (node) {
- this.next();
- node.test = this.parseParenExpression();
- this.labels.push(loopLabel);
- node.body = this.parseStatement("while");
- this.labels.pop();
- return this.finishNode(node, "WhileStatement");
- };
-
- pp$1.parseWithStatement = function (node) {
- if (this.strict) {
- this.raise(this.start, "'with' in strict mode");
- }
- this.next();
- node.object = this.parseParenExpression();
- node.body = this.parseStatement("with");
- return this.finishNode(node, "WithStatement");
- };
-
- pp$1.parseEmptyStatement = function (node) {
- this.next();
- return this.finishNode(node, "EmptyStatement");
- };
-
- pp$1.parseLabeledStatement = function (node, maybeName, expr, context) {
- var this$1 = this;
-
- for (var i$1 = 0, list = this$1.labels; i$1 < list.length; i$1 += 1) {
- var label = list[i$1];
-
- if (label.name === maybeName) {
- this$1.raise(expr.start, "Label '" + maybeName + "' is already declared");
- }
- }
- var kind = this.type.isLoop ? "loop" : this.type === types._switch ? "switch" : null;
- for (var i = this.labels.length - 1; i >= 0; i--) {
- var label$1 = this$1.labels[i];
- if (label$1.statementStart === node.start) {
- // Update information about previous labels on this node
- label$1.statementStart = this$1.start;
- label$1.kind = kind;
- } else {
- break;
- }
- }
- this.labels.push({ name: maybeName, kind: kind, statementStart: this.start });
- node.body = this.parseStatement(context);
- if (node.body.type === "ClassDeclaration" || node.body.type === "VariableDeclaration" && node.body.kind !== "var" || node.body.type === "FunctionDeclaration" && (this.strict || node.body.generator || node.body.async)) {
- this.raiseRecoverable(node.body.start, "Invalid labeled declaration");
- }
- this.labels.pop();
- node.label = expr;
- return this.finishNode(node, "LabeledStatement");
- };
-
- pp$1.parseExpressionStatement = function (node, expr) {
- node.expression = expr;
- this.semicolon();
- return this.finishNode(node, "ExpressionStatement");
- };
-
- // Parse a semicolon-enclosed block of statements, handling `"use
- // strict"` declarations when `allowStrict` is true (used for
- // function bodies).
-
- pp$1.parseBlock = function (createNewLexicalScope, node) {
- var this$1 = this;
- if (createNewLexicalScope === void 0) createNewLexicalScope = true;
- if (node === void 0) node = this.startNode();
-
- node.body = [];
- this.expect(types.braceL);
- if (createNewLexicalScope) {
- this.enterScope(0);
- }
- while (!this.eat(types.braceR)) {
- var stmt = this$1.parseStatement(null);
- node.body.push(stmt);
- }
- if (createNewLexicalScope) {
- this.exitScope();
- }
- return this.finishNode(node, "BlockStatement");
- };
-
- // Parse a regular `for` loop. The disambiguation code in
- // `parseStatement` will already have parsed the init statement or
- // expression.
-
- pp$1.parseFor = function (node, init) {
- node.init = init;
- this.expect(types.semi);
- node.test = this.type === types.semi ? null : this.parseExpression();
- this.expect(types.semi);
- node.update = this.type === types.parenR ? null : this.parseExpression();
- this.expect(types.parenR);
- this.exitScope();
- node.body = this.parseStatement("for");
- this.labels.pop();
- return this.finishNode(node, "ForStatement");
- };
-
- // Parse a `for`/`in` and `for`/`of` loop, which are almost
- // same from parser's perspective.
-
- pp$1.parseForIn = function (node, init) {
- var type = this.type === types._in ? "ForInStatement" : "ForOfStatement";
- this.next();
- if (type === "ForInStatement") {
- if (init.type === "AssignmentPattern" || init.type === "VariableDeclaration" && init.declarations[0].init != null && (this.strict || init.declarations[0].id.type !== "Identifier")) {
- this.raise(init.start, "Invalid assignment in for-in loop head");
- }
- }
- node.left = init;
- node.right = type === "ForInStatement" ? this.parseExpression() : this.parseMaybeAssign();
- this.expect(types.parenR);
- this.exitScope();
- node.body = this.parseStatement("for");
- this.labels.pop();
- return this.finishNode(node, type);
- };
-
- // Parse a list of variable declarations.
-
- pp$1.parseVar = function (node, isFor, kind) {
- var this$1 = this;
-
- node.declarations = [];
- node.kind = kind;
- for (;;) {
- var decl = this$1.startNode();
- this$1.parseVarId(decl, kind);
- if (this$1.eat(types.eq)) {
- decl.init = this$1.parseMaybeAssign(isFor);
- } else if (kind === "const" && !(this$1.type === types._in || this$1.options.ecmaVersion >= 6 && this$1.isContextual("of"))) {
- this$1.unexpected();
- } else if (decl.id.type !== "Identifier" && !(isFor && (this$1.type === types._in || this$1.isContextual("of")))) {
- this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value");
- } else {
- decl.init = null;
- }
- node.declarations.push(this$1.finishNode(decl, "VariableDeclarator"));
- if (!this$1.eat(types.comma)) {
- break;
- }
- }
- return node;
- };
-
- pp$1.parseVarId = function (decl, kind) {
- decl.id = this.parseBindingAtom(kind);
- this.checkLVal(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
- };
-
- var FUNC_STATEMENT = 1;
- var FUNC_HANGING_STATEMENT = 2;
- var FUNC_NULLABLE_ID = 4;
-
- // Parse a function declaration or literal (depending on the
- // `isStatement` parameter).
-
- pp$1.parseFunction = function (node, statement, allowExpressionBody, isAsync) {
- this.initFunction(node);
- if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) {
- node.generator = this.eat(types.star);
- }
- if (this.options.ecmaVersion >= 8) {
- node.async = !!isAsync;
- }
-
- if (statement & FUNC_STATEMENT) {
- node.id = statement & FUNC_NULLABLE_ID && this.type !== types.name ? null : this.parseIdent();
- if (node.id && !(statement & FUNC_HANGING_STATEMENT)) {
- this.checkLVal(node.id, this.inModule && !this.inFunction ? BIND_LEXICAL : BIND_FUNCTION);
- }
- }
-
- var oldYieldPos = this.yieldPos,
- oldAwaitPos = this.awaitPos;
- this.yieldPos = 0;
- this.awaitPos = 0;
- this.enterScope(functionFlags(node.async, node.generator));
-
- if (!(statement & FUNC_STATEMENT)) {
- node.id = this.type === types.name ? this.parseIdent() : null;
- }
-
- this.parseFunctionParams(node);
- this.parseFunctionBody(node, allowExpressionBody);
-
- this.yieldPos = oldYieldPos;
- this.awaitPos = oldAwaitPos;
- return this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression");
- };
-
- pp$1.parseFunctionParams = function (node) {
- this.expect(types.parenL);
- node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);
- this.checkYieldAwaitInDefaultParams();
- };
-
- // Parse a class declaration or literal (depending on the
- // `isStatement` parameter).
-
- pp$1.parseClass = function (node, isStatement) {
- var this$1 = this;
-
- this.next();
-
- this.parseClassId(node, isStatement);
- this.parseClassSuper(node);
- var classBody = this.startNode();
- var hadConstructor = false;
- classBody.body = [];
- this.expect(types.braceL);
- while (!this.eat(types.braceR)) {
- var element = this$1.parseClassElement(node.superClass !== null);
- if (element) {
- classBody.body.push(element);
- if (element.type === "MethodDefinition" && element.kind === "constructor") {
- if (hadConstructor) {
- this$1.raise(element.start, "Duplicate constructor in the same class");
- }
- hadConstructor = true;
- }
- }
- }
- node.body = this.finishNode(classBody, "ClassBody");
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
- };
-
- pp$1.parseClassElement = function (constructorAllowsSuper) {
- var this$1 = this;
-
- if (this.eat(types.semi)) {
- return null;
- }
-
- var method = this.startNode();
- var tryContextual = function tryContextual(k, noLineBreak) {
- if (noLineBreak === void 0) noLineBreak = false;
-
- var start = this$1.start,
- startLoc = this$1.startLoc;
- if (!this$1.eatContextual(k)) {
- return false;
- }
- if (this$1.type !== types.parenL && (!noLineBreak || !this$1.canInsertSemicolon())) {
- return true;
- }
- if (method.key) {
- this$1.unexpected();
- }
- method.computed = false;
- method.key = this$1.startNodeAt(start, startLoc);
- method.key.name = k;
- this$1.finishNode(method.key, "Identifier");
- return false;
- };
-
- method.kind = "method";
- method.static = tryContextual("static");
- var isGenerator = this.eat(types.star);
- var isAsync = false;
- if (!isGenerator) {
- if (this.options.ecmaVersion >= 8 && tryContextual("async", true)) {
- isAsync = true;
- isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star);
- } else if (tryContextual("get")) {
- method.kind = "get";
- } else if (tryContextual("set")) {
- method.kind = "set";
- }
- }
- if (!method.key) {
- this.parsePropertyName(method);
- }
- var key = method.key;
- var allowsDirectSuper = false;
- if (!method.computed && !method.static && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) {
- if (method.kind !== "method") {
- this.raise(key.start, "Constructor can't have get/set modifier");
- }
- if (isGenerator) {
- this.raise(key.start, "Constructor can't be a generator");
- }
- if (isAsync) {
- this.raise(key.start, "Constructor can't be an async method");
- }
- method.kind = "constructor";
- allowsDirectSuper = constructorAllowsSuper;
- } else if (method.static && key.type === "Identifier" && key.name === "prototype") {
- this.raise(key.start, "Classes may not have a static property named prototype");
- }
- this.parseClassMethod(method, isGenerator, isAsync, allowsDirectSuper);
- if (method.kind === "get" && method.value.params.length !== 0) {
- this.raiseRecoverable(method.value.start, "getter should have no params");
- }
- if (method.kind === "set" && method.value.params.length !== 1) {
- this.raiseRecoverable(method.value.start, "setter should have exactly one param");
- }
- if (method.kind === "set" && method.value.params[0].type === "RestElement") {
- this.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params");
- }
- return method;
- };
-
- pp$1.parseClassMethod = function (method, isGenerator, isAsync, allowsDirectSuper) {
- method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper);
- return this.finishNode(method, "MethodDefinition");
- };
-
- pp$1.parseClassId = function (node, isStatement) {
- node.id = this.type === types.name ? this.parseIdent() : isStatement === true ? this.unexpected() : null;
- };
-
- pp$1.parseClassSuper = function (node) {
- node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;
- };
-
- // Parses module export declaration.
-
- pp$1.parseExport = function (node, exports) {
- var this$1 = this;
-
- this.next();
- // export * from '...'
- if (this.eat(types.star)) {
- this.expectContextual("from");
- if (this.type !== types.string) {
- this.unexpected();
- }
- node.source = this.parseExprAtom();
- this.semicolon();
- return this.finishNode(node, "ExportAllDeclaration");
- }
- if (this.eat(types._default)) {
- // export default ...
- this.checkExport(exports, "default", this.lastTokStart);
- var isAsync;
- if (this.type === types._function || (isAsync = this.isAsyncFunction())) {
- var fNode = this.startNode();
- this.next();
- if (isAsync) {
- this.next();
- }
- node.declaration = this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync, true);
- } else if (this.type === types._class) {
- var cNode = this.startNode();
- node.declaration = this.parseClass(cNode, "nullableID");
- } else {
- node.declaration = this.parseMaybeAssign();
- this.semicolon();
- }
- return this.finishNode(node, "ExportDefaultDeclaration");
- }
- // export var|const|let|function|class ...
- if (this.shouldParseExportStatement()) {
- node.declaration = this.parseStatement(null);
- if (node.declaration.type === "VariableDeclaration") {
- this.checkVariableExport(exports, node.declaration.declarations);
- } else {
- this.checkExport(exports, node.declaration.id.name, node.declaration.id.start);
- }
- node.specifiers = [];
- node.source = null;
- } else {
- // export { x, y as z } [from '...']
- node.declaration = null;
- node.specifiers = this.parseExportSpecifiers(exports);
- if (this.eatContextual("from")) {
- if (this.type !== types.string) {
- this.unexpected();
- }
- node.source = this.parseExprAtom();
- } else {
- // check for keywords used as local names
- for (var i = 0, list = node.specifiers; i < list.length; i += 1) {
- var spec = list[i];
-
- this$1.checkUnreserved(spec.local);
- }
-
- node.source = null;
- }
- this.semicolon();
- }
- return this.finishNode(node, "ExportNamedDeclaration");
- };
-
- pp$1.checkExport = function (exports, name, pos) {
- if (!exports) {
- return;
- }
- if (has(exports, name)) {
- this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
- }
- exports[name] = true;
- };
-
- pp$1.checkPatternExport = function (exports, pat) {
- var this$1 = this;
-
- var type = pat.type;
- if (type === "Identifier") {
- this.checkExport(exports, pat.name, pat.start);
- } else if (type === "ObjectPattern") {
- for (var i = 0, list = pat.properties; i < list.length; i += 1) {
- var prop = list[i];
-
- this$1.checkPatternExport(exports, prop);
- }
- } else if (type === "ArrayPattern") {
- for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
- var elt = list$1[i$1];
-
- if (elt) {
- this$1.checkPatternExport(exports, elt);
- }
- }
- } else if (type === "Property") {
- this.checkPatternExport(exports, pat.value);
- } else if (type === "AssignmentPattern") {
- this.checkPatternExport(exports, pat.left);
- } else if (type === "RestElement") {
- this.checkPatternExport(exports, pat.argument);
- } else if (type === "ParenthesizedExpression") {
- this.checkPatternExport(exports, pat.expression);
- }
- };
-
- pp$1.checkVariableExport = function (exports, decls) {
- var this$1 = this;
-
- if (!exports) {
- return;
- }
- for (var i = 0, list = decls; i < list.length; i += 1) {
- var decl = list[i];
-
- this$1.checkPatternExport(exports, decl.id);
- }
- };
-
- pp$1.shouldParseExportStatement = function () {
- return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
- };
-
- // Parses a comma-separated list of module exports.
-
- pp$1.parseExportSpecifiers = function (exports) {
- var this$1 = this;
-
- var nodes = [],
- first = true;
- // export { x, y as z } [from '...']
- this.expect(types.braceL);
- while (!this.eat(types.braceR)) {
- if (!first) {
- this$1.expect(types.comma);
- if (this$1.afterTrailingComma(types.braceR)) {
- break;
- }
- } else {
- first = false;
- }
-
- var node = this$1.startNode();
- node.local = this$1.parseIdent(true);
- node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local;
- this$1.checkExport(exports, node.exported.name, node.exported.start);
- nodes.push(this$1.finishNode(node, "ExportSpecifier"));
- }
- return nodes;
- };
-
- // Parses import declaration.
-
- pp$1.parseImport = function (node) {
- this.next();
- // import '...'
- if (this.type === types.string) {
- node.specifiers = empty;
- node.source = this.parseExprAtom();
- } else {
- node.specifiers = this.parseImportSpecifiers();
- this.expectContextual("from");
- node.source = this.type === types.string ? this.parseExprAtom() : this.unexpected();
- }
- this.semicolon();
- return this.finishNode(node, "ImportDeclaration");
- };
-
- // Parses a comma-separated list of module imports.
-
- pp$1.parseImportSpecifiers = function () {
- var this$1 = this;
-
- var nodes = [],
- first = true;
- if (this.type === types.name) {
- // import defaultObj, { x, y as z } from '...'
- var node = this.startNode();
- node.local = this.parseIdent();
- this.checkLVal(node.local, BIND_LEXICAL);
- nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
- if (!this.eat(types.comma)) {
- return nodes;
- }
- }
- if (this.type === types.star) {
- var node$1 = this.startNode();
- this.next();
- this.expectContextual("as");
- node$1.local = this.parseIdent();
- this.checkLVal(node$1.local, BIND_LEXICAL);
- nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier"));
- return nodes;
- }
- this.expect(types.braceL);
- while (!this.eat(types.braceR)) {
- if (!first) {
- this$1.expect(types.comma);
- if (this$1.afterTrailingComma(types.braceR)) {
- break;
- }
- } else {
- first = false;
- }
-
- var node$2 = this$1.startNode();
- node$2.imported = this$1.parseIdent(true);
- if (this$1.eatContextual("as")) {
- node$2.local = this$1.parseIdent();
- } else {
- this$1.checkUnreserved(node$2.imported);
- node$2.local = node$2.imported;
- }
- this$1.checkLVal(node$2.local, BIND_LEXICAL);
- nodes.push(this$1.finishNode(node$2, "ImportSpecifier"));
- }
- return nodes;
- };
-
- // Set `ExpressionStatement#directive` property for directive prologues.
- pp$1.adaptDirectivePrologue = function (statements) {
- for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) {
- statements[i].directive = statements[i].expression.raw.slice(1, -1);
- }
- };
- pp$1.isDirectiveCandidate = function (statement) {
- return statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && (
- // Reject parenthesized strings.
- this.input[statement.start] === "\"" || this.input[statement.start] === "'");
- };
-
- var pp$2 = Parser.prototype;
-
- // Convert existing expression atom to assignable pattern
- // if possible.
-
- pp$2.toAssignable = function (node, isBinding, refDestructuringErrors) {
- var this$1 = this;
-
- if (this.options.ecmaVersion >= 6 && node) {
- switch (node.type) {
- case "Identifier":
- if (this.inAsync && node.name === "await") {
- this.raise(node.start, "Can not use 'await' as identifier inside an async function");
- }
- break;
-
- case "ObjectPattern":
- case "ArrayPattern":
- case "RestElement":
- break;
-
- case "ObjectExpression":
- node.type = "ObjectPattern";
- if (refDestructuringErrors) {
- this.checkPatternErrors(refDestructuringErrors, true);
- }
- for (var i = 0, list = node.properties; i < list.length; i += 1) {
- var prop = list[i];
-
- this$1.toAssignable(prop, isBinding);
- // Early error:
- // AssignmentRestProperty[Yield, Await] :
- // `...` DestructuringAssignmentTarget[Yield, Await]
- //
- // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.
- if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) {
- this$1.raise(prop.argument.start, "Unexpected token");
- }
- }
- break;
-
- case "Property":
- // AssignmentProperty has type === "Property"
- if (node.kind !== "init") {
- this.raise(node.key.start, "Object pattern can't contain getter or setter");
- }
- this.toAssignable(node.value, isBinding);
- break;
-
- case "ArrayExpression":
- node.type = "ArrayPattern";
- if (refDestructuringErrors) {
- this.checkPatternErrors(refDestructuringErrors, true);
- }
- this.toAssignableList(node.elements, isBinding);
- break;
-
- case "SpreadElement":
- node.type = "RestElement";
- this.toAssignable(node.argument, isBinding);
- if (node.argument.type === "AssignmentPattern") {
- this.raise(node.argument.start, "Rest elements cannot have a default value");
- }
- break;
-
- case "AssignmentExpression":
- if (node.operator !== "=") {
- this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
- }
- node.type = "AssignmentPattern";
- delete node.operator;
- this.toAssignable(node.left, isBinding);
- // falls through to AssignmentPattern
-
- case "AssignmentPattern":
- break;
-
- case "ParenthesizedExpression":
- this.toAssignable(node.expression, isBinding);
- break;
-
- case "MemberExpression":
- if (!isBinding) {
- break;
- }
-
- default:
- this.raise(node.start, "Assigning to rvalue");
- }
- } else if (refDestructuringErrors) {
- this.checkPatternErrors(refDestructuringErrors, true);
- }
- return node;
- };
-
- // Convert list of expression atoms to binding list.
-
- pp$2.toAssignableList = function (exprList, isBinding) {
- var this$1 = this;
-
- var end = exprList.length;
- for (var i = 0; i < end; i++) {
- var elt = exprList[i];
- if (elt) {
- this$1.toAssignable(elt, isBinding);
- }
- }
- if (end) {
- var last = exprList[end - 1];
- if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") {
- this.unexpected(last.argument.start);
- }
- }
- return exprList;
- };
-
- // Parses spread element.
-
- pp$2.parseSpread = function (refDestructuringErrors) {
- var node = this.startNode();
- this.next();
- node.argument = this.parseMaybeAssign(false, refDestructuringErrors);
- return this.finishNode(node, "SpreadElement");
- };
-
- pp$2.parseRestBinding = function () {
- var node = this.startNode();
- this.next();
-
- // RestElement inside of a function parameter must be an identifier
- if (this.options.ecmaVersion === 6 && this.type !== types.name) {
- this.unexpected();
- }
-
- node.argument = this.parseBindingAtom();
-
- return this.finishNode(node, "RestElement");
- };
-
- // Parses lvalue (assignable) atom.
-
- pp$2.parseBindingAtom = function () {
- if (this.options.ecmaVersion >= 6) {
- switch (this.type) {
- case types.bracketL:
- var node = this.startNode();
- this.next();
- node.elements = this.parseBindingList(types.bracketR, true, true);
- return this.finishNode(node, "ArrayPattern");
-
- case types.braceL:
- return this.parseObj(true);
- }
- }
- return this.parseIdent();
- };
-
- pp$2.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
- var this$1 = this;
-
- var elts = [],
- first = true;
- while (!this.eat(close)) {
- if (first) {
- first = false;
- } else {
- this$1.expect(types.comma);
- }
- if (allowEmpty && this$1.type === types.comma) {
- elts.push(null);
- } else if (allowTrailingComma && this$1.afterTrailingComma(close)) {
- break;
- } else if (this$1.type === types.ellipsis) {
- var rest = this$1.parseRestBinding();
- this$1.parseBindingListItem(rest);
- elts.push(rest);
- if (this$1.type === types.comma) {
- this$1.raise(this$1.start, "Comma is not permitted after the rest element");
- }
- this$1.expect(close);
- break;
- } else {
- var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc);
- this$1.parseBindingListItem(elem);
- elts.push(elem);
- }
- }
- return elts;
- };
-
- pp$2.parseBindingListItem = function (param) {
- return param;
- };
-
- // Parses assignment pattern around given atom if possible.
-
- pp$2.parseMaybeDefault = function (startPos, startLoc, left) {
- left = left || this.parseBindingAtom();
- if (this.options.ecmaVersion < 6 || !this.eat(types.eq)) {
- return left;
- }
- var node = this.startNodeAt(startPos, startLoc);
- node.left = left;
- node.right = this.parseMaybeAssign();
- return this.finishNode(node, "AssignmentPattern");
- };
-
- // Verify that a node is an lval — something that can be assigned
- // to.
- // bindingType can be either:
- // 'var' indicating that the lval creates a 'var' binding
- // 'let' indicating that the lval creates a lexical ('let' or 'const') binding
- // 'none' indicating that the binding should be checked for illegal identifiers, but not for duplicate references
-
- pp$2.checkLVal = function (expr, bindingType, checkClashes) {
- var this$1 = this;
- if (bindingType === void 0) bindingType = BIND_NONE;
-
- switch (expr.type) {
- case "Identifier":
- if (this.strict && this.reservedWordsStrictBind.test(expr.name)) {
- this.raiseRecoverable(expr.start, (bindingType ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
- }
- if (checkClashes) {
- if (has(checkClashes, expr.name)) {
- this.raiseRecoverable(expr.start, "Argument name clash");
- }
- checkClashes[expr.name] = true;
- }
- if (bindingType !== BIND_NONE && bindingType !== BIND_OUTSIDE) {
- this.declareName(expr.name, bindingType, expr.start);
- }
- break;
-
- case "MemberExpression":
- if (bindingType) {
- this.raiseRecoverable(expr.start, "Binding member expression");
- }
- break;
-
- case "ObjectPattern":
- for (var i = 0, list = expr.properties; i < list.length; i += 1) {
- var prop = list[i];
-
- this$1.checkLVal(prop, bindingType, checkClashes);
- }
- break;
-
- case "Property":
- // AssignmentProperty has type === "Property"
- this.checkLVal(expr.value, bindingType, checkClashes);
- break;
-
- case "ArrayPattern":
- for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) {
- var elem = list$1[i$1];
-
- if (elem) {
- this$1.checkLVal(elem, bindingType, checkClashes);
- }
- }
- break;
-
- case "AssignmentPattern":
- this.checkLVal(expr.left, bindingType, checkClashes);
- break;
-
- case "RestElement":
- this.checkLVal(expr.argument, bindingType, checkClashes);
- break;
-
- case "ParenthesizedExpression":
- this.checkLVal(expr.expression, bindingType, checkClashes);
- break;
-
- default:
- this.raise(expr.start, (bindingType ? "Binding" : "Assigning to") + " rvalue");
- }
- };
-
- // A recursive descent parser operates by defining functions for all
- // syntactic elements, and recursively calling those, each function
- // advancing the input stream and returning an AST node. Precedence
- // of constructs (for example, the fact that `!x[1]` means `!(x[1])`
- // instead of `(!x)[1]` is handled by the fact that the parser
- // function that parses unary prefix operators is called first, and
- // in turn calls the function that parses `[]` subscripts — that
- // way, it'll receive the node for `x[1]` already parsed, and wraps
- // *that* in the unary operator node.
- //
- // Acorn uses an [operator precedence parser][opp] to handle binary
- // operator precedence, because it is much more compact than using
- // the technique outlined above, which uses different, nesting
- // functions to specify precedence, for all of the ten binary
- // precedence levels that JavaScript defines.
- //
- // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
-
- var pp$3 = Parser.prototype;
-
- // Check if property name clashes with already added.
- // Object/class getters and setters are not allowed to clash —
- // either with each other or with an init property — and in
- // strict mode, init properties are also not allowed to be repeated.
-
- pp$3.checkPropClash = function (prop, propHash, refDestructuringErrors) {
- if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") {
- return;
- }
- if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) {
- return;
- }
- var key = prop.key;
- var name;
- switch (key.type) {
- case "Identifier":
- name = key.name;break;
- case "Literal":
- name = String(key.value);break;
- default:
- return;
- }
- var kind = prop.kind;
- if (this.options.ecmaVersion >= 6) {
- if (name === "__proto__" && kind === "init") {
- if (propHash.proto) {
- if (refDestructuringErrors && refDestructuringErrors.doubleProto < 0) {
- refDestructuringErrors.doubleProto = key.start;
- }
- // Backwards-compat kludge. Can be removed in version 6.0
- else {
- this.raiseRecoverable(key.start, "Redefinition of __proto__ property");
- }
- }
- propHash.proto = true;
- }
- return;
- }
- name = "$" + name;
- var other = propHash[name];
- if (other) {
- var redefinition;
- if (kind === "init") {
- redefinition = this.strict && other.init || other.get || other.set;
- } else {
- redefinition = other.init || other[kind];
- }
- if (redefinition) {
- this.raiseRecoverable(key.start, "Redefinition of property");
- }
- } else {
- other = propHash[name] = {
- init: false,
- get: false,
- set: false
- };
- }
- other[kind] = true;
- };
-
- // ### Expression parsing
-
- // These nest, from the most general expression type at the top to
- // 'atomic', nondivisible expression types at the bottom. Most of
- // the functions will simply let the function(s) below them parse,
- // and, *if* the syntactic construct they handle is present, wrap
- // the AST node that the inner parser gave them in another node.
-
- // Parse a full expression. The optional arguments are used to
- // forbid the `in` operator (in for loops initalization expressions)
- // and provide reference for storing '=' operator inside shorthand
- // property assignment in contexts where both object expression
- // and object pattern might appear (so it's possible to raise
- // delayed syntax error at correct position).
-
- pp$3.parseExpression = function (noIn, refDestructuringErrors) {
- var this$1 = this;
-
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseMaybeAssign(noIn, refDestructuringErrors);
- if (this.type === types.comma) {
- var node = this.startNodeAt(startPos, startLoc);
- node.expressions = [expr];
- while (this.eat(types.comma)) {
- node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors));
- }
- return this.finishNode(node, "SequenceExpression");
- }
- return expr;
- };
-
- // Parse an assignment expression. This includes applications of
- // operators like `+=`.
-
- pp$3.parseMaybeAssign = function (noIn, refDestructuringErrors, afterLeftParse) {
- if (this.isContextual("yield")) {
- if (this.inGenerator) {
- return this.parseYield();
- }
- // The tokenizer will assume an expression is allowed after
- // `yield`, but this isn't that kind of yield
- else {
- this.exprAllowed = false;
- }
- }
-
- var ownDestructuringErrors = false,
- oldParenAssign = -1,
- oldTrailingComma = -1,
- oldShorthandAssign = -1;
- if (refDestructuringErrors) {
- oldParenAssign = refDestructuringErrors.parenthesizedAssign;
- oldTrailingComma = refDestructuringErrors.trailingComma;
- oldShorthandAssign = refDestructuringErrors.shorthandAssign;
- refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.shorthandAssign = -1;
- } else {
- refDestructuringErrors = new DestructuringErrors();
- ownDestructuringErrors = true;
- }
-
- var startPos = this.start,
- startLoc = this.startLoc;
- if (this.type === types.parenL || this.type === types.name) {
- this.potentialArrowAt = this.start;
- }
- var left = this.parseMaybeConditional(noIn, refDestructuringErrors);
- if (afterLeftParse) {
- left = afterLeftParse.call(this, left, startPos, startLoc);
- }
- if (this.type.isAssign) {
- var node = this.startNodeAt(startPos, startLoc);
- node.operator = this.value;
- node.left = this.type === types.eq ? this.toAssignable(left, false, refDestructuringErrors) : left;
- if (!ownDestructuringErrors) {
- DestructuringErrors.call(refDestructuringErrors);
- }
- refDestructuringErrors.shorthandAssign = -1; // reset because shorthand default was used correctly
- this.checkLVal(left);
- this.next();
- node.right = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "AssignmentExpression");
- } else {
- if (ownDestructuringErrors) {
- this.checkExpressionErrors(refDestructuringErrors, true);
- }
- }
- if (oldParenAssign > -1) {
- refDestructuringErrors.parenthesizedAssign = oldParenAssign;
- }
- if (oldTrailingComma > -1) {
- refDestructuringErrors.trailingComma = oldTrailingComma;
- }
- if (oldShorthandAssign > -1) {
- refDestructuringErrors.shorthandAssign = oldShorthandAssign;
- }
- return left;
- };
-
- // Parse a ternary conditional (`?:`) operator.
-
- pp$3.parseMaybeConditional = function (noIn, refDestructuringErrors) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseExprOps(noIn, refDestructuringErrors);
- if (this.checkExpressionErrors(refDestructuringErrors)) {
- return expr;
- }
- if (this.eat(types.question)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.test = expr;
- node.consequent = this.parseMaybeAssign();
- this.expect(types.colon);
- node.alternate = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "ConditionalExpression");
- }
- return expr;
- };
-
- // Start the precedence parser.
-
- pp$3.parseExprOps = function (noIn, refDestructuringErrors) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseMaybeUnary(refDestructuringErrors, false);
- if (this.checkExpressionErrors(refDestructuringErrors)) {
- return expr;
- }
- return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, noIn);
- };
-
- // Parse binary operators with the operator precedence parsing
- // algorithm. `left` is the left-hand side of the operator.
- // `minPrec` provides context that allows the function to stop and
- // defer further parser to one of its callers when it encounters an
- // operator that has a lower precedence than the set it is parsing.
-
- pp$3.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) {
- var prec = this.type.binop;
- if (prec != null && (!noIn || this.type !== types._in)) {
- if (prec > minPrec) {
- var logical = this.type === types.logicalOR || this.type === types.logicalAND;
- var op = this.value;
- this.next();
- var startPos = this.start,
- startLoc = this.startLoc;
- var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn);
- var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical);
- return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
- }
- }
- return left;
- };
-
- pp$3.buildBinary = function (startPos, startLoc, left, right, op, logical) {
- var node = this.startNodeAt(startPos, startLoc);
- node.left = left;
- node.operator = op;
- node.right = right;
- return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression");
- };
-
- // Parse unary operators, both prefix and postfix.
-
- pp$3.parseMaybeUnary = function (refDestructuringErrors, sawUnary) {
- var this$1 = this;
-
- var startPos = this.start,
- startLoc = this.startLoc,
- expr;
- if (this.isContextual("await") && (this.inAsync || !this.inFunction && this.options.allowAwaitOutsideFunction)) {
- expr = this.parseAwait();
- sawUnary = true;
- } else if (this.type.prefix) {
- var node = this.startNode(),
- update = this.type === types.incDec;
- node.operator = this.value;
- node.prefix = true;
- this.next();
- node.argument = this.parseMaybeUnary(null, true);
- this.checkExpressionErrors(refDestructuringErrors, true);
- if (update) {
- this.checkLVal(node.argument);
- } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
- this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
- } else {
- sawUnary = true;
- }
- expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
- } else {
- expr = this.parseExprSubscripts(refDestructuringErrors);
- if (this.checkExpressionErrors(refDestructuringErrors)) {
- return expr;
- }
- while (this.type.postfix && !this.canInsertSemicolon()) {
- var node$1 = this$1.startNodeAt(startPos, startLoc);
- node$1.operator = this$1.value;
- node$1.prefix = false;
- node$1.argument = expr;
- this$1.checkLVal(expr);
- this$1.next();
- expr = this$1.finishNode(node$1, "UpdateExpression");
- }
- }
-
- if (!sawUnary && this.eat(types.starstar)) {
- return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false);
- } else {
- return expr;
- }
- };
-
- // Parse call, dot, and `[]`-subscript expressions.
-
- pp$3.parseExprSubscripts = function (refDestructuringErrors) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseExprAtom(refDestructuringErrors);
- var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")";
- if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) {
- return expr;
- }
- var result = this.parseSubscripts(expr, startPos, startLoc);
- if (refDestructuringErrors && result.type === "MemberExpression") {
- if (refDestructuringErrors.parenthesizedAssign >= result.start) {
- refDestructuringErrors.parenthesizedAssign = -1;
- }
- if (refDestructuringErrors.parenthesizedBind >= result.start) {
- refDestructuringErrors.parenthesizedBind = -1;
- }
- }
- return result;
- };
-
- pp$3.parseSubscripts = function (base, startPos, startLoc, noCalls) {
- var this$1 = this;
-
- var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && this.input.slice(base.start, base.end) === "async";
- for (var computed = void 0;;) {
- if ((computed = this$1.eat(types.bracketL)) || this$1.eat(types.dot)) {
- var node = this$1.startNodeAt(startPos, startLoc);
- node.object = base;
- node.property = computed ? this$1.parseExpression() : this$1.parseIdent(true);
- node.computed = !!computed;
- if (computed) {
- this$1.expect(types.bracketR);
- }
- base = this$1.finishNode(node, "MemberExpression");
- } else if (!noCalls && this$1.eat(types.parenL)) {
- var refDestructuringErrors = new DestructuringErrors(),
- oldYieldPos = this$1.yieldPos,
- oldAwaitPos = this$1.awaitPos;
- this$1.yieldPos = 0;
- this$1.awaitPos = 0;
- var exprList = this$1.parseExprList(types.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors);
- if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(types.arrow)) {
- this$1.checkPatternErrors(refDestructuringErrors, false);
- this$1.checkYieldAwaitInDefaultParams();
- this$1.yieldPos = oldYieldPos;
- this$1.awaitPos = oldAwaitPos;
- return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true);
- }
- this$1.checkExpressionErrors(refDestructuringErrors, true);
- this$1.yieldPos = oldYieldPos || this$1.yieldPos;
- this$1.awaitPos = oldAwaitPos || this$1.awaitPos;
- var node$1 = this$1.startNodeAt(startPos, startLoc);
- node$1.callee = base;
- node$1.arguments = exprList;
- base = this$1.finishNode(node$1, "CallExpression");
- } else if (this$1.type === types.backQuote) {
- var node$2 = this$1.startNodeAt(startPos, startLoc);
- node$2.tag = base;
- node$2.quasi = this$1.parseTemplate({ isTagged: true });
- base = this$1.finishNode(node$2, "TaggedTemplateExpression");
- } else {
- return base;
- }
- }
- };
-
- // Parse an atomic expression — either a single token that is an
- // expression, an expression started by a keyword like `function` or
- // `new`, or an expression wrapped in punctuation like `()`, `[]`,
- // or `{}`.
-
- pp$3.parseExprAtom = function (refDestructuringErrors) {
- // If a division operator appears in an expression position, the
- // tokenizer got confused, and we force it to read a regexp instead.
- if (this.type === types.slash) {
- this.readRegexp();
- }
-
- var node,
- canBeArrow = this.potentialArrowAt === this.start;
- switch (this.type) {
- case types._super:
- if (!this.allowSuper) {
- this.raise(this.start, "'super' keyword outside a method");
- }
- node = this.startNode();
- this.next();
- if (this.type === types.parenL && !this.allowDirectSuper) {
- this.raise(node.start, "super() call outside constructor of a subclass");
- }
- // The `super` keyword can appear at below:
- // SuperProperty:
- // super [ Expression ]
- // super . IdentifierName
- // SuperCall:
- // super Arguments
- if (this.type !== types.dot && this.type !== types.bracketL && this.type !== types.parenL) {
- this.unexpected();
- }
- return this.finishNode(node, "Super");
-
- case types._this:
- node = this.startNode();
- this.next();
- return this.finishNode(node, "ThisExpression");
-
- case types.name:
- var startPos = this.start,
- startLoc = this.startLoc,
- containsEsc = this.containsEsc;
- var id = this.parseIdent(this.type !== types.name);
- if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types._function)) {
- return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true);
- }
- if (canBeArrow && !this.canInsertSemicolon()) {
- if (this.eat(types.arrow)) {
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false);
- }
- if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types.name && !containsEsc) {
- id = this.parseIdent();
- if (this.canInsertSemicolon() || !this.eat(types.arrow)) {
- this.unexpected();
- }
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true);
- }
- }
- return id;
-
- case types.regexp:
- var value = this.value;
- node = this.parseLiteral(value.value);
- node.regex = { pattern: value.pattern, flags: value.flags };
- return node;
-
- case types.num:case types.string:
- return this.parseLiteral(this.value);
-
- case types._null:case types._true:case types._false:
- node = this.startNode();
- node.value = this.type === types._null ? null : this.type === types._true;
- node.raw = this.type.keyword;
- this.next();
- return this.finishNode(node, "Literal");
-
- case types.parenL:
- var start = this.start,
- expr = this.parseParenAndDistinguishExpression(canBeArrow);
- if (refDestructuringErrors) {
- if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) {
- refDestructuringErrors.parenthesizedAssign = start;
- }
- if (refDestructuringErrors.parenthesizedBind < 0) {
- refDestructuringErrors.parenthesizedBind = start;
- }
- }
- return expr;
-
- case types.bracketL:
- node = this.startNode();
- this.next();
- node.elements = this.parseExprList(types.bracketR, true, true, refDestructuringErrors);
- return this.finishNode(node, "ArrayExpression");
-
- case types.braceL:
- return this.parseObj(false, refDestructuringErrors);
-
- case types._function:
- node = this.startNode();
- this.next();
- return this.parseFunction(node, 0);
-
- case types._class:
- return this.parseClass(this.startNode(), false);
-
- case types._new:
- return this.parseNew();
-
- case types.backQuote:
- return this.parseTemplate();
-
- default:
- this.unexpected();
- }
- };
-
- pp$3.parseLiteral = function (value) {
- var node = this.startNode();
- node.value = value;
- node.raw = this.input.slice(this.start, this.end);
- this.next();
- return this.finishNode(node, "Literal");
- };
-
- pp$3.parseParenExpression = function () {
- this.expect(types.parenL);
- var val = this.parseExpression();
- this.expect(types.parenR);
- return val;
- };
-
- pp$3.parseParenAndDistinguishExpression = function (canBeArrow) {
- var this$1 = this;
-
- var startPos = this.start,
- startLoc = this.startLoc,
- val,
- allowTrailingComma = this.options.ecmaVersion >= 8;
- if (this.options.ecmaVersion >= 6) {
- this.next();
-
- var innerStartPos = this.start,
- innerStartLoc = this.startLoc;
- var exprList = [],
- first = true,
- lastIsComma = false;
- var refDestructuringErrors = new DestructuringErrors(),
- oldYieldPos = this.yieldPos,
- oldAwaitPos = this.awaitPos,
- spreadStart;
- this.yieldPos = 0;
- this.awaitPos = 0;
- while (this.type !== types.parenR) {
- first ? first = false : this$1.expect(types.comma);
- if (allowTrailingComma && this$1.afterTrailingComma(types.parenR, true)) {
- lastIsComma = true;
- break;
- } else if (this$1.type === types.ellipsis) {
- spreadStart = this$1.start;
- exprList.push(this$1.parseParenItem(this$1.parseRestBinding()));
- if (this$1.type === types.comma) {
- this$1.raise(this$1.start, "Comma is not permitted after the rest element");
- }
- break;
- } else {
- exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem));
- }
- }
- var innerEndPos = this.start,
- innerEndLoc = this.startLoc;
- this.expect(types.parenR);
-
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {
- this.checkPatternErrors(refDestructuringErrors, false);
- this.checkYieldAwaitInDefaultParams();
- this.yieldPos = oldYieldPos;
- this.awaitPos = oldAwaitPos;
- return this.parseParenArrowList(startPos, startLoc, exprList);
- }
-
- if (!exprList.length || lastIsComma) {
- this.unexpected(this.lastTokStart);
- }
- if (spreadStart) {
- this.unexpected(spreadStart);
- }
- this.checkExpressionErrors(refDestructuringErrors, true);
- this.yieldPos = oldYieldPos || this.yieldPos;
- this.awaitPos = oldAwaitPos || this.awaitPos;
-
- if (exprList.length > 1) {
- val = this.startNodeAt(innerStartPos, innerStartLoc);
- val.expressions = exprList;
- this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
- } else {
- val = exprList[0];
- }
- } else {
- val = this.parseParenExpression();
- }
-
- if (this.options.preserveParens) {
- var par = this.startNodeAt(startPos, startLoc);
- par.expression = val;
- return this.finishNode(par, "ParenthesizedExpression");
- } else {
- return val;
- }
- };
-
- pp$3.parseParenItem = function (item) {
- return item;
- };
-
- pp$3.parseParenArrowList = function (startPos, startLoc, exprList) {
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList);
- };
-
- // New's precedence is slightly tricky. It must allow its argument to
- // be a `[]` or dot subscript expression, but not a call — at least,
- // not without wrapping it in parentheses. Thus, it uses the noCalls
- // argument to parseSubscripts to prevent it from consuming the
- // argument list.
-
- var empty$1 = [];
-
- pp$3.parseNew = function () {
- var node = this.startNode();
- var meta = this.parseIdent(true);
- if (this.options.ecmaVersion >= 6 && this.eat(types.dot)) {
- node.meta = meta;
- var containsEsc = this.containsEsc;
- node.property = this.parseIdent(true);
- if (node.property.name !== "target" || containsEsc) {
- this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target");
- }
- if (!this.inNonArrowFunction()) {
- this.raiseRecoverable(node.start, "new.target can only be used in functions");
- }
- return this.finishNode(node, "MetaProperty");
- }
- var startPos = this.start,
- startLoc = this.startLoc;
- node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
- if (this.eat(types.parenL)) {
- node.arguments = this.parseExprList(types.parenR, this.options.ecmaVersion >= 8, false);
- } else {
- node.arguments = empty$1;
- }
- return this.finishNode(node, "NewExpression");
- };
-
- // Parse template expression.
-
- pp$3.parseTemplateElement = function (ref) {
- var isTagged = ref.isTagged;
-
- var elem = this.startNode();
- if (this.type === types.invalidTemplate) {
- if (!isTagged) {
- this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal");
- }
- elem.value = {
- raw: this.value,
- cooked: null
- };
- } else {
- elem.value = {
- raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
- cooked: this.value
- };
- }
- this.next();
- elem.tail = this.type === types.backQuote;
- return this.finishNode(elem, "TemplateElement");
- };
-
- pp$3.parseTemplate = function (ref) {
- var this$1 = this;
- if (ref === void 0) ref = {};
- var isTagged = ref.isTagged;if (isTagged === void 0) isTagged = false;
-
- var node = this.startNode();
- this.next();
- node.expressions = [];
- var curElt = this.parseTemplateElement({ isTagged: isTagged });
- node.quasis = [curElt];
- while (!curElt.tail) {
- if (this$1.type === types.eof) {
- this$1.raise(this$1.pos, "Unterminated template literal");
- }
- this$1.expect(types.dollarBraceL);
- node.expressions.push(this$1.parseExpression());
- this$1.expect(types.braceR);
- node.quasis.push(curElt = this$1.parseTemplateElement({ isTagged: isTagged }));
- }
- this.next();
- return this.finishNode(node, "TemplateLiteral");
- };
-
- pp$3.isAsyncProp = function (prop) {
- return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types.name || this.type === types.num || this.type === types.string || this.type === types.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
- };
-
- // Parse an object literal or binding pattern.
-
- pp$3.parseObj = function (isPattern, refDestructuringErrors) {
- var this$1 = this;
-
- var node = this.startNode(),
- first = true,
- propHash = {};
- node.properties = [];
- this.next();
- while (!this.eat(types.braceR)) {
- if (!first) {
- this$1.expect(types.comma);
- if (this$1.afterTrailingComma(types.braceR)) {
- break;
- }
- } else {
- first = false;
- }
-
- var prop = this$1.parseProperty(isPattern, refDestructuringErrors);
- if (!isPattern) {
- this$1.checkPropClash(prop, propHash, refDestructuringErrors);
- }
- node.properties.push(prop);
- }
- return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
- };
-
- pp$3.parseProperty = function (isPattern, refDestructuringErrors) {
- var prop = this.startNode(),
- isGenerator,
- isAsync,
- startPos,
- startLoc;
- if (this.options.ecmaVersion >= 9 && this.eat(types.ellipsis)) {
- if (isPattern) {
- prop.argument = this.parseIdent(false);
- if (this.type === types.comma) {
- this.raise(this.start, "Comma is not permitted after the rest element");
- }
- return this.finishNode(prop, "RestElement");
- }
- // To disallow parenthesized identifier via `this.toAssignable()`.
- if (this.type === types.parenL && refDestructuringErrors) {
- if (refDestructuringErrors.parenthesizedAssign < 0) {
- refDestructuringErrors.parenthesizedAssign = this.start;
- }
- if (refDestructuringErrors.parenthesizedBind < 0) {
- refDestructuringErrors.parenthesizedBind = this.start;
- }
- }
- // Parse argument.
- prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
- // To disallow trailing comma via `this.toAssignable()`.
- if (this.type === types.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
- refDestructuringErrors.trailingComma = this.start;
- }
- // Finish
- return this.finishNode(prop, "SpreadElement");
- }
- if (this.options.ecmaVersion >= 6) {
- prop.method = false;
- prop.shorthand = false;
- if (isPattern || refDestructuringErrors) {
- startPos = this.start;
- startLoc = this.startLoc;
- }
- if (!isPattern) {
- isGenerator = this.eat(types.star);
- }
- }
- var containsEsc = this.containsEsc;
- this.parsePropertyName(prop);
- if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
- isAsync = true;
- isGenerator = this.options.ecmaVersion >= 9 && this.eat(types.star);
- this.parsePropertyName(prop, refDestructuringErrors);
- } else {
- isAsync = false;
- }
- this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc);
- return this.finishNode(prop, "Property");
- };
-
- pp$3.parsePropertyValue = function (prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
- if ((isGenerator || isAsync) && this.type === types.colon) {
- this.unexpected();
- }
-
- if (this.eat(types.colon)) {
- prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors);
- prop.kind = "init";
- } else if (this.options.ecmaVersion >= 6 && this.type === types.parenL) {
- if (isPattern) {
- this.unexpected();
- }
- prop.kind = "init";
- prop.method = true;
- prop.value = this.parseMethod(isGenerator, isAsync);
- } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && this.type !== types.comma && this.type !== types.braceR) {
- if (isGenerator || isAsync) {
- this.unexpected();
- }
- prop.kind = prop.key.name;
- this.parsePropertyName(prop);
- prop.value = this.parseMethod(false);
- var paramCount = prop.kind === "get" ? 0 : 1;
- if (prop.value.params.length !== paramCount) {
- var start = prop.value.start;
- if (prop.kind === "get") {
- this.raiseRecoverable(start, "getter should have no params");
- } else {
- this.raiseRecoverable(start, "setter should have exactly one param");
- }
- } else {
- if (prop.kind === "set" && prop.value.params[0].type === "RestElement") {
- this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params");
- }
- }
- } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
- this.checkUnreserved(prop.key);
- prop.kind = "init";
- if (isPattern) {
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
- } else if (this.type === types.eq && refDestructuringErrors) {
- if (refDestructuringErrors.shorthandAssign < 0) {
- refDestructuringErrors.shorthandAssign = this.start;
- }
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
- } else {
- prop.value = prop.key;
- }
- prop.shorthand = true;
- } else {
- this.unexpected();
- }
- };
-
- pp$3.parsePropertyName = function (prop) {
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(types.bracketL)) {
- prop.computed = true;
- prop.key = this.parseMaybeAssign();
- this.expect(types.bracketR);
- return prop.key;
- } else {
- prop.computed = false;
- }
- }
- return prop.key = this.type === types.num || this.type === types.string ? this.parseExprAtom() : this.parseIdent(true);
- };
-
- // Initialize empty function node.
-
- pp$3.initFunction = function (node) {
- node.id = null;
- if (this.options.ecmaVersion >= 6) {
- node.generator = node.expression = false;
- }
- if (this.options.ecmaVersion >= 8) {
- node.async = false;
- }
- };
-
- // Parse object or class method.
-
- pp$3.parseMethod = function (isGenerator, isAsync, allowDirectSuper) {
- var node = this.startNode(),
- oldYieldPos = this.yieldPos,
- oldAwaitPos = this.awaitPos;
-
- this.initFunction(node);
- if (this.options.ecmaVersion >= 6) {
- node.generator = isGenerator;
- }
- if (this.options.ecmaVersion >= 8) {
- node.async = !!isAsync;
- }
-
- this.yieldPos = 0;
- this.awaitPos = 0;
- this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
-
- this.expect(types.parenL);
- node.params = this.parseBindingList(types.parenR, false, this.options.ecmaVersion >= 8);
- this.checkYieldAwaitInDefaultParams();
- this.parseFunctionBody(node, false);
-
- this.yieldPos = oldYieldPos;
- this.awaitPos = oldAwaitPos;
- return this.finishNode(node, "FunctionExpression");
- };
-
- // Parse arrow function expression with given parameters.
-
- pp$3.parseArrowExpression = function (node, params, isAsync) {
- var oldYieldPos = this.yieldPos,
- oldAwaitPos = this.awaitPos;
-
- this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW);
- this.initFunction(node);
- if (this.options.ecmaVersion >= 8) {
- node.async = !!isAsync;
- }
-
- this.yieldPos = 0;
- this.awaitPos = 0;
-
- node.params = this.toAssignableList(params, true);
- this.parseFunctionBody(node, true);
-
- this.yieldPos = oldYieldPos;
- this.awaitPos = oldAwaitPos;
- return this.finishNode(node, "ArrowFunctionExpression");
- };
-
- // Parse function body and check parameters.
-
- pp$3.parseFunctionBody = function (node, isArrowFunction) {
- var isExpression = isArrowFunction && this.type !== types.braceL;
- var oldStrict = this.strict,
- useStrict = false;
-
- if (isExpression) {
- node.body = this.parseMaybeAssign();
- node.expression = true;
- this.checkParams(node, false);
- } else {
- var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params);
- if (!oldStrict || nonSimple) {
- useStrict = this.strictDirective(this.end);
- // If this is a strict mode function, verify that argument names
- // are not repeated, and it does not try to bind the words `eval`
- // or `arguments`.
- if (useStrict && nonSimple) {
- this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list");
- }
- }
- // Start a new scope with regard to labels and the `inFunction`
- // flag (restore them to their old value afterwards).
- var oldLabels = this.labels;
- this.labels = [];
- if (useStrict) {
- this.strict = true;
- }
-
- // Add the params to varDeclaredNames to ensure that an error is thrown
- // if a let/const declaration in the function clashes with one of the params.
- this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && this.isSimpleParamList(node.params));
- node.body = this.parseBlock(false);
- node.expression = false;
- this.adaptDirectivePrologue(node.body.body);
- this.labels = oldLabels;
- }
- this.exitScope();
-
- // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'
- if (this.strict && node.id) {
- this.checkLVal(node.id, BIND_OUTSIDE);
- }
- this.strict = oldStrict;
- };
-
- pp$3.isSimpleParamList = function (params) {
- for (var i = 0, list = params; i < list.length; i += 1) {
- var param = list[i];
-
- if (param.type !== "Identifier") {
- return false;
- }
- }
- return true;
- };
-
- // Checks function params for various disallowed patterns such as using "eval"
- // or "arguments" and duplicate parameters.
-
- pp$3.checkParams = function (node, allowDuplicates) {
- var this$1 = this;
-
- var nameHash = {};
- for (var i = 0, list = node.params; i < list.length; i += 1) {
- var param = list[i];
-
- this$1.checkLVal(param, BIND_VAR, allowDuplicates ? null : nameHash);
- }
- };
-
- // Parses a comma-separated list of expressions, and returns them as
- // an array. `close` is the token type that ends the list, and
- // `allowEmpty` can be turned on to allow subsequent commas with
- // nothing in between them to be parsed as `null` (which is needed
- // for array literals).
-
- pp$3.parseExprList = function (close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
- var this$1 = this;
-
- var elts = [],
- first = true;
- while (!this.eat(close)) {
- if (!first) {
- this$1.expect(types.comma);
- if (allowTrailingComma && this$1.afterTrailingComma(close)) {
- break;
- }
- } else {
- first = false;
- }
-
- var elt = void 0;
- if (allowEmpty && this$1.type === types.comma) {
- elt = null;
- } else if (this$1.type === types.ellipsis) {
- elt = this$1.parseSpread(refDestructuringErrors);
- if (refDestructuringErrors && this$1.type === types.comma && refDestructuringErrors.trailingComma < 0) {
- refDestructuringErrors.trailingComma = this$1.start;
- }
- } else {
- elt = this$1.parseMaybeAssign(false, refDestructuringErrors);
- }
- elts.push(elt);
- }
- return elts;
- };
-
- pp$3.checkUnreserved = function (ref) {
- var start = ref.start;
- var end = ref.end;
- var name = ref.name;
-
- if (this.inGenerator && name === "yield") {
- this.raiseRecoverable(start, "Can not use 'yield' as identifier inside a generator");
- }
- if (this.inAsync && name === "await") {
- this.raiseRecoverable(start, "Can not use 'await' as identifier inside an async function");
- }
- if (this.keywords.test(name)) {
- this.raise(start, "Unexpected keyword '" + name + "'");
- }
- if (this.options.ecmaVersion < 6 && this.input.slice(start, end).indexOf("\\") !== -1) {
- return;
- }
- var re = this.strict ? this.reservedWordsStrict : this.reservedWords;
- if (re.test(name)) {
- if (!this.inAsync && name === "await") {
- this.raiseRecoverable(start, "Can not use keyword 'await' outside an async function");
- }
- this.raiseRecoverable(start, "The keyword '" + name + "' is reserved");
- }
- };
-
- // Parse the next token as an identifier. If `liberal` is true (used
- // when parsing properties), it will also convert keywords into
- // identifiers.
-
- pp$3.parseIdent = function (liberal, isBinding) {
- var node = this.startNode();
- if (liberal && this.options.allowReserved === "never") {
- liberal = false;
- }
- if (this.type === types.name) {
- node.name = this.value;
- } else if (this.type.keyword) {
- node.name = this.type.keyword;
-
- // To fix https://github.com/acornjs/acorn/issues/575
- // `class` and `function` keywords push new context into this.context.
- // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.
- // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword
- if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
- this.context.pop();
- }
- } else {
- this.unexpected();
- }
- this.next();
- this.finishNode(node, "Identifier");
- if (!liberal) {
- this.checkUnreserved(node);
- }
- return node;
- };
-
- // Parses yield expression inside generator.
-
- pp$3.parseYield = function () {
- if (!this.yieldPos) {
- this.yieldPos = this.start;
- }
-
- var node = this.startNode();
- this.next();
- if (this.type === types.semi || this.canInsertSemicolon() || this.type !== types.star && !this.type.startsExpr) {
- node.delegate = false;
- node.argument = null;
- } else {
- node.delegate = this.eat(types.star);
- node.argument = this.parseMaybeAssign();
- }
- return this.finishNode(node, "YieldExpression");
- };
-
- pp$3.parseAwait = function () {
- if (!this.awaitPos) {
- this.awaitPos = this.start;
- }
-
- var node = this.startNode();
- this.next();
- node.argument = this.parseMaybeUnary(null, true);
- return this.finishNode(node, "AwaitExpression");
- };
-
- var pp$4 = Parser.prototype;
-
- // This function is used to raise exceptions on parse errors. It
- // takes an offset integer (into the current `input`) to indicate
- // the location of the error, attaches the position to the end
- // of the error message, and then raises a `SyntaxError` with that
- // message.
-
- pp$4.raise = function (pos, message) {
- var loc = getLineInfo(this.input, pos);
- message += " (" + loc.line + ":" + loc.column + ")";
- var err = new SyntaxError(message);
- err.pos = pos;err.loc = loc;err.raisedAt = this.pos;
- throw err;
- };
-
- pp$4.raiseRecoverable = pp$4.raise;
-
- pp$4.curPosition = function () {
- if (this.options.locations) {
- return new Position(this.curLine, this.pos - this.lineStart);
- }
- };
-
- var pp$5 = Parser.prototype;
-
- var Scope = function Scope(flags) {
- this.flags = flags;
- // A list of var-declared names in the current lexical scope
- this.var = [];
- // A list of lexically-declared names in the current lexical scope
- this.lexical = [];
- };
-
- // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names.
-
- pp$5.enterScope = function (flags) {
- this.scopeStack.push(new Scope(flags));
- };
-
- pp$5.exitScope = function () {
- this.scopeStack.pop();
- };
-
- pp$5.declareName = function (name, bindingType, pos) {
- var this$1 = this;
-
- var redeclared = false;
- if (bindingType === BIND_LEXICAL) {
- var scope = this.currentScope();
- redeclared = scope.lexical.indexOf(name) > -1 || scope.var.indexOf(name) > -1;
- scope.lexical.push(name);
- } else if (bindingType === BIND_SIMPLE_CATCH) {
- var scope$1 = this.currentScope();
- scope$1.lexical.push(name);
- } else if (bindingType === BIND_FUNCTION) {
- var scope$2 = this.currentScope();
- redeclared = scope$2.lexical.indexOf(name) > -1;
- scope$2.var.push(name);
- } else {
- for (var i = this.scopeStack.length - 1; i >= 0; --i) {
- var scope$3 = this$1.scopeStack[i];
- if (scope$3.lexical.indexOf(name) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) {
- redeclared = true;
- }
- scope$3.var.push(name);
- if (scope$3.flags & SCOPE_VAR) {
- break;
- }
- }
- }
- if (redeclared) {
- this.raiseRecoverable(pos, "Identifier '" + name + "' has already been declared");
- }
- };
-
- pp$5.currentScope = function () {
- return this.scopeStack[this.scopeStack.length - 1];
- };
-
- pp$5.currentVarScope = function () {
- var this$1 = this;
-
- for (var i = this.scopeStack.length - 1;; i--) {
- var scope = this$1.scopeStack[i];
- if (scope.flags & SCOPE_VAR) {
- return scope;
- }
- }
- };
-
- // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`.
- pp$5.currentThisScope = function () {
- var this$1 = this;
-
- for (var i = this.scopeStack.length - 1;; i--) {
- var scope = this$1.scopeStack[i];
- if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) {
- return scope;
- }
- }
- };
-
- var Node = function Node(parser, pos, loc) {
- this.type = "";
- this.start = pos;
- this.end = 0;
- if (parser.options.locations) {
- this.loc = new SourceLocation(parser, loc);
- }
- if (parser.options.directSourceFile) {
- this.sourceFile = parser.options.directSourceFile;
- }
- if (parser.options.ranges) {
- this.range = [pos, 0];
- }
- };
-
- // Start an AST node, attaching a start offset.
-
- var pp$6 = Parser.prototype;
-
- pp$6.startNode = function () {
- return new Node(this, this.start, this.startLoc);
- };
-
- pp$6.startNodeAt = function (pos, loc) {
- return new Node(this, pos, loc);
- };
-
- // Finish an AST node, adding `type` and `end` properties.
-
- function finishNodeAt(node, type, pos, loc) {
- node.type = type;
- node.end = pos;
- if (this.options.locations) {
- node.loc.end = loc;
- }
- if (this.options.ranges) {
- node.range[1] = pos;
- }
- return node;
- }
-
- pp$6.finishNode = function (node, type) {
- return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc);
- };
-
- // Finish node at given position
-
- pp$6.finishNodeAt = function (node, type, pos, loc) {
- return finishNodeAt.call(this, node, type, pos, loc);
- };
-
- // The algorithm used to determine whether a regexp can appear at a
- // given point in the program is loosely based on sweet.js' approach.
- // See https://github.com/mozilla/sweet.js/wiki/design
-
- var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) {
- this.token = token;
- this.isExpr = !!isExpr;
- this.preserveSpace = !!preserveSpace;
- this.override = override;
- this.generator = !!generator;
- };
-
- var types$1 = {
- b_stat: new TokContext("{", false),
- b_expr: new TokContext("{", true),
- b_tmpl: new TokContext("${", false),
- p_stat: new TokContext("(", false),
- p_expr: new TokContext("(", true),
- q_tmpl: new TokContext("`", true, true, function (p) {
- return p.tryReadTemplateToken();
- }),
- f_stat: new TokContext("function", false),
- f_expr: new TokContext("function", true),
- f_expr_gen: new TokContext("function", true, false, null, true),
- f_gen: new TokContext("function", false, false, null, true)
- };
-
- var pp$7 = Parser.prototype;
-
- pp$7.initialContext = function () {
- return [types$1.b_stat];
- };
-
- pp$7.braceIsBlock = function (prevType) {
- var parent = this.curContext();
- if (parent === types$1.f_expr || parent === types$1.f_stat) {
- return true;
- }
- if (prevType === types.colon && (parent === types$1.b_stat || parent === types$1.b_expr)) {
- return !parent.isExpr;
- }
-
- // The check for `tt.name && exprAllowed` detects whether we are
- // after a `yield` or `of` construct. See the `updateContext` for
- // `tt.name`.
- if (prevType === types._return || prevType === types.name && this.exprAllowed) {
- return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
- }
- if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR || prevType === types.arrow) {
- return true;
- }
- if (prevType === types.braceL) {
- return parent === types$1.b_stat;
- }
- if (prevType === types._var || prevType === types._const || prevType === types.name) {
- return false;
- }
- return !this.exprAllowed;
- };
-
- pp$7.inGeneratorContext = function () {
- var this$1 = this;
-
- for (var i = this.context.length - 1; i >= 1; i--) {
- var context = this$1.context[i];
- if (context.token === "function") {
- return context.generator;
- }
- }
- return false;
- };
-
- pp$7.updateContext = function (prevType) {
- var update,
- type = this.type;
- if (type.keyword && prevType === types.dot) {
- this.exprAllowed = false;
- } else if (update = type.updateContext) {
- update.call(this, prevType);
- } else {
- this.exprAllowed = type.beforeExpr;
- }
- };
-
- // Token-specific context update code
-
- types.parenR.updateContext = types.braceR.updateContext = function () {
- if (this.context.length === 1) {
- this.exprAllowed = true;
- return;
- }
- var out = this.context.pop();
- if (out === types$1.b_stat && this.curContext().token === "function") {
- out = this.context.pop();
- }
- this.exprAllowed = !out.isExpr;
- };
-
- types.braceL.updateContext = function (prevType) {
- this.context.push(this.braceIsBlock(prevType) ? types$1.b_stat : types$1.b_expr);
- this.exprAllowed = true;
- };
-
- types.dollarBraceL.updateContext = function () {
- this.context.push(types$1.b_tmpl);
- this.exprAllowed = true;
- };
-
- types.parenL.updateContext = function (prevType) {
- var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;
- this.context.push(statementParens ? types$1.p_stat : types$1.p_expr);
- this.exprAllowed = true;
- };
-
- types.incDec.updateContext = function () {
- // tokExprAllowed stays unchanged
- };
-
- types._function.updateContext = types._class.updateContext = function (prevType) {
- if (prevType.beforeExpr && prevType !== types.semi && prevType !== types._else && !(prevType === types._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types.colon || prevType === types.braceL) && this.curContext() === types$1.b_stat)) {
- this.context.push(types$1.f_expr);
- } else {
- this.context.push(types$1.f_stat);
- }
- this.exprAllowed = false;
- };
-
- types.backQuote.updateContext = function () {
- if (this.curContext() === types$1.q_tmpl) {
- this.context.pop();
- } else {
- this.context.push(types$1.q_tmpl);
- }
- this.exprAllowed = false;
- };
-
- types.star.updateContext = function (prevType) {
- if (prevType === types._function) {
- var index = this.context.length - 1;
- if (this.context[index] === types$1.f_expr) {
- this.context[index] = types$1.f_expr_gen;
- } else {
- this.context[index] = types$1.f_gen;
- }
- }
- this.exprAllowed = true;
- };
-
- types.name.updateContext = function (prevType) {
- var allowed = false;
- if (this.options.ecmaVersion >= 6 && prevType !== types.dot) {
- if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) {
- allowed = true;
- }
- }
- this.exprAllowed = allowed;
- };
-
- var data = {
- "$LONE": ["ASCII", "ASCII_Hex_Digit", "AHex", "Alphabetic", "Alpha", "Any", "Assigned", "Bidi_Control", "Bidi_C", "Bidi_Mirrored", "Bidi_M", "Case_Ignorable", "CI", "Cased", "Changes_When_Casefolded", "CWCF", "Changes_When_Casemapped", "CWCM", "Changes_When_Lowercased", "CWL", "Changes_When_NFKC_Casefolded", "CWKCF", "Changes_When_Titlecased", "CWT", "Changes_When_Uppercased", "CWU", "Dash", "Default_Ignorable_Code_Point", "DI", "Deprecated", "Dep", "Diacritic", "Dia", "Emoji", "Emoji_Component", "Emoji_Modifier", "Emoji_Modifier_Base", "Emoji_Presentation", "Extender", "Ext", "Grapheme_Base", "Gr_Base", "Grapheme_Extend", "Gr_Ext", "Hex_Digit", "Hex", "IDS_Binary_Operator", "IDSB", "IDS_Trinary_Operator", "IDST", "ID_Continue", "IDC", "ID_Start", "IDS", "Ideographic", "Ideo", "Join_Control", "Join_C", "Logical_Order_Exception", "LOE", "Lowercase", "Lower", "Math", "Noncharacter_Code_Point", "NChar", "Pattern_Syntax", "Pat_Syn", "Pattern_White_Space", "Pat_WS", "Quotation_Mark", "QMark", "Radical", "Regional_Indicator", "RI", "Sentence_Terminal", "STerm", "Soft_Dotted", "SD", "Terminal_Punctuation", "Term", "Unified_Ideograph", "UIdeo", "Uppercase", "Upper", "Variation_Selector", "VS", "White_Space", "space", "XID_Continue", "XIDC", "XID_Start", "XIDS"],
- "General_Category": ["Cased_Letter", "LC", "Close_Punctuation", "Pe", "Connector_Punctuation", "Pc", "Control", "Cc", "cntrl", "Currency_Symbol", "Sc", "Dash_Punctuation", "Pd", "Decimal_Number", "Nd", "digit", "Enclosing_Mark", "Me", "Final_Punctuation", "Pf", "Format", "Cf", "Initial_Punctuation", "Pi", "Letter", "L", "Letter_Number", "Nl", "Line_Separator", "Zl", "Lowercase_Letter", "Ll", "Mark", "M", "Combining_Mark", "Math_Symbol", "Sm", "Modifier_Letter", "Lm", "Modifier_Symbol", "Sk", "Nonspacing_Mark", "Mn", "Number", "N", "Open_Punctuation", "Ps", "Other", "C", "Other_Letter", "Lo", "Other_Number", "No", "Other_Punctuation", "Po", "Other_Symbol", "So", "Paragraph_Separator", "Zp", "Private_Use", "Co", "Punctuation", "P", "punct", "Separator", "Z", "Space_Separator", "Zs", "Spacing_Mark", "Mc", "Surrogate", "Cs", "Symbol", "S", "Titlecase_Letter", "Lt", "Unassigned", "Cn", "Uppercase_Letter", "Lu"],
- "Script": ["Adlam", "Adlm", "Ahom", "Anatolian_Hieroglyphs", "Hluw", "Arabic", "Arab", "Armenian", "Armn", "Avestan", "Avst", "Balinese", "Bali", "Bamum", "Bamu", "Bassa_Vah", "Bass", "Batak", "Batk", "Bengali", "Beng", "Bhaiksuki", "Bhks", "Bopomofo", "Bopo", "Brahmi", "Brah", "Braille", "Brai", "Buginese", "Bugi", "Buhid", "Buhd", "Canadian_Aboriginal", "Cans", "Carian", "Cari", "Caucasian_Albanian", "Aghb", "Chakma", "Cakm", "Cham", "Cherokee", "Cher", "Common", "Zyyy", "Coptic", "Copt", "Qaac", "Cuneiform", "Xsux", "Cypriot", "Cprt", "Cyrillic", "Cyrl", "Deseret", "Dsrt", "Devanagari", "Deva", "Duployan", "Dupl", "Egyptian_Hieroglyphs", "Egyp", "Elbasan", "Elba", "Ethiopic", "Ethi", "Georgian", "Geor", "Glagolitic", "Glag", "Gothic", "Goth", "Grantha", "Gran", "Greek", "Grek", "Gujarati", "Gujr", "Gurmukhi", "Guru", "Han", "Hani", "Hangul", "Hang", "Hanunoo", "Hano", "Hatran", "Hatr", "Hebrew", "Hebr", "Hiragana", "Hira", "Imperial_Aramaic", "Armi", "Inherited", "Zinh", "Qaai", "Inscriptional_Pahlavi", "Phli", "Inscriptional_Parthian", "Prti", "Javanese", "Java", "Kaithi", "Kthi", "Kannada", "Knda", "Katakana", "Kana", "Kayah_Li", "Kali", "Kharoshthi", "Khar", "Khmer", "Khmr", "Khojki", "Khoj", "Khudawadi", "Sind", "Lao", "Laoo", "Latin", "Latn", "Lepcha", "Lepc", "Limbu", "Limb", "Linear_A", "Lina", "Linear_B", "Linb", "Lisu", "Lycian", "Lyci", "Lydian", "Lydi", "Mahajani", "Mahj", "Malayalam", "Mlym", "Mandaic", "Mand", "Manichaean", "Mani", "Marchen", "Marc", "Masaram_Gondi", "Gonm", "Meetei_Mayek", "Mtei", "Mende_Kikakui", "Mend", "Meroitic_Cursive", "Merc", "Meroitic_Hieroglyphs", "Mero", "Miao", "Plrd", "Modi", "Mongolian", "Mong", "Mro", "Mroo", "Multani", "Mult", "Myanmar", "Mymr", "Nabataean", "Nbat", "New_Tai_Lue", "Talu", "Newa", "Nko", "Nkoo", "Nushu", "Nshu", "Ogham", "Ogam", "Ol_Chiki", "Olck", "Old_Hungarian", "Hung", "Old_Italic", "Ital", "Old_North_Arabian", "Narb", "Old_Permic", "Perm", "Old_Persian", "Xpeo", "Old_South_Arabian", "Sarb", "Old_Turkic", "Orkh", "Oriya", "Orya", "Osage", "Osge", "Osmanya", "Osma", "Pahawh_Hmong", "Hmng", "Palmyrene", "Palm", "Pau_Cin_Hau", "Pauc", "Phags_Pa", "Phag", "Phoenician", "Phnx", "Psalter_Pahlavi", "Phlp", "Rejang", "Rjng", "Runic", "Runr", "Samaritan", "Samr", "Saurashtra", "Saur", "Sharada", "Shrd", "Shavian", "Shaw", "Siddham", "Sidd", "SignWriting", "Sgnw", "Sinhala", "Sinh", "Sora_Sompeng", "Sora", "Soyombo", "Soyo", "Sundanese", "Sund", "Syloti_Nagri", "Sylo", "Syriac", "Syrc", "Tagalog", "Tglg", "Tagbanwa", "Tagb", "Tai_Le", "Tale", "Tai_Tham", "Lana", "Tai_Viet", "Tavt", "Takri", "Takr", "Tamil", "Taml", "Tangut", "Tang", "Telugu", "Telu", "Thaana", "Thaa", "Thai", "Tibetan", "Tibt", "Tifinagh", "Tfng", "Tirhuta", "Tirh", "Ugaritic", "Ugar", "Vai", "Vaii", "Warang_Citi", "Wara", "Yi", "Yiii", "Zanabazar_Square", "Zanb"]
- };
- Array.prototype.push.apply(data.$LONE, data.General_Category);
- data.gc = data.General_Category;
- data.sc = data.Script_Extensions = data.scx = data.Script;
-
- var pp$9 = Parser.prototype;
-
- var RegExpValidationState = function RegExpValidationState(parser) {
- this.parser = parser;
- this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "");
- this.source = "";
- this.flags = "";
- this.start = 0;
- this.switchU = false;
- this.switchN = false;
- this.pos = 0;
- this.lastIntValue = 0;
- this.lastStringValue = "";
- this.lastAssertionIsQuantifiable = false;
- this.numCapturingParens = 0;
- this.maxBackReference = 0;
- this.groupNames = [];
- this.backReferenceNames = [];
- };
-
- RegExpValidationState.prototype.reset = function reset(start, pattern, flags) {
- var unicode = flags.indexOf("u") !== -1;
- this.start = start | 0;
- this.source = pattern + "";
- this.flags = flags;
- this.switchU = unicode && this.parser.options.ecmaVersion >= 6;
- this.switchN = unicode && this.parser.options.ecmaVersion >= 9;
- };
-
- RegExpValidationState.prototype.raise = function raise(message) {
- this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message);
- };
-
- // If u flag is given, this returns the code point at the index (it combines a surrogate pair).
- // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).
- RegExpValidationState.prototype.at = function at(i) {
- var s = this.source;
- var l = s.length;
- if (i >= l) {
- return -1;
- }
- var c = s.charCodeAt(i);
- if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {
- return c;
- }
- return (c << 10) + s.charCodeAt(i + 1) - 0x35FDC00;
- };
-
- RegExpValidationState.prototype.nextIndex = function nextIndex(i) {
- var s = this.source;
- var l = s.length;
- if (i >= l) {
- return l;
- }
- var c = s.charCodeAt(i);
- if (!this.switchU || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {
- return i + 1;
- }
- return i + 2;
- };
-
- RegExpValidationState.prototype.current = function current() {
- return this.at(this.pos);
- };
-
- RegExpValidationState.prototype.lookahead = function lookahead() {
- return this.at(this.nextIndex(this.pos));
- };
-
- RegExpValidationState.prototype.advance = function advance() {
- this.pos = this.nextIndex(this.pos);
- };
-
- RegExpValidationState.prototype.eat = function eat(ch) {
- if (this.current() === ch) {
- this.advance();
- return true;
- }
- return false;
- };
-
- function codePointToString$1(ch) {
- if (ch <= 0xFFFF) {
- return String.fromCharCode(ch);
- }
- ch -= 0x10000;
- return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00);
- }
-
- /**
- * Validate the flags part of a given RegExpLiteral.
- *
- * @param {RegExpValidationState} state The state to validate RegExp.
- * @returns {void}
- */
- pp$9.validateRegExpFlags = function (state) {
- var this$1 = this;
-
- var validFlags = state.validFlags;
- var flags = state.flags;
-
- for (var i = 0; i < flags.length; i++) {
- var flag = flags.charAt(i);
- if (validFlags.indexOf(flag) === -1) {
- this$1.raise(state.start, "Invalid regular expression flag");
- }
- if (flags.indexOf(flag, i + 1) > -1) {
- this$1.raise(state.start, "Duplicate regular expression flag");
- }
- }
- };
-
- /**
- * Validate the pattern part of a given RegExpLiteral.
- *
- * @param {RegExpValidationState} state The state to validate RegExp.
- * @returns {void}
- */
- pp$9.validateRegExpPattern = function (state) {
- this.regexp_pattern(state);
-
- // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of
- // parsing contains a |GroupName|, reparse with the goal symbol
- // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
- // exception if _P_ did not conform to the grammar, if any elements of _P_
- // were not matched by the parse, or if any Early Error conditions exist.
- if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) {
- state.switchN = true;
- this.regexp_pattern(state);
- }
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern
- pp$9.regexp_pattern = function (state) {
- state.pos = 0;
- state.lastIntValue = 0;
- state.lastStringValue = "";
- state.lastAssertionIsQuantifiable = false;
- state.numCapturingParens = 0;
- state.maxBackReference = 0;
- state.groupNames.length = 0;
- state.backReferenceNames.length = 0;
-
- this.regexp_disjunction(state);
-
- if (state.pos !== state.source.length) {
- // Make the same messages as V8.
- if (state.eat(0x29 /* ) */)) {
- state.raise("Unmatched ')'");
- }
- if (state.eat(0x5D /* [ */) || state.eat(0x7D /* } */)) {
- state.raise("Lone quantifier brackets");
- }
- }
- if (state.maxBackReference > state.numCapturingParens) {
- state.raise("Invalid escape");
- }
- for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) {
- var name = list[i];
-
- if (state.groupNames.indexOf(name) === -1) {
- state.raise("Invalid named capture referenced");
- }
- }
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
- pp$9.regexp_disjunction = function (state) {
- var this$1 = this;
-
- this.regexp_alternative(state);
- while (state.eat(0x7C /* | */)) {
- this$1.regexp_alternative(state);
- }
-
- // Make the same message as V8.
- if (this.regexp_eatQuantifier(state, true)) {
- state.raise("Nothing to repeat");
- }
- if (state.eat(0x7B /* { */)) {
- state.raise("Lone quantifier brackets");
- }
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
- pp$9.regexp_alternative = function (state) {
- while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
- pp$9.regexp_eatTerm = function (state) {
- if (this.regexp_eatAssertion(state)) {
- // Handle `QuantifiableAssertion Quantifier` alternative.
- // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion
- // is a QuantifiableAssertion.
- if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
- // Make the same message as V8.
- if (state.switchU) {
- state.raise("Invalid quantifier");
- }
- }
- return true;
- }
-
- if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
- this.regexp_eatQuantifier(state);
- return true;
- }
-
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion
- pp$9.regexp_eatAssertion = function (state) {
- var start = state.pos;
- state.lastAssertionIsQuantifiable = false;
-
- // ^, $
- if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) {
- return true;
- }
-
- // \b \B
- if (state.eat(0x5C /* \ */)) {
- if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) {
- return true;
- }
- state.pos = start;
- }
-
- // Lookahead / Lookbehind
- if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) {
- var lookbehind = false;
- if (this.options.ecmaVersion >= 9) {
- lookbehind = state.eat(0x3C /* < */);
- }
- if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) {
- this.regexp_disjunction(state);
- if (!state.eat(0x29 /* ) */)) {
- state.raise("Unterminated group");
- }
- state.lastAssertionIsQuantifiable = !lookbehind;
- return true;
- }
- }
-
- state.pos = start;
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier
- pp$9.regexp_eatQuantifier = function (state, noError) {
- if (noError === void 0) noError = false;
-
- if (this.regexp_eatQuantifierPrefix(state, noError)) {
- state.eat(0x3F /* ? */);
- return true;
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix
- pp$9.regexp_eatQuantifierPrefix = function (state, noError) {
- return state.eat(0x2A /* * */) || state.eat(0x2B /* + */) || state.eat(0x3F /* ? */) || this.regexp_eatBracedQuantifier(state, noError);
- };
- pp$9.regexp_eatBracedQuantifier = function (state, noError) {
- var start = state.pos;
- if (state.eat(0x7B /* { */)) {
- var min = 0,
- max = -1;
- if (this.regexp_eatDecimalDigits(state)) {
- min = state.lastIntValue;
- if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) {
- max = state.lastIntValue;
- }
- if (state.eat(0x7D /* } */)) {
- // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term
- if (max !== -1 && max < min && !noError) {
- state.raise("numbers out of order in {} quantifier");
- }
- return true;
- }
- }
- if (state.switchU && !noError) {
- state.raise("Incomplete quantifier");
- }
- state.pos = start;
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom
- pp$9.regexp_eatAtom = function (state) {
- return this.regexp_eatPatternCharacters(state) || state.eat(0x2E /* . */) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state);
- };
- pp$9.regexp_eatReverseSolidusAtomEscape = function (state) {
- var start = state.pos;
- if (state.eat(0x5C /* \ */)) {
- if (this.regexp_eatAtomEscape(state)) {
- return true;
- }
- state.pos = start;
- }
- return false;
- };
- pp$9.regexp_eatUncapturingGroup = function (state) {
- var start = state.pos;
- if (state.eat(0x28 /* ( */)) {
- if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) {
- this.regexp_disjunction(state);
- if (state.eat(0x29 /* ) */)) {
- return true;
- }
- state.raise("Unterminated group");
- }
- state.pos = start;
- }
- return false;
- };
- pp$9.regexp_eatCapturingGroup = function (state) {
- if (state.eat(0x28 /* ( */)) {
- if (this.options.ecmaVersion >= 9) {
- this.regexp_groupSpecifier(state);
- } else if (state.current() === 0x3F /* ? */) {
- state.raise("Invalid group");
- }
- this.regexp_disjunction(state);
- if (state.eat(0x29 /* ) */)) {
- state.numCapturingParens += 1;
- return true;
- }
- state.raise("Unterminated group");
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom
- pp$9.regexp_eatExtendedAtom = function (state) {
- return state.eat(0x2E /* . */) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state);
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier
- pp$9.regexp_eatInvalidBracedQuantifier = function (state) {
- if (this.regexp_eatBracedQuantifier(state, true)) {
- state.raise("Nothing to repeat");
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter
- pp$9.regexp_eatSyntaxCharacter = function (state) {
- var ch = state.current();
- if (isSyntaxCharacter(ch)) {
- state.lastIntValue = ch;
- state.advance();
- return true;
- }
- return false;
- };
- function isSyntaxCharacter(ch) {
- return ch === 0x24 /* $ */ || ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || ch === 0x2E /* . */ || ch === 0x3F /* ? */ || ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || ch >= 0x7B /* { */ && ch <= 0x7D /* } */
- ;
- }
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter
- // But eat eager.
- pp$9.regexp_eatPatternCharacters = function (state) {
- var start = state.pos;
- var ch = 0;
- while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {
- state.advance();
- }
- return state.pos !== start;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter
- pp$9.regexp_eatExtendedPatternCharacter = function (state) {
- var ch = state.current();
- if (ch !== -1 && ch !== 0x24 /* $ */ && !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && ch !== 0x2E /* . */ && ch !== 0x3F /* ? */ && ch !== 0x5B /* [ */ && ch !== 0x5E /* ^ */ && ch !== 0x7C /* | */
- ) {
- state.advance();
- return true;
- }
- return false;
- };
-
- // GroupSpecifier[U] ::
- // [empty]
- // `?` GroupName[?U]
- pp$9.regexp_groupSpecifier = function (state) {
- if (state.eat(0x3F /* ? */)) {
- if (this.regexp_eatGroupName(state)) {
- if (state.groupNames.indexOf(state.lastStringValue) !== -1) {
- state.raise("Duplicate capture group name");
- }
- state.groupNames.push(state.lastStringValue);
- return;
- }
- state.raise("Invalid group");
- }
- };
-
- // GroupName[U] ::
- // `<` RegExpIdentifierName[?U] `>`
- // Note: this updates `state.lastStringValue` property with the eaten name.
- pp$9.regexp_eatGroupName = function (state) {
- state.lastStringValue = "";
- if (state.eat(0x3C /* < */)) {
- if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) {
- return true;
- }
- state.raise("Invalid capture group name");
- }
- return false;
- };
-
- // RegExpIdentifierName[U] ::
- // RegExpIdentifierStart[?U]
- // RegExpIdentifierName[?U] RegExpIdentifierPart[?U]
- // Note: this updates `state.lastStringValue` property with the eaten name.
- pp$9.regexp_eatRegExpIdentifierName = function (state) {
- state.lastStringValue = "";
- if (this.regexp_eatRegExpIdentifierStart(state)) {
- state.lastStringValue += codePointToString$1(state.lastIntValue);
- while (this.regexp_eatRegExpIdentifierPart(state)) {
- state.lastStringValue += codePointToString$1(state.lastIntValue);
- }
- return true;
- }
- return false;
- };
-
- // RegExpIdentifierStart[U] ::
- // UnicodeIDStart
- // `$`
- // `_`
- // `\` RegExpUnicodeEscapeSequence[?U]
- pp$9.regexp_eatRegExpIdentifierStart = function (state) {
- var start = state.pos;
- var ch = state.current();
- state.advance();
-
- if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) {
- ch = state.lastIntValue;
- }
- if (isRegExpIdentifierStart(ch)) {
- state.lastIntValue = ch;
- return true;
- }
-
- state.pos = start;
- return false;
- };
- function isRegExpIdentifierStart(ch) {
- return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F; /* _ */
- }
-
- // RegExpIdentifierPart[U] ::
- // UnicodeIDContinue
- // `$`
- // `_`
- // `\` RegExpUnicodeEscapeSequence[?U]
- //
- //
- pp$9.regexp_eatRegExpIdentifierPart = function (state) {
- var start = state.pos;
- var ch = state.current();
- state.advance();
-
- if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state)) {
- ch = state.lastIntValue;
- }
- if (isRegExpIdentifierPart(ch)) {
- state.lastIntValue = ch;
- return true;
- }
-
- state.pos = start;
- return false;
- };
- function isRegExpIdentifierPart(ch) {
- return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D; /* */
- }
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape
- pp$9.regexp_eatAtomEscape = function (state) {
- if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) {
- return true;
- }
- if (state.switchU) {
- // Make the same message as V8.
- if (state.current() === 0x63 /* c */) {
- state.raise("Invalid unicode escape");
- }
- state.raise("Invalid escape");
- }
- return false;
- };
- pp$9.regexp_eatBackReference = function (state) {
- var start = state.pos;
- if (this.regexp_eatDecimalEscape(state)) {
- var n = state.lastIntValue;
- if (state.switchU) {
- // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape
- if (n > state.maxBackReference) {
- state.maxBackReference = n;
- }
- return true;
- }
- if (n <= state.numCapturingParens) {
- return true;
- }
- state.pos = start;
- }
- return false;
- };
- pp$9.regexp_eatKGroupName = function (state) {
- if (state.eat(0x6B /* k */)) {
- if (this.regexp_eatGroupName(state)) {
- state.backReferenceNames.push(state.lastStringValue);
- return true;
- }
- state.raise("Invalid named reference");
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape
- pp$9.regexp_eatCharacterEscape = function (state) {
- return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state);
- };
- pp$9.regexp_eatCControlLetter = function (state) {
- var start = state.pos;
- if (state.eat(0x63 /* c */)) {
- if (this.regexp_eatControlLetter(state)) {
- return true;
- }
- state.pos = start;
- }
- return false;
- };
- pp$9.regexp_eatZero = function (state) {
- if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) {
- state.lastIntValue = 0;
- state.advance();
- return true;
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape
- pp$9.regexp_eatControlEscape = function (state) {
- var ch = state.current();
- if (ch === 0x74 /* t */) {
- state.lastIntValue = 0x09; /* \t */
- state.advance();
- return true;
- }
- if (ch === 0x6E /* n */) {
- state.lastIntValue = 0x0A; /* \n */
- state.advance();
- return true;
- }
- if (ch === 0x76 /* v */) {
- state.lastIntValue = 0x0B; /* \v */
- state.advance();
- return true;
- }
- if (ch === 0x66 /* f */) {
- state.lastIntValue = 0x0C; /* \f */
- state.advance();
- return true;
- }
- if (ch === 0x72 /* r */) {
- state.lastIntValue = 0x0D; /* \r */
- state.advance();
- return true;
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter
- pp$9.regexp_eatControlLetter = function (state) {
- var ch = state.current();
- if (isControlLetter(ch)) {
- state.lastIntValue = ch % 0x20;
- state.advance();
- return true;
- }
- return false;
- };
- function isControlLetter(ch) {
- return ch >= 0x41 /* A */ && ch <= 0x5A /* Z */ || ch >= 0x61 /* a */ && ch <= 0x7A /* z */;
- }
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence
- pp$9.regexp_eatRegExpUnicodeEscapeSequence = function (state) {
- var start = state.pos;
-
- if (state.eat(0x75 /* u */)) {
- if (this.regexp_eatFixedHexDigits(state, 4)) {
- var lead = state.lastIntValue;
- if (state.switchU && lead >= 0xD800 && lead <= 0xDBFF) {
- var leadSurrogateEnd = state.pos;
- if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) {
- var trail = state.lastIntValue;
- if (trail >= 0xDC00 && trail <= 0xDFFF) {
- state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
- return true;
- }
- }
- state.pos = leadSurrogateEnd;
- state.lastIntValue = lead;
- }
- return true;
- }
- if (state.switchU && state.eat(0x7B /* { */) && this.regexp_eatHexDigits(state) && state.eat(0x7D /* } */) && isValidUnicode(state.lastIntValue)) {
- return true;
- }
- if (state.switchU) {
- state.raise("Invalid unicode escape");
- }
- state.pos = start;
- }
-
- return false;
- };
- function isValidUnicode(ch) {
- return ch >= 0 && ch <= 0x10FFFF;
- }
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape
- pp$9.regexp_eatIdentityEscape = function (state) {
- if (state.switchU) {
- if (this.regexp_eatSyntaxCharacter(state)) {
- return true;
- }
- if (state.eat(0x2F /* / */)) {
- state.lastIntValue = 0x2F; /* / */
- return true;
- }
- return false;
- }
-
- var ch = state.current();
- if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) {
- state.lastIntValue = ch;
- state.advance();
- return true;
- }
-
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape
- pp$9.regexp_eatDecimalEscape = function (state) {
- state.lastIntValue = 0;
- var ch = state.current();
- if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) {
- do {
- state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);
- state.advance();
- } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */);
- return true;
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape
- pp$9.regexp_eatCharacterClassEscape = function (state) {
- var ch = state.current();
-
- if (isCharacterClassEscape(ch)) {
- state.lastIntValue = -1;
- state.advance();
- return true;
- }
-
- if (state.switchU && this.options.ecmaVersion >= 9 && (ch === 0x50 /* P */ || ch === 0x70 /* p */)) {
- state.lastIntValue = -1;
- state.advance();
- if (state.eat(0x7B /* { */) && this.regexp_eatUnicodePropertyValueExpression(state) && state.eat(0x7D /* } */)) {
- return true;
- }
- state.raise("Invalid property name");
- }
-
- return false;
- };
- function isCharacterClassEscape(ch) {
- return ch === 0x64 /* d */ || ch === 0x44 /* D */ || ch === 0x73 /* s */ || ch === 0x53 /* S */ || ch === 0x77 /* w */ || ch === 0x57 /* W */
- ;
- }
-
- // UnicodePropertyValueExpression ::
- // UnicodePropertyName `=` UnicodePropertyValue
- // LoneUnicodePropertyNameOrValue
- pp$9.regexp_eatUnicodePropertyValueExpression = function (state) {
- var start = state.pos;
-
- // UnicodePropertyName `=` UnicodePropertyValue
- if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) {
- var name = state.lastStringValue;
- if (this.regexp_eatUnicodePropertyValue(state)) {
- var value = state.lastStringValue;
- this.regexp_validateUnicodePropertyNameAndValue(state, name, value);
- return true;
- }
- }
- state.pos = start;
-
- // LoneUnicodePropertyNameOrValue
- if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
- var nameOrValue = state.lastStringValue;
- this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue);
- return true;
- }
- return false;
- };
- pp$9.regexp_validateUnicodePropertyNameAndValue = function (state, name, value) {
- if (!data.hasOwnProperty(name) || data[name].indexOf(value) === -1) {
- state.raise("Invalid property name");
- }
- };
- pp$9.regexp_validateUnicodePropertyNameOrValue = function (state, nameOrValue) {
- if (data.$LONE.indexOf(nameOrValue) === -1) {
- state.raise("Invalid property name");
- }
- };
-
- // UnicodePropertyName ::
- // UnicodePropertyNameCharacters
- pp$9.regexp_eatUnicodePropertyName = function (state) {
- var ch = 0;
- state.lastStringValue = "";
- while (isUnicodePropertyNameCharacter(ch = state.current())) {
- state.lastStringValue += codePointToString$1(ch);
- state.advance();
- }
- return state.lastStringValue !== "";
- };
- function isUnicodePropertyNameCharacter(ch) {
- return isControlLetter(ch) || ch === 0x5F; /* _ */
- }
-
- // UnicodePropertyValue ::
- // UnicodePropertyValueCharacters
- pp$9.regexp_eatUnicodePropertyValue = function (state) {
- var ch = 0;
- state.lastStringValue = "";
- while (isUnicodePropertyValueCharacter(ch = state.current())) {
- state.lastStringValue += codePointToString$1(ch);
- state.advance();
- }
- return state.lastStringValue !== "";
- };
- function isUnicodePropertyValueCharacter(ch) {
- return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch);
- }
-
- // LoneUnicodePropertyNameOrValue ::
- // UnicodePropertyValueCharacters
- pp$9.regexp_eatLoneUnicodePropertyNameOrValue = function (state) {
- return this.regexp_eatUnicodePropertyValue(state);
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass
- pp$9.regexp_eatCharacterClass = function (state) {
- if (state.eat(0x5B /* [ */)) {
- state.eat(0x5E /* ^ */);
- this.regexp_classRanges(state);
- if (state.eat(0x5D /* [ */)) {
- return true;
- }
- // Unreachable since it threw "unterminated regular expression" error before.
- state.raise("Unterminated character class");
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges
- // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges
- // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash
- pp$9.regexp_classRanges = function (state) {
- var this$1 = this;
-
- while (this.regexp_eatClassAtom(state)) {
- var left = state.lastIntValue;
- if (state.eat(0x2D /* - */) && this$1.regexp_eatClassAtom(state)) {
- var right = state.lastIntValue;
- if (state.switchU && (left === -1 || right === -1)) {
- state.raise("Invalid character class");
- }
- if (left !== -1 && right !== -1 && left > right) {
- state.raise("Range out of order in character class");
- }
- }
- }
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom
- // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash
- pp$9.regexp_eatClassAtom = function (state) {
- var start = state.pos;
-
- if (state.eat(0x5C /* \ */)) {
- if (this.regexp_eatClassEscape(state)) {
- return true;
- }
- if (state.switchU) {
- // Make the same message as V8.
- var ch$1 = state.current();
- if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) {
- state.raise("Invalid class escape");
- }
- state.raise("Invalid escape");
- }
- state.pos = start;
- }
-
- var ch = state.current();
- if (ch !== 0x5D /* [ */) {
- state.lastIntValue = ch;
- state.advance();
- return true;
- }
-
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape
- pp$9.regexp_eatClassEscape = function (state) {
- var start = state.pos;
-
- if (state.eat(0x62 /* b */)) {
- state.lastIntValue = 0x08; /* */
- return true;
- }
-
- if (state.switchU && state.eat(0x2D /* - */)) {
- state.lastIntValue = 0x2D; /* - */
- return true;
- }
-
- if (!state.switchU && state.eat(0x63 /* c */)) {
- if (this.regexp_eatClassControlLetter(state)) {
- return true;
- }
- state.pos = start;
- }
-
- return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state);
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter
- pp$9.regexp_eatClassControlLetter = function (state) {
- var ch = state.current();
- if (isDecimalDigit(ch) || ch === 0x5F /* _ */) {
- state.lastIntValue = ch % 0x20;
- state.advance();
- return true;
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence
- pp$9.regexp_eatHexEscapeSequence = function (state) {
- var start = state.pos;
- if (state.eat(0x78 /* x */)) {
- if (this.regexp_eatFixedHexDigits(state, 2)) {
- return true;
- }
- if (state.switchU) {
- state.raise("Invalid escape");
- }
- state.pos = start;
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits
- pp$9.regexp_eatDecimalDigits = function (state) {
- var start = state.pos;
- var ch = 0;
- state.lastIntValue = 0;
- while (isDecimalDigit(ch = state.current())) {
- state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */);
- state.advance();
- }
- return state.pos !== start;
- };
- function isDecimalDigit(ch) {
- return ch >= 0x30 /* 0 */ && ch <= 0x39; /* 9 */
- }
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits
- pp$9.regexp_eatHexDigits = function (state) {
- var start = state.pos;
- var ch = 0;
- state.lastIntValue = 0;
- while (isHexDigit(ch = state.current())) {
- state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
- state.advance();
- }
- return state.pos !== start;
- };
- function isHexDigit(ch) {
- return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ || ch >= 0x41 /* A */ && ch <= 0x46 /* F */ || ch >= 0x61 /* a */ && ch <= 0x66 /* f */;
- }
- function hexToInt(ch) {
- if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) {
- return 10 + (ch - 0x41 /* A */);
- }
- if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) {
- return 10 + (ch - 0x61 /* a */);
- }
- return ch - 0x30; /* 0 */
- }
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence
- // Allows only 0-377(octal) i.e. 0-255(decimal).
- pp$9.regexp_eatLegacyOctalEscapeSequence = function (state) {
- if (this.regexp_eatOctalDigit(state)) {
- var n1 = state.lastIntValue;
- if (this.regexp_eatOctalDigit(state)) {
- var n2 = state.lastIntValue;
- if (n1 <= 3 && this.regexp_eatOctalDigit(state)) {
- state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue;
- } else {
- state.lastIntValue = n1 * 8 + n2;
- }
- } else {
- state.lastIntValue = n1;
- }
- return true;
- }
- return false;
- };
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit
- pp$9.regexp_eatOctalDigit = function (state) {
- var ch = state.current();
- if (isOctalDigit(ch)) {
- state.lastIntValue = ch - 0x30; /* 0 */
- state.advance();
- return true;
- }
- state.lastIntValue = 0;
- return false;
- };
- function isOctalDigit(ch) {
- return ch >= 0x30 /* 0 */ && ch <= 0x37; /* 7 */
- }
-
- // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits
- // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit
- // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence
- pp$9.regexp_eatFixedHexDigits = function (state, length) {
- var start = state.pos;
- state.lastIntValue = 0;
- for (var i = 0; i < length; ++i) {
- var ch = state.current();
- if (!isHexDigit(ch)) {
- state.pos = start;
- return false;
- }
- state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch);
- state.advance();
- }
- return true;
- };
-
- // Object type used to represent tokens. Note that normally, tokens
- // simply exist as properties on the parser object. This is only
- // used for the onToken callback and the external tokenizer.
-
- var Token = function Token(p) {
- this.type = p.type;
- this.value = p.value;
- this.start = p.start;
- this.end = p.end;
- if (p.options.locations) {
- this.loc = new SourceLocation(p, p.startLoc, p.endLoc);
- }
- if (p.options.ranges) {
- this.range = [p.start, p.end];
- }
- };
-
- // ## Tokenizer
-
- var pp$8 = Parser.prototype;
-
- // Move to the next token
-
- pp$8.next = function () {
- if (this.options.onToken) {
- this.options.onToken(new Token(this));
- }
-
- this.lastTokEnd = this.end;
- this.lastTokStart = this.start;
- this.lastTokEndLoc = this.endLoc;
- this.lastTokStartLoc = this.startLoc;
- this.nextToken();
- };
-
- pp$8.getToken = function () {
- this.next();
- return new Token(this);
- };
-
- // If we're in an ES6 environment, make parsers iterable
- if (typeof Symbol !== "undefined") {
- pp$8[Symbol.iterator] = function () {
- var this$1 = this;
-
- return {
- next: function next() {
- var token = this$1.getToken();
- return {
- done: token.type === types.eof,
- value: token
- };
- }
- };
- };
- }
-
- // Toggle strict mode. Re-reads the next number or string to please
- // pedantic tests (`"use strict"; 010;` should fail).
-
- pp$8.curContext = function () {
- return this.context[this.context.length - 1];
- };
-
- // Read a single token, updating the parser object's token-related
- // properties.
-
- pp$8.nextToken = function () {
- var curContext = this.curContext();
- if (!curContext || !curContext.preserveSpace) {
- this.skipSpace();
- }
-
- this.start = this.pos;
- if (this.options.locations) {
- this.startLoc = this.curPosition();
- }
- if (this.pos >= this.input.length) {
- return this.finishToken(types.eof);
- }
-
- if (curContext.override) {
- return curContext.override(this);
- } else {
- this.readToken(this.fullCharCodeAtPos());
- }
- };
-
- pp$8.readToken = function (code) {
- // Identifier or keyword. '\uXXXX' sequences are allowed in
- // identifiers, so '\' also dispatches to that.
- if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) {
- return this.readWord();
- }
-
- return this.getTokenFromCode(code);
- };
-
- pp$8.fullCharCodeAtPos = function () {
- var code = this.input.charCodeAt(this.pos);
- if (code <= 0xd7ff || code >= 0xe000) {
- return code;
- }
- var next = this.input.charCodeAt(this.pos + 1);
- return (code << 10) + next - 0x35fdc00;
- };
-
- pp$8.skipBlockComment = function () {
- var this$1 = this;
-
- var startLoc = this.options.onComment && this.curPosition();
- var start = this.pos,
- end = this.input.indexOf("*/", this.pos += 2);
- if (end === -1) {
- this.raise(this.pos - 2, "Unterminated comment");
- }
- this.pos = end + 2;
- if (this.options.locations) {
- lineBreakG.lastIndex = start;
- var match;
- while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
- ++this$1.curLine;
- this$1.lineStart = match.index + match[0].length;
- }
- }
- if (this.options.onComment) {
- this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition());
- }
- };
-
- pp$8.skipLineComment = function (startSkip) {
- var this$1 = this;
-
- var start = this.pos;
- var startLoc = this.options.onComment && this.curPosition();
- var ch = this.input.charCodeAt(this.pos += startSkip);
- while (this.pos < this.input.length && !isNewLine(ch)) {
- ch = this$1.input.charCodeAt(++this$1.pos);
- }
- if (this.options.onComment) {
- this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition());
- }
- };
-
- // Called at the start of the parse and after every token. Skips
- // whitespace and comments, and.
-
- pp$8.skipSpace = function () {
- var this$1 = this;
-
- loop: while (this.pos < this.input.length) {
- var ch = this$1.input.charCodeAt(this$1.pos);
- switch (ch) {
- case 32:case 160:
- // ' '
- ++this$1.pos;
- break;
- case 13:
- if (this$1.input.charCodeAt(this$1.pos + 1) === 10) {
- ++this$1.pos;
- }
- case 10:case 8232:case 8233:
- ++this$1.pos;
- if (this$1.options.locations) {
- ++this$1.curLine;
- this$1.lineStart = this$1.pos;
- }
- break;
- case 47:
- // '/'
- switch (this$1.input.charCodeAt(this$1.pos + 1)) {
- case 42:
- // '*'
- this$1.skipBlockComment();
- break;
- case 47:
- this$1.skipLineComment(2);
- break;
- default:
- break loop;
- }
- break;
- default:
- if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
- ++this$1.pos;
- } else {
- break loop;
- }
- }
- }
- };
-
- // Called at the end of every token. Sets `end`, `val`, and
- // maintains `context` and `exprAllowed`, and skips the space after
- // the token, so that the next one's `start` will point at the
- // right position.
-
- pp$8.finishToken = function (type, val) {
- this.end = this.pos;
- if (this.options.locations) {
- this.endLoc = this.curPosition();
- }
- var prevType = this.type;
- this.type = type;
- this.value = val;
-
- this.updateContext(prevType);
- };
-
- // ### Token reading
-
- // This is the function that is called to fetch the next token. It
- // is somewhat obscure, because it works in character codes rather
- // than characters, and because operator parsing has been inlined
- // into it.
- //
- // All in the name of speed.
- //
- pp$8.readToken_dot = function () {
- var next = this.input.charCodeAt(this.pos + 1);
- if (next >= 48 && next <= 57) {
- return this.readNumber(true);
- }
- var next2 = this.input.charCodeAt(this.pos + 2);
- if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
- // 46 = dot '.'
- this.pos += 3;
- return this.finishToken(types.ellipsis);
- } else {
- ++this.pos;
- return this.finishToken(types.dot);
- }
- };
-
- pp$8.readToken_slash = function () {
- // '/'
- var next = this.input.charCodeAt(this.pos + 1);
- if (this.exprAllowed) {
- ++this.pos;return this.readRegexp();
- }
- if (next === 61) {
- return this.finishOp(types.assign, 2);
- }
- return this.finishOp(types.slash, 1);
- };
-
- pp$8.readToken_mult_modulo_exp = function (code) {
- // '%*'
- var next = this.input.charCodeAt(this.pos + 1);
- var size = 1;
- var tokentype = code === 42 ? types.star : types.modulo;
-
- // exponentiation operator ** and **=
- if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) {
- ++size;
- tokentype = types.starstar;
- next = this.input.charCodeAt(this.pos + 2);
- }
-
- if (next === 61) {
- return this.finishOp(types.assign, size + 1);
- }
- return this.finishOp(tokentype, size);
- };
-
- pp$8.readToken_pipe_amp = function (code) {
- // '|&'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === code) {
- return this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);
- }
- if (next === 61) {
- return this.finishOp(types.assign, 2);
- }
- return this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);
- };
-
- pp$8.readToken_caret = function () {
- // '^'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 61) {
- return this.finishOp(types.assign, 2);
- }
- return this.finishOp(types.bitwiseXOR, 1);
- };
-
- pp$8.readToken_plus_min = function (code) {
- // '+-'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === code) {
- if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) {
- // A `-->` line comment
- this.skipLineComment(3);
- this.skipSpace();
- return this.nextToken();
- }
- return this.finishOp(types.incDec, 2);
- }
- if (next === 61) {
- return this.finishOp(types.assign, 2);
- }
- return this.finishOp(types.plusMin, 1);
- };
-
- pp$8.readToken_lt_gt = function (code) {
- // '<>'
- var next = this.input.charCodeAt(this.pos + 1);
- var size = 1;
- if (next === code) {
- size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
- if (this.input.charCodeAt(this.pos + size) === 61) {
- return this.finishOp(types.assign, size + 1);
- }
- return this.finishOp(types.bitShift, size);
- }
- if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) {
- // ` regexps
- set = set.map(function (s, si, set) {
- return s.map(this.parse, this);
- }, this);
-
- this.debug(this.pattern, set);
-
- // filter out everything that didn't compile properly.
- set = set.filter(function (s) {
- return s.indexOf(false) === -1;
- });
-
- this.debug(this.pattern, set);
-
- this.set = set;
-}
-
-Minimatch.prototype.parseNegate = parseNegate;
-function parseNegate() {
- var pattern = this.pattern;
- var negate = false;
- var options = this.options;
- var negateOffset = 0;
-
- if (options.nonegate) return;
-
- for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === '!'; i++) {
- negate = !negate;
- negateOffset++;
- }
-
- if (negateOffset) this.pattern = pattern.substr(negateOffset);
- this.negate = negate;
-}
-
-// Brace expansion:
-// a{b,c}d -> abd acd
-// a{b,}c -> abc ac
-// a{0..3}d -> a0d a1d a2d a3d
-// a{b,c{d,e}f}g -> abg acdfg acefg
-// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
-//
-// Invalid sets are not expanded.
-// a{2..}b -> a{2..}b
-// a{b}c -> a{b}c
-minimatch.braceExpand = function (pattern, options) {
- return braceExpand(pattern, options);
-};
-
-Minimatch.prototype.braceExpand = braceExpand;
-
-function braceExpand(pattern, options) {
- if (!options) {
- if (this instanceof Minimatch) {
- options = this.options;
- } else {
- options = {};
- }
- }
-
- pattern = typeof pattern === 'undefined' ? this.pattern : pattern;
-
- if (typeof pattern === 'undefined') {
- throw new TypeError('undefined pattern');
- }
-
- if (options.nobrace || !pattern.match(/\{.*\}/)) {
- // shortcut. no need to expand.
- return [pattern];
- }
-
- return expand(pattern);
-}
-
-// parse a component of the expanded set.
-// At this point, no pattern may contain "/" in it
-// so we're going to return a 2d array, where each entry is the full
-// pattern, split on '/', and then turned into a regular expression.
-// A regexp is made at the end which joins each array with an
-// escaped /, and another full one which joins each regexp with |.
-//
-// Following the lead of Bash 4.1, note that "**" only has special meaning
-// when it is the *only* thing in a path portion. Otherwise, any series
-// of * is equivalent to a single *. Globstar behavior is enabled by
-// default, and can be disabled by setting options.noglobstar.
-Minimatch.prototype.parse = parse;
-var SUBPARSE = {};
-function parse(pattern, isSub) {
- if (pattern.length > 1024 * 64) {
- throw new TypeError('pattern is too long');
- }
-
- var options = this.options;
-
- // shortcuts
- if (!options.noglobstar && pattern === '**') return GLOBSTAR;
- if (pattern === '') return '';
-
- var re = '';
- var hasMagic = !!options.nocase;
- var escaping = false;
- // ? => one single character
- var patternListStack = [];
- var negativeLists = [];
- var stateChar;
- var inClass = false;
- var reClassStart = -1;
- var classStart = -1;
- // . and .. never match anything that doesn't start with .,
- // even when options.dot is set.
- var patternStart = pattern.charAt(0) === '.' ? '' // anything
- // not (start or / followed by . or .. followed by / or end)
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' : '(?!\\.)';
- var self = this;
-
- function clearStateChar() {
- if (stateChar) {
- // we had some state-tracking character
- // that wasn't consumed by this pass.
- switch (stateChar) {
- case '*':
- re += star;
- hasMagic = true;
- break;
- case '?':
- re += qmark;
- hasMagic = true;
- break;
- default:
- re += '\\' + stateChar;
- break;
- }
- self.debug('clearStateChar %j %j', stateChar, re);
- stateChar = false;
- }
- }
-
- for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) {
- this.debug('%s\t%s %s %j', pattern, i, re, c);
-
- // skip over any that are escaped.
- if (escaping && reSpecials[c]) {
- re += '\\' + c;
- escaping = false;
- continue;
- }
-
- switch (c) {
- case '/':
- // completely not allowed, even escaped.
- // Should already be path-split by now.
- return false;
-
- case '\\':
- clearStateChar();
- escaping = true;
- continue;
-
- // the various stateChar values
- // for the "extglob" stuff.
- case '?':
- case '*':
- case '+':
- case '@':
- case '!':
- this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c);
-
- // all of those are literals inside a class, except that
- // the glob [!a] means [^a] in regexp
- if (inClass) {
- this.debug(' in class');
- if (c === '!' && i === classStart + 1) c = '^';
- re += c;
- continue;
- }
-
- // if we already have a stateChar, then it means
- // that there was something like ** or +? in there.
- // Handle the stateChar, then proceed with this one.
- self.debug('call clearStateChar %j', stateChar);
- clearStateChar();
- stateChar = c;
- // if extglob is disabled, then +(asdf|foo) isn't a thing.
- // just clear the statechar *now*, rather than even diving into
- // the patternList stuff.
- if (options.noext) clearStateChar();
- continue;
-
- case '(':
- if (inClass) {
- re += '(';
- continue;
- }
-
- if (!stateChar) {
- re += '\\(';
- continue;
- }
-
- patternListStack.push({
- type: stateChar,
- start: i - 1,
- reStart: re.length,
- open: plTypes[stateChar].open,
- close: plTypes[stateChar].close
- });
- // negation is (?:(?!js)[^/]*)
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:';
- this.debug('plType %j %j', stateChar, re);
- stateChar = false;
- continue;
-
- case ')':
- if (inClass || !patternListStack.length) {
- re += '\\)';
- continue;
- }
-
- clearStateChar();
- hasMagic = true;
- var pl = patternListStack.pop();
- // negation is (?:(?!js)[^/]*)
- // The others are (?:)
- re += pl.close;
- if (pl.type === '!') {
- negativeLists.push(pl);
- }
- pl.reEnd = re.length;
- continue;
-
- case '|':
- if (inClass || !patternListStack.length || escaping) {
- re += '\\|';
- escaping = false;
- continue;
- }
-
- clearStateChar();
- re += '|';
- continue;
-
- // these are mostly the same in regexp and glob
- case '[':
- // swallow any state-tracking char before the [
- clearStateChar();
-
- if (inClass) {
- re += '\\' + c;
- continue;
- }
-
- inClass = true;
- classStart = i;
- reClassStart = re.length;
- re += c;
- continue;
-
- case ']':
- // a right bracket shall lose its special
- // meaning and represent itself in
- // a bracket expression if it occurs
- // first in the list. -- POSIX.2 2.8.3.2
- if (i === classStart + 1 || !inClass) {
- re += '\\' + c;
- escaping = false;
- continue;
- }
-
- // handle the case where we left a class open.
- // "[z-a]" is valid, equivalent to "\[z-a\]"
- if (inClass) {
- // split where the last [ was, make sure we don't have
- // an invalid re. if so, re-walk the contents of the
- // would-be class to re-translate any characters that
- // were passed through as-is
- // TODO: It would probably be faster to determine this
- // without a try/catch and a new RegExp, but it's tricky
- // to do safely. For now, this is safe and works.
- var cs = pattern.substring(classStart + 1, i);
- try {
- RegExp('[' + cs + ']');
- } catch (er) {
- // not a valid class!
- var sp = this.parse(cs, SUBPARSE);
- re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]';
- hasMagic = hasMagic || sp[1];
- inClass = false;
- continue;
- }
- }
-
- // finish up the class.
- hasMagic = true;
- inClass = false;
- re += c;
- continue;
-
- default:
- // swallow any state char that wasn't consumed
- clearStateChar();
-
- if (escaping) {
- // no need
- escaping = false;
- } else if (reSpecials[c] && !(c === '^' && inClass)) {
- re += '\\';
- }
-
- re += c;
-
- } // switch
- } // for
-
- // handle the case where we left a class open.
- // "[abc" is valid, equivalent to "\[abc"
- if (inClass) {
- // split where the last [ was, and escape it
- // this is a huge pita. We now have to re-walk
- // the contents of the would-be class to re-translate
- // any characters that were passed through as-is
- cs = pattern.substr(classStart + 1);
- sp = this.parse(cs, SUBPARSE);
- re = re.substr(0, reClassStart) + '\\[' + sp[0];
- hasMagic = hasMagic || sp[1];
- }
-
- // handle the case where we had a +( thing at the *end*
- // of the pattern.
- // each pattern list stack adds 3 chars, and we need to go through
- // and escape any | chars that were passed through as-is for the regexp.
- // Go through and escape them, taking care not to double-escape any
- // | chars that were already escaped.
- for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
- var tail = re.slice(pl.reStart + pl.open.length);
- this.debug('setting tail', re, pl);
- // maybe some even number of \, then maybe 1 \, followed by a |
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
- if (!$2) {
- // the | isn't already escaped, so escape it.
- $2 = '\\';
- }
-
- // need to escape all those slashes *again*, without escaping the
- // one that we need for escaping the | character. As it works out,
- // escaping an even number of slashes can be done by simply repeating
- // it exactly after itself. That's why this trick works.
- //
- // I am sorry that you have to see this.
- return $1 + $1 + $2 + '|';
- });
-
- this.debug('tail=%j\n %s', tail, tail, pl, re);
- var t = pl.type === '*' ? star : pl.type === '?' ? qmark : '\\' + pl.type;
-
- hasMagic = true;
- re = re.slice(0, pl.reStart) + t + '\\(' + tail;
- }
-
- // handle trailing things that only matter at the very end.
- clearStateChar();
- if (escaping) {
- // trailing \\
- re += '\\\\';
- }
-
- // only need to apply the nodot start if the re starts with
- // something that could conceivably capture a dot
- var addPatternStart = false;
- switch (re.charAt(0)) {
- case '.':
- case '[':
- case '(':
- addPatternStart = true;
- }
-
- // Hack to work around lack of negative lookbehind in JS
- // A pattern like: *.!(x).!(y|z) needs to ensure that a name
- // like 'a.xyz.yz' doesn't match. So, the first negative
- // lookahead, has to look ALL the way ahead, to the end of
- // the pattern.
- for (var n = negativeLists.length - 1; n > -1; n--) {
- var nl = negativeLists[n];
-
- var nlBefore = re.slice(0, nl.reStart);
- var nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
- var nlLast = re.slice(nl.reEnd - 8, nl.reEnd);
- var nlAfter = re.slice(nl.reEnd);
-
- nlLast += nlAfter;
-
- // Handle nested stuff like *(*.js|!(*.json)), where open parens
- // mean that we should *not* include the ) in the bit that is considered
- // "after" the negated section.
- var openParensBefore = nlBefore.split('(').length - 1;
- var cleanAfter = nlAfter;
- for (i = 0; i < openParensBefore; i++) {
- cleanAfter = cleanAfter.replace(/\)[+*?]?/, '');
- }
- nlAfter = cleanAfter;
-
- var dollar = '';
- if (nlAfter === '' && isSub !== SUBPARSE) {
- dollar = '$';
- }
- var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast;
- re = newRe;
- }
-
- // if the re is not "" at this point, then we need to make sure
- // it doesn't match against an empty path part.
- // Otherwise a/* will match a/, which it should not.
- if (re !== '' && hasMagic) {
- re = '(?=.)' + re;
- }
-
- if (addPatternStart) {
- re = patternStart + re;
- }
-
- // parsing just a piece of a larger pattern.
- if (isSub === SUBPARSE) {
- return [re, hasMagic];
- }
-
- // skip the regexp for non-magical patterns
- // unescape anything in it, though, so that it'll be
- // an exact match against a file etc.
- if (!hasMagic) {
- return globUnescape(pattern);
- }
-
- var flags = options.nocase ? 'i' : '';
- try {
- var regExp = new RegExp('^' + re + '$', flags);
- } catch (er) {
- // If it was an invalid regular expression, then it can't match
- // anything. This trick looks for a character after the end of
- // the string, which is of course impossible, except in multi-line
- // mode, but it's not a /m regex.
- return new RegExp('$.');
- }
-
- regExp._glob = pattern;
- regExp._src = re;
-
- return regExp;
-}
-
-minimatch.makeRe = function (pattern, options) {
- return new Minimatch(pattern, options || {}).makeRe();
-};
-
-Minimatch.prototype.makeRe = makeRe;
-function makeRe() {
- if (this.regexp || this.regexp === false) return this.regexp;
-
- // at this point, this.set is a 2d array of partial
- // pattern strings, or "**".
- //
- // It's better to use .match(). This function shouldn't
- // be used, really, but it's pretty convenient sometimes,
- // when you just want to work with a regex.
- var set = this.set;
-
- if (!set.length) {
- this.regexp = false;
- return this.regexp;
- }
- var options = this.options;
-
- var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot;
- var flags = options.nocase ? 'i' : '';
-
- var re = set.map(function (pattern) {
- return pattern.map(function (p) {
- return p === GLOBSTAR ? twoStar : typeof p === 'string' ? regExpEscape(p) : p._src;
- }).join('\\\/');
- }).join('|');
-
- // must match entire pattern
- // ending in a * or ** will make it less strict.
- re = '^(?:' + re + ')$';
-
- // can match anything, as long as it's not this.
- if (this.negate) re = '^(?!' + re + ').*$';
-
- try {
- this.regexp = new RegExp(re, flags);
- } catch (ex) {
- this.regexp = false;
- }
- return this.regexp;
-}
-
-minimatch.match = function (list, pattern, options) {
- options = options || {};
- var mm = new Minimatch(pattern, options);
- list = list.filter(function (f) {
- return mm.match(f);
- });
- if (mm.options.nonull && !list.length) {
- list.push(pattern);
- }
- return list;
-};
-
-Minimatch.prototype.match = match;
-function match(f, partial) {
- this.debug('match', f, this.pattern);
- // short-circuit in the case of busted things.
- // comments, etc.
- if (this.comment) return false;
- if (this.empty) return f === '';
-
- if (f === '/' && partial) return true;
-
- var options = this.options;
-
- // windows: need to use /, not \
- if (path.sep !== '/') {
- f = f.split(path.sep).join('/');
- }
-
- // treat the test path as a set of pathparts.
- f = f.split(slashSplit);
- this.debug(this.pattern, 'split', f);
-
- // just ONE of the pattern sets in this.set needs to match
- // in order for it to be valid. If negating, then just one
- // match means that we have failed.
- // Either way, return on the first hit.
-
- var set = this.set;
- this.debug(this.pattern, 'set', set);
-
- // Find the basename of the path by looking for the last non-empty segment
- var filename;
- var i;
- for (i = f.length - 1; i >= 0; i--) {
- filename = f[i];
- if (filename) break;
- }
-
- for (i = 0; i < set.length; i++) {
- var pattern = set[i];
- var file = f;
- if (options.matchBase && pattern.length === 1) {
- file = [filename];
- }
- var hit = this.matchOne(file, pattern, partial);
- if (hit) {
- if (options.flipNegate) return true;
- return !this.negate;
- }
- }
-
- // didn't get any hits. this is success if it's a negative
- // pattern, failure otherwise.
- if (options.flipNegate) return false;
- return this.negate;
-}
-
-// set partial to true to test if, for example,
-// "/a/b" matches the start of "/*/b/*/d"
-// Partial means, if you run out of file before you run
-// out of pattern, then that's fine, as long as all
-// the parts match.
-Minimatch.prototype.matchOne = function (file, pattern, partial) {
- var options = this.options;
-
- this.debug('matchOne', { 'this': this, file: file, pattern: pattern });
-
- this.debug('matchOne', file.length, pattern.length);
-
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
- this.debug('matchOne loop');
- var p = pattern[pi];
- var f = file[fi];
-
- this.debug(pattern, p, f);
-
- // should be impossible.
- // some invalid regexp stuff in the set.
- if (p === false) return false;
-
- if (p === GLOBSTAR) {
- this.debug('GLOBSTAR', [pattern, p, f]);
-
- // "**"
- // a/**/b/**/c would match the following:
- // a/b/x/y/z/c
- // a/x/y/z/b/c
- // a/b/x/b/x/c
- // a/b/c
- // To do this, take the rest of the pattern after
- // the **, and see if it would match the file remainder.
- // If so, return success.
- // If not, the ** "swallows" a segment, and try again.
- // This is recursively awful.
- //
- // a/**/b/**/c matching a/b/x/y/z/c
- // - a matches a
- // - doublestar
- // - matchOne(b/x/y/z/c, b/**/c)
- // - b matches b
- // - doublestar
- // - matchOne(x/y/z/c, c) -> no
- // - matchOne(y/z/c, c) -> no
- // - matchOne(z/c, c) -> no
- // - matchOne(c, c) yes, hit
- var fr = fi;
- var pr = pi + 1;
- if (pr === pl) {
- this.debug('** at the end');
- // a ** at the end will just swallow the rest.
- // We have found a match.
- // however, it will not swallow /.x, unless
- // options.dot is set.
- // . and .. are *never* matched by **, for explosively
- // exponential reasons.
- for (; fi < fl; fi++) {
- if (file[fi] === '.' || file[fi] === '..' || !options.dot && file[fi].charAt(0) === '.') return false;
- }
- return true;
- }
-
- // ok, let's see if we can swallow whatever we can.
- while (fr < fl) {
- var swallowee = file[fr];
-
- this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
-
- // XXX remove this slice. Just pass the start index.
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
- this.debug('globstar found match!', fr, fl, swallowee);
- // found a match.
- return true;
- } else {
- // can't swallow "." or ".." ever.
- // can only swallow ".foo" when explicitly asked.
- if (swallowee === '.' || swallowee === '..' || !options.dot && swallowee.charAt(0) === '.') {
- this.debug('dot detected!', file, fr, pattern, pr);
- break;
- }
-
- // ** swallows a segment, and continue.
- this.debug('globstar swallow a segment, and continue');
- fr++;
- }
- }
-
- // no match was found.
- // However, in partial mode, we can't say this is necessarily over.
- // If there's more *pattern* left, then
- if (partial) {
- // ran out of file
- this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
- if (fr === fl) return true;
- }
- return false;
- }
-
- // something other than **
- // non-magic patterns just have to match exactly
- // patterns with magic have been turned into regexps.
- var hit;
- if (typeof p === 'string') {
- if (options.nocase) {
- hit = f.toLowerCase() === p.toLowerCase();
- } else {
- hit = f === p;
- }
- this.debug('string match', p, f, hit);
- } else {
- hit = f.match(p);
- this.debug('pattern match', p, f, hit);
- }
-
- if (!hit) return false;
- }
-
- // Note: ending in / means that we'll get a final ""
- // at the end of the pattern. This can only match a
- // corresponding "" at the end of the file.
- // If the file ends in /, then it can only match a
- // a pattern that ends in /, unless the pattern just
- // doesn't have any more for it. But, a/b/ should *not*
- // match "a/b/*", even though "" matches against the
- // [^/]*? pattern, except in partial mode, where it might
- // simply not be reached yet.
- // However, a/b/ should still satisfy a/*
-
- // now either we fell off the end of the pattern, or we're done.
- if (fi === fl && pi === pl) {
- // ran out of pattern and filename at the same time.
- // an exact hit!
- return true;
- } else if (fi === fl) {
- // ran out of file, but still had pattern left.
- // this is ok if we're doing the match as part of
- // a glob fs traversal.
- return partial;
- } else if (pi === pl) {
- // ran out of pattern, still have file left.
- // this is only acceptable if we're on the very last
- // empty segment of a file with a trailing slash.
- // a/* should match a/b/
- var emptyFileEnd = fi === fl - 1 && file[fi] === '';
- return emptyFileEnd;
- }
-
- // should be unreachable.
- throw new Error('wtf?');
-};
-
-// replace stuff like \* with *
-function globUnescape(s) {
- return s.replace(/\\(.)/g, '$1');
-}
-
-function regExpEscape(s) {
- return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
-}
-
-},{"brace-expansion":51,"path":96}],94:[function(require,module,exports){
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-/**
- * Helpers.
- */
-
-var s = 1000;
-var m = s * 60;
-var h = m * 60;
-var d = h * 24;
-var w = d * 7;
-var y = d * 365.25;
-
-/**
- * Parse or format the given `val`.
- *
- * Options:
- *
- * - `long` verbose formatting [false]
- *
- * @param {String|Number} val
- * @param {Object} [options]
- * @throws {Error} throw an error if val is not a non-empty string or a number
- * @return {String|Number}
- * @api public
- */
-
-module.exports = function (val, options) {
- options = options || {};
- var type = typeof val === 'undefined' ? 'undefined' : _typeof(val);
- if (type === 'string' && val.length > 0) {
- return parse(val);
- } else if (type === 'number' && isNaN(val) === false) {
- return options.long ? fmtLong(val) : fmtShort(val);
- }
- throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
-};
-
-/**
- * Parse the given `str` and return milliseconds.
- *
- * @param {String} str
- * @return {Number}
- * @api private
- */
-
-function parse(str) {
- str = String(str);
- if (str.length > 100) {
- return;
- }
- var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
- if (!match) {
- return;
- }
- var n = parseFloat(match[1]);
- var type = (match[2] || 'ms').toLowerCase();
- switch (type) {
- case 'years':
- case 'year':
- case 'yrs':
- case 'yr':
- case 'y':
- return n * y;
- case 'weeks':
- case 'week':
- case 'w':
- return n * w;
- case 'days':
- case 'day':
- case 'd':
- return n * d;
- case 'hours':
- case 'hour':
- case 'hrs':
- case 'hr':
- case 'h':
- return n * h;
- case 'minutes':
- case 'minute':
- case 'mins':
- case 'min':
- case 'm':
- return n * m;
- case 'seconds':
- case 'second':
- case 'secs':
- case 'sec':
- case 's':
- return n * s;
- case 'milliseconds':
- case 'millisecond':
- case 'msecs':
- case 'msec':
- case 'ms':
- return n;
- default:
- return undefined;
- }
-}
-
-/**
- * Short format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtShort(ms) {
- var msAbs = Math.abs(ms);
- if (msAbs >= d) {
- return Math.round(ms / d) + 'd';
- }
- if (msAbs >= h) {
- return Math.round(ms / h) + 'h';
- }
- if (msAbs >= m) {
- return Math.round(ms / m) + 'm';
- }
- if (msAbs >= s) {
- return Math.round(ms / s) + 's';
- }
- return ms + 'ms';
-}
-
-/**
- * Long format for `ms`.
- *
- * @param {Number} ms
- * @return {String}
- * @api private
- */
-
-function fmtLong(ms) {
- var msAbs = Math.abs(ms);
- if (msAbs >= d) {
- return plural(ms, msAbs, d, 'day');
- }
- if (msAbs >= h) {
- return plural(ms, msAbs, h, 'hour');
- }
- if (msAbs >= m) {
- return plural(ms, msAbs, m, 'minute');
- }
- if (msAbs >= s) {
- return plural(ms, msAbs, s, 'second');
- }
- return ms + ' ms';
-}
-
-/**
- * Pluralization helper.
- */
-
-function plural(ms, msAbs, n, name) {
- var isPlural = msAbs >= n * 1.5;
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
-}
-
-},{}],95:[function(require,module,exports){
-"use strict";
-
-/*
- * @version 1.4.0
- * @date 2015-10-26
- * @stability 3 - Stable
- * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
- * @license MIT License
- */
-
-var naturalCompare = function naturalCompare(a, b) {
- var i,
- codeA,
- codeB = 1,
- posA = 0,
- posB = 0,
- alphabet = String.alphabet;
-
- function getCode(str, pos, code) {
- if (code) {
- for (i = pos; code = getCode(str, i), code < 76 && code > 65;) {
- ++i;
- }return +str.slice(pos - 1, i);
- }
- code = alphabet && alphabet.indexOf(str.charAt(pos));
- return code > -1 ? code + 76 : (code = str.charCodeAt(pos) || 0, code < 45 || code > 127) ? code : code < 46 ? 65 // -
- : code < 48 ? code - 1 : code < 58 ? code + 18 // 0-9
- : code < 65 ? code - 11 : code < 91 ? code + 11 // A-Z
- : code < 97 ? code - 37 : code < 123 ? code + 5 // a-z
- : code - 63;
- }
-
- if ((a += "") != (b += "")) for (; codeB;) {
- codeA = getCode(a, posA++);
- codeB = getCode(b, posB++);
-
- if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
- codeA = getCode(a, posA, posA);
- codeB = getCode(b, posB, posA = i);
- posB = i;
- }
-
- if (codeA != codeB) return codeA < codeB ? -1 : 1;
- }
- return 0;
-};
-
-try {
- module.exports = naturalCompare;
-} catch (e) {
- String.naturalCompare = naturalCompare;
-}
-
-},{}],96:[function(require,module,exports){
-(function (process){
-'use strict';
-
-// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
-// backported and transplited with Babel, with backwards-compat fixes
-
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// resolves . and .. elements in a path array with directory names there
-// must be no slashes, empty elements, or device names (c:\) in the array
-// (so also no leading and trailing slashes - it does not distinguish
-// relative and absolute paths)
-function normalizeArray(parts, allowAboveRoot) {
- // if the path tries to go above the root, `up` ends up > 0
- var up = 0;
- for (var i = parts.length - 1; i >= 0; i--) {
- var last = parts[i];
- if (last === '.') {
- parts.splice(i, 1);
- } else if (last === '..') {
- parts.splice(i, 1);
- up++;
- } else if (up) {
- parts.splice(i, 1);
- up--;
- }
- }
-
- // if the path is allowed to go above the root, restore leading ..s
- if (allowAboveRoot) {
- for (; up--; up) {
- parts.unshift('..');
- }
- }
-
- return parts;
-}
-
-// path.resolve([from ...], to)
-// posix version
-exports.resolve = function () {
- var resolvedPath = '',
- resolvedAbsolute = false;
-
- for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
- var path = i >= 0 ? arguments[i] : process.cwd();
-
- // Skip empty and invalid entries
- if (typeof path !== 'string') {
- throw new TypeError('Arguments to path.resolve must be strings');
- } else if (!path) {
- continue;
- }
-
- resolvedPath = path + '/' + resolvedPath;
- resolvedAbsolute = path.charAt(0) === '/';
- }
-
- // At this point the path should be resolved to a full absolute path, but
- // handle relative paths to be safe (might happen when process.cwd() fails)
-
- // Normalize the path
- resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function (p) {
- return !!p;
- }), !resolvedAbsolute).join('/');
-
- return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
-};
-
-// path.normalize(path)
-// posix version
-exports.normalize = function (path) {
- var isAbsolute = exports.isAbsolute(path),
- trailingSlash = substr(path, -1) === '/';
-
- // Normalize the path
- path = normalizeArray(filter(path.split('/'), function (p) {
- return !!p;
- }), !isAbsolute).join('/');
-
- if (!path && !isAbsolute) {
- path = '.';
- }
- if (path && trailingSlash) {
- path += '/';
- }
-
- return (isAbsolute ? '/' : '') + path;
-};
-
-// posix version
-exports.isAbsolute = function (path) {
- return path.charAt(0) === '/';
-};
-
-// posix version
-exports.join = function () {
- var paths = Array.prototype.slice.call(arguments, 0);
- return exports.normalize(filter(paths, function (p, index) {
- if (typeof p !== 'string') {
- throw new TypeError('Arguments to path.join must be strings');
- }
- return p;
- }).join('/'));
-};
-
-// path.relative(from, to)
-// posix version
-exports.relative = function (from, to) {
- from = exports.resolve(from).substr(1);
- to = exports.resolve(to).substr(1);
-
- function trim(arr) {
- var start = 0;
- for (; start < arr.length; start++) {
- if (arr[start] !== '') break;
- }
-
- var end = arr.length - 1;
- for (; end >= 0; end--) {
- if (arr[end] !== '') break;
- }
-
- if (start > end) return [];
- return arr.slice(start, end - start + 1);
- }
-
- var fromParts = trim(from.split('/'));
- var toParts = trim(to.split('/'));
-
- var length = Math.min(fromParts.length, toParts.length);
- var samePartsLength = length;
- for (var i = 0; i < length; i++) {
- if (fromParts[i] !== toParts[i]) {
- samePartsLength = i;
- break;
- }
- }
-
- var outputParts = [];
- for (var i = samePartsLength; i < fromParts.length; i++) {
- outputParts.push('..');
- }
-
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
-
- return outputParts.join('/');
-};
-
-exports.sep = '/';
-exports.delimiter = ':';
-
-exports.dirname = function (path) {
- if (typeof path !== 'string') path = path + '';
- if (path.length === 0) return '.';
- var code = path.charCodeAt(0);
- var hasRoot = code === 47 /*/*/;
- var end = -1;
- var matchedSlash = true;
- for (var i = path.length - 1; i >= 1; --i) {
- code = path.charCodeAt(i);
- if (code === 47 /*/*/) {
- if (!matchedSlash) {
- end = i;
- break;
- }
- } else {
- // We saw the first non-path separator
- matchedSlash = false;
- }
- }
-
- if (end === -1) return hasRoot ? '/' : '.';
- if (hasRoot && end === 1) {
- // return '//';
- // Backwards-compat fix:
- return '/';
- }
- return path.slice(0, end);
-};
-
-function basename(path) {
- if (typeof path !== 'string') path = path + '';
-
- var start = 0;
- var end = -1;
- var matchedSlash = true;
- var i;
-
- for (i = path.length - 1; i >= 0; --i) {
- if (path.charCodeAt(i) === 47 /*/*/) {
- // If we reached a path separator that was not part of a set of path
- // separators at the end of the string, stop now
- if (!matchedSlash) {
- start = i + 1;
- break;
- }
- } else if (end === -1) {
- // We saw the first non-path separator, mark this as the end of our
- // path component
- matchedSlash = false;
- end = i + 1;
- }
- }
-
- if (end === -1) return '';
- return path.slice(start, end);
-}
-
-// Uses a mixed approach for backwards-compatibility, as ext behavior changed
-// in new Node.js versions, so only basename() above is backported here
-exports.basename = function (path, ext) {
- var f = basename(path);
- if (ext && f.substr(-1 * ext.length) === ext) {
- f = f.substr(0, f.length - ext.length);
- }
- return f;
-};
-
-exports.extname = function (path) {
- if (typeof path !== 'string') path = path + '';
- var startDot = -1;
- var startPart = 0;
- var end = -1;
- var matchedSlash = true;
- // Track the state of characters (if any) we see before our first dot and
- // after any path separator we find
- var preDotState = 0;
- for (var i = path.length - 1; i >= 0; --i) {
- var code = path.charCodeAt(i);
- if (code === 47 /*/*/) {
- // If we reached a path separator that was not part of a set of path
- // separators at the end of the string, stop now
- if (!matchedSlash) {
- startPart = i + 1;
- break;
- }
- continue;
- }
- if (end === -1) {
- // We saw the first non-path separator, mark this as the end of our
- // extension
- matchedSlash = false;
- end = i + 1;
- }
- if (code === 46 /*.*/) {
- // If this is our first dot, mark it as the start of our extension
- if (startDot === -1) startDot = i;else if (preDotState !== 1) preDotState = 1;
- } else if (startDot !== -1) {
- // We saw a non-dot and non-path separator before our dot, so we should
- // have a good chance at having a non-empty extension
- preDotState = -1;
- }
- }
-
- if (startDot === -1 || end === -1 ||
- // We saw a non-dot character immediately before the dot
- preDotState === 0 ||
- // The (right-most) trimmed path component is exactly '..'
- preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
- return '';
- }
- return path.slice(startDot, end);
-};
-
-function filter(xs, f) {
- if (xs.filter) return xs.filter(f);
- var res = [];
- for (var i = 0; i < xs.length; i++) {
- if (f(xs[i], i, xs)) res.push(xs[i]);
- }
- return res;
-}
-
-// String.prototype.substr - negative index don't work in IE8
-var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) {
- return str.substr(start, len);
-} : function (str, start, len) {
- if (start < 0) start = str.length + start;
- return str.substr(start, len);
-};
-
-}).call(this,require('_process'))
-},{"_process":103}],97:[function(require,module,exports){
-'use strict';
-
-// Generated by LiveScript 1.4.0
-var apply,
- curry,
- flip,
- fix,
- over,
- memoize,
- slice$ = [].slice,
- toString$ = {}.toString;
-apply = curry$(function (f, list) {
- return f.apply(null, list);
-});
-curry = function curry(f) {
- return curry$(f);
-};
-flip = curry$(function (f, x, y) {
- return f(y, x);
-});
-fix = function fix(f) {
- return function (g) {
- return function () {
- return f(g(g)).apply(null, arguments);
- };
- }(function (g) {
- return function () {
- return f(g(g)).apply(null, arguments);
- };
- });
-};
-over = curry$(function (f, g, x, y) {
- return f(g(x), g(y));
-});
-memoize = function memoize(f) {
- var memo;
- memo = {};
- return function () {
- var args, key, arg;
- args = slice$.call(arguments);
- key = function () {
- var i$,
- ref$,
- len$,
- results$ = [];
- for (i$ = 0, len$ = (ref$ = args).length; i$ < len$; ++i$) {
- arg = ref$[i$];
- results$.push(arg + toString$.call(arg).slice(8, -1));
- }
- return results$;
- }().join('');
- return memo[key] = key in memo ? memo[key] : f.apply(null, args);
- };
-};
-module.exports = {
- curry: curry,
- flip: flip,
- fix: fix,
- apply: apply,
- over: over,
- memoize: memoize
-};
-function curry$(f, bound) {
- var context,
- _curry = function _curry(args) {
- return f.length > 1 ? function () {
- var params = args ? args.concat() : [];
- context = bound ? context || this : this;
- return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params);
- } : f;
- };
- return _curry();
-}
-
-},{}],98:[function(require,module,exports){
-'use strict';
-
-// Generated by LiveScript 1.4.0
-var each,
- map,
- compact,
- filter,
- reject,
- partition,
- find,
- head,
- first,
- tail,
- last,
- initial,
- empty,
- reverse,
- unique,
- uniqueBy,
- fold,
- foldl,
- fold1,
- foldl1,
- foldr,
- foldr1,
- unfoldr,
- concat,
- concatMap,
- _flatten,
- difference,
- intersection,
- union,
- countBy,
- groupBy,
- andList,
- orList,
- any,
- all,
- sort,
- sortWith,
- sortBy,
- sum,
- product,
- mean,
- average,
- maximum,
- minimum,
- maximumBy,
- minimumBy,
- scan,
- scanl,
- scan1,
- scanl1,
- scanr,
- scanr1,
- slice,
- take,
- drop,
- splitAt,
- takeWhile,
- dropWhile,
- span,
- breakList,
- zip,
- zipWith,
- zipAll,
- zipAllWith,
- at,
- elemIndex,
- elemIndices,
- findIndex,
- findIndices,
- toString$ = {}.toString,
- slice$ = [].slice;
-each = curry$(function (f, xs) {
- var i$, len$, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- f(x);
- }
- return xs;
-});
-map = curry$(function (f, xs) {
- var i$,
- len$,
- x,
- results$ = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- results$.push(f(x));
- }
- return results$;
-});
-compact = function compact(xs) {
- var i$,
- len$,
- x,
- results$ = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (x) {
- results$.push(x);
- }
- }
- return results$;
-};
-filter = curry$(function (f, xs) {
- var i$,
- len$,
- x,
- results$ = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (f(x)) {
- results$.push(x);
- }
- }
- return results$;
-});
-reject = curry$(function (f, xs) {
- var i$,
- len$,
- x,
- results$ = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (!f(x)) {
- results$.push(x);
- }
- }
- return results$;
-});
-partition = curry$(function (f, xs) {
- var passed, failed, i$, len$, x;
- passed = [];
- failed = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- (f(x) ? passed : failed).push(x);
- }
- return [passed, failed];
-});
-find = curry$(function (f, xs) {
- var i$, len$, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (f(x)) {
- return x;
- }
- }
-});
-head = first = function first(xs) {
- return xs[0];
-};
-tail = function tail(xs) {
- if (!xs.length) {
- return;
- }
- return xs.slice(1);
-};
-last = function last(xs) {
- return xs[xs.length - 1];
-};
-initial = function initial(xs) {
- if (!xs.length) {
- return;
- }
- return xs.slice(0, -1);
-};
-empty = function empty(xs) {
- return !xs.length;
-};
-reverse = function reverse(xs) {
- return xs.concat().reverse();
-};
-unique = function unique(xs) {
- var result, i$, len$, x;
- result = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (!in$(x, result)) {
- result.push(x);
- }
- }
- return result;
-};
-uniqueBy = curry$(function (f, xs) {
- var seen,
- i$,
- len$,
- x,
- val,
- results$ = [];
- seen = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- val = f(x);
- if (in$(val, seen)) {
- continue;
- }
- seen.push(val);
- results$.push(x);
- }
- return results$;
-});
-fold = foldl = curry$(function (f, memo, xs) {
- var i$, len$, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- memo = f(memo, x);
- }
- return memo;
-});
-fold1 = foldl1 = curry$(function (f, xs) {
- return fold(f, xs[0], xs.slice(1));
-});
-foldr = curry$(function (f, memo, xs) {
- var i$, x;
- for (i$ = xs.length - 1; i$ >= 0; --i$) {
- x = xs[i$];
- memo = f(x, memo);
- }
- return memo;
-});
-foldr1 = curry$(function (f, xs) {
- return foldr(f, xs[xs.length - 1], xs.slice(0, -1));
-});
-unfoldr = curry$(function (f, b) {
- var result, x, that;
- result = [];
- x = b;
- while ((that = f(x)) != null) {
- result.push(that[0]);
- x = that[1];
- }
- return result;
-});
-concat = function concat(xss) {
- return [].concat.apply([], xss);
-};
-concatMap = curry$(function (f, xs) {
- var x;
- return [].concat.apply([], function () {
- var i$,
- ref$,
- len$,
- results$ = [];
- for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
- x = ref$[i$];
- results$.push(f(x));
- }
- return results$;
- }());
-});
-_flatten = function flatten(xs) {
- var x;
- return [].concat.apply([], function () {
- var i$,
- ref$,
- len$,
- results$ = [];
- for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
- x = ref$[i$];
- if (toString$.call(x).slice(8, -1) === 'Array') {
- results$.push(_flatten(x));
- } else {
- results$.push(x);
- }
- }
- return results$;
- }());
-};
-difference = function difference(xs) {
- var yss, results, i$, len$, x, j$, len1$, ys;
- yss = slice$.call(arguments, 1);
- results = [];
- outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
- ys = yss[j$];
- if (in$(x, ys)) {
- continue outer;
- }
- }
- results.push(x);
- }
- return results;
-};
-intersection = function intersection(xs) {
- var yss, results, i$, len$, x, j$, len1$, ys;
- yss = slice$.call(arguments, 1);
- results = [];
- outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
- ys = yss[j$];
- if (!in$(x, ys)) {
- continue outer;
- }
- }
- results.push(x);
- }
- return results;
-};
-union = function union() {
- var xss, results, i$, len$, xs, j$, len1$, x;
- xss = slice$.call(arguments);
- results = [];
- for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
- xs = xss[i$];
- for (j$ = 0, len1$ = xs.length; j$ < len1$; ++j$) {
- x = xs[j$];
- if (!in$(x, results)) {
- results.push(x);
- }
- }
- }
- return results;
-};
-countBy = curry$(function (f, xs) {
- var results, i$, len$, x, key;
- results = {};
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- key = f(x);
- if (key in results) {
- results[key] += 1;
- } else {
- results[key] = 1;
- }
- }
- return results;
-});
-groupBy = curry$(function (f, xs) {
- var results, i$, len$, x, key;
- results = {};
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- key = f(x);
- if (key in results) {
- results[key].push(x);
- } else {
- results[key] = [x];
- }
- }
- return results;
-});
-andList = function andList(xs) {
- var i$, len$, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (!x) {
- return false;
- }
- }
- return true;
-};
-orList = function orList(xs) {
- var i$, len$, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (x) {
- return true;
- }
- }
- return false;
-};
-any = curry$(function (f, xs) {
- var i$, len$, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (f(x)) {
- return true;
- }
- }
- return false;
-});
-all = curry$(function (f, xs) {
- var i$, len$, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- if (!f(x)) {
- return false;
- }
- }
- return true;
-});
-sort = function sort(xs) {
- return xs.concat().sort(function (x, y) {
- if (x > y) {
- return 1;
- } else if (x < y) {
- return -1;
- } else {
- return 0;
- }
- });
-};
-sortWith = curry$(function (f, xs) {
- return xs.concat().sort(f);
-});
-sortBy = curry$(function (f, xs) {
- return xs.concat().sort(function (x, y) {
- if (f(x) > f(y)) {
- return 1;
- } else if (f(x) < f(y)) {
- return -1;
- } else {
- return 0;
- }
- });
-});
-sum = function sum(xs) {
- var result, i$, len$, x;
- result = 0;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- result += x;
- }
- return result;
-};
-product = function product(xs) {
- var result, i$, len$, x;
- result = 1;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- result *= x;
- }
- return result;
-};
-mean = average = function average(xs) {
- var sum, i$, len$, x;
- sum = 0;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- x = xs[i$];
- sum += x;
- }
- return sum / xs.length;
-};
-maximum = function maximum(xs) {
- var max, i$, ref$, len$, x;
- max = xs[0];
- for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
- x = ref$[i$];
- if (x > max) {
- max = x;
- }
- }
- return max;
-};
-minimum = function minimum(xs) {
- var min, i$, ref$, len$, x;
- min = xs[0];
- for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
- x = ref$[i$];
- if (x < min) {
- min = x;
- }
- }
- return min;
-};
-maximumBy = curry$(function (f, xs) {
- var max, i$, ref$, len$, x;
- max = xs[0];
- for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
- x = ref$[i$];
- if (f(x) > f(max)) {
- max = x;
- }
- }
- return max;
-});
-minimumBy = curry$(function (f, xs) {
- var min, i$, ref$, len$, x;
- min = xs[0];
- for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
- x = ref$[i$];
- if (f(x) < f(min)) {
- min = x;
- }
- }
- return min;
-});
-scan = scanl = curry$(function (f, memo, xs) {
- var last, x;
- last = memo;
- return [memo].concat(function () {
- var i$,
- ref$,
- len$,
- results$ = [];
- for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
- x = ref$[i$];
- results$.push(last = f(last, x));
- }
- return results$;
- }());
-});
-scan1 = scanl1 = curry$(function (f, xs) {
- if (!xs.length) {
- return;
- }
- return scan(f, xs[0], xs.slice(1));
-});
-scanr = curry$(function (f, memo, xs) {
- xs = xs.concat().reverse();
- return scan(f, memo, xs).reverse();
-});
-scanr1 = curry$(function (f, xs) {
- if (!xs.length) {
- return;
- }
- xs = xs.concat().reverse();
- return scan(f, xs[0], xs.slice(1)).reverse();
-});
-slice = curry$(function (x, y, xs) {
- return xs.slice(x, y);
-});
-take = curry$(function (n, xs) {
- if (n <= 0) {
- return xs.slice(0, 0);
- } else {
- return xs.slice(0, n);
- }
-});
-drop = curry$(function (n, xs) {
- if (n <= 0) {
- return xs;
- } else {
- return xs.slice(n);
- }
-});
-splitAt = curry$(function (n, xs) {
- return [take(n, xs), drop(n, xs)];
-});
-takeWhile = curry$(function (p, xs) {
- var len, i;
- len = xs.length;
- if (!len) {
- return xs;
- }
- i = 0;
- while (i < len && p(xs[i])) {
- i += 1;
- }
- return xs.slice(0, i);
-});
-dropWhile = curry$(function (p, xs) {
- var len, i;
- len = xs.length;
- if (!len) {
- return xs;
- }
- i = 0;
- while (i < len && p(xs[i])) {
- i += 1;
- }
- return xs.slice(i);
-});
-span = curry$(function (p, xs) {
- return [takeWhile(p, xs), dropWhile(p, xs)];
-});
-breakList = curry$(function (p, xs) {
- return span(compose$(p, not$), xs);
-});
-zip = curry$(function (xs, ys) {
- var result, len, i$, len$, i, x;
- result = [];
- len = ys.length;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- i = i$;
- x = xs[i$];
- if (i === len) {
- break;
- }
- result.push([x, ys[i]]);
- }
- return result;
-});
-zipWith = curry$(function (f, xs, ys) {
- var result, len, i$, len$, i, x;
- result = [];
- len = ys.length;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- i = i$;
- x = xs[i$];
- if (i === len) {
- break;
- }
- result.push(f(x, ys[i]));
- }
- return result;
-});
-zipAll = function zipAll() {
- var xss,
- minLength,
- i$,
- len$,
- xs,
- ref$,
- i,
- lresult$,
- j$,
- results$ = [];
- xss = slice$.call(arguments);
- minLength = undefined;
- for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
- xs = xss[i$];
- minLength <= (ref$ = xs.length) || (minLength = ref$);
- }
- for (i$ = 0; i$ < minLength; ++i$) {
- i = i$;
- lresult$ = [];
- for (j$ = 0, len$ = xss.length; j$ < len$; ++j$) {
- xs = xss[j$];
- lresult$.push(xs[i]);
- }
- results$.push(lresult$);
- }
- return results$;
-};
-zipAllWith = function zipAllWith(f) {
- var xss,
- minLength,
- i$,
- len$,
- xs,
- ref$,
- i,
- results$ = [];
- xss = slice$.call(arguments, 1);
- minLength = undefined;
- for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
- xs = xss[i$];
- minLength <= (ref$ = xs.length) || (minLength = ref$);
- }
- for (i$ = 0; i$ < minLength; ++i$) {
- i = i$;
- results$.push(f.apply(null, fn$()));
- }
- return results$;
- function fn$() {
- var i$,
- ref$,
- len$,
- results$ = [];
- for (i$ = 0, len$ = (ref$ = xss).length; i$ < len$; ++i$) {
- xs = ref$[i$];
- results$.push(xs[i]);
- }
- return results$;
- }
-};
-at = curry$(function (n, xs) {
- if (n < 0) {
- return xs[xs.length + n];
- } else {
- return xs[n];
- }
-});
-elemIndex = curry$(function (el, xs) {
- var i$, len$, i, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- i = i$;
- x = xs[i$];
- if (x === el) {
- return i;
- }
- }
-});
-elemIndices = curry$(function (el, xs) {
- var i$,
- len$,
- i,
- x,
- results$ = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- i = i$;
- x = xs[i$];
- if (x === el) {
- results$.push(i);
- }
- }
- return results$;
-});
-findIndex = curry$(function (f, xs) {
- var i$, len$, i, x;
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- i = i$;
- x = xs[i$];
- if (f(x)) {
- return i;
- }
- }
-});
-findIndices = curry$(function (f, xs) {
- var i$,
- len$,
- i,
- x,
- results$ = [];
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
- i = i$;
- x = xs[i$];
- if (f(x)) {
- results$.push(i);
- }
- }
- return results$;
-});
-module.exports = {
- each: each,
- map: map,
- filter: filter,
- compact: compact,
- reject: reject,
- partition: partition,
- find: find,
- head: head,
- first: first,
- tail: tail,
- last: last,
- initial: initial,
- empty: empty,
- reverse: reverse,
- difference: difference,
- intersection: intersection,
- union: union,
- countBy: countBy,
- groupBy: groupBy,
- fold: fold,
- fold1: fold1,
- foldl: foldl,
- foldl1: foldl1,
- foldr: foldr,
- foldr1: foldr1,
- unfoldr: unfoldr,
- andList: andList,
- orList: orList,
- any: any,
- all: all,
- unique: unique,
- uniqueBy: uniqueBy,
- sort: sort,
- sortWith: sortWith,
- sortBy: sortBy,
- sum: sum,
- product: product,
- mean: mean,
- average: average,
- concat: concat,
- concatMap: concatMap,
- flatten: _flatten,
- maximum: maximum,
- minimum: minimum,
- maximumBy: maximumBy,
- minimumBy: minimumBy,
- scan: scan,
- scan1: scan1,
- scanl: scanl,
- scanl1: scanl1,
- scanr: scanr,
- scanr1: scanr1,
- slice: slice,
- take: take,
- drop: drop,
- splitAt: splitAt,
- takeWhile: takeWhile,
- dropWhile: dropWhile,
- span: span,
- breakList: breakList,
- zip: zip,
- zipWith: zipWith,
- zipAll: zipAll,
- zipAllWith: zipAllWith,
- at: at,
- elemIndex: elemIndex,
- elemIndices: elemIndices,
- findIndex: findIndex,
- findIndices: findIndices
-};
-function curry$(f, bound) {
- var context,
- _curry = function _curry(args) {
- return f.length > 1 ? function () {
- var params = args ? args.concat() : [];
- context = bound ? context || this : this;
- return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params);
- } : f;
- };
- return _curry();
-}
-function in$(x, xs) {
- var i = -1,
- l = xs.length >>> 0;
- while (++i < l) {
- if (x === xs[i]) return true;
- }return false;
-}
-function compose$() {
- var functions = arguments;
- return function () {
- var i, result;
- result = functions[0].apply(this, arguments);
- for (i = 1; i < functions.length; ++i) {
- result = functions[i](result);
- }
- return result;
- };
-}
-function not$(x) {
- return !x;
-}
-
-},{}],99:[function(require,module,exports){
-"use strict";
-
-// Generated by LiveScript 1.4.0
-var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm;
-max = curry$(function (x$, y$) {
- return x$ > y$ ? x$ : y$;
-});
-min = curry$(function (x$, y$) {
- return x$ < y$ ? x$ : y$;
-});
-negate = function negate(x) {
- return -x;
-};
-abs = Math.abs;
-signum = function signum(x) {
- if (x < 0) {
- return -1;
- } else if (x > 0) {
- return 1;
- } else {
- return 0;
- }
-};
-quot = curry$(function (x, y) {
- return ~~(x / y);
-});
-rem = curry$(function (x$, y$) {
- return x$ % y$;
-});
-div = curry$(function (x, y) {
- return Math.floor(x / y);
-});
-mod = curry$(function (x$, y$) {
- var ref$;
- return (x$ % (ref$ = y$) + ref$) % ref$;
-});
-recip = function recip(it) {
- return 1 / it;
-};
-pi = Math.PI;
-tau = pi * 2;
-exp = Math.exp;
-sqrt = Math.sqrt;
-ln = Math.log;
-pow = curry$(function (x$, y$) {
- return Math.pow(x$, y$);
-});
-sin = Math.sin;
-tan = Math.tan;
-cos = Math.cos;
-asin = Math.asin;
-acos = Math.acos;
-atan = Math.atan;
-atan2 = curry$(function (x, y) {
- return Math.atan2(x, y);
-});
-truncate = function truncate(x) {
- return ~~x;
-};
-round = Math.round;
-ceiling = Math.ceil;
-floor = Math.floor;
-isItNaN = function isItNaN(x) {
- return x !== x;
-};
-even = function even(x) {
- return x % 2 === 0;
-};
-odd = function odd(x) {
- return x % 2 !== 0;
-};
-gcd = curry$(function (x, y) {
- var z;
- x = Math.abs(x);
- y = Math.abs(y);
- while (y !== 0) {
- z = x % y;
- x = y;
- y = z;
- }
- return x;
-});
-lcm = curry$(function (x, y) {
- return Math.abs(Math.floor(x / gcd(x, y) * y));
-});
-module.exports = {
- max: max,
- min: min,
- negate: negate,
- abs: abs,
- signum: signum,
- quot: quot,
- rem: rem,
- div: div,
- mod: mod,
- recip: recip,
- pi: pi,
- tau: tau,
- exp: exp,
- sqrt: sqrt,
- ln: ln,
- pow: pow,
- sin: sin,
- tan: tan,
- cos: cos,
- acos: acos,
- asin: asin,
- atan: atan,
- atan2: atan2,
- truncate: truncate,
- round: round,
- ceiling: ceiling,
- floor: floor,
- isItNaN: isItNaN,
- even: even,
- odd: odd,
- gcd: gcd,
- lcm: lcm
-};
-function curry$(f, bound) {
- var context,
- _curry = function _curry(args) {
- return f.length > 1 ? function () {
- var params = args ? args.concat() : [];
- context = bound ? context || this : this;
- return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params);
- } : f;
- };
- return _curry();
-}
-
-},{}],100:[function(require,module,exports){
-"use strict";
-
-// Generated by LiveScript 1.4.0
-var values, keys, pairsToObj, objToPairs, listsToObj, objToLists, empty, each, map, compact, filter, reject, partition, find;
-values = function values(object) {
- var i$,
- x,
- results$ = [];
- for (i$ in object) {
- x = object[i$];
- results$.push(x);
- }
- return results$;
-};
-keys = function keys(object) {
- var x,
- results$ = [];
- for (x in object) {
- results$.push(x);
- }
- return results$;
-};
-pairsToObj = function pairsToObj(object) {
- var i$,
- len$,
- x,
- resultObj$ = {};
- for (i$ = 0, len$ = object.length; i$ < len$; ++i$) {
- x = object[i$];
- resultObj$[x[0]] = x[1];
- }
- return resultObj$;
-};
-objToPairs = function objToPairs(object) {
- var key,
- value,
- results$ = [];
- for (key in object) {
- value = object[key];
- results$.push([key, value]);
- }
- return results$;
-};
-listsToObj = curry$(function (keys, values) {
- var i$,
- len$,
- i,
- key,
- resultObj$ = {};
- for (i$ = 0, len$ = keys.length; i$ < len$; ++i$) {
- i = i$;
- key = keys[i$];
- resultObj$[key] = values[i];
- }
- return resultObj$;
-});
-objToLists = function objToLists(object) {
- var keys, values, key, value;
- keys = [];
- values = [];
- for (key in object) {
- value = object[key];
- keys.push(key);
- values.push(value);
- }
- return [keys, values];
-};
-empty = function empty(object) {
- var x;
- for (x in object) {
- return false;
- }
- return true;
-};
-each = curry$(function (f, object) {
- var i$, x;
- for (i$ in object) {
- x = object[i$];
- f(x);
- }
- return object;
-});
-map = curry$(function (f, object) {
- var k,
- x,
- resultObj$ = {};
- for (k in object) {
- x = object[k];
- resultObj$[k] = f(x);
- }
- return resultObj$;
-});
-compact = function compact(object) {
- var k,
- x,
- resultObj$ = {};
- for (k in object) {
- x = object[k];
- if (x) {
- resultObj$[k] = x;
- }
- }
- return resultObj$;
-};
-filter = curry$(function (f, object) {
- var k,
- x,
- resultObj$ = {};
- for (k in object) {
- x = object[k];
- if (f(x)) {
- resultObj$[k] = x;
- }
- }
- return resultObj$;
-});
-reject = curry$(function (f, object) {
- var k,
- x,
- resultObj$ = {};
- for (k in object) {
- x = object[k];
- if (!f(x)) {
- resultObj$[k] = x;
- }
- }
- return resultObj$;
-});
-partition = curry$(function (f, object) {
- var passed, failed, k, x;
- passed = {};
- failed = {};
- for (k in object) {
- x = object[k];
- (f(x) ? passed : failed)[k] = x;
- }
- return [passed, failed];
-});
-find = curry$(function (f, object) {
- var i$, x;
- for (i$ in object) {
- x = object[i$];
- if (f(x)) {
- return x;
- }
- }
-});
-module.exports = {
- values: values,
- keys: keys,
- pairsToObj: pairsToObj,
- objToPairs: objToPairs,
- listsToObj: listsToObj,
- objToLists: objToLists,
- empty: empty,
- each: each,
- map: map,
- filter: filter,
- compact: compact,
- reject: reject,
- partition: partition,
- find: find
-};
-function curry$(f, bound) {
- var context,
- _curry = function _curry(args) {
- return f.length > 1 ? function () {
- var params = args ? args.concat() : [];
- context = bound ? context || this : this;
- return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params);
- } : f;
- };
- return _curry();
-}
-
-},{}],101:[function(require,module,exports){
-'use strict';
-
-// Generated by LiveScript 1.4.0
-var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat, capitalize, camelize, dasherize;
-split = curry$(function (sep, str) {
- return str.split(sep);
-});
-join = curry$(function (sep, xs) {
- return xs.join(sep);
-});
-lines = function lines(str) {
- if (!str.length) {
- return [];
- }
- return str.split('\n');
-};
-unlines = function unlines(it) {
- return it.join('\n');
-};
-words = function words(str) {
- if (!str.length) {
- return [];
- }
- return str.split(/[ ]+/);
-};
-unwords = function unwords(it) {
- return it.join(' ');
-};
-chars = function chars(it) {
- return it.split('');
-};
-unchars = function unchars(it) {
- return it.join('');
-};
-reverse = function reverse(str) {
- return str.split('').reverse().join('');
-};
-repeat = curry$(function (n, str) {
- var result, i$;
- result = '';
- for (i$ = 0; i$ < n; ++i$) {
- result += str;
- }
- return result;
-});
-capitalize = function capitalize(str) {
- return str.charAt(0).toUpperCase() + str.slice(1);
-};
-camelize = function camelize(it) {
- return it.replace(/[-_]+(.)?/g, function (arg$, c) {
- return (c != null ? c : '').toUpperCase();
- });
-};
-dasherize = function dasherize(str) {
- return str.replace(/([^-A-Z])([A-Z]+)/g, function (arg$, lower, upper) {
- return lower + "-" + (upper.length > 1 ? upper : upper.toLowerCase());
- }).replace(/^([A-Z]+)/, function (arg$, upper) {
- if (upper.length > 1) {
- return upper + "-";
- } else {
- return upper.toLowerCase();
- }
- });
-};
-module.exports = {
- split: split,
- join: join,
- lines: lines,
- unlines: unlines,
- words: words,
- unwords: unwords,
- chars: chars,
- unchars: unchars,
- reverse: reverse,
- repeat: repeat,
- capitalize: capitalize,
- camelize: camelize,
- dasherize: dasherize
-};
-function curry$(f, bound) {
- var context,
- _curry = function _curry(args) {
- return f.length > 1 ? function () {
- var params = args ? args.concat() : [];
- context = bound ? context || this : this;
- return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params);
- } : f;
- };
- return _curry();
-}
-
-},{}],102:[function(require,module,exports){
-'use strict';
-
-// Generated by LiveScript 1.4.0
-var Func,
- List,
- Obj,
- Str,
- Num,
- id,
- isType,
- replicate,
- prelude,
- toString$ = {}.toString;
-Func = require('./Func.js');
-List = require('./List.js');
-Obj = require('./Obj.js');
-Str = require('./Str.js');
-Num = require('./Num.js');
-id = function id(x) {
- return x;
-};
-isType = curry$(function (type, x) {
- return toString$.call(x).slice(8, -1) === type;
-});
-replicate = curry$(function (n, x) {
- var i$,
- results$ = [];
- for (i$ = 0; i$ < n; ++i$) {
- results$.push(x);
- }
- return results$;
-});
-Str.empty = List.empty;
-Str.slice = List.slice;
-Str.take = List.take;
-Str.drop = List.drop;
-Str.splitAt = List.splitAt;
-Str.takeWhile = List.takeWhile;
-Str.dropWhile = List.dropWhile;
-Str.span = List.span;
-Str.breakStr = List.breakList;
-prelude = {
- Func: Func,
- List: List,
- Obj: Obj,
- Str: Str,
- Num: Num,
- id: id,
- isType: isType,
- replicate: replicate
-};
-prelude.each = List.each;
-prelude.map = List.map;
-prelude.filter = List.filter;
-prelude.compact = List.compact;
-prelude.reject = List.reject;
-prelude.partition = List.partition;
-prelude.find = List.find;
-prelude.head = List.head;
-prelude.first = List.first;
-prelude.tail = List.tail;
-prelude.last = List.last;
-prelude.initial = List.initial;
-prelude.empty = List.empty;
-prelude.reverse = List.reverse;
-prelude.difference = List.difference;
-prelude.intersection = List.intersection;
-prelude.union = List.union;
-prelude.countBy = List.countBy;
-prelude.groupBy = List.groupBy;
-prelude.fold = List.fold;
-prelude.foldl = List.foldl;
-prelude.fold1 = List.fold1;
-prelude.foldl1 = List.foldl1;
-prelude.foldr = List.foldr;
-prelude.foldr1 = List.foldr1;
-prelude.unfoldr = List.unfoldr;
-prelude.andList = List.andList;
-prelude.orList = List.orList;
-prelude.any = List.any;
-prelude.all = List.all;
-prelude.unique = List.unique;
-prelude.uniqueBy = List.uniqueBy;
-prelude.sort = List.sort;
-prelude.sortWith = List.sortWith;
-prelude.sortBy = List.sortBy;
-prelude.sum = List.sum;
-prelude.product = List.product;
-prelude.mean = List.mean;
-prelude.average = List.average;
-prelude.concat = List.concat;
-prelude.concatMap = List.concatMap;
-prelude.flatten = List.flatten;
-prelude.maximum = List.maximum;
-prelude.minimum = List.minimum;
-prelude.maximumBy = List.maximumBy;
-prelude.minimumBy = List.minimumBy;
-prelude.scan = List.scan;
-prelude.scanl = List.scanl;
-prelude.scan1 = List.scan1;
-prelude.scanl1 = List.scanl1;
-prelude.scanr = List.scanr;
-prelude.scanr1 = List.scanr1;
-prelude.slice = List.slice;
-prelude.take = List.take;
-prelude.drop = List.drop;
-prelude.splitAt = List.splitAt;
-prelude.takeWhile = List.takeWhile;
-prelude.dropWhile = List.dropWhile;
-prelude.span = List.span;
-prelude.breakList = List.breakList;
-prelude.zip = List.zip;
-prelude.zipWith = List.zipWith;
-prelude.zipAll = List.zipAll;
-prelude.zipAllWith = List.zipAllWith;
-prelude.at = List.at;
-prelude.elemIndex = List.elemIndex;
-prelude.elemIndices = List.elemIndices;
-prelude.findIndex = List.findIndex;
-prelude.findIndices = List.findIndices;
-prelude.apply = Func.apply;
-prelude.curry = Func.curry;
-prelude.flip = Func.flip;
-prelude.fix = Func.fix;
-prelude.over = Func.over;
-prelude.split = Str.split;
-prelude.join = Str.join;
-prelude.lines = Str.lines;
-prelude.unlines = Str.unlines;
-prelude.words = Str.words;
-prelude.unwords = Str.unwords;
-prelude.chars = Str.chars;
-prelude.unchars = Str.unchars;
-prelude.repeat = Str.repeat;
-prelude.capitalize = Str.capitalize;
-prelude.camelize = Str.camelize;
-prelude.dasherize = Str.dasherize;
-prelude.values = Obj.values;
-prelude.keys = Obj.keys;
-prelude.pairsToObj = Obj.pairsToObj;
-prelude.objToPairs = Obj.objToPairs;
-prelude.listsToObj = Obj.listsToObj;
-prelude.objToLists = Obj.objToLists;
-prelude.max = Num.max;
-prelude.min = Num.min;
-prelude.negate = Num.negate;
-prelude.abs = Num.abs;
-prelude.signum = Num.signum;
-prelude.quot = Num.quot;
-prelude.rem = Num.rem;
-prelude.div = Num.div;
-prelude.mod = Num.mod;
-prelude.recip = Num.recip;
-prelude.pi = Num.pi;
-prelude.tau = Num.tau;
-prelude.exp = Num.exp;
-prelude.sqrt = Num.sqrt;
-prelude.ln = Num.ln;
-prelude.pow = Num.pow;
-prelude.sin = Num.sin;
-prelude.tan = Num.tan;
-prelude.cos = Num.cos;
-prelude.acos = Num.acos;
-prelude.asin = Num.asin;
-prelude.atan = Num.atan;
-prelude.atan2 = Num.atan2;
-prelude.truncate = Num.truncate;
-prelude.round = Num.round;
-prelude.ceiling = Num.ceiling;
-prelude.floor = Num.floor;
-prelude.isItNaN = Num.isItNaN;
-prelude.even = Num.even;
-prelude.odd = Num.odd;
-prelude.gcd = Num.gcd;
-prelude.lcm = Num.lcm;
-prelude.VERSION = '1.1.2';
-module.exports = prelude;
-function curry$(f, bound) {
- var context,
- _curry = function _curry(args) {
- return f.length > 1 ? function () {
- var params = args ? args.concat() : [];
- context = bound ? context || this : this;
- return params.push.apply(params, arguments) < f.length && arguments.length ? _curry.call(context, params) : f.apply(context, params);
- } : f;
- };
- return _curry();
-}
-
-},{"./Func.js":97,"./List.js":98,"./Num.js":99,"./Obj.js":100,"./Str.js":101}],103:[function(require,module,exports){
-'use strict';
-
-// shim for using process in browser
-var process = module.exports = {};
-
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
-
-var cachedSetTimeout;
-var cachedClearTimeout;
-
-function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
-}
-function defaultClearTimeout() {
- throw new Error('clearTimeout has not been defined');
-}
-(function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
-})();
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch (e) {
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch (e) {
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e) {
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e) {
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
-
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
-}
-
-function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while (len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
-}
-
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
-};
-
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-process.prependListener = noop;
-process.prependOnceListener = noop;
-
-process.listeners = function (name) {
- return [];
-};
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-
-process.cwd = function () {
- return '/';
-};
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function () {
- return 0;
-};
-
-},{}],104:[function(require,module,exports){
-/*! @author Toru Nagashima */
-'use strict';
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-Object.defineProperty(exports, '__esModule', { value: true });
-
-var ast = /*#__PURE__*/Object.freeze({});
-
-function isIdStart(cp) {
- if (cp < 0x41) return false;
- if (cp < 0x5b) return true;
- if (cp < 0x61) return false;
- if (cp < 0x7b) return true;
- return isLargeIdStart(cp);
-}
-function isIdContinue(cp) {
- if (cp < 0x30) return false;
- if (cp < 0x3a) return true;
- if (cp < 0x41) return false;
- if (cp < 0x5b) return true;
- if (cp === 0x5f) return true;
- if (cp < 0x61) return false;
- if (cp < 0x7b) return true;
- return isLargeIdStart(cp) || isLargeIdContinue(cp);
-}
-function isLargeIdStart(cp) {
- if (cp < 0x30a1) {
- if (cp < 0xec0) {
- if (cp < 0xa35) {
- if (cp < 0x6e5) {
- if (cp < 0x37a) {
- if (cp < 0x294) {
- if (cp < 0xf8) {
- if (cp === 0xaa) return true;
- if (cp === 0xb5) return true;
- if (cp === 0xba) return true;
- if (cp < 0xc0) return false;
- if (cp < 0xd7) return true;
- if (cp < 0xd8) return false;
- if (cp < 0xf7) return true;
- return false;
- }
- if (cp < 0x1bb) return true;
- if (cp === 0x1bb) return true;
- if (cp < 0x1bc) return false;
- if (cp < 0x1c0) return true;
- if (cp < 0x1c0) return false;
- if (cp < 0x1c4) return true;
- if (cp < 0x1c4) return false;
- if (cp < 0x294) return true;
- return false;
- }
- if (cp < 0x2ec) {
- if (cp === 0x294) return true;
- if (cp < 0x295) return false;
- if (cp < 0x2b0) return true;
- if (cp < 0x2b0) return false;
- if (cp < 0x2c2) return true;
- if (cp < 0x2c6) return false;
- if (cp < 0x2d2) return true;
- if (cp < 0x2e0) return false;
- if (cp < 0x2e5) return true;
- return false;
- }
- if (cp === 0x2ec) return true;
- if (cp === 0x2ee) return true;
- if (cp < 0x370) return false;
- if (cp < 0x374) return true;
- if (cp === 0x374) return true;
- if (cp < 0x376) return false;
- if (cp < 0x378) return true;
- return false;
- }
- if (cp < 0x531) {
- if (cp < 0x38c) {
- if (cp === 0x37a) return true;
- if (cp < 0x37b) return false;
- if (cp < 0x37e) return true;
- if (cp === 0x37f) return true;
- if (cp === 0x386) return true;
- if (cp < 0x388) return false;
- if (cp < 0x38b) return true;
- return false;
- }
- if (cp === 0x38c) return true;
- if (cp < 0x38e) return false;
- if (cp < 0x3a2) return true;
- if (cp < 0x3a3) return false;
- if (cp < 0x3f6) return true;
- if (cp < 0x3f7) return false;
- if (cp < 0x482) return true;
- if (cp < 0x48a) return false;
- if (cp < 0x530) return true;
- return false;
- }
- if (cp < 0x620) {
- if (cp < 0x531) return false;
- if (cp < 0x557) return true;
- if (cp === 0x559) return true;
- if (cp < 0x560) return false;
- if (cp < 0x589) return true;
- if (cp < 0x5d0) return false;
- if (cp < 0x5eb) return true;
- if (cp < 0x5ef) return false;
- if (cp < 0x5f3) return true;
- return false;
- }
- if (cp < 0x640) return true;
- if (cp === 0x640) return true;
- if (cp < 0x641) return false;
- if (cp < 0x64b) return true;
- if (cp < 0x66e) return false;
- if (cp < 0x670) return true;
- if (cp < 0x671) return false;
- if (cp < 0x6d4) return true;
- if (cp === 0x6d5) return true;
- return false;
- }
- if (cp < 0x950) {
- if (cp < 0x7fa) {
- if (cp < 0x712) {
- if (cp < 0x6e5) return false;
- if (cp < 0x6e7) return true;
- if (cp < 0x6ee) return false;
- if (cp < 0x6f0) return true;
- if (cp < 0x6fa) return false;
- if (cp < 0x6fd) return true;
- if (cp === 0x6ff) return true;
- if (cp === 0x710) return true;
- return false;
- }
- if (cp < 0x730) return true;
- if (cp < 0x74d) return false;
- if (cp < 0x7a6) return true;
- if (cp === 0x7b1) return true;
- if (cp < 0x7ca) return false;
- if (cp < 0x7eb) return true;
- if (cp < 0x7f4) return false;
- if (cp < 0x7f6) return true;
- return false;
- }
- if (cp < 0x840) {
- if (cp === 0x7fa) return true;
- if (cp < 0x800) return false;
- if (cp < 0x816) return true;
- if (cp === 0x81a) return true;
- if (cp === 0x824) return true;
- if (cp === 0x828) return true;
- return false;
- }
- if (cp < 0x859) return true;
- if (cp < 0x860) return false;
- if (cp < 0x86b) return true;
- if (cp < 0x8a0) return false;
- if (cp < 0x8b5) return true;
- if (cp < 0x8b6) return false;
- if (cp < 0x8be) return true;
- if (cp < 0x904) return false;
- if (cp < 0x93a) return true;
- if (cp === 0x93d) return true;
- return false;
- }
- if (cp < 0x9bd) {
- if (cp < 0x98f) {
- if (cp === 0x950) return true;
- if (cp < 0x958) return false;
- if (cp < 0x962) return true;
- if (cp === 0x971) return true;
- if (cp < 0x972) return false;
- if (cp < 0x981) return true;
- if (cp < 0x985) return false;
- if (cp < 0x98d) return true;
- return false;
- }
- if (cp < 0x991) return true;
- if (cp < 0x993) return false;
- if (cp < 0x9a9) return true;
- if (cp < 0x9aa) return false;
- if (cp < 0x9b1) return true;
- if (cp === 0x9b2) return true;
- if (cp < 0x9b6) return false;
- if (cp < 0x9ba) return true;
- return false;
- }
- if (cp < 0x9fc) {
- if (cp === 0x9bd) return true;
- if (cp === 0x9ce) return true;
- if (cp < 0x9dc) return false;
- if (cp < 0x9de) return true;
- if (cp < 0x9df) return false;
- if (cp < 0x9e2) return true;
- if (cp < 0x9f0) return false;
- if (cp < 0x9f2) return true;
- return false;
- }
- if (cp === 0x9fc) return true;
- if (cp < 0xa05) return false;
- if (cp < 0xa0b) return true;
- if (cp < 0xa0f) return false;
- if (cp < 0xa11) return true;
- if (cp < 0xa13) return false;
- if (cp < 0xa29) return true;
- if (cp < 0xa2a) return false;
- if (cp < 0xa31) return true;
- if (cp < 0xa32) return false;
- if (cp < 0xa34) return true;
- return false;
- }
- if (cp < 0xc60) {
- if (cp < 0xb3d) {
- if (cp < 0xab5) {
- if (cp < 0xa85) {
- if (cp < 0xa35) return false;
- if (cp < 0xa37) return true;
- if (cp < 0xa38) return false;
- if (cp < 0xa3a) return true;
- if (cp < 0xa59) return false;
- if (cp < 0xa5d) return true;
- if (cp === 0xa5e) return true;
- if (cp < 0xa72) return false;
- if (cp < 0xa75) return true;
- return false;
- }
- if (cp < 0xa8e) return true;
- if (cp < 0xa8f) return false;
- if (cp < 0xa92) return true;
- if (cp < 0xa93) return false;
- if (cp < 0xaa9) return true;
- if (cp < 0xaaa) return false;
- if (cp < 0xab1) return true;
- if (cp < 0xab2) return false;
- if (cp < 0xab4) return true;
- return false;
- }
- if (cp < 0xb05) {
- if (cp < 0xab5) return false;
- if (cp < 0xaba) return true;
- if (cp === 0xabd) return true;
- if (cp === 0xad0) return true;
- if (cp < 0xae0) return false;
- if (cp < 0xae2) return true;
- if (cp === 0xaf9) return true;
- return false;
- }
- if (cp < 0xb0d) return true;
- if (cp < 0xb0f) return false;
- if (cp < 0xb11) return true;
- if (cp < 0xb13) return false;
- if (cp < 0xb29) return true;
- if (cp < 0xb2a) return false;
- if (cp < 0xb31) return true;
- if (cp < 0xb32) return false;
- if (cp < 0xb34) return true;
- if (cp < 0xb35) return false;
- if (cp < 0xb3a) return true;
- return false;
- }
- if (cp < 0xb9e) {
- if (cp < 0xb85) {
- if (cp === 0xb3d) return true;
- if (cp < 0xb5c) return false;
- if (cp < 0xb5e) return true;
- if (cp < 0xb5f) return false;
- if (cp < 0xb62) return true;
- if (cp === 0xb71) return true;
- if (cp === 0xb83) return true;
- return false;
- }
- if (cp < 0xb8b) return true;
- if (cp < 0xb8e) return false;
- if (cp < 0xb91) return true;
- if (cp < 0xb92) return false;
- if (cp < 0xb96) return true;
- if (cp < 0xb99) return false;
- if (cp < 0xb9b) return true;
- if (cp === 0xb9c) return true;
- return false;
- }
- if (cp < 0xc05) {
- if (cp < 0xb9e) return false;
- if (cp < 0xba0) return true;
- if (cp < 0xba3) return false;
- if (cp < 0xba5) return true;
- if (cp < 0xba8) return false;
- if (cp < 0xbab) return true;
- if (cp < 0xbae) return false;
- if (cp < 0xbba) return true;
- if (cp === 0xbd0) return true;
- return false;
- }
- if (cp < 0xc0d) return true;
- if (cp < 0xc0e) return false;
- if (cp < 0xc11) return true;
- if (cp < 0xc12) return false;
- if (cp < 0xc29) return true;
- if (cp < 0xc2a) return false;
- if (cp < 0xc3a) return true;
- if (cp === 0xc3d) return true;
- if (cp < 0xc58) return false;
- if (cp < 0xc5b) return true;
- return false;
- }
- if (cp < 0xdb3) {
- if (cp < 0xcf1) {
- if (cp < 0xcaa) {
- if (cp < 0xc60) return false;
- if (cp < 0xc62) return true;
- if (cp === 0xc80) return true;
- if (cp < 0xc85) return false;
- if (cp < 0xc8d) return true;
- if (cp < 0xc8e) return false;
- if (cp < 0xc91) return true;
- if (cp < 0xc92) return false;
- if (cp < 0xca9) return true;
- return false;
- }
- if (cp < 0xcb4) return true;
- if (cp < 0xcb5) return false;
- if (cp < 0xcba) return true;
- if (cp === 0xcbd) return true;
- if (cp === 0xcde) return true;
- if (cp < 0xce0) return false;
- if (cp < 0xce2) return true;
- return false;
- }
- if (cp < 0xd4e) {
- if (cp < 0xcf1) return false;
- if (cp < 0xcf3) return true;
- if (cp < 0xd05) return false;
- if (cp < 0xd0d) return true;
- if (cp < 0xd0e) return false;
- if (cp < 0xd11) return true;
- if (cp < 0xd12) return false;
- if (cp < 0xd3b) return true;
- if (cp === 0xd3d) return true;
- return false;
- }
- if (cp === 0xd4e) return true;
- if (cp < 0xd54) return false;
- if (cp < 0xd57) return true;
- if (cp < 0xd5f) return false;
- if (cp < 0xd62) return true;
- if (cp < 0xd7a) return false;
- if (cp < 0xd80) return true;
- if (cp < 0xd85) return false;
- if (cp < 0xd97) return true;
- if (cp < 0xd9a) return false;
- if (cp < 0xdb2) return true;
- return false;
- }
- if (cp < 0xe8a) {
- if (cp < 0xe40) {
- if (cp < 0xdb3) return false;
- if (cp < 0xdbc) return true;
- if (cp === 0xdbd) return true;
- if (cp < 0xdc0) return false;
- if (cp < 0xdc7) return true;
- if (cp < 0xe01) return false;
- if (cp < 0xe31) return true;
- if (cp < 0xe32) return false;
- if (cp < 0xe34) return true;
- return false;
- }
- if (cp < 0xe46) return true;
- if (cp === 0xe46) return true;
- if (cp < 0xe81) return false;
- if (cp < 0xe83) return true;
- if (cp === 0xe84) return true;
- if (cp < 0xe87) return false;
- if (cp < 0xe89) return true;
- return false;
- }
- if (cp < 0xea5) {
- if (cp === 0xe8a) return true;
- if (cp === 0xe8d) return true;
- if (cp < 0xe94) return false;
- if (cp < 0xe98) return true;
- if (cp < 0xe99) return false;
- if (cp < 0xea0) return true;
- if (cp < 0xea1) return false;
- if (cp < 0xea4) return true;
- return false;
- }
- if (cp === 0xea5) return true;
- if (cp === 0xea7) return true;
- if (cp < 0xeaa) return false;
- if (cp < 0xeac) return true;
- if (cp < 0xead) return false;
- if (cp < 0xeb1) return true;
- if (cp < 0xeb2) return false;
- if (cp < 0xeb4) return true;
- if (cp === 0xebd) return true;
- return false;
- }
- if (cp < 0x1ce9) {
- if (cp < 0x166f) {
- if (cp < 0x10fd) {
- if (cp < 0x105a) {
- if (cp < 0xf49) {
- if (cp < 0xec0) return false;
- if (cp < 0xec5) return true;
- if (cp === 0xec6) return true;
- if (cp < 0xedc) return false;
- if (cp < 0xee0) return true;
- if (cp === 0xf00) return true;
- if (cp < 0xf40) return false;
- if (cp < 0xf48) return true;
- return false;
- }
- if (cp < 0xf6d) return true;
- if (cp < 0xf88) return false;
- if (cp < 0xf8d) return true;
- if (cp < 0x1000) return false;
- if (cp < 0x102b) return true;
- if (cp === 0x103f) return true;
- if (cp < 0x1050) return false;
- if (cp < 0x1056) return true;
- return false;
- }
- if (cp < 0x108e) {
- if (cp < 0x105a) return false;
- if (cp < 0x105e) return true;
- if (cp === 0x1061) return true;
- if (cp < 0x1065) return false;
- if (cp < 0x1067) return true;
- if (cp < 0x106e) return false;
- if (cp < 0x1071) return true;
- if (cp < 0x1075) return false;
- if (cp < 0x1082) return true;
- return false;
- }
- if (cp === 0x108e) return true;
- if (cp < 0x10a0) return false;
- if (cp < 0x10c6) return true;
- if (cp === 0x10c7) return true;
- if (cp === 0x10cd) return true;
- if (cp < 0x10d0) return false;
- if (cp < 0x10fb) return true;
- if (cp === 0x10fc) return true;
- return false;
- }
- if (cp < 0x12b8) {
- if (cp < 0x125a) {
- if (cp < 0x10fd) return false;
- if (cp < 0x1100) return true;
- if (cp < 0x1100) return false;
- if (cp < 0x1249) return true;
- if (cp < 0x124a) return false;
- if (cp < 0x124e) return true;
- if (cp < 0x1250) return false;
- if (cp < 0x1257) return true;
- if (cp === 0x1258) return true;
- return false;
- }
- if (cp < 0x125e) return true;
- if (cp < 0x1260) return false;
- if (cp < 0x1289) return true;
- if (cp < 0x128a) return false;
- if (cp < 0x128e) return true;
- if (cp < 0x1290) return false;
- if (cp < 0x12b1) return true;
- if (cp < 0x12b2) return false;
- if (cp < 0x12b6) return true;
- return false;
- }
- if (cp < 0x1312) {
- if (cp < 0x12b8) return false;
- if (cp < 0x12bf) return true;
- if (cp === 0x12c0) return true;
- if (cp < 0x12c2) return false;
- if (cp < 0x12c6) return true;
- if (cp < 0x12c8) return false;
- if (cp < 0x12d7) return true;
- if (cp < 0x12d8) return false;
- if (cp < 0x1311) return true;
- return false;
- }
- if (cp < 0x1316) return true;
- if (cp < 0x1318) return false;
- if (cp < 0x135b) return true;
- if (cp < 0x1380) return false;
- if (cp < 0x1390) return true;
- if (cp < 0x13a0) return false;
- if (cp < 0x13f6) return true;
- if (cp < 0x13f8) return false;
- if (cp < 0x13fe) return true;
- if (cp < 0x1401) return false;
- if (cp < 0x166d) return true;
- return false;
- }
- if (cp < 0x18b0) {
- if (cp < 0x176e) {
- if (cp < 0x1700) {
- if (cp < 0x166f) return false;
- if (cp < 0x1680) return true;
- if (cp < 0x1681) return false;
- if (cp < 0x169b) return true;
- if (cp < 0x16a0) return false;
- if (cp < 0x16eb) return true;
- if (cp < 0x16ee) return false;
- if (cp < 0x16f1) return true;
- if (cp < 0x16f1) return false;
- if (cp < 0x16f9) return true;
- return false;
- }
- if (cp < 0x170d) return true;
- if (cp < 0x170e) return false;
- if (cp < 0x1712) return true;
- if (cp < 0x1720) return false;
- if (cp < 0x1732) return true;
- if (cp < 0x1740) return false;
- if (cp < 0x1752) return true;
- if (cp < 0x1760) return false;
- if (cp < 0x176d) return true;
- return false;
- }
- if (cp < 0x1843) {
- if (cp < 0x176e) return false;
- if (cp < 0x1771) return true;
- if (cp < 0x1780) return false;
- if (cp < 0x17b4) return true;
- if (cp === 0x17d7) return true;
- if (cp === 0x17dc) return true;
- if (cp < 0x1820) return false;
- if (cp < 0x1843) return true;
- return false;
- }
- if (cp === 0x1843) return true;
- if (cp < 0x1844) return false;
- if (cp < 0x1879) return true;
- if (cp < 0x1880) return false;
- if (cp < 0x1885) return true;
- if (cp < 0x1885) return false;
- if (cp < 0x1887) return true;
- if (cp < 0x1887) return false;
- if (cp < 0x18a9) return true;
- if (cp === 0x18aa) return true;
- return false;
- }
- if (cp < 0x1b45) {
- if (cp < 0x19b0) {
- if (cp < 0x18b0) return false;
- if (cp < 0x18f6) return true;
- if (cp < 0x1900) return false;
- if (cp < 0x191f) return true;
- if (cp < 0x1950) return false;
- if (cp < 0x196e) return true;
- if (cp < 0x1970) return false;
- if (cp < 0x1975) return true;
- if (cp < 0x1980) return false;
- if (cp < 0x19ac) return true;
- return false;
- }
- if (cp < 0x19ca) return true;
- if (cp < 0x1a00) return false;
- if (cp < 0x1a17) return true;
- if (cp < 0x1a20) return false;
- if (cp < 0x1a55) return true;
- if (cp === 0x1aa7) return true;
- if (cp < 0x1b05) return false;
- if (cp < 0x1b34) return true;
- return false;
- }
- if (cp < 0x1c4d) {
- if (cp < 0x1b45) return false;
- if (cp < 0x1b4c) return true;
- if (cp < 0x1b83) return false;
- if (cp < 0x1ba1) return true;
- if (cp < 0x1bae) return false;
- if (cp < 0x1bb0) return true;
- if (cp < 0x1bba) return false;
- if (cp < 0x1be6) return true;
- if (cp < 0x1c00) return false;
- if (cp < 0x1c24) return true;
- return false;
- }
- if (cp < 0x1c50) return true;
- if (cp < 0x1c5a) return false;
- if (cp < 0x1c78) return true;
- if (cp < 0x1c78) return false;
- if (cp < 0x1c7e) return true;
- if (cp < 0x1c80) return false;
- if (cp < 0x1c89) return true;
- if (cp < 0x1c90) return false;
- if (cp < 0x1cbb) return true;
- if (cp < 0x1cbd) return false;
- if (cp < 0x1cc0) return true;
- return false;
- }
- if (cp < 0x212f) {
- if (cp < 0x1fc2) {
- if (cp < 0x1f18) {
- if (cp < 0x1d6b) {
- if (cp < 0x1ce9) return false;
- if (cp < 0x1ced) return true;
- if (cp < 0x1cee) return false;
- if (cp < 0x1cf2) return true;
- if (cp < 0x1cf5) return false;
- if (cp < 0x1cf7) return true;
- if (cp < 0x1d00) return false;
- if (cp < 0x1d2c) return true;
- if (cp < 0x1d2c) return false;
- if (cp < 0x1d6b) return true;
- return false;
- }
- if (cp < 0x1d78) return true;
- if (cp === 0x1d78) return true;
- if (cp < 0x1d79) return false;
- if (cp < 0x1d9b) return true;
- if (cp < 0x1d9b) return false;
- if (cp < 0x1dc0) return true;
- if (cp < 0x1e00) return false;
- if (cp < 0x1f16) return true;
- return false;
- }
- if (cp < 0x1f5b) {
- if (cp < 0x1f18) return false;
- if (cp < 0x1f1e) return true;
- if (cp < 0x1f20) return false;
- if (cp < 0x1f46) return true;
- if (cp < 0x1f48) return false;
- if (cp < 0x1f4e) return true;
- if (cp < 0x1f50) return false;
- if (cp < 0x1f58) return true;
- if (cp === 0x1f59) return true;
- return false;
- }
- if (cp === 0x1f5b) return true;
- if (cp === 0x1f5d) return true;
- if (cp < 0x1f5f) return false;
- if (cp < 0x1f7e) return true;
- if (cp < 0x1f80) return false;
- if (cp < 0x1fb5) return true;
- if (cp < 0x1fb6) return false;
- if (cp < 0x1fbd) return true;
- if (cp === 0x1fbe) return true;
- return false;
- }
- if (cp < 0x2102) {
- if (cp < 0x1ff2) {
- if (cp < 0x1fc2) return false;
- if (cp < 0x1fc5) return true;
- if (cp < 0x1fc6) return false;
- if (cp < 0x1fcd) return true;
- if (cp < 0x1fd0) return false;
- if (cp < 0x1fd4) return true;
- if (cp < 0x1fd6) return false;
- if (cp < 0x1fdc) return true;
- if (cp < 0x1fe0) return false;
- if (cp < 0x1fed) return true;
- return false;
- }
- if (cp < 0x1ff5) return true;
- if (cp < 0x1ff6) return false;
- if (cp < 0x1ffd) return true;
- if (cp === 0x2071) return true;
- if (cp === 0x207f) return true;
- if (cp < 0x2090) return false;
- if (cp < 0x209d) return true;
- return false;
- }
- if (cp < 0x2119) {
- if (cp === 0x2102) return true;
- if (cp === 0x2107) return true;
- if (cp < 0x210a) return false;
- if (cp < 0x2114) return true;
- if (cp === 0x2115) return true;
- if (cp === 0x2118) return true;
- return false;
- }
- if (cp < 0x211e) return true;
- if (cp === 0x2124) return true;
- if (cp === 0x2126) return true;
- if (cp === 0x2128) return true;
- if (cp < 0x212a) return false;
- if (cp < 0x212e) return true;
- if (cp === 0x212e) return true;
- return false;
- }
- if (cp < 0x2d80) {
- if (cp < 0x2c30) {
- if (cp < 0x214e) {
- if (cp < 0x212f) return false;
- if (cp < 0x2135) return true;
- if (cp < 0x2135) return false;
- if (cp < 0x2139) return true;
- if (cp === 0x2139) return true;
- if (cp < 0x213c) return false;
- if (cp < 0x2140) return true;
- if (cp < 0x2145) return false;
- if (cp < 0x214a) return true;
- return false;
- }
- if (cp === 0x214e) return true;
- if (cp < 0x2160) return false;
- if (cp < 0x2183) return true;
- if (cp < 0x2183) return false;
- if (cp < 0x2185) return true;
- if (cp < 0x2185) return false;
- if (cp < 0x2189) return true;
- if (cp < 0x2c00) return false;
- if (cp < 0x2c2f) return true;
- return false;
- }
- if (cp < 0x2cf2) {
- if (cp < 0x2c30) return false;
- if (cp < 0x2c5f) return true;
- if (cp < 0x2c60) return false;
- if (cp < 0x2c7c) return true;
- if (cp < 0x2c7c) return false;
- if (cp < 0x2c7e) return true;
- if (cp < 0x2c7e) return false;
- if (cp < 0x2ce5) return true;
- if (cp < 0x2ceb) return false;
- if (cp < 0x2cef) return true;
- return false;
- }
- if (cp < 0x2cf4) return true;
- if (cp < 0x2d00) return false;
- if (cp < 0x2d26) return true;
- if (cp === 0x2d27) return true;
- if (cp === 0x2d2d) return true;
- if (cp < 0x2d30) return false;
- if (cp < 0x2d68) return true;
- if (cp === 0x2d6f) return true;
- return false;
- }
- if (cp < 0x3006) {
- if (cp < 0x2dc0) {
- if (cp < 0x2d80) return false;
- if (cp < 0x2d97) return true;
- if (cp < 0x2da0) return false;
- if (cp < 0x2da7) return true;
- if (cp < 0x2da8) return false;
- if (cp < 0x2daf) return true;
- if (cp < 0x2db0) return false;
- if (cp < 0x2db7) return true;
- if (cp < 0x2db8) return false;
- if (cp < 0x2dbf) return true;
- return false;
- }
- if (cp < 0x2dc7) return true;
- if (cp < 0x2dc8) return false;
- if (cp < 0x2dcf) return true;
- if (cp < 0x2dd0) return false;
- if (cp < 0x2dd7) return true;
- if (cp < 0x2dd8) return false;
- if (cp < 0x2ddf) return true;
- if (cp === 0x3005) return true;
- return false;
- }
- if (cp < 0x303b) {
- if (cp === 0x3006) return true;
- if (cp === 0x3007) return true;
- if (cp < 0x3021) return false;
- if (cp < 0x302a) return true;
- if (cp < 0x3031) return false;
- if (cp < 0x3036) return true;
- if (cp < 0x3038) return false;
- if (cp < 0x303b) return true;
- return false;
- }
- if (cp === 0x303b) return true;
- if (cp === 0x303c) return true;
- if (cp < 0x3041) return false;
- if (cp < 0x3097) return true;
- if (cp < 0x309b) return false;
- if (cp < 0x309d) return true;
- if (cp < 0x309d) return false;
- if (cp < 0x309f) return true;
- if (cp === 0x309f) return true;
- return false;
- }
- if (cp < 0x10b60) {
- if (cp < 0xd7b0) {
- if (cp < 0xa882) {
- if (cp < 0xa67f) {
- if (cp < 0xa015) {
- if (cp < 0x31a0) {
- if (cp < 0x30a1) return false;
- if (cp < 0x30fb) return true;
- if (cp < 0x30fc) return false;
- if (cp < 0x30ff) return true;
- if (cp === 0x30ff) return true;
- if (cp < 0x3105) return false;
- if (cp < 0x3130) return true;
- if (cp < 0x3131) return false;
- if (cp < 0x318f) return true;
- return false;
- }
- if (cp < 0x31bb) return true;
- if (cp < 0x31f0) return false;
- if (cp < 0x3200) return true;
- if (cp < 0x3400) return false;
- if (cp < 0x4db6) return true;
- if (cp < 0x4e00) return false;
- if (cp < 0x9ff0) return true;
- if (cp < 0xa000) return false;
- if (cp < 0xa015) return true;
- return false;
- }
- if (cp < 0xa60c) {
- if (cp === 0xa015) return true;
- if (cp < 0xa016) return false;
- if (cp < 0xa48d) return true;
- if (cp < 0xa4d0) return false;
- if (cp < 0xa4f8) return true;
- if (cp < 0xa4f8) return false;
- if (cp < 0xa4fe) return true;
- if (cp < 0xa500) return false;
- if (cp < 0xa60c) return true;
- return false;
- }
- if (cp === 0xa60c) return true;
- if (cp < 0xa610) return false;
- if (cp < 0xa620) return true;
- if (cp < 0xa62a) return false;
- if (cp < 0xa62c) return true;
- if (cp < 0xa640) return false;
- if (cp < 0xa66e) return true;
- if (cp === 0xa66e) return true;
- return false;
- }
- if (cp < 0xa78b) {
- if (cp < 0xa717) {
- if (cp === 0xa67f) return true;
- if (cp < 0xa680) return false;
- if (cp < 0xa69c) return true;
- if (cp < 0xa69c) return false;
- if (cp < 0xa69e) return true;
- if (cp < 0xa6a0) return false;
- if (cp < 0xa6e6) return true;
- if (cp < 0xa6e6) return false;
- if (cp < 0xa6f0) return true;
- return false;
- }
- if (cp < 0xa720) return true;
- if (cp < 0xa722) return false;
- if (cp < 0xa770) return true;
- if (cp === 0xa770) return true;
- if (cp < 0xa771) return false;
- if (cp < 0xa788) return true;
- if (cp === 0xa788) return true;
- return false;
- }
- if (cp < 0xa7fa) {
- if (cp < 0xa78b) return false;
- if (cp < 0xa78f) return true;
- if (cp === 0xa78f) return true;
- if (cp < 0xa790) return false;
- if (cp < 0xa7ba) return true;
- if (cp === 0xa7f7) return true;
- if (cp < 0xa7f8) return false;
- if (cp < 0xa7fa) return true;
- return false;
- }
- if (cp === 0xa7fa) return true;
- if (cp < 0xa7fb) return false;
- if (cp < 0xa802) return true;
- if (cp < 0xa803) return false;
- if (cp < 0xa806) return true;
- if (cp < 0xa807) return false;
- if (cp < 0xa80b) return true;
- if (cp < 0xa80c) return false;
- if (cp < 0xa823) return true;
- if (cp < 0xa840) return false;
- if (cp < 0xa874) return true;
- return false;
- }
- if (cp < 0xaab1) {
- if (cp < 0xa9e6) {
- if (cp < 0xa930) {
- if (cp < 0xa882) return false;
- if (cp < 0xa8b4) return true;
- if (cp < 0xa8f2) return false;
- if (cp < 0xa8f8) return true;
- if (cp === 0xa8fb) return true;
- if (cp < 0xa8fd) return false;
- if (cp < 0xa8ff) return true;
- if (cp < 0xa90a) return false;
- if (cp < 0xa926) return true;
- return false;
- }
- if (cp < 0xa947) return true;
- if (cp < 0xa960) return false;
- if (cp < 0xa97d) return true;
- if (cp < 0xa984) return false;
- if (cp < 0xa9b3) return true;
- if (cp === 0xa9cf) return true;
- if (cp < 0xa9e0) return false;
- if (cp < 0xa9e5) return true;
- return false;
- }
- if (cp < 0xaa44) {
- if (cp === 0xa9e6) return true;
- if (cp < 0xa9e7) return false;
- if (cp < 0xa9f0) return true;
- if (cp < 0xa9fa) return false;
- if (cp < 0xa9ff) return true;
- if (cp < 0xaa00) return false;
- if (cp < 0xaa29) return true;
- if (cp < 0xaa40) return false;
- if (cp < 0xaa43) return true;
- return false;
- }
- if (cp < 0xaa4c) return true;
- if (cp < 0xaa60) return false;
- if (cp < 0xaa70) return true;
- if (cp === 0xaa70) return true;
- if (cp < 0xaa71) return false;
- if (cp < 0xaa77) return true;
- if (cp === 0xaa7a) return true;
- if (cp < 0xaa7e) return false;
- if (cp < 0xaab0) return true;
- return false;
- }
- if (cp < 0xab01) {
- if (cp < 0xaadb) {
- if (cp === 0xaab1) return true;
- if (cp < 0xaab5) return false;
- if (cp < 0xaab7) return true;
- if (cp < 0xaab9) return false;
- if (cp < 0xaabe) return true;
- if (cp === 0xaac0) return true;
- if (cp === 0xaac2) return true;
- return false;
- }
- if (cp < 0xaadd) return true;
- if (cp === 0xaadd) return true;
- if (cp < 0xaae0) return false;
- if (cp < 0xaaeb) return true;
- if (cp === 0xaaf2) return true;
- if (cp < 0xaaf3) return false;
- if (cp < 0xaaf5) return true;
- return false;
- }
- if (cp < 0xab30) {
- if (cp < 0xab01) return false;
- if (cp < 0xab07) return true;
- if (cp < 0xab09) return false;
- if (cp < 0xab0f) return true;
- if (cp < 0xab11) return false;
- if (cp < 0xab17) return true;
- if (cp < 0xab20) return false;
- if (cp < 0xab27) return true;
- if (cp < 0xab28) return false;
- if (cp < 0xab2f) return true;
- return false;
- }
- if (cp < 0xab5b) return true;
- if (cp < 0xab5c) return false;
- if (cp < 0xab60) return true;
- if (cp < 0xab60) return false;
- if (cp < 0xab66) return true;
- if (cp < 0xab70) return false;
- if (cp < 0xabc0) return true;
- if (cp < 0xabc0) return false;
- if (cp < 0xabe3) return true;
- if (cp < 0xac00) return false;
- if (cp < 0xd7a4) return true;
- return false;
- }
- if (cp < 0x1032d) {
- if (cp < 0xff41) {
- if (cp < 0xfb3e) {
- if (cp < 0xfb13) {
- if (cp < 0xd7b0) return false;
- if (cp < 0xd7c7) return true;
- if (cp < 0xd7cb) return false;
- if (cp < 0xd7fc) return true;
- if (cp < 0xf900) return false;
- if (cp < 0xfa6e) return true;
- if (cp < 0xfa70) return false;
- if (cp < 0xfada) return true;
- if (cp < 0xfb00) return false;
- if (cp < 0xfb07) return true;
- return false;
- }
- if (cp < 0xfb18) return true;
- if (cp === 0xfb1d) return true;
- if (cp < 0xfb1f) return false;
- if (cp < 0xfb29) return true;
- if (cp < 0xfb2a) return false;
- if (cp < 0xfb37) return true;
- if (cp < 0xfb38) return false;
- if (cp < 0xfb3d) return true;
- return false;
- }
- if (cp < 0xfd50) {
- if (cp === 0xfb3e) return true;
- if (cp < 0xfb40) return false;
- if (cp < 0xfb42) return true;
- if (cp < 0xfb43) return false;
- if (cp < 0xfb45) return true;
- if (cp < 0xfb46) return false;
- if (cp < 0xfbb2) return true;
- if (cp < 0xfbd3) return false;
- if (cp < 0xfd3e) return true;
- return false;
- }
- if (cp < 0xfd90) return true;
- if (cp < 0xfd92) return false;
- if (cp < 0xfdc8) return true;
- if (cp < 0xfdf0) return false;
- if (cp < 0xfdfc) return true;
- if (cp < 0xfe70) return false;
- if (cp < 0xfe75) return true;
- if (cp < 0xfe76) return false;
- if (cp < 0xfefd) return true;
- if (cp < 0xff21) return false;
- if (cp < 0xff3b) return true;
- return false;
- }
- if (cp < 0x10000) {
- if (cp < 0xffa0) {
- if (cp < 0xff41) return false;
- if (cp < 0xff5b) return true;
- if (cp < 0xff66) return false;
- if (cp < 0xff70) return true;
- if (cp === 0xff70) return true;
- if (cp < 0xff71) return false;
- if (cp < 0xff9e) return true;
- if (cp < 0xff9e) return false;
- if (cp < 0xffa0) return true;
- return false;
- }
- if (cp < 0xffbf) return true;
- if (cp < 0xffc2) return false;
- if (cp < 0xffc8) return true;
- if (cp < 0xffca) return false;
- if (cp < 0xffd0) return true;
- if (cp < 0xffd2) return false;
- if (cp < 0xffd8) return true;
- if (cp < 0xffda) return false;
- if (cp < 0xffdd) return true;
- return false;
- }
- if (cp < 0x10050) {
- if (cp < 0x10000) return false;
- if (cp < 0x1000c) return true;
- if (cp < 0x1000d) return false;
- if (cp < 0x10027) return true;
- if (cp < 0x10028) return false;
- if (cp < 0x1003b) return true;
- if (cp < 0x1003c) return false;
- if (cp < 0x1003e) return true;
- if (cp < 0x1003f) return false;
- if (cp < 0x1004e) return true;
- return false;
- }
- if (cp < 0x1005e) return true;
- if (cp < 0x10080) return false;
- if (cp < 0x100fb) return true;
- if (cp < 0x10140) return false;
- if (cp < 0x10175) return true;
- if (cp < 0x10280) return false;
- if (cp < 0x1029d) return true;
- if (cp < 0x102a0) return false;
- if (cp < 0x102d1) return true;
- if (cp < 0x10300) return false;
- if (cp < 0x10320) return true;
- return false;
- }
- if (cp < 0x10837) {
- if (cp < 0x10450) {
- if (cp < 0x10380) {
- if (cp < 0x1032d) return false;
- if (cp < 0x10341) return true;
- if (cp === 0x10341) return true;
- if (cp < 0x10342) return false;
- if (cp < 0x1034a) return true;
- if (cp === 0x1034a) return true;
- if (cp < 0x10350) return false;
- if (cp < 0x10376) return true;
- return false;
- }
- if (cp < 0x1039e) return true;
- if (cp < 0x103a0) return false;
- if (cp < 0x103c4) return true;
- if (cp < 0x103c8) return false;
- if (cp < 0x103d0) return true;
- if (cp < 0x103d1) return false;
- if (cp < 0x103d6) return true;
- if (cp < 0x10400) return false;
- if (cp < 0x10450) return true;
- return false;
- }
- if (cp < 0x10600) {
- if (cp < 0x10450) return false;
- if (cp < 0x1049e) return true;
- if (cp < 0x104b0) return false;
- if (cp < 0x104d4) return true;
- if (cp < 0x104d8) return false;
- if (cp < 0x104fc) return true;
- if (cp < 0x10500) return false;
- if (cp < 0x10528) return true;
- if (cp < 0x10530) return false;
- if (cp < 0x10564) return true;
- return false;
- }
- if (cp < 0x10737) return true;
- if (cp < 0x10740) return false;
- if (cp < 0x10756) return true;
- if (cp < 0x10760) return false;
- if (cp < 0x10768) return true;
- if (cp < 0x10800) return false;
- if (cp < 0x10806) return true;
- if (cp === 0x10808) return true;
- if (cp < 0x1080a) return false;
- if (cp < 0x10836) return true;
- return false;
- }
- if (cp < 0x109be) {
- if (cp < 0x108e0) {
- if (cp < 0x10837) return false;
- if (cp < 0x10839) return true;
- if (cp === 0x1083c) return true;
- if (cp < 0x1083f) return false;
- if (cp < 0x10856) return true;
- if (cp < 0x10860) return false;
- if (cp < 0x10877) return true;
- if (cp < 0x10880) return false;
- if (cp < 0x1089f) return true;
- return false;
- }
- if (cp < 0x108f3) return true;
- if (cp < 0x108f4) return false;
- if (cp < 0x108f6) return true;
- if (cp < 0x10900) return false;
- if (cp < 0x10916) return true;
- if (cp < 0x10920) return false;
- if (cp < 0x1093a) return true;
- if (cp < 0x10980) return false;
- if (cp < 0x109b8) return true;
- return false;
- }
- if (cp < 0x10a60) {
- if (cp < 0x109be) return false;
- if (cp < 0x109c0) return true;
- if (cp === 0x10a00) return true;
- if (cp < 0x10a10) return false;
- if (cp < 0x10a14) return true;
- if (cp < 0x10a15) return false;
- if (cp < 0x10a18) return true;
- if (cp < 0x10a19) return false;
- if (cp < 0x10a36) return true;
- return false;
- }
- if (cp < 0x10a7d) return true;
- if (cp < 0x10a80) return false;
- if (cp < 0x10a9d) return true;
- if (cp < 0x10ac0) return false;
- if (cp < 0x10ac8) return true;
- if (cp < 0x10ac9) return false;
- if (cp < 0x10ae5) return true;
- if (cp < 0x10b00) return false;
- if (cp < 0x10b36) return true;
- if (cp < 0x10b40) return false;
- if (cp < 0x10b56) return true;
- return false;
- }
- if (cp < 0x16e40) {
- if (cp < 0x11580) {
- if (cp < 0x11213) {
- if (cp < 0x11083) {
- if (cp < 0x10d00) {
- if (cp < 0x10b60) return false;
- if (cp < 0x10b73) return true;
- if (cp < 0x10b80) return false;
- if (cp < 0x10b92) return true;
- if (cp < 0x10c00) return false;
- if (cp < 0x10c49) return true;
- if (cp < 0x10c80) return false;
- if (cp < 0x10cb3) return true;
- if (cp < 0x10cc0) return false;
- if (cp < 0x10cf3) return true;
- return false;
- }
- if (cp < 0x10d24) return true;
- if (cp < 0x10f00) return false;
- if (cp < 0x10f1d) return true;
- if (cp === 0x10f27) return true;
- if (cp < 0x10f30) return false;
- if (cp < 0x10f46) return true;
- if (cp < 0x11003) return false;
- if (cp < 0x11038) return true;
- return false;
- }
- if (cp < 0x11176) {
- if (cp < 0x11083) return false;
- if (cp < 0x110b0) return true;
- if (cp < 0x110d0) return false;
- if (cp < 0x110e9) return true;
- if (cp < 0x11103) return false;
- if (cp < 0x11127) return true;
- if (cp === 0x11144) return true;
- if (cp < 0x11150) return false;
- if (cp < 0x11173) return true;
- return false;
- }
- if (cp === 0x11176) return true;
- if (cp < 0x11183) return false;
- if (cp < 0x111b3) return true;
- if (cp < 0x111c1) return false;
- if (cp < 0x111c5) return true;
- if (cp === 0x111da) return true;
- if (cp === 0x111dc) return true;
- if (cp < 0x11200) return false;
- if (cp < 0x11212) return true;
- return false;
- }
- if (cp < 0x1132a) {
- if (cp < 0x1129f) {
- if (cp < 0x11213) return false;
- if (cp < 0x1122c) return true;
- if (cp < 0x11280) return false;
- if (cp < 0x11287) return true;
- if (cp === 0x11288) return true;
- if (cp < 0x1128a) return false;
- if (cp < 0x1128e) return true;
- if (cp < 0x1128f) return false;
- if (cp < 0x1129e) return true;
- return false;
- }
- if (cp < 0x112a9) return true;
- if (cp < 0x112b0) return false;
- if (cp < 0x112df) return true;
- if (cp < 0x11305) return false;
- if (cp < 0x1130d) return true;
- if (cp < 0x1130f) return false;
- if (cp < 0x11311) return true;
- if (cp < 0x11313) return false;
- if (cp < 0x11329) return true;
- return false;
- }
- if (cp < 0x1135d) {
- if (cp < 0x1132a) return false;
- if (cp < 0x11331) return true;
- if (cp < 0x11332) return false;
- if (cp < 0x11334) return true;
- if (cp < 0x11335) return false;
- if (cp < 0x1133a) return true;
- if (cp === 0x1133d) return true;
- if (cp === 0x11350) return true;
- return false;
- }
- if (cp < 0x11362) return true;
- if (cp < 0x11400) return false;
- if (cp < 0x11435) return true;
- if (cp < 0x11447) return false;
- if (cp < 0x1144b) return true;
- if (cp < 0x11480) return false;
- if (cp < 0x114b0) return true;
- if (cp < 0x114c4) return false;
- if (cp < 0x114c6) return true;
- if (cp === 0x114c7) return true;
- return false;
- }
- if (cp < 0x11d00) {
- if (cp < 0x11a0b) {
- if (cp < 0x11700) {
- if (cp < 0x11580) return false;
- if (cp < 0x115af) return true;
- if (cp < 0x115d8) return false;
- if (cp < 0x115dc) return true;
- if (cp < 0x11600) return false;
- if (cp < 0x11630) return true;
- if (cp === 0x11644) return true;
- if (cp < 0x11680) return false;
- if (cp < 0x116ab) return true;
- return false;
- }
- if (cp < 0x1171b) return true;
- if (cp < 0x11800) return false;
- if (cp < 0x1182c) return true;
- if (cp < 0x118a0) return false;
- if (cp < 0x118e0) return true;
- if (cp === 0x118ff) return true;
- if (cp === 0x11a00) return true;
- return false;
- }
- if (cp < 0x11a9d) {
- if (cp < 0x11a0b) return false;
- if (cp < 0x11a33) return true;
- if (cp === 0x11a3a) return true;
- if (cp === 0x11a50) return true;
- if (cp < 0x11a5c) return false;
- if (cp < 0x11a84) return true;
- if (cp < 0x11a86) return false;
- if (cp < 0x11a8a) return true;
- return false;
- }
- if (cp === 0x11a9d) return true;
- if (cp < 0x11ac0) return false;
- if (cp < 0x11af9) return true;
- if (cp < 0x11c00) return false;
- if (cp < 0x11c09) return true;
- if (cp < 0x11c0a) return false;
- if (cp < 0x11c2f) return true;
- if (cp === 0x11c40) return true;
- if (cp < 0x11c72) return false;
- if (cp < 0x11c90) return true;
- return false;
- }
- if (cp < 0x12400) {
- if (cp < 0x11d67) {
- if (cp < 0x11d00) return false;
- if (cp < 0x11d07) return true;
- if (cp < 0x11d08) return false;
- if (cp < 0x11d0a) return true;
- if (cp < 0x11d0b) return false;
- if (cp < 0x11d31) return true;
- if (cp === 0x11d46) return true;
- if (cp < 0x11d60) return false;
- if (cp < 0x11d66) return true;
- return false;
- }
- if (cp < 0x11d69) return true;
- if (cp < 0x11d6a) return false;
- if (cp < 0x11d8a) return true;
- if (cp === 0x11d98) return true;
- if (cp < 0x11ee0) return false;
- if (cp < 0x11ef3) return true;
- if (cp < 0x12000) return false;
- if (cp < 0x1239a) return true;
- return false;
- }
- if (cp < 0x16a40) {
- if (cp < 0x12400) return false;
- if (cp < 0x1246f) return true;
- if (cp < 0x12480) return false;
- if (cp < 0x12544) return true;
- if (cp < 0x13000) return false;
- if (cp < 0x1342f) return true;
- if (cp < 0x14400) return false;
- if (cp < 0x14647) return true;
- if (cp < 0x16800) return false;
- if (cp < 0x16a39) return true;
- return false;
- }
- if (cp < 0x16a5f) return true;
- if (cp < 0x16ad0) return false;
- if (cp < 0x16aee) return true;
- if (cp < 0x16b00) return false;
- if (cp < 0x16b30) return true;
- if (cp < 0x16b40) return false;
- if (cp < 0x16b44) return true;
- if (cp < 0x16b63) return false;
- if (cp < 0x16b78) return true;
- if (cp < 0x16b7d) return false;
- if (cp < 0x16b90) return true;
- return false;
- }
- if (cp < 0x1d7c4) {
- if (cp < 0x1d4bd) {
- if (cp < 0x1bc70) {
- if (cp < 0x17000) {
- if (cp < 0x16e40) return false;
- if (cp < 0x16e80) return true;
- if (cp < 0x16f00) return false;
- if (cp < 0x16f45) return true;
- if (cp === 0x16f50) return true;
- if (cp < 0x16f93) return false;
- if (cp < 0x16fa0) return true;
- if (cp < 0x16fe0) return false;
- if (cp < 0x16fe2) return true;
- return false;
- }
- if (cp < 0x187f2) return true;
- if (cp < 0x18800) return false;
- if (cp < 0x18af3) return true;
- if (cp < 0x1b000) return false;
- if (cp < 0x1b11f) return true;
- if (cp < 0x1b170) return false;
- if (cp < 0x1b2fc) return true;
- if (cp < 0x1bc00) return false;
- if (cp < 0x1bc6b) return true;
- return false;
- }
- if (cp < 0x1d49e) {
- if (cp < 0x1bc70) return false;
- if (cp < 0x1bc7d) return true;
- if (cp < 0x1bc80) return false;
- if (cp < 0x1bc89) return true;
- if (cp < 0x1bc90) return false;
- if (cp < 0x1bc9a) return true;
- if (cp < 0x1d400) return false;
- if (cp < 0x1d455) return true;
- if (cp < 0x1d456) return false;
- if (cp < 0x1d49d) return true;
- return false;
- }
- if (cp < 0x1d4a0) return true;
- if (cp === 0x1d4a2) return true;
- if (cp < 0x1d4a5) return false;
- if (cp < 0x1d4a7) return true;
- if (cp < 0x1d4a9) return false;
- if (cp < 0x1d4ad) return true;
- if (cp < 0x1d4ae) return false;
- if (cp < 0x1d4ba) return true;
- if (cp === 0x1d4bb) return true;
- return false;
- }
- if (cp < 0x1d552) {
- if (cp < 0x1d51e) {
- if (cp < 0x1d4bd) return false;
- if (cp < 0x1d4c4) return true;
- if (cp < 0x1d4c5) return false;
- if (cp < 0x1d506) return true;
- if (cp < 0x1d507) return false;
- if (cp < 0x1d50b) return true;
- if (cp < 0x1d50d) return false;
- if (cp < 0x1d515) return true;
- if (cp < 0x1d516) return false;
- if (cp < 0x1d51d) return true;
- return false;
- }
- if (cp < 0x1d53a) return true;
- if (cp < 0x1d53b) return false;
- if (cp < 0x1d53f) return true;
- if (cp < 0x1d540) return false;
- if (cp < 0x1d545) return true;
- if (cp === 0x1d546) return true;
- if (cp < 0x1d54a) return false;
- if (cp < 0x1d551) return true;
- return false;
- }
- if (cp < 0x1d716) {
- if (cp < 0x1d552) return false;
- if (cp < 0x1d6a6) return true;
- if (cp < 0x1d6a8) return false;
- if (cp < 0x1d6c1) return true;
- if (cp < 0x1d6c2) return false;
- if (cp < 0x1d6db) return true;
- if (cp < 0x1d6dc) return false;
- if (cp < 0x1d6fb) return true;
- if (cp < 0x1d6fc) return false;
- if (cp < 0x1d715) return true;
- return false;
- }
- if (cp < 0x1d735) return true;
- if (cp < 0x1d736) return false;
- if (cp < 0x1d74f) return true;
- if (cp < 0x1d750) return false;
- if (cp < 0x1d76f) return true;
- if (cp < 0x1d770) return false;
- if (cp < 0x1d789) return true;
- if (cp < 0x1d78a) return false;
- if (cp < 0x1d7a9) return true;
- if (cp < 0x1d7aa) return false;
- if (cp < 0x1d7c3) return true;
- return false;
- }
- if (cp < 0x1ee5b) {
- if (cp < 0x1ee39) {
- if (cp < 0x1ee21) {
- if (cp < 0x1d7c4) return false;
- if (cp < 0x1d7cc) return true;
- if (cp < 0x1e800) return false;
- if (cp < 0x1e8c5) return true;
- if (cp < 0x1e900) return false;
- if (cp < 0x1e944) return true;
- if (cp < 0x1ee00) return false;
- if (cp < 0x1ee04) return true;
- if (cp < 0x1ee05) return false;
- if (cp < 0x1ee20) return true;
- return false;
- }
- if (cp < 0x1ee23) return true;
- if (cp === 0x1ee24) return true;
- if (cp === 0x1ee27) return true;
- if (cp < 0x1ee29) return false;
- if (cp < 0x1ee33) return true;
- if (cp < 0x1ee34) return false;
- if (cp < 0x1ee38) return true;
- return false;
- }
- if (cp < 0x1ee4b) {
- if (cp === 0x1ee39) return true;
- if (cp === 0x1ee3b) return true;
- if (cp === 0x1ee42) return true;
- if (cp === 0x1ee47) return true;
- if (cp === 0x1ee49) return true;
- return false;
- }
- if (cp === 0x1ee4b) return true;
- if (cp < 0x1ee4d) return false;
- if (cp < 0x1ee50) return true;
- if (cp < 0x1ee51) return false;
- if (cp < 0x1ee53) return true;
- if (cp === 0x1ee54) return true;
- if (cp === 0x1ee57) return true;
- if (cp === 0x1ee59) return true;
- return false;
- }
- if (cp < 0x1ee80) {
- if (cp < 0x1ee67) {
- if (cp === 0x1ee5b) return true;
- if (cp === 0x1ee5d) return true;
- if (cp === 0x1ee5f) return true;
- if (cp < 0x1ee61) return false;
- if (cp < 0x1ee63) return true;
- if (cp === 0x1ee64) return true;
- return false;
- }
- if (cp < 0x1ee6b) return true;
- if (cp < 0x1ee6c) return false;
- if (cp < 0x1ee73) return true;
- if (cp < 0x1ee74) return false;
- if (cp < 0x1ee78) return true;
- if (cp < 0x1ee79) return false;
- if (cp < 0x1ee7d) return true;
- if (cp === 0x1ee7e) return true;
- return false;
- }
- if (cp < 0x20000) {
- if (cp < 0x1ee80) return false;
- if (cp < 0x1ee8a) return true;
- if (cp < 0x1ee8b) return false;
- if (cp < 0x1ee9c) return true;
- if (cp < 0x1eea1) return false;
- if (cp < 0x1eea4) return true;
- if (cp < 0x1eea5) return false;
- if (cp < 0x1eeaa) return true;
- if (cp < 0x1eeab) return false;
- if (cp < 0x1eebc) return true;
- return false;
- }
- if (cp < 0x2a6d7) return true;
- if (cp < 0x2a700) return false;
- if (cp < 0x2b735) return true;
- if (cp < 0x2b740) return false;
- if (cp < 0x2b81e) return true;
- if (cp < 0x2b820) return false;
- if (cp < 0x2cea2) return true;
- if (cp < 0x2ceb0) return false;
- if (cp < 0x2ebe1) return true;
- if (cp < 0x2f800) return false;
- if (cp < 0x2fa1e) return true;
- return false;
-}
-function isLargeIdContinue(cp) {
- if (cp < 0x1cd0) {
- if (cp < 0xd82) {
- if (cp < 0xa83) {
- if (cp < 0x93b) {
- if (cp < 0x6ea) {
- if (cp < 0x5c7) {
- if (cp === 0xb7) return true;
- if (cp < 0x300) return false;
- if (cp < 0x370) return true;
- if (cp === 0x387) return true;
- if (cp < 0x483) return false;
- if (cp < 0x488) return true;
- if (cp < 0x591) return false;
- if (cp < 0x5be) return true;
- if (cp === 0x5bf) return true;
- if (cp < 0x5c1) return false;
- if (cp < 0x5c3) return true;
- if (cp < 0x5c4) return false;
- if (cp < 0x5c6) return true;
- return false;
- }
- if (cp === 0x5c7) return true;
- if (cp < 0x610) return false;
- if (cp < 0x61b) return true;
- if (cp < 0x64b) return false;
- if (cp < 0x660) return true;
- if (cp < 0x660) return false;
- if (cp < 0x66a) return true;
- if (cp === 0x670) return true;
- if (cp < 0x6d6) return false;
- if (cp < 0x6dd) return true;
- if (cp < 0x6df) return false;
- if (cp < 0x6e5) return true;
- if (cp < 0x6e7) return false;
- if (cp < 0x6e9) return true;
- return false;
- }
- if (cp < 0x816) {
- if (cp < 0x6ea) return false;
- if (cp < 0x6ee) return true;
- if (cp < 0x6f0) return false;
- if (cp < 0x6fa) return true;
- if (cp === 0x711) return true;
- if (cp < 0x730) return false;
- if (cp < 0x74b) return true;
- if (cp < 0x7a6) return false;
- if (cp < 0x7b1) return true;
- if (cp < 0x7c0) return false;
- if (cp < 0x7ca) return true;
- if (cp < 0x7eb) return false;
- if (cp < 0x7f4) return true;
- if (cp === 0x7fd) return true;
- return false;
- }
- if (cp < 0x81a) return true;
- if (cp < 0x81b) return false;
- if (cp < 0x824) return true;
- if (cp < 0x825) return false;
- if (cp < 0x828) return true;
- if (cp < 0x829) return false;
- if (cp < 0x82e) return true;
- if (cp < 0x859) return false;
- if (cp < 0x85c) return true;
- if (cp < 0x8d3) return false;
- if (cp < 0x8e2) return true;
- if (cp < 0x8e3) return false;
- if (cp < 0x903) return true;
- if (cp === 0x903) return true;
- if (cp === 0x93a) return true;
- return false;
- }
- if (cp < 0x9cd) {
- if (cp < 0x962) {
- if (cp === 0x93b) return true;
- if (cp === 0x93c) return true;
- if (cp < 0x93e) return false;
- if (cp < 0x941) return true;
- if (cp < 0x941) return false;
- if (cp < 0x949) return true;
- if (cp < 0x949) return false;
- if (cp < 0x94d) return true;
- if (cp === 0x94d) return true;
- if (cp < 0x94e) return false;
- if (cp < 0x950) return true;
- if (cp < 0x951) return false;
- if (cp < 0x958) return true;
- return false;
- }
- if (cp < 0x964) return true;
- if (cp < 0x966) return false;
- if (cp < 0x970) return true;
- if (cp === 0x981) return true;
- if (cp < 0x982) return false;
- if (cp < 0x984) return true;
- if (cp === 0x9bc) return true;
- if (cp < 0x9be) return false;
- if (cp < 0x9c1) return true;
- if (cp < 0x9c1) return false;
- if (cp < 0x9c5) return true;
- if (cp < 0x9c7) return false;
- if (cp < 0x9c9) return true;
- if (cp < 0x9cb) return false;
- if (cp < 0x9cd) return true;
- return false;
- }
- if (cp < 0xa3e) {
- if (cp === 0x9cd) return true;
- if (cp === 0x9d7) return true;
- if (cp < 0x9e2) return false;
- if (cp < 0x9e4) return true;
- if (cp < 0x9e6) return false;
- if (cp < 0x9f0) return true;
- if (cp === 0x9fe) return true;
- if (cp < 0xa01) return false;
- if (cp < 0xa03) return true;
- if (cp === 0xa03) return true;
- if (cp === 0xa3c) return true;
- return false;
- }
- if (cp < 0xa41) return true;
- if (cp < 0xa41) return false;
- if (cp < 0xa43) return true;
- if (cp < 0xa47) return false;
- if (cp < 0xa49) return true;
- if (cp < 0xa4b) return false;
- if (cp < 0xa4e) return true;
- if (cp === 0xa51) return true;
- if (cp < 0xa66) return false;
- if (cp < 0xa70) return true;
- if (cp < 0xa70) return false;
- if (cp < 0xa72) return true;
- if (cp === 0xa75) return true;
- if (cp < 0xa81) return false;
- if (cp < 0xa83) return true;
- return false;
- }
- if (cp < 0xc00) {
- if (cp < 0xb41) {
- if (cp < 0xae2) {
- if (cp === 0xa83) return true;
- if (cp === 0xabc) return true;
- if (cp < 0xabe) return false;
- if (cp < 0xac1) return true;
- if (cp < 0xac1) return false;
- if (cp < 0xac6) return true;
- if (cp < 0xac7) return false;
- if (cp < 0xac9) return true;
- if (cp === 0xac9) return true;
- if (cp < 0xacb) return false;
- if (cp < 0xacd) return true;
- if (cp === 0xacd) return true;
- return false;
- }
- if (cp < 0xae4) return true;
- if (cp < 0xae6) return false;
- if (cp < 0xaf0) return true;
- if (cp < 0xafa) return false;
- if (cp < 0xb00) return true;
- if (cp === 0xb01) return true;
- if (cp < 0xb02) return false;
- if (cp < 0xb04) return true;
- if (cp === 0xb3c) return true;
- if (cp === 0xb3e) return true;
- if (cp === 0xb3f) return true;
- if (cp === 0xb40) return true;
- return false;
- }
- if (cp < 0xb82) {
- if (cp < 0xb41) return false;
- if (cp < 0xb45) return true;
- if (cp < 0xb47) return false;
- if (cp < 0xb49) return true;
- if (cp < 0xb4b) return false;
- if (cp < 0xb4d) return true;
- if (cp === 0xb4d) return true;
- if (cp === 0xb56) return true;
- if (cp === 0xb57) return true;
- if (cp < 0xb62) return false;
- if (cp < 0xb64) return true;
- if (cp < 0xb66) return false;
- if (cp < 0xb70) return true;
- return false;
- }
- if (cp === 0xb82) return true;
- if (cp < 0xbbe) return false;
- if (cp < 0xbc0) return true;
- if (cp === 0xbc0) return true;
- if (cp < 0xbc1) return false;
- if (cp < 0xbc3) return true;
- if (cp < 0xbc6) return false;
- if (cp < 0xbc9) return true;
- if (cp < 0xbca) return false;
- if (cp < 0xbcd) return true;
- if (cp === 0xbcd) return true;
- if (cp === 0xbd7) return true;
- if (cp < 0xbe6) return false;
- if (cp < 0xbf0) return true;
- return false;
- }
- if (cp < 0xcc7) {
- if (cp < 0xc62) {
- if (cp === 0xc00) return true;
- if (cp < 0xc01) return false;
- if (cp < 0xc04) return true;
- if (cp === 0xc04) return true;
- if (cp < 0xc3e) return false;
- if (cp < 0xc41) return true;
- if (cp < 0xc41) return false;
- if (cp < 0xc45) return true;
- if (cp < 0xc46) return false;
- if (cp < 0xc49) return true;
- if (cp < 0xc4a) return false;
- if (cp < 0xc4e) return true;
- if (cp < 0xc55) return false;
- if (cp < 0xc57) return true;
- return false;
- }
- if (cp < 0xc64) return true;
- if (cp < 0xc66) return false;
- if (cp < 0xc70) return true;
- if (cp === 0xc81) return true;
- if (cp < 0xc82) return false;
- if (cp < 0xc84) return true;
- if (cp === 0xcbc) return true;
- if (cp === 0xcbe) return true;
- if (cp === 0xcbf) return true;
- if (cp < 0xcc0) return false;
- if (cp < 0xcc5) return true;
- if (cp === 0xcc6) return true;
- return false;
- }
- if (cp < 0xd3b) {
- if (cp < 0xcc7) return false;
- if (cp < 0xcc9) return true;
- if (cp < 0xcca) return false;
- if (cp < 0xccc) return true;
- if (cp < 0xccc) return false;
- if (cp < 0xcce) return true;
- if (cp < 0xcd5) return false;
- if (cp < 0xcd7) return true;
- if (cp < 0xce2) return false;
- if (cp < 0xce4) return true;
- if (cp < 0xce6) return false;
- if (cp < 0xcf0) return true;
- if (cp < 0xd00) return false;
- if (cp < 0xd02) return true;
- if (cp < 0xd02) return false;
- if (cp < 0xd04) return true;
- return false;
- }
- if (cp < 0xd3d) return true;
- if (cp < 0xd3e) return false;
- if (cp < 0xd41) return true;
- if (cp < 0xd41) return false;
- if (cp < 0xd45) return true;
- if (cp < 0xd46) return false;
- if (cp < 0xd49) return true;
- if (cp < 0xd4a) return false;
- if (cp < 0xd4d) return true;
- if (cp === 0xd4d) return true;
- if (cp === 0xd57) return true;
- if (cp < 0xd62) return false;
- if (cp < 0xd64) return true;
- if (cp < 0xd66) return false;
- if (cp < 0xd70) return true;
- return false;
- }
- if (cp < 0x17e0) {
- if (cp < 0x1038) {
- if (cp < 0xf18) {
- if (cp < 0xe31) {
- if (cp < 0xd82) return false;
- if (cp < 0xd84) return true;
- if (cp === 0xdca) return true;
- if (cp < 0xdcf) return false;
- if (cp < 0xdd2) return true;
- if (cp < 0xdd2) return false;
- if (cp < 0xdd5) return true;
- if (cp === 0xdd6) return true;
- if (cp < 0xdd8) return false;
- if (cp < 0xde0) return true;
- if (cp < 0xde6) return false;
- if (cp < 0xdf0) return true;
- if (cp < 0xdf2) return false;
- if (cp < 0xdf4) return true;
- return false;
- }
- if (cp === 0xe31) return true;
- if (cp < 0xe34) return false;
- if (cp < 0xe3b) return true;
- if (cp < 0xe47) return false;
- if (cp < 0xe4f) return true;
- if (cp < 0xe50) return false;
- if (cp < 0xe5a) return true;
- if (cp === 0xeb1) return true;
- if (cp < 0xeb4) return false;
- if (cp < 0xeba) return true;
- if (cp < 0xebb) return false;
- if (cp < 0xebd) return true;
- if (cp < 0xec8) return false;
- if (cp < 0xece) return true;
- if (cp < 0xed0) return false;
- if (cp < 0xeda) return true;
- return false;
- }
- if (cp < 0xf80) {
- if (cp < 0xf18) return false;
- if (cp < 0xf1a) return true;
- if (cp < 0xf20) return false;
- if (cp < 0xf2a) return true;
- if (cp === 0xf35) return true;
- if (cp === 0xf37) return true;
- if (cp === 0xf39) return true;
- if (cp < 0xf3e) return false;
- if (cp < 0xf40) return true;
- if (cp < 0xf71) return false;
- if (cp < 0xf7f) return true;
- if (cp === 0xf7f) return true;
- return false;
- }
- if (cp < 0xf85) return true;
- if (cp < 0xf86) return false;
- if (cp < 0xf88) return true;
- if (cp < 0xf8d) return false;
- if (cp < 0xf98) return true;
- if (cp < 0xf99) return false;
- if (cp < 0xfbd) return true;
- if (cp === 0xfc6) return true;
- if (cp < 0x102b) return false;
- if (cp < 0x102d) return true;
- if (cp < 0x102d) return false;
- if (cp < 0x1031) return true;
- if (cp === 0x1031) return true;
- if (cp < 0x1032) return false;
- if (cp < 0x1038) return true;
- return false;
- }
- if (cp < 0x1090) {
- if (cp < 0x1062) {
- if (cp === 0x1038) return true;
- if (cp < 0x1039) return false;
- if (cp < 0x103b) return true;
- if (cp < 0x103b) return false;
- if (cp < 0x103d) return true;
- if (cp < 0x103d) return false;
- if (cp < 0x103f) return true;
- if (cp < 0x1040) return false;
- if (cp < 0x104a) return true;
- if (cp < 0x1056) return false;
- if (cp < 0x1058) return true;
- if (cp < 0x1058) return false;
- if (cp < 0x105a) return true;
- if (cp < 0x105e) return false;
- if (cp < 0x1061) return true;
- return false;
- }
- if (cp < 0x1065) return true;
- if (cp < 0x1067) return false;
- if (cp < 0x106e) return true;
- if (cp < 0x1071) return false;
- if (cp < 0x1075) return true;
- if (cp === 0x1082) return true;
- if (cp < 0x1083) return false;
- if (cp < 0x1085) return true;
- if (cp < 0x1085) return false;
- if (cp < 0x1087) return true;
- if (cp < 0x1087) return false;
- if (cp < 0x108d) return true;
- if (cp === 0x108d) return true;
- if (cp === 0x108f) return true;
- return false;
- }
- if (cp < 0x1772) {
- if (cp < 0x1090) return false;
- if (cp < 0x109a) return true;
- if (cp < 0x109a) return false;
- if (cp < 0x109d) return true;
- if (cp === 0x109d) return true;
- if (cp < 0x135d) return false;
- if (cp < 0x1360) return true;
- if (cp < 0x1369) return false;
- if (cp < 0x1372) return true;
- if (cp < 0x1712) return false;
- if (cp < 0x1715) return true;
- if (cp < 0x1732) return false;
- if (cp < 0x1735) return true;
- if (cp < 0x1752) return false;
- if (cp < 0x1754) return true;
- return false;
- }
- if (cp < 0x1774) return true;
- if (cp < 0x17b4) return false;
- if (cp < 0x17b6) return true;
- if (cp === 0x17b6) return true;
- if (cp < 0x17b7) return false;
- if (cp < 0x17be) return true;
- if (cp < 0x17be) return false;
- if (cp < 0x17c6) return true;
- if (cp === 0x17c6) return true;
- if (cp < 0x17c7) return false;
- if (cp < 0x17c9) return true;
- if (cp < 0x17c9) return false;
- if (cp < 0x17d4) return true;
- if (cp === 0x17dd) return true;
- return false;
- }
- if (cp < 0x1b04) {
- if (cp < 0x1a1b) {
- if (cp < 0x1930) {
- if (cp < 0x17e0) return false;
- if (cp < 0x17ea) return true;
- if (cp < 0x180b) return false;
- if (cp < 0x180e) return true;
- if (cp < 0x1810) return false;
- if (cp < 0x181a) return true;
- if (cp === 0x18a9) return true;
- if (cp < 0x1920) return false;
- if (cp < 0x1923) return true;
- if (cp < 0x1923) return false;
- if (cp < 0x1927) return true;
- if (cp < 0x1927) return false;
- if (cp < 0x1929) return true;
- if (cp < 0x1929) return false;
- if (cp < 0x192c) return true;
- return false;
- }
- if (cp < 0x1932) return true;
- if (cp === 0x1932) return true;
- if (cp < 0x1933) return false;
- if (cp < 0x1939) return true;
- if (cp < 0x1939) return false;
- if (cp < 0x193c) return true;
- if (cp < 0x1946) return false;
- if (cp < 0x1950) return true;
- if (cp < 0x19d0) return false;
- if (cp < 0x19da) return true;
- if (cp === 0x19da) return true;
- if (cp < 0x1a17) return false;
- if (cp < 0x1a19) return true;
- if (cp < 0x1a19) return false;
- if (cp < 0x1a1b) return true;
- return false;
- }
- if (cp < 0x1a63) {
- if (cp === 0x1a1b) return true;
- if (cp === 0x1a55) return true;
- if (cp === 0x1a56) return true;
- if (cp === 0x1a57) return true;
- if (cp < 0x1a58) return false;
- if (cp < 0x1a5f) return true;
- if (cp === 0x1a60) return true;
- if (cp === 0x1a61) return true;
- if (cp === 0x1a62) return true;
- return false;
- }
- if (cp < 0x1a65) return true;
- if (cp < 0x1a65) return false;
- if (cp < 0x1a6d) return true;
- if (cp < 0x1a6d) return false;
- if (cp < 0x1a73) return true;
- if (cp < 0x1a73) return false;
- if (cp < 0x1a7d) return true;
- if (cp === 0x1a7f) return true;
- if (cp < 0x1a80) return false;
- if (cp < 0x1a8a) return true;
- if (cp < 0x1a90) return false;
- if (cp < 0x1a9a) return true;
- if (cp < 0x1ab0) return false;
- if (cp < 0x1abe) return true;
- if (cp < 0x1b00) return false;
- if (cp < 0x1b04) return true;
- return false;
- }
- if (cp < 0x1baa) {
- if (cp < 0x1b43) {
- if (cp === 0x1b04) return true;
- if (cp === 0x1b34) return true;
- if (cp === 0x1b35) return true;
- if (cp < 0x1b36) return false;
- if (cp < 0x1b3b) return true;
- if (cp === 0x1b3b) return true;
- if (cp === 0x1b3c) return true;
- if (cp < 0x1b3d) return false;
- if (cp < 0x1b42) return true;
- if (cp === 0x1b42) return true;
- return false;
- }
- if (cp < 0x1b45) return true;
- if (cp < 0x1b50) return false;
- if (cp < 0x1b5a) return true;
- if (cp < 0x1b6b) return false;
- if (cp < 0x1b74) return true;
- if (cp < 0x1b80) return false;
- if (cp < 0x1b82) return true;
- if (cp === 0x1b82) return true;
- if (cp === 0x1ba1) return true;
- if (cp < 0x1ba2) return false;
- if (cp < 0x1ba6) return true;
- if (cp < 0x1ba6) return false;
- if (cp < 0x1ba8) return true;
- if (cp < 0x1ba8) return false;
- if (cp < 0x1baa) return true;
- return false;
- }
- if (cp < 0x1bee) {
- if (cp === 0x1baa) return true;
- if (cp < 0x1bab) return false;
- if (cp < 0x1bae) return true;
- if (cp < 0x1bb0) return false;
- if (cp < 0x1bba) return true;
- if (cp === 0x1be6) return true;
- if (cp === 0x1be7) return true;
- if (cp < 0x1be8) return false;
- if (cp < 0x1bea) return true;
- if (cp < 0x1bea) return false;
- if (cp < 0x1bed) return true;
- if (cp === 0x1bed) return true;
- return false;
- }
- if (cp === 0x1bee) return true;
- if (cp < 0x1bef) return false;
- if (cp < 0x1bf2) return true;
- if (cp < 0x1bf2) return false;
- if (cp < 0x1bf4) return true;
- if (cp < 0x1c24) return false;
- if (cp < 0x1c2c) return true;
- if (cp < 0x1c2c) return false;
- if (cp < 0x1c34) return true;
- if (cp < 0x1c34) return false;
- if (cp < 0x1c36) return true;
- if (cp < 0x1c36) return false;
- if (cp < 0x1c38) return true;
- if (cp < 0x1c40) return false;
- if (cp < 0x1c4a) return true;
- if (cp < 0x1c50) return false;
- if (cp < 0x1c5a) return true;
- return false;
- }
- if (cp < 0x1123e) {
- if (cp < 0xaab7) {
- if (cp < 0xa8b4) {
- if (cp < 0x2d7f) {
- if (cp < 0x1cf8) {
- if (cp < 0x1cd0) return false;
- if (cp < 0x1cd3) return true;
- if (cp < 0x1cd4) return false;
- if (cp < 0x1ce1) return true;
- if (cp === 0x1ce1) return true;
- if (cp < 0x1ce2) return false;
- if (cp < 0x1ce9) return true;
- if (cp === 0x1ced) return true;
- if (cp < 0x1cf2) return false;
- if (cp < 0x1cf4) return true;
- if (cp === 0x1cf4) return true;
- if (cp === 0x1cf7) return true;
- return false;
- }
- if (cp < 0x1cfa) return true;
- if (cp < 0x1dc0) return false;
- if (cp < 0x1dfa) return true;
- if (cp < 0x1dfb) return false;
- if (cp < 0x1e00) return true;
- if (cp < 0x203f) return false;
- if (cp < 0x2041) return true;
- if (cp === 0x2054) return true;
- if (cp < 0x20d0) return false;
- if (cp < 0x20dd) return true;
- if (cp === 0x20e1) return true;
- if (cp < 0x20e5) return false;
- if (cp < 0x20f1) return true;
- if (cp < 0x2cef) return false;
- if (cp < 0x2cf2) return true;
- return false;
- }
- if (cp < 0xa69e) {
- if (cp === 0x2d7f) return true;
- if (cp < 0x2de0) return false;
- if (cp < 0x2e00) return true;
- if (cp < 0x302a) return false;
- if (cp < 0x302e) return true;
- if (cp < 0x302e) return false;
- if (cp < 0x3030) return true;
- if (cp < 0x3099) return false;
- if (cp < 0x309b) return true;
- if (cp < 0xa620) return false;
- if (cp < 0xa62a) return true;
- if (cp === 0xa66f) return true;
- if (cp < 0xa674) return false;
- if (cp < 0xa67e) return true;
- return false;
- }
- if (cp < 0xa6a0) return true;
- if (cp < 0xa6f0) return false;
- if (cp < 0xa6f2) return true;
- if (cp === 0xa802) return true;
- if (cp === 0xa806) return true;
- if (cp === 0xa80b) return true;
- if (cp < 0xa823) return false;
- if (cp < 0xa825) return true;
- if (cp < 0xa825) return false;
- if (cp < 0xa827) return true;
- if (cp === 0xa827) return true;
- if (cp < 0xa880) return false;
- if (cp < 0xa882) return true;
- return false;
- }
- if (cp < 0xa9d0) {
- if (cp < 0xa952) {
- if (cp < 0xa8b4) return false;
- if (cp < 0xa8c4) return true;
- if (cp < 0xa8c4) return false;
- if (cp < 0xa8c6) return true;
- if (cp < 0xa8d0) return false;
- if (cp < 0xa8da) return true;
- if (cp < 0xa8e0) return false;
- if (cp < 0xa8f2) return true;
- if (cp === 0xa8ff) return true;
- if (cp < 0xa900) return false;
- if (cp < 0xa90a) return true;
- if (cp < 0xa926) return false;
- if (cp < 0xa92e) return true;
- if (cp < 0xa947) return false;
- if (cp < 0xa952) return true;
- return false;
- }
- if (cp < 0xa954) return true;
- if (cp < 0xa980) return false;
- if (cp < 0xa983) return true;
- if (cp === 0xa983) return true;
- if (cp === 0xa9b3) return true;
- if (cp < 0xa9b4) return false;
- if (cp < 0xa9b6) return true;
- if (cp < 0xa9b6) return false;
- if (cp < 0xa9ba) return true;
- if (cp < 0xa9ba) return false;
- if (cp < 0xa9bc) return true;
- if (cp === 0xa9bc) return true;
- if (cp < 0xa9bd) return false;
- if (cp < 0xa9c1) return true;
- return false;
- }
- if (cp < 0xaa43) {
- if (cp < 0xa9d0) return false;
- if (cp < 0xa9da) return true;
- if (cp === 0xa9e5) return true;
- if (cp < 0xa9f0) return false;
- if (cp < 0xa9fa) return true;
- if (cp < 0xaa29) return false;
- if (cp < 0xaa2f) return true;
- if (cp < 0xaa2f) return false;
- if (cp < 0xaa31) return true;
- if (cp < 0xaa31) return false;
- if (cp < 0xaa33) return true;
- if (cp < 0xaa33) return false;
- if (cp < 0xaa35) return true;
- if (cp < 0xaa35) return false;
- if (cp < 0xaa37) return true;
- return false;
- }
- if (cp === 0xaa43) return true;
- if (cp === 0xaa4c) return true;
- if (cp === 0xaa4d) return true;
- if (cp < 0xaa50) return false;
- if (cp < 0xaa5a) return true;
- if (cp === 0xaa7b) return true;
- if (cp === 0xaa7c) return true;
- if (cp === 0xaa7d) return true;
- if (cp === 0xaab0) return true;
- if (cp < 0xaab2) return false;
- if (cp < 0xaab5) return true;
- return false;
- }
- if (cp < 0x10d30) {
- if (cp < 0xfe00) {
- if (cp < 0xabe3) {
- if (cp < 0xaab7) return false;
- if (cp < 0xaab9) return true;
- if (cp < 0xaabe) return false;
- if (cp < 0xaac0) return true;
- if (cp === 0xaac1) return true;
- if (cp === 0xaaeb) return true;
- if (cp < 0xaaec) return false;
- if (cp < 0xaaee) return true;
- if (cp < 0xaaee) return false;
- if (cp < 0xaaf0) return true;
- if (cp === 0xaaf5) return true;
- if (cp === 0xaaf6) return true;
- return false;
- }
- if (cp < 0xabe5) return true;
- if (cp === 0xabe5) return true;
- if (cp < 0xabe6) return false;
- if (cp < 0xabe8) return true;
- if (cp === 0xabe8) return true;
- if (cp < 0xabe9) return false;
- if (cp < 0xabeb) return true;
- if (cp === 0xabec) return true;
- if (cp === 0xabed) return true;
- if (cp < 0xabf0) return false;
- if (cp < 0xabfa) return true;
- if (cp === 0xfb1e) return true;
- return false;
- }
- if (cp < 0x10376) {
- if (cp < 0xfe00) return false;
- if (cp < 0xfe10) return true;
- if (cp < 0xfe20) return false;
- if (cp < 0xfe30) return true;
- if (cp < 0xfe33) return false;
- if (cp < 0xfe35) return true;
- if (cp < 0xfe4d) return false;
- if (cp < 0xfe50) return true;
- if (cp < 0xff10) return false;
- if (cp < 0xff1a) return true;
- if (cp === 0xff3f) return true;
- if (cp === 0x101fd) return true;
- if (cp === 0x102e0) return true;
- return false;
- }
- if (cp < 0x1037b) return true;
- if (cp < 0x104a0) return false;
- if (cp < 0x104aa) return true;
- if (cp < 0x10a01) return false;
- if (cp < 0x10a04) return true;
- if (cp < 0x10a05) return false;
- if (cp < 0x10a07) return true;
- if (cp < 0x10a0c) return false;
- if (cp < 0x10a10) return true;
- if (cp < 0x10a38) return false;
- if (cp < 0x10a3b) return true;
- if (cp === 0x10a3f) return true;
- if (cp < 0x10ae5) return false;
- if (cp < 0x10ae7) return true;
- if (cp < 0x10d24) return false;
- if (cp < 0x10d28) return true;
- return false;
- }
- if (cp < 0x1112d) {
- if (cp < 0x11082) {
- if (cp < 0x10d30) return false;
- if (cp < 0x10d3a) return true;
- if (cp < 0x10f46) return false;
- if (cp < 0x10f51) return true;
- if (cp === 0x11000) return true;
- if (cp === 0x11001) return true;
- if (cp === 0x11002) return true;
- if (cp < 0x11038) return false;
- if (cp < 0x11047) return true;
- if (cp < 0x11066) return false;
- if (cp < 0x11070) return true;
- if (cp < 0x1107f) return false;
- if (cp < 0x11082) return true;
- return false;
- }
- if (cp === 0x11082) return true;
- if (cp < 0x110b0) return false;
- if (cp < 0x110b3) return true;
- if (cp < 0x110b3) return false;
- if (cp < 0x110b7) return true;
- if (cp < 0x110b7) return false;
- if (cp < 0x110b9) return true;
- if (cp < 0x110b9) return false;
- if (cp < 0x110bb) return true;
- if (cp < 0x110f0) return false;
- if (cp < 0x110fa) return true;
- if (cp < 0x11100) return false;
- if (cp < 0x11103) return true;
- if (cp < 0x11127) return false;
- if (cp < 0x1112c) return true;
- if (cp === 0x1112c) return true;
- return false;
- }
- if (cp < 0x111bf) {
- if (cp < 0x1112d) return false;
- if (cp < 0x11135) return true;
- if (cp < 0x11136) return false;
- if (cp < 0x11140) return true;
- if (cp < 0x11145) return false;
- if (cp < 0x11147) return true;
- if (cp === 0x11173) return true;
- if (cp < 0x11180) return false;
- if (cp < 0x11182) return true;
- if (cp === 0x11182) return true;
- if (cp < 0x111b3) return false;
- if (cp < 0x111b6) return true;
- if (cp < 0x111b6) return false;
- if (cp < 0x111bf) return true;
- return false;
- }
- if (cp < 0x111c1) return true;
- if (cp < 0x111c9) return false;
- if (cp < 0x111cd) return true;
- if (cp < 0x111d0) return false;
- if (cp < 0x111da) return true;
- if (cp < 0x1122c) return false;
- if (cp < 0x1122f) return true;
- if (cp < 0x1122f) return false;
- if (cp < 0x11232) return true;
- if (cp < 0x11232) return false;
- if (cp < 0x11234) return true;
- if (cp === 0x11234) return true;
- if (cp === 0x11235) return true;
- if (cp < 0x11236) return false;
- if (cp < 0x11238) return true;
- return false;
- }
- if (cp < 0x11a33) {
- if (cp < 0x115af) {
- if (cp < 0x11435) {
- if (cp < 0x1133e) {
- if (cp === 0x1123e) return true;
- if (cp === 0x112df) return true;
- if (cp < 0x112e0) return false;
- if (cp < 0x112e3) return true;
- if (cp < 0x112e3) return false;
- if (cp < 0x112eb) return true;
- if (cp < 0x112f0) return false;
- if (cp < 0x112fa) return true;
- if (cp < 0x11300) return false;
- if (cp < 0x11302) return true;
- if (cp < 0x11302) return false;
- if (cp < 0x11304) return true;
- if (cp < 0x1133b) return false;
- if (cp < 0x1133d) return true;
- return false;
- }
- if (cp < 0x11340) return true;
- if (cp === 0x11340) return true;
- if (cp < 0x11341) return false;
- if (cp < 0x11345) return true;
- if (cp < 0x11347) return false;
- if (cp < 0x11349) return true;
- if (cp < 0x1134b) return false;
- if (cp < 0x1134e) return true;
- if (cp === 0x11357) return true;
- if (cp < 0x11362) return false;
- if (cp < 0x11364) return true;
- if (cp < 0x11366) return false;
- if (cp < 0x1136d) return true;
- if (cp < 0x11370) return false;
- if (cp < 0x11375) return true;
- return false;
- }
- if (cp < 0x114b0) {
- if (cp < 0x11435) return false;
- if (cp < 0x11438) return true;
- if (cp < 0x11438) return false;
- if (cp < 0x11440) return true;
- if (cp < 0x11440) return false;
- if (cp < 0x11442) return true;
- if (cp < 0x11442) return false;
- if (cp < 0x11445) return true;
- if (cp === 0x11445) return true;
- if (cp === 0x11446) return true;
- if (cp < 0x11450) return false;
- if (cp < 0x1145a) return true;
- if (cp === 0x1145e) return true;
- return false;
- }
- if (cp < 0x114b3) return true;
- if (cp < 0x114b3) return false;
- if (cp < 0x114b9) return true;
- if (cp === 0x114b9) return true;
- if (cp === 0x114ba) return true;
- if (cp < 0x114bb) return false;
- if (cp < 0x114bf) return true;
- if (cp < 0x114bf) return false;
- if (cp < 0x114c1) return true;
- if (cp === 0x114c1) return true;
- if (cp < 0x114c2) return false;
- if (cp < 0x114c4) return true;
- if (cp < 0x114d0) return false;
- if (cp < 0x114da) return true;
- return false;
- }
- if (cp < 0x116ae) {
- if (cp < 0x11633) {
- if (cp < 0x115af) return false;
- if (cp < 0x115b2) return true;
- if (cp < 0x115b2) return false;
- if (cp < 0x115b6) return true;
- if (cp < 0x115b8) return false;
- if (cp < 0x115bc) return true;
- if (cp < 0x115bc) return false;
- if (cp < 0x115be) return true;
- if (cp === 0x115be) return true;
- if (cp < 0x115bf) return false;
- if (cp < 0x115c1) return true;
- if (cp < 0x115dc) return false;
- if (cp < 0x115de) return true;
- if (cp < 0x11630) return false;
- if (cp < 0x11633) return true;
- return false;
- }
- if (cp < 0x1163b) return true;
- if (cp < 0x1163b) return false;
- if (cp < 0x1163d) return true;
- if (cp === 0x1163d) return true;
- if (cp === 0x1163e) return true;
- if (cp < 0x1163f) return false;
- if (cp < 0x11641) return true;
- if (cp < 0x11650) return false;
- if (cp < 0x1165a) return true;
- if (cp === 0x116ab) return true;
- if (cp === 0x116ac) return true;
- if (cp === 0x116ad) return true;
- return false;
- }
- if (cp < 0x11726) {
- if (cp < 0x116ae) return false;
- if (cp < 0x116b0) return true;
- if (cp < 0x116b0) return false;
- if (cp < 0x116b6) return true;
- if (cp === 0x116b6) return true;
- if (cp === 0x116b7) return true;
- if (cp < 0x116c0) return false;
- if (cp < 0x116ca) return true;
- if (cp < 0x1171d) return false;
- if (cp < 0x11720) return true;
- if (cp < 0x11720) return false;
- if (cp < 0x11722) return true;
- if (cp < 0x11722) return false;
- if (cp < 0x11726) return true;
- return false;
- }
- if (cp === 0x11726) return true;
- if (cp < 0x11727) return false;
- if (cp < 0x1172c) return true;
- if (cp < 0x11730) return false;
- if (cp < 0x1173a) return true;
- if (cp < 0x1182c) return false;
- if (cp < 0x1182f) return true;
- if (cp < 0x1182f) return false;
- if (cp < 0x11838) return true;
- if (cp === 0x11838) return true;
- if (cp < 0x11839) return false;
- if (cp < 0x1183b) return true;
- if (cp < 0x118e0) return false;
- if (cp < 0x118ea) return true;
- if (cp < 0x11a01) return false;
- if (cp < 0x11a0b) return true;
- return false;
- }
- if (cp < 0x11d97) {
- if (cp < 0x11ca9) {
- if (cp < 0x11a97) {
- if (cp < 0x11a33) return false;
- if (cp < 0x11a39) return true;
- if (cp === 0x11a39) return true;
- if (cp < 0x11a3b) return false;
- if (cp < 0x11a3f) return true;
- if (cp === 0x11a47) return true;
- if (cp < 0x11a51) return false;
- if (cp < 0x11a57) return true;
- if (cp < 0x11a57) return false;
- if (cp < 0x11a59) return true;
- if (cp < 0x11a59) return false;
- if (cp < 0x11a5c) return true;
- if (cp < 0x11a8a) return false;
- if (cp < 0x11a97) return true;
- return false;
- }
- if (cp === 0x11a97) return true;
- if (cp < 0x11a98) return false;
- if (cp < 0x11a9a) return true;
- if (cp === 0x11c2f) return true;
- if (cp < 0x11c30) return false;
- if (cp < 0x11c37) return true;
- if (cp < 0x11c38) return false;
- if (cp < 0x11c3e) return true;
- if (cp === 0x11c3e) return true;
- if (cp === 0x11c3f) return true;
- if (cp < 0x11c50) return false;
- if (cp < 0x11c5a) return true;
- if (cp < 0x11c92) return false;
- if (cp < 0x11ca8) return true;
- return false;
- }
- if (cp < 0x11d3c) {
- if (cp === 0x11ca9) return true;
- if (cp < 0x11caa) return false;
- if (cp < 0x11cb1) return true;
- if (cp === 0x11cb1) return true;
- if (cp < 0x11cb2) return false;
- if (cp < 0x11cb4) return true;
- if (cp === 0x11cb4) return true;
- if (cp < 0x11cb5) return false;
- if (cp < 0x11cb7) return true;
- if (cp < 0x11d31) return false;
- if (cp < 0x11d37) return true;
- if (cp === 0x11d3a) return true;
- return false;
- }
- if (cp < 0x11d3e) return true;
- if (cp < 0x11d3f) return false;
- if (cp < 0x11d46) return true;
- if (cp === 0x11d47) return true;
- if (cp < 0x11d50) return false;
- if (cp < 0x11d5a) return true;
- if (cp < 0x11d8a) return false;
- if (cp < 0x11d8f) return true;
- if (cp < 0x11d90) return false;
- if (cp < 0x11d92) return true;
- if (cp < 0x11d93) return false;
- if (cp < 0x11d95) return true;
- if (cp === 0x11d95) return true;
- if (cp === 0x11d96) return true;
- return false;
- }
- if (cp < 0x1d242) {
- if (cp < 0x16f51) {
- if (cp === 0x11d97) return true;
- if (cp < 0x11da0) return false;
- if (cp < 0x11daa) return true;
- if (cp < 0x11ef3) return false;
- if (cp < 0x11ef5) return true;
- if (cp < 0x11ef5) return false;
- if (cp < 0x11ef7) return true;
- if (cp < 0x16a60) return false;
- if (cp < 0x16a6a) return true;
- if (cp < 0x16af0) return false;
- if (cp < 0x16af5) return true;
- if (cp < 0x16b30) return false;
- if (cp < 0x16b37) return true;
- if (cp < 0x16b50) return false;
- if (cp < 0x16b5a) return true;
- return false;
- }
- if (cp < 0x16f7f) return true;
- if (cp < 0x16f8f) return false;
- if (cp < 0x16f93) return true;
- if (cp < 0x1bc9d) return false;
- if (cp < 0x1bc9f) return true;
- if (cp < 0x1d165) return false;
- if (cp < 0x1d167) return true;
- if (cp < 0x1d167) return false;
- if (cp < 0x1d16a) return true;
- if (cp < 0x1d16d) return false;
- if (cp < 0x1d173) return true;
- if (cp < 0x1d17b) return false;
- if (cp < 0x1d183) return true;
- if (cp < 0x1d185) return false;
- if (cp < 0x1d18c) return true;
- if (cp < 0x1d1aa) return false;
- if (cp < 0x1d1ae) return true;
- return false;
- }
- if (cp < 0x1e000) {
- if (cp < 0x1d242) return false;
- if (cp < 0x1d245) return true;
- if (cp < 0x1d7ce) return false;
- if (cp < 0x1d800) return true;
- if (cp < 0x1da00) return false;
- if (cp < 0x1da37) return true;
- if (cp < 0x1da3b) return false;
- if (cp < 0x1da6d) return true;
- if (cp === 0x1da75) return true;
- if (cp === 0x1da84) return true;
- if (cp < 0x1da9b) return false;
- if (cp < 0x1daa0) return true;
- if (cp < 0x1daa1) return false;
- if (cp < 0x1dab0) return true;
- return false;
- }
- if (cp < 0x1e007) return true;
- if (cp < 0x1e008) return false;
- if (cp < 0x1e019) return true;
- if (cp < 0x1e01b) return false;
- if (cp < 0x1e022) return true;
- if (cp < 0x1e023) return false;
- if (cp < 0x1e025) return true;
- if (cp < 0x1e026) return false;
- if (cp < 0x1e02b) return true;
- if (cp < 0x1e8d0) return false;
- if (cp < 0x1e8d7) return true;
- if (cp < 0x1e944) return false;
- if (cp < 0x1e94b) return true;
- if (cp < 0x1e950) return false;
- if (cp < 0x1e95a) return true;
- if (cp < 0xe0100) return false;
- if (cp < 0xe01f0) return true;
- return false;
-}
-
-var PropertyData = {
- $LONE: new Set(["ASCII", "ASCII_Hex_Digit", "AHex", "Alphabetic", "Alpha", "Any", "Assigned", "Bidi_Control", "Bidi_C", "Bidi_Mirrored", "Bidi_M", "Case_Ignorable", "CI", "Cased", "Changes_When_Casefolded", "CWCF", "Changes_When_Casemapped", "CWCM", "Changes_When_Lowercased", "CWL", "Changes_When_NFKC_Casefolded", "CWKCF", "Changes_When_Titlecased", "CWT", "Changes_When_Uppercased", "CWU", "Dash", "Default_Ignorable_Code_Point", "DI", "Deprecated", "Dep", "Diacritic", "Dia", "Emoji", "Emoji_Component", "Emoji_Modifier", "Emoji_Modifier_Base", "Emoji_Presentation", "Extender", "Ext", "Grapheme_Base", "Gr_Base", "Grapheme_Extend", "Gr_Ext", "Hex_Digit", "Hex", "IDS_Binary_Operator", "IDSB", "IDS_Trinary_Operator", "IDST", "ID_Continue", "IDC", "ID_Start", "IDS", "Ideographic", "Ideo", "Join_Control", "Join_C", "Logical_Order_Exception", "LOE", "Lowercase", "Lower", "Math", "Noncharacter_Code_Point", "NChar", "Pattern_Syntax", "Pat_Syn", "Pattern_White_Space", "Pat_WS", "Quotation_Mark", "QMark", "Radical", "Regional_Indicator", "RI", "Sentence_Terminal", "STerm", "Soft_Dotted", "SD", "Terminal_Punctuation", "Term", "Unified_Ideograph", "UIdeo", "Uppercase", "Upper", "Variation_Selector", "VS", "White_Space", "space", "XID_Continue", "XIDC", "XID_Start", "XIDS"]),
- General_Category: new Set(["Cased_Letter", "LC", "Close_Punctuation", "Pe", "Connector_Punctuation", "Pc", "Control", "Cc", "cntrl", "Currency_Symbol", "Sc", "Dash_Punctuation", "Pd", "Decimal_Number", "Nd", "digit", "Enclosing_Mark", "Me", "Final_Punctuation", "Pf", "Format", "Cf", "Initial_Punctuation", "Pi", "Letter", "L", "Letter_Number", "Nl", "Line_Separator", "Zl", "Lowercase_Letter", "Ll", "Mark", "M", "Combining_Mark", "Math_Symbol", "Sm", "Modifier_Letter", "Lm", "Modifier_Symbol", "Sk", "Nonspacing_Mark", "Mn", "Number", "N", "Open_Punctuation", "Ps", "Other", "C", "Other_Letter", "Lo", "Other_Number", "No", "Other_Punctuation", "Po", "Other_Symbol", "So", "Paragraph_Separator", "Zp", "Private_Use", "Co", "Punctuation", "P", "punct", "Separator", "Z", "Space_Separator", "Zs", "Spacing_Mark", "Mc", "Surrogate", "Cs", "Symbol", "S", "Titlecase_Letter", "Lt", "Unassigned", "Cn", "Uppercase_Letter", "Lu"]),
- Script: new Set(["Adlam", "Adlm", "Ahom", "Anatolian_Hieroglyphs", "Hluw", "Arabic", "Arab", "Armenian", "Armn", "Avestan", "Avst", "Balinese", "Bali", "Bamum", "Bamu", "Bassa_Vah", "Bass", "Batak", "Batk", "Bengali", "Beng", "Bhaiksuki", "Bhks", "Bopomofo", "Bopo", "Brahmi", "Brah", "Braille", "Brai", "Buginese", "Bugi", "Buhid", "Buhd", "Canadian_Aboriginal", "Cans", "Carian", "Cari", "Caucasian_Albanian", "Aghb", "Chakma", "Cakm", "Cham", "Cherokee", "Cher", "Common", "Zyyy", "Coptic", "Copt", "Qaac", "Cuneiform", "Xsux", "Cypriot", "Cprt", "Cyrillic", "Cyrl", "Deseret", "Dsrt", "Devanagari", "Deva", "Duployan", "Dupl", "Egyptian_Hieroglyphs", "Egyp", "Elbasan", "Elba", "Ethiopic", "Ethi", "Georgian", "Geor", "Glagolitic", "Glag", "Gothic", "Goth", "Grantha", "Gran", "Greek", "Grek", "Gujarati", "Gujr", "Gurmukhi", "Guru", "Han", "Hani", "Hangul", "Hang", "Hanunoo", "Hano", "Hatran", "Hatr", "Hebrew", "Hebr", "Hiragana", "Hira", "Imperial_Aramaic", "Armi", "Inherited", "Zinh", "Qaai", "Inscriptional_Pahlavi", "Phli", "Inscriptional_Parthian", "Prti", "Javanese", "Java", "Kaithi", "Kthi", "Kannada", "Knda", "Katakana", "Kana", "Kayah_Li", "Kali", "Kharoshthi", "Khar", "Khmer", "Khmr", "Khojki", "Khoj", "Khudawadi", "Sind", "Lao", "Laoo", "Latin", "Latn", "Lepcha", "Lepc", "Limbu", "Limb", "Linear_A", "Lina", "Linear_B", "Linb", "Lisu", "Lycian", "Lyci", "Lydian", "Lydi", "Mahajani", "Mahj", "Malayalam", "Mlym", "Mandaic", "Mand", "Manichaean", "Mani", "Marchen", "Marc", "Masaram_Gondi", "Gonm", "Meetei_Mayek", "Mtei", "Mende_Kikakui", "Mend", "Meroitic_Cursive", "Merc", "Meroitic_Hieroglyphs", "Mero", "Miao", "Plrd", "Modi", "Mongolian", "Mong", "Mro", "Mroo", "Multani", "Mult", "Myanmar", "Mymr", "Nabataean", "Nbat", "New_Tai_Lue", "Talu", "Newa", "Nko", "Nkoo", "Nushu", "Nshu", "Ogham", "Ogam", "Ol_Chiki", "Olck", "Old_Hungarian", "Hung", "Old_Italic", "Ital", "Old_North_Arabian", "Narb", "Old_Permic", "Perm", "Old_Persian", "Xpeo", "Old_South_Arabian", "Sarb", "Old_Turkic", "Orkh", "Oriya", "Orya", "Osage", "Osge", "Osmanya", "Osma", "Pahawh_Hmong", "Hmng", "Palmyrene", "Palm", "Pau_Cin_Hau", "Pauc", "Phags_Pa", "Phag", "Phoenician", "Phnx", "Psalter_Pahlavi", "Phlp", "Rejang", "Rjng", "Runic", "Runr", "Samaritan", "Samr", "Saurashtra", "Saur", "Sharada", "Shrd", "Shavian", "Shaw", "Siddham", "Sidd", "SignWriting", "Sgnw", "Sinhala", "Sinh", "Sora_Sompeng", "Sora", "Soyombo", "Soyo", "Sundanese", "Sund", "Syloti_Nagri", "Sylo", "Syriac", "Syrc", "Tagalog", "Tglg", "Tagbanwa", "Tagb", "Tai_Le", "Tale", "Tai_Tham", "Lana", "Tai_Viet", "Tavt", "Takri", "Takr", "Tamil", "Taml", "Tangut", "Tang", "Telugu", "Telu", "Thaana", "Thaa", "Thai", "Tibetan", "Tibt", "Tifinagh", "Tfng", "Tirhuta", "Tirh", "Ugaritic", "Ugar", "Vai", "Vaii", "Warang_Citi", "Wara", "Yi", "Yiii", "Zanabazar_Square", "Zanb"])
-};
-PropertyData.gc = PropertyData.General_Category;
-PropertyData.sc = PropertyData.Script_Extensions = PropertyData.scx = PropertyData.Script;
-
-var Backspace = 0x08;
-var CharacterTabulation = 0x09;
-var LineFeed = 0x0a;
-var LineTabulation = 0x0b;
-var FormFeed = 0x0c;
-var CarriageReturn = 0x0d;
-var ExclamationMark = 0x21;
-var DollarSign = 0x24;
-var LeftParenthesis = 0x28;
-var RightParenthesis = 0x29;
-var Asterisk = 0x2a;
-var PlusSign = 0x2b;
-var Comma = 0x2c;
-var HyphenMinus = 0x2d;
-var FullStop = 0x2e;
-var Solidus = 0x2f;
-var DigitZero = 0x30;
-var DigitOne = 0x31;
-var DigitSeven = 0x37;
-var DigitNine = 0x39;
-var Colon = 0x3a;
-var LessThanSign = 0x3c;
-var EqualsSign = 0x3d;
-var GreaterThanSign = 0x3e;
-var QuestionMark = 0x3f;
-var LatinCapitalLetterA = 0x41;
-var LatinCapitalLetterB = 0x42;
-var LatinCapitalLetterD = 0x44;
-var LatinCapitalLetterF = 0x46;
-var LatinCapitalLetterP = 0x50;
-var LatinCapitalLetterS = 0x53;
-var LatinCapitalLetterW = 0x57;
-var LatinCapitalLetterZ = 0x5a;
-var LowLine = 0x5f;
-var LatinSmallLetterA = 0x61;
-var LatinSmallLetterB = 0x62;
-var LatinSmallLetterC = 0x63;
-var LatinSmallLetterD = 0x64;
-var LatinSmallLetterF = 0x66;
-var LatinSmallLetterG = 0x67;
-var LatinSmallLetterI = 0x69;
-var LatinSmallLetterK = 0x6b;
-var LatinSmallLetterM = 0x6d;
-var LatinSmallLetterN = 0x6e;
-var LatinSmallLetterP = 0x70;
-var LatinSmallLetterR = 0x72;
-var LatinSmallLetterS = 0x73;
-var LatinSmallLetterT = 0x74;
-var LatinSmallLetterU = 0x75;
-var LatinSmallLetterV = 0x76;
-var LatinSmallLetterW = 0x77;
-var LatinSmallLetterX = 0x78;
-var LatinSmallLetterY = 0x79;
-var LatinSmallLetterZ = 0x7a;
-var LeftSquareBracket = 0x5b;
-var ReverseSolidus = 0x5c;
-var RightSquareBracket = 0x5d;
-var CircumflexAccent = 0x5e;
-var LeftCurlyBracket = 0x7b;
-var VerticalLine = 0x7c;
-var RightCurlyBracket = 0x7d;
-var ZeroWidthNonJoiner = 0x200c;
-var ZeroWidthJoiner = 0x200d;
-var LineSeparator = 0x2028;
-var ParagraphSeparator = 0x2029;
-var MinCodePoint = 0x00;
-var MaxCodePoint = 0x10ffff;
-function isLatinLetter(code) {
- return code >= LatinCapitalLetterA && code <= LatinCapitalLetterZ || code >= LatinSmallLetterA && code <= LatinSmallLetterZ;
-}
-function isDecimalDigit(code) {
- return code >= DigitZero && code <= DigitNine;
-}
-function isOctalDigit(code) {
- return code >= DigitZero && code <= DigitSeven;
-}
-function isHexDigit(code) {
- return code >= DigitZero && code <= DigitNine || code >= LatinCapitalLetterA && code <= LatinCapitalLetterF || code >= LatinSmallLetterA && code <= LatinSmallLetterF;
-}
-function isLineTerminator(code) {
- return code === LineFeed || code === CarriageReturn || code === LineSeparator || code === ParagraphSeparator;
-}
-function isValidUnicode(code) {
- return code >= MinCodePoint && code <= MaxCodePoint;
-}
-function digitToInt(code) {
- if (code >= LatinSmallLetterA && code <= LatinSmallLetterF) {
- return code - LatinSmallLetterA + 10;
- }
- if (code >= LatinCapitalLetterA && code <= LatinCapitalLetterF) {
- return code - LatinCapitalLetterA + 10;
- }
- return code - DigitZero;
-}
-
-var legacyImpl = {
- at: function at(s, end, i) {
- return i < end ? s.charCodeAt(i) : -1;
- },
- width: function width(c) {
- return 1;
- }
-};
-var unicodeImpl = {
- at: function at(s, end, i) {
- return i < end ? s.codePointAt(i) : -1;
- },
- width: function width(c) {
- return c > 0xffff ? 2 : 1;
- }
-};
-
-var Reader = function () {
- function Reader() {
- _classCallCheck(this, Reader);
-
- this._impl = legacyImpl;
- this._s = "";
- this._i = 0;
- this._end = 0;
- this._cp1 = -1;
- this._w1 = 1;
- this._cp2 = -1;
- this._w2 = 1;
- this._cp3 = -1;
- this._w3 = 1;
- this._cp4 = -1;
- }
-
- _createClass(Reader, [{
- key: 'reset',
- value: function reset(source, start, end, uFlag) {
- this._impl = uFlag ? unicodeImpl : legacyImpl;
- this._s = source;
- this._end = end;
- this.rewind(start);
- }
- }, {
- key: 'rewind',
- value: function rewind(index) {
- var impl = this._impl;
- this._i = index;
- this._cp1 = impl.at(this._s, this._end, index);
- this._w1 = impl.width(this._cp1);
- this._cp2 = impl.at(this._s, this._end, index + this._w1);
- this._w2 = impl.width(this._cp2);
- this._cp3 = impl.at(this._s, this._end, index + this._w1 + this._w2);
- this._w3 = impl.width(this._cp3);
- this._cp4 = impl.at(this._s, this._end, index + this._w1 + this._w2 + this._w3);
- }
- }, {
- key: 'advance',
- value: function advance() {
- if (this._cp1 !== -1) {
- var impl = this._impl;
- this._i += this._w1;
- this._cp1 = this._cp2;
- this._w1 = this._w2;
- this._cp2 = this._cp3;
- this._w2 = impl.width(this._cp2);
- this._cp3 = this._cp4;
- this._w3 = impl.width(this._cp3);
- this._cp4 = impl.at(this._s, this._end, this._i + this._w1 + this._w2 + this._w3);
- }
- }
- }, {
- key: 'eat',
- value: function eat(cp) {
- if (this._cp1 === cp) {
- this.advance();
- return true;
- }
- return false;
- }
- }, {
- key: 'eat2',
- value: function eat2(cp1, cp2) {
- if (this._cp1 === cp1 && this._cp2 === cp2) {
- this.advance();
- this.advance();
- return true;
- }
- return false;
- }
- }, {
- key: 'eat3',
- value: function eat3(cp1, cp2, cp3) {
- if (this._cp1 === cp1 && this._cp2 === cp2 && this._cp3 === cp3) {
- this.advance();
- this.advance();
- this.advance();
- return true;
- }
- return false;
- }
- }, {
- key: 'source',
- get: function get() {
- return this._s;
- }
- }, {
- key: 'index',
- get: function get() {
- return this._i;
- }
- }, {
- key: 'currentCodePoint',
- get: function get() {
- return this._cp1;
- }
- }, {
- key: 'nextCodePoint',
- get: function get() {
- return this._cp2;
- }
- }, {
- key: 'nextCodePoint2',
- get: function get() {
- return this._cp3;
- }
- }, {
- key: 'nextCodePoint3',
- get: function get() {
- return this._cp4;
- }
- }]);
-
- return Reader;
-}();
-
-var RegExpSyntaxError = function (_SyntaxError) {
- _inherits(RegExpSyntaxError, _SyntaxError);
-
- function RegExpSyntaxError(source, uFlag, index, message) {
- _classCallCheck(this, RegExpSyntaxError);
-
- if (source) {
- if (source[0] !== "/") {
- source = '/' + source + '/' + (uFlag ? "u" : "");
- }
- source = ': ' + source;
- }
-
- var _this = _possibleConstructorReturn(this, (RegExpSyntaxError.__proto__ || Object.getPrototypeOf(RegExpSyntaxError)).call(this, 'Invalid regular expression' + source + ': ' + message));
-
- _this.index = index;
- return _this;
- }
-
- return RegExpSyntaxError;
-}(SyntaxError);
-
-function isSyntaxCharacter(cp) {
- return cp === CircumflexAccent || cp === DollarSign || cp === ReverseSolidus || cp === FullStop || cp === Asterisk || cp === PlusSign || cp === QuestionMark || cp === LeftParenthesis || cp === RightParenthesis || cp === LeftSquareBracket || cp === RightSquareBracket || cp === LeftCurlyBracket || cp === RightCurlyBracket || cp === VerticalLine;
-}
-function isRegExpIdentifierStart(cp) {
- return isIdStart(cp) || cp === DollarSign || cp === LowLine;
-}
-function isRegExpIdentifierPart(cp) {
- return isIdContinue(cp) || cp === DollarSign || cp === LowLine || cp === ZeroWidthNonJoiner || cp === ZeroWidthJoiner;
-}
-function isUnicodePropertyNameCharacter(cp) {
- return isLatinLetter(cp) || cp === LowLine;
-}
-function isUnicodePropertyValueCharacter(cp) {
- return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp);
-}
-function isValidUnicodeProperty(name, value) {
- return PropertyData.hasOwnProperty(name) && PropertyData[name].has(value);
-}
-function isValidUnicodePropertyName(name) {
- return PropertyData.$LONE.has(name);
-}
-
-var RegExpValidator = function () {
- function RegExpValidator(options) {
- _classCallCheck(this, RegExpValidator);
-
- this._reader = new Reader();
- this._uFlag = false;
- this._nFlag = false;
- this._lastIntValue = 0;
- this._lastMinValue = 0;
- this._lastMaxValue = 0;
- this._lastStrValue = "";
- this._lastKeyValue = "";
- this._lastValValue = "";
- this._lastAssertionIsQuantifiable = false;
- this._numCapturingParens = 0;
- this._groupNames = new Set();
- this._backreferenceNames = new Set();
- this._options = options || {};
- }
-
- _createClass(RegExpValidator, [{
- key: 'validateLiteral',
- value: function validateLiteral(source) {
- var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
- var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : source.length;
-
- this._uFlag = this._nFlag = false;
- this.reset(source, start, end);
- this.onLiteralEnter(start);
- if (this.eat(Solidus) && this.eatRegExpBody() && this.eat(Solidus)) {
- var flagStart = this.index;
- var uFlag = source.indexOf("u", flagStart) !== -1;
- this.validateFlags(source, flagStart, end);
- this.validatePattern(source, start + 1, flagStart - 1, uFlag);
- } else if (start >= end) {
- this.raise("Empty");
- } else {
- var c = String.fromCodePoint(this.currentCodePoint);
- this.raise('Unexpected character \'' + c + '\'');
- }
- this.onLiteralLeave(start, end);
- }
- }, {
- key: 'validateFlags',
- value: function validateFlags(source) {
- var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
- var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : source.length;
-
- var existingFlags = new Set();
- var global = false;
- var ignoreCase = false;
- var multiline = false;
- var sticky = false;
- var unicode = false;
- var dotAll = false;
- for (var i = start; i < end; ++i) {
- var flag = source.charCodeAt(i);
- if (existingFlags.has(flag)) {
- this.raise('Duplicated flag \'' + source[i] + '\'');
- }
- existingFlags.add(flag);
- if (flag === LatinSmallLetterG) {
- global = true;
- } else if (flag === LatinSmallLetterI) {
- ignoreCase = true;
- } else if (flag === LatinSmallLetterM) {
- multiline = true;
- } else if (flag === LatinSmallLetterU && this.ecmaVersion >= 2015) {
- unicode = true;
- } else if (flag === LatinSmallLetterY && this.ecmaVersion >= 2015) {
- sticky = true;
- } else if (flag === LatinSmallLetterS && this.ecmaVersion >= 2018) {
- dotAll = true;
- } else {
- this.raise('Invalid flag \'' + source[i] + '\'');
- }
- }
- this.onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll);
- }
- }, {
- key: 'validatePattern',
- value: function validatePattern(source) {
- var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
- var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : source.length;
- var uFlag = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
-
- this._uFlag = uFlag && this.ecmaVersion >= 2015;
- this._nFlag = uFlag && this.ecmaVersion >= 2018;
- this.reset(source, start, end);
- this.pattern();
- if (!this._nFlag && this.ecmaVersion >= 2018 && this._groupNames.size > 0) {
- this._nFlag = true;
- this.rewind(start);
- this.pattern();
- }
- }
- }, {
- key: 'onLiteralEnter',
- value: function onLiteralEnter(start) {
- if (this._options.onLiteralEnter) {
- this._options.onLiteralEnter(start);
- }
- }
- }, {
- key: 'onLiteralLeave',
- value: function onLiteralLeave(start, end) {
- if (this._options.onLiteralLeave) {
- this._options.onLiteralLeave(start, end);
- }
- }
- }, {
- key: 'onFlags',
- value: function onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll) {
- if (this._options.onFlags) {
- this._options.onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll);
- }
- }
- }, {
- key: 'onPatternEnter',
- value: function onPatternEnter(start) {
- if (this._options.onPatternEnter) {
- this._options.onPatternEnter(start);
- }
- }
- }, {
- key: 'onPatternLeave',
- value: function onPatternLeave(start, end) {
- if (this._options.onPatternLeave) {
- this._options.onPatternLeave(start, end);
- }
- }
- }, {
- key: 'onDisjunctionEnter',
- value: function onDisjunctionEnter(start) {
- if (this._options.onDisjunctionEnter) {
- this._options.onDisjunctionEnter(start);
- }
- }
- }, {
- key: 'onDisjunctionLeave',
- value: function onDisjunctionLeave(start, end) {
- if (this._options.onDisjunctionLeave) {
- this._options.onDisjunctionLeave(start, end);
- }
- }
- }, {
- key: 'onAlternativeEnter',
- value: function onAlternativeEnter(start, index) {
- if (this._options.onAlternativeEnter) {
- this._options.onAlternativeEnter(start, index);
- }
- }
- }, {
- key: 'onAlternativeLeave',
- value: function onAlternativeLeave(start, end, index) {
- if (this._options.onAlternativeLeave) {
- this._options.onAlternativeLeave(start, end, index);
- }
- }
- }, {
- key: 'onGroupEnter',
- value: function onGroupEnter(start) {
- if (this._options.onGroupEnter) {
- this._options.onGroupEnter(start);
- }
- }
- }, {
- key: 'onGroupLeave',
- value: function onGroupLeave(start, end) {
- if (this._options.onGroupLeave) {
- this._options.onGroupLeave(start, end);
- }
- }
- }, {
- key: 'onCapturingGroupEnter',
- value: function onCapturingGroupEnter(start, name) {
- if (this._options.onCapturingGroupEnter) {
- this._options.onCapturingGroupEnter(start, name);
- }
- }
- }, {
- key: 'onCapturingGroupLeave',
- value: function onCapturingGroupLeave(start, end, name) {
- if (this._options.onCapturingGroupLeave) {
- this._options.onCapturingGroupLeave(start, end, name);
- }
- }
- }, {
- key: 'onQuantifier',
- value: function onQuantifier(start, end, min, max, greedy) {
- if (this._options.onQuantifier) {
- this._options.onQuantifier(start, end, min, max, greedy);
- }
- }
- }, {
- key: 'onLookaroundAssertionEnter',
- value: function onLookaroundAssertionEnter(start, kind, negate) {
- if (this._options.onLookaroundAssertionEnter) {
- this._options.onLookaroundAssertionEnter(start, kind, negate);
- }
- }
- }, {
- key: 'onLookaroundAssertionLeave',
- value: function onLookaroundAssertionLeave(start, end, kind, negate) {
- if (this._options.onLookaroundAssertionLeave) {
- this._options.onLookaroundAssertionLeave(start, end, kind, negate);
- }
- }
- }, {
- key: 'onEdgeAssertion',
- value: function onEdgeAssertion(start, end, kind) {
- if (this._options.onEdgeAssertion) {
- this._options.onEdgeAssertion(start, end, kind);
- }
- }
- }, {
- key: 'onWordBoundaryAssertion',
- value: function onWordBoundaryAssertion(start, end, kind, negate) {
- if (this._options.onWordBoundaryAssertion) {
- this._options.onWordBoundaryAssertion(start, end, kind, negate);
- }
- }
- }, {
- key: 'onAnyCharacterSet',
- value: function onAnyCharacterSet(start, end, kind) {
- if (this._options.onAnyCharacterSet) {
- this._options.onAnyCharacterSet(start, end, kind);
- }
- }
- }, {
- key: 'onEscapeCharacterSet',
- value: function onEscapeCharacterSet(start, end, kind, negate) {
- if (this._options.onEscapeCharacterSet) {
- this._options.onEscapeCharacterSet(start, end, kind, negate);
- }
- }
- }, {
- key: 'onUnicodePropertyCharacterSet',
- value: function onUnicodePropertyCharacterSet(start, end, kind, key, value, negate) {
- if (this._options.onUnicodePropertyCharacterSet) {
- this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate);
- }
- }
- }, {
- key: 'onCharacter',
- value: function onCharacter(start, end, value) {
- if (this._options.onCharacter) {
- this._options.onCharacter(start, end, value);
- }
- }
- }, {
- key: 'onBackreference',
- value: function onBackreference(start, end, ref) {
- if (this._options.onBackreference) {
- this._options.onBackreference(start, end, ref);
- }
- }
- }, {
- key: 'onCharacterClassEnter',
- value: function onCharacterClassEnter(start, negate) {
- if (this._options.onCharacterClassEnter) {
- this._options.onCharacterClassEnter(start, negate);
- }
- }
- }, {
- key: 'onCharacterClassLeave',
- value: function onCharacterClassLeave(start, end, negate) {
- if (this._options.onCharacterClassLeave) {
- this._options.onCharacterClassLeave(start, end, negate);
- }
- }
- }, {
- key: 'onCharacterClassRange',
- value: function onCharacterClassRange(start, end, min, max) {
- if (this._options.onCharacterClassRange) {
- this._options.onCharacterClassRange(start, end, min, max);
- }
- }
- }, {
- key: 'reset',
- value: function reset(source, start, end) {
- this._reader.reset(source, start, end, this._uFlag);
- }
- }, {
- key: 'rewind',
- value: function rewind(index) {
- this._reader.rewind(index);
- }
- }, {
- key: 'advance',
- value: function advance() {
- this._reader.advance();
- }
- }, {
- key: 'eat',
- value: function eat(cp) {
- return this._reader.eat(cp);
- }
- }, {
- key: 'eat2',
- value: function eat2(cp1, cp2) {
- return this._reader.eat2(cp1, cp2);
- }
- }, {
- key: 'eat3',
- value: function eat3(cp1, cp2, cp3) {
- return this._reader.eat3(cp1, cp2, cp3);
- }
- }, {
- key: 'raise',
- value: function raise(message) {
- throw new RegExpSyntaxError(this.source, this._uFlag, this.index, message);
- }
- }, {
- key: 'eatRegExpBody',
- value: function eatRegExpBody() {
- var start = this.index;
- var inClass = false;
- var escaped = false;
- for (;;) {
- var cp = this.currentCodePoint;
- if (cp === -1 || isLineTerminator(cp)) {
- var kind = inClass ? "character class" : "regular expression";
- this.raise('Unterminated ' + kind);
- }
- if (escaped) {
- escaped = false;
- } else if (cp === ReverseSolidus) {
- escaped = true;
- } else if (cp === LeftSquareBracket) {
- inClass = true;
- } else if (cp === RightSquareBracket) {
- inClass = false;
- } else if (cp === Solidus && !inClass || cp === Asterisk && this.index === start) {
- break;
- }
- this.advance();
- }
- return this.index !== start;
- }
- }, {
- key: 'pattern',
- value: function pattern() {
- var start = this.index;
- this._numCapturingParens = this.countCapturingParens();
- this._groupNames.clear();
- this._backreferenceNames.clear();
- this.onPatternEnter(start);
- this.disjunction();
- var cp = this.currentCodePoint;
- if (this.currentCodePoint !== -1) {
- if (cp === RightParenthesis) {
- this.raise("Unmatched ')'");
- }
- if (cp === ReverseSolidus) {
- this.raise("\\ at end of pattern");
- }
- if (cp === RightSquareBracket || cp === RightCurlyBracket) {
- this.raise("Lone quantifier brackets");
- }
- var c = String.fromCodePoint(cp);
- this.raise('Unexpected character \'' + c + '\'');
- }
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = this._backreferenceNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var name = _step.value;
-
- if (!this._groupNames.has(name)) {
- this.raise("Invalid named capture referenced");
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
- }
-
- this.onPatternLeave(start, this.index);
- }
- }, {
- key: 'countCapturingParens',
- value: function countCapturingParens() {
- var start = this.index;
- var inClass = false;
- var escaped = false;
- var count = 0;
- var cp = 0;
- while ((cp = this.currentCodePoint) !== -1) {
- if (escaped) {
- escaped = false;
- } else if (cp === ReverseSolidus) {
- escaped = true;
- } else if (cp === LeftSquareBracket) {
- inClass = true;
- } else if (cp === RightSquareBracket) {
- inClass = false;
- } else if (cp === LeftParenthesis && !inClass && (this.nextCodePoint !== QuestionMark || this.nextCodePoint2 === LessThanSign && this.nextCodePoint3 !== EqualsSign && this.nextCodePoint3 !== ExclamationMark)) {
- count += 1;
- }
- this.advance();
- }
- this.rewind(start);
- return count;
- }
- }, {
- key: 'disjunction',
- value: function disjunction() {
- var start = this.index;
- var i = 0;
- this.onDisjunctionEnter(start);
- this.alternative(i++);
- while (this.eat(VerticalLine)) {
- this.alternative(i++);
- }
- if (this.eatQuantifier(true)) {
- this.raise("Nothing to repeat");
- }
- if (this.eat(LeftCurlyBracket)) {
- this.raise("Lone quantifier brackets");
- }
- this.onDisjunctionLeave(start, this.index);
- }
- }, {
- key: 'alternative',
- value: function alternative(i) {
- var start = this.index;
- this.onAlternativeEnter(start, i);
- while (this.currentCodePoint !== -1 && this.eatTerm()) {}
- this.onAlternativeLeave(start, this.index, i);
- }
- }, {
- key: 'eatTerm',
- value: function eatTerm() {
- if (this.eatAssertion()) {
- if (this._lastAssertionIsQuantifiable) {
- this.eatQuantifier();
- }
- return true;
- }
- if (this.strict ? this.eatAtom() : this.eatExtendedAtom()) {
- this.eatQuantifier();
- return true;
- }
- return false;
- }
- }, {
- key: 'eatAssertion',
- value: function eatAssertion() {
- var start = this.index;
- this._lastAssertionIsQuantifiable = false;
- if (this.eat(CircumflexAccent)) {
- this.onEdgeAssertion(start, this.index, "start");
- return true;
- }
- if (this.eat(DollarSign)) {
- this.onEdgeAssertion(start, this.index, "end");
- return true;
- }
- if (this.eat2(ReverseSolidus, LatinCapitalLetterB)) {
- this.onWordBoundaryAssertion(start, this.index, "word", true);
- return true;
- }
- if (this.eat2(ReverseSolidus, LatinSmallLetterB)) {
- this.onWordBoundaryAssertion(start, this.index, "word", false);
- return true;
- }
- if (this.eat2(LeftParenthesis, QuestionMark)) {
- var lookbehind = this.ecmaVersion >= 2018 && this.eat(LessThanSign);
- var negate = false;
- if (this.eat(EqualsSign) || (negate = this.eat(ExclamationMark))) {
- var kind = lookbehind ? "lookbehind" : "lookahead";
- this.onLookaroundAssertionEnter(start, kind, negate);
- this.disjunction();
- if (!this.eat(RightParenthesis)) {
- this.raise("Unterminated group");
- }
- this._lastAssertionIsQuantifiable = !lookbehind && !this.strict;
- this.onLookaroundAssertionLeave(start, this.index, kind, negate);
- return true;
- }
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatQuantifier',
- value: function eatQuantifier() {
- var noError = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
-
- var start = this.index;
- var min = 0;
- var max = 0;
- var greedy = false;
- if (this.eat(Asterisk)) {
- min = 0;
- max = Number.POSITIVE_INFINITY;
- } else if (this.eat(PlusSign)) {
- min = 1;
- max = Number.POSITIVE_INFINITY;
- } else if (this.eat(QuestionMark)) {
- min = 0;
- max = 1;
- } else if (this.eatBracedQuantifier(noError)) {
- min = this._lastMinValue;
- max = this._lastMaxValue;
- } else {
- return false;
- }
- greedy = !this.eat(QuestionMark);
- if (!noError) {
- this.onQuantifier(start, this.index, min, max, greedy);
- }
- return true;
- }
- }, {
- key: 'eatBracedQuantifier',
- value: function eatBracedQuantifier(noError) {
- var start = this.index;
- if (this.eat(LeftCurlyBracket)) {
- this._lastMinValue = 0;
- this._lastMaxValue = Number.POSITIVE_INFINITY;
- if (this.eatDecimalDigits()) {
- this._lastMinValue = this._lastMaxValue = this._lastIntValue;
- if (this.eat(Comma)) {
- this._lastMaxValue = this.eatDecimalDigits() ? this._lastIntValue : Number.POSITIVE_INFINITY;
- }
- if (this.eat(RightCurlyBracket)) {
- if (!noError && this._lastMaxValue < this._lastMinValue) {
- this.raise("numbers out of order in {} quantifier");
- }
- return true;
- }
- }
- if (!noError && this.strict) {
- this.raise("Incomplete quantifier");
- }
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatAtom',
- value: function eatAtom() {
- return this.eatPatternCharacter() || this.eatDot() || this.eatReverseSolidusAtomEscape() || this.eatCharacterClass() || this.eatUncapturingGroup() || this.eatCapturingGroup();
- }
- }, {
- key: 'eatDot',
- value: function eatDot() {
- if (this.eat(FullStop)) {
- this.onAnyCharacterSet(this.index - 1, this.index, "any");
- return true;
- }
- return false;
- }
- }, {
- key: 'eatReverseSolidusAtomEscape',
- value: function eatReverseSolidusAtomEscape() {
- var start = this.index;
- if (this.eat(ReverseSolidus)) {
- if (this.eatAtomEscape()) {
- return true;
- }
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatUncapturingGroup',
- value: function eatUncapturingGroup() {
- var start = this.index;
- if (this.eat3(LeftParenthesis, QuestionMark, Colon)) {
- this.onGroupEnter(start);
- this.disjunction();
- if (!this.eat(RightParenthesis)) {
- this.raise("Unterminated group");
- }
- this.onGroupLeave(start, this.index);
- return true;
- }
- return false;
- }
- }, {
- key: 'eatCapturingGroup',
- value: function eatCapturingGroup() {
- var start = this.index;
- if (this.eat(LeftParenthesis)) {
- this._lastStrValue = "";
- if (this.ecmaVersion >= 2018) {
- this.groupSpecifier();
- } else if (this.currentCodePoint === QuestionMark) {
- this.raise("Invalid group");
- }
- var name = this._lastStrValue || null;
- this.onCapturingGroupEnter(start, name);
- this.disjunction();
- if (!this.eat(RightParenthesis)) {
- this.raise("Unterminated group");
- }
- this.onCapturingGroupLeave(start, this.index, name);
- return true;
- }
- return false;
- }
- }, {
- key: 'eatExtendedAtom',
- value: function eatExtendedAtom() {
- return this.eatDot() || this.eatReverseSolidusAtomEscape() || this.eatReverseSolidusFollowedByC() || this.eatCharacterClass() || this.eatUncapturingGroup() || this.eatCapturingGroup() || this.eatInvalidBracedQuantifier() || this.eatExtendedPatternCharacter();
- }
- }, {
- key: 'eatReverseSolidusFollowedByC',
- value: function eatReverseSolidusFollowedByC() {
- if (this.currentCodePoint === ReverseSolidus && this.nextCodePoint === LatinSmallLetterC) {
- this._lastIntValue = this.currentCodePoint;
- this.advance();
- this.onCharacter(this.index - 1, this.index, ReverseSolidus);
- return true;
- }
- return false;
- }
- }, {
- key: 'eatInvalidBracedQuantifier',
- value: function eatInvalidBracedQuantifier() {
- if (this.eatBracedQuantifier(true)) {
- this.raise("Nothing to repeat");
- }
- return false;
- }
- }, {
- key: 'eatSyntaxCharacter',
- value: function eatSyntaxCharacter() {
- if (isSyntaxCharacter(this.currentCodePoint)) {
- this._lastIntValue = this.currentCodePoint;
- this.advance();
- return true;
- }
- return false;
- }
- }, {
- key: 'eatPatternCharacter',
- value: function eatPatternCharacter() {
- var start = this.index;
- var cp = this.currentCodePoint;
- if (cp !== -1 && !isSyntaxCharacter(cp)) {
- this.advance();
- this.onCharacter(start, this.index, cp);
- return true;
- }
- return false;
- }
- }, {
- key: 'eatExtendedPatternCharacter',
- value: function eatExtendedPatternCharacter() {
- var start = this.index;
- var cp = this.currentCodePoint;
- if (cp !== -1 && cp !== CircumflexAccent && cp !== DollarSign && cp !== ReverseSolidus && cp !== FullStop && cp !== Asterisk && cp !== PlusSign && cp !== QuestionMark && cp !== LeftParenthesis && cp !== RightParenthesis && cp !== LeftSquareBracket && cp !== VerticalLine) {
- this.advance();
- this.onCharacter(start, this.index, cp);
- return true;
- }
- return false;
- }
- }, {
- key: 'groupSpecifier',
- value: function groupSpecifier() {
- this._lastStrValue = "";
- if (this.eat(QuestionMark)) {
- if (this.eatGroupName()) {
- if (!this._groupNames.has(this._lastStrValue)) {
- this._groupNames.add(this._lastStrValue);
- return;
- }
- this.raise("Duplicate capture group name");
- }
- this.raise("Invalid group");
- }
- }
- }, {
- key: 'eatGroupName',
- value: function eatGroupName() {
- this._lastStrValue = "";
- if (this.eat(LessThanSign)) {
- if (this.eatRegExpIdentifierName() && this.eat(GreaterThanSign)) {
- return true;
- }
- this.raise("Invalid capture group name");
- }
- return false;
- }
- }, {
- key: 'eatRegExpIdentifierName',
- value: function eatRegExpIdentifierName() {
- this._lastStrValue = "";
- if (this.eatRegExpIdentifierStart()) {
- this._lastStrValue += String.fromCodePoint(this._lastIntValue);
- while (this.eatRegExpIdentifierPart()) {
- this._lastStrValue += String.fromCodePoint(this._lastIntValue);
- }
- return true;
- }
- return false;
- }
- }, {
- key: 'eatRegExpIdentifierStart',
- value: function eatRegExpIdentifierStart() {
- var start = this.index;
- var cp = this.currentCodePoint;
- this.advance();
- if (cp === ReverseSolidus && this.eatRegExpUnicodeEscapeSequence()) {
- cp = this._lastIntValue;
- }
- if (isRegExpIdentifierStart(cp)) {
- this._lastIntValue = cp;
- return true;
- }
- if (this.index !== start) {
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatRegExpIdentifierPart',
- value: function eatRegExpIdentifierPart() {
- var start = this.index;
- var cp = this.currentCodePoint;
- this.advance();
- if (cp === ReverseSolidus && this.eatRegExpUnicodeEscapeSequence()) {
- cp = this._lastIntValue;
- }
- if (isRegExpIdentifierPart(cp)) {
- this._lastIntValue = cp;
- return true;
- }
- if (this.index !== start) {
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatAtomEscape',
- value: function eatAtomEscape() {
- if (this.eatBackreference() || this.eatCharacterClassEscape() || this.eatCharacterEscape() || this._nFlag && this.eatKGroupName()) {
- return true;
- }
- if (this.strict || this._uFlag) {
- this.raise("Invalid escape");
- }
- return false;
- }
- }, {
- key: 'eatBackreference',
- value: function eatBackreference() {
- var start = this.index;
- if (this.eatDecimalEscape()) {
- var n = this._lastIntValue;
- if (n <= this._numCapturingParens) {
- this.onBackreference(start - 1, this.index, n);
- return true;
- }
- if (this.strict) {
- this.raise("Invalid escape");
- }
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatKGroupName',
- value: function eatKGroupName() {
- var start = this.index;
- if (this.eat(LatinSmallLetterK)) {
- if (this.eatGroupName()) {
- var groupName = this._lastStrValue;
- this._backreferenceNames.add(groupName);
- this.onBackreference(start - 1, this.index, groupName);
- return true;
- }
- this.raise("Invalid named reference");
- }
- return false;
- }
- }, {
- key: 'eatCharacterEscape',
- value: function eatCharacterEscape() {
- var start = this.index;
- if (this.eatControlEscape() || this.eatCControlLetter() || this.eatZero() || this.eatHexEscapeSequence() || this.eatRegExpUnicodeEscapeSequence() || !this.strict && this.eatLegacyOctalEscapeSequence() || this.eatIdentityEscape()) {
- this.onCharacter(start - 1, this.index, this._lastIntValue);
- return true;
- }
- return false;
- }
- }, {
- key: 'eatCControlLetter',
- value: function eatCControlLetter() {
- var start = this.index;
- if (this.eat(LatinSmallLetterC)) {
- if (this.eatControlLetter()) {
- return true;
- }
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatZero',
- value: function eatZero() {
- if (this.currentCodePoint === DigitZero && !isDecimalDigit(this.nextCodePoint)) {
- this._lastIntValue = 0;
- this.advance();
- return true;
- }
- return false;
- }
- }, {
- key: 'eatControlEscape',
- value: function eatControlEscape() {
- if (this.eat(LatinSmallLetterT)) {
- this._lastIntValue = CharacterTabulation;
- return true;
- }
- if (this.eat(LatinSmallLetterN)) {
- this._lastIntValue = LineFeed;
- return true;
- }
- if (this.eat(LatinSmallLetterV)) {
- this._lastIntValue = LineTabulation;
- return true;
- }
- if (this.eat(LatinSmallLetterF)) {
- this._lastIntValue = FormFeed;
- return true;
- }
- if (this.eat(LatinSmallLetterR)) {
- this._lastIntValue = CarriageReturn;
- return true;
- }
- return false;
- }
- }, {
- key: 'eatControlLetter',
- value: function eatControlLetter() {
- var cp = this.currentCodePoint;
- if (isLatinLetter(cp)) {
- this.advance();
- this._lastIntValue = cp % 0x20;
- return true;
- }
- return false;
- }
- }, {
- key: 'eatRegExpUnicodeEscapeSequence',
- value: function eatRegExpUnicodeEscapeSequence() {
- var start = this.index;
- if (this.eat(LatinSmallLetterU)) {
- if (this.eatFixedHexDigits(4)) {
- var lead = this._lastIntValue;
- if (this._uFlag && lead >= 0xd800 && lead <= 0xdbff) {
- var leadSurrogateEnd = this.index;
- if (this.eat(ReverseSolidus) && this.eat(LatinSmallLetterU) && this.eatFixedHexDigits(4)) {
- var trail = this._lastIntValue;
- if (trail >= 0xdc00 && trail <= 0xdfff) {
- this._lastIntValue = (lead - 0xd800) * 0x400 + (trail - 0xdc00) + 0x10000;
- return true;
- }
- }
- this.rewind(leadSurrogateEnd);
- this._lastIntValue = lead;
- }
- return true;
- }
- if (this._uFlag && this.eat(LeftCurlyBracket) && this.eatHexDigits() && this.eat(RightCurlyBracket) && isValidUnicode(this._lastIntValue)) {
- return true;
- }
- if (this.strict || this._uFlag) {
- this.raise("Invalid unicode escape");
- }
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatIdentityEscape',
- value: function eatIdentityEscape() {
- if (this._uFlag) {
- if (this.eatSyntaxCharacter()) {
- return true;
- }
- if (this.eat(Solidus)) {
- this._lastIntValue = Solidus;
- return true;
- }
- return false;
- }
- if (this.isValidIdentityEscape(this.currentCodePoint)) {
- this._lastIntValue = this.currentCodePoint;
- this.advance();
- return true;
- }
- return false;
- }
- }, {
- key: 'isValidIdentityEscape',
- value: function isValidIdentityEscape(cp) {
- if (cp === -1) {
- return false;
- }
- if (this.strict) {
- return !isIdContinue(cp);
- }
- return cp !== LatinSmallLetterC && (!this._nFlag || cp !== LatinSmallLetterK);
- }
- }, {
- key: 'eatDecimalEscape',
- value: function eatDecimalEscape() {
- this._lastIntValue = 0;
- var cp = this.currentCodePoint;
- if (cp >= DigitOne && cp <= DigitNine) {
- do {
- this._lastIntValue = 10 * this._lastIntValue + (cp - DigitZero);
- this.advance();
- } while ((cp = this.currentCodePoint) >= DigitZero && cp <= DigitNine);
- return true;
- }
- return false;
- }
- }, {
- key: 'eatCharacterClassEscape',
- value: function eatCharacterClassEscape() {
- var start = this.index;
- if (this.eat(LatinSmallLetterD)) {
- this._lastIntValue = -1;
- this.onEscapeCharacterSet(start - 1, this.index, "digit", false);
- return true;
- }
- if (this.eat(LatinCapitalLetterD)) {
- this._lastIntValue = -1;
- this.onEscapeCharacterSet(start - 1, this.index, "digit", true);
- return true;
- }
- if (this.eat(LatinSmallLetterS)) {
- this._lastIntValue = -1;
- this.onEscapeCharacterSet(start - 1, this.index, "space", false);
- return true;
- }
- if (this.eat(LatinCapitalLetterS)) {
- this._lastIntValue = -1;
- this.onEscapeCharacterSet(start - 1, this.index, "space", true);
- return true;
- }
- if (this.eat(LatinSmallLetterW)) {
- this._lastIntValue = -1;
- this.onEscapeCharacterSet(start - 1, this.index, "word", false);
- return true;
- }
- if (this.eat(LatinCapitalLetterW)) {
- this._lastIntValue = -1;
- this.onEscapeCharacterSet(start - 1, this.index, "word", true);
- return true;
- }
- var negate = false;
- if (this._uFlag && this.ecmaVersion >= 2018 && (this.eat(LatinSmallLetterP) || (negate = this.eat(LatinCapitalLetterP)))) {
- this._lastIntValue = -1;
- if (this.eat(LeftCurlyBracket) && this.eatUnicodePropertyValueExpression() && this.eat(RightCurlyBracket)) {
- this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", this._lastKeyValue, this._lastValValue || null, negate);
- return true;
- }
- this.raise("Invalid property name");
- }
- return false;
- }
- }, {
- key: 'eatUnicodePropertyValueExpression',
- value: function eatUnicodePropertyValueExpression() {
- var start = this.index;
- if (this.eatUnicodePropertyName() && this.eat(EqualsSign)) {
- this._lastKeyValue = this._lastStrValue;
- if (this.eatUnicodePropertyValue()) {
- this._lastValValue = this._lastStrValue;
- if (isValidUnicodeProperty(this._lastKeyValue, this._lastValValue)) {
- return true;
- }
- this.raise("Invalid property name");
- }
- }
- this.rewind(start);
- if (this.eatLoneUnicodePropertyNameOrValue()) {
- var nameOrValue = this._lastStrValue;
- if (isValidUnicodeProperty("General_Category", nameOrValue)) {
- this._lastKeyValue = "General_Category";
- this._lastValValue = nameOrValue;
- return true;
- }
- if (isValidUnicodePropertyName(nameOrValue)) {
- this._lastKeyValue = nameOrValue;
- this._lastValValue = "";
- return true;
- }
- this.raise("Invalid property name");
- }
- return false;
- }
- }, {
- key: 'eatUnicodePropertyName',
- value: function eatUnicodePropertyName() {
- this._lastStrValue = "";
- while (isUnicodePropertyNameCharacter(this.currentCodePoint)) {
- this._lastStrValue += String.fromCodePoint(this.currentCodePoint);
- this.advance();
- }
- return this._lastStrValue !== "";
- }
- }, {
- key: 'eatUnicodePropertyValue',
- value: function eatUnicodePropertyValue() {
- this._lastStrValue = "";
- while (isUnicodePropertyValueCharacter(this.currentCodePoint)) {
- this._lastStrValue += String.fromCodePoint(this.currentCodePoint);
- this.advance();
- }
- return this._lastStrValue !== "";
- }
- }, {
- key: 'eatLoneUnicodePropertyNameOrValue',
- value: function eatLoneUnicodePropertyNameOrValue() {
- return this.eatUnicodePropertyValue();
- }
- }, {
- key: 'eatCharacterClass',
- value: function eatCharacterClass() {
- var start = this.index;
- if (this.eat(LeftSquareBracket)) {
- var negate = this.eat(CircumflexAccent);
- this.onCharacterClassEnter(start, negate);
- this.classRanges();
- if (!this.eat(RightSquareBracket)) {
- this.raise("Unterminated character class");
- }
- this.onCharacterClassLeave(start, this.index, negate);
- return true;
- }
- return false;
- }
- }, {
- key: 'classRanges',
- value: function classRanges() {
- var start = this.index;
- while (this.eatClassAtom()) {
- var left = this._lastIntValue;
- var hyphenStart = this.index;
- if (this.eat(HyphenMinus)) {
- this.onCharacter(hyphenStart, this.index, HyphenMinus);
- if (this.eatClassAtom()) {
- var right = this._lastIntValue;
- if (left === -1 || right === -1) {
- if (this.strict) {
- this.raise("Invalid character class");
- }
- } else if (left > right) {
- this.raise("Range out of order in character class");
- } else {
- this.onCharacterClassRange(start, this.index, left, right);
- }
- }
- }
- start = this.index;
- }
- }
- }, {
- key: 'eatClassAtom',
- value: function eatClassAtom() {
- var start = this.index;
- if (this.eat(ReverseSolidus)) {
- if (this.eatClassEscape()) {
- return true;
- }
- if (this._uFlag) {
- this.raise("Invalid escape");
- }
- this.rewind(start);
- }
- var cp = this.currentCodePoint;
- if (cp !== -1 && cp !== RightSquareBracket) {
- this.advance();
- this._lastIntValue = cp;
- this.onCharacter(start, this.index, cp);
- return true;
- }
- return false;
- }
- }, {
- key: 'eatClassEscape',
- value: function eatClassEscape() {
- var start = this.index;
- if (this.eat(LatinSmallLetterB)) {
- this._lastIntValue = Backspace;
- this.onCharacter(start - 1, this.index, Backspace);
- return true;
- }
- if (this._uFlag && this.eat(HyphenMinus)) {
- this._lastIntValue = HyphenMinus;
- this.onCharacter(start - 1, this.index, HyphenMinus);
- return true;
- }
- if (!this._uFlag && this.eat(LatinSmallLetterC)) {
- if (this.eatClassControlLetter()) {
- this.onCharacter(start - 1, this.index, this._lastIntValue);
- return true;
- }
- this.rewind(start);
- }
- return this.eatCharacterClassEscape() || this.eatCharacterEscape();
- }
- }, {
- key: 'eatClassControlLetter',
- value: function eatClassControlLetter() {
- var cp = this.currentCodePoint;
- if (isDecimalDigit(cp) || cp === LowLine) {
- this.advance();
- this._lastIntValue = cp % 0x20;
- return true;
- }
- return false;
- }
- }, {
- key: 'eatHexEscapeSequence',
- value: function eatHexEscapeSequence() {
- var start = this.index;
- if (this.eat(LatinSmallLetterX)) {
- if (this.eatFixedHexDigits(2)) {
- return true;
- }
- if (this._uFlag) {
- this.raise("Invalid escape");
- }
- this.rewind(start);
- }
- return false;
- }
- }, {
- key: 'eatDecimalDigits',
- value: function eatDecimalDigits() {
- var start = this.index;
- this._lastIntValue = 0;
- while (isDecimalDigit(this.currentCodePoint)) {
- this._lastIntValue = 10 * this._lastIntValue + digitToInt(this.currentCodePoint);
- this.advance();
- }
- return this.index !== start;
- }
- }, {
- key: 'eatHexDigits',
- value: function eatHexDigits() {
- var start = this.index;
- this._lastIntValue = 0;
- while (isHexDigit(this.currentCodePoint)) {
- this._lastIntValue = 16 * this._lastIntValue + digitToInt(this.currentCodePoint);
- this.advance();
- }
- return this.index !== start;
- }
- }, {
- key: 'eatLegacyOctalEscapeSequence',
- value: function eatLegacyOctalEscapeSequence() {
- if (this.eatOctalDigit()) {
- var n1 = this._lastIntValue;
- if (this.eatOctalDigit()) {
- var n2 = this._lastIntValue;
- if (n1 <= 3 && this.eatOctalDigit()) {
- this._lastIntValue = n1 * 64 + n2 * 8 + this._lastIntValue;
- } else {
- this._lastIntValue = n1 * 8 + n2;
- }
- } else {
- this._lastIntValue = n1;
- }
- return true;
- }
- return false;
- }
- }, {
- key: 'eatOctalDigit',
- value: function eatOctalDigit() {
- var cp = this.currentCodePoint;
- if (isOctalDigit(cp)) {
- this.advance();
- this._lastIntValue = cp - DigitZero;
- return true;
- }
- this._lastIntValue = 0;
- return false;
- }
- }, {
- key: 'eatFixedHexDigits',
- value: function eatFixedHexDigits(length) {
- var start = this.index;
- this._lastIntValue = 0;
- for (var i = 0; i < length; ++i) {
- var cp = this.currentCodePoint;
- if (!isHexDigit(cp)) {
- this.rewind(start);
- return false;
- }
- this._lastIntValue = 16 * this._lastIntValue + digitToInt(cp);
- this.advance();
- }
- return true;
- }
- }, {
- key: 'strict',
- get: function get() {
- return Boolean(this._options.strict || this._uFlag);
- }
- }, {
- key: 'ecmaVersion',
- get: function get() {
- return this._options.ecmaVersion || 2018;
- }
- }, {
- key: 'source',
- get: function get() {
- return this._reader.source;
- }
- }, {
- key: 'index',
- get: function get() {
- return this._reader.index;
- }
- }, {
- key: 'currentCodePoint',
- get: function get() {
- return this._reader.currentCodePoint;
- }
- }, {
- key: 'nextCodePoint',
- get: function get() {
- return this._reader.nextCodePoint;
- }
- }, {
- key: 'nextCodePoint2',
- get: function get() {
- return this._reader.nextCodePoint2;
- }
- }, {
- key: 'nextCodePoint3',
- get: function get() {
- return this._reader.nextCodePoint3;
- }
- }]);
-
- return RegExpValidator;
-}();
-
-var DummyPattern = {};
-var DummyFlags = {};
-var DummyCapturingGroup = {};
-
-var RegExpParserState = function () {
- function RegExpParserState(options) {
- _classCallCheck(this, RegExpParserState);
-
- this._node = DummyPattern;
- this._flags = DummyFlags;
- this._backreferences = [];
- this._capturingGroups = [];
- this.source = "";
- this.strict = Boolean(options && options.strict);
- this.ecmaVersion = options && options.ecmaVersion || 2018;
- }
-
- _createClass(RegExpParserState, [{
- key: 'onFlags',
- value: function onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll) {
- this._flags = {
- type: "Flags",
- parent: null,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- global: global,
- ignoreCase: ignoreCase,
- multiline: multiline,
- unicode: unicode,
- sticky: sticky,
- dotAll: dotAll
- };
- }
- }, {
- key: 'onPatternEnter',
- value: function onPatternEnter(start) {
- this._node = {
- type: "Pattern",
- parent: null,
- start: start,
- end: start,
- raw: "",
- alternatives: []
- };
- this._backreferences.length = 0;
- this._capturingGroups.length = 0;
- }
- }, {
- key: 'onPatternLeave',
- value: function onPatternLeave(start, end) {
- var _this2 = this;
-
- this._node.end = end;
- this._node.raw = this.source.slice(start, end);
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
-
- try {
- var _loop = function _loop() {
- var reference = _step2.value;
-
- var ref = reference.ref;
- var group = typeof ref === "number" ? _this2._capturingGroups[ref - 1] : _this2._capturingGroups.find(function (g) {
- return g.name === ref;
- });
- reference.resolved = group;
- group.references.push(reference);
- };
-
- for (var _iterator2 = this._backreferences[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- _loop();
- }
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
- }
- }
- }, {
- key: 'onAlternativeEnter',
- value: function onAlternativeEnter(start) {
- var parent = this._node;
- if (parent.type !== "Assertion" && parent.type !== "CapturingGroup" && parent.type !== "Group" && parent.type !== "Pattern") {
- throw new Error("UnknownError");
- }
- this._node = {
- type: "Alternative",
- parent: parent,
- start: start,
- end: start,
- raw: "",
- elements: []
- };
- parent.alternatives.push(this._node);
- }
- }, {
- key: 'onAlternativeLeave',
- value: function onAlternativeLeave(start, end) {
- var node = this._node;
- if (node.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- node.end = end;
- node.raw = this.source.slice(start, end);
- this._node = node.parent;
- }
- }, {
- key: 'onGroupEnter',
- value: function onGroupEnter(start) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- this._node = {
- type: "Group",
- parent: parent,
- start: start,
- end: start,
- raw: "",
- alternatives: []
- };
- parent.elements.push(this._node);
- }
- }, {
- key: 'onGroupLeave',
- value: function onGroupLeave(start, end) {
- var node = this._node;
- if (node.type !== "Group" || node.parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- node.end = end;
- node.raw = this.source.slice(start, end);
- this._node = node.parent;
- }
- }, {
- key: 'onCapturingGroupEnter',
- value: function onCapturingGroupEnter(start, name) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- this._node = {
- type: "CapturingGroup",
- parent: parent,
- start: start,
- end: start,
- raw: "",
- name: name,
- alternatives: [],
- references: []
- };
- parent.elements.push(this._node);
- this._capturingGroups.push(this._node);
- }
- }, {
- key: 'onCapturingGroupLeave',
- value: function onCapturingGroupLeave(start, end) {
- var node = this._node;
- if (node.type !== "CapturingGroup" || node.parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- node.end = end;
- node.raw = this.source.slice(start, end);
- this._node = node.parent;
- }
- }, {
- key: 'onQuantifier',
- value: function onQuantifier(start, end, min, max, greedy) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- var element = parent.elements.pop();
- if (element == null || element.type === "Quantifier" || element.type === "Assertion" && element.kind !== "lookahead") {
- throw new Error("UnknownError");
- }
- var node = {
- type: "Quantifier",
- parent: parent,
- start: element.start,
- end: end,
- raw: this.source.slice(element.start, end),
- min: min,
- max: max,
- greedy: greedy,
- element: element
- };
- parent.elements.push(node);
- element.parent = node;
- }
- }, {
- key: 'onLookaroundAssertionEnter',
- value: function onLookaroundAssertionEnter(start, kind, negate) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- this._node = {
- type: "Assertion",
- parent: parent,
- start: start,
- end: start,
- raw: "",
- kind: kind,
- negate: negate,
- alternatives: []
- };
- parent.elements.push(this._node);
- }
- }, {
- key: 'onLookaroundAssertionLeave',
- value: function onLookaroundAssertionLeave(start, end) {
- var node = this._node;
- if (node.type !== "Assertion" || node.parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- node.end = end;
- node.raw = this.source.slice(start, end);
- this._node = node.parent;
- }
- }, {
- key: 'onEdgeAssertion',
- value: function onEdgeAssertion(start, end, kind) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- parent.elements.push({
- type: "Assertion",
- parent: parent,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- kind: kind
- });
- }
- }, {
- key: 'onWordBoundaryAssertion',
- value: function onWordBoundaryAssertion(start, end, kind, negate) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- parent.elements.push({
- type: "Assertion",
- parent: parent,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- kind: kind,
- negate: negate
- });
- }
- }, {
- key: 'onAnyCharacterSet',
- value: function onAnyCharacterSet(start, end, kind) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- parent.elements.push({
- type: "CharacterSet",
- parent: parent,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- kind: kind
- });
- }
- }, {
- key: 'onEscapeCharacterSet',
- value: function onEscapeCharacterSet(start, end, kind, negate) {
- var parent = this._node;
- if (parent.type !== "Alternative" && parent.type !== "CharacterClass") {
- throw new Error("UnknownError");
- }
- parent.elements.push({
- type: "CharacterSet",
- parent: parent,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- kind: kind,
- negate: negate
- });
- }
- }, {
- key: 'onUnicodePropertyCharacterSet',
- value: function onUnicodePropertyCharacterSet(start, end, kind, key, value, negate) {
- var parent = this._node;
- if (parent.type !== "Alternative" && parent.type !== "CharacterClass") {
- throw new Error("UnknownError");
- }
- parent.elements.push({
- type: "CharacterSet",
- parent: parent,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- kind: kind,
- key: key,
- value: value,
- negate: negate
- });
- }
- }, {
- key: 'onCharacter',
- value: function onCharacter(start, end, value) {
- var parent = this._node;
- if (parent.type !== "Alternative" && parent.type !== "CharacterClass") {
- throw new Error("UnknownError");
- }
- parent.elements.push({
- type: "Character",
- parent: parent,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- value: value
- });
- }
- }, {
- key: 'onBackreference',
- value: function onBackreference(start, end, ref) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- var node = {
- type: "Backreference",
- parent: parent,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- ref: ref,
- resolved: DummyCapturingGroup
- };
- parent.elements.push(node);
- this._backreferences.push(node);
- }
- }, {
- key: 'onCharacterClassEnter',
- value: function onCharacterClassEnter(start, negate) {
- var parent = this._node;
- if (parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- this._node = {
- type: "CharacterClass",
- parent: parent,
- start: start,
- end: start,
- raw: "",
- negate: negate,
- elements: []
- };
- parent.elements.push(this._node);
- }
- }, {
- key: 'onCharacterClassLeave',
- value: function onCharacterClassLeave(start, end) {
- var node = this._node;
- if (node.type !== "CharacterClass" || node.parent.type !== "Alternative") {
- throw new Error("UnknownError");
- }
- node.end = end;
- node.raw = this.source.slice(start, end);
- this._node = node.parent;
- }
- }, {
- key: 'onCharacterClassRange',
- value: function onCharacterClassRange(start, end) {
- var parent = this._node;
- if (parent.type !== "CharacterClass") {
- throw new Error("UnknownError");
- }
- var elements = parent.elements;
- var max = elements.pop();
- var hyphen = elements.pop();
- var min = elements.pop();
- if (!min || !max || !hyphen || min.type !== "Character" || max.type !== "Character" || hyphen.type !== "Character" || hyphen.value !== HyphenMinus) {
- throw new Error("UnknownError");
- }
- var node = {
- type: "CharacterClassRange",
- parent: parent,
- start: start,
- end: end,
- raw: this.source.slice(start, end),
- min: min,
- max: max
- };
- min.parent = node;
- max.parent = node;
- elements.push(node);
- }
- }, {
- key: 'pattern',
- get: function get() {
- if (this._node.type !== "Pattern") {
- throw new Error("UnknownError");
- }
- return this._node;
- }
- }, {
- key: 'flags',
- get: function get() {
- if (this._flags.type !== "Flags") {
- throw new Error("UnknownError");
- }
- return this._flags;
- }
- }]);
-
- return RegExpParserState;
-}();
-
-var RegExpParser = function () {
- function RegExpParser(options) {
- _classCallCheck(this, RegExpParser);
-
- this._state = new RegExpParserState(options);
- this._validator = new RegExpValidator(this._state);
- }
-
- _createClass(RegExpParser, [{
- key: 'parseLiteral',
- value: function parseLiteral(source) {
- var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
- var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : source.length;
-
- this._state.source = source;
- this._validator.validateLiteral(source, start, end);
- var pattern = this._state.pattern;
- var flags = this._state.flags;
- var literal = {
- type: "RegExpLiteral",
- parent: null,
- start: start,
- end: end,
- raw: source,
- pattern: pattern,
- flags: flags
- };
- pattern.parent = literal;
- flags.parent = literal;
- return literal;
- }
- }, {
- key: 'parseFlags',
- value: function parseFlags(source) {
- var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
- var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : source.length;
-
- this._state.source = source;
- this._validator.validateFlags(source, start, end);
- return this._state.flags;
- }
- }, {
- key: 'parsePattern',
- value: function parsePattern(source) {
- var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
- var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : source.length;
- var uFlag = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
-
- this._state.source = source;
- this._validator.validatePattern(source, start, end, uFlag);
- return this._state.pattern;
- }
- }]);
-
- return RegExpParser;
-}();
-
-var RegExpVisitor = function () {
- function RegExpVisitor(handlers) {
- _classCallCheck(this, RegExpVisitor);
-
- this._handlers = handlers;
- }
-
- _createClass(RegExpVisitor, [{
- key: 'visit',
- value: function visit(node) {
- switch (node.type) {
- case "Alternative":
- this.visitAlternative(node);
- break;
- case "Assertion":
- this.visitAssertion(node);
- break;
- case "Backreference":
- this.visitBackreference(node);
- break;
- case "CapturingGroup":
- this.visitCapturingGroup(node);
- break;
- case "Character":
- this.visitCharacter(node);
- break;
- case "CharacterClass":
- this.visitCharacterClass(node);
- break;
- case "CharacterClassRange":
- this.visitCharacterClassRange(node);
- break;
- case "CharacterSet":
- this.visitCharacterSet(node);
- break;
- case "Flags":
- this.visitFlags(node);
- break;
- case "Group":
- this.visitGroup(node);
- break;
- case "Pattern":
- this.visitPattern(node);
- break;
- case "Quantifier":
- this.visitQuantifier(node);
- break;
- case "RegExpLiteral":
- this.visitRegExpLiteral(node);
- break;
- default:
- throw new Error('Unknown type: ' + node.type);
- }
- }
- }, {
- key: 'visitAlternative',
- value: function visitAlternative(node) {
- if (this._handlers.onAlternativeEnter) {
- this._handlers.onAlternativeEnter(node);
- }
- node.elements.forEach(this.visit, this);
- if (this._handlers.onAlternativeLeave) {
- this._handlers.onAlternativeLeave(node);
- }
- }
- }, {
- key: 'visitAssertion',
- value: function visitAssertion(node) {
- if (this._handlers.onAssertionEnter) {
- this._handlers.onAssertionEnter(node);
- }
- if (node.kind === "lookahead" || node.kind === "lookbehind") {
- node.alternatives.forEach(this.visit, this);
- }
- if (this._handlers.onAssertionLeave) {
- this._handlers.onAssertionLeave(node);
- }
- }
- }, {
- key: 'visitBackreference',
- value: function visitBackreference(node) {
- if (this._handlers.onBackreferenceEnter) {
- this._handlers.onBackreferenceEnter(node);
- }
- if (this._handlers.onBackreferenceLeave) {
- this._handlers.onBackreferenceLeave(node);
- }
- }
- }, {
- key: 'visitCapturingGroup',
- value: function visitCapturingGroup(node) {
- if (this._handlers.onCapturingGroupEnter) {
- this._handlers.onCapturingGroupEnter(node);
- }
- node.alternatives.forEach(this.visit, this);
- if (this._handlers.onCapturingGroupLeave) {
- this._handlers.onCapturingGroupLeave(node);
- }
- }
- }, {
- key: 'visitCharacter',
- value: function visitCharacter(node) {
- if (this._handlers.onCharacterEnter) {
- this._handlers.onCharacterEnter(node);
- }
- if (this._handlers.onCharacterLeave) {
- this._handlers.onCharacterLeave(node);
- }
- }
- }, {
- key: 'visitCharacterClass',
- value: function visitCharacterClass(node) {
- if (this._handlers.onCharacterClassEnter) {
- this._handlers.onCharacterClassEnter(node);
- }
- node.elements.forEach(this.visit, this);
- if (this._handlers.onCharacterClassLeave) {
- this._handlers.onCharacterClassLeave(node);
- }
- }
- }, {
- key: 'visitCharacterClassRange',
- value: function visitCharacterClassRange(node) {
- if (this._handlers.onCharacterClassRangeEnter) {
- this._handlers.onCharacterClassRangeEnter(node);
- }
- this.visitCharacter(node.min);
- this.visitCharacter(node.max);
- if (this._handlers.onCharacterClassRangeLeave) {
- this._handlers.onCharacterClassRangeLeave(node);
- }
- }
- }, {
- key: 'visitCharacterSet',
- value: function visitCharacterSet(node) {
- if (this._handlers.onCharacterSetEnter) {
- this._handlers.onCharacterSetEnter(node);
- }
- if (this._handlers.onCharacterSetLeave) {
- this._handlers.onCharacterSetLeave(node);
- }
- }
- }, {
- key: 'visitFlags',
- value: function visitFlags(node) {
- if (this._handlers.onFlagsEnter) {
- this._handlers.onFlagsEnter(node);
- }
- if (this._handlers.onFlagsLeave) {
- this._handlers.onFlagsLeave(node);
- }
- }
- }, {
- key: 'visitGroup',
- value: function visitGroup(node) {
- if (this._handlers.onGroupEnter) {
- this._handlers.onGroupEnter(node);
- }
- node.alternatives.forEach(this.visit, this);
- if (this._handlers.onGroupLeave) {
- this._handlers.onGroupLeave(node);
- }
- }
- }, {
- key: 'visitPattern',
- value: function visitPattern(node) {
- if (this._handlers.onPatternEnter) {
- this._handlers.onPatternEnter(node);
- }
- node.alternatives.forEach(this.visit, this);
- if (this._handlers.onPatternLeave) {
- this._handlers.onPatternLeave(node);
- }
- }
- }, {
- key: 'visitQuantifier',
- value: function visitQuantifier(node) {
- if (this._handlers.onQuantifierEnter) {
- this._handlers.onQuantifierEnter(node);
- }
- this.visit(node.element);
- if (this._handlers.onQuantifierLeave) {
- this._handlers.onQuantifierLeave(node);
- }
- }
- }, {
- key: 'visitRegExpLiteral',
- value: function visitRegExpLiteral(node) {
- if (this._handlers.onRegExpLiteralEnter) {
- this._handlers.onRegExpLiteralEnter(node);
- }
- this.visitPattern(node.pattern);
- this.visitFlags(node.flags);
- if (this._handlers.onRegExpLiteralLeave) {
- this._handlers.onRegExpLiteralLeave(node);
- }
- }
- }]);
-
- return RegExpVisitor;
-}();
-
-function parseRegExpLiteral(source, options) {
- return new RegExpParser(options).parseLiteral(String(source));
-}
-function validateRegExpLiteral(source, options) {
- return new RegExpValidator(options).validateLiteral(source);
-}
-function visitRegExpAST(node, handlers) {
- new RegExpVisitor(handlers).visit(node);
-}
-
-exports.AST = ast;
-exports.RegExpParser = RegExpParser;
-exports.RegExpValidator = RegExpValidator;
-exports.parseRegExpLiteral = parseRegExpLiteral;
-exports.validateRegExpLiteral = validateRegExpLiteral;
-exports.visitRegExpAST = visitRegExpAST;
-
-
-},{}],105:[function(require,module,exports){
-'use strict';
-
-// Generated by LiveScript 1.4.0
-(function () {
- var ref$,
- any,
- all,
- isItNaN,
- types,
- defaultType,
- customTypes,
- toString$ = {}.toString;
- ref$ = require('prelude-ls'), any = ref$.any, all = ref$.all, isItNaN = ref$.isItNaN;
- types = {
- Number: {
- typeOf: 'Number',
- validate: function validate(it) {
- return !isItNaN(it);
- }
- },
- NaN: {
- typeOf: 'Number',
- validate: isItNaN
- },
- Int: {
- typeOf: 'Number',
- validate: function validate(it) {
- return !isItNaN(it) && it % 1 === 0;
- }
- },
- Float: {
- typeOf: 'Number',
- validate: function validate(it) {
- return !isItNaN(it);
- }
- },
- Date: {
- typeOf: 'Date',
- validate: function validate(it) {
- return !isItNaN(it.getTime());
- }
- }
- };
- defaultType = {
- array: 'Array',
- tuple: 'Array'
- };
- function checkArray(input, type) {
- return all(function (it) {
- return checkMultiple(it, type.of);
- }, input);
- }
- function checkTuple(input, type) {
- var i, i$, ref$, len$, types;
- i = 0;
- for (i$ = 0, len$ = (ref$ = type.of).length; i$ < len$; ++i$) {
- types = ref$[i$];
- if (!checkMultiple(input[i], types)) {
- return false;
- }
- i++;
- }
- return input.length <= i;
- }
- function checkFields(input, type) {
- var inputKeys, numInputKeys, k, numOfKeys, key, ref$, types;
- inputKeys = {};
- numInputKeys = 0;
- for (k in input) {
- inputKeys[k] = true;
- numInputKeys++;
- }
- numOfKeys = 0;
- for (key in ref$ = type.of) {
- types = ref$[key];
- if (!checkMultiple(input[key], types)) {
- return false;
- }
- if (inputKeys[key]) {
- numOfKeys++;
- }
- }
- return type.subset || numInputKeys === numOfKeys;
- }
- function checkStructure(input, type) {
- if (!(input instanceof Object)) {
- return false;
- }
- switch (type.structure) {
- case 'fields':
- return checkFields(input, type);
- case 'array':
- return checkArray(input, type);
- case 'tuple':
- return checkTuple(input, type);
- }
- }
- function check(input, typeObj) {
- var type, structure, setting, that;
- type = typeObj.type, structure = typeObj.structure;
- if (type) {
- if (type === '*') {
- return true;
- }
- setting = customTypes[type] || types[type];
- if (setting) {
- return setting.typeOf === toString$.call(input).slice(8, -1) && setting.validate(input);
- } else {
- return type === toString$.call(input).slice(8, -1) && (!structure || checkStructure(input, typeObj));
- }
- } else if (structure) {
- if (that = defaultType[structure]) {
- if (that !== toString$.call(input).slice(8, -1)) {
- return false;
- }
- }
- return checkStructure(input, typeObj);
- } else {
- throw new Error("No type defined. Input: " + input + ".");
- }
- }
- function checkMultiple(input, types) {
- if (toString$.call(types).slice(8, -1) !== 'Array') {
- throw new Error("Types must be in an array. Input: " + input + ".");
- }
- return any(function (it) {
- return check(input, it);
- }, types);
- }
- module.exports = function (parsedType, input, options) {
- options == null && (options = {});
- customTypes = options.customTypes || {};
- return checkMultiple(input, parsedType);
- };
-}).call(undefined);
-
-},{"prelude-ls":102}],106:[function(require,module,exports){
-'use strict';
-
-// Generated by LiveScript 1.4.0
-(function () {
- var VERSION, parseType, parsedTypeCheck, typeCheck;
- VERSION = '0.3.2';
- parseType = require('./parse-type');
- parsedTypeCheck = require('./check');
- typeCheck = function typeCheck(type, input, options) {
- return parsedTypeCheck(parseType(type), input, options);
- };
- module.exports = {
- VERSION: VERSION,
- typeCheck: typeCheck,
- parsedTypeCheck: parsedTypeCheck,
- parseType: parseType
- };
-}).call(undefined);
-
-},{"./check":105,"./parse-type":107}],107:[function(require,module,exports){
-"use strict";
-
-// Generated by LiveScript 1.4.0
-(function () {
- var identifierRegex, tokenRegex;
- identifierRegex = /[\$\w]+/;
- function peek(tokens) {
- var token;
- token = tokens[0];
- if (token == null) {
- throw new Error('Unexpected end of input.');
- }
- return token;
- }
- function consumeIdent(tokens) {
- var token;
- token = peek(tokens);
- if (!identifierRegex.test(token)) {
- throw new Error("Expected text, got '" + token + "' instead.");
- }
- return tokens.shift();
- }
- function consumeOp(tokens, op) {
- var token;
- token = peek(tokens);
- if (token !== op) {
- throw new Error("Expected '" + op + "', got '" + token + "' instead.");
- }
- return tokens.shift();
- }
- function maybeConsumeOp(tokens, op) {
- var token;
- token = tokens[0];
- if (token === op) {
- return tokens.shift();
- } else {
- return null;
- }
- }
- function consumeArray(tokens) {
- var types;
- consumeOp(tokens, '[');
- if (peek(tokens) === ']') {
- throw new Error("Must specify type of Array - eg. [Type], got [] instead.");
- }
- types = consumeTypes(tokens);
- consumeOp(tokens, ']');
- return {
- structure: 'array',
- of: types
- };
- }
- function consumeTuple(tokens) {
- var components;
- components = [];
- consumeOp(tokens, '(');
- if (peek(tokens) === ')') {
- throw new Error("Tuple must be of at least length 1 - eg. (Type), got () instead.");
- }
- for (;;) {
- components.push(consumeTypes(tokens));
- maybeConsumeOp(tokens, ',');
- if (')' === peek(tokens)) {
- break;
- }
- }
- consumeOp(tokens, ')');
- return {
- structure: 'tuple',
- of: components
- };
- }
- function consumeFields(tokens) {
- var fields, subset, ref$, key, types;
- fields = {};
- consumeOp(tokens, '{');
- subset = false;
- for (;;) {
- if (maybeConsumeOp(tokens, '...')) {
- subset = true;
- break;
- }
- ref$ = consumeField(tokens), key = ref$[0], types = ref$[1];
- fields[key] = types;
- maybeConsumeOp(tokens, ',');
- if ('}' === peek(tokens)) {
- break;
- }
- }
- consumeOp(tokens, '}');
- return {
- structure: 'fields',
- of: fields,
- subset: subset
- };
- }
- function consumeField(tokens) {
- var key, types;
- key = consumeIdent(tokens);
- consumeOp(tokens, ':');
- types = consumeTypes(tokens);
- return [key, types];
- }
- function maybeConsumeStructure(tokens) {
- switch (tokens[0]) {
- case '[':
- return consumeArray(tokens);
- case '(':
- return consumeTuple(tokens);
- case '{':
- return consumeFields(tokens);
- }
- }
- function consumeType(tokens) {
- var token, wildcard, type, structure;
- token = peek(tokens);
- wildcard = token === '*';
- if (wildcard || identifierRegex.test(token)) {
- type = wildcard ? consumeOp(tokens, '*') : consumeIdent(tokens);
- structure = maybeConsumeStructure(tokens);
- if (structure) {
- return structure.type = type, structure;
- } else {
- return {
- type: type
- };
- }
- } else {
- structure = maybeConsumeStructure(tokens);
- if (!structure) {
- throw new Error("Unexpected character: " + token);
- }
- return structure;
- }
- }
- function consumeTypes(tokens) {
- var lookahead, types, typesSoFar, typeObj, type;
- if ('::' === peek(tokens)) {
- throw new Error("No comment before comment separator '::' found.");
- }
- lookahead = tokens[1];
- if (lookahead != null && lookahead === '::') {
- tokens.shift();
- tokens.shift();
- }
- types = [];
- typesSoFar = {};
- if ('Maybe' === peek(tokens)) {
- tokens.shift();
- types = [{
- type: 'Undefined'
- }, {
- type: 'Null'
- }];
- typesSoFar = {
- Undefined: true,
- Null: true
- };
- }
- for (;;) {
- typeObj = consumeType(tokens), type = typeObj.type;
- if (!typesSoFar[type]) {
- types.push(typeObj);
- }
- typesSoFar[type] = true;
- if (!maybeConsumeOp(tokens, '|')) {
- break;
- }
- }
- return types;
- }
- tokenRegex = RegExp('\\.\\.\\.|::|->|' + identifierRegex.source + '|\\S', 'g');
- module.exports = function (input) {
- var tokens, e;
- if (!input.length) {
- throw new Error('No type specified.');
- }
- tokens = input.match(tokenRegex) || [];
- if (in$('->', tokens)) {
- throw new Error("Function types are not supported.\ To validate that something is a function, you may use 'Function'.");
- }
- try {
- return consumeTypes(tokens);
- } catch (e$) {
- e = e$;
- throw new Error(e.message + " - Remaining tokens: " + JSON.stringify(tokens) + " - Initial input: '" + input + "'");
- }
- };
- function in$(x, xs) {
- var i = -1,
- l = xs.length >>> 0;
- while (++i < l) {
- if (x === xs[i]) return true;
- }return false;
- }
-}).call(undefined);
-
-},{}],108:[function(require,module,exports){
-'use strict';
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
-(function (global, factory) {
- (typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : factory(global.URI = global.URI || {});
-})(undefined, function (exports) {
- 'use strict';
-
- function merge() {
- for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
- sets[_key] = arguments[_key];
- }
-
- if (sets.length > 1) {
- sets[0] = sets[0].slice(0, -1);
- var xl = sets.length - 1;
- for (var x = 1; x < xl; ++x) {
- sets[x] = sets[x].slice(1, -1);
- }
- sets[xl] = sets[xl].slice(1);
- return sets.join('');
- } else {
- return sets[0];
- }
- }
- function subexp(str) {
- return "(?:" + str + ")";
- }
- function typeOf(o) {
- return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
- }
- function toUpperCase(str) {
- return str.toUpperCase();
- }
- function toArray(obj) {
- return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
- }
- function assign(target, source) {
- var obj = target;
- if (source) {
- for (var key in source) {
- obj[key] = source[key];
- }
- }
- return obj;
- }
-
- function buildExps(isIRI) {
- var ALPHA$$ = "[A-Za-z]",
- CR$ = "[\\x0D]",
- DIGIT$$ = "[0-9]",
- DQUOTE$$ = "[\\x22]",
- HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"),
-
- //case-insensitive
- LF$$ = "[\\x0A]",
- SP$$ = "[\\x20]",
- PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)),
-
- //expanded
- GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]",
- SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",
- RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),
- UCSCHAR$$ = isIRI ? '[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]' : "[]",
-
- //subset, excludes bidi control characters
- IPRIVATE$$ = isIRI ? '[\\uE000-\\uF8FF]' : "[]",
-
- //subset
- UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$),
- SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"),
- USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"),
- DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$),
- DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
-
- //relaxed parsing rules
- IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
- H16$ = subexp(HEXDIG$$ + "{1,4}"),
- LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$),
- IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$),
-
- // 6( h16 ":" ) ls32
- IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$),
-
- // "::" 5( h16 ":" ) ls32
- IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$),
-
- //[ h16 ] "::" 4( h16 ":" ) ls32
- IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$),
-
- //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
- IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$),
-
- //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
- IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$),
-
- //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
- IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$),
-
- //[ *4( h16 ":" ) h16 ] "::" ls32
- IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$),
-
- //[ *5( h16 ":" ) h16 ] "::" h16
- IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
-
- //[ *6( h16 ":" ) h16 ] "::"
- IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
- ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"),
-
- //RFC 6874
- IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$),
-
- //RFC 6874
- IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$),
-
- //RFC 6874, with relaxed parsing rules
- IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"),
- IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"),
-
- //RFC 6874
- REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"),
- HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$),
- PORT$ = subexp(DIGIT$$ + "*"),
- AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"),
- PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")),
- SEGMENT$ = subexp(PCHAR$ + "*"),
- SEGMENT_NZ$ = subexp(PCHAR$ + "+"),
- SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"),
- PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"),
- PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"),
-
- //simplified
- PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$),
-
- //simplified
- PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$),
-
- //simplified
- PATH_EMPTY$ = "(?!" + PCHAR$ + ")",
- PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
- QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"),
- FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"),
- HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
- URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
- RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$),
- RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
- URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$),
- ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"),
- GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
- RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
- ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$",
- SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
- AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
- return {
- NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
- NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
- NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
- NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
- NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
- NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
- NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
- ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
- UNRESERVED: new RegExp(UNRESERVED$$, "g"),
- OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
- PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
- IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
- IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
- };
- }
- var URI_PROTOCOL = buildExps(false);
-
- var IRI_PROTOCOL = buildExps(true);
-
- var slicedToArray = function () {
- function sliceIterator(arr, i) {
- var _arr = [];
- var _n = true;
- var _d = false;
- var _e = undefined;
-
- try {
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
- _arr.push(_s.value);
-
- if (i && _arr.length === i) break;
- }
- } catch (err) {
- _d = true;
- _e = err;
- } finally {
- try {
- if (!_n && _i["return"]) _i["return"]();
- } finally {
- if (_d) throw _e;
- }
- }
-
- return _arr;
- }
-
- return function (arr, i) {
- if (Array.isArray(arr)) {
- return arr;
- } else if (Symbol.iterator in Object(arr)) {
- return sliceIterator(arr, i);
- } else {
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
- }
- };
- }();
-
- var toConsumableArray = function toConsumableArray(arr) {
- if (Array.isArray(arr)) {
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
- arr2[i] = arr[i];
- }return arr2;
- } else {
- return Array.from(arr);
- }
- };
-
- /** Highest positive signed 32-bit float value */
-
- var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
-
- /** Bootstring parameters */
- var base = 36;
- var tMin = 1;
- var tMax = 26;
- var skew = 38;
- var damp = 700;
- var initialBias = 72;
- var initialN = 128; // 0x80
- var delimiter = '-'; // '\x2D'
-
- /** Regular expressions */
- var regexPunycode = /^xn--/;
- var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
- var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
-
- /** Error messages */
- var errors = {
- 'overflow': 'Overflow: input needs wider integers to process',
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
- 'invalid-input': 'Invalid input'
- };
-
- /** Convenience shortcuts */
- var baseMinusTMin = base - tMin;
- var floor = Math.floor;
- var stringFromCharCode = String.fromCharCode;
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * A generic error utility function.
- * @private
- * @param {String} type The error type.
- * @returns {Error} Throws a `RangeError` with the applicable error message.
- */
- function error$1(type) {
- throw new RangeError(errors[type]);
- }
-
- /**
- * A generic `Array#map` utility function.
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} callback The function that gets called for every array
- * item.
- * @returns {Array} A new array of values returned by the callback function.
- */
- function map(array, fn) {
- var result = [];
- var length = array.length;
- while (length--) {
- result[length] = fn(array[length]);
- }
- return result;
- }
-
- /**
- * A simple `Array#map`-like wrapper to work with domain name strings or email
- * addresses.
- * @private
- * @param {String} domain The domain name or email address.
- * @param {Function} callback The function that gets called for every
- * character.
- * @returns {Array} A new string of characters returned by the callback
- * function.
- */
- function mapDomain(string, fn) {
- var parts = string.split('@');
- var result = '';
- if (parts.length > 1) {
- // In email addresses, only the domain name should be punycoded. Leave
- // the local part (i.e. everything up to `@`) intact.
- result = parts[0] + '@';
- string = parts[1];
- }
- // Avoid `split(regex)` for IE8 compatibility. See #17.
- string = string.replace(regexSeparators, '\x2E');
- var labels = string.split('.');
- var encoded = map(labels, fn).join('.');
- return result + encoded;
- }
-
- /**
- * Creates an array containing the numeric code points of each Unicode
- * character in the string. While JavaScript uses UCS-2 internally,
- * this function will convert a pair of surrogate halves (each of which
- * UCS-2 exposes as separate characters) into a single code point,
- * matching UTF-16.
- * @see `punycode.ucs2.encode`
- * @see
- * @memberOf punycode.ucs2
- * @name decode
- * @param {String} string The Unicode input string (UCS-2).
- * @returns {Array} The new array of code points.
- */
- function ucs2decode(string) {
- var output = [];
- var counter = 0;
- var length = string.length;
- while (counter < length) {
- var value = string.charCodeAt(counter++);
- if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
- // It's a high surrogate, and there is a next character.
- var extra = string.charCodeAt(counter++);
- if ((extra & 0xFC00) == 0xDC00) {
- // Low surrogate.
- output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
- } else {
- // It's an unmatched surrogate; only append this code unit, in case the
- // next code unit is the high surrogate of a surrogate pair.
- output.push(value);
- counter--;
- }
- } else {
- output.push(value);
- }
- }
- return output;
- }
-
- /**
- * Creates a string based on an array of numeric code points.
- * @see `punycode.ucs2.decode`
- * @memberOf punycode.ucs2
- * @name encode
- * @param {Array} codePoints The array of numeric code points.
- * @returns {String} The new Unicode string (UCS-2).
- */
- var ucs2encode = function ucs2encode(array) {
- return String.fromCodePoint.apply(String, toConsumableArray(array));
- };
-
- /**
- * Converts a basic code point into a digit/integer.
- * @see `digitToBasic()`
- * @private
- * @param {Number} codePoint The basic numeric code point value.
- * @returns {Number} The numeric value of a basic code point (for use in
- * representing integers) in the range `0` to `base - 1`, or `base` if
- * the code point does not represent a value.
- */
- var basicToDigit = function basicToDigit(codePoint) {
- if (codePoint - 0x30 < 0x0A) {
- return codePoint - 0x16;
- }
- if (codePoint - 0x41 < 0x1A) {
- return codePoint - 0x41;
- }
- if (codePoint - 0x61 < 0x1A) {
- return codePoint - 0x61;
- }
- return base;
- };
-
- /**
- * Converts a digit/integer into a basic code point.
- * @see `basicToDigit()`
- * @private
- * @param {Number} digit The numeric value of a basic code point.
- * @returns {Number} The basic code point whose value (when used for
- * representing integers) is `digit`, which needs to be in the range
- * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
- * used; else, the lowercase form is used. The behavior is undefined
- * if `flag` is non-zero and `digit` has no uppercase form.
- */
- var digitToBasic = function digitToBasic(digit, flag) {
- // 0..25 map to ASCII a..z or A..Z
- // 26..35 map to ASCII 0..9
- return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
- };
-
- /**
- * Bias adaptation function as per section 3.4 of RFC 3492.
- * https://tools.ietf.org/html/rfc3492#section-3.4
- * @private
- */
- var adapt = function adapt(delta, numPoints, firstTime) {
- var k = 0;
- delta = firstTime ? floor(delta / damp) : delta >> 1;
- delta += floor(delta / numPoints);
- for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {
- delta = floor(delta / baseMinusTMin);
- }
- return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
- };
-
- /**
- * Converts a Punycode string of ASCII-only symbols to a string of Unicode
- * symbols.
- * @memberOf punycode
- * @param {String} input The Punycode string of ASCII-only symbols.
- * @returns {String} The resulting string of Unicode symbols.
- */
- var decode = function decode(input) {
- // Don't use UCS-2.
- var output = [];
- var inputLength = input.length;
- var i = 0;
- var n = initialN;
- var bias = initialBias;
-
- // Handle the basic code points: let `basic` be the number of input code
- // points before the last delimiter, or `0` if there is none, then copy
- // the first basic code points to the output.
-
- var basic = input.lastIndexOf(delimiter);
- if (basic < 0) {
- basic = 0;
- }
-
- for (var j = 0; j < basic; ++j) {
- // if it's not a basic code point
- if (input.charCodeAt(j) >= 0x80) {
- error$1('not-basic');
- }
- output.push(input.charCodeAt(j));
- }
-
- // Main decoding loop: start just after the last delimiter if any basic code
- // points were copied; start at the beginning otherwise.
-
- for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{
-
- // `index` is the index of the next character to be consumed.
- // Decode a generalized variable-length integer into `delta`,
- // which gets added to `i`. The overflow checking is easier
- // if we increase `i` as we go, then subtract off its starting
- // value at the end to obtain `delta`.
- var oldi = i;
- for (var w = 1, k = base;; /* no condition */k += base) {
-
- if (index >= inputLength) {
- error$1('invalid-input');
- }
-
- var digit = basicToDigit(input.charCodeAt(index++));
-
- if (digit >= base || digit > floor((maxInt - i) / w)) {
- error$1('overflow');
- }
-
- i += digit * w;
- var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
-
- if (digit < t) {
- break;
- }
-
- var baseMinusT = base - t;
- if (w > floor(maxInt / baseMinusT)) {
- error$1('overflow');
- }
-
- w *= baseMinusT;
- }
-
- var out = output.length + 1;
- bias = adapt(i - oldi, out, oldi == 0);
-
- // `i` was supposed to wrap around from `out` to `0`,
- // incrementing `n` each time, so we'll fix that now:
- if (floor(i / out) > maxInt - n) {
- error$1('overflow');
- }
-
- n += floor(i / out);
- i %= out;
-
- // Insert `n` at position `i` of the output.
- output.splice(i++, 0, n);
- }
-
- return String.fromCodePoint.apply(String, output);
- };
-
- /**
- * Converts a string of Unicode symbols (e.g. a domain name label) to a
- * Punycode string of ASCII-only symbols.
- * @memberOf punycode
- * @param {String} input The string of Unicode symbols.
- * @returns {String} The resulting Punycode string of ASCII-only symbols.
- */
- var encode = function encode(input) {
- var output = [];
-
- // Convert the input in UCS-2 to an array of Unicode code points.
- input = ucs2decode(input);
-
- // Cache the length.
- var inputLength = input.length;
-
- // Initialize the state.
- var n = initialN;
- var delta = 0;
- var bias = initialBias;
-
- // Handle the basic code points.
- var _iteratorNormalCompletion = true;
- var _didIteratorError = false;
- var _iteratorError = undefined;
-
- try {
- for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
- var _currentValue2 = _step.value;
-
- if (_currentValue2 < 0x80) {
- output.push(stringFromCharCode(_currentValue2));
- }
- }
- } catch (err) {
- _didIteratorError = true;
- _iteratorError = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion && _iterator.return) {
- _iterator.return();
- }
- } finally {
- if (_didIteratorError) {
- throw _iteratorError;
- }
- }
- }
-
- var basicLength = output.length;
- var handledCPCount = basicLength;
-
- // `handledCPCount` is the number of code points that have been handled;
- // `basicLength` is the number of basic code points.
-
- // Finish the basic string with a delimiter unless it's empty.
- if (basicLength) {
- output.push(delimiter);
- }
-
- // Main encoding loop:
- while (handledCPCount < inputLength) {
-
- // All non-basic code points < n have been handled already. Find the next
- // larger one:
- var m = maxInt;
- var _iteratorNormalCompletion2 = true;
- var _didIteratorError2 = false;
- var _iteratorError2 = undefined;
-
- try {
- for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
- var currentValue = _step2.value;
-
- if (currentValue >= n && currentValue < m) {
- m = currentValue;
- }
- }
-
- // Increase `delta` enough to advance the decoder's state to ,
- // but guard against overflow.
- } catch (err) {
- _didIteratorError2 = true;
- _iteratorError2 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion2 && _iterator2.return) {
- _iterator2.return();
- }
- } finally {
- if (_didIteratorError2) {
- throw _iteratorError2;
- }
- }
- }
-
- var handledCPCountPlusOne = handledCPCount + 1;
- if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
- error$1('overflow');
- }
-
- delta += (m - n) * handledCPCountPlusOne;
- n = m;
-
- var _iteratorNormalCompletion3 = true;
- var _didIteratorError3 = false;
- var _iteratorError3 = undefined;
-
- try {
- for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
- var _currentValue = _step3.value;
-
- if (_currentValue < n && ++delta > maxInt) {
- error$1('overflow');
- }
- if (_currentValue == n) {
- // Represent delta as a generalized variable-length integer.
- var q = delta;
- for (var k = base;; /* no condition */k += base) {
- var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
- if (q < t) {
- break;
- }
- var qMinusT = q - t;
- var baseMinusT = base - t;
- output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
- q = floor(qMinusT / baseMinusT);
- }
-
- output.push(stringFromCharCode(digitToBasic(q, 0)));
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
- delta = 0;
- ++handledCPCount;
- }
- }
- } catch (err) {
- _didIteratorError3 = true;
- _iteratorError3 = err;
- } finally {
- try {
- if (!_iteratorNormalCompletion3 && _iterator3.return) {
- _iterator3.return();
- }
- } finally {
- if (_didIteratorError3) {
- throw _iteratorError3;
- }
- }
- }
-
- ++delta;
- ++n;
- }
- return output.join('');
- };
-
- /**
- * Converts a Punycode string representing a domain name or an email address
- * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
- * it doesn't matter if you call it on a string that has already been
- * converted to Unicode.
- * @memberOf punycode
- * @param {String} input The Punycoded domain name or email address to
- * convert to Unicode.
- * @returns {String} The Unicode representation of the given Punycode
- * string.
- */
- var toUnicode = function toUnicode(input) {
- return mapDomain(input, function (string) {
- return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
- });
- };
-
- /**
- * Converts a Unicode string representing a domain name or an email address to
- * Punycode. Only the non-ASCII parts of the domain name will be converted,
- * i.e. it doesn't matter if you call it with a domain that's already in
- * ASCII.
- * @memberOf punycode
- * @param {String} input The domain name or email address to convert, as a
- * Unicode string.
- * @returns {String} The Punycode representation of the given domain name or
- * email address.
- */
- var toASCII = function toASCII(input) {
- return mapDomain(input, function (string) {
- return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
- });
- };
-
- /*--------------------------------------------------------------------------*/
-
- /** Define the public API */
- var punycode = {
- /**
- * A string representing the current Punycode.js version number.
- * @memberOf punycode
- * @type String
- */
- 'version': '2.1.0',
- /**
- * An object of methods to convert from JavaScript's internal character
- * representation (UCS-2) to Unicode code points, and back.
- * @see
- * @memberOf punycode
- * @type Object
- */
- 'ucs2': {
- 'decode': ucs2decode,
- 'encode': ucs2encode
- },
- 'decode': decode,
- 'encode': encode,
- 'toASCII': toASCII,
- 'toUnicode': toUnicode
- };
-
- /**
- * URI.js
- *
- * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
- * @author Gary Court
- * @see http://github.com/garycourt/uri-js
- */
- /**
- * Copyright 2011 Gary Court. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and should not be interpreted as representing official policies, either expressed
- * or implied, of Gary Court.
- */
- var SCHEMES = {};
- function pctEncChar(chr) {
- var c = chr.charCodeAt(0);
- var e = void 0;
- if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
- return e;
- }
- function pctDecChars(str) {
- var newStr = "";
- var i = 0;
- var il = str.length;
- while (i < il) {
- var c = parseInt(str.substr(i + 1, 2), 16);
- if (c < 128) {
- newStr += String.fromCharCode(c);
- i += 3;
- } else if (c >= 194 && c < 224) {
- if (il - i >= 6) {
- var c2 = parseInt(str.substr(i + 4, 2), 16);
- newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
- } else {
- newStr += str.substr(i, 6);
- }
- i += 6;
- } else if (c >= 224) {
- if (il - i >= 9) {
- var _c = parseInt(str.substr(i + 4, 2), 16);
- var c3 = parseInt(str.substr(i + 7, 2), 16);
- newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
- } else {
- newStr += str.substr(i, 9);
- }
- i += 9;
- } else {
- newStr += str.substr(i, 3);
- i += 3;
- }
- }
- return newStr;
- }
- function _normalizeComponentEncoding(components, protocol) {
- function decodeUnreserved(str) {
- var decStr = pctDecChars(str);
- return !decStr.match(protocol.UNRESERVED) ? str : decStr;
- }
- if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
- if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
- if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
- if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
- if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
- if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
- return components;
- }
-
- function _stripLeadingZeros(str) {
- return str.replace(/^0*(.*)/, "$1") || "0";
- }
- function _normalizeIPv4(host, protocol) {
- var matches = host.match(protocol.IPV4ADDRESS) || [];
-
- var _matches = slicedToArray(matches, 2),
- address = _matches[1];
-
- if (address) {
- return address.split(".").map(_stripLeadingZeros).join(".");
- } else {
- return host;
- }
- }
- function _normalizeIPv6(host, protocol) {
- var matches = host.match(protocol.IPV6ADDRESS) || [];
-
- var _matches2 = slicedToArray(matches, 3),
- address = _matches2[1],
- zone = _matches2[2];
-
- if (address) {
- var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(),
- _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),
- last = _address$toLowerCase$2[0],
- first = _address$toLowerCase$2[1];
-
- var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
- var lastFields = last.split(":").map(_stripLeadingZeros);
- var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
- var fieldCount = isLastFieldIPv4Address ? 7 : 8;
- var lastFieldsStart = lastFields.length - fieldCount;
- var fields = Array(fieldCount);
- for (var x = 0; x < fieldCount; ++x) {
- fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
- }
- if (isLastFieldIPv4Address) {
- fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
- }
- var allZeroFields = fields.reduce(function (acc, field, index) {
- if (!field || field === "0") {
- var lastLongest = acc[acc.length - 1];
- if (lastLongest && lastLongest.index + lastLongest.length === index) {
- lastLongest.length++;
- } else {
- acc.push({ index: index, length: 1 });
- }
- }
- return acc;
- }, []);
- var longestZeroFields = allZeroFields.sort(function (a, b) {
- return b.length - a.length;
- })[0];
- var newHost = void 0;
- if (longestZeroFields && longestZeroFields.length > 1) {
- var newFirst = fields.slice(0, longestZeroFields.index);
- var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
- newHost = newFirst.join(":") + "::" + newLast.join(":");
- } else {
- newHost = fields.join(":");
- }
- if (zone) {
- newHost += "%" + zone;
- }
- return newHost;
- } else {
- return host;
- }
- }
- var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
- var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
- function parse(uriString) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var components = {};
- var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
- if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
- var matches = uriString.match(URI_PARSE);
- if (matches) {
- if (NO_MATCH_IS_UNDEFINED) {
- //store each component
- components.scheme = matches[1];
- components.userinfo = matches[3];
- components.host = matches[4];
- components.port = parseInt(matches[5], 10);
- components.path = matches[6] || "";
- components.query = matches[7];
- components.fragment = matches[8];
- //fix port number
- if (isNaN(components.port)) {
- components.port = matches[5];
- }
- } else {
- //IE FIX for improper RegExp matching
- //store each component
- components.scheme = matches[1] || undefined;
- components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
- components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
- components.port = parseInt(matches[5], 10);
- components.path = matches[6] || "";
- components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
- components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
- //fix port number
- if (isNaN(components.port)) {
- components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
- }
- }
- if (components.host) {
- //normalize IP hosts
- components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
- }
- //determine reference type
- if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
- components.reference = "same-document";
- } else if (components.scheme === undefined) {
- components.reference = "relative";
- } else if (components.fragment === undefined) {
- components.reference = "absolute";
- } else {
- components.reference = "uri";
- }
- //check for reference errors
- if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
- components.error = components.error || "URI is not a " + options.reference + " reference.";
- }
- //find scheme handler
- var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
- //check if scheme can't handle IRIs
- if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
- //if host component is a domain name
- if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
- //convert Unicode IDN -> ASCII IDN
- try {
- components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
- } catch (e) {
- components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
- }
- }
- //convert IRI -> URI
- _normalizeComponentEncoding(components, URI_PROTOCOL);
- } else {
- //normalize encodings
- _normalizeComponentEncoding(components, protocol);
- }
- //perform scheme specific parsing
- if (schemeHandler && schemeHandler.parse) {
- schemeHandler.parse(components, options);
- }
- } else {
- components.error = components.error || "URI can not be parsed.";
- }
- return components;
- }
-
- function _recomposeAuthority(components, options) {
- var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
- var uriTokens = [];
- if (components.userinfo !== undefined) {
- uriTokens.push(components.userinfo);
- uriTokens.push("@");
- }
- if (components.host !== undefined) {
- //normalize IP hosts, add brackets and escape zone separator for IPv6
- uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) {
- return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
- }));
- }
- if (typeof components.port === "number") {
- uriTokens.push(":");
- uriTokens.push(components.port.toString(10));
- }
- return uriTokens.length ? uriTokens.join("") : undefined;
- }
-
- var RDS1 = /^\.\.?\//;
- var RDS2 = /^\/\.(\/|$)/;
- var RDS3 = /^\/\.\.(\/|$)/;
- var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
- function removeDotSegments(input) {
- var output = [];
- while (input.length) {
- if (input.match(RDS1)) {
- input = input.replace(RDS1, "");
- } else if (input.match(RDS2)) {
- input = input.replace(RDS2, "/");
- } else if (input.match(RDS3)) {
- input = input.replace(RDS3, "/");
- output.pop();
- } else if (input === "." || input === "..") {
- input = "";
- } else {
- var im = input.match(RDS5);
- if (im) {
- var s = im[0];
- input = input.slice(s.length);
- output.push(s);
- } else {
- throw new Error("Unexpected dot segment condition");
- }
- }
- }
- return output.join("");
- }
-
- function serialize(components) {
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
- var uriTokens = [];
- //find scheme handler
- var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
- //perform scheme specific serialization
- if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
- if (components.host) {
- //if host component is an IPv6 address
- if (protocol.IPV6ADDRESS.test(components.host)) {}
- //TODO: normalize IPv6 address as per RFC 5952
-
- //if host component is a domain name
- else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
- //convert IDN via punycode
- try {
- components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
- } catch (e) {
- components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
- }
- }
- }
- //normalize encoding
- _normalizeComponentEncoding(components, protocol);
- if (options.reference !== "suffix" && components.scheme) {
- uriTokens.push(components.scheme);
- uriTokens.push(":");
- }
- var authority = _recomposeAuthority(components, options);
- if (authority !== undefined) {
- if (options.reference !== "suffix") {
- uriTokens.push("//");
- }
- uriTokens.push(authority);
- if (components.path && components.path.charAt(0) !== "/") {
- uriTokens.push("/");
- }
- }
- if (components.path !== undefined) {
- var s = components.path;
- if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
- s = removeDotSegments(s);
- }
- if (authority === undefined) {
- s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
- }
- uriTokens.push(s);
- }
- if (components.query !== undefined) {
- uriTokens.push("?");
- uriTokens.push(components.query);
- }
- if (components.fragment !== undefined) {
- uriTokens.push("#");
- uriTokens.push(components.fragment);
- }
- return uriTokens.join(""); //merge tokens into a string
- }
-
- function resolveComponents(base, relative) {
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
- var skipNormalization = arguments[3];
-
- var target = {};
- if (!skipNormalization) {
- base = parse(serialize(base, options), options); //normalize base components
- relative = parse(serialize(relative, options), options); //normalize relative components
- }
- options = options || {};
- if (!options.tolerant && relative.scheme) {
- target.scheme = relative.scheme;
- //target.authority = relative.authority;
- target.userinfo = relative.userinfo;
- target.host = relative.host;
- target.port = relative.port;
- target.path = removeDotSegments(relative.path || "");
- target.query = relative.query;
- } else {
- if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
- //target.authority = relative.authority;
- target.userinfo = relative.userinfo;
- target.host = relative.host;
- target.port = relative.port;
- target.path = removeDotSegments(relative.path || "");
- target.query = relative.query;
- } else {
- if (!relative.path) {
- target.path = base.path;
- if (relative.query !== undefined) {
- target.query = relative.query;
- } else {
- target.query = base.query;
- }
- } else {
- if (relative.path.charAt(0) === "/") {
- target.path = removeDotSegments(relative.path);
- } else {
- if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
- target.path = "/" + relative.path;
- } else if (!base.path) {
- target.path = relative.path;
- } else {
- target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
- }
- target.path = removeDotSegments(target.path);
- }
- target.query = relative.query;
- }
- //target.authority = base.authority;
- target.userinfo = base.userinfo;
- target.host = base.host;
- target.port = base.port;
- }
- target.scheme = base.scheme;
- }
- target.fragment = relative.fragment;
- return target;
- }
-
- function resolve(baseURI, relativeURI, options) {
- var schemelessOptions = assign({ scheme: 'null' }, options);
- return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
- }
-
- function normalize(uri, options) {
- if (typeof uri === "string") {
- uri = serialize(parse(uri, options), options);
- } else if (typeOf(uri) === "object") {
- uri = parse(serialize(uri, options), options);
- }
- return uri;
- }
-
- function equal(uriA, uriB, options) {
- if (typeof uriA === "string") {
- uriA = serialize(parse(uriA, options), options);
- } else if (typeOf(uriA) === "object") {
- uriA = serialize(uriA, options);
- }
- if (typeof uriB === "string") {
- uriB = serialize(parse(uriB, options), options);
- } else if (typeOf(uriB) === "object") {
- uriB = serialize(uriB, options);
- }
- return uriA === uriB;
- }
-
- function escapeComponent(str, options) {
- return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
- }
-
- function unescapeComponent(str, options) {
- return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
- }
-
- var handler = {
- scheme: "http",
- domainHost: true,
- parse: function parse(components, options) {
- //report missing host
- if (!components.host) {
- components.error = components.error || "HTTP URIs must have a host.";
- }
- return components;
- },
- serialize: function serialize(components, options) {
- //normalize the default port
- if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") {
- components.port = undefined;
- }
- //normalize the empty path
- if (!components.path) {
- components.path = "/";
- }
- //NOTE: We do not parse query strings for HTTP URIs
- //as WWW Form Url Encoded query strings are part of the HTML4+ spec,
- //and not the HTTP spec.
- return components;
- }
- };
-
- var handler$1 = {
- scheme: "https",
- domainHost: handler.domainHost,
- parse: handler.parse,
- serialize: handler.serialize
- };
-
- var O = {};
- var isIRI = true;
- //RFC 3986
- var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? '\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF' : "") + "]";
- var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
- var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
- //RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
- //const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
- //const WSP$$ = "[\\x20\\x09]";
- //const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
- //const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
- //const VCHAR$$ = "[\\x21-\\x7E]";
- //const WSP$$ = "[\\x20\\x09]";
- //const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
- //const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
- //const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
- //const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
- var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
- var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
- var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
- var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
- var UNRESERVED = new RegExp(UNRESERVED$$, "g");
- var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
- var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
- var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
- var NOT_HFVALUE = NOT_HFNAME;
- function decodeUnreserved(str) {
- var decStr = pctDecChars(str);
- return !decStr.match(UNRESERVED) ? str : decStr;
- }
- var handler$2 = {
- scheme: "mailto",
- parse: function parse$$1(components, options) {
- var mailtoComponents = components;
- var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
- mailtoComponents.path = undefined;
- if (mailtoComponents.query) {
- var unknownHeaders = false;
- var headers = {};
- var hfields = mailtoComponents.query.split("&");
- for (var x = 0, xl = hfields.length; x < xl; ++x) {
- var hfield = hfields[x].split("=");
- switch (hfield[0]) {
- case "to":
- var toAddrs = hfield[1].split(",");
- for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
- to.push(toAddrs[_x]);
- }
- break;
- case "subject":
- mailtoComponents.subject = unescapeComponent(hfield[1], options);
- break;
- case "body":
- mailtoComponents.body = unescapeComponent(hfield[1], options);
- break;
- default:
- unknownHeaders = true;
- headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
- break;
- }
- }
- if (unknownHeaders) mailtoComponents.headers = headers;
- }
- mailtoComponents.query = undefined;
- for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
- var addr = to[_x2].split("@");
- addr[0] = unescapeComponent(addr[0]);
- if (!options.unicodeSupport) {
- //convert Unicode IDN -> ASCII IDN
- try {
- addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
- } catch (e) {
- mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
- }
- } else {
- addr[1] = unescapeComponent(addr[1], options).toLowerCase();
- }
- to[_x2] = addr.join("@");
- }
- return mailtoComponents;
- },
- serialize: function serialize$$1(mailtoComponents, options) {
- var components = mailtoComponents;
- var to = toArray(mailtoComponents.to);
- if (to) {
- for (var x = 0, xl = to.length; x < xl; ++x) {
- var toAddr = String(to[x]);
- var atIdx = toAddr.lastIndexOf("@");
- var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
- var domain = toAddr.slice(atIdx + 1);
- //convert IDN via punycode
- try {
- domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
- } catch (e) {
- components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
- }
- to[x] = localPart + "@" + domain;
- }
- components.path = to.join(",");
- }
- var headers = mailtoComponents.headers = mailtoComponents.headers || {};
- if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
- if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
- var fields = [];
- for (var name in headers) {
- if (headers[name] !== O[name]) {
- fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
- }
- }
- if (fields.length) {
- components.query = fields.join("&");
- }
- return components;
- }
- };
-
- var URN_PARSE = /^([^\:]+)\:(.*)/;
- //RFC 2141
- var handler$3 = {
- scheme: "urn",
- parse: function parse$$1(components, options) {
- var matches = components.path && components.path.match(URN_PARSE);
- var urnComponents = components;
- if (matches) {
- var scheme = options.scheme || urnComponents.scheme || "urn";
- var nid = matches[1].toLowerCase();
- var nss = matches[2];
- var urnScheme = scheme + ":" + (options.nid || nid);
- var schemeHandler = SCHEMES[urnScheme];
- urnComponents.nid = nid;
- urnComponents.nss = nss;
- urnComponents.path = undefined;
- if (schemeHandler) {
- urnComponents = schemeHandler.parse(urnComponents, options);
- }
- } else {
- urnComponents.error = urnComponents.error || "URN can not be parsed.";
- }
- return urnComponents;
- },
- serialize: function serialize$$1(urnComponents, options) {
- var scheme = options.scheme || urnComponents.scheme || "urn";
- var nid = urnComponents.nid;
- var urnScheme = scheme + ":" + (options.nid || nid);
- var schemeHandler = SCHEMES[urnScheme];
- if (schemeHandler) {
- urnComponents = schemeHandler.serialize(urnComponents, options);
- }
- var uriComponents = urnComponents;
- var nss = urnComponents.nss;
- uriComponents.path = (nid || options.nid) + ":" + nss;
- return uriComponents;
- }
- };
-
- var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
- //RFC 4122
- var handler$4 = {
- scheme: "urn:uuid",
- parse: function parse(urnComponents, options) {
- var uuidComponents = urnComponents;
- uuidComponents.uuid = uuidComponents.nss;
- uuidComponents.nss = undefined;
- if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
- uuidComponents.error = uuidComponents.error || "UUID is not valid.";
- }
- return uuidComponents;
- },
- serialize: function serialize(uuidComponents, options) {
- var urnComponents = uuidComponents;
- //normalize UUID
- urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
- return urnComponents;
- }
- };
-
- SCHEMES[handler.scheme] = handler;
- SCHEMES[handler$1.scheme] = handler$1;
- SCHEMES[handler$2.scheme] = handler$2;
- SCHEMES[handler$3.scheme] = handler$3;
- SCHEMES[handler$4.scheme] = handler$4;
-
- exports.SCHEMES = SCHEMES;
- exports.pctEncChar = pctEncChar;
- exports.pctDecChars = pctDecChars;
- exports.parse = parse;
- exports.removeDotSegments = removeDotSegments;
- exports.serialize = serialize;
- exports.resolveComponents = resolveComponents;
- exports.resolve = resolve;
- exports.normalize = normalize;
- exports.equal = equal;
- exports.escapeComponent = escapeComponent;
- exports.unescapeComponent = unescapeComponent;
-
- Object.defineProperty(exports, '__esModule', { value: true });
-});
-
-
-},{}],109:[function(require,module,exports){
-arguments[4][48][0].apply(exports,arguments)
-},{"dup":48}],110:[function(require,module,exports){
-arguments[4][49][0].apply(exports,arguments)
-},{"./support/isBuffer":109,"_process":103,"dup":49,"inherits":87}],111:[function(require,module,exports){
-module.exports={
- "name": "eslint",
- "version": "5.11.1",
- "author": "Nicholas C. Zakas ",
- "description": "An AST-based pattern checker for JavaScript.",
- "bin": {
- "eslint": "./bin/eslint.js"
- },
- "main": "./lib/api.js",
- "scripts": {
- "test": "node Makefile.js test",
- "lint": "node Makefile.js lint",
- "fuzz": "node Makefile.js fuzz",
- "generate-release": "node Makefile.js generateRelease",
- "generate-alpharelease": "node Makefile.js generatePrerelease -- alpha",
- "generate-betarelease": "node Makefile.js generatePrerelease -- beta",
- "generate-rcrelease": "node Makefile.js generatePrerelease -- rc",
- "publish-release": "node Makefile.js publishRelease",
- "docs": "node Makefile.js docs",
- "gensite": "node Makefile.js gensite",
- "browserify": "node Makefile.js browserify",
- "perf": "node Makefile.js perf",
- "profile": "beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree",
- "coveralls": "cat ./coverage/lcov.info | coveralls"
- },
- "files": [
- "LICENSE",
- "README.md",
- "bin",
- "conf",
- "lib",
- "messages"
- ],
- "repository": "eslint/eslint",
- "homepage": "https://eslint.org",
- "bugs": "https://github.com/eslint/eslint/issues/",
- "dependencies": {
- "@babel/code-frame": "^7.0.0",
- "ajv": "^6.5.3",
- "chalk": "^2.1.0",
- "cross-spawn": "^6.0.5",
- "debug": "^4.0.1",
- "doctrine": "^2.1.0",
- "eslint-scope": "^4.0.0",
- "eslint-utils": "^1.3.1",
- "eslint-visitor-keys": "^1.0.0",
- "espree": "^5.0.0",
- "esquery": "^1.0.1",
- "esutils": "^2.0.2",
- "file-entry-cache": "^2.0.0",
- "functional-red-black-tree": "^1.0.1",
- "glob": "^7.1.2",
- "globals": "^11.7.0",
- "ignore": "^4.0.6",
- "imurmurhash": "^0.1.4",
- "inquirer": "^6.1.0",
- "js-yaml": "^3.12.0",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.3.0",
- "lodash": "^4.17.5",
- "minimatch": "^3.0.4",
- "mkdirp": "^0.5.1",
- "natural-compare": "^1.4.0",
- "optionator": "^0.8.2",
- "path-is-inside": "^1.0.2",
- "pluralize": "^7.0.0",
- "progress": "^2.0.0",
- "regexpp": "^2.0.1",
- "require-uncached": "^1.0.3",
- "semver": "^5.5.1",
- "strip-ansi": "^4.0.0",
- "strip-json-comments": "^2.0.1",
- "table": "^5.0.2",
- "text-table": "^0.2.0"
- },
- "devDependencies": {
- "babel-core": "^6.26.3",
- "babel-polyfill": "^6.26.0",
- "babel-preset-es2015": "^6.24.1",
- "babelify": "^8.0.0",
- "beefy": "^2.1.8",
- "brfs": "^2.0.0",
- "browserify": "^16.2.2",
- "chai": "^4.0.1",
- "cheerio": "^0.22.0",
- "coveralls": "^3.0.1",
- "dateformat": "^3.0.3",
- "ejs": "^2.6.1",
- "eslint-plugin-eslint-plugin": "^1.4.1",
- "eslint-plugin-node": "^8.0.0",
- "eslint-plugin-rulesdir": "^0.1.0",
- "eslint-release": "^1.2.0",
- "eslint-rule-composer": "^0.3.0",
- "eslump": "^1.6.2",
- "esprima": "^4.0.1",
- "istanbul": "^0.4.5",
- "jsdoc": "^3.5.5",
- "karma": "^3.0.0",
- "karma-babel-preprocessor": "^7.0.0",
- "karma-mocha": "^1.3.0",
- "karma-mocha-reporter": "^2.2.3",
- "karma-phantomjs-launcher": "^1.0.4",
- "leche": "^2.2.3",
- "load-perf": "^0.2.0",
- "markdownlint": "^0.11.0",
- "mocha": "^5.0.5",
- "mock-fs": "^4.6.0",
- "npm-license": "^0.3.3",
- "phantomjs-prebuilt": "^2.1.16",
- "proxyquire": "^2.0.1",
- "shelljs": "^0.8.2",
- "sinon": "^3.3.0",
- "temp": "^0.8.3",
- "through": "^2.3.8"
- },
- "keywords": [
- "ast",
- "lint",
- "javascript",
- "ecmascript",
- "espree"
- ],
- "license": "MIT",
- "engines": {
- "node": "^6.14.0 || ^8.10.0 || >=9.10.0"
- }
-}
-
-},{}],112:[function(require,module,exports){
-/**
- * @fileoverview A class of the code path analyzer.
- * @author Toru Nagashima
- */
-
-"use strict";
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var assert = require("assert"),
- CodePath = require("./code-path"),
- CodePathSegment = require("./code-path-segment"),
- IdGenerator = require("./id-generator"),
- debug = require("./debug-helpers"),
- astUtils = require("../util/ast-utils");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Checks whether or not a given node is a `case` node (not `default` node).
- *
- * @param {ASTNode} node - A `SwitchCase` node to check.
- * @returns {boolean} `true` if the node is a `case` node (not `default` node).
- */
-function isCaseNode(node) {
- return Boolean(node.test);
-}
-
-/**
- * Checks whether the given logical operator is taken into account for the code
- * path analysis.
- *
- * @param {string} operator - The operator found in the LogicalExpression node
- * @returns {boolean} `true` if the operator is "&&" or "||"
- */
-function isHandledLogicalOperator(operator) {
- return operator === "&&" || operator === "||";
-}
-
-/**
- * Checks whether or not a given logical expression node goes different path
- * between the `true` case and the `false` case.
- *
- * @param {ASTNode} node - A node to check.
- * @returns {boolean} `true` if the node is a test of a choice statement.
- */
-function isForkingByTrueOrFalse(node) {
- var parent = node.parent;
-
- switch (parent.type) {
- case "ConditionalExpression":
- case "IfStatement":
- case "WhileStatement":
- case "DoWhileStatement":
- case "ForStatement":
- return parent.test === node;
-
- case "LogicalExpression":
- return isHandledLogicalOperator(parent.operator);
-
- default:
- return false;
- }
-}
-
-/**
- * Gets the boolean value of a given literal node.
- *
- * This is used to detect infinity loops (e.g. `while (true) {}`).
- * Statements preceded by an infinity loop are unreachable if the loop didn't
- * have any `break` statement.
- *
- * @param {ASTNode} node - A node to get.
- * @returns {boolean|undefined} a boolean value if the node is a Literal node,
- * otherwise `undefined`.
- */
-function getBooleanValueIfSimpleConstant(node) {
- if (node.type === "Literal") {
- return Boolean(node.value);
- }
- return void 0;
-}
-
-/**
- * Checks that a given identifier node is a reference or not.
- *
- * This is used to detect the first throwable node in a `try` block.
- *
- * @param {ASTNode} node - An Identifier node to check.
- * @returns {boolean} `true` if the node is a reference.
- */
-function isIdentifierReference(node) {
- var parent = node.parent;
-
- switch (parent.type) {
- case "LabeledStatement":
- case "BreakStatement":
- case "ContinueStatement":
- case "ArrayPattern":
- case "RestElement":
- case "ImportSpecifier":
- case "ImportDefaultSpecifier":
- case "ImportNamespaceSpecifier":
- case "CatchClause":
- return false;
-
- case "FunctionDeclaration":
- case "FunctionExpression":
- case "ArrowFunctionExpression":
- case "ClassDeclaration":
- case "ClassExpression":
- case "VariableDeclarator":
- return parent.id !== node;
-
- case "Property":
- case "MethodDefinition":
- return parent.key !== node || parent.computed || parent.shorthand;
-
- case "AssignmentPattern":
- return parent.key !== node;
-
- default:
- return true;
- }
-}
-
-/**
- * Updates the current segment with the head segment.
- * This is similar to local branches and tracking branches of git.
- *
- * To separate the current and the head is in order to not make useless segments.
- *
- * In this process, both "onCodePathSegmentStart" and "onCodePathSegmentEnd"
- * events are fired.
- *
- * @param {CodePathAnalyzer} analyzer - The instance.
- * @param {ASTNode} node - The current AST node.
- * @returns {void}
- */
-function forwardCurrentToHead(analyzer, node) {
- var codePath = analyzer.codePath;
- var state = CodePath.getState(codePath);
- var currentSegments = state.currentSegments;
- var headSegments = state.headSegments;
- var end = Math.max(currentSegments.length, headSegments.length);
- var i = void 0,
- currentSegment = void 0,
- headSegment = void 0;
-
- // Fires leaving events.
- for (i = 0; i < end; ++i) {
- currentSegment = currentSegments[i];
- headSegment = headSegments[i];
-
- if (currentSegment !== headSegment && currentSegment) {
- debug.dump("onCodePathSegmentEnd " + currentSegment.id);
-
- if (currentSegment.reachable) {
- analyzer.emitter.emit("onCodePathSegmentEnd", currentSegment, node);
- }
- }
- }
-
- // Update state.
- state.currentSegments = headSegments;
-
- // Fires entering events.
- for (i = 0; i < end; ++i) {
- currentSegment = currentSegments[i];
- headSegment = headSegments[i];
-
- if (currentSegment !== headSegment && headSegment) {
- debug.dump("onCodePathSegmentStart " + headSegment.id);
-
- CodePathSegment.markUsed(headSegment);
- if (headSegment.reachable) {
- analyzer.emitter.emit("onCodePathSegmentStart", headSegment, node);
- }
- }
- }
-}
-
-/**
- * Updates the current segment with empty.
- * This is called at the last of functions or the program.
- *
- * @param {CodePathAnalyzer} analyzer - The instance.
- * @param {ASTNode} node - The current AST node.
- * @returns {void}
- */
-function leaveFromCurrentSegment(analyzer, node) {
- var state = CodePath.getState(analyzer.codePath);
- var currentSegments = state.currentSegments;
-
- for (var i = 0; i < currentSegments.length; ++i) {
- var currentSegment = currentSegments[i];
-
- debug.dump("onCodePathSegmentEnd " + currentSegment.id);
- if (currentSegment.reachable) {
- analyzer.emitter.emit("onCodePathSegmentEnd", currentSegment, node);
- }
- }
-
- state.currentSegments = [];
-}
-
-/**
- * Updates the code path due to the position of a given node in the parent node
- * thereof.
- *
- * For example, if the node is `parent.consequent`, this creates a fork from the
- * current path.
- *
- * @param {CodePathAnalyzer} analyzer - The instance.
- * @param {ASTNode} node - The current AST node.
- * @returns {void}
- */
-function preprocess(analyzer, node) {
- var codePath = analyzer.codePath;
- var state = CodePath.getState(codePath);
- var parent = node.parent;
-
- switch (parent.type) {
- case "LogicalExpression":
- if (parent.right === node && isHandledLogicalOperator(parent.operator)) {
- state.makeLogicalRight();
- }
- break;
-
- case "ConditionalExpression":
- case "IfStatement":
-
- /*
- * Fork if this node is at `consequent`/`alternate`.
- * `popForkContext()` exists at `IfStatement:exit` and
- * `ConditionalExpression:exit`.
- */
- if (parent.consequent === node) {
- state.makeIfConsequent();
- } else if (parent.alternate === node) {
- state.makeIfAlternate();
- }
- break;
-
- case "SwitchCase":
- if (parent.consequent[0] === node) {
- state.makeSwitchCaseBody(false, !parent.test);
- }
- break;
-
- case "TryStatement":
- if (parent.handler === node) {
- state.makeCatchBlock();
- } else if (parent.finalizer === node) {
- state.makeFinallyBlock();
- }
- break;
-
- case "WhileStatement":
- if (parent.test === node) {
- state.makeWhileTest(getBooleanValueIfSimpleConstant(node));
- } else {
- assert(parent.body === node);
- state.makeWhileBody();
- }
- break;
-
- case "DoWhileStatement":
- if (parent.body === node) {
- state.makeDoWhileBody();
- } else {
- assert(parent.test === node);
- state.makeDoWhileTest(getBooleanValueIfSimpleConstant(node));
- }
- break;
-
- case "ForStatement":
- if (parent.test === node) {
- state.makeForTest(getBooleanValueIfSimpleConstant(node));
- } else if (parent.update === node) {
- state.makeForUpdate();
- } else if (parent.body === node) {
- state.makeForBody();
- }
- break;
-
- case "ForInStatement":
- case "ForOfStatement":
- if (parent.left === node) {
- state.makeForInOfLeft();
- } else if (parent.right === node) {
- state.makeForInOfRight();
- } else {
- assert(parent.body === node);
- state.makeForInOfBody();
- }
- break;
-
- case "AssignmentPattern":
-
- /*
- * Fork if this node is at `right`.
- * `left` is executed always, so it uses the current path.
- * `popForkContext()` exists at `AssignmentPattern:exit`.
- */
- if (parent.right === node) {
- state.pushForkContext();
- state.forkBypassPath();
- state.forkPath();
- }
- break;
-
- default:
- break;
- }
-}
-
-/**
- * Updates the code path due to the type of a given node in entering.
- *
- * @param {CodePathAnalyzer} analyzer - The instance.
- * @param {ASTNode} node - The current AST node.
- * @returns {void}
- */
-function processCodePathToEnter(analyzer, node) {
- var codePath = analyzer.codePath;
- var state = codePath && CodePath.getState(codePath);
- var parent = node.parent;
-
- switch (node.type) {
- case "Program":
- case "FunctionDeclaration":
- case "FunctionExpression":
- case "ArrowFunctionExpression":
- if (codePath) {
-
- // Emits onCodePathSegmentStart events if updated.
- forwardCurrentToHead(analyzer, node);
- debug.dumpState(node, state, false);
- }
-
- // Create the code path of this scope.
- codePath = analyzer.codePath = new CodePath(analyzer.idGenerator.next(), codePath, analyzer.onLooped);
- state = CodePath.getState(codePath);
-
- // Emits onCodePathStart events.
- debug.dump("onCodePathStart " + codePath.id);
- analyzer.emitter.emit("onCodePathStart", codePath, node);
- break;
-
- case "LogicalExpression":
- if (isHandledLogicalOperator(node.operator)) {
- state.pushChoiceContext(node.operator, isForkingByTrueOrFalse(node));
- }
- break;
-
- case "ConditionalExpression":
- case "IfStatement":
- state.pushChoiceContext("test", false);
- break;
-
- case "SwitchStatement":
- state.pushSwitchContext(node.cases.some(isCaseNode), astUtils.getLabel(node));
- break;
-
- case "TryStatement":
- state.pushTryContext(Boolean(node.finalizer));
- break;
-
- case "SwitchCase":
-
- /*
- * Fork if this node is after the 2st node in `cases`.
- * It's similar to `else` blocks.
- * The next `test` node is processed in this path.
- */
- if (parent.discriminant !== node && parent.cases[0] !== node) {
- state.forkPath();
- }
- break;
-
- case "WhileStatement":
- case "DoWhileStatement":
- case "ForStatement":
- case "ForInStatement":
- case "ForOfStatement":
- state.pushLoopContext(node.type, astUtils.getLabel(node));
- break;
-
- case "LabeledStatement":
- if (!astUtils.isBreakableStatement(node.body)) {
- state.pushBreakContext(false, node.label.name);
- }
- break;
-
- default:
- break;
- }
-
- // Emits onCodePathSegmentStart events if updated.
- forwardCurrentToHead(analyzer, node);
- debug.dumpState(node, state, false);
-}
-
-/**
- * Updates the code path due to the type of a given node in leaving.
- *
- * @param {CodePathAnalyzer} analyzer - The instance.
- * @param {ASTNode} node - The current AST node.
- * @returns {void}
- */
-function processCodePathToExit(analyzer, node) {
- var codePath = analyzer.codePath;
- var state = CodePath.getState(codePath);
- var dontForward = false;
-
- switch (node.type) {
- case "IfStatement":
- case "ConditionalExpression":
- state.popChoiceContext();
- break;
-
- case "LogicalExpression":
- if (isHandledLogicalOperator(node.operator)) {
- state.popChoiceContext();
- }
- break;
-
- case "SwitchStatement":
- state.popSwitchContext();
- break;
-
- case "SwitchCase":
-
- /*
- * This is the same as the process at the 1st `consequent` node in
- * `preprocess` function.
- * Must do if this `consequent` is empty.
- */
- if (node.consequent.length === 0) {
- state.makeSwitchCaseBody(true, !node.test);
- }
- if (state.forkContext.reachable) {
- dontForward = true;
- }
- break;
-
- case "TryStatement":
- state.popTryContext();
- break;
-
- case "BreakStatement":
- forwardCurrentToHead(analyzer, node);
- state.makeBreak(node.label && node.label.name);
- dontForward = true;
- break;
-
- case "ContinueStatement":
- forwardCurrentToHead(analyzer, node);
- state.makeContinue(node.label && node.label.name);
- dontForward = true;
- break;
-
- case "ReturnStatement":
- forwardCurrentToHead(analyzer, node);
- state.makeReturn();
- dontForward = true;
- break;
-
- case "ThrowStatement":
- forwardCurrentToHead(analyzer, node);
- state.makeThrow();
- dontForward = true;
- break;
-
- case "Identifier":
- if (isIdentifierReference(node)) {
- state.makeFirstThrowablePathInTryBlock();
- dontForward = true;
- }
- break;
-
- case "CallExpression":
- case "MemberExpression":
- case "NewExpression":
- state.makeFirstThrowablePathInTryBlock();
- break;
-
- case "WhileStatement":
- case "DoWhileStatement":
- case "ForStatement":
- case "ForInStatement":
- case "ForOfStatement":
- state.popLoopContext();
- break;
-
- case "AssignmentPattern":
- state.popForkContext();
- break;
-
- case "LabeledStatement":
- if (!astUtils.isBreakableStatement(node.body)) {
- state.popBreakContext();
- }
- break;
-
- default:
- break;
- }
-
- // Emits onCodePathSegmentStart events if updated.
- if (!dontForward) {
- forwardCurrentToHead(analyzer, node);
- }
- debug.dumpState(node, state, true);
-}
-
-/**
- * Updates the code path to finalize the current code path.
- *
- * @param {CodePathAnalyzer} analyzer - The instance.
- * @param {ASTNode} node - The current AST node.
- * @returns {void}
- */
-function postprocess(analyzer, node) {
- switch (node.type) {
- case "Program":
- case "FunctionDeclaration":
- case "FunctionExpression":
- case "ArrowFunctionExpression":
- {
- var codePath = analyzer.codePath;
-
- // Mark the current path as the final node.
- CodePath.getState(codePath).makeFinal();
-
- // Emits onCodePathSegmentEnd event of the current segments.
- leaveFromCurrentSegment(analyzer, node);
-
- // Emits onCodePathEnd event of this code path.
- debug.dump("onCodePathEnd " + codePath.id);
- analyzer.emitter.emit("onCodePathEnd", codePath, node);
- debug.dumpDot(codePath);
-
- codePath = analyzer.codePath = analyzer.codePath.upper;
- if (codePath) {
- debug.dumpState(node, CodePath.getState(codePath), true);
- }
- break;
- }
-
- default:
- break;
- }
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * The class to analyze code paths.
- * This class implements the EventGenerator interface.
- */
-
-var CodePathAnalyzer = function () {
-
- /**
- * @param {EventGenerator} eventGenerator - An event generator to wrap.
- */
- function CodePathAnalyzer(eventGenerator) {
- _classCallCheck(this, CodePathAnalyzer);
-
- this.original = eventGenerator;
- this.emitter = eventGenerator.emitter;
- this.codePath = null;
- this.idGenerator = new IdGenerator("s");
- this.currentNode = null;
- this.onLooped = this.onLooped.bind(this);
- }
-
- /**
- * Does the process to enter a given AST node.
- * This updates state of analysis and calls `enterNode` of the wrapped.
- *
- * @param {ASTNode} node - A node which is entering.
- * @returns {void}
- */
-
-
- _createClass(CodePathAnalyzer, [{
- key: "enterNode",
- value: function enterNode(node) {
- this.currentNode = node;
-
- // Updates the code path due to node's position in its parent node.
- if (node.parent) {
- preprocess(this, node);
- }
-
- /*
- * Updates the code path.
- * And emits onCodePathStart/onCodePathSegmentStart events.
- */
- processCodePathToEnter(this, node);
-
- // Emits node events.
- this.original.enterNode(node);
-
- this.currentNode = null;
- }
-
- /**
- * Does the process to leave a given AST node.
- * This updates state of analysis and calls `leaveNode` of the wrapped.
- *
- * @param {ASTNode} node - A node which is leaving.
- * @returns {void}
- */
-
- }, {
- key: "leaveNode",
- value: function leaveNode(node) {
- this.currentNode = node;
-
- /*
- * Updates the code path.
- * And emits onCodePathStart/onCodePathSegmentStart events.
- */
- processCodePathToExit(this, node);
-
- // Emits node events.
- this.original.leaveNode(node);
-
- // Emits the last onCodePathStart/onCodePathSegmentStart events.
- postprocess(this, node);
-
- this.currentNode = null;
- }
-
- /**
- * This is called on a code path looped.
- * Then this raises a looped event.
- *
- * @param {CodePathSegment} fromSegment - A segment of prev.
- * @param {CodePathSegment} toSegment - A segment of next.
- * @returns {void}
- */
-
- }, {
- key: "onLooped",
- value: function onLooped(fromSegment, toSegment) {
- if (fromSegment.reachable && toSegment.reachable) {
- debug.dump("onCodePathSegmentLoop " + fromSegment.id + " -> " + toSegment.id);
- this.emitter.emit("onCodePathSegmentLoop", fromSegment, toSegment, this.currentNode);
- }
- }
- }]);
-
- return CodePathAnalyzer;
-}();
-
-module.exports = CodePathAnalyzer;
-
-},{"../util/ast-utils":405,"./code-path":115,"./code-path-segment":113,"./debug-helpers":116,"./id-generator":118,"assert":46}],113:[function(require,module,exports){
-/**
- * @fileoverview A class of the code path segment.
- * @author Toru Nagashima
- */
-
-"use strict";
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var debug = require("./debug-helpers");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Checks whether or not a given segment is reachable.
- *
- * @param {CodePathSegment} segment - A segment to check.
- * @returns {boolean} `true` if the segment is reachable.
- */
-function isReachable(segment) {
- return segment.reachable;
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * A code path segment.
- */
-
-var CodePathSegment = function () {
-
- /**
- * @param {string} id - An identifier.
- * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
- * This array includes unreachable segments.
- * @param {boolean} reachable - A flag which shows this is reachable.
- */
- function CodePathSegment(id, allPrevSegments, reachable) {
- _classCallCheck(this, CodePathSegment);
-
- /**
- * The identifier of this code path.
- * Rules use it to store additional information of each rule.
- * @type {string}
- */
- this.id = id;
-
- /**
- * An array of the next segments.
- * @type {CodePathSegment[]}
- */
- this.nextSegments = [];
-
- /**
- * An array of the previous segments.
- * @type {CodePathSegment[]}
- */
- this.prevSegments = allPrevSegments.filter(isReachable);
-
- /**
- * An array of the next segments.
- * This array includes unreachable segments.
- * @type {CodePathSegment[]}
- */
- this.allNextSegments = [];
-
- /**
- * An array of the previous segments.
- * This array includes unreachable segments.
- * @type {CodePathSegment[]}
- */
- this.allPrevSegments = allPrevSegments;
-
- /**
- * A flag which shows this is reachable.
- * @type {boolean}
- */
- this.reachable = reachable;
-
- // Internal data.
- Object.defineProperty(this, "internal", {
- value: {
- used: false,
- loopedPrevSegments: []
- }
- });
-
- /* istanbul ignore if */
- if (debug.enabled) {
- this.internal.nodes = [];
- this.internal.exitNodes = [];
- }
- }
-
- /**
- * Checks a given previous segment is coming from the end of a loop.
- *
- * @param {CodePathSegment} segment - A previous segment to check.
- * @returns {boolean} `true` if the segment is coming from the end of a loop.
- */
-
-
- _createClass(CodePathSegment, [{
- key: "isLoopedPrevSegment",
- value: function isLoopedPrevSegment(segment) {
- return this.internal.loopedPrevSegments.indexOf(segment) !== -1;
- }
-
- /**
- * Creates the root segment.
- *
- * @param {string} id - An identifier.
- * @returns {CodePathSegment} The created segment.
- */
-
- }], [{
- key: "newRoot",
- value: function newRoot(id) {
- return new CodePathSegment(id, [], true);
- }
-
- /**
- * Creates a segment that follows given segments.
- *
- * @param {string} id - An identifier.
- * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
- * @returns {CodePathSegment} The created segment.
- */
-
- }, {
- key: "newNext",
- value: function newNext(id, allPrevSegments) {
- return new CodePathSegment(id, CodePathSegment.flattenUnusedSegments(allPrevSegments), allPrevSegments.some(isReachable));
- }
-
- /**
- * Creates an unreachable segment that follows given segments.
- *
- * @param {string} id - An identifier.
- * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
- * @returns {CodePathSegment} The created segment.
- */
-
- }, {
- key: "newUnreachable",
- value: function newUnreachable(id, allPrevSegments) {
- var segment = new CodePathSegment(id, CodePathSegment.flattenUnusedSegments(allPrevSegments), false);
-
- /*
- * In `if (a) return a; foo();` case, the unreachable segment preceded by
- * the return statement is not used but must not be remove.
- */
- CodePathSegment.markUsed(segment);
-
- return segment;
- }
-
- /**
- * Creates a segment that follows given segments.
- * This factory method does not connect with `allPrevSegments`.
- * But this inherits `reachable` flag.
- *
- * @param {string} id - An identifier.
- * @param {CodePathSegment[]} allPrevSegments - An array of the previous segments.
- * @returns {CodePathSegment} The created segment.
- */
-
- }, {
- key: "newDisconnected",
- value: function newDisconnected(id, allPrevSegments) {
- return new CodePathSegment(id, [], allPrevSegments.some(isReachable));
- }
-
- /**
- * Makes a given segment being used.
- *
- * And this function registers the segment into the previous segments as a next.
- *
- * @param {CodePathSegment} segment - A segment to mark.
- * @returns {void}
- */
-
- }, {
- key: "markUsed",
- value: function markUsed(segment) {
- if (segment.internal.used) {
- return;
- }
- segment.internal.used = true;
-
- var i = void 0;
-
- if (segment.reachable) {
- for (i = 0; i < segment.allPrevSegments.length; ++i) {
- var prevSegment = segment.allPrevSegments[i];
-
- prevSegment.allNextSegments.push(segment);
- prevSegment.nextSegments.push(segment);
- }
- } else {
- for (i = 0; i < segment.allPrevSegments.length; ++i) {
- segment.allPrevSegments[i].allNextSegments.push(segment);
- }
- }
- }
-
- /**
- * Marks a previous segment as looped.
- *
- * @param {CodePathSegment} segment - A segment.
- * @param {CodePathSegment} prevSegment - A previous segment to mark.
- * @returns {void}
- */
-
- }, {
- key: "markPrevSegmentAsLooped",
- value: function markPrevSegmentAsLooped(segment, prevSegment) {
- segment.internal.loopedPrevSegments.push(prevSegment);
- }
-
- /**
- * Replaces unused segments with the previous segments of each unused segment.
- *
- * @param {CodePathSegment[]} segments - An array of segments to replace.
- * @returns {CodePathSegment[]} The replaced array.
- */
-
- }, {
- key: "flattenUnusedSegments",
- value: function flattenUnusedSegments(segments) {
- var done = Object.create(null);
- var retv = [];
-
- for (var i = 0; i < segments.length; ++i) {
- var segment = segments[i];
-
- // Ignores duplicated.
- if (done[segment.id]) {
- continue;
- }
-
- // Use previous segments if unused.
- if (!segment.internal.used) {
- for (var j = 0; j < segment.allPrevSegments.length; ++j) {
- var prevSegment = segment.allPrevSegments[j];
-
- if (!done[prevSegment.id]) {
- done[prevSegment.id] = true;
- retv.push(prevSegment);
- }
- }
- } else {
- done[segment.id] = true;
- retv.push(segment);
- }
- }
-
- return retv;
- }
- }]);
-
- return CodePathSegment;
-}();
-
-module.exports = CodePathSegment;
-
-},{"./debug-helpers":116}],114:[function(require,module,exports){
-/**
- * @fileoverview A class to manage state of generating a code path.
- * @author Toru Nagashima
- */
-
-"use strict";
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var CodePathSegment = require("./code-path-segment"),
- ForkContext = require("./fork-context");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Adds given segments into the `dest` array.
- * If the `others` array does not includes the given segments, adds to the `all`
- * array as well.
- *
- * This adds only reachable and used segments.
- *
- * @param {CodePathSegment[]} dest - A destination array (`returnedSegments` or `thrownSegments`).
- * @param {CodePathSegment[]} others - Another destination array (`returnedSegments` or `thrownSegments`).
- * @param {CodePathSegment[]} all - The unified destination array (`finalSegments`).
- * @param {CodePathSegment[]} segments - Segments to add.
- * @returns {void}
- */
-function addToReturnedOrThrown(dest, others, all, segments) {
- for (var i = 0; i < segments.length; ++i) {
- var segment = segments[i];
-
- dest.push(segment);
- if (others.indexOf(segment) === -1) {
- all.push(segment);
- }
- }
-}
-
-/**
- * Gets a loop-context for a `continue` statement.
- *
- * @param {CodePathState} state - A state to get.
- * @param {string} label - The label of a `continue` statement.
- * @returns {LoopContext} A loop-context for a `continue` statement.
- */
-function getContinueContext(state, label) {
- if (!label) {
- return state.loopContext;
- }
-
- var context = state.loopContext;
-
- while (context) {
- if (context.label === label) {
- return context;
- }
- context = context.upper;
- }
-
- /* istanbul ignore next: foolproof (syntax error) */
- return null;
-}
-
-/**
- * Gets a context for a `break` statement.
- *
- * @param {CodePathState} state - A state to get.
- * @param {string} label - The label of a `break` statement.
- * @returns {LoopContext|SwitchContext} A context for a `break` statement.
- */
-function getBreakContext(state, label) {
- var context = state.breakContext;
-
- while (context) {
- if (label ? context.label === label : context.breakable) {
- return context;
- }
- context = context.upper;
- }
-
- /* istanbul ignore next: foolproof (syntax error) */
- return null;
-}
-
-/**
- * Gets a context for a `return` statement.
- *
- * @param {CodePathState} state - A state to get.
- * @returns {TryContext|CodePathState} A context for a `return` statement.
- */
-function getReturnContext(state) {
- var context = state.tryContext;
-
- while (context) {
- if (context.hasFinalizer && context.position !== "finally") {
- return context;
- }
- context = context.upper;
- }
-
- return state;
-}
-
-/**
- * Gets a context for a `throw` statement.
- *
- * @param {CodePathState} state - A state to get.
- * @returns {TryContext|CodePathState} A context for a `throw` statement.
- */
-function getThrowContext(state) {
- var context = state.tryContext;
-
- while (context) {
- if (context.position === "try" || context.hasFinalizer && context.position === "catch") {
- return context;
- }
- context = context.upper;
- }
-
- return state;
-}
-
-/**
- * Removes a given element from a given array.
- *
- * @param {any[]} xs - An array to remove the specific element.
- * @param {any} x - An element to be removed.
- * @returns {void}
- */
-function remove(xs, x) {
- xs.splice(xs.indexOf(x), 1);
-}
-
-/**
- * Disconnect given segments.
- *
- * This is used in a process for switch statements.
- * If there is the "default" chunk before other cases, the order is different
- * between node's and running's.
- *
- * @param {CodePathSegment[]} prevSegments - Forward segments to disconnect.
- * @param {CodePathSegment[]} nextSegments - Backward segments to disconnect.
- * @returns {void}
- */
-function removeConnection(prevSegments, nextSegments) {
- for (var i = 0; i < prevSegments.length; ++i) {
- var prevSegment = prevSegments[i];
- var nextSegment = nextSegments[i];
-
- remove(prevSegment.nextSegments, nextSegment);
- remove(prevSegment.allNextSegments, nextSegment);
- remove(nextSegment.prevSegments, prevSegment);
- remove(nextSegment.allPrevSegments, prevSegment);
- }
-}
-
-/**
- * Creates looping path.
- *
- * @param {CodePathState} state - The instance.
- * @param {CodePathSegment[]} unflattenedFromSegments - Segments which are source.
- * @param {CodePathSegment[]} unflattenedToSegments - Segments which are destination.
- * @returns {void}
- */
-function makeLooped(state, unflattenedFromSegments, unflattenedToSegments) {
- var fromSegments = CodePathSegment.flattenUnusedSegments(unflattenedFromSegments);
- var toSegments = CodePathSegment.flattenUnusedSegments(unflattenedToSegments);
-
- var end = Math.min(fromSegments.length, toSegments.length);
-
- for (var i = 0; i < end; ++i) {
- var fromSegment = fromSegments[i];
- var toSegment = toSegments[i];
-
- if (toSegment.reachable) {
- fromSegment.nextSegments.push(toSegment);
- }
- if (fromSegment.reachable) {
- toSegment.prevSegments.push(fromSegment);
- }
- fromSegment.allNextSegments.push(toSegment);
- toSegment.allPrevSegments.push(fromSegment);
-
- if (toSegment.allPrevSegments.length >= 2) {
- CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment);
- }
-
- state.notifyLooped(fromSegment, toSegment);
- }
-}
-
-/**
- * Finalizes segments of `test` chunk of a ForStatement.
- *
- * - Adds `false` paths to paths which are leaving from the loop.
- * - Sets `true` paths to paths which go to the body.
- *
- * @param {LoopContext} context - A loop context to modify.
- * @param {ChoiceContext} choiceContext - A choice context of this loop.
- * @param {CodePathSegment[]} head - The current head paths.
- * @returns {void}
- */
-function finalizeTestSegmentsOfFor(context, choiceContext, head) {
- if (!choiceContext.processed) {
- choiceContext.trueForkContext.add(head);
- choiceContext.falseForkContext.add(head);
- }
-
- if (context.test !== true) {
- context.brokenForkContext.addAll(choiceContext.falseForkContext);
- }
- context.endOfTestSegments = choiceContext.trueForkContext.makeNext(0, -1);
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * A class which manages state to analyze code paths.
- */
-
-var CodePathState = function () {
-
- /**
- * @param {IdGenerator} idGenerator - An id generator to generate id for code
- * path segments.
- * @param {Function} onLooped - A callback function to notify looping.
- */
- function CodePathState(idGenerator, onLooped) {
- _classCallCheck(this, CodePathState);
-
- this.idGenerator = idGenerator;
- this.notifyLooped = onLooped;
- this.forkContext = ForkContext.newRoot(idGenerator);
- this.choiceContext = null;
- this.switchContext = null;
- this.tryContext = null;
- this.loopContext = null;
- this.breakContext = null;
-
- this.currentSegments = [];
- this.initialSegment = this.forkContext.head[0];
-
- // returnedSegments and thrownSegments push elements into finalSegments also.
- var final = this.finalSegments = [];
- var returned = this.returnedForkContext = [];
- var thrown = this.thrownForkContext = [];
-
- returned.add = addToReturnedOrThrown.bind(null, returned, thrown, final);
- thrown.add = addToReturnedOrThrown.bind(null, thrown, returned, final);
- }
-
- /**
- * The head segments.
- * @type {CodePathSegment[]}
- */
-
-
- _createClass(CodePathState, [{
- key: "pushForkContext",
-
-
- /**
- * Creates and stacks new forking context.
- *
- * @param {boolean} forkLeavingPath - A flag which shows being in a
- * "finally" block.
- * @returns {ForkContext} The created context.
- */
- value: function pushForkContext(forkLeavingPath) {
- this.forkContext = ForkContext.newEmpty(this.forkContext, forkLeavingPath);
-
- return this.forkContext;
- }
-
- /**
- * Pops and merges the last forking context.
- * @returns {ForkContext} The last context.
- */
-
- }, {
- key: "popForkContext",
- value: function popForkContext() {
- var lastContext = this.forkContext;
-
- this.forkContext = lastContext.upper;
- this.forkContext.replaceHead(lastContext.makeNext(0, -1));
-
- return lastContext;
- }
-
- /**
- * Creates a new path.
- * @returns {void}
- */
-
- }, {
- key: "forkPath",
- value: function forkPath() {
- this.forkContext.add(this.parentForkContext.makeNext(-1, -1));
- }
-
- /**
- * Creates a bypass path.
- * This is used for such as IfStatement which does not have "else" chunk.
- *
- * @returns {void}
- */
-
- }, {
- key: "forkBypassPath",
- value: function forkBypassPath() {
- this.forkContext.add(this.parentForkContext.head);
- }
-
- //--------------------------------------------------------------------------
- // ConditionalExpression, LogicalExpression, IfStatement
- //--------------------------------------------------------------------------
-
- /**
- * Creates a context for ConditionalExpression, LogicalExpression,
- * IfStatement, WhileStatement, DoWhileStatement, or ForStatement.
- *
- * LogicalExpressions have cases that it goes different paths between the
- * `true` case and the `false` case.
- *
- * For Example:
- *
- * if (a || b) {
- * foo();
- * } else {
- * bar();
- * }
- *
- * In this case, `b` is evaluated always in the code path of the `else`
- * block, but it's not so in the code path of the `if` block.
- * So there are 3 paths.
- *
- * a -> foo();
- * a -> b -> foo();
- * a -> b -> bar();
- *
- * @param {string} kind - A kind string.
- * If the new context is LogicalExpression's, this is `"&&"` or `"||"`.
- * If it's IfStatement's or ConditionalExpression's, this is `"test"`.
- * Otherwise, this is `"loop"`.
- * @param {boolean} isForkingAsResult - A flag that shows that goes different
- * paths between `true` and `false`.
- * @returns {void}
- */
-
- }, {
- key: "pushChoiceContext",
- value: function pushChoiceContext(kind, isForkingAsResult) {
- this.choiceContext = {
- upper: this.choiceContext,
- kind: kind,
- isForkingAsResult: isForkingAsResult,
- trueForkContext: ForkContext.newEmpty(this.forkContext),
- falseForkContext: ForkContext.newEmpty(this.forkContext),
- processed: false
- };
- }
-
- /**
- * Pops the last choice context and finalizes it.
- *
- * @returns {ChoiceContext} The popped context.
- */
-
- }, {
- key: "popChoiceContext",
- value: function popChoiceContext() {
- var context = this.choiceContext;
-
- this.choiceContext = context.upper;
-
- var forkContext = this.forkContext;
- var headSegments = forkContext.head;
-
- switch (context.kind) {
- case "&&":
- case "||":
-
- /*
- * If any result were not transferred from child contexts,
- * this sets the head segments to both cases.
- * The head segments are the path of the right-hand operand.
- */
- if (!context.processed) {
- context.trueForkContext.add(headSegments);
- context.falseForkContext.add(headSegments);
- }
-
- /*
- * Transfers results to upper context if this context is in
- * test chunk.
- */
- if (context.isForkingAsResult) {
- var parentContext = this.choiceContext;
-
- parentContext.trueForkContext.addAll(context.trueForkContext);
- parentContext.falseForkContext.addAll(context.falseForkContext);
- parentContext.processed = true;
-
- return context;
- }
-
- break;
-
- case "test":
- if (!context.processed) {
-
- /*
- * The head segments are the path of the `if` block here.
- * Updates the `true` path with the end of the `if` block.
- */
- context.trueForkContext.clear();
- context.trueForkContext.add(headSegments);
- } else {
-
- /*
- * The head segments are the path of the `else` block here.
- * Updates the `false` path with the end of the `else`
- * block.
- */
- context.falseForkContext.clear();
- context.falseForkContext.add(headSegments);
- }
-
- break;
-
- case "loop":
-
- /*
- * Loops are addressed in popLoopContext().
- * This is called from popLoopContext().
- */
- return context;
-
- /* istanbul ignore next */
- default:
- throw new Error("unreachable");
- }
-
- // Merges all paths.
- var prevForkContext = context.trueForkContext;
-
- prevForkContext.addAll(context.falseForkContext);
- forkContext.replaceHead(prevForkContext.makeNext(0, -1));
-
- return context;
- }
-
- /**
- * Makes a code path segment of the right-hand operand of a logical
- * expression.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeLogicalRight",
- value: function makeLogicalRight() {
- var context = this.choiceContext;
- var forkContext = this.forkContext;
-
- if (context.processed) {
-
- /*
- * This got segments already from the child choice context.
- * Creates the next path from own true/false fork context.
- */
- var prevForkContext = context.kind === "&&" ? context.trueForkContext
- /* kind === "||" */ : context.falseForkContext;
-
- forkContext.replaceHead(prevForkContext.makeNext(0, -1));
- prevForkContext.clear();
-
- context.processed = false;
- } else {
-
- /*
- * This did not get segments from the child choice context.
- * So addresses the head segments.
- * The head segments are the path of the left-hand operand.
- */
- if (context.kind === "&&") {
-
- // The path does short-circuit if false.
- context.falseForkContext.add(forkContext.head);
- } else {
-
- // The path does short-circuit if true.
- context.trueForkContext.add(forkContext.head);
- }
-
- forkContext.replaceHead(forkContext.makeNext(-1, -1));
- }
- }
-
- /**
- * Makes a code path segment of the `if` block.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeIfConsequent",
- value: function makeIfConsequent() {
- var context = this.choiceContext;
- var forkContext = this.forkContext;
-
- /*
- * If any result were not transferred from child contexts,
- * this sets the head segments to both cases.
- * The head segments are the path of the test expression.
- */
- if (!context.processed) {
- context.trueForkContext.add(forkContext.head);
- context.falseForkContext.add(forkContext.head);
- }
-
- context.processed = false;
-
- // Creates new path from the `true` case.
- forkContext.replaceHead(context.trueForkContext.makeNext(0, -1));
- }
-
- /**
- * Makes a code path segment of the `else` block.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeIfAlternate",
- value: function makeIfAlternate() {
- var context = this.choiceContext;
- var forkContext = this.forkContext;
-
- /*
- * The head segments are the path of the `if` block.
- * Updates the `true` path with the end of the `if` block.
- */
- context.trueForkContext.clear();
- context.trueForkContext.add(forkContext.head);
- context.processed = true;
-
- // Creates new path from the `false` case.
- forkContext.replaceHead(context.falseForkContext.makeNext(0, -1));
- }
-
- //--------------------------------------------------------------------------
- // SwitchStatement
- //--------------------------------------------------------------------------
-
- /**
- * Creates a context object of SwitchStatement and stacks it.
- *
- * @param {boolean} hasCase - `true` if the switch statement has one or more
- * case parts.
- * @param {string|null} label - The label text.
- * @returns {void}
- */
-
- }, {
- key: "pushSwitchContext",
- value: function pushSwitchContext(hasCase, label) {
- this.switchContext = {
- upper: this.switchContext,
- hasCase: hasCase,
- defaultSegments: null,
- defaultBodySegments: null,
- foundDefault: false,
- lastIsDefault: false,
- countForks: 0
- };
-
- this.pushBreakContext(true, label);
- }
-
- /**
- * Pops the last context of SwitchStatement and finalizes it.
- *
- * - Disposes all forking stack for `case` and `default`.
- * - Creates the next code path segment from `context.brokenForkContext`.
- * - If the last `SwitchCase` node is not a `default` part, creates a path
- * to the `default` body.
- *
- * @returns {void}
- */
-
- }, {
- key: "popSwitchContext",
- value: function popSwitchContext() {
- var context = this.switchContext;
-
- this.switchContext = context.upper;
-
- var forkContext = this.forkContext;
- var brokenForkContext = this.popBreakContext().brokenForkContext;
-
- if (context.countForks === 0) {
-
- /*
- * When there is only one `default` chunk and there is one or more
- * `break` statements, even if forks are nothing, it needs to merge
- * those.
- */
- if (!brokenForkContext.empty) {
- brokenForkContext.add(forkContext.makeNext(-1, -1));
- forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
- }
-
- return;
- }
-
- var lastSegments = forkContext.head;
-
- this.forkBypassPath();
- var lastCaseSegments = forkContext.head;
-
- /*
- * `brokenForkContext` is used to make the next segment.
- * It must add the last segment into `brokenForkContext`.
- */
- brokenForkContext.add(lastSegments);
-
- /*
- * A path which is failed in all case test should be connected to path
- * of `default` chunk.
- */
- if (!context.lastIsDefault) {
- if (context.defaultBodySegments) {
-
- /*
- * Remove a link from `default` label to its chunk.
- * It's false route.
- */
- removeConnection(context.defaultSegments, context.defaultBodySegments);
- makeLooped(this, lastCaseSegments, context.defaultBodySegments);
- } else {
-
- /*
- * It handles the last case body as broken if `default` chunk
- * does not exist.
- */
- brokenForkContext.add(lastCaseSegments);
- }
- }
-
- // Pops the segment context stack until the entry segment.
- for (var i = 0; i < context.countForks; ++i) {
- this.forkContext = this.forkContext.upper;
- }
-
- /*
- * Creates a path from all brokenForkContext paths.
- * This is a path after switch statement.
- */
- this.forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
- }
-
- /**
- * Makes a code path segment for a `SwitchCase` node.
- *
- * @param {boolean} isEmpty - `true` if the body is empty.
- * @param {boolean} isDefault - `true` if the body is the default case.
- * @returns {void}
- */
-
- }, {
- key: "makeSwitchCaseBody",
- value: function makeSwitchCaseBody(isEmpty, isDefault) {
- var context = this.switchContext;
-
- if (!context.hasCase) {
- return;
- }
-
- /*
- * Merge forks.
- * The parent fork context has two segments.
- * Those are from the current case and the body of the previous case.
- */
- var parentForkContext = this.forkContext;
- var forkContext = this.pushForkContext();
-
- forkContext.add(parentForkContext.makeNext(0, -1));
-
- /*
- * Save `default` chunk info.
- * If the `default` label is not at the last, we must make a path from
- * the last `case` to the `default` chunk.
- */
- if (isDefault) {
- context.defaultSegments = parentForkContext.head;
- if (isEmpty) {
- context.foundDefault = true;
- } else {
- context.defaultBodySegments = forkContext.head;
- }
- } else {
- if (!isEmpty && context.foundDefault) {
- context.foundDefault = false;
- context.defaultBodySegments = forkContext.head;
- }
- }
-
- context.lastIsDefault = isDefault;
- context.countForks += 1;
- }
-
- //--------------------------------------------------------------------------
- // TryStatement
- //--------------------------------------------------------------------------
-
- /**
- * Creates a context object of TryStatement and stacks it.
- *
- * @param {boolean} hasFinalizer - `true` if the try statement has a
- * `finally` block.
- * @returns {void}
- */
-
- }, {
- key: "pushTryContext",
- value: function pushTryContext(hasFinalizer) {
- this.tryContext = {
- upper: this.tryContext,
- position: "try",
- hasFinalizer: hasFinalizer,
-
- returnedForkContext: hasFinalizer ? ForkContext.newEmpty(this.forkContext) : null,
-
- thrownForkContext: ForkContext.newEmpty(this.forkContext),
- lastOfTryIsReachable: false,
- lastOfCatchIsReachable: false
- };
- }
-
- /**
- * Pops the last context of TryStatement and finalizes it.
- *
- * @returns {void}
- */
-
- }, {
- key: "popTryContext",
- value: function popTryContext() {
- var context = this.tryContext;
-
- this.tryContext = context.upper;
-
- if (context.position === "catch") {
-
- // Merges two paths from the `try` block and `catch` block merely.
- this.popForkContext();
- return;
- }
-
- /*
- * The following process is executed only when there is the `finally`
- * block.
- */
-
- var returned = context.returnedForkContext;
- var thrown = context.thrownForkContext;
-
- if (returned.empty && thrown.empty) {
- return;
- }
-
- // Separate head to normal paths and leaving paths.
- var headSegments = this.forkContext.head;
-
- this.forkContext = this.forkContext.upper;
- var normalSegments = headSegments.slice(0, headSegments.length / 2 | 0);
- var leavingSegments = headSegments.slice(headSegments.length / 2 | 0);
-
- // Forwards the leaving path to upper contexts.
- if (!returned.empty) {
- getReturnContext(this).returnedForkContext.add(leavingSegments);
- }
- if (!thrown.empty) {
- getThrowContext(this).thrownForkContext.add(leavingSegments);
- }
-
- // Sets the normal path as the next.
- this.forkContext.replaceHead(normalSegments);
-
- /*
- * If both paths of the `try` block and the `catch` block are
- * unreachable, the next path becomes unreachable as well.
- */
- if (!context.lastOfTryIsReachable && !context.lastOfCatchIsReachable) {
- this.forkContext.makeUnreachable();
- }
- }
-
- /**
- * Makes a code path segment for a `catch` block.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeCatchBlock",
- value: function makeCatchBlock() {
- var context = this.tryContext;
- var forkContext = this.forkContext;
- var thrown = context.thrownForkContext;
-
- // Update state.
- context.position = "catch";
- context.thrownForkContext = ForkContext.newEmpty(forkContext);
- context.lastOfTryIsReachable = forkContext.reachable;
-
- // Merge thrown paths.
- thrown.add(forkContext.head);
- var thrownSegments = thrown.makeNext(0, -1);
-
- // Fork to a bypass and the merged thrown path.
- this.pushForkContext();
- this.forkBypassPath();
- this.forkContext.add(thrownSegments);
- }
-
- /**
- * Makes a code path segment for a `finally` block.
- *
- * In the `finally` block, parallel paths are created. The parallel paths
- * are used as leaving-paths. The leaving-paths are paths from `return`
- * statements and `throw` statements in a `try` block or a `catch` block.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeFinallyBlock",
- value: function makeFinallyBlock() {
- var context = this.tryContext;
- var forkContext = this.forkContext;
- var returned = context.returnedForkContext;
- var thrown = context.thrownForkContext;
- var headOfLeavingSegments = forkContext.head;
-
- // Update state.
- if (context.position === "catch") {
-
- // Merges two paths from the `try` block and `catch` block.
- this.popForkContext();
- forkContext = this.forkContext;
-
- context.lastOfCatchIsReachable = forkContext.reachable;
- } else {
- context.lastOfTryIsReachable = forkContext.reachable;
- }
- context.position = "finally";
-
- if (returned.empty && thrown.empty) {
-
- // This path does not leave.
- return;
- }
-
- /*
- * Create a parallel segment from merging returned and thrown.
- * This segment will leave at the end of this finally block.
- */
- var segments = forkContext.makeNext(-1, -1);
-
- for (var i = 0; i < forkContext.count; ++i) {
- var prevSegsOfLeavingSegment = [headOfLeavingSegments[i]];
-
- for (var j = 0; j < returned.segmentsList.length; ++j) {
- prevSegsOfLeavingSegment.push(returned.segmentsList[j][i]);
- }
- for (var _j = 0; _j < thrown.segmentsList.length; ++_j) {
- prevSegsOfLeavingSegment.push(thrown.segmentsList[_j][i]);
- }
-
- segments.push(CodePathSegment.newNext(this.idGenerator.next(), prevSegsOfLeavingSegment));
- }
-
- this.pushForkContext(true);
- this.forkContext.add(segments);
- }
-
- /**
- * Makes a code path segment from the first throwable node to the `catch`
- * block or the `finally` block.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeFirstThrowablePathInTryBlock",
- value: function makeFirstThrowablePathInTryBlock() {
- var forkContext = this.forkContext;
-
- if (!forkContext.reachable) {
- return;
- }
-
- var context = getThrowContext(this);
-
- if (context === this || context.position !== "try" || !context.thrownForkContext.empty) {
- return;
- }
-
- context.thrownForkContext.add(forkContext.head);
- forkContext.replaceHead(forkContext.makeNext(-1, -1));
- }
-
- //--------------------------------------------------------------------------
- // Loop Statements
- //--------------------------------------------------------------------------
-
- /**
- * Creates a context object of a loop statement and stacks it.
- *
- * @param {string} type - The type of the node which was triggered. One of
- * `WhileStatement`, `DoWhileStatement`, `ForStatement`, `ForInStatement`,
- * and `ForStatement`.
- * @param {string|null} label - A label of the node which was triggered.
- * @returns {void}
- */
-
- }, {
- key: "pushLoopContext",
- value: function pushLoopContext(type, label) {
- var forkContext = this.forkContext;
- var breakContext = this.pushBreakContext(true, label);
-
- switch (type) {
- case "WhileStatement":
- this.pushChoiceContext("loop", false);
- this.loopContext = {
- upper: this.loopContext,
- type: type,
- label: label,
- test: void 0,
- continueDestSegments: null,
- brokenForkContext: breakContext.brokenForkContext
- };
- break;
-
- case "DoWhileStatement":
- this.pushChoiceContext("loop", false);
- this.loopContext = {
- upper: this.loopContext,
- type: type,
- label: label,
- test: void 0,
- entrySegments: null,
- continueForkContext: ForkContext.newEmpty(forkContext),
- brokenForkContext: breakContext.brokenForkContext
- };
- break;
-
- case "ForStatement":
- this.pushChoiceContext("loop", false);
- this.loopContext = {
- upper: this.loopContext,
- type: type,
- label: label,
- test: void 0,
- endOfInitSegments: null,
- testSegments: null,
- endOfTestSegments: null,
- updateSegments: null,
- endOfUpdateSegments: null,
- continueDestSegments: null,
- brokenForkContext: breakContext.brokenForkContext
- };
- break;
-
- case "ForInStatement":
- case "ForOfStatement":
- this.loopContext = {
- upper: this.loopContext,
- type: type,
- label: label,
- prevSegments: null,
- leftSegments: null,
- endOfLeftSegments: null,
- continueDestSegments: null,
- brokenForkContext: breakContext.brokenForkContext
- };
- break;
-
- /* istanbul ignore next */
- default:
- throw new Error("unknown type: \"" + type + "\"");
- }
- }
-
- /**
- * Pops the last context of a loop statement and finalizes it.
- *
- * @returns {void}
- */
-
- }, {
- key: "popLoopContext",
- value: function popLoopContext() {
- var context = this.loopContext;
-
- this.loopContext = context.upper;
-
- var forkContext = this.forkContext;
- var brokenForkContext = this.popBreakContext().brokenForkContext;
-
- // Creates a looped path.
- switch (context.type) {
- case "WhileStatement":
- case "ForStatement":
- this.popChoiceContext();
- makeLooped(this, forkContext.head, context.continueDestSegments);
- break;
-
- case "DoWhileStatement":
- {
- var choiceContext = this.popChoiceContext();
-
- if (!choiceContext.processed) {
- choiceContext.trueForkContext.add(forkContext.head);
- choiceContext.falseForkContext.add(forkContext.head);
- }
- if (context.test !== true) {
- brokenForkContext.addAll(choiceContext.falseForkContext);
- }
-
- // `true` paths go to looping.
- var segmentsList = choiceContext.trueForkContext.segmentsList;
-
- for (var i = 0; i < segmentsList.length; ++i) {
- makeLooped(this, segmentsList[i], context.entrySegments);
- }
- break;
- }
-
- case "ForInStatement":
- case "ForOfStatement":
- brokenForkContext.add(forkContext.head);
- makeLooped(this, forkContext.head, context.leftSegments);
- break;
-
- /* istanbul ignore next */
- default:
- throw new Error("unreachable");
- }
-
- // Go next.
- if (brokenForkContext.empty) {
- forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
- } else {
- forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
- }
- }
-
- /**
- * Makes a code path segment for the test part of a WhileStatement.
- *
- * @param {boolean|undefined} test - The test value (only when constant).
- * @returns {void}
- */
-
- }, {
- key: "makeWhileTest",
- value: function makeWhileTest(test) {
- var context = this.loopContext;
- var forkContext = this.forkContext;
- var testSegments = forkContext.makeNext(0, -1);
-
- // Update state.
- context.test = test;
- context.continueDestSegments = testSegments;
- forkContext.replaceHead(testSegments);
- }
-
- /**
- * Makes a code path segment for the body part of a WhileStatement.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeWhileBody",
- value: function makeWhileBody() {
- var context = this.loopContext;
- var choiceContext = this.choiceContext;
- var forkContext = this.forkContext;
-
- if (!choiceContext.processed) {
- choiceContext.trueForkContext.add(forkContext.head);
- choiceContext.falseForkContext.add(forkContext.head);
- }
-
- // Update state.
- if (context.test !== true) {
- context.brokenForkContext.addAll(choiceContext.falseForkContext);
- }
- forkContext.replaceHead(choiceContext.trueForkContext.makeNext(0, -1));
- }
-
- /**
- * Makes a code path segment for the body part of a DoWhileStatement.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeDoWhileBody",
- value: function makeDoWhileBody() {
- var context = this.loopContext;
- var forkContext = this.forkContext;
- var bodySegments = forkContext.makeNext(-1, -1);
-
- // Update state.
- context.entrySegments = bodySegments;
- forkContext.replaceHead(bodySegments);
- }
-
- /**
- * Makes a code path segment for the test part of a DoWhileStatement.
- *
- * @param {boolean|undefined} test - The test value (only when constant).
- * @returns {void}
- */
-
- }, {
- key: "makeDoWhileTest",
- value: function makeDoWhileTest(test) {
- var context = this.loopContext;
- var forkContext = this.forkContext;
-
- context.test = test;
-
- // Creates paths of `continue` statements.
- if (!context.continueForkContext.empty) {
- context.continueForkContext.add(forkContext.head);
- var testSegments = context.continueForkContext.makeNext(0, -1);
-
- forkContext.replaceHead(testSegments);
- }
- }
-
- /**
- * Makes a code path segment for the test part of a ForStatement.
- *
- * @param {boolean|undefined} test - The test value (only when constant).
- * @returns {void}
- */
-
- }, {
- key: "makeForTest",
- value: function makeForTest(test) {
- var context = this.loopContext;
- var forkContext = this.forkContext;
- var endOfInitSegments = forkContext.head;
- var testSegments = forkContext.makeNext(-1, -1);
-
- // Update state.
- context.test = test;
- context.endOfInitSegments = endOfInitSegments;
- context.continueDestSegments = context.testSegments = testSegments;
- forkContext.replaceHead(testSegments);
- }
-
- /**
- * Makes a code path segment for the update part of a ForStatement.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeForUpdate",
- value: function makeForUpdate() {
- var context = this.loopContext;
- var choiceContext = this.choiceContext;
- var forkContext = this.forkContext;
-
- // Make the next paths of the test.
- if (context.testSegments) {
- finalizeTestSegmentsOfFor(context, choiceContext, forkContext.head);
- } else {
- context.endOfInitSegments = forkContext.head;
- }
-
- // Update state.
- var updateSegments = forkContext.makeDisconnected(-1, -1);
-
- context.continueDestSegments = context.updateSegments = updateSegments;
- forkContext.replaceHead(updateSegments);
- }
-
- /**
- * Makes a code path segment for the body part of a ForStatement.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeForBody",
- value: function makeForBody() {
- var context = this.loopContext;
- var choiceContext = this.choiceContext;
- var forkContext = this.forkContext;
-
- // Update state.
- if (context.updateSegments) {
- context.endOfUpdateSegments = forkContext.head;
-
- // `update` -> `test`
- if (context.testSegments) {
- makeLooped(this, context.endOfUpdateSegments, context.testSegments);
- }
- } else if (context.testSegments) {
- finalizeTestSegmentsOfFor(context, choiceContext, forkContext.head);
- } else {
- context.endOfInitSegments = forkContext.head;
- }
-
- var bodySegments = context.endOfTestSegments;
-
- if (!bodySegments) {
-
- /*
- * If there is not the `test` part, the `body` path comes from the
- * `init` part and the `update` part.
- */
- var prevForkContext = ForkContext.newEmpty(forkContext);
-
- prevForkContext.add(context.endOfInitSegments);
- if (context.endOfUpdateSegments) {
- prevForkContext.add(context.endOfUpdateSegments);
- }
-
- bodySegments = prevForkContext.makeNext(0, -1);
- }
- context.continueDestSegments = context.continueDestSegments || bodySegments;
- forkContext.replaceHead(bodySegments);
- }
-
- /**
- * Makes a code path segment for the left part of a ForInStatement and a
- * ForOfStatement.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeForInOfLeft",
- value: function makeForInOfLeft() {
- var context = this.loopContext;
- var forkContext = this.forkContext;
- var leftSegments = forkContext.makeDisconnected(-1, -1);
-
- // Update state.
- context.prevSegments = forkContext.head;
- context.leftSegments = context.continueDestSegments = leftSegments;
- forkContext.replaceHead(leftSegments);
- }
-
- /**
- * Makes a code path segment for the right part of a ForInStatement and a
- * ForOfStatement.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeForInOfRight",
- value: function makeForInOfRight() {
- var context = this.loopContext;
- var forkContext = this.forkContext;
- var temp = ForkContext.newEmpty(forkContext);
-
- temp.add(context.prevSegments);
- var rightSegments = temp.makeNext(-1, -1);
-
- // Update state.
- context.endOfLeftSegments = forkContext.head;
- forkContext.replaceHead(rightSegments);
- }
-
- /**
- * Makes a code path segment for the body part of a ForInStatement and a
- * ForOfStatement.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeForInOfBody",
- value: function makeForInOfBody() {
- var context = this.loopContext;
- var forkContext = this.forkContext;
- var temp = ForkContext.newEmpty(forkContext);
-
- temp.add(context.endOfLeftSegments);
- var bodySegments = temp.makeNext(-1, -1);
-
- // Make a path: `right` -> `left`.
- makeLooped(this, forkContext.head, context.leftSegments);
-
- // Update state.
- context.brokenForkContext.add(forkContext.head);
- forkContext.replaceHead(bodySegments);
- }
-
- //--------------------------------------------------------------------------
- // Control Statements
- //--------------------------------------------------------------------------
-
- /**
- * Creates new context for BreakStatement.
- *
- * @param {boolean} breakable - The flag to indicate it can break by
- * an unlabeled BreakStatement.
- * @param {string|null} label - The label of this context.
- * @returns {Object} The new context.
- */
-
- }, {
- key: "pushBreakContext",
- value: function pushBreakContext(breakable, label) {
- this.breakContext = {
- upper: this.breakContext,
- breakable: breakable,
- label: label,
- brokenForkContext: ForkContext.newEmpty(this.forkContext)
- };
- return this.breakContext;
- }
-
- /**
- * Removes the top item of the break context stack.
- *
- * @returns {Object} The removed context.
- */
-
- }, {
- key: "popBreakContext",
- value: function popBreakContext() {
- var context = this.breakContext;
- var forkContext = this.forkContext;
-
- this.breakContext = context.upper;
-
- // Process this context here for other than switches and loops.
- if (!context.breakable) {
- var brokenForkContext = context.brokenForkContext;
-
- if (!brokenForkContext.empty) {
- brokenForkContext.add(forkContext.head);
- forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
- }
- }
-
- return context;
- }
-
- /**
- * Makes a path for a `break` statement.
- *
- * It registers the head segment to a context of `break`.
- * It makes new unreachable segment, then it set the head with the segment.
- *
- * @param {string} label - A label of the break statement.
- * @returns {void}
- */
-
- }, {
- key: "makeBreak",
- value: function makeBreak(label) {
- var forkContext = this.forkContext;
-
- if (!forkContext.reachable) {
- return;
- }
-
- var context = getBreakContext(this, label);
-
- /* istanbul ignore else: foolproof (syntax error) */
- if (context) {
- context.brokenForkContext.add(forkContext.head);
- }
-
- forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
- }
-
- /**
- * Makes a path for a `continue` statement.
- *
- * It makes a looping path.
- * It makes new unreachable segment, then it set the head with the segment.
- *
- * @param {string} label - A label of the continue statement.
- * @returns {void}
- */
-
- }, {
- key: "makeContinue",
- value: function makeContinue(label) {
- var forkContext = this.forkContext;
-
- if (!forkContext.reachable) {
- return;
- }
-
- var context = getContinueContext(this, label);
-
- /* istanbul ignore else: foolproof (syntax error) */
- if (context) {
- if (context.continueDestSegments) {
- makeLooped(this, forkContext.head, context.continueDestSegments);
-
- // If the context is a for-in/of loop, this effects a break also.
- if (context.type === "ForInStatement" || context.type === "ForOfStatement") {
- context.brokenForkContext.add(forkContext.head);
- }
- } else {
- context.continueForkContext.add(forkContext.head);
- }
- }
- forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
- }
-
- /**
- * Makes a path for a `return` statement.
- *
- * It registers the head segment to a context of `return`.
- * It makes new unreachable segment, then it set the head with the segment.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeReturn",
- value: function makeReturn() {
- var forkContext = this.forkContext;
-
- if (forkContext.reachable) {
- getReturnContext(this).returnedForkContext.add(forkContext.head);
- forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
- }
- }
-
- /**
- * Makes a path for a `throw` statement.
- *
- * It registers the head segment to a context of `throw`.
- * It makes new unreachable segment, then it set the head with the segment.
- *
- * @returns {void}
- */
-
- }, {
- key: "makeThrow",
- value: function makeThrow() {
- var forkContext = this.forkContext;
-
- if (forkContext.reachable) {
- getThrowContext(this).thrownForkContext.add(forkContext.head);
- forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
- }
- }
-
- /**
- * Makes the final path.
- * @returns {void}
- */
-
- }, {
- key: "makeFinal",
- value: function makeFinal() {
- var segments = this.currentSegments;
-
- if (segments.length > 0 && segments[0].reachable) {
- this.returnedForkContext.add(segments);
- }
- }
- }, {
- key: "headSegments",
- get: function get() {
- return this.forkContext.head;
- }
-
- /**
- * The parent forking context.
- * This is used for the root of new forks.
- * @type {ForkContext}
- */
-
- }, {
- key: "parentForkContext",
- get: function get() {
- var current = this.forkContext;
-
- return current && current.upper;
- }
- }]);
-
- return CodePathState;
-}();
-
-module.exports = CodePathState;
-
-},{"./code-path-segment":113,"./fork-context":117}],115:[function(require,module,exports){
-/**
- * @fileoverview A class of the code path.
- * @author Toru Nagashima
- */
-
-"use strict";
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var CodePathState = require("./code-path-state");
-var IdGenerator = require("./id-generator");
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * A code path.
- */
-
-var CodePath = function () {
-
- /**
- * @param {string} id - An identifier.
- * @param {CodePath|null} upper - The code path of the upper function scope.
- * @param {Function} onLooped - A callback function to notify looping.
- */
- function CodePath(id, upper, onLooped) {
- _classCallCheck(this, CodePath);
-
- /**
- * The identifier of this code path.
- * Rules use it to store additional information of each rule.
- * @type {string}
- */
- this.id = id;
-
- /**
- * The code path of the upper function scope.
- * @type {CodePath|null}
- */
- this.upper = upper;
-
- /**
- * The code paths of nested function scopes.
- * @type {CodePath[]}
- */
- this.childCodePaths = [];
-
- // Initializes internal state.
- Object.defineProperty(this, "internal", { value: new CodePathState(new IdGenerator(id + "_"), onLooped) });
-
- // Adds this into `childCodePaths` of `upper`.
- if (upper) {
- upper.childCodePaths.push(this);
- }
- }
-
- /**
- * Gets the state of a given code path.
- *
- * @param {CodePath} codePath - A code path to get.
- * @returns {CodePathState} The state of the code path.
- */
-
-
- _createClass(CodePath, [{
- key: "traverseSegments",
-
-
- /**
- * Traverses all segments in this code path.
- *
- * codePath.traverseSegments(function(segment, controller) {
- * // do something.
- * });
- *
- * This method enumerates segments in order from the head.
- *
- * The `controller` object has two methods.
- *
- * - `controller.skip()` - Skip the following segments in this branch.
- * - `controller.break()` - Skip all following segments.
- *
- * @param {Object} [options] - Omittable.
- * @param {CodePathSegment} [options.first] - The first segment to traverse.
- * @param {CodePathSegment} [options.last] - The last segment to traverse.
- * @param {Function} callback - A callback function.
- * @returns {void}
- */
- value: function traverseSegments(options, callback) {
- var resolvedOptions = void 0;
- var resolvedCallback = void 0;
-
- if (typeof options === "function") {
- resolvedCallback = options;
- resolvedOptions = {};
- } else {
- resolvedOptions = options || {};
- resolvedCallback = callback;
- }
-
- var startSegment = resolvedOptions.first || this.internal.initialSegment;
- var lastSegment = resolvedOptions.last;
-
- var item = null;
- var index = 0;
- var end = 0;
- var segment = null;
- var visited = Object.create(null);
- var stack = [[startSegment, 0]];
- var skippedSegment = null;
- var broken = false;
- var controller = {
- skip: function skip() {
- if (stack.length <= 1) {
- broken = true;
- } else {
- skippedSegment = stack[stack.length - 2][0];
- }
- },
- break: function _break() {
- broken = true;
- }
- };
-
- /**
- * Checks a given previous segment has been visited.
- * @param {CodePathSegment} prevSegment - A previous segment to check.
- * @returns {boolean} `true` if the segment has been visited.
- */
- function isVisited(prevSegment) {
- return visited[prevSegment.id] || segment.isLoopedPrevSegment(prevSegment);
- }
-
- while (stack.length > 0) {
- item = stack[stack.length - 1];
- segment = item[0];
- index = item[1];
-
- if (index === 0) {
-
- // Skip if this segment has been visited already.
- if (visited[segment.id]) {
- stack.pop();
- continue;
- }
-
- // Skip if all previous segments have not been visited.
- if (segment !== startSegment && segment.prevSegments.length > 0 && !segment.prevSegments.every(isVisited)) {
- stack.pop();
- continue;
- }
-
- // Reset the flag of skipping if all branches have been skipped.
- if (skippedSegment && segment.prevSegments.indexOf(skippedSegment) !== -1) {
- skippedSegment = null;
- }
- visited[segment.id] = true;
-
- // Call the callback when the first time.
- if (!skippedSegment) {
- resolvedCallback.call(this, segment, controller);
- if (segment === lastSegment) {
- controller.skip();
- }
- if (broken) {
- break;
- }
- }
- }
-
- // Update the stack.
- end = segment.nextSegments.length - 1;
- if (index < end) {
- item[1] += 1;
- stack.push([segment.nextSegments[index], 0]);
- } else if (index === end) {
- item[0] = segment.nextSegments[index];
- item[1] = 0;
- } else {
- stack.pop();
- }
- }
- }
- }, {
- key: "initialSegment",
-
-
- /**
- * The initial code path segment.
- * @type {CodePathSegment}
- */
- get: function get() {
- return this.internal.initialSegment;
- }
-
- /**
- * Final code path segments.
- * This array is a mix of `returnedSegments` and `thrownSegments`.
- * @type {CodePathSegment[]}
- */
-
- }, {
- key: "finalSegments",
- get: function get() {
- return this.internal.finalSegments;
- }
-
- /**
- * Final code path segments which is with `return` statements.
- * This array contains the last path segment if it's reachable.
- * Since the reachable last path returns `undefined`.
- * @type {CodePathSegment[]}
- */
-
- }, {
- key: "returnedSegments",
- get: function get() {
- return this.internal.returnedForkContext;
- }
-
- /**
- * Final code path segments which is with `throw` statements.
- * @type {CodePathSegment[]}
- */
-
- }, {
- key: "thrownSegments",
- get: function get() {
- return this.internal.thrownForkContext;
- }
-
- /**
- * Current code path segments.
- * @type {CodePathSegment[]}
- */
-
- }, {
- key: "currentSegments",
- get: function get() {
- return this.internal.currentSegments;
- }
- }], [{
- key: "getState",
- value: function getState(codePath) {
- return codePath.internal;
- }
- }]);
-
- return CodePath;
-}();
-
-module.exports = CodePath;
-
-},{"./code-path-state":114,"./id-generator":118}],116:[function(require,module,exports){
-/**
- * @fileoverview Helpers to debug for code path analysis.
- * @author Toru Nagashima
- */
-
-"use strict";
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-var debug = require("debug")("eslint:code-path");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Gets id of a given segment.
- * @param {CodePathSegment} segment - A segment to get.
- * @returns {string} Id of the segment.
- */
-/* istanbul ignore next */
-function getId(segment) {
- // eslint-disable-line require-jsdoc
- return segment.id + (segment.reachable ? "" : "!");
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-module.exports = {
-
- /**
- * A flag that debug dumping is enabled or not.
- * @type {boolean}
- */
- enabled: debug.enabled,
-
- /**
- * Dumps given objects.
- *
- * @param {...any} args - objects to dump.
- * @returns {void}
- */
- dump: debug,
-
- /**
- * Dumps the current analyzing state.
- *
- * @param {ASTNode} node - A node to dump.
- * @param {CodePathState} state - A state to dump.
- * @param {boolean} leaving - A flag whether or not it's leaving
- * @returns {void}
- */
- dumpState: !debug.enabled ? debug : /* istanbul ignore next */function (node, state, leaving) {
- for (var i = 0; i < state.currentSegments.length; ++i) {
- var segInternal = state.currentSegments[i].internal;
-
- if (leaving) {
- segInternal.exitNodes.push(node);
- } else {
- segInternal.nodes.push(node);
- }
- }
-
- debug([state.currentSegments.map(getId).join(",") + ")", "" + node.type + (leaving ? ":exit" : "")].join(" "));
- },
-
- /**
- * Dumps a DOT code of a given code path.
- * The DOT code can be visialized with Graphvis.
- *
- * @param {CodePath} codePath - A code path to dump.
- * @returns {void}
- * @see http://www.graphviz.org
- * @see http://www.webgraphviz.com
- */
- dumpDot: !debug.enabled ? debug : /* istanbul ignore next */function (codePath) {
- var text = "\n" + "digraph {\n" + "node[shape=box,style=\"rounded,filled\",fillcolor=white];\n" + "initial[label=\"\",shape=circle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
-
- if (codePath.returnedSegments.length > 0) {
- text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n";
- }
- if (codePath.thrownSegments.length > 0) {
- text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize];\n";
- }
-
- var traceMap = Object.create(null);
- var arrows = this.makeDotArrows(codePath, traceMap);
-
- for (var id in traceMap) {
- // eslint-disable-line guard-for-in
- var segment = traceMap[id];
-
- text += id + "[";
-
- if (segment.reachable) {
- text += "label=\"";
- } else {
- text += "style=\"rounded,dashed,filled\",fillcolor=\"#FF9800\",label=\"<>\\n";
- }
-
- if (segment.internal.nodes.length > 0 || segment.internal.exitNodes.length > 0) {
- text += [].concat(segment.internal.nodes.map(function (node) {
- switch (node.type) {
- case "Identifier":
- return node.type + " (" + node.name + ")";
- case "Literal":
- return node.type + " (" + node.value + ")";
- default:
- return node.type;
- }
- }), segment.internal.exitNodes.map(function (node) {
- switch (node.type) {
- case "Identifier":
- return node.type + ":exit (" + node.name + ")";
- case "Literal":
- return node.type + ":exit (" + node.value + ")";
- default:
- return node.type + ":exit";
- }
- })).join("\\n");
- } else {
- text += "????";
- }
-
- text += "\"];\n";
- }
-
- text += arrows + "\n";
- text += "}";
- debug("DOT", text);
- },
-
- /**
- * Makes a DOT code of a given code path.
- * The DOT code can be visialized with Graphvis.
- *
- * @param {CodePath} codePath - A code path to make DOT.
- * @param {Object} traceMap - Optional. A map to check whether or not segments had been done.
- * @returns {string} A DOT code of the code path.
- */
- makeDotArrows: function makeDotArrows(codePath, traceMap) {
- var stack = [[codePath.initialSegment, 0]];
- var done = traceMap || Object.create(null);
- var lastId = codePath.initialSegment.id;
- var text = "initial->" + codePath.initialSegment.id;
-
- while (stack.length > 0) {
- var item = stack.pop();
- var segment = item[0];
- var index = item[1];
-
- if (done[segment.id] && index === 0) {
- continue;
- }
- done[segment.id] = segment;
-
- var nextSegment = segment.allNextSegments[index];
-
- if (!nextSegment) {
- continue;
- }
-
- if (lastId === segment.id) {
- text += "->" + nextSegment.id;
- } else {
- text += ";\n" + segment.id + "->" + nextSegment.id;
- }
- lastId = nextSegment.id;
-
- stack.unshift([segment, 1 + index]);
- stack.push([nextSegment, 0]);
- }
-
- codePath.returnedSegments.forEach(function (finalSegment) {
- if (lastId === finalSegment.id) {
- text += "->final";
- } else {
- text += ";\n" + finalSegment.id + "->final";
- }
- lastId = null;
- });
-
- codePath.thrownSegments.forEach(function (finalSegment) {
- if (lastId === finalSegment.id) {
- text += "->thrown";
- } else {
- text += ";\n" + finalSegment.id + "->thrown";
- }
- lastId = null;
- });
-
- return text + ";";
- }
-};
-
-},{"debug":53}],117:[function(require,module,exports){
-/**
- * @fileoverview A class to operate forking.
- *
- * This is state of forking.
- * This has a fork list and manages it.
- *
- * @author Toru Nagashima
- */
-
-"use strict";
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var assert = require("assert"),
- CodePathSegment = require("./code-path-segment");
-
-//------------------------------------------------------------------------------
-// Helpers
-//------------------------------------------------------------------------------
-
-/**
- * Gets whether or not a given segment is reachable.
- *
- * @param {CodePathSegment} segment - A segment to get.
- * @returns {boolean} `true` if the segment is reachable.
- */
-function isReachable(segment) {
- return segment.reachable;
-}
-
-/**
- * Creates new segments from the specific range of `context.segmentsList`.
- *
- * When `context.segmentsList` is `[[a, b], [c, d], [e, f]]`, `begin` is `0`, and
- * `end` is `-1`, this creates `[g, h]`. This `g` is from `a`, `c`, and `e`.
- * This `h` is from `b`, `d`, and `f`.
- *
- * @param {ForkContext} context - An instance.
- * @param {number} begin - The first index of the previous segments.
- * @param {number} end - The last index of the previous segments.
- * @param {Function} create - A factory function of new segments.
- * @returns {CodePathSegment[]} New segments.
- */
-function makeSegments(context, begin, end, create) {
- var list = context.segmentsList;
-
- var normalizedBegin = begin >= 0 ? begin : list.length + begin;
- var normalizedEnd = end >= 0 ? end : list.length + end;
-
- var segments = [];
-
- for (var i = 0; i < context.count; ++i) {
- var allPrevSegments = [];
-
- for (var j = normalizedBegin; j <= normalizedEnd; ++j) {
- allPrevSegments.push(list[j][i]);
- }
-
- segments.push(create(context.idGenerator.next(), allPrevSegments));
- }
-
- return segments;
-}
-
-/**
- * `segments` becomes doubly in a `finally` block. Then if a code path exits by a
- * control statement (such as `break`, `continue`) from the `finally` block, the
- * destination's segments may be half of the source segments. In that case, this
- * merges segments.
- *
- * @param {ForkContext} context - An instance.
- * @param {CodePathSegment[]} segments - Segments to merge.
- * @returns {CodePathSegment[]} The merged segments.
- */
-function mergeExtraSegments(context, segments) {
- var currentSegments = segments;
-
- while (currentSegments.length > context.count) {
- var merged = [];
-
- for (var i = 0, length = currentSegments.length / 2 | 0; i < length; ++i) {
- merged.push(CodePathSegment.newNext(context.idGenerator.next(), [currentSegments[i], currentSegments[i + length]]));
- }
- currentSegments = merged;
- }
- return currentSegments;
-}
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * A class to manage forking.
- */
-
-var ForkContext = function () {
-
- /**
- * @param {IdGenerator} idGenerator - An identifier generator for segments.
- * @param {ForkContext|null} upper - An upper fork context.
- * @param {number} count - A number of parallel segments.
- */
- function ForkContext(idGenerator, upper, count) {
- _classCallCheck(this, ForkContext);
-
- this.idGenerator = idGenerator;
- this.upper = upper;
- this.count = count;
- this.segmentsList = [];
- }
-
- /**
- * The head segments.
- * @type {CodePathSegment[]}
- */
-
-
- _createClass(ForkContext, [{
- key: "makeNext",
-
-
- /**
- * Creates new segments from this context.
- *
- * @param {number} begin - The first index of previous segments.
- * @param {number} end - The last index of previous segments.
- * @returns {CodePathSegment[]} New segments.
- */
- value: function makeNext(begin, end) {
- return makeSegments(this, begin, end, CodePathSegment.newNext);
- }
-
- /**
- * Creates new segments from this context.
- * The new segments is always unreachable.
- *
- * @param {number} begin - The first index of previous segments.
- * @param {number} end - The last index of previous segments.
- * @returns {CodePathSegment[]} New segments.
- */
-
- }, {
- key: "makeUnreachable",
- value: function makeUnreachable(begin, end) {
- return makeSegments(this, begin, end, CodePathSegment.newUnreachable);
- }
-
- /**
- * Creates new segments from this context.
- * The new segments don't have connections for previous segments.
- * But these inherit the reachable flag from this context.
- *
- * @param {number} begin - The first index of previous segments.
- * @param {number} end - The last index of previous segments.
- * @returns {CodePathSegment[]} New segments.
- */
-
- }, {
- key: "makeDisconnected",
- value: function makeDisconnected(begin, end) {
- return makeSegments(this, begin, end, CodePathSegment.newDisconnected);
- }
-
- /**
- * Adds segments into this context.
- * The added segments become the head.
- *
- * @param {CodePathSegment[]} segments - Segments to add.
- * @returns {void}
- */
-
- }, {
- key: "add",
- value: function add(segments) {
- assert(segments.length >= this.count, segments.length + " >= " + this.count);
-
- this.segmentsList.push(mergeExtraSegments(this, segments));
- }
-
- /**
- * Replaces the head segments with given segments.
- * The current head segments are removed.
- *
- * @param {CodePathSegment[]} segments - Segments to add.
- * @returns {void}
- */
-
- }, {
- key: "replaceHead",
- value: function replaceHead(segments) {
- assert(segments.length >= this.count, segments.length + " >= " + this.count);
-
- this.segmentsList.splice(-1, 1, mergeExtraSegments(this, segments));
- }
-
- /**
- * Adds all segments of a given fork context into this context.
- *
- * @param {ForkContext} context - A fork context to add.
- * @returns {void}
- */
-
- }, {
- key: "addAll",
- value: function addAll(context) {
- assert(context.count === this.count);
-
- var source = context.segmentsList;
-
- for (var i = 0; i < source.length; ++i) {
- this.segmentsList.push(source[i]);
- }
- }
-
- /**
- * Clears all secments in this context.
- *
- * @returns {void}
- */
-
- }, {
- key: "clear",
- value: function clear() {
- this.segmentsList = [];
- }
-
- /**
- * Creates the root fork context.
- *
- * @param {IdGenerator} idGenerator - An identifier generator for segments.
- * @returns {ForkContext} New fork context.
- */
-
- }, {
- key: "head",
- get: function get() {
- var list = this.segmentsList;
-
- return list.length === 0 ? [] : list[list.length - 1];
- }
-
- /**
- * A flag which shows empty.
- * @type {boolean}
- */
-
- }, {
- key: "empty",
- get: function get() {
- return this.segmentsList.length === 0;
- }
-
- /**
- * A flag which shows reachable.
- * @type {boolean}
- */
-
- }, {
- key: "reachable",
- get: function get() {
- var segments = this.head;
-
- return segments.length > 0 && segments.some(isReachable);
- }
- }], [{
- key: "newRoot",
- value: function newRoot(idGenerator) {
- var context = new ForkContext(idGenerator, null, 1);
-
- context.add([CodePathSegment.newRoot(idGenerator.next())]);
-
- return context;
- }
-
- /**
- * Creates an empty fork context preceded by a given context.
- *
- * @param {ForkContext} parentContext - The parent fork context.
- * @param {boolean} forkLeavingPath - A flag which shows inside of `finally` block.
- * @returns {ForkContext} New fork context.
- */
-
- }, {
- key: "newEmpty",
- value: function newEmpty(parentContext, forkLeavingPath) {
- return new ForkContext(parentContext.idGenerator, parentContext, (forkLeavingPath ? 2 : 1) * parentContext.count);
- }
- }]);
-
- return ForkContext;
-}();
-
-module.exports = ForkContext;
-
-},{"./code-path-segment":113,"assert":46}],118:[function(require,module,exports){
-/**
- * @fileoverview A class of identifiers generator for code path segments.
- *
- * Each rule uses the identifier of code path segments to store additional
- * information of the code path.
- *
- * @author Toru Nagashima
- */
-
-"use strict";
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-/**
- * A generator for unique ids.
- */
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var IdGenerator = function () {
-
- /**
- * @param {string} prefix - Optional. A prefix of generated ids.
- */
- function IdGenerator(prefix) {
- _classCallCheck(this, IdGenerator);
-
- this.prefix = String(prefix);
- this.n = 0;
- }
-
- /**
- * Generates id.
- *
- * @returns {string} A generated id.
- */
-
-
- _createClass(IdGenerator, [{
- key: "next",
- value: function next() {
- this.n = 1 + this.n | 0;
-
- /* istanbul ignore if */
- if (this.n < 0) {
- this.n = 1;
- }
-
- return this.prefix + this.n;
- }
- }]);
-
- return IdGenerator;
-}();
-
-module.exports = IdGenerator;
-
-},{}],119:[function(require,module,exports){
-/**
- * @fileoverview Config file operations. This file must be usable in the browser,
- * so no Node-specific code can be here.
- * @author Nicholas C. Zakas
- */
-"use strict";
-
-//------------------------------------------------------------------------------
-// Requirements
-//------------------------------------------------------------------------------
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var minimatch = require("minimatch"),
- path = require("path");
-
-var debug = require("debug")("eslint:config-ops");
-
-//------------------------------------------------------------------------------
-// Private
-//------------------------------------------------------------------------------
-
-var RULE_SEVERITY_STRINGS = ["off", "warn", "error"],
- RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce(function (map, value, index) {
- map[value] = index;
- return map;
-}, {}),
- VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"];
-
-//------------------------------------------------------------------------------
-// Public Interface
-//------------------------------------------------------------------------------
-
-module.exports = {
-
- /**
- * Creates an empty configuration object suitable for merging as a base.
- * @returns {Object} A configuration object.
- */
- createEmptyConfig: function createEmptyConfig() {
- return {
- globals: {},
- env: {},
- rules: {},
- parserOptions: {}
- };
- },
-
-
- /**
- * Creates an environment config based on the specified environments.
- * @param {Object} env The environment settings.
- * @param {Environments} envContext The environment context.
- * @returns {Object} A configuration object with the appropriate rules and globals
- * set.
- */
- createEnvironmentConfig: function createEnvironmentConfig(env, envContext) {
-
- var envConfig = this.createEmptyConfig();
-
- if (env) {
-
- envConfig.env = env;
-
- Object.keys(env).filter(function (name) {
- return env[name];
- }).forEach(function (name) {
- var environment = envContext.get(name);
-
- if (environment) {
- debug("Creating config for environment " + name);
- if (environment.globals) {
- Object.assign(envConfig.globals, environment.globals);
- }
-
- if (environment.parserOptions) {
- Object.assign(envConfig.parserOptions, environment.parserOptions);
- }
- }
- });
- }
-
- return envConfig;
- },
-
-
- /**
- * Given a config with environment settings, applies the globals and
- * ecmaFeatures to the configuration and returns the result.
- * @param {Object} config The configuration information.
- * @param {Environments} envContent env context.
- * @returns {Object} The updated configuration information.
- */
- applyEnvironments: function applyEnvironments(config, envContent) {
- if (config.env && _typeof(config.env) === "object") {
- debug("Apply environment settings to config");
- return this.merge(this.createEnvironmentConfig(config.env, envContent), config);
- }
-
- return config;
- },
-
-
- /**
- * Merges two config objects. This will not only add missing keys, but will also modify values to match.
- * @param {Object} target config object
- * @param {Object} src config object. Overrides in this config object will take priority over base.
- * @param {boolean} [combine] Whether to combine arrays or not
- * @param {boolean} [isRule] Whether its a rule
- * @returns {Object} merged config object.
- */
- merge: function deepmerge(target, src, combine, isRule) {
-
- /*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012 Nicholas Fisher
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
- /*
- * This code is taken from deepmerge repo
- * (https://github.com/KyleAMathews/deepmerge)
- * and modified to meet our needs.
- */
- var array = Array.isArray(src) || Array.isArray(target);
- var dst = array && [] || {};
-
- if (array) {
- var resolvedTarget = target || [];
-
- // src could be a string, so check for array
- if (isRule && Array.isArray(src) && src.length > 1) {
- dst = dst.concat(src);
- } else {
- dst = dst.concat(resolvedTarget);
- }
- var resolvedSrc = (typeof src === "undefined" ? "undefined" : _typeof(src)) === "object" ? src : [src];
-
- Object.keys(resolvedSrc).forEach(function (_, i) {
- var e = resolvedSrc[i];
-
- if (typeof dst[i] === "undefined") {
- dst[i] = e;
- } else if ((typeof e === "undefined" ? "undefined" : _typeof(e)) === "object") {
- if (isRule) {
- dst[i] = e;
- } else {
- dst[i] = deepmerge(resolvedTarget[i], e, combine, isRule);
- }
- } else {
- if (!combine) {
- dst[i] = e;
- } else {
- if (dst.indexOf(e) === -1) {
- dst.push(e);
- }
- }
- }
- });
- } else {
- if (target && (typeof target === "undefined" ? "undefined" : _typeof(target)) === "object") {
- Object.keys(target).forEach(function (key) {
- dst[key] = target[key];
- });
- }
- Object.keys(src).forEach(function (key) {
- if (key === "overrides") {
- dst[key] = (target[key] || []).concat(src[key] || []);
- } else if (Array.isArray(src[key]) || Array.isArray(target[key])) {
- dst[key] = deepmerge(target[key], src[key], key === "plugins" || key === "extends", isRule);
- } else if (_typeof(src[key]) !== "object" || !src[key] || key === "exported" || key === "astGlobals") {
- dst[key] = src[key];
- } else {
- dst[key] = deepmerge(target[key] || {}, src[key], combine, key === "rules");
- }
- });
- }
-
- return dst;
- },
-
- /**
- * Normalizes the severity value of a rule's configuration to a number
- * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally
- * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0),
- * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array
- * whose first element is one of the above values. Strings are matched case-insensitively.
- * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.
- */
- getRuleSeverity: function getRuleSeverity(ruleConfig) {
- var severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
-
- if (severityValue === 0 || severityValue === 1 || severityValue === 2) {
- return severityValue;
- }
-
- if (typeof severityValue === "string") {
- return RULE_SEVERITY[severityValue.toLowerCase()] || 0;
- }
-
- return 0;
- },
-
-
- /**
- * Converts old-style severity settings (0, 1, 2) into new-style
- * severity settings (off, warn, error) for all rules. Assumption is that severity
- * values have already been validated as correct.
- * @param {Object} config The config object to normalize.
- * @returns {void}
- */
- normalizeToStrings: function normalizeToStrings(config) {
-
- if (config.rules) {
- Object.keys(config.rules).forEach(function (ruleId) {
- var ruleConfig = config.rules[ruleId];
-
- if (typeof ruleConfig === "number") {
- config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];
- } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") {
- ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];
- }
- });
- }
- },
-
-
- /**
- * Determines if the severity for the given rule configuration represents an error.
- * @param {int|string|Array} ruleConfig The configuration for an individual rule.
- * @returns {boolean} True if the rule represents an error, false if not.
- */
- isErrorSeverity: function isErrorSeverity(ruleConfig) {
- return module.exports.getRuleSeverity(ruleConfig) === 2;
- },
-
-
- /**
- * Checks whether a given config has valid severity or not.
- * @param {number|string|Array} ruleConfig - The configuration for an individual rule.
- * @returns {boolean} `true` if the configuration has valid severity.
- */
- isValidSeverity: function isValidSeverity(ruleConfig) {
- var severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;
-
- if (typeof severity === "string") {
- severity = severity.toLowerCase();
- }
- return VALID_SEVERITIES.indexOf(severity) !== -1;
- },
-
-
- /**
- * Checks whether every rule of a given config has valid severity or not.
- * @param {Object} config - The configuration for rules.
- * @returns {boolean} `true` if the configuration has valid severity.
- */
- isEverySeverityValid: function isEverySeverityValid(config) {
- var _this = this;
-
- return Object.keys(config).every(function (ruleId) {
- return _this.isValidSeverity(config[ruleId]);
- });
- },
-
-
- /**
- * Merges all configurations in a given config vector. A vector is an array of objects, each containing a config
- * file path and a list of subconfig indices that match the current file path. All config data is assumed to be
- * cached.
- * @param {Array
To print a note, select the
- button to the right of the note and select Export as PDF.
Afterwards you will be prompted to select where to save the PDF file.
Upon confirmation, the resulting PDF will be opened automatically using
@@ -33,7 +33,7 @@
report the issue. In this case, it's best to offer a sample note (click
on the
- button, select Export note → This note and all of its descendants → HTML
+ button, select Export note → This note and all of its descendants → HTML
in ZIP archive). Make sure not to accidentally leak any personal information.
Landscape mode
When exporting to PDF, there are no customizable settings such as page
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Features/Export as PDF_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Export as PDF_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Features/Export as PDF_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/New Features/Export as PDF_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Right-to-left text notes.html b/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Right-to-left text notes.html
new file mode 100644
index 000000000..58ec7cb03
--- /dev/null
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Right-to-left text notes.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ Right-to-left text notes
+
+
+
+
+
Right-to-left text notes
+
+
+
Trilium now has basic support for right-to-left text, at note level.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Note that only the Text note type supports this.
+
The list of languages is configurable via the a new dedicated settings
+ page:
+
+
+
+
To select the corresponding language of the text, go to “Basic Properties”
+ and select your desired language.
+
+
+
+
Feel free to report any issues regarding right to left support.
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Right-to-left text notes_i.png b/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Right-to-left text notes_i.png
new file mode 100644
index 000000000..7ac5d7bc4
Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Right-to-left text notes_i.png differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Features/Zen mode.html b/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Zen mode.html
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Features/Zen mode.html
rename to src/public/app/doc_notes/en/User Guide/User Guide/New Features/Zen mode.html
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Features/Zen mode_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/New Features/Zen mode_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Features/Zen mode_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/New Features/Zen mode_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/12_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/10_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/12_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/10_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/13_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/11_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/13_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/11_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/14_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/12_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/14_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/12_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/15_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/13_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/15_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/13_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/16_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/14_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/16_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/14_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/17_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/15_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/17_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/15_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/19_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/16_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/19_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/16_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/17_Geo map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/17_Geo map_image.png
new file mode 100644
index 000000000..0c1519f2c
Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/17_Geo map_image.png differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/18_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/18_Geo Map_image.png
deleted file mode 100644
index f7be847f1..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/18_Geo Map_image.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/18_Geo map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/18_Geo map_image.png
new file mode 100644
index 000000000..099642560
Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/18_Geo map_image.png differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/2_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/1_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/2_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/1_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/3_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/2_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/3_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/2_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/4_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/3_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/4_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/3_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/5_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/4_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/5_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/4_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/6_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/5_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/6_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/5_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/7_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/6_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/7_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/6_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/9_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/7_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/9_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/7_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/8_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/8_Geo Map_image.png
deleted file mode 100644
index 98397acee..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/8_Geo Map_image.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/10_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/8_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/10_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/8_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/11_Geo Map_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/9_Geo map_image.png
similarity index 100%
rename from src/public/app/doc_notes/en/User Guide/User Guide/Note Types/11_Geo Map_image.png
rename to src/public/app/doc_notes/en/User Guide/User Guide/Note Types/9_Geo map_image.png
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/19_Calendar View_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/19_Calendar View_image.png
new file mode 100644
index 000000000..2dea53b64
Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/19_Calendar View_image.png differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html
index 5e0978e68..d64ff6f88 100644
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Book/Calendar View.html
@@ -118,6 +118,12 @@
When present (regardless of value), it will show the number of the week
on the calendar.
+
+
~child:template
+
+
Defines the template for newly created notes in the calendar (via dragging
+ or clicking).
+
@@ -175,6 +181,36 @@
than the title, either a label (e.g. #assignee) or a relation
(e.g. ~for). See Advanced use-cases for more information.
+
+
#calendar:promotedAttributes
+
+
+
Allows displaying the value of one or more promoted attributes in the
+ calendar like this:
+
+
Allows using a different label to represent the start date, other than #startDate (e.g. #expiryDate).
+ The label name must be prefixed with #. If the label is not
+ defined for a note, the default will be used instead.
+
+
+
#calendar:endDate
+
+
Allows using a different label to represent the start date, other than #endDate.
+ The label name must be prefixed with #. If the label is not
+ defined for a note, the default will be used instead.
To create a marker, first navigate to the desired point on the map. Then
press the
button on the top-right of the map.
+ src="3_Geo map_image.png" width="72" height="66">button on the top-right of the map.
If the button is not visible, make sure the button section is visible
by pressing the chevron button (
) in the top-right of the map.
+ src="8_Geo map_image.png" width="72" height="66">) in the top-right of the map.
2
-
@@ -96,7 +96,7 @@
3
-
@@ -107,7 +107,7 @@
4
-
@@ -122,7 +122,7 @@
The location of a marker is stored in the #geolocation attribute
of the child notes:
-
This value can be added manually if needed. The value of the attribute
@@ -155,6 +155,13 @@
+
Icon and color of the markers
+
+
+
+
The markers will have the same icon as the note.
+
It's possible to add a custom color to a marker by assigning them a #color attribute
+ such as #color=green.
Adding the coordinates manually
In a nutshell, create a child note and set the #geolocation attribute
to the coordinates.
@@ -168,7 +175,7 @@
1
-
@@ -185,7 +192,7 @@
2
-
@@ -199,7 +206,7 @@
3
-
@@ -225,7 +232,7 @@
1
-
@@ -236,7 +243,7 @@
2
-
@@ -250,7 +257,7 @@
3
-
@@ -275,7 +282,7 @@
1
-
@@ -286,7 +293,7 @@
2
-
@@ -297,7 +304,7 @@
3
-
@@ -310,9 +317,16 @@
-
-
-
+
Troubleshooting
+
Grid-like artifacts on the map
+
+
+
+
This occurs if the application is not at 100% zoom which causes the pixels
+ of the map to not render correctly due to fractional scaling. The only
+ possible solution i to set the UI zoom at 100% (default keyboard shortcut
+ is Ctrl+0).
-
-
-
\ No newline at end of file
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language.html b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language.html
new file mode 100644
index 000000000..b6313e6c7
--- /dev/null
+++ b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+ Content language
+
+
+
+
+
Content language
+
+
+
A language hint can be provided for text notes. This option informs the
+ browser or the desktop application about the language the note is written
+ in (for example this might help with spellchecking), and it also determines
+ whether the text is displayed from right-to-left for languages such as
+ Arabic, Hebrew, etc.
To set the language of the content, go to “Basic Properties” and look
+ for the “Language” field. By default there will be no content languages
+ set, they can be configured by going to settings or by selecting the “Configure
+ languages” item in the list.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language_image.png b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language_image.png
new file mode 100644
index 000000000..20864f8af
Binary files /dev/null and b/src/public/app/doc_notes/en/User Guide/User Guide/Note Types/Text/Content language_image.png differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/1_Creating a custom theme_im.png b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/1_Creating a custom theme_im.png
deleted file mode 100644
index f90ec6f54..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/1_Creating a custom theme_im.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/1_Customize the Next theme_i.png b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/1_Customize the Next theme_i.png
deleted file mode 100644
index 49dedf623..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/1_Customize the Next theme_i.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/2_Creating a custom theme_im.png b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/2_Creating a custom theme_im.png
deleted file mode 100644
index a88f2379e..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/2_Creating a custom theme_im.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/3_Creating a custom theme_im.png b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/3_Creating a custom theme_im.png
deleted file mode 100644
index 733ac21d1..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/3_Creating a custom theme_im.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/4_Creating a custom theme_im.png b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/4_Creating a custom theme_im.png
deleted file mode 100644
index ab66f9ecf..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/4_Creating a custom theme_im.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/5_Creating a custom theme_im.png b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/5_Creating a custom theme_im.png
deleted file mode 100644
index 60ed508e2..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/5_Creating a custom theme_im.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme.html b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme.html
deleted file mode 100644
index bde660104..000000000
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme.html
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
-
- Creating a custom theme
-
-
-
-
-
Creating a custom theme
-
-
-
Step 1. Find a place to place the themes
-
Organization is an important aspect of managing a knowledge base. When
- developing a new theme or importing an existing one it's a good idea to
- keep them into one place.
-
As such, the first step is to create a new note to gather all the themes.
-
-
-
-
Step 2. Create the theme
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Themes are code notes with a special attribute. Start by creating a new
- code note.
-
-
-
-
-
-
-
-
Then change the note type to a CSS code.
-
-
-
-
-
-
-
-
In the Owned Attributes section define the #appTheme attribute
- to point to any desired name. This is the name that will show up in the
- appearance section in settings.
-
-
-
-
-
Step 3. Define the theme's CSS
-
As a very simple example we will change the background color of the launcher
- pane to a shade of blue.
Refresh the application (Ctrl+Shift+R is a good way to do so) and go to
- settings. You should see the newly created theme:
-
-
-
-
Afterwards the application will refresh itself with the new theme:
-
-
-
-
Do note that the theme will be based off of the legacy theme. To override
- that and base the theme on the new TriliumNext theme, see: Theme base (legacy vs. next)
-
-
Step 5. Making changes
-
Simply go back to the note and change according to needs. To apply the
- changes to the current window, press Ctrl+Shift+R to refresh.
-
It's a good idea to keep two windows, one for editing and the other one
- for previewing the changes.
-
-
-
-
-
\ No newline at end of file
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme_im.png b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme_im.png
deleted file mode 100644
index 59dccde8c..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Creating a custom theme_im.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme.html b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme.html
deleted file mode 100644
index 7b3314827..000000000
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
- Customize the Next theme
-
-
-
-
-
Customize the Next theme
-
-
-
By default, any custom theme will be based on the legacy light theme.
- To use the TriliumNext theme instead, add the #appThemeBase=next attribute
- onto the existing theme. The appTheme attribute must also be
- present.
-
-
-
-
When appThemeBase is set to next it will use the
- “TriliumNext (auto)” theme. Any other value is ignored and will use the
- legacy white theme instead.
-
Overrides
-
Do note that the TriliumNext theme has a few more overrides than the legacy
- theme, so you might need to suffix !important if the style changes
- are not applied.
-
-
-
\ No newline at end of file
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme_i.png b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme_i.png
deleted file mode 100644
index 83b9d7d10..000000000
Binary files a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Customize the Next theme_i.png and /dev/null differ
diff --git a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Reference.html b/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Reference.html
deleted file mode 100644
index b745855ec..000000000
--- a/src/public/app/doc_notes/en/User Guide/User Guide/Theme development/Reference.html
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
- Reference
-
-
-
-
-
Reference
-
-
-
Detecting mobile vs. desktop
-
The mobile layout is different than the one on the desktop. Use body.mobile and body.desktop to
- differentiate between them.
body.mobile #root-widget {
- /* Do something on mobile */
-}
-
-body.desktop #root-widget {
- /* Do something on desktop */
-}
-
Do note that there is also a “tablet mode” in the mobile layout. For that
- particular case media queries are required:
@media (max-width: 991px) {
-
- #launcher-pane {
-
- /* Do something on mobile layout */
-
- }
-
-}
-
-
-
-@media (min-width: 992px) {
-
- #launcher-pane {
-
- /* Do something on mobile tablet + desktop layout */
-
- }
-
-}
-
Detecting horizontal vs. vertical layout
-
The user can select between vertical layout (the classical one, where
- the launcher bar is on the left) and a horizontal layout (where the launcher
- bar is on the top and tabs are full-width).
-
Different styles can be applied by using classes at body level:
body.layout-vertical #left-pane {
- /* Do something */
-}
-
-body.layout-horizontal #center-pane {
- /* Do something else */
-}
-
The two different layouts use different containers (but they are present
- in the DOM regardless of the user's choice), for example #horizontal-main-container and #vertical-main-container can
- be used to customize the background of the content section.
-
Detecting platform (Windows, macOS) or Electron
-
It is possible to add particular styles that only apply to a given platform
- by using the classes in body:
-
-
-
-
-
Windows
-
macOS
-
-
-
-
-
body.platform-win32 {
- background: red;
-}
-
-
body.platform-darwin {
- background: red;
-}
-
-
-
-
-
-
It is also possible to only apply a style if running under Electron (desktop
- application):
body.electron {
- background: blue;
-}
-
Native title bar
-
It's possible to detect if the user has selected the native title bar
- or the custom title bar by querying against body:
body.electron.native-titlebar {
- /* Do something */
-}
-
-body.electron:not(.native-titlebar) {
- /* Do something else */
-}
-
Native window buttons
-
When running under Electron with native title bar off, a feature was introduced
- to use the platform-specific window buttons such as the semaphore on macOS.
The colors of the native window button area can be adjusted using a RGB
- hex color:
body {
- --native-titlebar-foreground: #ffffff;
- --native-titlebar-background: #ff0000;
-}
-
It is also possible to use transparency at the cost of reduced hover colors
- using a RGBA hex color:
body {
- --native-titlebar-background: #ff0000aa;
-}
-
Note that the value is read when the window is initialized and then it
- is refreshed only when the user changes their light/dark mode preference.
-
On macOS
-
On macOS the semaphore window buttons are enabled by default when the
- native title bar is disabled. The offset of the buttons can be adjusted
- using:
body {
- --native-titlebar-darwin-x-offset: 12;
- --native-titlebar-darwin-y-offset: 14 !important;
-}
-
Background/transparency effects on Windows (Mica)
-
Windows 11 offers a special background/transparency effect called Mica,
- which can be enabled by themes by setting the --background-material variable
- at body level:
The value can be either tabbed (especially useful for the horizontal
- layout) or mica (ideal for the vertical layout).
-
Do note that the Mica effect is applied at body level and the
- theme needs to make the entire hierarchy (semi-)transparent in order for
- it to be visible. Use the TrilumNext theme as an inspiration.
-
Note icons, tab workspace accent color
-
Theme capabilities are small adjustments done through CSS variables that
- can affect the layout or the visual aspect of the application.
-
In the tab bar, to display the icons of notes instead of the icon of the
- workspace:
:root {
- --tab-note-icons: true;
-}
-
When a workspace is hoisted for a given tab, it is possible to get the
- background color of that workspace, for example to apply a small strip
- on the tab instead of the whole background color:
Currently the only way to include a custom font is to use Custom resource providers.
- Basically import a font into Trilium and assign it #customResourceProvider=fonts/myfont.ttf and
- then import the font in CSS via /custom/fonts/myfont.ttf.
-
Dark and light themes
-
A light theme needs to have the following CSS:
:root {
- --theme-style: light;
-}
-
if the theme is dark, then --theme-style needs to be dark.
-
If the theme is auto (e.g. supports both light or dark based on prefers-color-scheme)
- it must also declare (in addition to setting --theme-style to
- either light or dark):
:root {
-
- --theme-style-auto: true;
-
-}
-
This will affect the behavior of the Electron application by informing
- the operating system of the color preference (e.g. background effects will
- appear correct on Windows).
-
-
-
-
-
\ No newline at end of file
diff --git a/src/public/app/doc_notes/en/User Guide/index.html b/src/public/app/doc_notes/en/User Guide/index.html
index c5c17da96..a0520a973 100644
--- a/src/public/app/doc_notes/en/User Guide/index.html
+++ b/src/public/app/doc_notes/en/User Guide/index.html
@@ -6,6 +6,6 @@