From 859afd0b00a605547062fa1084482a9313047429 Mon Sep 17 00:00:00 2001 From: lungsangg Date: Thu, 11 Jan 2024 14:31:23 +0530 Subject: [PATCH] sidzan&beevk_setup --- .gitignore | 7 + Dockerfile | 37 +- build.sh | 8 + docker-compose.yml | 55 +- package-lock.json | 1612 +++++------ sefaria/build.sh | 5 + sefaria/helper/search.py | 8 +- sefaria/local_settings_ci.py | 30 +- sefaria/settings.py | 33 +- sefaria/system/database.py | 211 +- sefaria/system/decorators.py | 9 +- static/js/Misc.jsx | 2462 ++++++++--------- static/js/TextsPage.jsx | 153 +- .../registration/delete_user_account.html | 6 +- 14 files changed, 2206 insertions(+), 2430 deletions(-) create mode 100644 build.sh create mode 100644 sefaria/build.sh diff --git a/.gitignore b/.gitignore index 4cac56b0bb..ebeceb61e2 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,10 @@ static/sheetrank.json env/* dump/* +tmp/* +log/* +/static/bundles +/dockerData + +.env +.envrc \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 63ba83b693..b87faa59bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,26 +1,29 @@ -# Use an official Python runtime as a parent image -FROM python:3.7-slim +# Use node-python image as the base image +FROM beevk/node-python:0.2 -# Set the working directory to /app +# Set the working directory inside the container WORKDIR /app -# Copy the current directory contents into the container at /app -COPY . /app +# Copy the local_settings.py file to the working directory +COPY ./sefaria/local_settings.py ./sefaria/local_settings.py -# Install psycopg2 dependencies -RUN apt-get update && apt-get install -y libpq-dev +# Copy the requirements.txt file and install dependencies +COPY requirements.txt ./ +COPY package*.json ./ -# Install gcc -RUN apt-get update && apt-get install -y gcc +RUN pip install -r requirements.txt +RUN npm install --unsafe-perm -# Install any needed packages specified in requirements.txt -RUN pip install --trusted-host pypi.python.org -r requirements.txt +COPY ./node ./node +COPY ./static/js ./static/js -# Make port 8000 available to the world outside this container -EXPOSE 8000 +RUN npm run setup +RUN npm run build-prod -# Define environment variable -ENV NAME Sefaria-Project +COPY . ./ -# Run app.py when the container launches -CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] +# Run Django migrations and start the server +CMD ["bash", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8000"] + +# Expose the port that the Django server will listen on +EXPOSE 8000 \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000000..14cfcfb22f --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# exit on error +set -o errexit + +pip install -r requirements.txt +python manage.py collectstatic --no-input +python manage.py migrate +python manage.py createsu \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 725691f7b9..1420c7ec22 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,49 +1,16 @@ -version: '3' +version: '3.8' services: - web: - build: . + sefaria: + image: ghcr.io/sidzan/sidzan/sefaria:latest + container_name: sefaria-local ports: - "8000:8000" - volumes: - - .:/app - depends_on: - - db - - cache - - postgres - - db: - image: "mongo:4.4" - ports: - - "27018:27017" - volumes: - - mongo-data:/data/db - - cache: - image: "redis:latest" - ports: - - "6379:6379" - - node: - image: "node:latest" - working_dir: /app - volumes: - - .:/app - command: npm start - ports: - - "3000:3000" - - postgres: - image: "postgres:latest" environment: - POSTGRES_USER: admin - POSTGRES_PASSWORD: admin - POSTGRES_DB: sefaria - ports: - - "5433:5432" - volumes: - - postgres-data:/var/lib/postgresql/sefaria_data - -volumes: - mongo-data: - postgres-data: + - MONGO_DATABASE_NAME=${MONGO_DATABASE_NAME} + - MONGO_HOST=${MONGO_HOST} + - POSTGRESQL_DATABASE_NAME=${POSTGRESQL_DATABASE_NAME} + - POSTGRESQL_HOST=${POSTGRESQL_HOST} + - POSTGRESQL_PASSWORD=${POSTGRESQL_PASSWORD} + - POSTGRESQL_USER=${POSTGRESQL_USER} + - REDIS_HOST=${REDIS_HOST} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0a2bd0d49b..e31c058d3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,13 +10,12 @@ "hasInstallScript": true, "license": "GPL-3.0", "dependencies": { - "@sentry/react": "^7.57.0", "body-parser": "^1.15.1", "buffer": "^6.0.3", "cheerio": "^0.22.0", "classnames": "^2.2.5", "cookie-parser": "^1.4.2", - "core-js": "^3.31.1", + "core-js": "^3.15.2", "css-modules-require-hook": "^4.2.3", "deep-merge": "^1.0.0", "diff-match-patch": "^1.0.0", @@ -97,9 +96,9 @@ } }, "node_modules/@babel/cli": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.21.0.tgz", - "integrity": "sha512-xi7CxyS8XjSyiwUGCfwf+brtJxjW1/ZTcBUkP10xawIEXLX5HzLn+3aXkgxozcP2UhRhtKTmQurw9Uaes7jZrA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.22.6.tgz", + "integrity": "sha512-Be3/RfEDmkMRGT1+ru5nTkfcvWz5jDOYg1V9rXqTz2u9Qt96O1ryboGvxVBp7wOnYWDB8DNHIWb6DThrpudfOw==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.17", @@ -126,47 +125,47 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.4.tgz", - "integrity": "sha512-/DYyDpeCfaVinT40FPGdkkb+lYSKvsVuMjDAG7jPOWWiM1ibOaB9CXJAlc4d1QpP/U2q2P9jbrSlClKSErd55g==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.6.tgz", + "integrity": "sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.4.tgz", - "integrity": "sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA==", + "version": "7.22.8", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.8.tgz", + "integrity": "sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-compilation-targets": "^7.21.4", - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.4", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.4", - "@babel/types": "^7.21.4", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.7", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helpers": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.8", + "@babel/types": "^7.22.5", + "@nicolo-ribaudo/semver-v6": "^6.3.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" + "json5": "^2.2.2" }, "engines": { "node": ">=6.9.0" @@ -177,12 +176,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.4.tgz", - "integrity": "sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA==", + "version": "7.22.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.7.tgz", + "integrity": "sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ==", "dev": true, "dependencies": { - "@babel/types": "^7.21.4", + "@babel/types": "^7.22.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -192,41 +191,40 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", + "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", - "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.5.tgz", + "integrity": "sha512-m1EP3lVOPptR+2DwD125gziZNcmoNSHGmJROKoy87loWUQyJaVXDgpmruWqDARZSmtYQ+Dl25okU8+qhVzuykw==", "dev": true, "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.21.4.tgz", - "integrity": "sha512-Fa0tTuOXZ1iL8IeDFUWCzjZcn+sJGd9RZdH9esYVjEejGmzf+FFYQpMi/kZUk2kPy/q1H3/GPw7np8qar/stfg==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.6.tgz", + "integrity": "sha512-534sYEqWD9VfUm3IPn2SLcH4Q3P86XL+QvqdC7ZsFrzyyPF3T4XGiVghF6PTYNdWg6pXuoqXxNQAhbYeEInTzA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.21.4", - "@babel/helper-validator-option": "^7.21.0", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "@babel/compat-data": "^7.22.6", + "@babel/helper-validator-option": "^7.22.5", + "@nicolo-ribaudo/semver-v6": "^6.3.3", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1" }, "engines": { "node": ">=6.9.0" @@ -236,19 +234,20 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.21.4.tgz", - "integrity": "sha512-46QrX2CQlaFRF4TkwfTt6nJD7IHq8539cCL7SDpqWSDeJKY1xylKKY5F/33mJhLZ3mFvKv2gGrVS6NkyF6qs+Q==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.6.tgz", + "integrity": "sha512-iwdzgtSiBxF6ni6mzVnZCF3xt5qE6cEA0J7nFt8QOAWZ0zjCFceEgpn3vtb2V7WFR6QzP2jmIFOHMTRo7eNJjQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-member-expression-to-functions": "^7.21.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/helper-split-export-declaration": "^7.18.6" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@nicolo-ribaudo/semver-v6": "^6.3.3" }, "engines": { "node": ">=6.9.0" @@ -258,12 +257,13 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.21.4.tgz", - "integrity": "sha512-M00OuhU+0GyZ5iBBN9czjugzWrEq2vDpf/zCYHxxf93ul/Q5rv+a5h+/+0WnI1AebHNVtl5bFV0qsJoH23DbfA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.6.tgz", + "integrity": "sha512-nBookhLKxAWo/TUCmhnaEJyLz2dekjQvv5SRpE9epWQBcpedWLKt8aZdsuT9XV5ovzR3fENLjRXVT0GsSlGGhA==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-annotate-as-pure": "^7.22.5", + "@nicolo-ribaudo/semver-v6": "^6.3.3", "regexpu-core": "^5.3.1" }, "engines": { @@ -274,142 +274,129 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.1.tgz", + "integrity": "sha512-kX4oXixDxG197yhX+J3Wp+NpL2wuCFjWQAr6yX2jtCnflK9ulMI51ULFGIrWiX1jGfvAxdHp+XQCcP2bZGPs9A==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "resolve": "^1.14.2" }, "peerDependencies": { "@babel/core": "^7.4.0-0" } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz", + "integrity": "sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==", "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", "dev": true, "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.21.0.tgz", - "integrity": "sha512-Muu8cdZwNN6mRRNG6lAYErJ5X3bRevgYR2O8wN0yn7jJSnGDu6eG59RfT29JHxGUovyfrh6Pj0XzmR7drNVL3Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz", + "integrity": "sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==", "dev": true, "dependencies": { - "@babel/types": "^7.21.0" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", - "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz", + "integrity": "sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==", "dev": true, "dependencies": { - "@babel/types": "^7.21.4" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", - "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz", + "integrity": "sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", + "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", - "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", - "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz", + "integrity": "sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-wrap-function": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -419,121 +406,121 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz", - "integrity": "sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz", + "integrity": "sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.20.7", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-member-expression-to-functions": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", - "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", "dev": true, "dependencies": { - "@babel/types": "^7.20.2" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz", - "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", + "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", "dev": true, "dependencies": { - "@babel/types": "^7.20.0" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", - "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz", + "integrity": "sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz", - "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz", + "integrity": "sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.19.0", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.5", - "@babel/types": "^7.20.5" + "@babel/helper-function-name": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", - "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz", + "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==", "dev": true, "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.6", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", + "@babel/helper-validator-identifier": "^7.22.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -542,9 +529,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.4.tgz", - "integrity": "sha512-alVJj7k7zIxqBZ7BTRhz0IqJFxW1VJbm6N8JbcYhQ186df9ZBPbZBmWSqAMXwHGsCJdYks7z/voa3ibiS5bCIw==", + "version": "7.22.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", + "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -554,12 +541,12 @@ } }, "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz", + "integrity": "sha512-NP1M5Rf+u2Gw9qfSO4ihjcTGW5zXTi36ITLd4/EoAcEhIZ0yjMqmftDNl3QC19CX7olhrjpyU454g/2W7X0jvQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -569,14 +556,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz", - "integrity": "sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz", + "integrity": "sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-proposal-optional-chaining": "^7.20.7" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -585,16 +572,17 @@ "@babel/core": "^7.13.0" } }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { + "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz", - "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", + "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", + "@babel/compat-data": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.7", "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.7" }, "engines": { "node": ">=6.9.0" @@ -603,15 +591,11 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, "engines": { "node": ">=6.9.0" }, @@ -619,63 +603,53 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz", - "integrity": "sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw==", + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { - "node": ">=6.9.0" + "node": ">=4" }, "peerDependencies": { - "@babel/core": "^7.12.0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.12.13" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-plugin-utils": "^7.14.5" }, "engines": { "node": ">=6.9.0" @@ -684,46 +658,37 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz", - "integrity": "sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==", + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.3" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.22.5.tgz", + "integrity": "sha512-rdV97N7KqsRzeNGoWUOK6yUsWarLjE5Su/Snk9IYPU9CwkWHs4t+rTGOvffTR8XGkJMTAdLfO0xVnXm8wugIJg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -732,17 +697,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", - "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.5.tgz", + "integrity": "sha512-KwvoWDeNKPETmozyFE0P2rOLqh39EoQHNjqizrI5B8Vt0ZNS7M56s7dAiAqbYfiAYOuIzIh96z3iR2ktgu3tEg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -751,31 +712,37 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.10.4" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", - "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.21.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz", + "integrity": "sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-plugin-utils": "^7.20.2" }, "engines": { "node": ">=6.9.0" @@ -784,60 +751,70 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz", - "integrity": "sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw==", + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.8.0" }, - "engines": { - "node": ">=4" + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" @@ -846,22 +823,25 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-class-static-block": { + "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" @@ -873,37 +853,64 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz", + "integrity": "sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.22.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.7.tgz", + "integrity": "sha512-7HmE7pk/Fmke45TODvxvkxRMV9RazV+ZZzhOL9AG8G29TLrr3jkjwF7uJfxZ30EoXpO+LJkq4oA8NjO2DTnEDg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", - "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz", + "integrity": "sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-remap-async-to-generator": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -912,25 +919,28 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.22.5.tgz", + "integrity": "sha512-tdXZ2UdknEKQWKJP1KMNmuF5Lx3MymtMN/pvA+p/VEkhK8jVcQ1fzSy8KM9qRYhAf2/lV33hoMPKI/xaI9sADA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz", - "integrity": "sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==", + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz", + "integrity": "sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -939,85 +949,132 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.5.tgz", + "integrity": "sha512-nDkQ0NfkOhPTq8YCLiWNxp1+f9fCobEjCb0n8WdbNUBc4IB5V7P1QnX9IjpSoquKrXF5SKojHleVNs2vGeHCHQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.5.tgz", + "integrity": "sha512-SPToJ5eYZLxlnp1UzdARpOGeC2GbHvr9d/UV0EukuVx8atktg194oe+C5BqQ8jRTkgLRVOPYeXRSBg1IlMoVRA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.6.tgz", + "integrity": "sha512-58EgM6nuPNG6Py4Z3zSuu0xWu2VfodiMi72Jt5Kj2FECmaYk1RrTXA45z6KBFsu9tRgwQDwIiY4FXTt+YsSFAQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-optimise-call-expression": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz", + "integrity": "sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/template": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz", + "integrity": "sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.22.5.tgz", + "integrity": "sha512-5/Yk9QxCQCl+sOIB1WelKnVRxTJDSAIxtJLL2/pqL14ZVlbH0fUQUZa/T5/UnQtBNgghR7mfB8ERBKyKPCi7Vw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.22.5.tgz", + "integrity": "sha512-dEnYD+9BBgld5VBXHnF/DbYGp3fqGMsyxKbtD1mDyIA7AkTSpKXFhCVuj/oQVOoALfBs77DudA0BE4d5mcpmqw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.5.tgz", + "integrity": "sha512-0MC3ppTB1AMxd8fXjSrbPa7LT9hrImt+/fcj+Pg5YMD7UQyWp/02+JWpdnCymmsXwIx5Z+sYn1bwCn4ZJNvhqQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1026,13 +1083,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.22.5.tgz", + "integrity": "sha512-vIpJFNM/FjZ4rh1myqIya9jXwrwwgFRHPjT3DkUA9ZLHuzox8jiXkOLvwm1H+PQIP3CqfC++WPKeuDi0Sjdj1g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1041,13 +1099,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz", - "integrity": "sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ==", + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.5.tgz", + "integrity": "sha512-X4hhm7FRnPgd4nDA4b/5V280xCx6oL7Oob5+9qVS5C13Zq4bh1qq7LU0GgRU6b5dBWBvhGaXYVB4AcN6+ol6vg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1056,15 +1115,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz", - "integrity": "sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q==", + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz", + "integrity": "sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A==", "dev": true, "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1073,13 +1130,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.22.5.tgz", + "integrity": "sha512-UIzQNMS0p0HHiQm3oelztj+ECwFnj+ZRV4KnguvlsD2of1whUeM6o7wGNj6oLwcDoAXQ8gEqfgC24D+VdIcevg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1088,13 +1147,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz", - "integrity": "sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ==", + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.5.tgz", + "integrity": "sha512-DuCRB7fu8MyTLbEQd1ew3R85nx/88yMoqo2uPSjevMj3yoN7CDM8jkgrY0wmVxfJZyJ/B9fE1iq7EQppWQmR5A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1103,21 +1163,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz", - "integrity": "sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ==", + "node_modules/@babel/plugin-transform-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.22.5.tgz", + "integrity": "sha512-fTLj4D79M+mepcw3dgFBTIDYpbcB9Sm0bpm4ppXPaO+U+PKFFyV9MGRvS0gvGw62sd10kT5lRMKXAADb9pWy8g==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1126,14 +1178,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz", - "integrity": "sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ==", + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.5.tgz", + "integrity": "sha512-MQQOUW1KL8X0cDWfbwYP+TbVbZm16QmQXJQ+vndPtH/BoO0lOKpVoEDMI7+PskYxH+IiE0tS8xZye0qr1lGzSA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/template": "^7.20.7" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { "node": ">=6.9.0" @@ -1142,13 +1194,13 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz", - "integrity": "sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA==", + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.22.5.tgz", + "integrity": "sha512-RZEdkNtzzYCFl9SE9ATaUMTj2hqMb4StarOJLrZRbqqU4HSBE7UlBw9WBWQiDzrJZJdUWiMTVDI6Gv/8DPvfew==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1157,14 +1209,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz", + "integrity": "sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1173,13 +1225,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", - "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz", + "integrity": "sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1188,14 +1242,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz", + "integrity": "sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ==", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1204,13 +1260,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.0.tgz", - "integrity": "sha512-LlUYlydgDkKpIY7mcBWvyPPmMcOphEyYA27Ef4xpbh1IiDNLr0kZsos2nf92vz3IccvJI25QUwp86Eo5s6HmBQ==", + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.22.5.tgz", + "integrity": "sha512-+S6kzefN/E1vkSsKx8kmQuqeQsvCKCd1fraCM7zXm4SFoggI099Tr4G8U81+5gtMdUeMQ4ipdQffbKLX0/7dBQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1219,30 +1276,29 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", - "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz", + "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", - "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.5.tgz", + "integrity": "sha512-AsF7K0Fx/cNKVyk3a+DW0JLo+Ua598/NxMRvxDnkpCIGFh43+h/v2xyhRUYf6oD8gE4QtL83C7zZVghMjHd+iw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1251,13 +1307,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.5.tgz", + "integrity": "sha512-6CF8g6z1dNYZ/VXok5uYkkBBICHZPiGEl7oDnAx2Mt1hlHVHOSIKWJaXHjQJA5VB43KZnXZDIexMchY4y2PGdA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1266,14 +1323,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz", - "integrity": "sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g==", + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.5.tgz", + "integrity": "sha512-NbslED1/6M+sXiwwtcAB/nieypGw02Ejf4KtDeMkCEpP6gWFMX1wI9WKYua+4oBneCCEmulOkRpwywypVZzs/g==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { "node": ">=6.9.0" @@ -1282,15 +1339,17 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.2.tgz", - "integrity": "sha512-Cln+Yy04Gxua7iPdj6nOV96smLGjpElir5YwzF0LBPKoPlLDNJePNlrGGaybAJkd0zKRnOVXOgizSqPYMNYkzA==", + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.5.tgz", + "integrity": "sha512-Kk3lyDmEslH9DnvCDA1s1kkd3YWQITiBOHngOtDL9Pt6BZjzqb6hiOlb8VfjiiQJ2unmegBqZu0rx5RxJb5vmQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.21.2", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-simple-access": "^7.20.2" + "@babel/compat-data": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1299,16 +1358,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz", - "integrity": "sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw==", + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.22.5.tgz", + "integrity": "sha512-klXqyaT9trSjIUrcsYIfETAzmOEZL3cBYqOYLJxBHfMFFggmXOv+NYSX/Jbs9mzMVESw/WycLFPRx8ba/b2Ipw==", "dev": true, "dependencies": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-identifier": "^7.19.1" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-replace-supers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1317,14 +1374,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.5.tgz", + "integrity": "sha512-pH8orJahy+hzZje5b8e2QIlBWQvGpelS76C63Z+jhZKsmzfNaPQ+LaW6dcJ9bxTpo1mtXbgHwy765Ro3jftmUg==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { "node": ">=6.9.0" @@ -1333,29 +1390,30 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz", - "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==", + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.6.tgz", + "integrity": "sha512-Vd5HiWml0mDVtcLHIoEU5sw6HOUW/Zk0acLs/SAeuLzkGNOPc9DB4nkUajemhCmTIz3eiaKREZn2hQQqF79YTg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.20.5", - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz", + "integrity": "sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1364,14 +1422,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.5.tgz", + "integrity": "sha512-PPjh4gyrQnGe97JTalgRGMuU4icsZFnWkzicB/fUtzlKUqvsWBKEpPPfr5a2JiyirZkHxnAqkQMO5Z5B2kK3fA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1380,13 +1438,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.21.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.21.3.tgz", - "integrity": "sha512-Wxc+TvppQG9xWFYatvCGPvZ6+SIUxQ2ZdiBP+PHYMIjnPXD+uThCshaz4NZOnODAtBjjcVQQ/3OKs9LW28purQ==", + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.5.tgz", + "integrity": "sha512-/9xnaTTJcVoBtSSmrVyhtSvO3kbqS2ODoh2juEU72c3aYonNF0OMGiaz2gjukyKM2wBBYJP38S4JiE0Wfb5VMQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-create-class-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { "node": ">=6.9.0" @@ -1396,12 +1457,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.22.5.tgz", + "integrity": "sha512-TiOArgddK3mK/x1Qwf5hay2pxI6wCZnvQqrFSqbtg1GLl2JcNMitVH/YnqjP+M31pLUeTfzY1HAXFDnUBV30rQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1476,12 +1537,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", - "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz", + "integrity": "sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", + "@babel/helper-plugin-utils": "^7.22.5", "regenerator-transform": "^0.15.1" }, "engines": { @@ -1492,12 +1553,12 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.22.5.tgz", + "integrity": "sha512-DTtGKFRQUDm8svigJzZHzb/2xatPc6TzNvAIJ5GqOKDsGFYgAskjRulbR/vGsPKq3OPqtexnz327qYpP57RFyA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1507,12 +1568,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.22.5.tgz", + "integrity": "sha512-vM4fq9IXHscXVKzDv5itkO1X52SmdFBFcMIBZ2FRn2nqVYqw6dBexUgMvAjHW+KXpPPViD/Yo3GrDEBaRC0QYA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1522,13 +1583,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz", - "integrity": "sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz", + "integrity": "sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0" + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1538,12 +1599,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.22.5.tgz", + "integrity": "sha512-zf7LuNpHG0iEeiyCNwX4j3gDg1jgt1k3ZdXBKbZSoA3BbGQGvMiSvfbZRR3Dr3aeJe3ooWFZxOOG3IRStYp2Bw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1553,12 +1614,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", - "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.22.5.tgz", + "integrity": "sha512-5ciOehRNf+EyUeewo8NkbQiUs4d6ZxiHo6BcBcnFlgiJfu16q0bQUw9Jvo0b0gBKFG1SMhDSjeKXSYuJLeFSMA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1568,12 +1629,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", - "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.22.5.tgz", + "integrity": "sha512-bYkI5lMzL4kPii4HHEEChkD0rkc+nvnlR6+o/qdqR6zrm0Sv/nodmyLhlq2DO0YKLUNd2VePmPRjJXSBh9OIdA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1583,12 +1644,28 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.22.5.tgz", + "integrity": "sha512-biEmVg1IYB/raUO5wT1tgfacCef15Fbzhkx493D3urBI++6hpJ+RFG4SrWMn0NEZLfvilqKf3QDrRVZHo08FYg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.5.tgz", + "integrity": "sha512-HCCIb+CbJIAE6sXn5CjFQXMwkCClcOfPCzTlilJ8cUatfzwHlWQkbtV0zD338u9dZskwvuOYTuuaMaA8J5EI5A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1598,13 +1675,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.22.5.tgz", + "integrity": "sha512-028laaOKptN5vHJf9/Arr/HiJekMd41hOEZYvNsrsXqJ7YPYuX2bQxh31fkZzGmq3YqHRJzYFFAVYvKfMPKqyg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1613,39 +1690,43 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/preset-env": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.21.4.tgz", - "integrity": "sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw==", + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.5.tgz", + "integrity": "sha512-lhMfi4FC15j13eKrh3DnYHjpGj6UKQHtNKTbtc1igvAhRy4+kLhV07OpLcsN0VgDEw/MjAvJO4BdMJsHwMhzCg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.21.4", - "@babel/helper-compilation-targets": "^7.21.4", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.21.0", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.20.7", - "@babel/plugin-proposal-async-generator-functions": "^7.20.7", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.21.0", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.20.7", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.7", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.21.0", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.21.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", + "@babel/helper-create-regexp-features-plugin": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.22.7", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.22.7.tgz", + "integrity": "sha512-1whfDtW+CzhETuzYXfcgZAh8/GFMeEbz0V5dVgya8YeJyCU6Y/P2Gnx4Qb3MylK68Zu9UiwUvbPMPTpFAOJ+sQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.6", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.22.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.22.5", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-syntax-class-static-block": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.20.0", + "@babel/plugin-syntax-import-assertions": "^7.22.5", + "@babel/plugin-syntax-import-attributes": "^7.22.5", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", @@ -1655,45 +1736,62 @@ "@babel/plugin-syntax-optional-chaining": "^7.8.3", "@babel/plugin-syntax-private-property-in-object": "^7.14.5", "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.20.7", - "@babel/plugin-transform-async-to-generator": "^7.20.7", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.21.0", - "@babel/plugin-transform-classes": "^7.21.0", - "@babel/plugin-transform-computed-properties": "^7.20.7", - "@babel/plugin-transform-destructuring": "^7.21.3", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.21.0", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.20.11", - "@babel/plugin-transform-modules-commonjs": "^7.21.2", - "@babel/plugin-transform-modules-systemjs": "^7.20.11", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.20.5", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.21.3", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.20.5", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.20.7", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.22.5", + "@babel/plugin-transform-async-generator-functions": "^7.22.7", + "@babel/plugin-transform-async-to-generator": "^7.22.5", + "@babel/plugin-transform-block-scoped-functions": "^7.22.5", + "@babel/plugin-transform-block-scoping": "^7.22.5", + "@babel/plugin-transform-class-properties": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.22.5", + "@babel/plugin-transform-classes": "^7.22.6", + "@babel/plugin-transform-computed-properties": "^7.22.5", + "@babel/plugin-transform-destructuring": "^7.22.5", + "@babel/plugin-transform-dotall-regex": "^7.22.5", + "@babel/plugin-transform-duplicate-keys": "^7.22.5", + "@babel/plugin-transform-dynamic-import": "^7.22.5", + "@babel/plugin-transform-exponentiation-operator": "^7.22.5", + "@babel/plugin-transform-export-namespace-from": "^7.22.5", + "@babel/plugin-transform-for-of": "^7.22.5", + "@babel/plugin-transform-function-name": "^7.22.5", + "@babel/plugin-transform-json-strings": "^7.22.5", + "@babel/plugin-transform-literals": "^7.22.5", + "@babel/plugin-transform-logical-assignment-operators": "^7.22.5", + "@babel/plugin-transform-member-expression-literals": "^7.22.5", + "@babel/plugin-transform-modules-amd": "^7.22.5", + "@babel/plugin-transform-modules-commonjs": "^7.22.5", + "@babel/plugin-transform-modules-systemjs": "^7.22.5", + "@babel/plugin-transform-modules-umd": "^7.22.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5", + "@babel/plugin-transform-new-target": "^7.22.5", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.22.5", + "@babel/plugin-transform-numeric-separator": "^7.22.5", + "@babel/plugin-transform-object-rest-spread": "^7.22.5", + "@babel/plugin-transform-object-super": "^7.22.5", + "@babel/plugin-transform-optional-catch-binding": "^7.22.5", + "@babel/plugin-transform-optional-chaining": "^7.22.6", + "@babel/plugin-transform-parameters": "^7.22.5", + "@babel/plugin-transform-private-methods": "^7.22.5", + "@babel/plugin-transform-private-property-in-object": "^7.22.5", + "@babel/plugin-transform-property-literals": "^7.22.5", + "@babel/plugin-transform-regenerator": "^7.22.5", + "@babel/plugin-transform-reserved-words": "^7.22.5", + "@babel/plugin-transform-shorthand-properties": "^7.22.5", + "@babel/plugin-transform-spread": "^7.22.5", + "@babel/plugin-transform-sticky-regex": "^7.22.5", + "@babel/plugin-transform-template-literals": "^7.22.5", + "@babel/plugin-transform-typeof-symbol": "^7.22.5", + "@babel/plugin-transform-unicode-escapes": "^7.22.5", + "@babel/plugin-transform-unicode-property-regex": "^7.22.5", + "@babel/plugin-transform-unicode-regex": "^7.22.5", + "@babel/plugin-transform-unicode-sets-regex": "^7.22.5", "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.21.4", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", - "core-js-compat": "^3.25.1", - "semver": "^6.3.0" + "@babel/types": "^7.22.5", + "@nicolo-ribaudo/semver-v6": "^6.3.3", + "babel-plugin-polyfill-corejs2": "^0.4.4", + "babel-plugin-polyfill-corejs3": "^0.8.2", + "babel-plugin-polyfill-regenerator": "^0.5.1", + "core-js-compat": "^3.31.0" }, "engines": { "node": ">=6.9.0" @@ -1745,9 +1843,9 @@ "dev": true }, "node_modules/@babel/runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", - "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz", + "integrity": "sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ==", "dev": true, "dependencies": { "regenerator-runtime": "^0.13.11" @@ -1776,33 +1874,33 @@ "hasInstallScript": true }, "node_modules/@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", + "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.4.tgz", - "integrity": "sha512-eyKrRHKdyZxqDm+fV1iqL9UAHMoIg0nDaGqfIOd8rKH17m5snv7Gn4qgjBoFfLz9APvjFU/ICT00NVCv1Epp8Q==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.21.4", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.4", - "@babel/types": "^7.21.4", + "version": "7.22.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", + "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.7", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/types": "^7.22.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1811,13 +1909,13 @@ } }, "node_modules/@babel/types": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.4.tgz", - "integrity": "sha512-rU2oY501qDxE8Pyo7i/Orqma4ziCOrby0/9mvbDUGEfvZjb279Nk9k19e2fiCxHbRRpY2ZyrgW1eq22mvmOIzA==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", + "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2181,98 +2279,13 @@ "dev": true, "optional": true }, - "node_modules/@sentry-internal/tracing": { - "version": "7.57.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.57.0.tgz", - "integrity": "sha512-tpViyDd8AhQGYYhI94xi2aaDopXOPfL2Apwrtb3qirWkomIQ2K86W1mPmkce+B0cFOnW2Dxv/ZTFKz6ghjK75A==", - "dependencies": { - "@sentry/core": "7.57.0", - "@sentry/types": "7.57.0", - "@sentry/utils": "7.57.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/browser": { - "version": "7.57.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.57.0.tgz", - "integrity": "sha512-E0HaYYlaqHFiIRZXxcvOO8Odvlt+TR1vFFXzqUWXPOvDRxURglTOCQ3EN/u6bxtAGJ6y/Zc2obgihTtypuel/w==", - "dependencies": { - "@sentry-internal/tracing": "7.57.0", - "@sentry/core": "7.57.0", - "@sentry/replay": "7.57.0", - "@sentry/types": "7.57.0", - "@sentry/utils": "7.57.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/core": { - "version": "7.57.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.57.0.tgz", - "integrity": "sha512-l014NudPH0vQlzybtXajPxYFfs9w762NoarjObC3gu76D1jzBBFzhdRelkGpDbSLNTIsKhEDDRpgAjBWJ9icfw==", - "dependencies": { - "@sentry/types": "7.57.0", - "@sentry/utils": "7.57.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/react": { - "version": "7.57.0", - "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.57.0.tgz", - "integrity": "sha512-XGNTjIoCG3naSmCU8qObd+y+CqAB6NQkGWOp2yyBwp2inyKF2ehJvDh6bIQloBYq2TmOJDa4NfXdMrkilxaLFQ==", - "dependencies": { - "@sentry/browser": "7.57.0", - "@sentry/types": "7.57.0", - "@sentry/utils": "7.57.0", - "hoist-non-react-statics": "^3.3.2", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "react": "15.x || 16.x || 17.x || 18.x" - } - }, - "node_modules/@sentry/replay": { - "version": "7.57.0", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.57.0.tgz", - "integrity": "sha512-pN4ryNS3J5EYbkXvR+O/+hseAJha7XDl8mPFtK0OGTHG10JzCi4tQJazblHQdpb5QBaMMPCeZ+isyfoQLDNXnw==", - "dependencies": { - "@sentry/core": "7.57.0", - "@sentry/types": "7.57.0", - "@sentry/utils": "7.57.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@sentry/types": { - "version": "7.57.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.57.0.tgz", - "integrity": "sha512-D7ifoUfxuVCUyktIr5Gc+jXUbtcUMmfHdTtTbf1XCZHua5mJceK9wtl3YCg3eq/HK2Ppd52BKnTzEcS5ZKQM+w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/utils": { - "version": "7.57.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.57.0.tgz", - "integrity": "sha512-YXrkMCiNklqkXctn4mKYkrzNCf/dfVcRUQrkXjeBC+PHXbcpPyaJgInNvztR7Skl8lE3JPGPN4v5XhLxK1bUUg==", - "dependencies": { - "@sentry/types": "7.57.0", - "tslib": "^2.4.1 || ^1.9.3" - }, - "engines": { - "node": ">=8" + "node_modules/@nicolo-ribaudo/semver-v6": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz", + "integrity": "sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, "node_modules/@socket.io/component-emitter": { @@ -2417,9 +2430,9 @@ "peer": true }, "node_modules/@types/react": { - "version": "18.2.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.14.tgz", - "integrity": "sha512-A0zjq+QN/O0Kpe30hA1GidzyFjatVvrpIvWLxD+xv67Vt91TWWgco9IvrJBkeyHm1trGaFS/FSGqPlhyeZRm0g==", + "version": "18.2.11", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.11.tgz", + "integrity": "sha512-+hsJr9hmwyDecSMQAmX7drgbDpyE+EgSF6t7+5QEBAn1tQK7kl1vWZ4iRf6SjQ8lk7dyEULxUmZOIpN0W5baZA==", "peer": true, "dependencies": { "@types/prop-types": "*", @@ -3267,39 +3280,39 @@ } }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.4.tgz", + "integrity": "sha512-9WeK9snM1BfxB38goUEv2FLnA6ja07UMfazFHzCXUb3NyDZAwfXvQiURQ6guTTMeHcOsdknULm1PDhs4uWtKyA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.4.1", + "@nicolo-ribaudo/semver-v6": "^6.3.3" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.2.tgz", + "integrity": "sha512-Cid+Jv1BrY9ReW9lIfNlNpsI53N+FN7gE+f73zLAUbr9C52W4gKLWSByx47pfDJsEysojKArqOtOKZSVIIUTuQ==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" + "@babel/helper-define-polyfill-provider": "^0.4.1", + "core-js-compat": "^3.31.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.1.tgz", + "integrity": "sha512-L8OyySuI6OSQ5hFy9O+7zFjyr4WhAfRjLIOkhQGYl+emwJkd/S4XXT1JpfrgR1jrQ1NcGiOh+yAdGlF8pnC3Jw==", "dev": true, "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3" + "@babel/helper-define-polyfill-provider": "^0.4.1" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -3956,9 +3969,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", + "version": "4.21.9", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", + "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", "dev": true, "funding": [ { @@ -3968,13 +3981,17 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" @@ -4080,9 +4097,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001480", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001480.tgz", - "integrity": "sha512-q7cpoPPvZYgtyC4VaBSN0Bt+PJ4c4EYRf0DrduInOz2SkFpHD5p3LnvEpqBp7UnJn+8x1Ogl1s38saUxe+ihQQ==", + "version": "1.0.30001513", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001513.tgz", + "integrity": "sha512-pnjGJo7SOOjAGytZZ203Em95MRM8Cr6jhCXNF/FAXTpCTRTECnqQWLpiTRqrFtdYcth8hf4WECUpkezuYsMVww==", "dev": true, "funding": [ { @@ -4613,9 +4630,9 @@ } }, "node_modules/core-js": { - "version": "3.31.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.31.1.tgz", - "integrity": "sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ==", + "version": "3.30.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.30.1.tgz", + "integrity": "sha512-ZNS5nbiSwDTq4hFosEDqm65izl2CWmLz0hARJMyNQBgkUZMIF51cQiMvIQKA6hvuaeWxQDP3hEedM1JZIgTldQ==", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -4623,12 +4640,12 @@ } }, "node_modules/core-js-compat": { - "version": "3.30.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.30.1.tgz", - "integrity": "sha512-d690npR7MC6P0gq4npTl5n2VQeNAmUrJ90n+MHiKS7W2+xno4o3F5GDEuylSdi6EJ3VssibSGXOa1r3YXD3Mhw==", + "version": "3.31.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.1.tgz", + "integrity": "sha512-wIDWd2s5/5aJSdpOJHfSibxNODxoGoWOBHt8JSPB41NOE94M7kuTPZCYLOlTtuoXTsBPKobpJ6T+y0SSy5L9SA==", "dev": true, "dependencies": { - "browserslist": "^4.21.5" + "browserslist": "^4.21.9" }, "funding": { "type": "opencollective", @@ -5200,9 +5217,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.368", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.368.tgz", - "integrity": "sha512-e2aeCAixCj9M7nJxdB/wDjO6mbYX+lJJxSJCXDzlr5YPGYVofuJwGN9nKg2o6wWInjX6XmxRinn3AeJMK81ltw==", + "version": "1.4.453", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.453.tgz", + "integrity": "sha512-BU8UtQz6CB3T7RIGhId4BjmjJVXQDujb0+amGL8jpcluFJr6lwspBOvkUbnttfpZCm4zFMHmjrX1QrdPWBBMjQ==", "dev": true }, "node_modules/emoji-regex": { @@ -6781,14 +6798,6 @@ "node": ">=0.10.0" } }, - "node_modules/hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", - "dependencies": { - "react-is": "^16.7.0" - } - }, "node_modules/home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -9179,9 +9188,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", "dev": true }, "node_modules/nodemon": { @@ -11979,9 +11988,9 @@ } }, "node_modules/socket.io-parser": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.2.tgz", - "integrity": "sha512-DJtziuKypFkMMHCm2uIshOYC7QaylbtzQwiMYDuCKy3OPkjLzu4B2vAhTlqipRHHzrI0NJeBAizTK7X+6m1jVw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", + "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1" @@ -12894,11 +12903,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" - }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -14139,4 +14143,4 @@ } } } -} +} \ No newline at end of file diff --git a/sefaria/build.sh b/sefaria/build.sh new file mode 100644 index 0000000000..e042d018d0 --- /dev/null +++ b/sefaria/build.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# exit on error +set -o errexit + +python manage.py migrate \ No newline at end of file diff --git a/sefaria/helper/search.py b/sefaria/helper/search.py index 833c023b03..c65ba87330 100644 --- a/sefaria/helper/search.py +++ b/sefaria/helper/search.py @@ -150,5 +150,11 @@ def make_filter(type, agg_type, agg_key): def get_elasticsearch_client(): from elasticsearch import Elasticsearch - from sefaria.settings import SEARCH_URL + try: + from sefaria.settings import SEARCH_URL + except ImportError as e: + print(f"Failed to import SEARCH_URL: {e}") + # Set a default value for SEARCH_URL or handle it in another way + SEARCH_URL = "http://default-search-url.com" # Replace with a sensible default URL + return Elasticsearch(SEARCH_URL) diff --git a/sefaria/local_settings_ci.py b/sefaria/local_settings_ci.py index d542f0b58a..0d4fdbd811 100644 --- a/sefaria/local_settings_ci.py +++ b/sefaria/local_settings_ci.py @@ -41,13 +41,32 @@ SITE_PACKAGE = "sites.sefaria" -DEBUG = True -ALLOWED_HOSTS = ['localhost', '127.0.0.1', "0.0.0.0", '[::1]'] +DEBUG = os.getenv("DEBUG", True) + +REMOTE_HOSTS = os.getenv('REMOTE_HOSTS', 'staging.pecha.org').replace(" ", "") + +LOCAL_HOSTS = [ + 'localhost', + '127.0.0.1', + "0.0.0.0", + '[::1]' +] + +ALLOWED_HOSTS = REMOTE_HOSTS.split(',') + LOCAL_HOSTS + +# ALLOWED_HOSTS = [ +# 'indrajala.com', +# 'localhost', +# '127.0.0.1', +# "0.0.0.0", +# '[::1]' +# ] OFFLINE = False DOWN_FOR_MAINTENANCE = False MAINTENANCE_MESSAGE = "" GLOBAL_WARNING = False GLOBAL_WARNING_MESSAGE = "" +# GLOBAL_INTERRUPTING_MESSAGE = None SECRET_KEY = 'insert your long random secret key here !' @@ -69,7 +88,7 @@ APSCHEDULER_NAME = "apscheduler" # ElasticSearch server -SEARCH_URL = "http://localhost:9200" +SEARCH_ADMIN = "http://localhost:9200" SEARCH_INDEX_ON_SAVE = False # Whether to send texts and source sheet to Search Host for indexing after save SEARCH_INDEX_NAME_TEXT = 'text' # name of the ElasticSearch index to use SEARCH_INDEX_NAME_SHEET = 'sheet' @@ -193,9 +212,6 @@ } } -STRAPI_LOCATION = None -STRAPI_PORT = None - structlog.configure( processors=[ structlog.stdlib.filter_by_level, @@ -213,4 +229,4 @@ logger_factory=structlog.stdlib.LoggerFactory(), wrapper_class=structlog.stdlib.BoundLogger, cache_logger_on_first_use=True, -) +) \ No newline at end of file diff --git a/sefaria/settings.py b/sefaria/settings.py index 7eea25ff70..bee97b9c3f 100644 --- a/sefaria/settings.py +++ b/sefaria/settings.py @@ -298,6 +298,36 @@ } + +# GLOBAL_INTERRUPTING_MESSAGE = { +# "name": "2023-06-16-help-center", +# "style": "banner", # "modal" or "banner" +# "repetition": 1, +# "is_fundraising": False, +# "condition": { +# "returning_only": False, +# "english_only": False, +# "desktop_only": True, +# "debug": False, +# } +# } + + +GLOBAL_INTERRUPTING_MESSAGE = None + +REMOTE_HOSTS = os.getenv('REMOTE_HOSTS', 'staging.pecha.org').replace(" ", "") + +LOCAL_HOSTS = [ + 'localhost', + '127.0.0.1', + "0.0.0.0", + '[::1]' +] + +ALLOWED_HOSTS = REMOTE_HOSTS.split(',') + LOCAL_HOSTS + + + # Grab environment specific settings from a file which # is left out of the repo. try: @@ -308,7 +338,6 @@ except ImportError: from sefaria.local_settings_example import * - # Listed after local settings are imported so CACHE can depend on DEBUG WEBPACK_LOADER = { 'DEFAULT': { @@ -336,4 +365,4 @@ } DATA_UPLOAD_MAX_MEMORY_SIZE = 24000000 -BASE_DIR = os.path.dirname(os.path.dirname(__file__)) +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) \ No newline at end of file diff --git a/sefaria/system/database.py b/sefaria/system/database.py index 6d24183dc9..7f1529942d 100644 --- a/sefaria/system/database.py +++ b/sefaria/system/database.py @@ -3,58 +3,29 @@ The system attribute _called_from_test is set in the py.test conftest.py file """ import sys +from sefaria.settings import * import pymongo -import urllib.parse from pymongo.errors import OperationFailure -from sefaria.settings import * - -def check_db_exists(db_name): - dbnames = client.list_database_names() - return db_name in dbnames - - -def connect_to_db(db_name): - if not check_db_exists(db_name): - raise SystemError(f'Database {db_name} does not exist!') - return client[db_name] - -def get_test_db(): - return client[TEST_DB] - - if hasattr(sys, '_doc_build'): db = "" else: # TEST_DB = SEFARIA_DB + "_test" - TEST_DB = SEFARIA_DB - - #If we have jsut a single instance mongo (such as for development) the MONGO_HOST param should contain jsut the host string e.g "localhost") - if MONGO_REPLICASET_NAME is None: + TEST_DB = SEFARIA_DB + client = pymongo.MongoClient(MONGO_HOST, MONGO_PORT) + + if not hasattr(sys, '_called_from_test'): + db = client[SEFARIA_DB] if SEFARIA_DB_USER and SEFARIA_DB_PASSWORD: - client = pymongo.MongoClient(MONGO_HOST, MONGO_PORT, username=SEFARIA_DB_USER, password=SEFARIA_DB_PASSWORD) - else: - client = pymongo.MongoClient(MONGO_HOST, MONGO_PORT) - #Else if we are using a replica set mongo, we need to connect with a URI that containts a comma separated list of 'host:port' strings + db.authenticate(SEFARIA_DB_USER, SEFARIA_DB_PASSWORD) else: + db = client[TEST_DB] if SEFARIA_DB_USER and SEFARIA_DB_PASSWORD: - # and also escape user/pass - username = urllib.parse.quote_plus(SEFARIA_DB_USER) - password = urllib.parse.quote_plus(SEFARIA_DB_PASSWORD) - connection_uri = 'mongodb://{}:{}@{}/?ssl=false&readPreference=primaryPreferred&replicaSet={}'.format(username, password, MONGO_HOST, MONGO_REPLICASET_NAME) - else: - connection_uri = 'mongodb://{}/?ssl=false&readPreference=primaryPreferred&replicaSet={}'.format(MONGO_HOST, MONGO_REPLICASET_NAME) - # Now connect to the mongo server - client = pymongo.MongoClient(connection_uri) + db.authenticate(SEFARIA_DB_USER, SEFARIA_DB_PASSWORD) - - # Now set the db variable to point to the Sefaria database in the server - if not hasattr(sys, '_called_from_test'): - db = connect_to_db(SEFARIA_DB) - else: - db = connect_to_db(TEST_DB) - +def get_test_db(): + return client[TEST_DB] def drop_test(): @@ -75,106 +46,124 @@ def drop_test(): def ensure_indices(active_db=None): active_db = active_db or db indices = [ - ('following', ["follower"],{}), - ('following', ["followee"],{}), + ('following', ["follower"], {}), + ('following', ["followee"], {}), ('groups', ["name"], {}), ('groups', ["sheets"], {}), ('groups', ["slug"], {'unique': True}), ('groups', ["privateSlug"], {'unique': True}), ('groups', ["members"], {}), ('groups', ["admins"], {}), - ('history', ["revision"],{}), - ('history', ["method"],{}), - ('history', [[("ref", pymongo.ASCENDING), ("version", pymongo.ASCENDING), ("language", pymongo.ASCENDING)]],{}), - ('history', ["date"],{}), - ('history', ["ref"],{}), - ('history', ["user"],{}), - ('history', ["rev_type"],{}), - ('history', ["version"],{}), - ('history', ["new.refs"],{}), - ('history', ["new.ref"],{}), - ('history', ["old.refs"],{}), - ('history', ["old.ref"],{}), - ('history', ["title"],{}), - ('index', ["title"],{}), - ('index_queue', [[("lang", pymongo.ASCENDING), ("version", pymongo.ASCENDING), ("ref", pymongo.ASCENDING)]],{'unique': True}), + ('history', ["revision"], {}), + ('history', ["method"], {}), + ('history', [[("ref", pymongo.ASCENDING), ("version", + pymongo.ASCENDING), ("language", pymongo.ASCENDING)]], {}), + ('history', ["date"], {}), + ('history', ["ref"], {}), + ('history', ["user"], {}), + ('history', ["rev_type"], {}), + ('history', ["version"], {}), + ('history', ["new.refs"], {}), + ('history', ["new.ref"], {}), + ('history', ["old.refs"], {}), + ('history', ["old.ref"], {}), + ('history', ["title"], {}), + ('index', ["title"], {}), + ('index_queue', [[("lang", pymongo.ASCENDING), ("version", + pymongo.ASCENDING), ("ref", pymongo.ASCENDING)]], {'unique': True}), ('index', ["categories.0"], {}), ('index', ["order.0"], {}), ('index', ["order.1"], {}), # ('links', [[("refs.0", 1), ("refs.1", 1)]], {"unique": True}), - ('links', [[("refs", pymongo.ASCENDING), ("generated_by", pymongo.ASCENDING)]],{}), - ('links', ["refs.0"],{}), - ('links', ["refs.1"],{}), - ('links', ["expandedRefs0"],{}), - ('links', ["expandedRefs1"],{}), - ('links', ["source_text_oid"],{}), - ('links', ["is_first_comment"],{}), - ('links', ["inline_citation"],{}), + ('links', [[("refs", pymongo.ASCENDING), + ("generated_by", pymongo.ASCENDING)]], {}), + ('links', ["refs.0"], {}), + ('links', ["refs.1"], {}), + ('links', ["expandedRefs0"], {}), + ('links', ["expandedRefs1"], {}), + ('links', ["source_text_oid"], {}), + ('links', ["is_first_comment"], {}), + ('links', ["inline_citation"], {}), ('metrics', ["timestamp"], {'unique': True}), ('media', ["ref.sefaria_ref"], {}), - ('notes', [[("owner", pymongo.ASCENDING), ("ref", pymongo.ASCENDING), ("public", pymongo.ASCENDING)]],{}), - ('notifications', [[("uid", pymongo.ASCENDING), ("read", pymongo.ASCENDING)]],{}), - ('notifications', ["uid"],{}), + ('notes', [[("owner", pymongo.ASCENDING), ("ref", + pymongo.ASCENDING), ("public", pymongo.ASCENDING)]], {}), + ('notifications', [ + [("uid", pymongo.ASCENDING), ("read", pymongo.ASCENDING)]], {}), + ('notifications', ["uid"], {}), ('notifications', ["content.sheet_id"], {}), - ('parshiot', ["date"],{}), - ('place', [[("point", pymongo.GEOSPHERE)]],{}), - ('place', [[("area", pymongo.GEOSPHERE)]],{}), - ('person', ["key"],{}), - ('profiles', ["slug"],{}), - ('profiles', ["id"],{}), - ('sheets', ["id"],{}), - ('sheets', ["dateModified"],{}), - ('sheets', ["sources.ref"],{}), - ('sheets', ["includedRefs"],{}), + ('parshiot', ["date"], {}), + ('place', [[("point", pymongo.GEOSPHERE)]], {}), + ('place', [[("area", pymongo.GEOSPHERE)]], {}), + ('person', ["key"], {}), + ('profiles', ["slug"], {}), + ('profiles', ["id"], {}), + ('sheets', ["id"], {}), + ('sheets', ["dateModified"], {}), + ('sheets', ["sources.ref"], {}), + ('sheets', ["includedRefs"], {}), ('sheets', ["expandedRefs"], {}), - ('sheets', ["tags"],{}), - ('sheets', ["owner"],{}), - ('sheets', ["assignment_id"],{}), - ('sheets', ["is_featured"],{}), + ('sheets', ["tags"], {}), + ('sheets', ["owner"], {}), + ('sheets', ["assignment_id"], {}), + ('sheets', ["is_featured"], {}), ('sheets', ["displayedCollection"], {}), ('sheets', ["sheetLanguage"], {}), - ('sheets', [[("views", pymongo.DESCENDING)]],{}), + ('sheets', [[("views", pymongo.DESCENDING)]], {}), ('sheets', ["categories"], {}), - ('links', [[("owner", pymongo.ASCENDING), ("date_modified", pymongo.DESCENDING)]], {}), - ('texts', ["title"],{}), - ('texts', [[("priority", pymongo.DESCENDING), ("_id", pymongo.ASCENDING)]],{}), - ('texts', [[("versionTitle", pymongo.ASCENDING), ("langauge", pymongo.ASCENDING)]],{}), + ('links', [[("owner", pymongo.ASCENDING), + ("date_modified", pymongo.DESCENDING)]], {}), + ('texts', ["title"], {}), + ('texts', [[("priority", pymongo.DESCENDING), + ("_id", pymongo.ASCENDING)]], {}), + ('texts', [[("versionTitle", pymongo.ASCENDING), + ("langauge", pymongo.ASCENDING)]], {}), ('texts', ["actualLanguage"], {}), ('topics', ["titles.text"], {}), ('topic_links', ["class"], {}), ('topic_links', ["expandedRefs"], {}), ('topic_links', ["toTopic"], {}), ('topic_links', ["fromTopic"], {}), - ('word_form', ["form"],{}), - ('word_form', ["c_form"],{}), + ('word_form', ["form"], {}), + ('word_form', ["c_form"], {}), ('word_form', ["refs"], {}), ('term', ["titles.text"], {'unique': True}), - ('term', ["category"],{}), - ('lexicon_entry', [[("headword", pymongo.ASCENDING), ("parent_lexicon", pymongo.ASCENDING)]],{}), - ('user_story', ["uid"],{}), - ('user_story', [[("uid", pymongo.ASCENDING), ("timestamp", pymongo.DESCENDING)]],{}), - ('user_story', [[("timestamp", pymongo.DESCENDING)]],{}), - ('passage', ["ref_list"],{}), - ('user_history', ["uid"],{}), - ('user_history', ["sheet_id"],{}), - ('user_history', ["datetime"],{}), + ('term', ["category"], {}), + ('lexicon_entry', [[("headword", pymongo.ASCENDING), + ("parent_lexicon", pymongo.ASCENDING)]], {}), + ('user_story', ["uid"], {}), + ('user_story', [[("uid", pymongo.ASCENDING), + ("timestamp", pymongo.DESCENDING)]], {}), + ('user_story', [[("timestamp", pymongo.DESCENDING)]], {}), + ('passage', ["ref_list"], {}), + ('user_history', ["uid"], {}), + ('user_history', ["sheet_id"], {}), + ('user_history', ["datetime"], {}), ('user_history', ["ref"], {}), ('user_history', [[("time_stamp", pymongo.DESCENDING)]], {}), - ('user_history', [[("uid", pymongo.ASCENDING), ("server_time_stamp", pymongo.ASCENDING)]], {}), - ('user_history', [[("uid", pymongo.ASCENDING), ("saved", pymongo.ASCENDING)]], {}), - ('user_history', [[("uid", pymongo.ASCENDING), ("ref", pymongo.ASCENDING)]], {}), - ('user_history', [[("uid", pymongo.ASCENDING), ("book", pymongo.ASCENDING), ("last_place", pymongo.ASCENDING)]], {}), - ('user_history', [[("uid", pymongo.ASCENDING), ("secondary", pymongo.ASCENDING), ("last_place", pymongo.ASCENDING), ("time_stamp", pymongo.ASCENDING)]], {}), - ('user_history', [[("uid", pymongo.ASCENDING), ("secondary", pymongo.ASCENDING), ("time_stamp", pymongo.ASCENDING)]], {}), - ('trend', ["name"],{}), - ('trend', ["uid"],{}), - ('webpages', ["refs"],{}), - ('webpages', ["expandedRefs"],{}), + ('user_history', [[("uid", pymongo.ASCENDING), + ("server_time_stamp", pymongo.ASCENDING)]], {}), + ('user_history', [ + [("uid", pymongo.ASCENDING), ("saved", pymongo.ASCENDING)]], {}), + ('user_history', [ + [("uid", pymongo.ASCENDING), ("ref", pymongo.ASCENDING)]], {}), + ('user_history', [[("uid", pymongo.ASCENDING), ("book", + pymongo.ASCENDING), ("last_place", pymongo.ASCENDING)]], {}), + ('user_history', [[("uid", pymongo.ASCENDING), ("secondary", pymongo.ASCENDING), + ("last_place", pymongo.ASCENDING), ("time_stamp", pymongo.ASCENDING)]], {}), + ('user_history', [[("uid", pymongo.ASCENDING), ("secondary", + pymongo.ASCENDING), ("time_stamp", pymongo.ASCENDING)]], {}), + ('trend', ["name"], {}), + ('trend', ["uid"], {}), + ('webpages', ["refs"], {}), + ('webpages', ["expandedRefs"], {}), ('manuscript_pages', ['expanded_refs'], {}), - ('manuscript_pages', [[("manuscript_slug", pymongo.ASCENDING), ("page_id", pymongo.ASCENDING)]], {'unique': True}), + ('manuscript_pages', [[("manuscript_slug", pymongo.ASCENDING), + ("page_id", pymongo.ASCENDING)]], {'unique': True}), ('manuscripts', ['slug'], {}), ('manuscripts', ['title'], {}), - ('messages', [[("room_id", pymongo.ASCENDING), ("timestamp", pymongo.DESCENDING)]], {}), + ('messages', [[("room_id", pymongo.ASCENDING), + ("timestamp", pymongo.DESCENDING)]], {}), ('vstate', ["title"], {}), ('vstate', ["flags.enComplete"], {}), ] @@ -183,4 +172,4 @@ def ensure_indices(active_db=None): try: getattr(active_db, col).create_index(*args, **kwargs) except OperationFailure as e: - print("Collection: {}, args: {}, kwargs: {}\n{}".format(col, args, kwargs, e)) + print("Collection: {}, args: {}, kwargs: {}\n{}".format(col, args, kwargs, e)) \ No newline at end of file diff --git a/sefaria/system/decorators.py b/sefaria/system/decorators.py index 94db751aea..9bd6c6cc31 100644 --- a/sefaria/system/decorators.py +++ b/sefaria/system/decorators.py @@ -14,7 +14,14 @@ import structlog logger = structlog.get_logger(__name__) -from sefaria.settings import FAIL_GRACEFULLY +try: + from sefaria.settings import FAIL_GRACEFULLY +except ImportError as e: + # Handle the exception + print(f"Failed to import FAIL_GRACEFULLY: {e}") + # Set a default value for FAIL_GRACEFULLY or handle it in another way + FAIL_GRACEFULLY = True # or True, depending on what makes sense for your application + # TODO: we really need to fix the way we are using json responses. Django 1.7 introduced a baked in JsonResponse. diff --git a/static/js/Misc.jsx b/static/js/Misc.jsx index d5fab55bbc..8554cab588 100644 --- a/static/js/Misc.jsx +++ b/static/js/Misc.jsx @@ -1,28 +1,28 @@ //const React = require('react'); -import React, {useContext, useEffect, useRef, useState} from 'react'; +import React, { useState, useEffect, useContext, useRef } from 'react'; import ReactDOM from 'react-dom'; import $ from './sefaria/sefariaJquery'; -import {CollectionsModal} from "./CollectionsWidget"; +import { CollectionsModal } from "./CollectionsWidget"; import Sefaria from './sefaria/sefaria'; import classNames from 'classnames'; import PropTypes from 'prop-types'; import Component from 'react-class'; import { usePaginatedDisplay } from './Hooks'; -import {ContentLanguageContext, AdContext, StrapiDataContext} from './context'; +import { ContentLanguageContext, AdContext } from './context'; import ReactCrop from 'react-image-crop'; import 'react-image-crop/dist/ReactCrop.css'; -import {ContentText} from "./ContentText"; +import { Editor } from "slate"; import ReactTags from "react-tag-autocomplete"; -import {AdminEditorButton, useEditToggle} from "./AdminEditor"; -import {CategoryEditor, ReorderEditor} from "./CategoryEditor"; -import {refSort} from "./TopicPage"; -import {TopicEditor} from "./TopicEditor"; -import {generateContentForModal, SignUpModalKind} from './sefaria/signupModalContent'; -import {SourceEditor} from "./SourceEditor"; +import { AdminEditorButton, useEditToggle } from "./AdminEditor"; +import { CategoryEditor, ReorderEditor } from "./CategoryEditor"; +import { refSort } from "./TopicPage"; +import { TopicEditor } from "./TopicEditor"; +import { SignUpModalKind, generateContentForModal } from './sefaria/signupModalContent'; +import { SourceEditor } from "./SourceEditor"; import Cookies from "js-cookie"; import {EditTextInfo} from "./BookPage"; import ReactMarkdown from 'react-markdown'; -import TrackG4 from "./sefaria/trackG4"; + /** * Component meant to simply denote a language specific string to go inside an InterfaceText element * ``` @@ -35,32 +35,32 @@ import TrackG4 from "./sefaria/trackG4"; * @returns {JSX.Element} * @constructor */ -const HebrewText = ({children}) => ( - <>{children} +const HebrewText = ({ children }) => ( + <>{children} ); -const EnglishText = ({children}) => ( - <>{children} +const EnglishText = ({ children }) => ( + <>{children} ); const AvailableLanguages = () => { - return {"english" : EnglishText, "hebrew": HebrewText}; + return { "english": EnglishText, "hebrew": HebrewText }; }; const AvailableLanguagesValidator = (children, key, componentName, location, propFullName) => { - if (!(children[key].type && (Object.values(AvailableLanguages()).indexOf(children[key].type) != -1) )) { - return new Error( - 'Invalid prop `' + propFullName + '` supplied to' + - ' `' + componentName + '`. Validation failed.' - ); - } + if (!(children[key].type && (Object.values(AvailableLanguages()).indexOf(children[key].type) != -1))) { + return new Error( + 'Invalid prop `' + propFullName + '` supplied to' + + ' `' + componentName + '`. Validation failed.' + ); + } }; const __filterChildrenByLanguage = (children, language) => { let chlArr = React.Children.toArray(children); let currLangComponent = AvailableLanguages()[language]; - let newChildren = chlArr.filter(x=> x.type == currLangComponent); + let newChildren = chlArr.filter(x => x.type == currLangComponent); return newChildren; }; -const InterfaceText = ({text, html, markdown, children, context, disallowedMarkdownElements=[]}) => { +const InterfaceText = ({ text, html, markdown, children, context }) => { /** * Renders a single span for interface string with either class `int-en`` or `int-he` depending on Sefaria.interfaceLang. * If passed explicit text or html objects as props with "en" and/or "he", will only use those to determine correct text or fallback text to display. @@ -69,20 +69,21 @@ const InterfaceText = ({text, html, markdown, children, context, disallowedMarkd * `children` can also take the form of components above, so they can be used for longer paragrpahs or paragraphs containing html, if needed. * `context` is passed to Sefaria._ for additional translation context */ - const contentVariable = html || markdown || text; // assumption is `markdown` or `html` are preferred over `text` if they are present + const contentVariable = html ? + html : markdown ? markdown : text; // assumption is `markdown` or `html` are preferred over `text` if they are present const isHebrew = Sefaria.interfaceLang === "hebrew"; - let elemclasses = classNames({"int-en": !isHebrew, "int-he": isHebrew}); + let elemclasses = classNames({ "int-en": !isHebrew, "int-he": isHebrew }); let textResponse = null; if (contentVariable) {// Prioritize explicit props passed in for text of the element, does not attempt to use Sefaria._() for this case. - let {he, en} = contentVariable; + let { he, en } = contentVariable; textResponse = isHebrew ? (he || en) : (en || he); - let fallbackCls = (isHebrew && !he) ? " enInHe" : ((!isHebrew && !en) ? " heInEn" : "" ); + let fallbackCls = (isHebrew && !he) ? " enInHe" : ((!isHebrew && !en) ? " heInEn" : ""); elemclasses += fallbackCls; } else { // Also handle composition with children const chlCount = React.Children.count(children); if (chlCount === 1) { // Same as passing in a `en` key but with children syntax textResponse = Sefaria._(children, context); - } else if (chlCount <= Object.keys(AvailableLanguages()).length){ // When multiple languages are passed in via children + } else if (chlCount <= Object.keys(AvailableLanguages()).length) { // When multiple languages are passed in via children let newChildren = __filterChildrenByLanguage(children, Sefaria.interfaceLang); textResponse = newChildren[0]; //assumes one language element per InterfaceText, may be too naive } else { @@ -91,16 +92,16 @@ const InterfaceText = ({text, html, markdown, children, context, disallowedMarkd } return ( html ? - - : markdown ? {textResponse} - : {textResponse} + + : markdown ? {textResponse} + : {textResponse} ); }; InterfaceText.propTypes = { //Makes sure that children passed in are either a single string, or an array consisting only of , children: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.arrayOf(AvailableLanguagesValidator), + PropTypes.string, + PropTypes.arrayOf(AvailableLanguagesValidator), ]), content: PropTypes.object, html: PropTypes.object, @@ -108,21 +109,58 @@ InterfaceText.propTypes = { className: PropTypes.string }; +const ContentText = ({ text, html, overrideLanguage, defaultToInterfaceOnBilingual = false, bilingualOrder = null }) => { + /** + * Renders content language throughout the site (content that comes from the database and is not interface language) + * Gets the active content language from Context and renders only the appropriate child(ren) for given language + * text {{text: object}} a dictionary {en: "some text", he: "some translated text"} to use for each language + * html {{html: object}} a dictionary {en: "some html", he: "some translated html"} to use for each language in the case where it needs to be dangerously set html + * overrideLanguage a string with the language name (full not 2 letter) to force to render to overriding what the content language context says. Can be useful if calling object determines one langugae is missing in a dynamic way + * defaultToInterfaceOnBilingual use if you want components not to render all languages in bilingual mode, and default them to what the interface language is + * bilingualOrder is an array of short language notations (e.g. ["he", "en"]) meant to tell the component what + * order to render the bilingual langauage elements in (as opposed to the unguaranteed order by default). + */ + const [contentVariable, isDangerouslySetInnerHTML] = html ? [html, true] : [text, false]; + const contentLanguage = useContext(ContentLanguageContext); + const languageToFilter = (defaultToInterfaceOnBilingual && contentLanguage.language === "bilingual") ? Sefaria.interfaceLang : (overrideLanguage ? overrideLanguage : contentLanguage.language); + const langShort = languageToFilter.slice(0, 2); + let renderedItems = Object.entries(contentVariable); + if (languageToFilter === "bilingual") { + if (bilingualOrder !== null) { + //nifty function that sorts one array according to the order of a second array. + renderedItems.sort(function (a, b) { + return bilingualOrder.indexOf(a[0]) - bilingualOrder.indexOf(b[0]); + }); + } + } else { + renderedItems = renderedItems.filter(([lang, _]) => { + return lang === langShort; + }); + } + return renderedItems.map(x => + isDangerouslySetInnerHTML ? + + : + {x[1]} + ); +}; + + const LoadingRing = () => (
); -const DonateLink = ({children, classes, source, link}) => { +const DonateLink = ({ children, classes, source, link }) => { link = link || "default"; source = source || "undefined"; const linkOptions = { default: { - en: "https://donate.sefaria.org/give/451346/#!/donation/checkout", - he: "https://donate.sefaria.org/give/468442/#!/donation/checkout" + en: "https://donate.sefaria.org/en", + he: "https://donate.sefaria.org/he" }, sustainer: { - en: "https://donate.sefaria.org/give/457760/#!/donation/checkout", - he: "https://donate.sefaria.org/give/478929/#!/donation/checkout" + en: "https://donate.sefaria.org/sustainers", + he: "https://donate.sefaria.org/sustainershe" }, dayOfLearning: { en: "https://donate.sefaria.org/sponsor", @@ -146,14 +184,14 @@ class ProfilePic extends Component { showDefault: !this.props.url || this.props.url.startsWith("https://www.gravatar"), // We can't know in advance if a gravatar image exists of not, so start with the default beforing trying to load image src: null, isFirstCropChange: true, - crop: {unit: "px", width: 250, aspect: 1}, + crop: { unit: "px", width: 250, aspect: 1 }, croppedImageBlob: null, error: null, }; this.imgFile = React.createRef(); } - setShowDefault() { /* console.log("error"); */ this.setState({showDefault: true}); } - setShowImage() { /* console.log("load"); */ this.setState({showDefault: false}); } + setShowDefault() { /* console.log("error"); */ this.setState({ showDefault: true }); } + setShowImage() { /* console.log("load"); */ this.setState({ showDefault: false }); } componentDidMount() { if (this.didImageLoad()) { this.setShowImage(); @@ -161,7 +199,7 @@ class ProfilePic extends Component { this.setShowDefault(); } } - didImageLoad(){ + didImageLoad() { // When using React Hydrate, the onLoad event of the profile image will return before // react code runs, so we check after mount as well to look replace bad images, or to // swap in a gravatar image that we now know is valid. @@ -171,7 +209,7 @@ class ProfilePic extends Component { onSelectFile(e) { if (e.target.files && e.target.files.length > 0) { if (!e.target.files[0].type.startsWith('image/')) { - this.setState({ error: "Error: Please upload an image with the correct file extension (e.g. jpg, png)"}); + this.setState({ error: "Error: Please upload an image with the correct file extension (e.g. jpg, png)" }); return; } const reader = new FileReader(); @@ -192,11 +230,11 @@ class ProfilePic extends Component { // You could also use percentCrop: // this.setState({ crop: percentCrop }); if (this.state.isFirstCropChange) { - const { clientWidth:width, clientHeight:height } = this.imageRef; + const { clientWidth: width, clientHeight: height } = this.imageRef; crop.width = Math.min(width, height); crop.height = crop.width; - crop.x = (this.imageRef.width/2) - (crop.width/2); - crop.y = (this.imageRef.height/2) - (crop.width/2); + crop.x = (this.imageRef.width / 2) - (crop.width / 2); + crop.y = (this.imageRef.height / 2) - (crop.width / 2); this.setState({ crop, isFirstCropChange: false }); } else { this.setState({ crop }); @@ -246,7 +284,7 @@ class ProfilePic extends Component { closePopup({ cb }) { this.setState({ src: null, - crop: {unit: "px", width: 250, aspect: 1}, + crop: { unit: "px", width: 250, aspect: 1 }, isFirstCropChange: true, croppedImageBlob: null, error: null, @@ -262,10 +300,12 @@ class ProfilePic extends Component { if (response.error) { throw new Error(response.error); } else { - this.closePopup({ cb: () => { - window.location = "/profile/" + Sefaria.slug; // reload to get update - return; - }}); + this.closePopup({ + cb: () => { + window.location = "/profile/" + Sefaria.slug; // reload to get update + return; + } + }); } } catch (e) { errored = true; @@ -277,20 +317,20 @@ class ProfilePic extends Component { const { name, url, len, hideOnDefault, showButtons, outerStyle } = this.props; const { showDefault, src, crop, error, uploading, isFirstCropChange } = this.state; const nameArray = !!name.trim() ? name.trim().split(/\s/) : []; - const initials = nameArray.length > 0 ? (nameArray.length === 1 ? nameArray[0][0] : nameArray[0][0] + nameArray[nameArray.length-1][0]) : ""; + const initials = nameArray.length > 0 ? (nameArray.length === 1 ? nameArray[0][0] : nameArray[0][0] + nameArray[nameArray.length - 1][0]) : ""; const defaultViz = showDefault ? 'flex' : 'none'; const profileViz = showDefault ? 'none' : 'block'; const imageSrc = url.replace("profile-default.png", 'profile-default-404.png'); // replace default with non-existant image to force onLoad to fail return (
-
- { showButtons ? null : `${initials}` } +
+ {showButtons ? null : `${initials}`}
User Profile Picture {this.props.children ? this.props.children : null /*required for slate.js*/} - { showButtons ? /* cant style file input directly. see: https://stackoverflow.com/questions/572768/styling-an-input-type-file-button */ - (
- { event.target.value = null}}/> - -
) : null - } - { (src || !!error) && ( -
-
-
-
- { src ? - () : (
{ error }
) - } + {showButtons ? /* cant style file input directly. see: https://stackoverflow.com/questions/572768/styling-an-input-type-file-button */ + (
+ { event.target.value = null }} /> + +
) : null + } + {(src || !!error) && ( +
+
+
+
+ {src ? + () : (
{error}
) + }
- { (uploading || isFirstCropChange) ? (
) : ( + {(uploading || isFirstCropChange) ? (
) : (
Drag corners to crop image @@ -341,66 +381,40 @@ class ProfilePic extends Component {
- ) + ) }
- ) + ) }
); } } ProfilePic.propTypes = { - url: PropTypes.string, - name: PropTypes.string, - len: PropTypes.number, + url: PropTypes.string, + name: PropTypes.string, + len: PropTypes.number, hideOnDefault: PropTypes.bool, // hide profile pic if you have are displaying default pic - showButtons: PropTypes.bool, // show profile pic action buttons + showButtons: PropTypes.bool, // show profile pic action buttons }; -/** - * Renders a list of data that can be filtered and sorted - * @param filterFunc - * @param sortFunc - * @param renderItem - * @param sortOptions - * @param getData - * @param data - * @param renderEmptyList - * @param renderHeader - * @param renderFooter - * @param showFilterHeader - * @param refreshData - * @param initialFilter - * @param scrollableElement - * @param pageSize - * @param onDisplayedDataChange - * @param initialRenderSize - * @param bottomMargin - * @param containerClass - * @param onSetSort: optional. function that is passed the current sort option when the user changes it. Use this to control sort from outside the component. See `externalSortOption`. - * @param externalSortOption: optional. string that is one of the options in `sortOptions`. Use this to control sort from outside the component. See `onSetSort`. - * @returns {JSX.Element} - * @constructor - */ const FilterableList = ({ filterFunc, sortFunc, renderItem, sortOptions, getData, data, renderEmptyList, renderHeader, renderFooter, showFilterHeader, refreshData, initialFilter, scrollableElement, pageSize, onDisplayedDataChange, initialRenderSize, - bottomMargin, containerClass, onSetSort, externalSortOption, + bottomMargin, containerClass }) => { const [filter, setFilter] = useState(initialFilter || ''); - const [internalSortOption, setSortOption] = useState(sortOptions[0]); + const [sortOption, setSortOption] = useState(sortOptions[0]); const [displaySort, setDisplaySort] = useState(false); - const sortOption = externalSortOption || internalSortOption; // Apply filter and sort to the raw data const processData = rawData => rawData ? rawData - .filter(item => !filter ? true : filterFunc(filter, item)) - .sort((a, b) => sortFunc(sortOption, a, b)) - : []; + .filter(item => !filter ? true : filterFunc(filter, item)) + .sort((a, b) => sortFunc(sortOption, a, b)) + : []; const cachedData = data || null; const [loading, setLoading] = useState(!cachedData); @@ -446,11 +460,10 @@ const FilterableList = ({ }, [dataUpToPage]); } - const setSort = newSortOption => { + const onSortChange = newSortOption => { if (newSortOption === sortOption) { return; } setSortOption(newSortOption); setDisplaySort(false); - onSetSort?.(newSortOption); }; const oldDesign = typeof showFilterHeader == 'undefined'; @@ -468,26 +481,26 @@ const FilterableList = ({ />
- { sortOptions.length > 1 ? - setDisplaySort(false)} isOpen={displaySort}> + {sortOptions.length > 1 ? + setDisplaySort(false)} isOpen={displaySort}> setDisplaySort(prev => !prev)} + toggle={() => setDisplaySort(prev => !prev)} enText={"Sort"} heText={"מיון"} /> ({type: option, name: option, heName: Sefaria._(option, "FilterableList")}))} + options={sortOptions.map(option => ({ type: option, name: option, heName: Sefaria._(option, "FilterableList") }))} currOptionSelected={sortOption} - handleClick={setSort} + handleClick={onSortChange} /> : null }
-
: null } - { !oldDesign && showFilterHeader ? ( +
: null} + {!oldDesign && showFilterHeader ? (
@@ -503,11 +516,11 @@ const FilterableList = ({ Sort by - { sortOptions.map(option =>( + {sortOptions.map(option => ( setSort(option)} + className={classNames({ 'sans-serif': 1, 'sort-option': 1, noselect: 1, active: sortOption === option })} + onClick={() => onSortChange(option)} > {option} @@ -517,29 +530,29 @@ const FilterableList = ({ ) : null} { loading ? : -
- {dataUpToPage.length ? - <> - { !!renderHeader ? renderHeader({filter}) : null } - { dataUpToPage.map(renderItem) } - - : <>{!!renderEmptyList ? renderEmptyList({filter}) : null}} - { !!renderFooter ? renderFooter({filter}) : null } -
+
+ {dataUpToPage.length ? + <> + {!!renderHeader ? renderHeader({ filter }) : null} + {dataUpToPage.map(renderItem)} + + : <>{!!renderEmptyList ? renderEmptyList({ filter }) : null}} + {!!renderFooter ? renderFooter({ filter }) : null} +
}
); }; FilterableList.propTypes = { - filterFunc: PropTypes.func.isRequired, - sortFunc: PropTypes.func.isRequired, - renderItem: PropTypes.func.isRequired, - sortOptions: PropTypes.array.isRequired, - getData: PropTypes.func, // At least one of `getData` or `data` is required - data: PropTypes.array, - renderEmptyList: PropTypes.func, - renderHeader: PropTypes.func, - renderFooter: PropTypes.func, + filterFunc: PropTypes.func.isRequired, + sortFunc: PropTypes.func.isRequired, + renderItem: PropTypes.func.isRequired, + sortOptions: PropTypes.array.isRequired, + getData: PropTypes.func, // At least one of `getData` or `data` is required + data: PropTypes.array, + renderEmptyList: PropTypes.func, + renderHeader: PropTypes.func, + renderFooter: PropTypes.func, showFilterHeader: PropTypes.bool, }; @@ -558,7 +571,7 @@ class TabView extends Component { } } openTab(index) { - this.setState({currTabIndex: index}); + this.setState({ currTabIndex: index }); } getTabIndex() { let tabIndex; @@ -569,7 +582,7 @@ class TabView extends Component { } else { tabIndex = this.props.tabs.findIndex(tab => tab.id === this.props.currTabName ? true : false) } - if(tabIndex === -1) { + if (tabIndex === -1) { tabIndex = 0; } return tabIndex; @@ -594,29 +607,29 @@ class TabView extends Component { renderTab(tab, index) { const currTabIndex = this.getTabIndex(); return ( -
{this.onClickTab(e, tab.clickTabOverride)}}> +
{ this.onClickTab(e, tab.clickTabOverride) }}> {this.props.renderTab(tab, index)}
); } render() { const currTabIndex = this.getTabIndex(); - const classes = classNames({"tab-view": 1, [this.props.containerClasses]: 1}); + const classes = classNames({ "tab-view": 1, [this.props.containerClasses]: 1 }); return (
{this.props.tabs.map(this.renderTab)}
- { React.Children.toArray(this.props.children)[currTabIndex] } + {React.Children.toArray(this.props.children)[currTabIndex]}
); } } TabView.propTypes = { - tabs: PropTypes.array.isRequired, // array of objects of any form. only requirement is each tab has a unique 'id' field. These objects will be passed to renderTab. - renderTab: PropTypes.func.isRequired, - currTabName: PropTypes.string, // optional. If passed, TabView will be controlled from outside - setTab: PropTypes.func, // optional. If passed, TabView will be controlled from outside + tabs: PropTypes.array.isRequired, // array of objects of any form. only requirement is each tab has a unique 'id' field. These objects will be passed to renderTab. + renderTab: PropTypes.func.isRequired, + currTabName: PropTypes.string, // optional. If passed, TabView will be controlled from outside + setTab: PropTypes.func, // optional. If passed, TabView will be controlled from outside onClickArray: PropTypes.object, // optional. If passed, TabView will be controlled from outside }; @@ -624,16 +637,16 @@ TabView.propTypes = { class DropdownOptionList extends Component { render() { return ( -
+
{ - this.props.options.map( (option, iSortTypeObj) => { - const tempClasses = classNames({'filter-title': 1, unselected: this.props.currOptionSelected !== option.type}); + this.props.options.map((option, iSortTypeObj) => { + const tempClasses = classNames({ 'filter-title': 1, unselected: this.props.currOptionSelected !== option.type }); return ( - { this.props.handleClick(option.type); }} tabIndex={`${iSortTypeObj}`} onKeyPress={e => {e.charCode == 13 ? this.props.handleClick(option.type) : null}} aria-label={`Sort by ${option.name}`}> + { this.props.handleClick(option.type); }} tabIndex={`${iSortTypeObj}`} onKeyPress={e => { e.charCode == 13 ? this.props.handleClick(option.type) : null }} aria-label={`Sort by ${option.name}`}>
- {`${option.name} + {`${option.name} {option.name} @@ -659,20 +672,20 @@ DropdownOptionList.propTypes = { }; -const DropdownButton = ({isOpen, toggle, enText, heText, buttonStyle}) => { +const DropdownButton = ({ isOpen, toggle, enText, heText, buttonStyle }) => { const filterTextClasses = classNames({ "dropdown-button": 1, active: isOpen, buttonStyle }); return ( -
{e.charCode == 13 ? toggle(e):null}}> - - {isOpen ? : } +
{ e.charCode == 13 ? toggle(e) : null }}> + + {isOpen ? : }
); }; DropdownButton.propTypes = { - isOpen: PropTypes.bool.isRequired, - toggle: PropTypes.func.isRequired, - enText: PropTypes.string.isRequired, - heText: PropTypes.string.isRequired, + isOpen: PropTypes.bool.isRequired, + toggle: PropTypes.func.isRequired, + enText: PropTypes.string.isRequired, + heText: PropTypes.string.isRequired, buttonStyle: PropTypes.bool, }; @@ -692,15 +705,15 @@ class DropdownModal extends Component { } render() { return ( -
- { this.props.children } +
+ {this.props.children}
); } } DropdownModal.propTypes = { - close: PropTypes.func.isRequired, - isOpen: PropTypes.bool.isRequired, + close: PropTypes.func.isRequired, + isOpen: PropTypes.bool.isRequired, positionUnset: PropTypes.bool, // for search filters }; @@ -712,16 +725,16 @@ class Link extends Component { } render() { return {this.props.children} + className={this.props.className} + href={this.props.href} + onClick={this.handleClick} + title={this.props.title}>{this.props.children} } } Link.propTypes = { - href: PropTypes.string.isRequired, + href: PropTypes.string.isRequired, onClick: PropTypes.func, - title: PropTypes.string.isRequired, + title: PropTypes.string.isRequired, }; @@ -734,7 +747,7 @@ class GlobalWarningMessage extends Component { return Sefaria.globalWarningMessage ?
-
+
: null; } @@ -747,13 +760,13 @@ class TextBlockLink extends Component { render() { let { book, category, title, heTitle, showSections, sref, heRef, displayValue, heDisplayValue, position, url_string, recentItem, currVersions, sideColor, saved, sheetTitle, sheetOwner, timeStamp, intlang } = this.props; - const index = Sefaria.index(book); + const index = Sefaria.index(book); category = category || (index ? index.primary_category : "Other"); - const style = {"borderColor": Sefaria.palette.categoryColor(category)}; - title = title || (showSections ? sref : book); - heTitle = heTitle || (showSections ? heRef : index.heTitle); - const hlang = intlang ? "int-he": "he"; - const elang = intlang ? "int-en": "en"; + const style = { "borderColor": Sefaria.palette.categoryColor(category) }; + title = title || (showSections ? sref : book); + heTitle = heTitle || (showSections ? heRef : index.heTitle); + const hlang = intlang ? "int-he" : "he"; + const elang = intlang ? "int-en" : "en"; let byLine; if (!!sheetOwner && sideColor) { title = sheetTitle.stripHtml(); @@ -761,39 +774,39 @@ class TextBlockLink extends Component { byLine = sheetOwner; } const subtitle = displayValue ? ( - - {displayValue} - {heDisplayValue} - + + {displayValue} + {heDisplayValue} + ) : null; position = position || 0; const isSheet = book === 'Sheet'; - const classes = classNames({refLink: !isSheet, sheetLink: isSheet, blockLink: 1, recentItem, calendarLink: (subtitle != null), saved }); + const classes = classNames({ refLink: !isSheet, sheetLink: isSheet, blockLink: 1, recentItem, calendarLink: (subtitle != null), saved }); url_string = url_string ? url_string : sref; let url; if (isSheet) { - url = `/sheets/${Sefaria.normRef(url_string).replace('Sheet.','')}` + url = `/sheets/${Sefaria.normRef(url_string).replace('Sheet.', '')}` } else { - url = "/" + Sefaria.normRef(url_string) + Sefaria.util.getUrlVersionsParams(currVersions).replace("&","?"); + url = "/" + Sefaria.normRef(url_string) + Sefaria.util.getUrlVersionsParams(currVersions).replace("&", "?"); } if (sideColor) { return (
-
+
{title}{!!sheetOwner ? ({byLine}) : null} {heTitle}{!!sheetOwner ? ({byLine}) : null}
- { saved ? : null } - { !saved && timeStamp ? + {saved ? : null} + {!saved && timeStamp ? - { Sefaria.util.naturalTime(timeStamp) } - : null + {Sefaria.util.naturalTime(timeStamp)} + : null }
@@ -809,27 +822,27 @@ class TextBlockLink extends Component { } } TextBlockLink.propTypes = { - sref: PropTypes.string.isRequired, - currVersions: PropTypes.object.isRequired, - heRef: PropTypes.string, - book: PropTypes.string, - category: PropTypes.string, - title: PropTypes.string, - heTitle: PropTypes.string, - displayValue: PropTypes.string, - heDisplayValue: PropTypes.string, - url_string: PropTypes.string, - showSections: PropTypes.bool, - recentItem: PropTypes.bool, - position: PropTypes.number, - sideColor: PropTypes.bool, - saved: PropTypes.bool, - sheetTitle: PropTypes.string, - sheetOwner: PropTypes.string, - timeStamp: PropTypes.number, + sref: PropTypes.string.isRequired, + currVersions: PropTypes.object.isRequired, + heRef: PropTypes.string, + book: PropTypes.string, + category: PropTypes.string, + title: PropTypes.string, + heTitle: PropTypes.string, + displayValue: PropTypes.string, + heDisplayValue: PropTypes.string, + url_string: PropTypes.string, + showSections: PropTypes.bool, + recentItem: PropTypes.bool, + position: PropTypes.number, + sideColor: PropTypes.bool, + saved: PropTypes.bool, + sheetTitle: PropTypes.string, + sheetOwner: PropTypes.string, + timeStamp: PropTypes.number, }; TextBlockLink.defaultProps = { - currVersions: {en:null, he:null}, + currVersions: { en: null, he: null }, }; @@ -839,94 +852,95 @@ class LanguageToggleButton extends Component { this.props.toggleLanguage(); } render() { + return
var url = this.props.url || ""; return ( - Hebrew Language Toggle Icon - English Language Toggle Icon - ); + Hebrew Language Toggle Icon + English Language Toggle Icon + ); } } LanguageToggleButton.propTypes = { toggleLanguage: PropTypes.func.isRequired, - url: PropTypes.string, + url: PropTypes.string, }; -const ColorBarBox = ({tref, children}) => ( -
{children}
+const ColorBarBox = ({ tref, children }) => ( +
{children}
); -const DangerousInterfaceBlock = ({en, he, classes}) => ( -
- -
- ); +const DangerousInterfaceBlock = ({ en, he, classes }) => ( +
+ +
+); DangerousInterfaceBlock.propTypes = { - en: PropTypes.string, - he: PropTypes.string, - classes: PropTypes.string + en: PropTypes.string, + he: PropTypes.string, + classes: PropTypes.string }; -const SimpleInterfaceBlock = ({en, he, classes}) => ( -
- -
- ); +const SimpleInterfaceBlock = ({ en, he, classes }) => ( +
+ +
+); SimpleInterfaceBlock.propTypes = { - en: PropTypes.string, - he: PropTypes.string, - classes: PropTypes.string + en: PropTypes.string, + he: PropTypes.string, + classes: PropTypes.string }; -const SimpleContentBlock = ({children, classes}) => ( -
- {children} -
- ); +const SimpleContentBlock = ({ children, classes }) => ( +
+ {children} +
+); SimpleContentBlock.propTypes = { - classes: PropTypes.string + classes: PropTypes.string }; -const SimpleLinkedBlock = ({en, he, url, classes, aclasses, children, onClick, openInNewTab}) => ( +const SimpleLinkedBlock = ({ en, he, url, classes, aclasses, children, onClick, openInNewTab }) => (
- + {children}
); SimpleLinkedBlock.propTypes = { - en: PropTypes.string, - he: PropTypes.string, - url: PropTypes.string, - classes: PropTypes.string, - aclasses: PropTypes.string + en: PropTypes.string, + he: PropTypes.string, + url: PropTypes.string, + classes: PropTypes.string, + aclasses: PropTypes.string }; class BlockLink extends Component { render() { var interfaceClass = this.props.interfaceLink ? 'int-' : ''; - var cn = {blockLink: 1}; + var cn = { blockLink: 1 }; var linkClass = this.props.title.toLowerCase().replace(" ", "-") + "-link"; cn[linkClass] = 1; var classes = classNames(cn); - return ( - {this.props.image ? : null} - {this.props.title} - {this.props.heTitle} - ); + return ( + {this.props.image ? : null} + {this.props.title} + {this.props.heTitle} + ); } } BlockLink.propTypes = { - title: PropTypes.string, - heTitle: PropTypes.string, - target: PropTypes.string, - image: PropTypes.string, + title: PropTypes.string, + heTitle: PropTypes.string, + target: PropTypes.string, + image: PropTypes.string, interfaceLink: PropTypes.bool }; BlockLink.defaultProps = { @@ -937,43 +951,43 @@ BlockLink.defaultProps = { class ToggleSet extends Component { // A set of options grouped together. render() { - let classes = {toggleSet: 1, separated: this.props.separated, blueStyle: this.props.blueStyle }; + let classes = { toggleSet: 1, separated: this.props.separated, blueStyle: this.props.blueStyle }; classes[this.props.name] = 1; classes = classNames(classes); const width = 100.0 - (this.props.separated ? (this.props.options.length - 1) * 3 : 0); - const style = {width: (width/this.props.options.length) + "%"}; + const style = { width: (width / this.props.options.length) + "%" }; const label = this.props.label ? ({this.props.label}) : null; return (
{label}
{this.props.options.map((option) => ( - ))} + ))}
); } } ToggleSet.propTypes = { - name: PropTypes.string.isRequired, - label: PropTypes.string, - setOption: PropTypes.func.isRequired, - currentValue: PropTypes.string, - options: PropTypes.array.isRequired, - separated: PropTypes.bool, - blueStyle: PropTypes.bool, - role: PropTypes.string, - ariaLabel: PropTypes.string + name: PropTypes.string.isRequired, + label: PropTypes.string, + setOption: PropTypes.func.isRequired, + currentValue: PropTypes.string, + options: PropTypes.array.isRequired, + separated: PropTypes.bool, + blueStyle: PropTypes.bool, + role: PropTypes.string, + ariaLabel: PropTypes.string }; @@ -984,56 +998,56 @@ class ToggleOption extends Component { this.props.setOption(this.props.set, this.props.name); if (Sefaria.site) { Sefaria.track.event("Reader", "Display Option Click", this.props.set + " - " + this.props.name); } } - checkKeyPress(e){ - if (e.keyCode === 39 || e.keyCode === 40) { //39 is right arrow -- 40 is down - $(e.target).siblings(".toggleOption").attr("tabIndex","-1"); - $(e.target).attr("tabIndex","-1"); - $(e.target).next(".toggleOption").focus().attr("tabIndex","0"); + checkKeyPress(e) { + if (e.keyCode === 39 || e.keyCode === 40) { //39 is right arrow -- 40 is down + $(e.target).siblings(".toggleOption").attr("tabIndex", "-1"); + $(e.target).attr("tabIndex", "-1"); + $(e.target).next(".toggleOption").focus().attr("tabIndex", "0"); } else if (e.keyCode === 37 || e.keyCode === 38) { //37 is left arrow -- 38 is up - $(e.target).siblings(".toggleOption").attr("tabIndex","-1"); - $(e.target).attr("tabIndex","-1"); - $(e.target).prev(".toggleOption").focus().attr("tabIndex","0"); + $(e.target).siblings(".toggleOption").attr("tabIndex", "-1"); + $(e.target).attr("tabIndex", "-1"); + $(e.target).prev(".toggleOption").focus().attr("tabIndex", "0"); } else if (e.keyCode === 13) { //13 is enter - $(e.target).trigger("click"); + $(e.target).trigger("click"); } else if (e.keyCode === 9) { //9 is tab - var lastTab = $("div[role='dialog']").find(':tabbable').last(); - var firstTab = $("div[role='dialog']").find(':tabbable').first(); - if (e.shiftKey) { - if ($(e.target).is(firstTab)) { - $(lastTab).focus(); - e.preventDefault(); - } + var lastTab = $("div[role='dialog']").find(':tabbable').last(); + var firstTab = $("div[role='dialog']").find(':tabbable').first(); + if (e.shiftKey) { + if ($(e.target).is(firstTab)) { + $(lastTab).focus(); + e.preventDefault(); } - else { - if ($(e.target).is(lastTab)) { - $(firstTab).focus(); - e.preventDefault(); - } + } + else { + if ($(e.target).is(lastTab)) { + $(firstTab).focus(); + e.preventDefault(); } + } } else if (e.keyCode === 27) { //27 is escape - e.stopPropagation(); - $(".mask").trigger("click"); + e.stopPropagation(); + $(".mask").trigger("click"); } } render() { - let classes = {toggleOption: 1, on: this.props.on }; + let classes = { toggleOption: 1, on: this.props.on }; const tabIndexValue = this.props.on ? 0 : -1; const ariaCheckedValue = this.props.on ? "true" : "false"; classes[this.props.name] = 1; classes = classNames(classes); - const content = this.props.image ? () : - this.props.fa ? () : - typeof this.props.content === "string" ? () : - this.props.content; + const content = this.props.image ? () : + this.props.fa ? () : + typeof this.props.content === "string" ? () : + this.props.content; return (
{ - let ajaxPayload = {url, type}; - if (type === "POST") { - ajaxPayload.data = {json: JSON.stringify(data)}; - } - $.ajax({ - ...ajaxPayload, - success: function(result) { - if ("error" in result) { - if (setSavingStatus) { - setSavingStatus(false); - } - alert(result.error); - } else { - redirect(); +const requestWithCallBack = ({ url, setSavingStatus, redirect, type = "POST", data = {} }) => { + let ajaxPayload = { url, type }; + if (type === "POST") { + ajaxPayload.data = { json: JSON.stringify(data) }; + } + $.ajax({ + ...ajaxPayload, + success: function (result) { + if ("error" in result) { + if (setSavingStatus) { + setSavingStatus(false); } + alert(result.error); + } else { + redirect(); } - }).fail(function() { - alert(Sefaria._("Something went wrong. Sorry!")); - }); + } + }).fail(function () { + alert(Sefaria._("Something went wrong. Sorry!")); + }); } - const TopicToCategorySlug = function(topic, category=null) { - //helper function for AdminEditor - if (!category) { - category = Sefaria.topicTocCategory(topic.slug); - } - let initCatSlug = category ? category.slug : "Main Menu"; //category topics won't be found using topicTocCategory, - // so all category topics initialized to "Main Menu" - if ("displays-under" in topic?.links && "displays-above" in topic?.links) { - // this case handles categories that are not top level but have children under them - const displayUnderLinks = topic.links["displays-under"]?.links; - if (displayUnderLinks && displayUnderLinks.length === 1) { - initCatSlug = displayUnderLinks[0].topic; - } - } - return initCatSlug; - } +const TopicToCategorySlug = function (topic, category = null) { + //helper function for AdminEditor + if (!category) { + category = Sefaria.topicTocCategory(topic.slug); + } + let initCatSlug = category ? category.slug : "Main Menu"; //category topics won't be found using topicTocCategory, + // so all category topics initialized to "Main Menu" + if ("displays-under" in topic?.links && "displays-above" in topic?.links) { + // this case handles categories that are not top level but have children under them + const displayUnderLinks = topic.links["displays-under"]?.links; + if (displayUnderLinks && displayUnderLinks.length === 1) { + initCatSlug = displayUnderLinks[0].topic; + } + } + return initCatSlug; +} function useHiddenButtons() { - const [hideButtons, setHideButtons] = useState(true); - const handleMouseOverAdminButtons = () => { - setHideButtons(false); - setTimeout(() => setHideButtons(true), 3000); - } - return [hideButtons, handleMouseOverAdminButtons]; + const [hideButtons, setHideButtons] = useState(true); + const handleMouseOverAdminButtons = () => { + setHideButtons(false); + setTimeout(() => setHideButtons(true), 3000); + } + return [hideButtons, handleMouseOverAdminButtons]; } const AllAdminButtons = ({ buttonOptions, buttonsToDisplay, adminClasses }) => { @@ -1101,11 +1115,11 @@ const AllAdminButtons = ({ buttonOptions, buttonsToDisplay, adminClasses }) => { const bottom = i === buttonsToDisplay.length - 1; const [buttonText, toggleAddingTopics] = buttonOptions[key]; return ( - ); })} @@ -1134,7 +1148,7 @@ const CategoryHeader = ({children, type, data = [], buttonsToDisplay = ["subcat "source": ["Add a source", toggleAddSource], "section": ["Add section", toggleAddSection], "reorder": ["Reorder sources", toggleReorderCategory], - "edit": ["Edit", toggleEditCategory]}; + "edit": ["Edit", toggleEditCategory]}; let wrapper = ""; @@ -1154,9 +1168,9 @@ const CategoryHeader = ({children, type, data = [], buttonsToDisplay = ["subcat wrapper = "headerWithAdminButtons"; const adminClasses = classNames({adminButtons: 1, hiddenButtons}); adminButtonsSpan = ; } } @@ -1170,7 +1184,7 @@ const ReorderEditorWrapper = ({toggle, type, data}) => { */ const reorderingSources = data.length !== 0; const _filterAndSortRefs = (refs) => { - if (!refs) { + if (!refs) { return []; } // a topic can be connected to refs in one language and not in another so filter out those that are not in current interface lang @@ -1212,38 +1226,23 @@ const ReorderEditorWrapper = ({toggle, type, data}) => { } const EditorForExistingTopic = ({ toggle, data }) => { - const prepAltTitles = (lang) => { // necessary for use with TitleVariants component - return data.titles.filter(x => !x.primary && x.lang === lang).map((item, i) => ({["name"]: item.text, ["id"]: i})) - } const initCatSlug = TopicToCategorySlug(data); const origData = { origSlug: data.slug, - origCatSlug: initCatSlug, - origEnTitle: data.primaryTitle.en, - origHeTitle: data.primaryTitle.he || "", - origEnDescription: data.description?.en || "", - origHeDescription: data.description?.he || "", - origEnCategoryDescription: data.categoryDescription?.en || "", - origHeCategoryDescription: data.categoryDescription?.he || "", - origEnAltTitles: prepAltTitles('en'), - origHeAltTitles: prepAltTitles('he'), - origBirthPlace: data?.properties?.birthPlace?.value, - origHeBirthPlace: data?.properties?.heBirthPlace?.value, - origHeDeathPlace: data?.properties?.heDeathPlace?.value, - origBirthYear: data?.properties?.birthYear?.value, - origDeathPlace: data?.properties?.deathPlace?.value, - origDeathYear: data?.properties?.deathYear?.value, - origEra: data?.properties?.era?.value, - origImage: data?.image, - + origCategorySlug: initCatSlug, + origEn: data.primaryTitle.en, + origHe: data.primaryTitle.he || "", + origDesc: data.description || {"en": "", "he": ""}, + origCategoryDesc: data.categoryDescription || {"en": "", "he": ""}, }; - + const origWasCat = "displays-above" in data?.links; - + return ( - window.location.href = `"/topics/"${slug}`} close={toggle} /> ); @@ -1264,9 +1263,9 @@ const EditorForExistingCategory = ({ toggle, data }) => { }; return ( - ); @@ -1288,13 +1287,14 @@ const CategoryEditorWrapper = ({toggle, data, type}) => { } const CategoryAdderWrapper = ({toggle, data, type}) => { - const origData = {origEnTitle: ""}; + const origData = {origEn: ""}; switch (type) { case "cats": return ; case "topics": - origData['origCatSlug'] = data; - return ; + origData['origCategorySlug'] = data; + return window.location.href = "/topics/" + slug}/>; } } @@ -1312,7 +1312,7 @@ class MenuButton extends Component { var isheb = Sefaria.interfaceLang == "hebrew"; var icon = this.props.compare ? (isheb ? : ) : - (); + (); return ({icon}); } } @@ -1328,14 +1328,14 @@ class CloseButton extends Component { this.props.onClick(); } render() { - if (this.props.icon == "circledX"){ + if (this.props.icon == "circledX") { var icon = ; } else if (this.props.icon == "chevron") { var icon = } else { var icon = "×"; } - var classes = classNames({readerNavMenuCloseButton: 1, circledX: this.props.icon === "circledX"}); + var classes = classNames({ readerNavMenuCloseButton: 1, circledX: this.props.icon === "circledX" }); var url = this.props.url || ""; return ({icon}); } @@ -1344,29 +1344,21 @@ class CloseButton extends Component { class DisplaySettingsButton extends Component { render() { - let style = this.props.placeholder ? {visibility: "hidden"} : {}; - let icon; - - if (Sefaria._siteSettings.TORAH_SPECIFIC) { - icon = - - Toggle Reader Menu Display Settings - Toggle Reader Menu Display Settings - ; - } else { - icon = Aa; - } + var style = this.props.placeholder ? { visibility: "hidden" } : {}; + var icon = Sefaria._siteSettings.TORAH_SPECIFIC ? + Toggle Reader Menu Display Settings : + Aa; return ( - {icon} - ); + className="readerOptions" + tabIndex="0" + role="button" + aria-haspopup="true" + aria-label="Toggle Reader Menu Display Settings" + style={style} + onClick={this.props.onClick} + onKeyPress={function (e) { e.charCode == 13 ? this.props.onClick(e) : null }.bind(this)}> + {icon} + ); } } DisplaySettingsButton.propTypes = { @@ -1375,7 +1367,7 @@ DisplaySettingsButton.propTypes = { }; -function InterfaceLanguageMenu({currentLang, translationLanguagePreference, setTranslationLanguagePreference}){ +function InterfaceLanguageMenu({ currentLang, translationLanguagePreference, setTranslationLanguagePreference }) { const [isOpen, setIsOpen] = useState(false); const wrapperRef = useRef(null); @@ -1391,57 +1383,57 @@ function InterfaceLanguageMenu({currentLang, translationLanguagePreference, setT setTranslationLanguagePreference(null); }; const handleHideDropdown = (event) => { - if (event.key === 'Escape') { - setIsOpen(false); - } + if (event.key === 'Escape') { + setIsOpen(false); + } }; const handleClickOutside = (event) => { - if ( - wrapperRef.current && - !wrapperRef.current.contains(event.target) - ) { - setIsOpen(false); - } + if ( + wrapperRef.current && + !wrapperRef.current.contains(event.target) + ) { + setIsOpen(false); + } }; useEffect(() => { - document.addEventListener('keydown', handleHideDropdown, true); - document.addEventListener('click', handleClickOutside, true); - return () => { - document.removeEventListener('keydown', handleHideDropdown, true); - document.removeEventListener('click', handleClickOutside, true); - }; + document.addEventListener('keydown', handleHideDropdown, true); + document.addEventListener('click', handleClickOutside, true); + return () => { + document.removeEventListener('keydown', handleHideDropdown, true); + document.removeEventListener('click', handleClickOutside, true); + }; }, []); return ( -
- -
-
- Site Language -
- - { !!translationLanguagePreference ? ( - <> -
- Preferred Translation -
-
- {Sefaria.translateISOLanguageCode(translationLanguagePreference, true)} - - - - Reset - - -
- - ) : null} +
+ +
+
+ Site Language +
+ + {!!translationLanguagePreference ? ( + <> +
+ Preferred Translation +
+
+ {Sefaria.translateISOLanguageCode(translationLanguagePreference, true)} + + + + Reset + + +
+ + ) : null}
+
); } InterfaceLanguageMenu.propTypes = { @@ -1450,7 +1442,7 @@ InterfaceLanguageMenu.propTypes = { }; -function SaveButton({historyObject, placeholder, tooltip, toggleSignUpModal}) { +function SaveButton({ historyObject, placeholder, tooltip, toggleSignUpModal }) { if (!historyObject) { placeholder = true; } const isSelected = () => !!Sefaria.getSavedItem(historyObject); const [selected, setSelected] = useState(placeholder || isSelected()); @@ -1461,11 +1453,11 @@ function SaveButton({historyObject, placeholder, tooltip, toggleSignUpModal}) { const [isPosting, setPosting] = useState(false); - const style = placeholder ? {visibility: 'hidden'} : {}; - const classes = classNames({saveButton: 1, "tooltip-toggle": tooltip}); + const style = placeholder ? { visibility: 'hidden' } : {}; + const classes = classNames({ saveButton: 1, "tooltip-toggle": tooltip }); const altText = placeholder ? '' : - `${Sefaria._(selected ? "Remove" : "Save")} "${historyObject.sheet_title ? - historyObject.sheet_title.stripHtml() : Sefaria._r(historyObject.ref)}"`; + `${Sefaria._(selected ? "Remove" : "Save")} "${historyObject.sheet_title ? + historyObject.sheet_title.stripHtml() : Sefaria._r(historyObject.ref)}"`; function onClick(event) { if (isPosting) { return; } @@ -1473,15 +1465,15 @@ function SaveButton({historyObject, placeholder, tooltip, toggleSignUpModal}) { setPosting(true); Sefaria.track.event("Saved", "saving", historyObject.ref); Sefaria.toggleSavedItem(historyObject) - .then(() => { setSelected(isSelected()); }) // since request is async, check if it's selected from data - .catch(e => { if (e == 'notSignedIn') { toggleSignUpModal(SignUpModalKind.Save); }}) - .finally(() => { setPosting(false); }); + .then(() => { setSelected(isSelected()); }) // since request is async, check if it's selected from data + .catch(e => { if (e == 'notSignedIn') { toggleSignUpModal(SignUpModalKind.Save); } }) + .finally(() => { setPosting(false); }); } return ( - { selected ? {altText}/ : - {altText}/ } + {selected ? {altText} : + {altText}} ); } @@ -1496,16 +1488,14 @@ SaveButton.propTypes = { }; -const ToolTipped = ({ altText, classes, style, onClick, children }) => { - const analyticsContext = useContext(AdContext) - return ( +const ToolTipped = ({ altText, classes, style, onClick, children }) => (
TrackG4.gtagClick(e, onClick, `ToolTipped`, {"classes": classes}, analyticsContext)} - onKeyPress={e => {e.charCode == 13 ? onClick(e): null}}> - { children } + style={style} onClick={onClick} + onKeyPress={e => { e.charCode == 13 ? onClick(e) : null }}> + {children}
-)}; +); class FollowButton extends Component { @@ -1530,10 +1520,10 @@ class FollowButton extends Component { } onMouseEnter() { if (this.props.disableUnfollow) { return; } - this.setState({hovering: true}); + this.setState({ hovering: true }); } onMouseLeave() { - this.setState({hovering: false}); + this.setState({ hovering: false }); } onClick(e) { e.stopPropagation(); @@ -1543,10 +1533,10 @@ class FollowButton extends Component { } if (this.state.following && !this.props.disableUnfollow) { this._postUnfollow(); - this.setState({following: false}); + this.setState({ following: false }); } else { this._postFollow(); - this.setState({following: true, hovering: false}); // hovering:false keeps the "unfollow" from flashing. + this.setState({ following: true, hovering: false }); // hovering:false keeps the "unfollow" from flashing. } } render() { @@ -1557,110 +1547,29 @@ class FollowButton extends Component { hovering: this.state.hovering, smallText: !this.props.large, }); - let buttonText = this.state.following ? this.state.hovering ? "Unfollow" : "Following" : "Follow"; + let buttonText = this.state.following ? this.state.hovering ? "Unfollow" : "Following" : "Follow"; buttonText = buttonText === "Follow" && this.props.followBack ? "Follow Back" : buttonText; return (
- {this.props.icon ? : null} + {this.props.icon ? : null} {buttonText}
); } } FollowButton.propTypes = { - uid: PropTypes.number.isRequired, - following: PropTypes.bool, // is this person followed already? - large: PropTypes.bool, - disableUnfollow: PropTypes.bool, - followBack: PropTypes.bool, + uid: PropTypes.number.isRequired, + following: PropTypes.bool, // is this person followed already? + large: PropTypes.bool, + disableUnfollow: PropTypes.bool, + followBack: PropTypes.bool, toggleSignUpModal: PropTypes.func, }; -const TopicPictureUploader = ({slug, callback, old_filename, caption}) => { - /* - `old_filename` is passed to API so that if it exists, it is deleted - */ - const fileInput = useRef(null); - const uploadImage = function(imageData, type="POST") { - const formData = new FormData(); - formData.append('file', imageData.replace(/data:image\/(jpe?g|png|gif);base64,/, "")); - if (old_filename !== "") { - formData.append('old_filename', old_filename); - } - const request = new Request( - `${Sefaria.apiHost}/api/topics/images/${slug}`, - {headers: {'X-CSRFToken': Cookies.get('csrftoken')}} - ); - fetch(request, { - method: 'POST', - mode: 'same-origin', - credentials: 'same-origin', - body: formData - }).then(response => { - if (!response.ok) { - response.text().then(resp_text=> { - alert(resp_text); - }) - }else{ - response.json().then(resp_json=>{ - callback(resp_json.url); - }); - } - }).catch(error => { - alert(error); - })}; - const onFileSelect = (e) => { - const file = fileInput.current.files[0]; - if (file == null) - return; - if (/\.(jpe?g|png|gif)$/i.test(file.name)) { - const reader = new FileReader(); - - reader.addEventListener("load", function() { - uploadImage(reader.result); - }, false); - - reader.addEventListener("onerror", function() { - alert(reader.error); - }, false); - - reader.readAsDataURL(file); - } else { - alert('The file is not an image'); - } - } - const deleteImage = () => { - const old_filename_wout_url = old_filename.split("/").slice(-1); - const url = `${Sefaria.apiHost}/api/topics/images/${slug}?old_filename=${old_filename_wout_url}`; - requestWithCallBack({url, type: "DELETE", redirect: () => alert("Deleted image.")}); - callback(""); - fileInput.current.value = ""; - } - return
- - -
e.stopPropagation()} id="addImageButton"> - -
- {old_filename !== "" &&
-
-
- Remove Picture -
- } -
- } - -const CategoryColorLine = ({category}) => -
; +const CategoryColorLine = ({ category }) => +
; class ProfileListing extends Component { @@ -1677,7 +1586,7 @@ class ProfileListing extends Component { />
-
+
{!!organization ? - - :null} + + : null}
); } } ProfileListing.propTypes = { - uid: PropTypes.number.isRequired, - url: PropTypes.string.isRequired, - image: PropTypes.string.isRequired, - name: PropTypes.string.isRequired, - is_followed: PropTypes.bool, + uid: PropTypes.number.isRequired, + url: PropTypes.string.isRequired, + image: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, + is_followed: PropTypes.bool, toggleSignUpModal: PropTypes.func, }; @@ -1769,31 +1678,31 @@ const SheetListing = ({ ); - const sheetSummary = showSheetSummary && sheet.summary? - :null; + const sheetSummary = showSheetSummary && sheet.summary ? + : null; const sheetInfo = hideAuthor ? null : -
- - {viewsIcon} +
+ + {viewsIcon} +
const collectionsList = "collections" in sheet ? sheet.collections.slice() : []; if (sheet.displayedCollectionName) { - collectionsList.unshift({name: sheet.displayedCollectionName, slug: sheet.displayedCollection}); + collectionsList.unshift({ name: sheet.displayedCollectionName, slug: sheet.displayedCollection }); } const collections = collectionsList.map((collection, i) => { - const separator = i == collectionsList.length -1 ? null : ,; + const separator = i == collectionsList.length - 1 ? null : ,; return ( { - const separator = i == sheet.topics.length -1 ? null : ,; + const separator = i == sheet.topics.length - 1 ? null : ,; return ( {Sefaria._("Not Published")}) : undefined, - showAuthorUnderneath ? ({sheet.ownerName}) : undefined, - views, - created, - collections.length ? collections : undefined, - sheet.topics.length ? topics : undefined, - ].filter(x => x !== undefined) : [topics]; + sheet.status !== 'public' ? ({Sefaria._("Not Published")}) : undefined, + showAuthorUnderneath ? ({sheet.ownerName}) : undefined, + views, + created, + collections.length ? collections : undefined, + sheet.topics.length ? topics : undefined, + ].filter(x => x !== undefined) : [topics]; - const pinButtonClasses = classNames({sheetListingPinButton: 1, pinned: pinned, active: pinnable}); + const pinButtonClasses = classNames({ sheetListingPinButton: 1, pinned: pinned, active: pinnable }); const pinMessage = pinned && pinnable ? Sefaria._("Pinned Sheet - click to unpin") : - pinned ? Sefaria._("Pinned Sheet") : Sefaria._("Pin Sheet"); + pinned ? Sefaria._("Pinned Sheet") : Sefaria._("Pin Sheet"); const pinButton = return ( @@ -1841,7 +1750,7 @@ const SheetListing = ({
{sheetInfo} - + {title} {sheetSummary} @@ -1849,7 +1758,7 @@ const SheetListing = ({ { underInfo.map((item, i) => ( - { i !== 0 ? {'\u2022'} : null } + {i !== 0 ? {'\u2022'} : null} {item} )) @@ -1859,7 +1768,7 @@ const SheetListing = ({
{ editable && !Sefaria._uses_new_editor ? - + : null } { @@ -1874,13 +1783,13 @@ const SheetListing = ({ } { saveable ? - : null } - { pinnable || pinned ? - pinButton - : null + {pinnable || pinned ? + pinButton + : null }
{showCollectionsModal ? @@ -1894,7 +1803,7 @@ const SheetListing = ({ }; -const CollectionListing = ({data}) => { +const CollectionListing = ({ data }) => { const imageUrl = "/static/icons/collection.svg"; const collectionUrl = "/collections/" + data.slug; return ( @@ -1903,19 +1812,19 @@ const CollectionListing = ({data}) => {
- Collection Icon + Collection Icon {data.name}
{data.listed ? null : ( - + Unlisted - ) } + )} {data.listed ? null : - } + } {`${data.sheetCount} `} @@ -1923,13 +1832,13 @@ const CollectionListing = ({data}) => { {data.memberCount > 1 ? - : null } + : null} {data.memberCount > 1 ? - - {`${data.memberCount} `} - Editors - : null } + + {`${data.memberCount} `} + Editors + : null}
@@ -1942,39 +1851,180 @@ class Note extends Component { // Public or private note in the Sidebar. render() { var authorInfo = this.props.ownerName && !this.props.isMyNote ? - () : null; - - var buttons = this.props.isMyNote ? - (
- -
) : null; - - var text = Sefaria.util.linkify(this.props.text); - text = text.replace(/\n/g, "
"); - - return (
- {buttons} - {authorInfo} -
- -
-
); + () : null; + + var buttons = this.props.isMyNote ? + (
+ +
) : null; + + var text = Sefaria.util.linkify(this.props.text); + text = text.replace(/\n/g, "
"); + + return (
+ {buttons} + {authorInfo} +
+ +
+
); } } Note.propTypes = { - text: PropTypes.string.isRequired, - ownerName: PropTypes.string, - ownerImageUrl: PropTypes.string, + text: PropTypes.string.isRequired, + ownerName: PropTypes.string, + ownerImageUrl: PropTypes.string, ownerProfileUrl: PropTypes.string, - isPrivate: PropTypes.bool, - isMyNote: PropTypes.bool, - editNote: PropTypes.func + isPrivate: PropTypes.bool, + isMyNote: PropTypes.bool, + editNote: PropTypes.func }; +function NewsletterSignUpForm(props) { + const { contextName, includeEducatorOption } = props; + const [email, setEmail] = useState(''); + const [firstName, setFirstName] = useState(''); + const [lastName, setLastName] = useState(''); + const [educatorCheck, setEducatorCheck] = useState(false); + const [subscribeMessage, setSubscribeMessage] = useState(null); + const [showNameInputs, setShowNameInputs] = useState(false); + + function handleSubscribeKeyUp(e) { + if (e.keyCode === 13) { + handleSubscribe(); + } + } + + function handleSubscribe() { + if (showNameInputs === true) { // submit + if (firstName.length > 0 & lastName.length > 0) { + setSubscribeMessage("Subscribing..."); + const request = new Request( + '/api/subscribe/' + email, + { + headers: { 'X-CSRFToken': Cookies.get('csrftoken') }, + 'Content-Type': 'application/json' + } + ); + fetch(request, + { + method: "POST", + mode: 'same-origin', + credentials: 'same-origin', + body: JSON.stringify({ + language: Sefaria.interfaceLang === "hebrew" ? "he" : "en", + educator: educatorCheck, + firstName: firstName, + lastName: lastName + }) + } + ).then(res => { + if ("error" in res) { + setSubscribeMessage(res.error); + setShowNameInputs(false); + } else { + setSubscribeMessage("Subscribed! Welcome to our list."); + Sefaria.track.event("Newsletter", "Subscribe from " + contextName, ""); + } + }).catch(data => { + setSubscribeMessage("Sorry, there was an error."); + setShowNameInputs(false); + }); + } else { + setSubscribeMessage("Please enter a valid first and last name");// get he copy + } + } else if (Sefaria.util.isValidEmailAddress(email)) { + setShowNameInputs(true); + } else { + setShowNameInputs(false); + setSubscribeMessage("Please enter a valid email address."); + } + } + + return ( +
+ + setEmail(e.target.value)} + onKeyUp={handleSubscribeKeyUp} /> + + + setEmail(e.target.value)} + onKeyUp={handleSubscribeKeyUp} /> + + {!showNameInputs ? : null} + {showNameInputs ? + <> + setFirstName(e.target.value)} + onKeyUp={handleSubscribeKeyUp} /> + + + setFirstName(e.target.value)} + onKeyUp={handleSubscribeKeyUp} /> + + + setLastName(e.target.value)} + onKeyUp={handleSubscribeKeyUp} /> + + + setLastName(e.target.value)} + onKeyUp={handleSubscribeKeyUp} /> + +
+ + setEducatorCheck(!!e.target.checked)} /> + I am an educator + + + setEducatorCheck(!!e.target.checked)} /> + מורים/ אנשי הוראה + + +
+ + : null} + {subscribeMessage ? +
{Sefaria._(subscribeMessage)}
+ : null} +
+ ); +} class LoginPrompt extends Component { @@ -2026,7 +2076,7 @@ class SignUpModal extends Component {
- { innerContent } + {innerContent}
Sign Up @@ -2048,404 +2098,126 @@ SignUpModal.propTypes = { }; -function OnInView({ children, onVisible }) { - /** - * The functional component takes an existing element and wraps it in an IntersectionObserver and returns the children, only observed and with a callback for the observer. - * `children` single element or nested group of elements wrapped in a div - * `onVisible` callback function that will be called when given component(s) are visible within the viewport - * Ex. - */ - const elementRef = useRef(); - - useEffect(() => { - const observer = new IntersectionObserver( - // Callback function will be invoked whenever the visibility of the observed element changes - (entries) => { - const entry = entries[0]; - // Check if the observed element is intersecting with the viewport (it's visible) - // Invoke provided prop callback for analytics purposes - if (entry.isIntersecting) { - onVisible(); - } +class InterruptingMessage extends Component { + constructor(props) { + super(props); + this.displayName = 'InterruptingMessage'; + this.state = { + timesUp: false, + animationStarted: false + }; + this.settings = { + "modal": { + "trackingName": "Interrupting Message", + "showDelay": 1000, }, - // The entire element must be entirely visible - { threshold: 1 } - ); - - // Start observing the element, but wait until the element exists - if (elementRef.current) { - observer.observe(elementRef.current); - } - - // Cleanup when the component unmounts - return () => { - // Stop observing the element when it's no longer on the screen and can't be visible - if (elementRef.current) { - observer.unobserve(elementRef.current); + "banner": { + "trackingName": "Banner Message", + "showDelay": 1, } - }; - }, [onVisible]); - - // Attach elementRef to a div wrapper and pass the children to be rendered within it - return
{children}
; -} - -const transformValues = (obj, callback) => { - const newObj = {}; - for (let key in obj) { - newObj[key] = obj[key] !== null ? callback(obj[key]) : null; + }[this.props.style]; } - return newObj; -}; - -const replaceNewLinesWithLinebreaks = (content) => { - return transformValues( - content, - (s) => s.replace(/\n/gi, "  \n") + "  \n  \n" - ); -} - -const InterruptingMessage = ({ - onClose, -}) => { - const [interruptingMessageShowDelayHasElapsed, setInterruptingMessageShowDelayHasElapsed] = useState(false); - const [hasInteractedWithModal, setHasInteractedWithModal] = useState(false); - const strapi = useContext(StrapiDataContext); - - const markModalAsHasBeenInteractedWith = (modalName) => { - localStorage.setItem("modal_" + modalName, "true"); - }; - - const hasModalBeenInteractedWith = (modalName) => { - return JSON.parse(localStorage.getItem("modal_" + modalName)); - }; - - const trackModalInteraction = (modalName, eventDescription) => { - gtag("event", "modal_interacted_with_" + eventDescription, { - campaignID: modalName, - adType: "modal", - }); - }; - - const trackModalImpression = () => { - console.log("We've got visibility!"); - gtag("event", "modal_viewed", { - campaignID: strapi.modal.internalModalName, - adType: "modal", - }); - }; - - const shouldShow = () => { - if (!strapi.modal) return false; - if (Sefaria.interfaceLang === 'hebrew' && !strapi.modal.locales.includes('he')) return false; - if ( - hasModalBeenInteractedWith( - strapi.modal.internalModalName - ) - ) - return false; - - let shouldShowModal = false; - - let noUserKindIsSet = ![ - strapi.modal.showToReturningVisitors, - strapi.modal.showToNewVisitors, - strapi.modal.showToSustainers, - strapi.modal.showToNonSustainers, - ].some((p) => p); - if ( - Sefaria._uid && - ((Sefaria.is_sustainer && - strapi.modal.showToSustainers) || - (!Sefaria.is_sustainer && - strapi.modal.showToNonSustainers)) - ) - shouldShowModal = true; - else if ( - (Sefaria.isReturningVisitor() && - strapi.modal.showToReturningVisitors) || - (Sefaria.isNewVisitor() && strapi.modal.showToNewVisitors) - ) - shouldShowModal = true; - else if (noUserKindIsSet) shouldShowModal = true; - if (!shouldShowModal) return false; - // Don't show the modal on pages where the button link goes to since you're already there - const excludedPaths = ["/donate", "/mobile", "/app", "/ways-to-give"]; - if (strapi.modal.buttonURL) { - if (strapi.modal.buttonURL.en) { - excludedPaths.push(new URL(strapi.modal.buttonURL.en).pathname); - } - if (strapi.modal.buttonURL.he) { - excludedPaths.push(new URL(strapi.modal.buttonURL.he).pathname); - } - } - return excludedPaths.indexOf(window.location.pathname) === -1; - }; - - const closeModal = (eventDescription) => { - if (onClose) onClose(); - markModalAsHasBeenInteractedWith( - strapi.modal.internalModalName - ); - setHasInteractedWithModal(true); - trackModalInteraction( - strapi.modal.internalModalName, - eventDescription - ); - }; - - useEffect(() => { - if (shouldShow()) { - const timeoutId = setTimeout(() => { - setInterruptingMessageShowDelayHasElapsed(true); - }, strapi.modal.showDelay * 1000); - return () => clearTimeout(timeoutId); // clearTimeout on component unmount + componentDidMount() { + if (this.shouldShow()) { + this.delayedShow(); } - }, [strapi.modal]); // execute useEffect when the modal changes - - if (!interruptingMessageShowDelayHasElapsed) return null; - - if (!hasInteractedWithModal) { - return ( - -
- - ); - } else { - return null; } -}; -InterruptingMessage.displayName = "InterruptingMessage"; - -const Banner = ({ onClose }) => { - const [bannerShowDelayHasElapsed, setBannerShowDelayHasElapsed] = - useState(false); - const [hasInteractedWithBanner, setHasInteractedWithBanner] = useState(false); - const strapi = useContext(StrapiDataContext); - - const markBannerAsHasBeenInteractedWith = (bannerName) => { - localStorage.setItem("banner_" + bannerName, "true"); - }; - - const hasBannerBeenInteractedWith = (bannerName) => { - return JSON.parse(localStorage.getItem("banner_" + bannerName)); - }; - - const trackBannerInteraction = (bannerName, eventDescription) => { - gtag("event", "banner_interacted_with_" + eventDescription, { - campaignID: bannerName, - adType: "banner", - }); - }; - - const trackBannerImpression = () => { - gtag("event", "banner_viewed", { - campaignID: strapi.banner.internalBannerName, - adType: "banner", - }); - }; - - const shouldShow = () => { - if (!strapi.banner) return false; - if ( - Sefaria.interfaceLang === "hebrew" && - !strapi.banner.locales.includes("he") - ) - return false; - if (hasBannerBeenInteractedWith(strapi.banner.internalBannerName)) - return false; - - let shouldShowBanner = false; - - let noUserKindIsSet = ![ - strapi.banner.showToReturningVisitors, - strapi.banner.showToNewVisitors, - strapi.banner.showToSustainers, - strapi.banner.showToNonSustainers, - ].some((p) => p); - if ( - Sefaria._uid && - ((Sefaria.is_sustainer && strapi.banner.showToSustainers) || - (!Sefaria.is_sustainer && strapi.banner.showToNonSustainers)) - ) - shouldShowBanner = true; - else if ( - (Sefaria.isReturningVisitor() && strapi.banner.showToReturningVisitors) || - (Sefaria.isNewVisitor() && strapi.banner.showToNewVisitors) - ) - shouldShowBanner = true; - else if (noUserKindIsSet) shouldShowBanner = true; - if (!shouldShowBanner) return false; - + shouldShow() { const excludedPaths = ["/donate", "/mobile", "/app", "/ways-to-give"]; - // Don't show the banner on pages where the button link goes to since you're already there - if (strapi.banner.buttonURL) { - if (strapi.banner.buttonURL.en) { - excludedPaths.push(new URL(strapi.banner.buttonURL.en).pathname); - } - if (strapi.banner.buttonURL.he) { - excludedPaths.push(new URL(strapi.banner.buttonURL.he).pathname); - } - } return excludedPaths.indexOf(window.location.pathname) === -1; - }; - - const closeBanner = (eventDescription) => { - if (onClose) onClose(); - markBannerAsHasBeenInteractedWith(strapi.banner.internalBannerName); - setHasInteractedWithBanner(true); - trackBannerInteraction(strapi.banner.internalBannerName, eventDescription); - }; - - useEffect(() => { - if (shouldShow()) { - const timeoutId = setTimeout(() => { - // s2 is the div that contains the React root and needs to be manipulated by traditional DOM methods - if (document.getElementById("s2").classList.contains("headerOnly")) { - document.body.classList.add("hasBannerMessage"); - } - setBannerShowDelayHasElapsed(true); - }, strapi.banner.showDelay * 1000); - return () => clearTimeout(timeoutId); // clearTimeout on component unmount + } + delayedShow() { + setTimeout(function () { + this.setState({ timesUp: true }); + $("#interruptingMessage .button").click(this.close); + $("#interruptingMessage .trackedAction").click(this.trackAction); + this.showAorB(); + this.animateOpen(); + }.bind(this), this.settings.showDelay); + } + animateOpen() { + setTimeout(function () { + if (this.props.style === "banner" && $("#s2").hasClass("headerOnly")) { $("body").addClass("hasBannerMessage"); } + this.setState({ animationStarted: true }); + this.trackOpen(); + }.bind(this), 50); + } + showAorB() { + // Allow random A/B testing if items are tagged ".optionA", ".optionB" + const $message = $(ReactDOM.findDOMNode(this)); + if ($message.find(".optionA").length) { + console.log("rand show") + Math.random() > 0.5 ? $(".optionA").show() : $(".optionB").show(); } - }, [strapi.banner]); // execute useEffect when the banner changes - - if (!bannerShowDelayHasElapsed) return null; - - if (!hasInteractedWithBanner) { - return ( - -
- -
{ - closeBanner("close_clicked"); - }} - > - × + } + close() { + this.markAsRead(); + this.props.onClose(); + if (this.props.style === "banner" && $("#s2").hasClass("headerOnly")) { $("body").removeClass("hasBannerMessage"); } + } + trackOpen() { + Sefaria.track.event(this.settings.trackingName, "open", this.props.messageName, { nonInteraction: true }); + } + trackAction() { + Sefaria.track.event(this.settings.trackingName, "action", this.props.messageName, { nonInteraction: true }); + } + markAsRead() { + Sefaria._api("/api/interrupting-messages/read/" + this.props.messageName, function (data) { }); + var cookieName = this.props.messageName + "_" + this.props.repetition; + $.cookie(cookieName, true, { path: "/", expires: 14 }); + Sefaria.track.event(this.settings.trackingName, "read", this.props.messageName, { nonInteraction: true }); + Sefaria.interruptingMessage = null; + } + render() { + if (!this.state.timesUp) { return null; } + + if (this.props.style === "banner") { + return
+
+
×
+
; + + } else if (this.props.style === "modal") { + return
+
+
+
+
+
×
+
+
- - ); - } else { +
; + } return null; } +} +InterruptingMessage.propTypes = { + messageName: PropTypes.string.isRequired, + messageHTML: PropTypes.string.isRequired, + style: PropTypes.string.isRequired, + repetition: PropTypes.number.isRequired, // manual toggle to refresh an existing message + onClose: PropTypes.func.isRequired }; -Banner.displayName = "Banner"; -const NBox = ({ content, n, stretch, gap=0 }) => { +const NBox = ({ content, n, stretch, gap = 0 }) => { // Wrap a list of elements into an n-column flexbox // If `stretch`, extend the final row into any remaining empty columns let length = content.length; let rows = []; - for (let i=0; i {rows.map((row, i) => ( -
- {row.pad(stretch ? row.length : n, "").map((item, j) => ( -
{item}
- ))} -
+
+ {row.pad(stretch ? row.length : n, "").map((item, j) => ( +
{item}
+ ))} +
))}
); @@ -2454,17 +2226,17 @@ const NBox = ({ content, n, stretch, gap=0 }) => { class TwoOrThreeBox extends Component { // Wrap a list of elements into a two or three column table, depending on window width render() { - var threshhold = this.props.threshhold; - if (this.props.width > threshhold) { - return (); - } else { - return (); - } + var threshhold = this.props.threshhold; + if (this.props.width > threshhold) { + return (); + } else { + return (); + } } } TwoOrThreeBox.propTypes = { - content: PropTypes.array.isRequired, - width: PropTypes.number.isRequired, + content: PropTypes.array.isRequired, + width: PropTypes.number.isRequired, threshhold: PropTypes.number }; TwoOrThreeBox.defaultProps = { @@ -2472,7 +2244,7 @@ TwoOrThreeBox.defaultProps = { }; -const ResponsiveNBox = ({content, stretch, initialWidth, threshold2=500, threshold3=1500, gap=0}) => { +const ResponsiveNBox = ({ content, stretch, initialWidth, threshold2 = 500, threshold3 = 1500, gap = 0 }) => { //above threshold2, there will be 2 columns //above threshold3, there will be 3 columns initialWidth = initialWidth || (window ? window.innerWidth : 1000); @@ -2483,7 +2255,7 @@ const ResponsiveNBox = ({content, stretch, initialWidth, threshold2=500, thresho deriveAndSetWidth(); window.addEventListener("resize", deriveAndSetWidth); return () => { - window.removeEventListener("resize", deriveAndSetWidth); + window.removeEventListener("resize", deriveAndSetWidth); } }, []); @@ -2494,7 +2266,7 @@ const ResponsiveNBox = ({content, stretch, initialWidth, threshold2=500, thresho return (
- +
); }; @@ -2511,47 +2283,47 @@ class Dropdown extends Component { componentDidMount() { if (this.props.preselected) { - const selected = this.props.options.filter( o => (o.value == this.props.preselected)); + const selected = this.props.options.filter(o => (o.value == this.props.preselected)); this.select(selected[0]) } } select(option) { - this.setState({selected: option, optionsOpen: false}); - const event = {target: {name: this.props.name, value: option.value}} + this.setState({ selected: option, optionsOpen: false }); + const event = { target: { name: this.props.name, value: option.value } } this.props.onChange && this.props.onChange(event); } toggle() { - this.setState({optionsOpen: !this.state.optionsOpen}); + this.setState({ optionsOpen: !this.state.optionsOpen }); } render() { return ( -
-
- {this.state.selected ? this.state.selected.label : this.props.placeholder} - +
+
+ {this.state.selected ? this.state.selected.label : this.props.placeholder} + -
- {this.state.optionsOpen ? -
-
- {this.props.options.map(function(option) { - const onClick = this.select.bind(null, option); - const classes = classNames({dropdownOption: 1, selected: this.state.selected && this.state.selected.value == option.value}); - return
{option.label}
- }.bind(this))} -
+
+ {this.state.optionsOpen ? +
+
+ {this.props.options.map(function (option) { + const onClick = this.select.bind(null, option); + const classes = classNames({ dropdownOption: 1, selected: this.state.selected && this.state.selected.value == option.value }); + return
{option.label}
+ }.bind(this))}
+
: null} -
); +
); } } Dropdown.propTypes = { - options: PropTypes.array.isRequired, // Array of {label, value} - name: PropTypes.string.isRequired, - onChange: PropTypes.func, + options: PropTypes.array.isRequired, // Array of {label, value} + name: PropTypes.string.isRequired, + onChange: PropTypes.func, placeholder: PropTypes.string, - selected: PropTypes.string, + selected: PropTypes.string, }; @@ -2561,30 +2333,30 @@ class LoadingMessage extends Component { var heMessage = this.props.heMessage || "טוען מידע..."; var classes = "loadingMessage sans-serif " + (this.props.className || ""); return (
- - {message} - {heMessage} - -
); + + {message} + {heMessage} + +
); } } LoadingMessage.propTypes = { - message: PropTypes.string, + message: PropTypes.string, heMessage: PropTypes.string, className: PropTypes.string }; -const CategoryAttribution = ({categories, linked = true, asEdition}) => { +const CategoryAttribution = ({ categories, linked = true, asEdition }) => { const attribution = Sefaria.categoryAttribution(categories); if (!attribution) { return null; } const en = asEdition ? attribution.englishAsEdition : attribution.english; const he = asEdition ? attribution.hebrewAsEdition : attribution.hebrew; - const str = ; + const str = ; const content = linked ? - {str} : str; + {str} : str; return
{content}
; }; @@ -2599,17 +2371,17 @@ class SheetTopicLink extends Component { const { slug, en, he } = this.props.topic; return ( - + ); } } SheetTopicLink.propTypes = { - topic: PropTypes.shape({ - en: PropTypes.string.isRequired, - he: PropTypes.string.isRequired, - slug: PropTypes.string.isRequired, - }).isRequired, + topic: PropTypes.shape({ + en: PropTypes.string.isRequired, + he: PropTypes.string.isRequired, + slug: PropTypes.string.isRequired, + }).isRequired, setSheetTag: PropTypes.func.isRequired }; @@ -2638,39 +2410,39 @@ class FeedbackBox extends Component { } sendFeedback() { if (!this.state.type) { - this.setState({alertmsg: Sefaria._("Please select a feedback type")}); + this.setState({ alertmsg: Sefaria._("Please select a feedback type") }); return } if (!Sefaria._uid && !this.validateEmail($("#feedbackEmail").val())) { - this.setState({alertmsg: Sefaria._("Please enter a valid email address")}); + this.setState({ alertmsg: Sefaria._("Please enter a valid email address") }); return } let feedback = { - refs: this.props.srefs || null, - type: this.state.type, - url: this.props.url || null, - currVersions: this.props.currVersions, - email: $("#feedbackEmail").val() || null, - msg: $("#feedbackText").val(), - uid: Sefaria._uid || null + refs: this.props.srefs || null, + type: this.state.type, + url: this.props.url || null, + currVersions: this.props.currVersions, + email: $("#feedbackEmail").val() || null, + msg: $("#feedbackText").val(), + uid: Sefaria._uid || null }; - let postData = {json: JSON.stringify(feedback)}; + let postData = { json: JSON.stringify(feedback) }; const url = "/api/send_feedback"; - this.setState({feedbackSent: true}); + this.setState({ feedbackSent: true }); $.post(url, postData, function (data) { - if (data.error) { - alert(data.error); - } else { - console.log(data); - Sefaria.track.event("Tools", "Send Feedback", this.props.url); - } + if (data.error) { + alert(data.error); + } else { + console.log(data); + Sefaria.track.event("Tools", "Send Feedback", this.props.url); + } }.bind(this)).fail(function (xhr, textStatus, errorThrown) { - alert(Sefaria._("Unfortunately, there was an error sending this feedback. Please try again or try reloading this page.")); - this.setState({feedbackSent: true}); + alert(Sefaria._("Unfortunately, there was an error sending this feedback. Please try again or try reloading this page.")); + this.setState({ feedbackSent: true }); }); } validateEmail(email) { @@ -2678,56 +2450,56 @@ class FeedbackBox extends Component { return re.test(email); } setType(event) { - this.setState({type: event.target.value}); + this.setState({ type: event.target.value }); } render() { if (this.state.feedbackSent) { - return ( -
-

Feedback sent!

-

משוב נשלח!

-
- ) + return ( +
+

Feedback sent!

+

משוב נשלח!

+
+ ) } return ( -
-

Have some feedback? We would love to hear it.

-

אנחנו מעוניינים במשוב ממך

- - {this.state.alertmsg ? -
-

{this.state.alertmsg}

-

{this.state.alertmsg}

-
- : null - } +
+

Have some feedback? We would love to hear it.

+

אנחנו מעוניינים במשוב ממך

+ + {this.state.alertmsg ? +
+

{this.state.alertmsg}

+

{this.state.alertmsg}

+
+ : null + } - + - + - {!Sefaria._uid ? -
- : null } + {!Sefaria._uid ? +
+ : null} -
this.sendFeedback()}> - Submit - שליחה -
+
this.sendFeedback()}> + Submit + שליחה
+
); } } @@ -2737,13 +2509,13 @@ class ReaderMessage extends Component { // Component for determining user feedback on new element constructor(props) { super(props) - var showNotification = Sefaria._inBrowser && !document.cookie.includes(this.props.messageName+"Accepted"); - this.state = {showNotification: showNotification}; + var showNotification = Sefaria._inBrowser && !document.cookie.includes(this.props.messageName + "Accepted"); + this.state = { showNotification: showNotification }; } setFeedback(status) { - Sefaria.track.uiFeedback(this.props.messageName+"Accepted", status); - $.cookie((this.props.messageName+"Accepted"), 1, {path: "/"}); - this.setState({showNotification: false}); + Sefaria.track.uiFeedback(this.props.messageName + "Accepted", status); + $.cookie((this.props.messageName + "Accepted"), 1, { path: "/" }); + this.setState({ showNotification: false }); } render() { if (!this.state.showNotification) { return null; } @@ -2770,35 +2542,35 @@ class CookiesNotification extends Component { super(props); const showNotification = /*!Sefaria._debug && */Sefaria._inBrowser && !document.cookie.includes("cookiesNotificationAccepted"); - this.state = {showNotification: showNotification}; + this.state = { showNotification: showNotification }; } setCookie() { - $.cookie("cookiesNotificationAccepted", 1, {path: "/", expires: 20*365}); - this.setState({showNotification: false}); + $.cookie("cookiesNotificationAccepted", 1, { path: "/", expires: 20 * 365 }); + this.setState({ showNotification: false }); } render() { if (!this.state.showNotification) { return null; } return (
- - We use cookies to give you the best experience possible on our site. Click OK to continue using Sefaria. Learn More. - OK - - - אנחנו משתמשים ב"עוגיות" כדי לתת למשתמשים את חוויית השימוש הטובה ביותר. - קראו עוד בנושא - - לחצו כאן לאישור + + We use cookies to give you the best experience possible on our site. Click OK to continue using Sefaria. Learn More. + OK + + + אנחנו משתמשים ב"עוגיות" כדי לתת למשתמשים את חוויית השימוש הטובה ביותר. + קראו עוד בנושא + לחצו כאן לאישור + -
+
); } } -const CommunityPagePreviewControls = ({date}) => { +const CommunityPagePreviewControls = ({ date }) => { const dateStr = (date, offset) => { const d = new Date(date); @@ -2845,9 +2617,9 @@ const SheetTitle = (props) => ( contentEditable={props.editable} suppressContentEditableWarning={true} onBlur={props.editable ? props.blurCallback : null} - style={{"direction": Sefaria.hebrew.isHebrew(props.title.stripHtml()) ? "rtl" :"ltr"}} + style={{ "direction": Sefaria.hebrew.isHebrew(props.title.stripHtml()) ? "rtl" : "ltr" }} > - {props.title ? props.title.stripHtmlConvertLineBreaks() : ""} + {props.title ? props.title.stripHtmlConvertLineBreaks() : ""} ); SheetTitle.propTypes = { @@ -2861,18 +2633,18 @@ const SheetAuthorStatement = (props) => (
); SheetAuthorStatement.propTypes = { - authorImage: PropTypes.string, - authorStatement: PropTypes.string, - authorUrl: PropTypes.string, + authorImage: PropTypes.string, + authorStatement: PropTypes.string, + authorUrl: PropTypes.string, }; -const CollectionStatement = ({name, slug, image, children}) => ( +const CollectionStatement = ({ name, slug, image, children }) => ( slug ?
{children ? children : name} @@ -2883,36 +2655,36 @@ const CollectionStatement = ({name, slug, image, children}) => (
); -const AdminToolHeader = function({title, validate, close}) { +const AdminToolHeader = function ({ title, validate, close }) { /* Save and Cancel buttons with a header using the `title` text. Save button calls 'validate' and cancel button calls 'close'. */ - return
-

- {title} -

-
- - Cancel - -
- Save -
-
-
+ return
+

+ {title} +

+
+ + Cancel + +
+ Save +
+
+
} -const CategoryChooser = function({categories, update}) { +const CategoryChooser = function ({ categories, update }) { /* Allows user to start from the top of the TOC and select a precise path through the category TOC using option menus. 'categories' is initial list of categories specifying a path and 'update' is called with new categories after the user changes selection */ const categoryMenu = useRef(); - const handleChange = function(e) { + const handleChange = function (e) { let newCategories = []; - for (let i=0; i 0 && categories[0] === child.category) { - return ; + return ; } else { - return + return } }); menus.push(options); //now add to menu second and/or third level categories found in categories - for (let i=0; i x.hasOwnProperty("category")); //Indices have 'categories' field and Categories have 'category' field which is their lastPath - for (let j=0; j= i && categories[i+1] === subcats[j].category; + for (let j = 0; j < subcats.length; j++) { + const selected = categories.length >= i && categories[i + 1] === subcats[j].category; options.push(); } if (options.length > 0) { @@ -2952,55 +2724,50 @@ const CategoryChooser = function({categories, update}) { } } return
- {menus.map((menu, index) => -
- -
)} -
+ {menus.map((menu, index) => +
+ +
)} +
} -const TitleVariants = function({titles, update, options}) { +const TitleVariants = function ({ titles, update, options }) { /* - Wrapper for ReactTags component. `titles` is initial list of objects to populate ReactTags component. - each item in `titles` should have an 'id' and 'name' field and can have others as well + Wrapper for ReactTags component. `titles` is initial list of strings to populate ReactTags component and `update` is method to call after deleting or adding to titles. `options` is an object that can have the fields `onTitleDelete`, `onTitleAddition`, and `onTitleValidate` allowing overloading of TitleVariant's methods */ - if (titles.length > 0 && typeof titles[0] === 'string') { // normalize titles - titles = titles.map((item, i) => ({["name"]: item, ["id"]: i})); - } - const onTitleDelete = function(i) { + const onTitleDelete = function (i) { const newTitles = titles.filter(t => t !== titles[i]); update(newTitles); } - const onTitleAddition = function(title) { - title.id = Math.max(titles.map(x => x.id)) + 1; // assign unique id + const onTitleAddition = function (title) { const newTitles = [].concat(titles, title); update(newTitles); } const onTitleValidate = function (title) { const validTitle = titles.every((item) => item.name !== title.name); if (!validTitle) { - alert(title.name+" already exists."); + alert(title.name + " already exists."); } return validTitle; } return
- -
+ +
} const SheetMetaDataBox = (props) => ( @@ -3009,29 +2776,29 @@ const SheetMetaDataBox = (props) => (
); -const DivineNameReplacer = ({setDivineNameReplacement, divineNameReplacement}) => { +const DivineNameReplacer = ({ setDivineNameReplacement, divineNameReplacement }) => { return ( -
-

Select how you would like to display the divine name in this sheet:

- - setDivineNameReplacement((e.target.value))} - preselected={divineNameReplacement} - /> -
+
+

Select how you would like to display the divine name in this sheet:

+ + setDivineNameReplacement((e.target.value))} + preselected={divineNameReplacement} + /> +
) } -const Autocompleter = ({getSuggestions, showSuggestionsOnSelect, inputPlaceholder, inputValue, changeInputValue, selectedCallback, - buttonTitle, autocompleteClassNames }) => { +const Autocompleter = ({ getSuggestions, showSuggestionsOnSelect, inputPlaceholder, inputValue, changeInputValue, selectedCallback, + buttonTitle, autocompleteClassNames }) => { /* Autocompleter component used in AddInterfaceInput and TopicSearch components. Component contains an input box, a select menu that shows autcomplete suggestions, and a button. To submit an autocomplete suggestion, user can press enter in the input box, or click on the button. @@ -3048,10 +2815,10 @@ const Autocompleter = ({getSuggestions, showSuggestionsOnSelect, inputPlaceholde const [helperPromptText, setHelperPromptText] = useState(null); const [showAddButton, setShowAddButton] = useState(false); const [showCurrentSuggestions, setShowCurrentSuggestions] = useState(true); - const [inputClassNames, setInputClassNames] = useState(classNames({selected: 0})); + const [inputClassNames, setInputClassNames] = useState(classNames({ selected: 0 })); const suggestionEl = useRef(null); const inputEl = useRef(null); - const buttonClassNames = classNames({button: 1, small: 1}); + const buttonClassNames = classNames({ button: 1, small: 1 }); const getWidthOfInput = () => { //Create a temporary div w/ all of the same styles as the input since we can't measure the input @@ -3060,10 +2827,10 @@ const Autocompleter = ({getSuggestions, showSuggestionsOnSelect, inputPlaceholde const styles = window.getComputedStyle(inputEl); //Reduce function required b/c cssText returns "" on Firefox const cssText = Object.values(styles).reduce( - (css, propertyName) => - `${css}${propertyName}:${styles.getPropertyValue( - propertyName - )};` + (css, propertyName) => + `${css}${propertyName}:${styles.getPropertyValue( + propertyName + )};` ); tmp.style.cssText = cssText @@ -3082,14 +2849,14 @@ const Autocompleter = ({getSuggestions, showSuggestionsOnSelect, inputPlaceholde useEffect( () => { - const element = document.querySelector('.textPreviewSegment.highlight'); - if (element) {element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' })} + const element = document.querySelector('.textPreviewSegment.highlight'); + if (element) { element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' }) } }, [previewText] ) const resizeInputIfNeeded = () => { const currentWidth = getWidthOfInput(); - if (currentWidth > 350) {document.querySelector('.addInterfaceInput input').style.width = `${currentWidth+20}px`} + if (currentWidth > 350) { document.querySelector('.addInterfaceInput input').style.width = `${currentWidth + 20}px` } } const processSuggestions = (resultsPromise) => { @@ -3107,47 +2874,47 @@ const Autocompleter = ({getSuggestions, showSuggestionsOnSelect, inputPlaceholde } const onChange = (input) => { - setInputClassNames(classNames({selected: 0})); + setInputClassNames(classNames({ selected: 0 })); setShowCurrentSuggestions(true); processSuggestions(getSuggestions(input)); resizeInputIfNeeded(); } const handleOnClickSuggestion = (title) => { - changeInputValue(title); - setShowCurrentSuggestions(showSuggestionsOnSelect); - if (showSuggestionsOnSelect) { - processSuggestions(getSuggestions(title)); - } - setInputClassNames(classNames({selected: 1})); - resizeInputIfNeeded(); - inputEl.current.focus(); + changeInputValue(title); + setShowCurrentSuggestions(showSuggestionsOnSelect); + if (showSuggestionsOnSelect) { + processSuggestions(getSuggestions(title)); + } + setInputClassNames(classNames({ selected: 1 })); + resizeInputIfNeeded(); + inputEl.current.focus(); } - const Suggestion = ({title, color}) => { - return() + const Suggestion = ({ title, color }) => { + return () } const mapSuggestions = (suggestions) => { const div = suggestions.map((suggestion, index) => ( - () + () )) - return(div) + return (div) } const handleSelection = () => { @@ -3165,120 +2932,91 @@ const Autocompleter = ({getSuggestions, showSuggestionsOnSelect, inputPlaceholde suggestionEl.current.focus(); (suggestionEl.current).firstChild.selected = 'selected'; } - else - { + else { changeInputValue(inputEl.current.value); } } const generatePreviewText = (ref) => { - Sefaria.getText(ref, {context:1, stripItags: 1}).then(text => { - let segments = Sefaria.makeSegments(text, true); - segments = Sefaria.stripImagesFromSegments(segments); - const previewHTML = segments.map((segment, i) => { - { - const heOnly = !segment.en; - const enOnly = !segment.he; - const overrideLanguage = (enOnly || heOnly) ? (heOnly ? "hebrew" : "english") : null; - - return( -
- -
- ) - } - }) - setPreviewText(previewHTML); - }) + Sefaria.getText(ref, { context: 1, stripItags: 1 }).then(text => { + const segments = Sefaria.makeSegments(text, true); + const previewHTML = segments.map((segment, i) => { + { + const heOnly = !segment.en; + const enOnly = !segment.he; + const overrideLanguage = (enOnly || heOnly) ? (heOnly ? "hebrew" : "english") : null; + + return ( +
+ +
+ ) + } + }) + setPreviewText(previewHTML); + }) } - const checkEnterOnSelect = (e) => { - if (e.key === 'Enter') { - handleOnClickSuggestion(e.target.value); - } + const checkEnterOnSelect = (e) => { + if (e.key === 'Enter') { + handleOnClickSuggestion(e.target.value); } + } - return( -
{e.stopPropagation()}} title={Sefaria._(buttonTitle)}> + return ( +
{ e.stopPropagation() }} title={Sefaria._(buttonTitle)}> onKeyDown(e)} - onClick={(e) => {e.stopPropagation()}} - onChange={(e) => onChange(e.target.value)} - onBlur={(e) => setPreviewText(null) } - value={inputValue} - ref={inputEl} - className={inputClassNames} + type="text" + placeholder={Sefaria._(inputPlaceholder)} + onKeyDown={(e) => onKeyDown(e)} + onClick={(e) => { e.stopPropagation() }} + onChange={(e) => onChange(e.target.value)} + onBlur={(e) => setPreviewText(null)} + value={inputValue} + ref={inputEl} + className={inputClassNames} />{helperPromptText} {showAddButton ? : null} + handleSelection(inputValue, currentSuggestions) + }}>{buttonTitle} : null} {showCurrentSuggestions && currentSuggestions && currentSuggestions.length > 0 ? -
+
-
- : null +
+ : null } {previewText ? -
-
-
{previewText}
-
+
+
+
{previewText}
+
- : null + : null }
- ) -} - -const ImageWithCaption = ({photoLink, caption }) => { - - return ( -
- -
- -
-
); + ) } - -const AppStoreButton = ({ platform, href, altText }) => { - const isIOS = platform === 'ios'; - const aClasses = classNames({button: 1, small: 1, white: 1, appButton: 1, ios: isIOS}); - const iconSrc = `/static/icons/${isIOS ? 'ios' : 'android'}.svg`; - const text = isIOS ? 'iOS' : 'Android'; - return ( - - {altText} - {text} - - ); -}; - - export { - AppStoreButton, CategoryHeader, SimpleInterfaceBlock, DangerousInterfaceBlock, @@ -3300,8 +3038,8 @@ export { FollowButton, GlobalWarningMessage, InterruptingMessage, - Banner, InterfaceText, + ContentText, EnglishText, HebrewText, CommunityPagePreviewControls, @@ -3311,6 +3049,7 @@ export { LoadingRing, LoginPrompt, NBox, + NewsletterSignUpForm, Note, ProfileListing, ProfilePic, @@ -3340,8 +3079,5 @@ export { AdminToolHeader, CategoryChooser, TitleVariants, - requestWithCallBack, - OnInView, - TopicPictureUploader, - ImageWithCaption -}; + requestWithCallBack +}; \ No newline at end of file diff --git a/static/js/TextsPage.jsx b/static/js/TextsPage.jsx index c6916a75fc..5507a8e408 100644 --- a/static/js/TextsPage.jsx +++ b/static/js/TextsPage.jsx @@ -1,11 +1,11 @@ import React, { useState, useEffect, useRef } from 'react'; -import PropTypes from 'prop-types'; -import classNames from 'classnames'; -import Sefaria from './sefaria/sefaria'; -import $ from './sefaria/sefariaJquery'; +import PropTypes from 'prop-types'; +import classNames from 'classnames'; +import Sefaria from './sefaria/sefaria'; +import $ from './sefaria/sefariaJquery'; import { NavSidebar, Modules } from './NavSidebar'; -import TextCategoryPage from './TextCategoryPage'; -import Footer from './Footer'; +import TextCategoryPage from './TextCategoryPage'; +import Footer from './Footer'; import ComparePanelHeader from './ComparePanelHeader'; import { TextBlockLink, @@ -14,13 +14,13 @@ import { ResponsiveNBox, LanguageToggleButton, InterfaceText, + ContentText, CategoryHeader } from './Misc'; -import {ContentText} from "./ContentText"; -const TextsPage = ({categories, settings, setCategories, onCompareBack, openSearch, - toggleLanguage, openTextTOC, openDisplaySettings, multiPanel, initialWidth, compare}) => { +const TextsPage = ({ categories, settings, setCategories, onCompareBack, openSearch, + toggleLanguage, openTextTOC, openDisplaySettings, multiPanel, initialWidth, compare }) => { // List of Texts in a Category if (categories.length) { return ( @@ -41,16 +41,16 @@ const TextsPage = ({categories, settings, setCategories, onCompareBack, openSear // Root Library Menu let categoryListings = Sefaria.toc.map(cat => { - const style = {"borderColor": Sefaria.palette.categoryColor(cat.category)}; - const openCat = e => {e.preventDefault(); setCategories([cat.category])}; + const style = { "borderColor": Sefaria.palette.categoryColor(cat.category) }; + const openCat = e => { e.preventDefault(); setCategories([cat.category]) }; return (
- +
- +
); @@ -79,36 +79,36 @@ const TextsPage = ({categories, settings, setCategories, onCompareBack, openSear
const about = compare || multiPanel ? null : - ; + ; const dedication = Sefaria._siteSettings.TORAH_SPECIFIC && !compare ? : null; const libraryMessage = Sefaria._siteSettings.LIBRARY_MESSAGE && !compare ? -
+
: null; const sidebarModules = [ - multiPanel ? {type: "AboutSefaria"} : {type: null}, - {type: "Promo"}, - {type: "Translations"}, - {type: "LearningSchedules"}, - {type: "JoinTheCommunity"}, - {type: "Resources"}, + multiPanel ? { type: "AboutSefaria" } : { type: null }, + // {type: "Promo"}, + // {type: "Translations"}, + // {type: "LearningSchedules"}, + // {type: "JoinTheCommunity"}, + // {type: "Resources"}, ]; const footer = compare ? null :