From ddf8c9c5c61fcbb31c7ef63aee8421ffc40beff7 Mon Sep 17 00:00:00 2001 From: Paul Spain Date: Sat, 23 Dec 2023 06:03:58 +1100 Subject: [PATCH] Remove webpack and unused packages; improve docs; work on github actions (#51) * Merge remote-tracking branch 'nas/main' into old-head - Remove webpack and substituted vite for remaining actions. - Remove all unused devDependencies packages - Update main.yml to deploy dev/ demo to GitHub Pages. - Update main.yml to use GitHub official actions. - Add MacOS bootstrap script to fetch and build all tools and crosswords-js package, run dev/ demo, then cleanup on vanilla MacBook. modified: .eslintrc.yml Remove webpack ref modified: .github/workflows/main.yml Deploy demo site from dev/ Switch to github official actions for uploading artifacts and deploying to Pages modified: .gitignore Ignore rebase artifacts new file: bin/demo-macos.sh Bootstrap MacOS tools and packages, run dev/demo, then cleanup. modified: cspell.json more words modified: README.md Quickstart reference changed to package pulled from hub (npmjs.com) modified: dist/crosswords.css modified: dist/crosswords.js new file: dist/crosswords.umd.cjs Rebuilt via 'npm build' modified: package-lock.json Rebult via 'npm ci' modified: package.json Switch from yaml -> js-yaml Removed webpack Removed unused packages (determined by 'npx depcheck') modified: src/cell-map.mjs modified: src/crossword-controller.mjs Update location of newCellElement() in comments modified: src/crossword-model.mjs Change from yaml -> js-yaml renamed: dev/crosswords.js -> src/crosswords.js Add ../style/crosswords.less import to get vite to transpile src/crosswords.less -> dist/crosswords.css deleted: src/index.mjs src/crosswords.js contains package exports modified: test/crossword-model.specs.mjs Add bletchley to tested crosswords Refactor test on return value from newCrosswordModel() - null on failure, and model object otherwise deleted: test/index.specs.mjs TODO: replace with tests on src/crosswords.js new file: vite.config.js Setup config for package 'build' action Add 'rollupOptions' hack to rename css file generated in src/crosswords.js deleted: webpack.config.js deleted: jsconfig.json deleted: pull-request.config Unused deleted: makefile Unused now. Using dev/ demo for dwmkerr.github.io modified: style/crosswords.less modified: dev/index.html modified: dev/index.js nfc * chore: correct all contributors config (#46) * build: deploy demo site on all builds to main * docs: Update README.md * refactor: improve styling code * more css vars * don't apply variables to :root * dist * :root out another * dist * fix merge conflicts more properly * dist * doc * disst * typo + docs + less calc * update dist again * Move docs to existing styling doc file * add + use clue-label-width * forgot dist again * point to styling doc from root readme --------- Co-authored-by: Misha Kaletsky * docs: add mmkal as a contributor for code, doc, and review (#49) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] --------- Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * Extract git hook script from README.md and add package "qa:install" action - adding production assets build as suggested by @mmkal Use github's deploy pages action in main.yml README work on QA and workflow advice Add MacOS environment scripts new file: .githook-pre-commit Extract script from README.md Add steps to build and stage distribution assets modified: .github/workflows/main.yml Add new Node LTS version (20.x) Use github's deploy pages action (actions/deploy-pages@v2) modified: .github/workflows/pull-request.yml Remove hardcoded ubuntu version Add new Node LTS version (20.x) modified: README.md Move documentation section to top of file De-nest sections under Quickstart Re-do "Setting up your dev environment" - add section on triangular workflow - specific bootstrap instructions for Linux/MacOS/Windows Re-do "Quality assurance" - Change pre-commit heredoc to action "qa:install" - Reference production assets building under "Manual checks" renamed: bin/bootstrap-linux.sh -> bin/bootstrap-posixish.sh Combine instructions for Linux/MacOS modified: bin/demo-macos.sh Repoint repo refs to dwmkerr new file: bin/install-githook.sh Add script to install QA hooks - used by action "qa:install" modified: bin/update-package.sh Add "npm ci" step modified: cspell.json More words modified: dev/index.js Fxup script location modified: dev/index.less nfc modified: dist/crosswords.css modified: dist/crosswords.js modified: dist/crosswords.umd.cjs Re-built modified: docs/crossword-styling.md Add script location for usage of --row-count, --column-count Add note for vite generation of CSS assets modified: package-lock.json Updated modified: package.json Switch yaml -> to js-yaml Change build action - vite replaces lessc call Change action - dev:prod -> dev:preview Add action qa:install to install git hook Drop action start:angular - broken; moving to separate repo modified: pull-request-config.sh Add vars for merge rollback location - process now includes fast-forward commits for simpler commit chains modified: src/crossword-cluesview.mjs modified: src/crossword-gridview.mjs Replace multiple addClass() calls with an addClasses() call modified: src/crossword-model.mjs Switch from yaml -> js-yaml modified: style/crosswords.less Resolve lint warnings - duplicate rules Sort cell sections to match layering order in DOM Amalgamate partial sections for same-names modified: style/cwdimensions.less Add code location for JS usage of --row-count, --column-count * Fixes for GitHub Pages deployment. modified: .github/workflows/main.yml More work on GH Pages deploy modified: README.md Fix quickstart example to use "installed" crosswords-json Remove references to Angular sample Change 'pipeline' to 'workflow' renamed: bin/bootstrap-posixish.sh -> bin/bootstrap-posix-ish.sh Add dnf package manager Fix package action reference to "qa:install" new file: bin/build-dev.sh Add script for "dev:build" action Setup website folder structure for upload to GH Pages modified: cspell.json More words modified: package.json Change "dev:build" action to run new script "bin/build-dev.sh" * Improve colour contrast for @highlight-color * Add styles for for grid text colours modified: dev/index.less modified: dist/crosswords.css modified: style/crosswords.less modified: style/cwcolors.less * Accessible colors. CSP. modified: cspell.json modified: dev/index.html modified: dev/index.less modified: style/crosswords.less --------- Co-authored-by: Dave Kerr Co-authored-by: Misha Kaletsky <15040698+mmkal@users.noreply.github.com> Co-authored-by: Misha Kaletsky Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> --- .githook-pre-commit | 15 + .github/workflows/main.yml | 95 +- .github/workflows/pull-request.yml | 5 +- .gitignore | 6 +- README.md | 166 +- ...tstrap-linux.sh => bootstrap-posix-ish.sh} | 48 +- bin/build-dev.sh | 20 + bin/demo-macos.sh | 144 + bin/install-githook.sh | 19 + bin/update-package.sh | 1 + cspell.json | 8 + dev/index.html | 9 +- dev/index.js | 2 +- dev/index.less | 48 +- dist/crosswords.css | 180 +- dist/crosswords.js | 3582 ++++++++++++----- dist/crosswords.umd.cjs | 36 + docs/crossword-styling.md | 7 +- jsconfig.json | 12 - makefile | 23 - package-lock.json | 3488 ++-------------- package.json | 23 +- pull-request-config.sh | 21 +- pull-request.config | 25 - src/cell-map.mjs | 2 +- src/crossword-cluesview.mjs | 11 +- src/crossword-controller.mjs | 6 +- src/crossword-gridview.mjs | 3 +- src/crossword-model.mjs | 4 +- {dev => src}/crosswords.js | 11 +- src/index.mjs | 15 - style/crosswords.less | 58 +- style/cwcolors.less | 2 + style/cwdimensions.less | 7 +- test/crossword-model.specs.mjs | 9 +- test/index.specs.mjs | 12 - vite.config.js | 26 + webpack.config.js | 47 - 38 files changed, 3684 insertions(+), 4512 deletions(-) create mode 100644 .githook-pre-commit rename bin/{bootstrap-linux.sh => bootstrap-posix-ish.sh} (54%) create mode 100755 bin/build-dev.sh create mode 100755 bin/demo-macos.sh create mode 100755 bin/install-githook.sh create mode 100644 dist/crosswords.umd.cjs delete mode 100644 jsconfig.json delete mode 100644 makefile delete mode 100644 pull-request.config rename {dev => src}/crosswords.js (80%) delete mode 100644 src/index.mjs delete mode 100644 test/index.specs.mjs create mode 100644 vite.config.js delete mode 100644 webpack.config.js diff --git a/.githook-pre-commit b/.githook-pre-commit new file mode 100644 index 0000000..5490da7 --- /dev/null +++ b/.githook-pre-commit @@ -0,0 +1,15 @@ +#! /usr/bin/env bash + +# Assuming npm managed via nvm +export PATH=$PATH:$NVM_BIN +# Spellchecker +npm run spell && +# Formatting +npm run prettier:fix && +# Linting and formatting JS +npm run lint:fix && +npm run test && +# Compile production assets +npm run build && +# Add production assets to git index +git add dist/ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a889d9b..cc0663a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,13 +20,15 @@ env: jobs: validate-main: - runs-on: ubuntu-20.04 + # https://github.com/actions/runner-images#available-images + runs-on: ubuntu-latest strategy: matrix: node-version: - 16.x - 18.x + - 20.x steps: - name: Checkout @@ -55,30 +57,21 @@ jobs: - name: test run: npm run test:cov - # Upload the artifacts folder. - - name: Upload Artifacts - uses: actions/upload-artifact@v3 - with: - name: build-artifacts - path: | - ./artifacts/ - # Only upload artifacts for the build on the LTS version (we don't - # need artifacts per node version). - if: ${{ matrix.node-version == env.NODE_LTS_VERSION }} - upload-coverage: # The 'upload coverage' job will only run if successfully complete the # 'validate-main' job. needs: validate-main - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - # Download the build artifacts. - - name: Download Artifacts - uses: actions/download-artifact@v3 + # Upload the build artifacts. + - name: Upload coverage artifacts + # https://github.com/actions/upload-artifact + uses: actions/upload-artifact@v3 with: name: build-artifacts + # Created by npm run test:cov path: ./artifacts # Upload coverage. @@ -87,47 +80,23 @@ jobs: with: directory: ./artifacts/coverage - deploy-demo-site: - # The 'deploy demo site' job will only run if successfully complete the - # 'validate-main' job. - needs: validate-main - - runs-on: ubuntu-20.04 - - steps: - - name: Checkout - uses: actions/checkout@v3 - - # Setup the right version of Node.js. - - name: Setup Node ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_LTS_VERSION }} - registry-url: 'https://registry.npmjs.org' - - # Fixup Git URLs, see: - # https://stackoverflow.com/questions/70663523/the-unauthenticated-git-protocol-on-port-9418-is-no-longer-supported - - name: Fix up git URLs - run: echo -e '[url "https://github.com/"]\n insteadOf = "git://github.com/"' >> ~/.gitconfig - - # Build the demo site. - - name: Build Demo Site - run: | - make build-sample-site - - # Publish the demo site to GitHub pages. - - name: Publish Demo Site to GitHub Pages - uses: JamesIves/github-pages-deploy-action@releases/v4 - with: - folder: artifacts/sample-site - release-please: # The 'release please' job will only run if successfully complete the # 'validate-main' job. The deployment steps only occur if this is a release # merge. needs: validate-main - runs-on: ubuntu-20.04 + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest steps: - name: Release Please @@ -169,15 +138,19 @@ jobs: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} if: ${{ steps.release.outputs.release_created }} - # Build the demo site. - - name: Build Demo Site - run: | - make build-sample-site - if: ${{ steps.release.outputs.release_created }} + # Build and upload the demo application. - # Publish the demo site to GitHub pages. - - name: Publish Demo Site to GitHub Pages - uses: JamesIves/github-pages-deploy-action@releases/v4 + - name: Build demo application + run: npm run dev:build + - name: Upload demo artifacts + # https://github.com/actions/upload-pages-artifact + uses: actions/upload-pages-artifact@v2 with: - folder: artifacts/sample-site - if: ${{ steps.release.outputs.release_created }} + # Created by npm run dev:prod + path: dev/dist/ + # Publish the demo (from "Upload demo artifacts") to GitHub pages. + - name: Deploy to GitHub Pages + id: deployment + # https://github.com/actions/deploy-pages + uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action + diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ba64e93..58bf739 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -5,13 +5,14 @@ on: [pull_request] jobs: validate-pull-request: - runs-on: ubuntu-20.04 - + # https://github.com/actions/runner-images#available-images + runs-on: ubuntu-latest strategy: matrix: node-version: - 16.x - 18.x + - 20.x steps: - name: Checkout diff --git a/.gitignore b/.gitignore index 123e16c..6414447 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,8 @@ dev/dist/ # Rebase artefacts git-rebase-todo* -rebase*.log +*.log +*.reflog + +# VS Code CLI - enable remote tunnels +code diff --git a/README.md b/README.md index 813c5a2..c566b1c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # crosswords-js + [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-) + [![Release Please][3]][4] @@ -27,19 +29,21 @@ Demo: [dwmkerr.github.io/crosswords-js/][9] +- [Documentation](#documentation) - [Quickstart](#quickstart) - - [Application Programming Interface (API)](#application-programming-interface-api) - - [Styling](#styling) - - [Sample applications](#sample-applications) +- [Application Programming Interface (API)](#application-programming-interface-api) +- [Styling](#styling) +- [Sample applications](#sample-applications) - [Contributor guide](#contributor-guide) - [Setting up your dev environment](#setting-up-your-dev-environment) - - [1a. If you are in a Linux environment...](#1a-if-you-are-in-a-linux-environment) - - [1b. If you are NOT in a Linux environment...](#1b-if-you-are-not-in-a-linux-environment) + - [1a. Linux, MacOS](#1a-linux-macos) + - [1b. Windows](#1b-windows) + - [1c. Manual setup](#1c-manual-setup) - [2. Once you've started the development server](#2-once-youve-started-the-development-server) - [Maintaining your dev environment](#maintaining-your-dev-environment) - - [Documentation](#documentation) - [Quality assurance](#quality-assurance) - - [Building the dev environment assets for production](#building-the-dev-environment-assets-for-production) + - [Manual checks](#manual-checks) + - [Building the _dev environment_ assets for production](#building-the-dev-environment-assets-for-production) - [Keyboard functionality](#keyboard-functionality) - [Crossword definition tips](#crossword-definition-tips) - [1. How do I create a clue which spans multiple parts of a crossword? (multi-segment clue)](#1-how-do-i-create-a-clue-which-spans-multiple-parts-of-a-crossword-multi-segment-clue) @@ -47,9 +51,9 @@ Demo: [dwmkerr.github.io/crosswords-js/][9] - [3. How do I handle different grid sizes?](#3-how-do-i-handle-different-grid-sizes) - [Design overview](#design-overview) - [Design goals](#design-goals) -- [Build pipelines](#build-pipelines) - - [Pull-request pipeline](#pull-request-pipeline) - - [Release pipeline](#release-pipeline) +- [Build workflows](#build-workflows) + - [Pull-request workflow](#pull-request-workflow) + - [Main workflow](#main-workflow) - [Adding contributors](#adding-contributors) - [Managing releases](#managing-releases) - [Contributors](#contributors) @@ -57,6 +61,12 @@ Demo: [dwmkerr.github.io/crosswords-js/][9] +## Documentation + +The project documentation is written in [Markdown][27] and is located in the repository at [`./docs`][61]. + +- [Documentation index][41] + ## Quickstart 1. Install the package: @@ -115,8 +125,8 @@ Demo: [dwmkerr.github.io/crosswords-js/][9] 4. In your JavaScript code, load the **crosswords-js** package and a _CrosswordDefinition_: ```js - import { compileCrossword, newCrosswordController } from './crosswords.js'; - import crosswordDefinition from './crosswords/ftimes_17095.json'; + import { compileCrossword, newCrosswordController } from 'crosswords-js'; + import crosswordDefinition from 'node_modules/crosswords-js/data/ftimes_17095.json'; ``` 5. Now get the [DOM][20] elements which will be the parents for the crossword grid and clues blocks: @@ -149,7 +159,7 @@ Demo: [dwmkerr.github.io/crosswords-js/][9] This binds the crossword **gridView** anf **cluesView** into the webpage [DOM][20]. -### Application Programming Interface (API) +## Application Programming Interface (API) You can use the `controller` to programmatically manipulate the **gridView** - the crossword grid [DOM][20] element. @@ -190,7 +200,7 @@ You can use the `controller` to programmatically manipulate the **gridView** - t controller.bindEventHandlersToIds(); // Bind the user event handlers to ALL elements with - // the given class(es), passing an array of one class name + // the given class(es), passing an array of one or more class names controller.bindEventHandlersToClass(["reset-clue"]); ``` @@ -200,11 +210,11 @@ For further information on these topics, consult the [module API][30] documentat For examples, refer to the [development server code][31]. -### Styling +## Styling The library ships with some simple default styles out of the box, but aims to be easily customisable. See [`crossword-styling.md`][35] for details. -### Sample applications +## Sample applications The _development server_ is a pure [Node.js][32] application of the the **crosswords-js** package. It exercises nearly all the available functionality. The code is found in the [dev][33] directory of this repository. @@ -213,32 +223,42 @@ The _development server_ is a pure [Node.js][32] application of the the **crossw npm start ``` -You can find an **Angular** application in the [sample][34] directory of this repository. To run the application: - -```bash -# Run the Angular sample app -# Open the app on http://localhost:8080 -npm run start:angular -``` - ## Contributor guide ### Setting up your dev environment -#### 1a. If you are in a Linux environment... +> We **strongly** recommend you follow the popular ["triangular" workflow][63], as recommended by GitHub, when working on this project. It aids collaboration by: +> +> - producing simple, linear commit sequences for pull-requests, and +> - easily incorporating changes in the upstream repo. -Check out the code, then: +#### 1a. Linux, MacOS + +Check out the code and open the repository root directory... + +```bash +git clone https://github.com/dwmkerr/crosswords-js.git && +cd crosswords-js +``` + +then... ```bash # From the repository root, bootstrap the package and all tools -bin/bootstrap-linux.sh +bin/bootstrap-posix-ish.sh # Open the development server npm start ``` -#### 1b. If you are NOT in a Linux environment... +#### 1b. Windows -Ensure you are using Node LTS. I recommend using [Node Version Manager][10] for this: +If you are running a [modern version of Windows][58], you can add a Linux distro to your computer using [WSL][57] and then follow the Linux instructions [above][59]. + +#### 1c. Manual setup + +If the script above failed or doesn't suit your environment... + +1. Ensure you are using Node LTS. We recommend using [Node Version Manager][10] to make it easier to keep up to date: ```bash # Install/update node to latest long-term-support (LTS) version, and install/update npm to latest version. @@ -246,9 +266,16 @@ nvm install --lts --latest-npm nvm use --lts ``` -Check out the code, then, from the root directory of the repository, run: +2. Check out the code... + +```bash +git clone https://github.com/dwmkerr/crosswords-js.git +``` + +3. Open the repository root directory, install the packages, and start the development server... ```bash +cd crosswords-js # Fetch all dependent packages npm install # Start the development server @@ -273,15 +300,23 @@ If you have installed **Node Version Manager (nvm)** following the [recommended npm run update ``` -### Documentation - -The project documentation is written in [Markdown][27] and is located in the repository at [`/docs`][42]. +### Quality assurance -- [Documentation index][41] +> You can automate the manual checks [in the section below][62] on each commit to your local git repository. +> +> ```bash +> npm run qa:install +> ``` +> +> If you ever need to bypass the automated checks, stage your changes then run: +> +> ```bash +> git commit --no-verify +> ``` -### Quality assurance +#### Manual checks -1. We use [MochaJS][26] for unit testing. The test source code is located in the repository at `/test`. Run the tests with: +1. We use [MochaJS][26] for unit testing. The test source code is located in the repository at [`./test`][42]. Run the tests with: ```bash npm test @@ -316,39 +351,25 @@ The project documentation is written in [Markdown][27] and is located in the rep npm run spell:all ``` -5. To automate checks 1-4 on each commit to your local git repository, create a **pre-commit hook** in your repository. From the root directory of your repository, run these commands: +5. Ensure you build and stage the _production_ assets ```bash - cat << EOF > .git/hooks/pre-commit - #!/bin/sh - # Assuming npm managed via nvm - export PATH=\$PATH:$NVM_BIN - npm run spell && \\ - npm run prettier:fix && \\ - npm run lint:fix && \\ - npm test - EOF - chmod u+x .git/hooks/pre-commit + # Build and stage the production assets + npm run build && git add dist/ ``` -> If you ever need to bypass the automated commit checks above, stage your changes then run: -> -> ```bash -> git commit --no-verify -> ``` - 6. Please install our git **commit template**. This enables project commit guidelines to be prefixed to the standard git commit message. From the root directory of your repository: ```bash git config --local commit.template ./.git-commit-template.txt ``` -### Building the dev environment assets for production +### Building the _dev environment_ assets for production -The `dev` environment **production assets** are built by [ViteJS][28] at [`/dev/dist`][46]. The `dist` folder is created when the assets are built. +The `dev` environment **production assets** are built by [ViteJS][28] at [`dev/dist`][46]. The `dist` folder is created when the assets are built. ```bash -# Build the assets under /dev/dist +# Build the assets under dev/dist npm run dev:build ``` @@ -356,7 +377,7 @@ You can _preview_ the **production** assets by running the following command and ```bash # Build the assets and preview locally at http://locahost:4173 -npm run dev:prod +npm run dev:preview ``` ## Keyboard functionality @@ -430,11 +451,11 @@ This project is currently a work in progress. The overall design goals are: 2. This should be _accessible_, and show how to make interactive content which is inclusive and supports modern accessibility patterns. 3. This project should be _simple to use_, without requiring a lot of third party dependencies or knowledge. -## Build pipelines +## Build workflows -There are two pipelines that run for the project: +There are two workflows that run for the project: -### Pull-request pipeline +### Pull-request workflow Whenever a pull request is raised, the [Pull Request Workflow][12] is run. This will: @@ -443,18 +464,18 @@ Whenever a pull request is raised, the [Pull Request Workflow][12] is run. This - Run Tests - Upload Coverage -Each stage is run on all recent Node versions, except for the **upload coverage** stage which only runs for the Node.js LTS version. When a pull request is merged to the `main` branch, if the changes trigger a new release, then [Release Please][13] will open a Release Pull Request. When this request is merged, the [Release Pipeline][14] is run. +Each stage is run on all recent Node versions, except for the **upload coverage** stage which only runs for the Node.js LTS version. When a pull request is merged to the `main` branch, if the changes trigger a new release, then [Release Please][13] will open a Release Pull Request. When this request is merged, the [Main Workflow][14] is run. -### Release pipeline +### Main workflow -When a [Release Please][15] pull request is merged to main, the [Release Please Workflow][16] is run. This will: -Node.js +When a [Release Please][15] pull request is merged to main, the [Main Workflow][16] is run. This will: - Install dependencies - Lint - Run Tests - Upload Coverage - Deploy to NPM if the `NPM_TOKEN` secret is set +- Upload the new release to the [GitHub Pages site][9] Each stage is run on all recent Node versions, except for the **upload coverage** stage which only runs for the Node.js LTS version. @@ -474,7 +495,7 @@ More detailed documentation is available at: ## Managing releases -When changes to `main` are made, the **Release Please** stage of the pipeline will work out whether a new release should be generated (by checking if there are user facing changes) and also what the new version number should be (by checking the log of conventional commits). Once this is done, if a release is required, a new pull request is opened that will create the release. +When changes to `main` are made, the **Release Please** stage of the workflow will work out whether a new release should be generated (by checking if there are user facing changes) and also what the new version number should be (by checking the log of conventional commits). Once this is done, if a release is required, a new pull request is opened that will create the release. Force a specific release version with this command: @@ -536,7 +557,7 @@ This is a scattergun list of things to work on, once a good chunk of these have - [ ] refactor: re-theme site to a clean black and white serif style, more like a newspaper - [x] build: enforce linting (current it is allowed to fail) -[1]: https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square +[1]: https://img.shields.io/badge/all_co#1a-linuxntributors-2-orange.svg?style=flat-square [2]: #contributors- [3]: https://github.com/dwmkerr/crosswords-js/actions/workflows/main.yml/badge.svg [4]: https://github.com/dwmkerr/crosswords-js/actions/workflows/main.yml @@ -548,11 +569,10 @@ This is a scattergun list of things to work on, once a good chunk of these have [10]: https://github.com/nvm-sh/nvm [11]: http://localhost:5173/ [12]: ./.github/workflows/pull-request.yaml -[12]: ./.github/workflows/pull-request.yaml [13]: https://github.com/google-github-actions/release-please-action [14]: #release-pipeline [15]: https://github.com/google-github-actions/release-please-action -[16]: ./.github/workflows/release-please +[16]: ./.github/workflows/main.yml [17]: https://allcontributors.org/docs/en/bot/usage [18]: https://www.theguardian.com/crosswords [19]: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller @@ -572,13 +592,13 @@ This is a scattergun list of things to work on, once a good chunk of these have [33]: dev/ [34]: sample/ [35]: docs/crossword-styling.md -[36]: data/ftimes_17095.yml +[36]: data/ftimes_17095.json [37]: docs/crossword-data-structures.md#crosswordmodel [38]: docs/module-api.md#overview [39]: docs/module-api.md#user-event-handlers [40]: docs/module-api.md#published-events [41]: docs/README.md -[42]: docs/ +[42]: test/ [43]: https://eslint.org/ [44]: https://prettier.io/ [45]: https://cspell.org/ @@ -593,3 +613,9 @@ This is a scattergun list of things to work on, once a good chunk of these have [54]: docs/module-api.md#3-changing-keyboard-shortcuts [55]: docs/module-api.md#views [56]: docs/crossword-domain.md#crossword-source +[57]: https://learn.microsoft.com/en-us/windows/wsl/install +[58]: https://learn.microsoft.com/en-us/windows/wsl/install#prerequisites +[59]: #1a-linux +[61]: docs/ +[62]: #manual-checks +[63]: https://gist.github.com/pvspain/0438b9b6733650d3e0f52f0d82ec993f diff --git a/bin/bootstrap-linux.sh b/bin/bootstrap-posix-ish.sh similarity index 54% rename from bin/bootstrap-linux.sh rename to bin/bootstrap-posix-ish.sh index 496f76d..d1a7859 100755 --- a/bin/bootstrap-linux.sh +++ b/bin/bootstrap-posix-ish.sh @@ -1,6 +1,7 @@ #! /usr/bin/env bash -nvmBootStrapURL=https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh +export bashrc=$HOME/.bashrc +nvmBootStrapUrl=https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh # Checking for dependencies: curl and git @@ -12,10 +13,14 @@ nvmBootStrapURL=https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh # Search for a supported package manager if [[ -x "$(which apt)" ]]; then packMan=apt + elif [[ -x "$(which dnf)" ]]; then + packMan=dnf elif [[ -x "$(which yum)" ]]; then packMan=yum + elif [[ -x "$(which brew)" ]]; then + packMan=brew else - printf "ERROR: No supported package manager found (apt,yum). Exiting...\n" + printf "ERROR: No supported package manager found (apt, brew, dnf, yum). Exiting...\n" exit 1 fi @@ -26,41 +31,42 @@ nvmBootStrapURL=https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh # Install nvm if not present - printf "\n2. Installing nvm if not present...\n\n" - if [[ -z "${NVM_DIR}" ]]; then - curl -o- $nvmBootStrapURL | bash && - # Reinitialise shell to pick up initialise nvm in session - source "$HOME/.bashrc" + if [[ -z "$NVM_DIR" ]] || ! [[ -d "$NVM_DIR" ]]; then + printf "\n2. Installing nvm...\n\n" + bash -c "$(curl -o- $nvmBootStrapUrl)" && + # Reinitialise shell to initialise nvm in session + source "$bashrc" fi ) && ( # Update to latest version of nvm printf "\n3. Updating to latest nvm version...\n\n" - pushd "$NVM_DIR" - git fetch --tags origin - git checkout $(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)) - popd - source "$NVM_DIR/nvm.sh" + source $bashrc && pushd "$NVM_DIR" && + git fetch --tags origin && + git checkout $(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)) && + popd # Update node and npm printf "\n4. Updating to latest LTS version of node and latest npm version...\n\n" + source "$NVM_DIR/nvm.sh" nvm install --lts --latest-npm ) && ( # Switch to latest node LTS printf "\n5. Switch to latest LTS version of node...\n\n" - source "$NVM_DIR/nvm.sh" - nvm use --lts + source "$bashrc" && source "$NVM_DIR/nvm.sh" && + nvm use --lts ) && ( - if [ -f package.json ]; then + # Check PWD is repository root + if [[ -d .git ]] && [[ -f package.json ]]; then # Install project packages printf "\n6. Installing project packages...\n\n" - source "$NVM_DIR/nvm.sh" + source "$bashrc" && source "$NVM_DIR/nvm.sh" npm install else cat < /dev/null || +# A clean exit so any parent script continues... +exit 0 \ No newline at end of file diff --git a/bin/demo-macos.sh b/bin/demo-macos.sh new file mode 100755 index 0000000..97a3c73 --- /dev/null +++ b/bin/demo-macos.sh @@ -0,0 +1,144 @@ +#! /usr/bin/env bash + +# Base variables (sortable) +export bashrc=$HOME/.bashrc +export brewBootStrapUrl=https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh +export demoPackageScript=dev:preview +export demoRoot=$HOME/crossword-demo +export demoUrl=http://localhost:4173/ +export npmArtefacts=$HOME/.npm +export nvmBootStrapUrl=https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh +export puzzlesLink=$HOME/crossword-demo-puzzles +export repoUrl=https://github.com/dwmkerr/crosswords-js.git + +# Derived variables (non-sortable) +export repoParent=$demoRoot/git/github/dwmkerr +export repoRoot=$repoParent/crosswords-js +export repoPuzzles=$repoRoot/data + +# Reset environment + +if [[ -d "$demoRoot" ]]; then + printf "\n0. Removing artifacts from previous run...\n\n" + [[ -d "$demoRoot" ]] && rm -rf "$demoRoot" + [[ -L "$puzzlesLink" ]] && rm -f "$puzzlesLink" + [[ -d "$npmArtefacts" ]] && rm -rf "$npmArtefacts" + + if [[ -f "$bashrc" ]]; then + source "$bashrc" && [[ -n "$NVM_DIR" ]] && [[ -d "$NVM_DIR" ]] && rm -rf "$NVM_DIR" + fi +fi + +# Checking for dependencies: brew, curl and git + +( + printf "\n1. Checking for dependencies (brew, curl, git)...\n\n" + + if ! ([[ -x "$(which brew)" ]] && [[ -x "$(which git)" ]]); then + + # Search for a supported package manager + + if (! [[ -x "$(which brew)" ]]); then + bash -c "$(curl -fsSL $brewBootStrapUrl)" + packMan=brew + fi + + # Confirm installation + + if ! [[ -x "$(which brew)" ]]; then + printf "ERROR: Failed to install Homebrew. Exiting...\n" + exit 1 + fi + + printf "Root access is required to install packages. Please enter your password if prompted...\n\n" + sudo "$packMan" install -y curl git + fi +) && ( + + # Install nvm if not present + + if [[ -z "$NVM_DIR" ]] || ! [[ -d "$NVM_DIR" ]]; then + printf "\n2. Installing nvm...\n\n" + bash -c "$(curl -o- $nvmBootStrapUrl)" && + # Reinitialise shell to initialise nvm in session + source "$bashrc" + fi +) && ( + + # Update to latest version of nvm + + printf "\n3. Updating to latest nvm version...\n\n" + source $bashrc && pushd "$NVM_DIR" && + git fetch --tags origin && + git checkout $(git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)) && + popd + + # Update node and npm + + source "$NVM_DIR/nvm.sh" + nvm install --lts --latest-npm + printf "\n4. Updating to latest LTS version of node and latest npm version...\n\n" +) && ( + + # Switch to latest node LTS + + printf "\n5. Switch to latest LTS version of node...\n\n" + source "$bashrc" && source "$NVM_DIR/nvm.sh" && + nvm use --lts +) && ( + if [ -f package.json ]; then + + # Install project packages + + printf "\n6. Installing project packages...\n\n" + source "$bashrc" && source "$NVM_DIR/nvm.sh" && + npm install + else + + # Clone and install repo + + printf "\n6A. Cloning repository from GitHub...\n\n" + mkdir -p "$repoParent" && + pushd "$repoParent" && + git clone "$repoUrl" && + cd $repoRoot && + + # Install project packages + printf "\n6B. Installing project packages...\n\n" && + source "$bashrc" && source "$NVM_DIR/nvm.sh" && + npm install + fi +) && ( + + # Create link to extra puzzles in user's root directory + + printf "\n7. Create a softlink to crossword demo puzzles: $puzzlesLink...\n\n" && + ln -s "$repoPuzzles" "$puzzlesLink" + +) && ( + + # Open browser on demo + + printf "\n8. Opening the demo application in your default web browser.\n Please wait for a few seconds while the demo server boots...\n\n" && + open "$demoUrl" +) && ( + + # Run demo server + + printf "\n9. Starting demo server\n Press 'q' to stop the server and cleanup after the demo...\n\n" && + pushd "$repoRoot" && source $bashrc && source "$NVM_DIR/nvm.sh" && + npm run "$demoPackageScript" +) + +# Cleanup after demo + +if [[ -d "$demoRoot" ]]; then + printf "\n10. Cleaning up demo artifacts...\n\n" + [[ -d "$demoRoot" ]] && rm -rf "$demoRoot" + [[ -L "$puzzlesLink" ]] && rm -f "$puzzlesLink" + [[ -d "$npmArtefacts" ]] && rm -rf "$npmArtefacts" + + if [[ -f "$bashrc" ]]; then + source "$bashrc" && [[ -n "$NVM_DIR" ]] && [[ -d "$NVM_DIR" ]] && rm -rf "$NVM_DIR" + fi +fi diff --git a/bin/install-githook.sh b/bin/install-githook.sh new file mode 100755 index 0000000..65933c9 --- /dev/null +++ b/bin/install-githook.sh @@ -0,0 +1,19 @@ +#! /usr/bin/env bash + +hookSource=.githook-pre-commit +hookTarget=.git/hooks/pre-commit +backup=$hookTarget.backup-$(date --iso-8601=seconds) + +# Test PWD is repo root +if [[ -d .git ]] && [[ -f package.json ]]; then + # Save existing + if [[ -f "$hookTarget" ]]; then + mv --force "$hookTarget" "$backup" + fi && + cp --force "$hookSource" "$hookTarget" && + chmod u+x "$hookTarget" && + git config --local commit.template ./.git-commit-template.txt +else + printf "ERROR: This script must be run from the repository root directory\n" + exit 1 +fi diff --git a/bin/update-package.sh b/bin/update-package.sh index 104452d..f8870d8 100755 --- a/bin/update-package.sh +++ b/bin/update-package.sh @@ -31,6 +31,7 @@ printf "\n** nvm version: $(nvm --version)...\n" # Update package versions printf "\n4. Updating to latest package versions...\n\n" + npm ci && npm update ) && ( diff --git a/cspell.json b/cspell.json index 1e1824a..27eb77c 100644 --- a/cspell.json +++ b/cspell.json @@ -29,6 +29,7 @@ "celldom", "chid", "cksum", + "cleanup", "codecov", "crossworddom", "cwcell", @@ -44,6 +45,7 @@ "ftimes", "GEXT", "GRBS", + "gstatic", "guanaco", "hewotcha", "ICHEATED", @@ -52,18 +54,23 @@ "iseu", "isou", "jumpable", + "Kaletsky", "keypress", "keyup", "lcov", "lessc", "ltim", + "Misha", "moley", "mump", "Myer", "normalised", "nxxxxx", + "omap", "parameterised", + "posix", "Puzzazz", + "pvspain", "quiptic", "quot", "rebadged", @@ -80,6 +87,7 @@ "swappable", "tadah", "uintahite", + "vite", "woctopus" ] } diff --git a/dev/index.html b/dev/index.html index 8fc8737..fc1337b 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,7 +1,13 @@ + + + crosswords-js developer sandbox @@ -16,6 +22,7 @@ href="https://fonts.googleapis.com/css?family=PT+Sans:400,700i&display=swap" rel="stylesheet" /> + @@ -107,6 +114,6 @@

Keep going

- + diff --git a/dev/index.js b/dev/index.js index 8487401..7307def 100644 --- a/dev/index.js +++ b/dev/index.js @@ -1,4 +1,4 @@ -import { newCrosswordController, helpers } from "./crosswords.js"; +import { newCrosswordController, helpers } from "../src/crosswords.js"; const { assert, eid, trace, tracing } = helpers; diff --git a/dev/index.less b/dev/index.less index c26859d..e473058 100644 --- a/dev/index.less +++ b/dev/index.less @@ -3,10 +3,10 @@ // Base styles for crossword grid and clue blocks @import url('../style/crosswords.less'); -@text-color: darken(white, 10%); -@highlight-color: #04aa6d; -@background-color: lighten(black, 45%); -@api-block-background-color: lighten(black, 40%); +@text-color: white; +@highlight-color: #026447; +@background-color: lighten(black, 35%); +@api-block-background-color: lighten(black, 25%); @shadow-color: darken(@background-color, 10%); @highlight-text-color: @text-color; @font-family: 'PT Sans', sans-serif; @@ -17,9 +17,13 @@ @modal-background-color: rgba(0, 0, 0, 0.3); // Black with opacity @modal-shadow-color: darken(@background-color, 25%); @modal-box-shadow: 10px 10px 10px @modal-shadow-color; -@link-color: lighten(@highlight-color, 10%); -@link-hover-color: lighten(@highlight-color, 20%); -@link-visited-color: darken(@highlight-color, 20%); +@link-color: lighten(@highlight-color, 70%); +@link-hover-color: lighten(@highlight-color, 80%); +@link-visited-color: darken(@highlight-color, 70%); + +.crosswords-js { + --clue-current-color: @highlight-color; +} // Restore visibility after html completes loading t0 avoid flash of unstyled content // https://stackoverflow.com/a/53364612/1090683 @@ -35,6 +39,7 @@ body { background-color: @background-color; padding: 5px; font-family: @font-family; + h1 { background-color: @highlight-color; color: @highlight-text-color; @@ -106,9 +111,11 @@ a { box-shadow: @box-shadow; padding: 0px 5px; } + &:visited { color: @link-visited-color; } + &:active { color: lighten(@link-color, 25%); } @@ -119,12 +126,14 @@ a { color: @highlight-text-color; padding: 10px; box-shadow: @box-shadow; + .title { font-size: @banner-text-size; font-weight: bold; display: inline-block; padding: 0px 10px 10px; } + .description { font-style: italic; font-size: large; @@ -148,8 +157,10 @@ a { font-weight: 100; font-size: @text-font-size; margin: 10px; + #crossword-source { margin: 15px 0px; + // Hide file-picker button #crossword-file { opacity: 0; @@ -157,7 +168,7 @@ a { height: 0.1px; position: absolute; } - // label + label { .button-styles(); } @@ -180,8 +191,11 @@ a { overflow-wrap: break-word; #current-clue-label { + --clue-label-width: 3rem; + display: inline-block; width: var(--clue-label-width); + // width: 3em; vertical-align: top; } @@ -215,6 +229,7 @@ a { #clue-buttons, #grid-buttons { padding: 5px; + p { padding-bottom: 5px; } @@ -236,19 +251,23 @@ a { font-weight: bold; padding-bottom: 10px; } + .crossword-clue { font-size: medium; font-weight: 100; padding: 8px 0px; margin: 2px 0px; + &:hover { transform: scale(1.1); box-shadow: @box-shadow; } + .crossword-clue-label, .crossword-clue-text { padding-left: 5px; } + .crossword-clue-label { font-weight: bold; } @@ -277,6 +296,7 @@ a { #first-column { #current-clue { height: 4em; + #current-clue-text { max-width: 15em; } @@ -300,11 +320,13 @@ a { min-width: 5rem; width: 25%; padding: 0px; + p { padding: 10px 10px 0px 0px; min-width: 5rem; text-align: left; } + button { min-width: 4rem; } @@ -368,6 +390,7 @@ a { from { opacity: 0; } + to { opacity: 1; } @@ -377,9 +400,11 @@ a { 0% { opacity: 1; } + 75% { opacity: 1; } + 100% { opacity: 0; } @@ -393,13 +418,10 @@ a { #clue-solved-notification, #incomplete-notification { - display: none; // Hidden by default - position: fixed; // Stay in place - z-index: 1; // Sit on top - .crossword-dialog-styles(); + z-index: 1; // Sit on top + display: none; // Hidden by default width: 12em; - // box-shadow: @box-shadow; // centre dialog in viewport position: absolute; top: 50%; diff --git a/dist/crosswords.css b/dist/crosswords.css index d711201..d7a4345 100644 --- a/dist/crosswords.css +++ b/dist/crosswords.css @@ -1,179 +1 @@ -.crosswords-js { - /* default grid size, this is overriden in JS */ - --row-count: 15; - --column-count: 15; - --grid-line-size: 1px; - --grid-cell-size: 1.3rem; - --letter-size: 1.14rem; - --label-size: 0.4rem; - --revealed-size: 0.4rem; - --clue-text-width: 17rem; - --clue-label-width: 3rem; -} -@media screen and (max-width: 391px) { - .crosswords-js { - --grid-cell-size: 1.3rem; - --letter-size: 1.14rem; - --label-size: 0.4rem; - --revealed-size: 0.4rem; - --clue-text-width: 17rem; - } -} -@media screen and (min-width: 392px) and (max-width: 555px) { - .crosswords-js { - --grid-cell-size: 1.5625rem; - --letter-size: 1.14rem; - --label-size: 0.4rem; - --revealed-size: 0.4rem; - --clue-text-width: 20rem; - } -} -@media screen and (min-width: 556px) { - .crosswords-js { - --grid-cell-size: 2.25rem; - --letter-size: 1.7rem; - --label-size: 0.4em; - --revealed-size: 0.6rem; - --clue-text-width: 20rem; - } -} -.crosswords-js { - --dark-color: black; - --light-color: white; - --incorrect-color: red; - --revealed-color: #cd00cc; - --focus-outline-color: red; - --cell-current-color: #f7f469; - --clue-current-color: #04aa6d; - --grid-background-color: var(--dark-color); - --grid-line-color: var(--dark-color); - --grid-text-color: var(--dark-color); - --clue-background-current-color: var(--clue-current-color); - --cell-background-current-color: var(--cell-current-color); - --cell-background-dark-color: var(--dark-color); - --cell-background-light-color: var(--light-color); - --cell-incorrect-color: var(--incorrect-color); - --cell-revealed-color: var(--revealed-color); - --word-separator-color: var(--grid-line-color); -} -.crossword-grid { - --letter-weight: bold; - display: grid; - grid-template-rows: repeat(var(--row-count), var(--grid-cell-size)); - grid-template-columns: repeat(var(--column-count), var(--grid-cell-size)); - gap: var(--grid-line-size); - border-collapse: collapse; - box-sizing: border-box; - padding: var(--grid-line-size); - width: min-content; - background-color: var(--grid-background-color); - color: var(--grid-text-color); - box-sizing: content-box; - font-family: sans-serif; - font-size: x-large; -} -.crossword-grid input { - font-size: var(--letter-size); -} -.crossword-grid .cwclue-label { - font-size: var(--label-size); -} -.crossword-grid .cwcell-revealed { - /* display a triangle base on border intersections */ - border-left: var(--revealed-size) solid transparent; - border-bottom: var(--revealed-size) solid var(--cell-revealed-color); -} -.crossword-grid .crossword-clues .crossword-clue-text { - max-width: var(--clue-text-width); -} -.crossword-grid .cwcell { - position: relative; - aspect-ratio: 1; - z-index: 0; - display: grid; -} -.crossword-grid .cwcell.dark { - background-color: var(--cell-background-dark-color); -} -.crossword-grid .cwcell.light { - background-color: var(--cell-background-light-color); -} -.crossword-grid input { - text-align: center; - font-weight: var(--letter-weight); - padding: 0; - border: 0; - height: 100%; - width: 100%; - background-color: var(--cell-background-light-color); -} -.crossword-grid input.active { - background-color: var(--clue-background-current-color); -} -.crossword-grid input.highlighted { - background-color: var(--cell-background-current-color); -} -.crossword-grid input:focus { - outline-width: medium; - outline-color: var(--focus-outline-color); - outline-style: dotted; - outline-offset: -2px; - caret-color: transparent; -} -.crossword-grid .cwclue-label { - margin: 1px 0px 0px 1px; - position: absolute; - place-self: start; - pointer-events: none; -} -.crossword-grid .cwcell-revealed { - position: absolute; - place-self: end; - pointer-events: none; -} -.crossword-grid .cwcell-incorrect { - position: absolute; - width: 100%; - height: 100%; - background-image: linear-gradient(135deg, transparent 47%, var(--cell-incorrect-color) 47%, var(--cell-incorrect-color) 53%, transparent 53%); - background-repeat: no-repeat; - pointer-events: none; - opacity: 0.5; -} -.crossword-grid .cw-across-word-separator { - box-shadow: inset -3px 0px 0px 0px var(--word-separator-color); -} -.crossword-grid .cw-down-word-separator { - box-shadow: inset 0px -3px 0px 0px var(--word-separator-color); -} -.crossword-grid .cw-across-word-separator + .cw-down-word-separator, -.crossword-grid .cw-down-word-separator + .cw-across-word-separator { - box-shadow: inset -3px -3px 0px 0px var(--word-separator-color); -} -.crossword-grid .hidden { - visibility: hidden; - opacity: 0; - transition: visibility 0s linear 500ms, - opacity 500ms; -} -.crossword-clues { - display: flex; - flex-wrap: wrap; -} -.crossword-clues .crossword-clue-label { - display: inline-block; - width: var(--clue-label-width); - vertical-align: top; -} -.crossword-clues .crossword-clue-text { - display: inline-block; -} -.crossword-clues .current-clue-segment { - background-color: var(--clue-background-current-color); -} -.cw-italic { - font-style: italic; -} -.cw-bold { - font-weight: bold; -} +.crosswords-js{--row-count: 15;--column-count: 15;--grid-line-size: 1px;--grid-cell-size: 1.3rem;--letter-size: 1.14rem;--label-size: .4rem;--revealed-size: .4rem;--clue-label-width: 3rem;--clue-text-width: 17rem}@media screen and (max-width: 391px){.crosswords-js{--grid-cell-size: 1.3rem;--letter-size: 1.14rem;--label-size: .4rem;--revealed-size: .4rem;--clue-text-width: 17rem}}@media screen and (min-width: 392px) and (max-width: 555px){.crosswords-js{--grid-cell-size: 1.5625rem;--letter-size: 1.14rem;--label-size: .4rem;--revealed-size: .4rem;--clue-text-width: 20rem}}@media screen and (min-width: 556px){.crosswords-js{--grid-cell-size: 2.25rem;--letter-size: 1.7rem;--label-size: .4em;--revealed-size: .6rem;--clue-text-width: 20rem}}.crosswords-js{--dark-color: black;--light-color: white;--incorrect-color: red;--revealed-color: #cd00cc;--focus-outline-color: red;--cell-current-color: #f7f469;--clue-current-color: #04aa6d;--grid-background-color: var(--dark-color);--grid-line-color: var(--dark-color);--grid-text-color: var(--dark-color);--grid-text-highlighted-color: var(--dark-color);--grid-text-active-color: var(--light-color);--clue-background-current-color: var(--clue-current-color);--cell-background-current-color: var(--cell-current-color);--cell-background-dark-color: var(--dark-color);--cell-background-light-color: var(--light-color);--cell-incorrect-color: var(--incorrect-color);--cell-revealed-color: var(--revealed-color);--word-separator-color: var(--grid-line-color)}.crossword-grid{--letter-weight: bold;display:grid;grid-template-rows:repeat(var(--row-count),var(--grid-cell-size));grid-template-columns:repeat(var(--column-count),var(--grid-cell-size));gap:var(--grid-line-size);border-collapse:collapse;padding:var(--grid-line-size);width:min-content;background-color:var(--grid-background-color);color:var(--grid-text-color);box-sizing:border-box;font-family:sans-serif;font-size:x-large}.crossword-grid .crossword-clues .crossword-clue-text{max-width:var(--clue-text-width)}.crossword-grid .cwcell{position:relative;aspect-ratio:1;z-index:0;display:grid}.crossword-grid .cwcell.dark{background-color:var(--cell-background-dark-color)}.crossword-grid .cwcell.light{background-color:var(--cell-background-light-color)}.crossword-grid input{font-size:var(--letter-size);text-align:center;font-weight:var(--letter-weight);padding:0;border:0;height:100%;width:100%;background-color:var(--cell-background-light-color)}.crossword-grid input.active{background-color:var(--clue-background-current-color);color:var(--grid-text-active-color)}.crossword-grid input.highlighted{background-color:var(--cell-background-current-color);color:var(--grid-text-highlighted-color)}.crossword-grid input:focus{outline-width:medium;outline-color:var(--focus-outline-color);outline-style:dotted;outline-offset:-2px;caret-color:transparent}.crossword-grid .cwcell-revealed{position:absolute;place-self:end;pointer-events:none;border-left:var(--revealed-size) solid transparent;border-bottom:var(--revealed-size) solid var(--cell-revealed-color)}.crossword-grid .cwcell-incorrect{position:absolute;width:100%;height:100%;background-image:linear-gradient(135deg,transparent 47%,var(--cell-incorrect-color) 47%,var(--cell-incorrect-color) 53%,transparent 53%);background-repeat:no-repeat;pointer-events:none;opacity:.5}.crossword-grid .cwclue-label{font-size:var(--label-size);margin:1px 0 0 1px;position:absolute;place-self:start;pointer-events:none}.crossword-grid .cw-across-word-separator{box-shadow:inset -3px 0 0 0 var(--word-separator-color)}.crossword-grid .cw-down-word-separator{box-shadow:inset 0 -3px 0 0 var(--word-separator-color)}.crossword-grid .cw-across-word-separator+.cw-down-word-separator,.crossword-grid .cw-down-word-separator+.cw-across-word-separator{box-shadow:inset -3px -3px 0 0 var(--word-separator-color)}.crossword-grid .hidden{visibility:hidden;opacity:0;transition:visibility 0s linear .5s,opacity .5s}.crossword-clues{display:flex;flex-wrap:wrap}.crossword-clues .crossword-clue-label{display:inline-block;width:var(--clue-label-width);vertical-align:top}.crossword-clues .crossword-clue-text{display:inline-block}.crossword-clues .current-clue-segment{background-color:var(--clue-background-current-color)}.cw-italic{font-style:italic}.cw-bold{font-weight:700} diff --git a/dist/crosswords.js b/dist/crosswords.js index f384794..12697b5 100644 --- a/dist/crosswords.js +++ b/dist/crosswords.js @@ -1,896 +1,2686 @@ -/* - * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). - * This devtool is neither made for production nor for readable output files. - * It uses "eval()" calls to create a separate source file in the browser devtools. - * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) - * or disable the default devtool with "devtool: false". - * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). - */ -/******/ (() => { // webpackBootstrap -/******/ "use strict"; -/******/ var __webpack_modules__ = ({ - -/***/ "./node_modules/yaml/browser/dist/compose/compose-collection.js": -/*!**********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/compose-collection.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeCollection: () => (/* binding */ composeCollection)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../nodes/YAMLMap.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLMap.js\");\n/* harmony import */ var _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../nodes/YAMLSeq.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLSeq.js\");\n/* harmony import */ var _resolve_block_map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./resolve-block-map.js */ \"./node_modules/yaml/browser/dist/compose/resolve-block-map.js\");\n/* harmony import */ var _resolve_block_seq_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./resolve-block-seq.js */ \"./node_modules/yaml/browser/dist/compose/resolve-block-seq.js\");\n/* harmony import */ var _resolve_flow_collection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./resolve-flow-collection.js */ \"./node_modules/yaml/browser/dist/compose/resolve-flow-collection.js\");\n\n\n\n\n\n\n\n\nfunction resolveCollection(CN, ctx, token, onError, tagName, tag) {\n const coll = token.type === 'block-map'\n ? (0,_resolve_block_map_js__WEBPACK_IMPORTED_MODULE_4__.resolveBlockMap)(CN, ctx, token, onError, tag)\n : token.type === 'block-seq'\n ? (0,_resolve_block_seq_js__WEBPACK_IMPORTED_MODULE_5__.resolveBlockSeq)(CN, ctx, token, onError, tag)\n : (0,_resolve_flow_collection_js__WEBPACK_IMPORTED_MODULE_6__.resolveFlowCollection)(CN, ctx, token, onError, tag);\n const Coll = coll.constructor;\n // If we got a tagName matching the class, or the tag name is '!',\n // then use the tagName from the node class used to create it.\n if (tagName === '!' || tagName === Coll.tagName) {\n coll.tag = Coll.tagName;\n return coll;\n }\n if (tagName)\n coll.tag = tagName;\n return coll;\n}\nfunction composeCollection(CN, ctx, token, tagToken, onError) {\n const tagName = !tagToken\n ? null\n : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg));\n const expType = token.type === 'block-map'\n ? 'map'\n : token.type === 'block-seq'\n ? 'seq'\n : token.start.source === '{'\n ? 'map'\n : 'seq';\n // shortcut: check if it's a generic YAMLMap or YAMLSeq\n // before jumping into the custom tag logic.\n if (!tagToken ||\n !tagName ||\n tagName === '!' ||\n (tagName === _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap.tagName && expType === 'map') ||\n (tagName === _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_3__.YAMLSeq.tagName && expType === 'seq') ||\n !expType) {\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType);\n if (!tag) {\n const kt = ctx.schema.knownTags[tagName];\n if (kt && kt.collection === expType) {\n ctx.schema.tags.push(Object.assign({}, kt, { default: false }));\n tag = kt;\n }\n else {\n if (kt?.collection) {\n onError(tagToken, 'BAD_COLLECTION_TYPE', `${kt.tag} used for ${expType} collection, but expects ${kt.collection}`, true);\n }\n else {\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, true);\n }\n return resolveCollection(CN, ctx, token, onError, tagName);\n }\n }\n const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);\n const res = tag.resolve?.(coll, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg), ctx.options) ?? coll;\n const node = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isNode)(res)\n ? res\n : new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_1__.Scalar(res);\n node.range = coll.range;\n node.tag = tagName;\n if (tag?.format)\n node.format = tag.format;\n return node;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/compose-collection.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/compose-doc.js": -/*!***************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/compose-doc.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeDoc: () => (/* binding */ composeDoc)\n/* harmony export */ });\n/* harmony import */ var _doc_Document_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../doc/Document.js */ \"./node_modules/yaml/browser/dist/doc/Document.js\");\n/* harmony import */ var _compose_node_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose-node.js */ \"./node_modules/yaml/browser/dist/compose/compose-node.js\");\n/* harmony import */ var _resolve_end_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resolve-end.js */ \"./node_modules/yaml/browser/dist/compose/resolve-end.js\");\n/* harmony import */ var _resolve_props_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./resolve-props.js */ \"./node_modules/yaml/browser/dist/compose/resolve-props.js\");\n\n\n\n\n\nfunction composeDoc(options, directives, { offset, start, value, end }, onError) {\n const opts = Object.assign({ _directives: directives }, options);\n const doc = new _doc_Document_js__WEBPACK_IMPORTED_MODULE_0__.Document(undefined, opts);\n const ctx = {\n atRoot: true,\n directives: doc.directives,\n options: doc.options,\n schema: doc.schema\n };\n const props = (0,_resolve_props_js__WEBPACK_IMPORTED_MODULE_3__.resolveProps)(start, {\n indicator: 'doc-start',\n next: value ?? end?.[0],\n offset,\n onError,\n startOnNewline: true\n });\n if (props.found) {\n doc.directives.docStart = true;\n if (value &&\n (value.type === 'block-map' || value.type === 'block-seq') &&\n !props.hasNewline)\n onError(props.end, 'MISSING_CHAR', 'Block collection cannot start on same line with directives-end marker');\n }\n // @ts-expect-error If Contents is set, let's trust the user\n doc.contents = value\n ? (0,_compose_node_js__WEBPACK_IMPORTED_MODULE_1__.composeNode)(ctx, value, props, onError)\n : (0,_compose_node_js__WEBPACK_IMPORTED_MODULE_1__.composeEmptyNode)(ctx, props.end, start, null, props, onError);\n const contentEnd = doc.contents.range[2];\n const re = (0,_resolve_end_js__WEBPACK_IMPORTED_MODULE_2__.resolveEnd)(end, contentEnd, false, onError);\n if (re.comment)\n doc.comment = re.comment;\n doc.range = [offset, contentEnd, re.offset];\n return doc;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/compose-doc.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/compose-node.js": -/*!****************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/compose-node.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeEmptyNode: () => (/* binding */ composeEmptyNode),\n/* harmony export */ composeNode: () => (/* binding */ composeNode)\n/* harmony export */ });\n/* harmony import */ var _nodes_Alias_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/Alias.js */ \"./node_modules/yaml/browser/dist/nodes/Alias.js\");\n/* harmony import */ var _compose_collection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose-collection.js */ \"./node_modules/yaml/browser/dist/compose/compose-collection.js\");\n/* harmony import */ var _compose_scalar_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compose-scalar.js */ \"./node_modules/yaml/browser/dist/compose/compose-scalar.js\");\n/* harmony import */ var _resolve_end_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./resolve-end.js */ \"./node_modules/yaml/browser/dist/compose/resolve-end.js\");\n/* harmony import */ var _util_empty_scalar_position_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util-empty-scalar-position.js */ \"./node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js\");\n\n\n\n\n\n\nconst CN = { composeNode, composeEmptyNode };\nfunction composeNode(ctx, token, props, onError) {\n const { spaceBefore, comment, anchor, tag } = props;\n let node;\n let isSrcToken = true;\n switch (token.type) {\n case 'alias':\n node = composeAlias(ctx, token, onError);\n if (anchor || tag)\n onError(token, 'ALIAS_PROPS', 'An alias node must not specify any properties');\n break;\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'block-scalar':\n node = (0,_compose_scalar_js__WEBPACK_IMPORTED_MODULE_2__.composeScalar)(ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n case 'block-map':\n case 'block-seq':\n case 'flow-collection':\n node = (0,_compose_collection_js__WEBPACK_IMPORTED_MODULE_1__.composeCollection)(CN, ctx, token, tag, onError);\n if (anchor)\n node.anchor = anchor.source.substring(1);\n break;\n default: {\n const message = token.type === 'error'\n ? token.message\n : `Unsupported token (type: ${token.type})`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);\n isSrcToken = false;\n }\n }\n if (anchor && node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n if (token.type === 'scalar' && token.source === '')\n node.comment = comment;\n else\n node.commentBefore = comment;\n }\n // @ts-expect-error Type checking misses meaning of isSrcToken\n if (ctx.options.keepSourceTokens && isSrcToken)\n node.srcToken = token;\n return node;\n}\nfunction composeEmptyNode(ctx, offset, before, pos, { spaceBefore, comment, anchor, tag, end }, onError) {\n const token = {\n type: 'scalar',\n offset: (0,_util_empty_scalar_position_js__WEBPACK_IMPORTED_MODULE_4__.emptyScalarPosition)(offset, before, pos),\n indent: -1,\n source: ''\n };\n const node = (0,_compose_scalar_js__WEBPACK_IMPORTED_MODULE_2__.composeScalar)(ctx, token, tag, onError);\n if (anchor) {\n node.anchor = anchor.source.substring(1);\n if (node.anchor === '')\n onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string');\n }\n if (spaceBefore)\n node.spaceBefore = true;\n if (comment) {\n node.comment = comment;\n node.range[2] = end;\n }\n return node;\n}\nfunction composeAlias({ options }, { offset, source, end }, onError) {\n const alias = new _nodes_Alias_js__WEBPACK_IMPORTED_MODULE_0__.Alias(source.substring(1));\n if (alias.source === '')\n onError(offset, 'BAD_ALIAS', 'Alias cannot be an empty string');\n if (alias.source.endsWith(':'))\n onError(offset + source.length - 1, 'BAD_ALIAS', 'Alias ending in : is ambiguous', true);\n const valueEnd = offset + source.length;\n const re = (0,_resolve_end_js__WEBPACK_IMPORTED_MODULE_3__.resolveEnd)(end, valueEnd, options.strict, onError);\n alias.range = [offset, valueEnd, re.offset];\n if (re.comment)\n alias.comment = re.comment;\n return alias;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/compose-node.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/compose-scalar.js": -/*!******************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/compose-scalar.js ***! - \******************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeScalar: () => (/* binding */ composeScalar)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _resolve_block_scalar_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resolve-block-scalar.js */ \"./node_modules/yaml/browser/dist/compose/resolve-block-scalar.js\");\n/* harmony import */ var _resolve_flow_scalar_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./resolve-flow-scalar.js */ \"./node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js\");\n\n\n\n\n\nfunction composeScalar(ctx, token, tagToken, onError) {\n const { value, type, comment, range } = token.type === 'block-scalar'\n ? (0,_resolve_block_scalar_js__WEBPACK_IMPORTED_MODULE_2__.resolveBlockScalar)(token, ctx.options.strict, onError)\n : (0,_resolve_flow_scalar_js__WEBPACK_IMPORTED_MODULE_3__.resolveFlowScalar)(token, ctx.options.strict, onError);\n const tagName = tagToken\n ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg))\n : null;\n const tag = tagToken && tagName\n ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError)\n : token.type === 'scalar'\n ? findScalarTagByTest(ctx, value, token, onError)\n : ctx.schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR];\n let scalar;\n try {\n const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options);\n scalar = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(res) ? res : new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_1__.Scalar(res);\n }\n catch (error) {\n const msg = error instanceof Error ? error.message : String(error);\n onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg);\n scalar = new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_1__.Scalar(value);\n }\n scalar.range = range;\n scalar.source = value;\n if (type)\n scalar.type = type;\n if (tagName)\n scalar.tag = tagName;\n if (tag.format)\n scalar.format = tag.format;\n if (comment)\n scalar.comment = comment;\n return scalar;\n}\nfunction findScalarTagByName(schema, value, tagName, tagToken, onError) {\n if (tagName === '!')\n return schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR]; // non-specific tag\n const matchWithTest = [];\n for (const tag of schema.tags) {\n if (!tag.collection && tag.tag === tagName) {\n if (tag.default && tag.test)\n matchWithTest.push(tag);\n else\n return tag;\n }\n }\n for (const tag of matchWithTest)\n if (tag.test?.test(value))\n return tag;\n const kt = schema.knownTags[tagName];\n if (kt && !kt.collection) {\n // Ensure that the known tag is available for stringifying,\n // but does not get used by default.\n schema.tags.push(Object.assign({}, kt, { default: false, test: undefined }));\n return kt;\n }\n onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str');\n return schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR];\n}\nfunction findScalarTagByTest({ directives, schema }, value, token, onError) {\n const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR];\n if (schema.compat) {\n const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ??\n schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR];\n if (tag.tag !== compat.tag) {\n const ts = directives.tagString(tag.tag);\n const cs = directives.tagString(compat.tag);\n const msg = `Value may be parsed as either ${ts} or ${cs}`;\n onError(token, 'TAG_RESOLVE_FAILED', msg, true);\n }\n }\n return tag;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/compose-scalar.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/composer.js": -/*!************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/composer.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Composer: () => (/* binding */ Composer)\n/* harmony export */ });\n/* harmony import */ var _doc_directives_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../doc/directives.js */ \"./node_modules/yaml/browser/dist/doc/directives.js\");\n/* harmony import */ var _doc_Document_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../doc/Document.js */ \"./node_modules/yaml/browser/dist/doc/Document.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/yaml/browser/dist/errors.js\");\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _compose_doc_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./compose-doc.js */ \"./node_modules/yaml/browser/dist/compose/compose-doc.js\");\n/* harmony import */ var _resolve_end_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./resolve-end.js */ \"./node_modules/yaml/browser/dist/compose/resolve-end.js\");\n\n\n\n\n\n\n\nfunction getErrorPos(src) {\n if (typeof src === 'number')\n return [src, src + 1];\n if (Array.isArray(src))\n return src.length === 2 ? src : [src[0], src[1]];\n const { offset, source } = src;\n return [offset, offset + (typeof source === 'string' ? source.length : 1)];\n}\nfunction parsePrelude(prelude) {\n let comment = '';\n let atComment = false;\n let afterEmptyLine = false;\n for (let i = 0; i < prelude.length; ++i) {\n const source = prelude[i];\n switch (source[0]) {\n case '#':\n comment +=\n (comment === '' ? '' : afterEmptyLine ? '\\n\\n' : '\\n') +\n (source.substring(1) || ' ');\n atComment = true;\n afterEmptyLine = false;\n break;\n case '%':\n if (prelude[i + 1]?.[0] !== '#')\n i += 1;\n atComment = false;\n break;\n default:\n // This may be wrong after doc-end, but in that case it doesn't matter\n if (!atComment)\n afterEmptyLine = true;\n atComment = false;\n }\n }\n return { comment, afterEmptyLine };\n}\n/**\n * Compose a stream of CST nodes into a stream of YAML Documents.\n *\n * ```ts\n * import { Composer, Parser } from 'yaml'\n *\n * const src: string = ...\n * const tokens = new Parser().parse(src)\n * const docs = new Composer().compose(tokens)\n * ```\n */\nclass Composer {\n constructor(options = {}) {\n this.doc = null;\n this.atDirectives = false;\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n this.onError = (source, code, message, warning) => {\n const pos = getErrorPos(source);\n if (warning)\n this.warnings.push(new _errors_js__WEBPACK_IMPORTED_MODULE_2__.YAMLWarning(pos, code, message));\n else\n this.errors.push(new _errors_js__WEBPACK_IMPORTED_MODULE_2__.YAMLParseError(pos, code, message));\n };\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n this.directives = new _doc_directives_js__WEBPACK_IMPORTED_MODULE_0__.Directives({ version: options.version || '1.2' });\n this.options = options;\n }\n decorate(doc, afterDoc) {\n const { comment, afterEmptyLine } = parsePrelude(this.prelude);\n //console.log({ dc: doc.comment, prelude, comment })\n if (comment) {\n const dc = doc.contents;\n if (afterDoc) {\n doc.comment = doc.comment ? `${doc.comment}\\n${comment}` : comment;\n }\n else if (afterEmptyLine || doc.directives.docStart || !dc) {\n doc.commentBefore = comment;\n }\n else if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_3__.isCollection)(dc) && !dc.flow && dc.items.length > 0) {\n let it = dc.items[0];\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_3__.isPair)(it))\n it = it.key;\n const cb = it.commentBefore;\n it.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n else {\n const cb = dc.commentBefore;\n dc.commentBefore = cb ? `${comment}\\n${cb}` : comment;\n }\n }\n if (afterDoc) {\n Array.prototype.push.apply(doc.errors, this.errors);\n Array.prototype.push.apply(doc.warnings, this.warnings);\n }\n else {\n doc.errors = this.errors;\n doc.warnings = this.warnings;\n }\n this.prelude = [];\n this.errors = [];\n this.warnings = [];\n }\n /**\n * Current stream status information.\n *\n * Mostly useful at the end of input for an empty stream.\n */\n streamInfo() {\n return {\n comment: parsePrelude(this.prelude).comment,\n directives: this.directives,\n errors: this.errors,\n warnings: this.warnings\n };\n }\n /**\n * Compose tokens into documents.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *compose(tokens, forceDoc = false, endOffset = -1) {\n for (const token of tokens)\n yield* this.next(token);\n yield* this.end(forceDoc, endOffset);\n }\n /** Advance the composer by one CST token. */\n *next(token) {\n switch (token.type) {\n case 'directive':\n this.directives.add(token.source, (offset, message, warning) => {\n const pos = getErrorPos(token);\n pos[0] += offset;\n this.onError(pos, 'BAD_DIRECTIVE', message, warning);\n });\n this.prelude.push(token.source);\n this.atDirectives = true;\n break;\n case 'document': {\n const doc = (0,_compose_doc_js__WEBPACK_IMPORTED_MODULE_4__.composeDoc)(this.options, this.directives, token, this.onError);\n if (this.atDirectives && !doc.directives.docStart)\n this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');\n this.decorate(doc, false);\n if (this.doc)\n yield this.doc;\n this.doc = doc;\n this.atDirectives = false;\n break;\n }\n case 'byte-order-mark':\n case 'space':\n break;\n case 'comment':\n case 'newline':\n this.prelude.push(token.source);\n break;\n case 'error': {\n const msg = token.source\n ? `${token.message}: ${JSON.stringify(token.source)}`\n : token.message;\n const error = new _errors_js__WEBPACK_IMPORTED_MODULE_2__.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);\n if (this.atDirectives || !this.doc)\n this.errors.push(error);\n else\n this.doc.errors.push(error);\n break;\n }\n case 'doc-end': {\n if (!this.doc) {\n const msg = 'Unexpected doc-end without preceding document';\n this.errors.push(new _errors_js__WEBPACK_IMPORTED_MODULE_2__.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));\n break;\n }\n this.doc.directives.docEnd = true;\n const end = (0,_resolve_end_js__WEBPACK_IMPORTED_MODULE_5__.resolveEnd)(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);\n this.decorate(this.doc, true);\n if (end.comment) {\n const dc = this.doc.comment;\n this.doc.comment = dc ? `${dc}\\n${end.comment}` : end.comment;\n }\n this.doc.range[2] = end.offset;\n break;\n }\n default:\n this.errors.push(new _errors_js__WEBPACK_IMPORTED_MODULE_2__.YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));\n }\n }\n /**\n * Call at end of input to yield any remaining document.\n *\n * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.\n * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.\n */\n *end(forceDoc = false, endOffset = -1) {\n if (this.doc) {\n this.decorate(this.doc, true);\n yield this.doc;\n this.doc = null;\n }\n else if (forceDoc) {\n const opts = Object.assign({ _directives: this.directives }, this.options);\n const doc = new _doc_Document_js__WEBPACK_IMPORTED_MODULE_1__.Document(undefined, opts);\n if (this.atDirectives)\n this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');\n doc.range = [0, endOffset, endOffset];\n this.decorate(doc, false);\n yield doc;\n }\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/composer.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/resolve-block-map.js": -/*!*********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/resolve-block-map.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ resolveBlockMap: () => (/* binding */ resolveBlockMap)\n/* harmony export */ });\n/* harmony import */ var _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/Pair.js */ \"./node_modules/yaml/browser/dist/nodes/Pair.js\");\n/* harmony import */ var _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/YAMLMap.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLMap.js\");\n/* harmony import */ var _resolve_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resolve-props.js */ \"./node_modules/yaml/browser/dist/compose/resolve-props.js\");\n/* harmony import */ var _util_contains_newline_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util-contains-newline.js */ \"./node_modules/yaml/browser/dist/compose/util-contains-newline.js\");\n/* harmony import */ var _util_flow_indent_check_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util-flow-indent-check.js */ \"./node_modules/yaml/browser/dist/compose/util-flow-indent-check.js\");\n/* harmony import */ var _util_map_includes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./util-map-includes.js */ \"./node_modules/yaml/browser/dist/compose/util-map-includes.js\");\n\n\n\n\n\n\n\nconst startColMsg = 'All mapping items must start at the same column';\nfunction resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, tag) {\n const NodeClass = tag?.nodeClass ?? _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_1__.YAMLMap;\n const map = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bm.offset;\n let commentEnd = null;\n for (const collItem of bm.items) {\n const { start, key, sep, value } = collItem;\n // key properties\n const keyProps = (0,_resolve_props_js__WEBPACK_IMPORTED_MODULE_2__.resolveProps)(start, {\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n startOnNewline: true\n });\n const implicitKey = !keyProps.found;\n if (implicitKey) {\n if (key) {\n if (key.type === 'block-seq')\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'A block sequence may not be used as an implicit map key');\n else if ('indent' in key && key.indent !== bm.indent)\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n if (!keyProps.anchor && !keyProps.tag && !sep) {\n commentEnd = keyProps.end;\n if (keyProps.comment) {\n if (map.comment)\n map.comment += '\\n' + keyProps.comment;\n else\n map.comment = keyProps.comment;\n }\n continue;\n }\n if (keyProps.hasNewlineAfterProp || (0,_util_contains_newline_js__WEBPACK_IMPORTED_MODULE_3__.containsNewline)(key)) {\n onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line');\n }\n }\n else if (keyProps.found?.indent !== bm.indent) {\n onError(offset, 'BAD_INDENT', startColMsg);\n }\n // key value\n const keyStart = keyProps.end;\n const keyNode = key\n ? composeNode(ctx, key, keyProps, onError)\n : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError);\n if (ctx.schema.compat)\n (0,_util_flow_indent_check_js__WEBPACK_IMPORTED_MODULE_4__.flowIndentCheck)(bm.indent, key, onError);\n if ((0,_util_map_includes_js__WEBPACK_IMPORTED_MODULE_5__.mapIncludes)(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n // value properties\n const valueProps = (0,_resolve_props_js__WEBPACK_IMPORTED_MODULE_2__.resolveProps)(sep ?? [], {\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n startOnNewline: !key || key.type === 'block-scalar'\n });\n offset = valueProps.end;\n if (valueProps.found) {\n if (implicitKey) {\n if (value?.type === 'block-map' && !valueProps.hasNewline)\n onError(offset, 'BLOCK_AS_IMPLICIT_KEY', 'Nested mappings are not allowed in compact mappings');\n if (ctx.options.strict &&\n keyProps.start < valueProps.found.offset - 1024)\n onError(keyNode.range, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit block mapping key');\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : composeEmptyNode(ctx, offset, sep, null, valueProps, onError);\n if (ctx.schema.compat)\n (0,_util_flow_indent_check_js__WEBPACK_IMPORTED_MODULE_4__.flowIndentCheck)(bm.indent, value, onError);\n offset = valueNode.range[2];\n const pair = new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_0__.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n else {\n // key with no value\n if (implicitKey)\n onError(keyNode.range, 'MISSING_CHAR', 'Implicit map keys need to be followed by map values');\n if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_0__.Pair(keyNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n map.items.push(pair);\n }\n }\n if (commentEnd && commentEnd < offset)\n onError(commentEnd, 'IMPOSSIBLE', 'Map comment with trailing content');\n map.range = [bm.offset, offset, commentEnd ?? offset];\n return map;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/resolve-block-map.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/resolve-block-scalar.js": -/*!************************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/resolve-block-scalar.js ***! - \************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ resolveBlockScalar: () => (/* binding */ resolveBlockScalar)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n\n\nfunction resolveBlockScalar(scalar, strict, onError) {\n const start = scalar.offset;\n const header = parseBlockScalarHeader(scalar, strict, onError);\n if (!header)\n return { value: '', type: null, comment: '', range: [start, start, start] };\n const type = header.mode === '>' ? _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.BLOCK_FOLDED : _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.BLOCK_LITERAL;\n const lines = scalar.source ? splitLines(scalar.source) : [];\n // determine the end of content & start of chomping\n let chompStart = lines.length;\n for (let i = lines.length - 1; i >= 0; --i) {\n const content = lines[i][1];\n if (content === '' || content === '\\r')\n chompStart = i;\n else\n break;\n }\n // shortcut for empty contents\n if (chompStart === 0) {\n const value = header.chomp === '+' && lines.length > 0\n ? '\\n'.repeat(Math.max(1, lines.length - 1))\n : '';\n let end = start + header.length;\n if (scalar.source)\n end += scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n }\n // find the indentation level to trim from start\n let trimIndent = scalar.indent + header.indent;\n let offset = scalar.offset + header.length;\n let contentStart = 0;\n for (let i = 0; i < chompStart; ++i) {\n const [indent, content] = lines[i];\n if (content === '' || content === '\\r') {\n if (header.indent === 0 && indent.length > trimIndent)\n trimIndent = indent.length;\n }\n else {\n if (indent.length < trimIndent) {\n const message = 'Block scalars with more-indented leading empty lines must use an explicit indentation indicator';\n onError(offset + indent.length, 'MISSING_CHAR', message);\n }\n if (header.indent === 0)\n trimIndent = indent.length;\n contentStart = i;\n break;\n }\n offset += indent.length + content.length + 1;\n }\n // include trailing more-indented empty lines in content\n for (let i = lines.length - 1; i >= chompStart; --i) {\n if (lines[i][0].length > trimIndent)\n chompStart = i + 1;\n }\n let value = '';\n let sep = '';\n let prevMoreIndented = false;\n // leading whitespace is kept intact\n for (let i = 0; i < contentStart; ++i)\n value += lines[i][0].slice(trimIndent) + '\\n';\n for (let i = contentStart; i < chompStart; ++i) {\n let [indent, content] = lines[i];\n offset += indent.length + content.length + 1;\n const crlf = content[content.length - 1] === '\\r';\n if (crlf)\n content = content.slice(0, -1);\n /* istanbul ignore if already caught in lexer */\n if (content && indent.length < trimIndent) {\n const src = header.indent\n ? 'explicit indentation indicator'\n : 'first line';\n const message = `Block scalar lines must not be less indented than their ${src}`;\n onError(offset - content.length - (crlf ? 2 : 1), 'BAD_INDENT', message);\n indent = '';\n }\n if (type === _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.BLOCK_LITERAL) {\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n }\n else if (indent.length > trimIndent || content[0] === '\\t') {\n // more-indented content within a folded block\n if (sep === ' ')\n sep = '\\n';\n else if (!prevMoreIndented && sep === '\\n')\n sep = '\\n\\n';\n value += sep + indent.slice(trimIndent) + content;\n sep = '\\n';\n prevMoreIndented = true;\n }\n else if (content === '') {\n // empty line\n if (sep === '\\n')\n value += '\\n';\n else\n sep = '\\n';\n }\n else {\n value += sep + content;\n sep = ' ';\n prevMoreIndented = false;\n }\n }\n switch (header.chomp) {\n case '-':\n break;\n case '+':\n for (let i = chompStart; i < lines.length; ++i)\n value += '\\n' + lines[i][0].slice(trimIndent);\n if (value[value.length - 1] !== '\\n')\n value += '\\n';\n break;\n default:\n value += '\\n';\n }\n const end = start + header.length + scalar.source.length;\n return { value, type, comment: header.comment, range: [start, end, end] };\n}\nfunction parseBlockScalarHeader({ offset, props }, strict, onError) {\n /* istanbul ignore if should not happen */\n if (props[0].type !== 'block-scalar-header') {\n onError(props[0], 'IMPOSSIBLE', 'Block scalar header not found');\n return null;\n }\n const { source } = props[0];\n const mode = source[0];\n let indent = 0;\n let chomp = '';\n let error = -1;\n for (let i = 1; i < source.length; ++i) {\n const ch = source[i];\n if (!chomp && (ch === '-' || ch === '+'))\n chomp = ch;\n else {\n const n = Number(ch);\n if (!indent && n)\n indent = n;\n else if (error === -1)\n error = offset + i;\n }\n }\n if (error !== -1)\n onError(error, 'UNEXPECTED_TOKEN', `Block scalar header includes extra characters: ${source}`);\n let hasSpace = false;\n let comment = '';\n let length = source.length;\n for (let i = 1; i < props.length; ++i) {\n const token = props[i];\n switch (token.type) {\n case 'space':\n hasSpace = true;\n // fallthrough\n case 'newline':\n length += token.source.length;\n break;\n case 'comment':\n if (strict && !hasSpace) {\n const message = 'Comments must be separated from other tokens by white space characters';\n onError(token, 'MISSING_CHAR', message);\n }\n length += token.source.length;\n comment = token.source.substring(1);\n break;\n case 'error':\n onError(token, 'UNEXPECTED_TOKEN', token.message);\n length += token.source.length;\n break;\n /* istanbul ignore next should not happen */\n default: {\n const message = `Unexpected token in block scalar header: ${token.type}`;\n onError(token, 'UNEXPECTED_TOKEN', message);\n const ts = token.source;\n if (ts && typeof ts === 'string')\n length += ts.length;\n }\n }\n }\n return { mode, indent, chomp, comment, length };\n}\n/** @returns Array of lines split up as `[indent, content]` */\nfunction splitLines(source) {\n const split = source.split(/\\n( *)/);\n const first = split[0];\n const m = first.match(/^( *)/);\n const line0 = m?.[1]\n ? [m[1], first.slice(m[1].length)]\n : ['', first];\n const lines = [line0];\n for (let i = 1; i < split.length; i += 2)\n lines.push([split[i], split[i + 1]]);\n return lines;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/resolve-block-scalar.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/resolve-block-seq.js": -/*!*********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/resolve-block-seq.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ resolveBlockSeq: () => (/* binding */ resolveBlockSeq)\n/* harmony export */ });\n/* harmony import */ var _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/YAMLSeq.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLSeq.js\");\n/* harmony import */ var _resolve_props_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./resolve-props.js */ \"./node_modules/yaml/browser/dist/compose/resolve-props.js\");\n/* harmony import */ var _util_flow_indent_check_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util-flow-indent-check.js */ \"./node_modules/yaml/browser/dist/compose/util-flow-indent-check.js\");\n\n\n\n\nfunction resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, tag) {\n const NodeClass = tag?.nodeClass ?? _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_0__.YAMLSeq;\n const seq = new NodeClass(ctx.schema);\n if (ctx.atRoot)\n ctx.atRoot = false;\n let offset = bs.offset;\n let commentEnd = null;\n for (const { start, value } of bs.items) {\n const props = (0,_resolve_props_js__WEBPACK_IMPORTED_MODULE_1__.resolveProps)(start, {\n indicator: 'seq-item-ind',\n next: value,\n offset,\n onError,\n startOnNewline: true\n });\n if (!props.found) {\n if (props.anchor || props.tag || value) {\n if (value && value.type === 'block-seq')\n onError(props.end, 'BAD_INDENT', 'All sequence items must start at the same column');\n else\n onError(offset, 'MISSING_CHAR', 'Sequence item without - indicator');\n }\n else {\n commentEnd = props.end;\n if (props.comment)\n seq.comment = props.comment;\n continue;\n }\n }\n const node = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, start, null, props, onError);\n if (ctx.schema.compat)\n (0,_util_flow_indent_check_js__WEBPACK_IMPORTED_MODULE_2__.flowIndentCheck)(bs.indent, value, onError);\n offset = node.range[2];\n seq.items.push(node);\n }\n seq.range = [bs.offset, offset, commentEnd ?? offset];\n return seq;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/resolve-block-seq.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/resolve-end.js": -/*!***************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/resolve-end.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ resolveEnd: () => (/* binding */ resolveEnd)\n/* harmony export */ });\nfunction resolveEnd(end, offset, reqSpace, onError) {\n let comment = '';\n if (end) {\n let hasSpace = false;\n let sep = '';\n for (const token of end) {\n const { source, type } = token;\n switch (type) {\n case 'space':\n hasSpace = true;\n break;\n case 'comment': {\n if (reqSpace && !hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += sep + cb;\n sep = '';\n break;\n }\n case 'newline':\n if (comment)\n sep += source;\n hasSpace = true;\n break;\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${type} at node end`);\n }\n offset += source.length;\n }\n }\n return { comment, offset };\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/resolve-end.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/resolve-flow-collection.js": -/*!***************************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/resolve-flow-collection.js ***! - \***************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ resolveFlowCollection: () => (/* binding */ resolveFlowCollection)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/Pair.js */ \"./node_modules/yaml/browser/dist/nodes/Pair.js\");\n/* harmony import */ var _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../nodes/YAMLMap.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLMap.js\");\n/* harmony import */ var _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../nodes/YAMLSeq.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLSeq.js\");\n/* harmony import */ var _resolve_end_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./resolve-end.js */ \"./node_modules/yaml/browser/dist/compose/resolve-end.js\");\n/* harmony import */ var _resolve_props_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./resolve-props.js */ \"./node_modules/yaml/browser/dist/compose/resolve-props.js\");\n/* harmony import */ var _util_contains_newline_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./util-contains-newline.js */ \"./node_modules/yaml/browser/dist/compose/util-contains-newline.js\");\n/* harmony import */ var _util_map_includes_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./util-map-includes.js */ \"./node_modules/yaml/browser/dist/compose/util-map-includes.js\");\n\n\n\n\n\n\n\n\n\nconst blockMsg = 'Block collections are not allowed within flow collections';\nconst isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');\nfunction resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {\n const isMap = fc.start.source === '{';\n const fcName = isMap ? 'flow map' : 'flow sequence';\n const NodeClass = (tag?.nodeClass ?? (isMap ? _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap : _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_3__.YAMLSeq));\n const coll = new NodeClass(ctx.schema);\n coll.flow = true;\n const atRoot = ctx.atRoot;\n if (atRoot)\n ctx.atRoot = false;\n let offset = fc.offset + fc.start.source.length;\n for (let i = 0; i < fc.items.length; ++i) {\n const collItem = fc.items[i];\n const { start, key, sep, value } = collItem;\n const props = (0,_resolve_props_js__WEBPACK_IMPORTED_MODULE_5__.resolveProps)(start, {\n flow: fcName,\n indicator: 'explicit-key-ind',\n next: key ?? sep?.[0],\n offset,\n onError,\n startOnNewline: false\n });\n if (!props.found) {\n if (!props.anchor && !props.tag && !sep && !value) {\n if (i === 0 && props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n else if (i < fc.items.length - 1)\n onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);\n if (props.comment) {\n if (coll.comment)\n coll.comment += '\\n' + props.comment;\n else\n coll.comment = props.comment;\n }\n offset = props.end;\n continue;\n }\n if (!isMap && ctx.options.strict && (0,_util_contains_newline_js__WEBPACK_IMPORTED_MODULE_6__.containsNewline)(key))\n onError(key, // checked by containsNewline()\n 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n }\n if (i === 0) {\n if (props.comma)\n onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);\n }\n else {\n if (!props.comma)\n onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);\n if (props.comment) {\n let prevItemComment = '';\n loop: for (const st of start) {\n switch (st.type) {\n case 'comma':\n case 'space':\n break;\n case 'comment':\n prevItemComment = st.source.substring(1);\n break loop;\n default:\n break loop;\n }\n }\n if (prevItemComment) {\n let prev = coll.items[coll.items.length - 1];\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(prev))\n prev = prev.value ?? prev.key;\n if (prev.comment)\n prev.comment += '\\n' + prevItemComment;\n else\n prev.comment = prevItemComment;\n props.comment = props.comment.substring(prevItemComment.length + 1);\n }\n }\n }\n if (!isMap && !sep && !props.found) {\n // item is a value in a seq\n // → key & sep are empty, start does not include ? or :\n const valueNode = value\n ? composeNode(ctx, value, props, onError)\n : composeEmptyNode(ctx, props.end, sep, null, props, onError);\n coll.items.push(valueNode);\n offset = valueNode.range[2];\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else {\n // item is a key+value pair\n // key value\n const keyStart = props.end;\n const keyNode = key\n ? composeNode(ctx, key, props, onError)\n : composeEmptyNode(ctx, keyStart, start, null, props, onError);\n if (isBlock(key))\n onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);\n // value properties\n const valueProps = (0,_resolve_props_js__WEBPACK_IMPORTED_MODULE_5__.resolveProps)(sep ?? [], {\n flow: fcName,\n indicator: 'map-value-ind',\n next: value,\n offset: keyNode.range[2],\n onError,\n startOnNewline: false\n });\n if (valueProps.found) {\n if (!isMap && !props.found && ctx.options.strict) {\n if (sep)\n for (const st of sep) {\n if (st === valueProps.found)\n break;\n if (st.type === 'newline') {\n onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');\n break;\n }\n }\n if (props.start < valueProps.found.offset - 1024)\n onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');\n }\n }\n else if (value) {\n if ('source' in value && value.source && value.source[0] === ':')\n onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);\n else\n onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);\n }\n // value value\n const valueNode = value\n ? composeNode(ctx, value, valueProps, onError)\n : valueProps.found\n ? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)\n : null;\n if (valueNode) {\n if (isBlock(value))\n onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);\n }\n else if (valueProps.comment) {\n if (keyNode.comment)\n keyNode.comment += '\\n' + valueProps.comment;\n else\n keyNode.comment = valueProps.comment;\n }\n const pair = new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__.Pair(keyNode, valueNode);\n if (ctx.options.keepSourceTokens)\n pair.srcToken = collItem;\n if (isMap) {\n const map = coll;\n if ((0,_util_map_includes_js__WEBPACK_IMPORTED_MODULE_7__.mapIncludes)(ctx, map.items, keyNode))\n onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');\n map.items.push(pair);\n }\n else {\n const map = new _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap(ctx.schema);\n map.flow = true;\n map.items.push(pair);\n coll.items.push(map);\n }\n offset = valueNode ? valueNode.range[2] : valueProps.end;\n }\n }\n const expectedEnd = isMap ? '}' : ']';\n const [ce, ...ee] = fc.end;\n let cePos = offset;\n if (ce && ce.source === expectedEnd)\n cePos = ce.offset + ce.source.length;\n else {\n const name = fcName[0].toUpperCase() + fcName.substring(1);\n const msg = atRoot\n ? `${name} must end with a ${expectedEnd}`\n : `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;\n onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);\n if (ce && ce.source.length !== 1)\n ee.unshift(ce);\n }\n if (ee.length > 0) {\n const end = (0,_resolve_end_js__WEBPACK_IMPORTED_MODULE_4__.resolveEnd)(ee, cePos, ctx.options.strict, onError);\n if (end.comment) {\n if (coll.comment)\n coll.comment += '\\n' + end.comment;\n else\n coll.comment = end.comment;\n }\n coll.range = [fc.offset, cePos, end.offset];\n }\n else {\n coll.range = [fc.offset, cePos, cePos];\n }\n return coll;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/resolve-flow-collection.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js": -/*!***********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js ***! - \***********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ resolveFlowScalar: () => (/* binding */ resolveFlowScalar)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _resolve_end_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./resolve-end.js */ \"./node_modules/yaml/browser/dist/compose/resolve-end.js\");\n\n\n\nfunction resolveFlowScalar(scalar, strict, onError) {\n const { offset, type, source, end } = scalar;\n let _type;\n let value;\n const _onError = (rel, code, msg) => onError(offset + rel, code, msg);\n switch (type) {\n case 'scalar':\n _type = _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.PLAIN;\n value = plainValue(source, _onError);\n break;\n case 'single-quoted-scalar':\n _type = _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.QUOTE_SINGLE;\n value = singleQuotedValue(source, _onError);\n break;\n case 'double-quoted-scalar':\n _type = _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.QUOTE_DOUBLE;\n value = doubleQuotedValue(source, _onError);\n break;\n /* istanbul ignore next should not happen */\n default:\n onError(scalar, 'UNEXPECTED_TOKEN', `Expected a flow scalar value, but found: ${type}`);\n return {\n value: '',\n type: null,\n comment: '',\n range: [offset, offset + source.length, offset + source.length]\n };\n }\n const valueEnd = offset + source.length;\n const re = (0,_resolve_end_js__WEBPACK_IMPORTED_MODULE_1__.resolveEnd)(end, valueEnd, strict, onError);\n return {\n value,\n type: _type,\n comment: re.comment,\n range: [offset, valueEnd, re.offset]\n };\n}\nfunction plainValue(source, onError) {\n let badChar = '';\n switch (source[0]) {\n /* istanbul ignore next should not happen */\n case '\\t':\n badChar = 'a tab character';\n break;\n case ',':\n badChar = 'flow indicator character ,';\n break;\n case '%':\n badChar = 'directive indicator character %';\n break;\n case '|':\n case '>': {\n badChar = `block scalar indicator ${source[0]}`;\n break;\n }\n case '@':\n case '`': {\n badChar = `reserved character ${source[0]}`;\n break;\n }\n }\n if (badChar)\n onError(0, 'BAD_SCALAR_START', `Plain value cannot start with ${badChar}`);\n return foldLines(source);\n}\nfunction singleQuotedValue(source, onError) {\n if (source[source.length - 1] !== \"'\" || source.length === 1)\n onError(source.length, 'MISSING_CHAR', \"Missing closing 'quote\");\n return foldLines(source.slice(1, -1)).replace(/''/g, \"'\");\n}\nfunction foldLines(source) {\n /**\n * The negative lookbehind here and in the `re` RegExp is to\n * prevent causing a polynomial search time in certain cases.\n *\n * The try-catch is for Safari, which doesn't support this yet:\n * https://caniuse.com/js-regexp-lookbehind\n */\n let first, line;\n try {\n first = new RegExp('(.*?)(? wsStart ? source.slice(wsStart, i + 1) : ch;\n }\n else {\n res += ch;\n }\n }\n if (source[source.length - 1] !== '\"' || source.length === 1)\n onError(source.length, 'MISSING_CHAR', 'Missing closing \"quote');\n return res;\n}\n/**\n * Fold a single newline into a space, multiple newlines to N - 1 newlines.\n * Presumes `source[offset] === '\\n'`\n */\nfunction foldNewline(source, offset) {\n let fold = '';\n let ch = source[offset + 1];\n while (ch === ' ' || ch === '\\t' || ch === '\\n' || ch === '\\r') {\n if (ch === '\\r' && source[offset + 2] !== '\\n')\n break;\n if (ch === '\\n')\n fold += '\\n';\n offset += 1;\n ch = source[offset + 1];\n }\n if (!fold)\n fold = ' ';\n return { fold, offset };\n}\nconst escapeCodes = {\n '0': '\\0',\n a: '\\x07',\n b: '\\b',\n e: '\\x1b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t',\n v: '\\v',\n N: '\\u0085',\n _: '\\u00a0',\n L: '\\u2028',\n P: '\\u2029',\n ' ': ' ',\n '\"': '\"',\n '/': '/',\n '\\\\': '\\\\',\n '\\t': '\\t'\n};\nfunction parseCharCode(source, offset, length, onError) {\n const cc = source.substr(offset, length);\n const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);\n const code = ok ? parseInt(cc, 16) : NaN;\n if (isNaN(code)) {\n const raw = source.substr(offset - 2, length + 2);\n onError(offset - 2, 'BAD_DQ_ESCAPE', `Invalid escape sequence ${raw}`);\n return raw;\n }\n return String.fromCodePoint(code);\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/resolve-props.js": -/*!*****************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/resolve-props.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ resolveProps: () => (/* binding */ resolveProps)\n/* harmony export */ });\nfunction resolveProps(tokens, { flow, indicator, next, offset, onError, startOnNewline }) {\n let spaceBefore = false;\n let atNewline = startOnNewline;\n let hasSpace = startOnNewline;\n let comment = '';\n let commentSep = '';\n let hasNewline = false;\n let hasNewlineAfterProp = false;\n let reqSpace = false;\n let anchor = null;\n let tag = null;\n let comma = null;\n let found = null;\n let start = null;\n for (const token of tokens) {\n if (reqSpace) {\n if (token.type !== 'space' &&\n token.type !== 'newline' &&\n token.type !== 'comma')\n onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n reqSpace = false;\n }\n switch (token.type) {\n case 'space':\n // At the doc level, tabs at line start may be parsed\n // as leading white space rather than indentation.\n // In a flow collection, only the parser handles indent.\n if (!flow &&\n atNewline &&\n indicator !== 'doc-start' &&\n token.source[0] === '\\t')\n onError(token, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation');\n hasSpace = true;\n break;\n case 'comment': {\n if (!hasSpace)\n onError(token, 'MISSING_CHAR', 'Comments must be separated from other tokens by white space characters');\n const cb = token.source.substring(1) || ' ';\n if (!comment)\n comment = cb;\n else\n comment += commentSep + cb;\n commentSep = '';\n atNewline = false;\n break;\n }\n case 'newline':\n if (atNewline) {\n if (comment)\n comment += token.source;\n else\n spaceBefore = true;\n }\n else\n commentSep += token.source;\n atNewline = true;\n hasNewline = true;\n if (anchor || tag)\n hasNewlineAfterProp = true;\n hasSpace = true;\n break;\n case 'anchor':\n if (anchor)\n onError(token, 'MULTIPLE_ANCHORS', 'A node can have at most one anchor');\n if (token.source.endsWith(':'))\n onError(token.offset + token.source.length - 1, 'BAD_ALIAS', 'Anchor ending in : is ambiguous', true);\n anchor = token;\n if (start === null)\n start = token.offset;\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n case 'tag': {\n if (tag)\n onError(token, 'MULTIPLE_TAGS', 'A node can have at most one tag');\n tag = token;\n if (start === null)\n start = token.offset;\n atNewline = false;\n hasSpace = false;\n reqSpace = true;\n break;\n }\n case indicator:\n // Could here handle preceding comments differently\n if (anchor || tag)\n onError(token, 'BAD_PROP_ORDER', `Anchors and tags must be after the ${token.source} indicator`);\n if (found)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`);\n found = token;\n atNewline = false;\n hasSpace = false;\n break;\n case 'comma':\n if (flow) {\n if (comma)\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected , in ${flow}`);\n comma = token;\n atNewline = false;\n hasSpace = false;\n break;\n }\n // else fallthrough\n default:\n onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.type} token`);\n atNewline = false;\n hasSpace = false;\n }\n }\n const last = tokens[tokens.length - 1];\n const end = last ? last.offset + last.source.length : offset;\n if (reqSpace &&\n next &&\n next.type !== 'space' &&\n next.type !== 'newline' &&\n next.type !== 'comma' &&\n (next.type !== 'scalar' || next.source !== ''))\n onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space');\n return {\n comma,\n found,\n spaceBefore,\n comment,\n hasNewline,\n hasNewlineAfterProp,\n anchor,\n tag,\n end,\n start: start ?? end\n };\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/resolve-props.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/util-contains-newline.js": -/*!*************************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/util-contains-newline.js ***! - \*************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ containsNewline: () => (/* binding */ containsNewline)\n/* harmony export */ });\nfunction containsNewline(key) {\n if (!key)\n return null;\n switch (key.type) {\n case 'alias':\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n if (key.source.includes('\\n'))\n return true;\n if (key.end)\n for (const st of key.end)\n if (st.type === 'newline')\n return true;\n return false;\n case 'flow-collection':\n for (const it of key.items) {\n for (const st of it.start)\n if (st.type === 'newline')\n return true;\n if (it.sep)\n for (const st of it.sep)\n if (st.type === 'newline')\n return true;\n if (containsNewline(it.key) || containsNewline(it.value))\n return true;\n }\n return false;\n default:\n return true;\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/util-contains-newline.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js": -/*!******************************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js ***! - \******************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ emptyScalarPosition: () => (/* binding */ emptyScalarPosition)\n/* harmony export */ });\nfunction emptyScalarPosition(offset, before, pos) {\n if (before) {\n if (pos === null)\n pos = before.length;\n for (let i = pos - 1; i >= 0; --i) {\n let st = before[i];\n switch (st.type) {\n case 'space':\n case 'comment':\n case 'newline':\n offset -= st.source.length;\n continue;\n }\n // Technically, an empty scalar is immediately after the last non-empty\n // node, but it's more useful to place it after any whitespace.\n st = before[++i];\n while (st?.type === 'space') {\n offset += st.source.length;\n st = before[++i];\n }\n break;\n }\n }\n return offset;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/util-flow-indent-check.js": -/*!**************************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/util-flow-indent-check.js ***! - \**************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ flowIndentCheck: () => (/* binding */ flowIndentCheck)\n/* harmony export */ });\n/* harmony import */ var _util_contains_newline_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util-contains-newline.js */ \"./node_modules/yaml/browser/dist/compose/util-contains-newline.js\");\n\n\nfunction flowIndentCheck(indent, fc, onError) {\n if (fc?.type === 'flow-collection') {\n const end = fc.end[0];\n if (end.indent === indent &&\n (end.source === ']' || end.source === '}') &&\n (0,_util_contains_newline_js__WEBPACK_IMPORTED_MODULE_0__.containsNewline)(fc)) {\n const msg = 'Flow end indicator should be more indented than parent';\n onError(end, 'BAD_INDENT', msg, true);\n }\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/util-flow-indent-check.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/compose/util-map-includes.js": -/*!*********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/compose/util-map-includes.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ mapIncludes: () => (/* binding */ mapIncludes)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n\n\nfunction mapIncludes(ctx, items, search) {\n const { uniqueKeys } = ctx.options;\n if (uniqueKeys === false)\n return false;\n const isEqual = typeof uniqueKeys === 'function'\n ? uniqueKeys\n : (a, b) => a === b ||\n ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(a) &&\n (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(b) &&\n a.value === b.value &&\n !(a.value === '<<' && ctx.schema.merge));\n return items.some(pair => isEqual(pair.key, search));\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/compose/util-map-includes.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/doc/Document.js": -/*!********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/doc/Document.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Document: () => (/* binding */ Document)\n/* harmony export */ });\n/* harmony import */ var _nodes_Alias_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/Alias.js */ \"./node_modules/yaml/browser/dist/nodes/Alias.js\");\n/* harmony import */ var _nodes_Collection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/Collection.js */ \"./node_modules/yaml/browser/dist/nodes/Collection.js\");\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../nodes/Pair.js */ \"./node_modules/yaml/browser/dist/nodes/Pair.js\");\n/* harmony import */ var _nodes_toJS_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../nodes/toJS.js */ \"./node_modules/yaml/browser/dist/nodes/toJS.js\");\n/* harmony import */ var _schema_Schema_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../schema/Schema.js */ \"./node_modules/yaml/browser/dist/schema/Schema.js\");\n/* harmony import */ var _stringify_stringifyDocument_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../stringify/stringifyDocument.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyDocument.js\");\n/* harmony import */ var _anchors_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./anchors.js */ \"./node_modules/yaml/browser/dist/doc/anchors.js\");\n/* harmony import */ var _applyReviver_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./applyReviver.js */ \"./node_modules/yaml/browser/dist/doc/applyReviver.js\");\n/* harmony import */ var _createNode_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./createNode.js */ \"./node_modules/yaml/browser/dist/doc/createNode.js\");\n/* harmony import */ var _directives_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./directives.js */ \"./node_modules/yaml/browser/dist/doc/directives.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nclass Document {\n constructor(value, replacer, options) {\n /** A comment before this Document */\n this.commentBefore = null;\n /** A comment immediately after this Document */\n this.comment = null;\n /** Errors encountered during parsing. */\n this.errors = [];\n /** Warnings encountered during parsing. */\n this.warnings = [];\n Object.defineProperty(this, _nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.NODE_TYPE, { value: _nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.DOC });\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const opt = Object.assign({\n intAsBigInt: false,\n keepSourceTokens: false,\n logLevel: 'warn',\n prettyErrors: true,\n strict: true,\n uniqueKeys: true,\n version: '1.2'\n }, options);\n this.options = opt;\n let { version } = opt;\n if (options?._directives) {\n this.directives = options._directives.atDocument();\n if (this.directives.yaml.explicit)\n version = this.directives.yaml.version;\n }\n else\n this.directives = new _directives_js__WEBPACK_IMPORTED_MODULE_10__.Directives({ version });\n this.setSchema(version, options);\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents =\n value === undefined ? null : this.createNode(value, _replacer, options);\n }\n /**\n * Create a deep copy of this Document and its contents.\n *\n * Custom Node values that inherit from `Object` still refer to their original instances.\n */\n clone() {\n const copy = Object.create(Document.prototype, {\n [_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.NODE_TYPE]: { value: _nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.DOC }\n });\n copy.commentBefore = this.commentBefore;\n copy.comment = this.comment;\n copy.errors = this.errors.slice();\n copy.warnings = this.warnings.slice();\n copy.options = Object.assign({}, this.options);\n if (this.directives)\n copy.directives = this.directives.clone();\n copy.schema = this.schema.clone();\n // @ts-expect-error We can't really know that this matches Contents.\n copy.contents = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.isNode)(this.contents)\n ? this.contents.clone(copy.schema)\n : this.contents;\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** Adds a value to the document. */\n add(value) {\n if (assertCollection(this.contents))\n this.contents.add(value);\n }\n /** Adds a value to the document. */\n addIn(path, value) {\n if (assertCollection(this.contents))\n this.contents.addIn(path, value);\n }\n /**\n * Create a new `Alias` node, ensuring that the target `node` has the required anchor.\n *\n * If `node` already has an anchor, `name` is ignored.\n * Otherwise, the `node.anchor` value will be set to `name`,\n * or if an anchor with that name is already present in the document,\n * `name` will be used as a prefix for a new unique anchor.\n * If `name` is undefined, the generated anchor will use 'a' as a prefix.\n */\n createAlias(node, name) {\n if (!node.anchor) {\n const prev = (0,_anchors_js__WEBPACK_IMPORTED_MODULE_7__.anchorNames)(this);\n node.anchor =\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n !name || prev.has(name) ? (0,_anchors_js__WEBPACK_IMPORTED_MODULE_7__.findNewAnchor)(name || 'a', prev) : name;\n }\n return new _nodes_Alias_js__WEBPACK_IMPORTED_MODULE_0__.Alias(node.anchor);\n }\n createNode(value, replacer, options) {\n let _replacer = undefined;\n if (typeof replacer === 'function') {\n value = replacer.call({ '': value }, '', value);\n _replacer = replacer;\n }\n else if (Array.isArray(replacer)) {\n const keyToStr = (v) => typeof v === 'number' || v instanceof String || v instanceof Number;\n const asStr = replacer.filter(keyToStr).map(String);\n if (asStr.length > 0)\n replacer = replacer.concat(asStr);\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n replacer = undefined;\n }\n const { aliasDuplicateObjects, anchorPrefix, flow, keepUndefined, onTagObj, tag } = options ?? {};\n const { onAnchor, setAnchors, sourceObjects } = (0,_anchors_js__WEBPACK_IMPORTED_MODULE_7__.createNodeAnchors)(this, \n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing\n anchorPrefix || 'a');\n const ctx = {\n aliasDuplicateObjects: aliasDuplicateObjects ?? true,\n keepUndefined: keepUndefined ?? false,\n onAnchor,\n onTagObj,\n replacer: _replacer,\n schema: this.schema,\n sourceObjects\n };\n const node = (0,_createNode_js__WEBPACK_IMPORTED_MODULE_9__.createNode)(value, tag, ctx);\n if (flow && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.isCollection)(node))\n node.flow = true;\n setAnchors();\n return node;\n }\n /**\n * Convert a key and a value into a `Pair` using the current schema,\n * recursively wrapping all values as `Scalar` or `Collection` nodes.\n */\n createPair(key, value, options = {}) {\n const k = this.createNode(key, null, options);\n const v = this.createNode(value, null, options);\n return new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_3__.Pair(k, v);\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n return assertCollection(this.contents) ? this.contents.delete(key) : false;\n }\n /**\n * Removes a value from the document.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n if ((0,_nodes_Collection_js__WEBPACK_IMPORTED_MODULE_1__.isEmptyPath)(path)) {\n if (this.contents == null)\n return false;\n // @ts-expect-error Presumed impossible if Strict extends false\n this.contents = null;\n return true;\n }\n return assertCollection(this.contents)\n ? this.contents.deleteIn(path)\n : false;\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n get(key, keepScalar) {\n return (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.isCollection)(this.contents)\n ? this.contents.get(key, keepScalar)\n : undefined;\n }\n /**\n * Returns item at `path`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n if ((0,_nodes_Collection_js__WEBPACK_IMPORTED_MODULE_1__.isEmptyPath)(path))\n return !keepScalar && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.isScalar)(this.contents)\n ? this.contents.value\n : this.contents;\n return (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.isCollection)(this.contents)\n ? this.contents.getIn(path, keepScalar)\n : undefined;\n }\n /**\n * Checks if the document includes a value with the key `key`.\n */\n has(key) {\n return (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.isCollection)(this.contents) ? this.contents.has(key) : false;\n }\n /**\n * Checks if the document includes a value at `path`.\n */\n hasIn(path) {\n if ((0,_nodes_Collection_js__WEBPACK_IMPORTED_MODULE_1__.isEmptyPath)(path))\n return this.contents !== undefined;\n return (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.isCollection)(this.contents) ? this.contents.hasIn(path) : false;\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n set(key, value) {\n if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = (0,_nodes_Collection_js__WEBPACK_IMPORTED_MODULE_1__.collectionFromPath)(this.schema, [key], value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.set(key, value);\n }\n }\n /**\n * Sets a value in this document. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n if ((0,_nodes_Collection_js__WEBPACK_IMPORTED_MODULE_1__.isEmptyPath)(path)) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = value;\n }\n else if (this.contents == null) {\n // @ts-expect-error We can't really know that this matches Contents.\n this.contents = (0,_nodes_Collection_js__WEBPACK_IMPORTED_MODULE_1__.collectionFromPath)(this.schema, Array.from(path), value);\n }\n else if (assertCollection(this.contents)) {\n this.contents.setIn(path, value);\n }\n }\n /**\n * Change the YAML version and schema used by the document.\n * A `null` version disables support for directives, explicit tags, anchors, and aliases.\n * It also requires the `schema` option to be given as a `Schema` instance value.\n *\n * Overrides all previously set schema options.\n */\n setSchema(version, options = {}) {\n if (typeof version === 'number')\n version = String(version);\n let opt;\n switch (version) {\n case '1.1':\n if (this.directives)\n this.directives.yaml.version = '1.1';\n else\n this.directives = new _directives_js__WEBPACK_IMPORTED_MODULE_10__.Directives({ version: '1.1' });\n opt = { merge: true, resolveKnownTags: false, schema: 'yaml-1.1' };\n break;\n case '1.2':\n case 'next':\n if (this.directives)\n this.directives.yaml.version = version;\n else\n this.directives = new _directives_js__WEBPACK_IMPORTED_MODULE_10__.Directives({ version });\n opt = { merge: false, resolveKnownTags: true, schema: 'core' };\n break;\n case null:\n if (this.directives)\n delete this.directives;\n opt = null;\n break;\n default: {\n const sv = JSON.stringify(version);\n throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${sv}`);\n }\n }\n // Not using `instanceof Schema` to allow for duck typing\n if (options.schema instanceof Object)\n this.schema = options.schema;\n else if (opt)\n this.schema = new _schema_Schema_js__WEBPACK_IMPORTED_MODULE_5__.Schema(Object.assign(opt, options));\n else\n throw new Error(`With a null YAML version, the { schema: Schema } option is required`);\n }\n // json & jsonArg are only used from toJSON()\n toJS({ json, jsonArg, mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n const ctx = {\n anchors: new Map(),\n doc: this,\n keep: !json,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = (0,_nodes_toJS_js__WEBPACK_IMPORTED_MODULE_4__.toJS)(this.contents, jsonArg ?? '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? (0,_applyReviver_js__WEBPACK_IMPORTED_MODULE_8__.applyReviver)(reviver, { '': res }, '', res)\n : res;\n }\n /**\n * A JSON representation of the document `contents`.\n *\n * @param jsonArg Used by `JSON.stringify` to indicate the array index or\n * property name.\n */\n toJSON(jsonArg, onAnchor) {\n return this.toJS({ json: true, jsonArg, mapAsMap: false, onAnchor });\n }\n /** A YAML representation of the document. */\n toString(options = {}) {\n if (this.errors.length > 0)\n throw new Error('Document with errors cannot be stringified');\n if ('indent' in options &&\n (!Number.isInteger(options.indent) || Number(options.indent) <= 0)) {\n const s = JSON.stringify(options.indent);\n throw new Error(`\"indent\" option must be a positive integer, not ${s}`);\n }\n return (0,_stringify_stringifyDocument_js__WEBPACK_IMPORTED_MODULE_6__.stringifyDocument)(this, options);\n }\n}\nfunction assertCollection(contents) {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_2__.isCollection)(contents))\n return true;\n throw new Error('Expected a YAML collection as document contents');\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/doc/Document.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/doc/anchors.js": -/*!*******************************************************!*\ - !*** ./node_modules/yaml/browser/dist/doc/anchors.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ anchorIsValid: () => (/* binding */ anchorIsValid),\n/* harmony export */ anchorNames: () => (/* binding */ anchorNames),\n/* harmony export */ createNodeAnchors: () => (/* binding */ createNodeAnchors),\n/* harmony export */ findNewAnchor: () => (/* binding */ findNewAnchor)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visit.js */ \"./node_modules/yaml/browser/dist/visit.js\");\n\n\n\n/**\n * Verify that the input string is a valid anchor.\n *\n * Will throw on errors.\n */\nfunction anchorIsValid(anchor) {\n if (/[\\x00-\\x19\\s,[\\]{}]/.test(anchor)) {\n const sa = JSON.stringify(anchor);\n const msg = `Anchor must not contain whitespace or control characters: ${sa}`;\n throw new Error(msg);\n }\n return true;\n}\nfunction anchorNames(root) {\n const anchors = new Set();\n (0,_visit_js__WEBPACK_IMPORTED_MODULE_1__.visit)(root, {\n Value(_key, node) {\n if (node.anchor)\n anchors.add(node.anchor);\n }\n });\n return anchors;\n}\n/** Find a new anchor name with the given `prefix` and a one-indexed suffix. */\nfunction findNewAnchor(prefix, exclude) {\n for (let i = 1; true; ++i) {\n const name = `${prefix}${i}`;\n if (!exclude.has(name))\n return name;\n }\n}\nfunction createNodeAnchors(doc, prefix) {\n const aliasObjects = [];\n const sourceObjects = new Map();\n let prevAnchors = null;\n return {\n onAnchor: (source) => {\n aliasObjects.push(source);\n if (!prevAnchors)\n prevAnchors = anchorNames(doc);\n const anchor = findNewAnchor(prefix, prevAnchors);\n prevAnchors.add(anchor);\n return anchor;\n },\n /**\n * With circular references, the source node is only resolved after all\n * of its child nodes are. This is why anchors are set only after all of\n * the nodes have been created.\n */\n setAnchors: () => {\n for (const source of aliasObjects) {\n const ref = sourceObjects.get(source);\n if (typeof ref === 'object' &&\n ref.anchor &&\n ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(ref.node) || (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isCollection)(ref.node))) {\n ref.node.anchor = ref.anchor;\n }\n else {\n const error = new Error('Failed to resolve repeated object (this should not happen)');\n error.source = source;\n throw error;\n }\n }\n },\n sourceObjects\n };\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/doc/anchors.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/doc/applyReviver.js": -/*!************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/doc/applyReviver.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ applyReviver: () => (/* binding */ applyReviver)\n/* harmony export */ });\n/**\n * Applies the JSON.parse reviver algorithm as defined in the ECMA-262 spec,\n * in section 24.5.1.1 \"Runtime Semantics: InternalizeJSONProperty\" of the\n * 2021 edition: https://tc39.es/ecma262/#sec-json.parse\n *\n * Includes extensions for handling Map and Set objects.\n */\nfunction applyReviver(reviver, obj, key, val) {\n if (val && typeof val === 'object') {\n if (Array.isArray(val)) {\n for (let i = 0, len = val.length; i < len; ++i) {\n const v0 = val[i];\n const v1 = applyReviver(reviver, val, String(i), v0);\n if (v1 === undefined)\n delete val[i];\n else if (v1 !== v0)\n val[i] = v1;\n }\n }\n else if (val instanceof Map) {\n for (const k of Array.from(val.keys())) {\n const v0 = val.get(k);\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n val.delete(k);\n else if (v1 !== v0)\n val.set(k, v1);\n }\n }\n else if (val instanceof Set) {\n for (const v0 of Array.from(val)) {\n const v1 = applyReviver(reviver, val, v0, v0);\n if (v1 === undefined)\n val.delete(v0);\n else if (v1 !== v0) {\n val.delete(v0);\n val.add(v1);\n }\n }\n }\n else {\n for (const [k, v0] of Object.entries(val)) {\n const v1 = applyReviver(reviver, val, k, v0);\n if (v1 === undefined)\n delete val[k];\n else if (v1 !== v0)\n val[k] = v1;\n }\n }\n }\n return reviver.call(obj, key, val);\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/doc/applyReviver.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/doc/createNode.js": -/*!**********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/doc/createNode.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createNode: () => (/* binding */ createNode)\n/* harmony export */ });\n/* harmony import */ var _nodes_Alias_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/Alias.js */ \"./node_modules/yaml/browser/dist/nodes/Alias.js\");\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n\n\n\n\nconst defaultTagPrefix = 'tag:yaml.org,2002:';\nfunction findTagObject(value, tagName, tags) {\n if (tagName) {\n const match = tags.filter(t => t.tag === tagName);\n const tagObj = match.find(t => !t.format) ?? match[0];\n if (!tagObj)\n throw new Error(`Tag ${tagName} not found`);\n return tagObj;\n }\n return tags.find(t => t.identify?.(value) && !t.format);\n}\nfunction createNode(value, tagName, ctx) {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isDocument)(value))\n value = value.contents;\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isNode)(value))\n return value;\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isPair)(value)) {\n const map = ctx.schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.MAP].createNode?.(ctx.schema, null, ctx);\n map.items.push(value);\n return map;\n }\n if (value instanceof String ||\n value instanceof Number ||\n value instanceof Boolean ||\n (typeof BigInt !== 'undefined' && value instanceof BigInt) // not supported everywhere\n ) {\n // https://tc39.es/ecma262/#sec-serializejsonproperty\n value = value.valueOf();\n }\n const { aliasDuplicateObjects, onAnchor, onTagObj, schema, sourceObjects } = ctx;\n // Detect duplicate references to the same object & use Alias nodes for all\n // after first. The `ref` wrapper allows for circular references to resolve.\n let ref = undefined;\n if (aliasDuplicateObjects && value && typeof value === 'object') {\n ref = sourceObjects.get(value);\n if (ref) {\n if (!ref.anchor)\n ref.anchor = onAnchor(value);\n return new _nodes_Alias_js__WEBPACK_IMPORTED_MODULE_0__.Alias(ref.anchor);\n }\n else {\n ref = { anchor: null, node: null };\n sourceObjects.set(value, ref);\n }\n }\n if (tagName?.startsWith('!!'))\n tagName = defaultTagPrefix + tagName.slice(2);\n let tagObj = findTagObject(value, tagName, schema.tags);\n if (!tagObj) {\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n value = value.toJSON();\n }\n if (!value || typeof value !== 'object') {\n const node = new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_2__.Scalar(value);\n if (ref)\n ref.node = node;\n return node;\n }\n tagObj =\n value instanceof Map\n ? schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.MAP]\n : Symbol.iterator in Object(value)\n ? schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.SEQ]\n : schema[_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.MAP];\n }\n if (onTagObj) {\n onTagObj(tagObj);\n delete ctx.onTagObj;\n }\n const node = tagObj?.createNode\n ? tagObj.createNode(ctx.schema, value, ctx)\n : typeof tagObj?.nodeClass?.from === 'function'\n ? tagObj.nodeClass.from(ctx.schema, value, ctx)\n : new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_2__.Scalar(value);\n if (tagName)\n node.tag = tagName;\n else if (!tagObj.default)\n node.tag = tagObj.tag;\n if (ref)\n ref.node = node;\n return node;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/doc/createNode.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/doc/directives.js": -/*!**********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/doc/directives.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Directives: () => (/* binding */ Directives)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visit.js */ \"./node_modules/yaml/browser/dist/visit.js\");\n\n\n\nconst escapeChars = {\n '!': '%21',\n ',': '%2C',\n '[': '%5B',\n ']': '%5D',\n '{': '%7B',\n '}': '%7D'\n};\nconst escapeTagName = (tn) => tn.replace(/[!,[\\]{}]/g, ch => escapeChars[ch]);\nclass Directives {\n constructor(yaml, tags) {\n /**\n * The directives-end/doc-start marker `---`. If `null`, a marker may still be\n * included in the document's stringified representation.\n */\n this.docStart = null;\n /** The doc-end marker `...`. */\n this.docEnd = false;\n this.yaml = Object.assign({}, Directives.defaultYaml, yaml);\n this.tags = Object.assign({}, Directives.defaultTags, tags);\n }\n clone() {\n const copy = new Directives(this.yaml, this.tags);\n copy.docStart = this.docStart;\n return copy;\n }\n /**\n * During parsing, get a Directives instance for the current document and\n * update the stream state according to the current version's spec.\n */\n atDocument() {\n const res = new Directives(this.yaml, this.tags);\n switch (this.yaml.version) {\n case '1.1':\n this.atNextDocument = true;\n break;\n case '1.2':\n this.atNextDocument = false;\n this.yaml = {\n explicit: Directives.defaultYaml.explicit,\n version: '1.2'\n };\n this.tags = Object.assign({}, Directives.defaultTags);\n break;\n }\n return res;\n }\n /**\n * @param onError - May be called even if the action was successful\n * @returns `true` on success\n */\n add(line, onError) {\n if (this.atNextDocument) {\n this.yaml = { explicit: Directives.defaultYaml.explicit, version: '1.1' };\n this.tags = Object.assign({}, Directives.defaultTags);\n this.atNextDocument = false;\n }\n const parts = line.trim().split(/[ \\t]+/);\n const name = parts.shift();\n switch (name) {\n case '%TAG': {\n if (parts.length !== 2) {\n onError(0, '%TAG directive should contain exactly two parts');\n if (parts.length < 2)\n return false;\n }\n const [handle, prefix] = parts;\n this.tags[handle] = prefix;\n return true;\n }\n case '%YAML': {\n this.yaml.explicit = true;\n if (parts.length !== 1) {\n onError(0, '%YAML directive should contain exactly one part');\n return false;\n }\n const [version] = parts;\n if (version === '1.1' || version === '1.2') {\n this.yaml.version = version;\n return true;\n }\n else {\n const isValid = /^\\d+\\.\\d+$/.test(version);\n onError(6, `Unsupported YAML version ${version}`, isValid);\n return false;\n }\n }\n default:\n onError(0, `Unknown directive ${name}`, true);\n return false;\n }\n }\n /**\n * Resolves a tag, matching handles to those defined in %TAG directives.\n *\n * @returns Resolved tag, which may also be the non-specific tag `'!'` or a\n * `'!local'` tag, or `null` if unresolvable.\n */\n tagName(source, onError) {\n if (source === '!')\n return '!'; // non-specific tag\n if (source[0] !== '!') {\n onError(`Not a valid tag: ${source}`);\n return null;\n }\n if (source[1] === '<') {\n const verbatim = source.slice(2, -1);\n if (verbatim === '!' || verbatim === '!!') {\n onError(`Verbatim tags aren't resolved, so ${source} is invalid.`);\n return null;\n }\n if (source[source.length - 1] !== '>')\n onError('Verbatim tags must end with a >');\n return verbatim;\n }\n const [, handle, suffix] = source.match(/^(.*!)([^!]*)$/);\n if (!suffix)\n onError(`The ${source} tag has no suffix`);\n const prefix = this.tags[handle];\n if (prefix)\n return prefix + decodeURIComponent(suffix);\n if (handle === '!')\n return source; // local tag\n onError(`Could not resolve tag: ${source}`);\n return null;\n }\n /**\n * Given a fully resolved tag, returns its printable string form,\n * taking into account current tag prefixes and defaults.\n */\n tagString(tag) {\n for (const [handle, prefix] of Object.entries(this.tags)) {\n if (tag.startsWith(prefix))\n return handle + escapeTagName(tag.substring(prefix.length));\n }\n return tag[0] === '!' ? tag : `!<${tag}>`;\n }\n toString(doc) {\n const lines = this.yaml.explicit\n ? [`%YAML ${this.yaml.version || '1.2'}`]\n : [];\n const tagEntries = Object.entries(this.tags);\n let tagNames;\n if (doc && tagEntries.length > 0 && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isNode)(doc.contents)) {\n const tags = {};\n (0,_visit_js__WEBPACK_IMPORTED_MODULE_1__.visit)(doc.contents, (_key, node) => {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isNode)(node) && node.tag)\n tags[node.tag] = true;\n });\n tagNames = Object.keys(tags);\n }\n else\n tagNames = [];\n for (const [handle, prefix] of tagEntries) {\n if (handle === '!!' && prefix === 'tag:yaml.org,2002:')\n continue;\n if (!doc || tagNames.some(tn => tn.startsWith(prefix)))\n lines.push(`%TAG ${handle} ${prefix}`);\n }\n return lines.join('\\n');\n }\n}\nDirectives.defaultYaml = { explicit: false, version: '1.2' };\nDirectives.defaultTags = { '!!': 'tag:yaml.org,2002:' };\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/doc/directives.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/errors.js": -/*!**************************************************!*\ - !*** ./node_modules/yaml/browser/dist/errors.js ***! - \**************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ YAMLError: () => (/* binding */ YAMLError),\n/* harmony export */ YAMLParseError: () => (/* binding */ YAMLParseError),\n/* harmony export */ YAMLWarning: () => (/* binding */ YAMLWarning),\n/* harmony export */ prettifyError: () => (/* binding */ prettifyError)\n/* harmony export */ });\nclass YAMLError extends Error {\n constructor(name, pos, code, message) {\n super();\n this.name = name;\n this.code = code;\n this.message = message;\n this.pos = pos;\n }\n}\nclass YAMLParseError extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLParseError', pos, code, message);\n }\n}\nclass YAMLWarning extends YAMLError {\n constructor(pos, code, message) {\n super('YAMLWarning', pos, code, message);\n }\n}\nconst prettifyError = (src, lc) => (error) => {\n if (error.pos[0] === -1)\n return;\n error.linePos = error.pos.map(pos => lc.linePos(pos));\n const { line, col } = error.linePos[0];\n error.message += ` at line ${line}, column ${col}`;\n let ci = col - 1;\n let lineStr = src\n .substring(lc.lineStarts[line - 1], lc.lineStarts[line])\n .replace(/[\\n\\r]+$/, '');\n // Trim to max 80 chars, keeping col position near the middle\n if (ci >= 60 && lineStr.length > 80) {\n const trimStart = Math.min(ci - 39, lineStr.length - 79);\n lineStr = '…' + lineStr.substring(trimStart);\n ci -= trimStart - 1;\n }\n if (lineStr.length > 80)\n lineStr = lineStr.substring(0, 79) + '…';\n // Include previous line in context if pointing at line start\n if (line > 1 && /^ *$/.test(lineStr.substring(0, ci))) {\n // Regexp won't match if start is trimmed\n let prev = src.substring(lc.lineStarts[line - 2], lc.lineStarts[line - 1]);\n if (prev.length > 80)\n prev = prev.substring(0, 79) + '…\\n';\n lineStr = prev + lineStr;\n }\n if (/[^ ]/.test(lineStr)) {\n let count = 1;\n const end = error.linePos[1];\n if (end && end.line === line && end.col > col) {\n count = Math.max(1, Math.min(end.col - col, 80 - ci));\n }\n const pointer = ' '.repeat(ci) + '^'.repeat(count);\n error.message += `:\\n\\n${lineStr}\\n${pointer}\\n`;\n }\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/errors.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/index.js": -/*!*************************************************!*\ - !*** ./node_modules/yaml/browser/dist/index.js ***! - \*************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Alias: () => (/* reexport safe */ _nodes_Alias_js__WEBPACK_IMPORTED_MODULE_4__.Alias),\n/* harmony export */ CST: () => (/* reexport module object */ _parse_cst_js__WEBPACK_IMPORTED_MODULE_10__),\n/* harmony export */ Composer: () => (/* reexport safe */ _compose_composer_js__WEBPACK_IMPORTED_MODULE_0__.Composer),\n/* harmony export */ Document: () => (/* reexport safe */ _doc_Document_js__WEBPACK_IMPORTED_MODULE_1__.Document),\n/* harmony export */ Lexer: () => (/* reexport safe */ _parse_lexer_js__WEBPACK_IMPORTED_MODULE_11__.Lexer),\n/* harmony export */ LineCounter: () => (/* reexport safe */ _parse_line_counter_js__WEBPACK_IMPORTED_MODULE_12__.LineCounter),\n/* harmony export */ Pair: () => (/* reexport safe */ _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_6__.Pair),\n/* harmony export */ Parser: () => (/* reexport safe */ _parse_parser_js__WEBPACK_IMPORTED_MODULE_13__.Parser),\n/* harmony export */ Scalar: () => (/* reexport safe */ _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_7__.Scalar),\n/* harmony export */ Schema: () => (/* reexport safe */ _schema_Schema_js__WEBPACK_IMPORTED_MODULE_2__.Schema),\n/* harmony export */ YAMLError: () => (/* reexport safe */ _errors_js__WEBPACK_IMPORTED_MODULE_3__.YAMLError),\n/* harmony export */ YAMLMap: () => (/* reexport safe */ _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_8__.YAMLMap),\n/* harmony export */ YAMLParseError: () => (/* reexport safe */ _errors_js__WEBPACK_IMPORTED_MODULE_3__.YAMLParseError),\n/* harmony export */ YAMLSeq: () => (/* reexport safe */ _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_9__.YAMLSeq),\n/* harmony export */ YAMLWarning: () => (/* reexport safe */ _errors_js__WEBPACK_IMPORTED_MODULE_3__.YAMLWarning),\n/* harmony export */ isAlias: () => (/* reexport safe */ _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__.isAlias),\n/* harmony export */ isCollection: () => (/* reexport safe */ _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__.isCollection),\n/* harmony export */ isDocument: () => (/* reexport safe */ _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__.isDocument),\n/* harmony export */ isMap: () => (/* reexport safe */ _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__.isMap),\n/* harmony export */ isNode: () => (/* reexport safe */ _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__.isNode),\n/* harmony export */ isPair: () => (/* reexport safe */ _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__.isPair),\n/* harmony export */ isScalar: () => (/* reexport safe */ _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__.isScalar),\n/* harmony export */ isSeq: () => (/* reexport safe */ _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__.isSeq),\n/* harmony export */ parse: () => (/* reexport safe */ _public_api_js__WEBPACK_IMPORTED_MODULE_14__.parse),\n/* harmony export */ parseAllDocuments: () => (/* reexport safe */ _public_api_js__WEBPACK_IMPORTED_MODULE_14__.parseAllDocuments),\n/* harmony export */ parseDocument: () => (/* reexport safe */ _public_api_js__WEBPACK_IMPORTED_MODULE_14__.parseDocument),\n/* harmony export */ stringify: () => (/* reexport safe */ _public_api_js__WEBPACK_IMPORTED_MODULE_14__.stringify),\n/* harmony export */ visit: () => (/* reexport safe */ _visit_js__WEBPACK_IMPORTED_MODULE_15__.visit),\n/* harmony export */ visitAsync: () => (/* reexport safe */ _visit_js__WEBPACK_IMPORTED_MODULE_15__.visitAsync)\n/* harmony export */ });\n/* harmony import */ var _compose_composer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose/composer.js */ \"./node_modules/yaml/browser/dist/compose/composer.js\");\n/* harmony import */ var _doc_Document_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./doc/Document.js */ \"./node_modules/yaml/browser/dist/doc/Document.js\");\n/* harmony import */ var _schema_Schema_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schema/Schema.js */ \"./node_modules/yaml/browser/dist/schema/Schema.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/yaml/browser/dist/errors.js\");\n/* harmony import */ var _nodes_Alias_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./nodes/Alias.js */ \"./node_modules/yaml/browser/dist/nodes/Alias.js\");\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nodes/Pair.js */ \"./node_modules/yaml/browser/dist/nodes/Pair.js\");\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./nodes/YAMLMap.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLMap.js\");\n/* harmony import */ var _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./nodes/YAMLSeq.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLSeq.js\");\n/* harmony import */ var _parse_cst_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./parse/cst.js */ \"./node_modules/yaml/browser/dist/parse/cst.js\");\n/* harmony import */ var _parse_lexer_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./parse/lexer.js */ \"./node_modules/yaml/browser/dist/parse/lexer.js\");\n/* harmony import */ var _parse_line_counter_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./parse/line-counter.js */ \"./node_modules/yaml/browser/dist/parse/line-counter.js\");\n/* harmony import */ var _parse_parser_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./parse/parser.js */ \"./node_modules/yaml/browser/dist/parse/parser.js\");\n/* harmony import */ var _public_api_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./public-api.js */ \"./node_modules/yaml/browser/dist/public-api.js\");\n/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./visit.js */ \"./node_modules/yaml/browser/dist/visit.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/index.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/log.js": -/*!***********************************************!*\ - !*** ./node_modules/yaml/browser/dist/log.js ***! - \***********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ debug: () => (/* binding */ debug),\n/* harmony export */ warn: () => (/* binding */ warn)\n/* harmony export */ });\nfunction debug(logLevel, ...messages) {\n if (logLevel === 'debug')\n console.log(...messages);\n}\nfunction warn(logLevel, warning) {\n if (logLevel === 'debug' || logLevel === 'warn') {\n // https://github.com/typescript-eslint/typescript-eslint/issues/7478\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n if (typeof process !== 'undefined' && process.emitWarning)\n process.emitWarning(warning);\n else\n console.warn(warning);\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/log.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/Alias.js": -/*!*******************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/Alias.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Alias: () => (/* binding */ Alias)\n/* harmony export */ });\n/* harmony import */ var _doc_anchors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../doc/anchors.js */ \"./node_modules/yaml/browser/dist/doc/anchors.js\");\n/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../visit.js */ \"./node_modules/yaml/browser/dist/visit.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _Node_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Node.js */ \"./node_modules/yaml/browser/dist/nodes/Node.js\");\n/* harmony import */ var _toJS_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toJS.js */ \"./node_modules/yaml/browser/dist/nodes/toJS.js\");\n\n\n\n\n\n\nclass Alias extends _Node_js__WEBPACK_IMPORTED_MODULE_3__.NodeBase {\n constructor(source) {\n super(_identity_js__WEBPACK_IMPORTED_MODULE_2__.ALIAS);\n this.source = source;\n Object.defineProperty(this, 'tag', {\n set() {\n throw new Error('Alias nodes cannot have tags');\n }\n });\n }\n /**\n * Resolve the value of this alias within `doc`, finding the last\n * instance of the `source` anchor before this node.\n */\n resolve(doc) {\n let found = undefined;\n (0,_visit_js__WEBPACK_IMPORTED_MODULE_1__.visit)(doc, {\n Node: (_key, node) => {\n if (node === this)\n return _visit_js__WEBPACK_IMPORTED_MODULE_1__.visit.BREAK;\n if (node.anchor === this.source)\n found = node;\n }\n });\n return found;\n }\n toJSON(_arg, ctx) {\n if (!ctx)\n return { source: this.source };\n const { anchors, doc, maxAliasCount } = ctx;\n const source = this.resolve(doc);\n if (!source) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new ReferenceError(msg);\n }\n let data = anchors.get(source);\n if (!data) {\n // Resolve anchors for Node.prototype.toJS()\n (0,_toJS_js__WEBPACK_IMPORTED_MODULE_4__.toJS)(source, null, ctx);\n data = anchors.get(source);\n }\n /* istanbul ignore if */\n if (!data || data.res === undefined) {\n const msg = 'This should not happen: Alias anchor was not resolved?';\n throw new ReferenceError(msg);\n }\n if (maxAliasCount >= 0) {\n data.count += 1;\n if (data.aliasCount === 0)\n data.aliasCount = getAliasCount(doc, source, anchors);\n if (data.count * data.aliasCount > maxAliasCount) {\n const msg = 'Excessive alias count indicates a resource exhaustion attack';\n throw new ReferenceError(msg);\n }\n }\n return data.res;\n }\n toString(ctx, _onComment, _onChompKeep) {\n const src = `*${this.source}`;\n if (ctx) {\n (0,_doc_anchors_js__WEBPACK_IMPORTED_MODULE_0__.anchorIsValid)(this.source);\n if (ctx.options.verifyAliasOrder && !ctx.anchors.has(this.source)) {\n const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;\n throw new Error(msg);\n }\n if (ctx.implicitKey)\n return `${src} `;\n }\n return src;\n }\n}\nfunction getAliasCount(doc, node, anchors) {\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isAlias)(node)) {\n const source = node.resolve(doc);\n const anchor = anchors && source && anchors.get(source);\n return anchor ? anchor.count * anchor.aliasCount : 0;\n }\n else if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isCollection)(node)) {\n let count = 0;\n for (const item of node.items) {\n const c = getAliasCount(doc, item, anchors);\n if (c > count)\n count = c;\n }\n return count;\n }\n else if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isPair)(node)) {\n const kc = getAliasCount(doc, node.key, anchors);\n const vc = getAliasCount(doc, node.value, anchors);\n return Math.max(kc, vc);\n }\n return 1;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/Alias.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/Collection.js": -/*!************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/Collection.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Collection: () => (/* binding */ Collection),\n/* harmony export */ collectionFromPath: () => (/* binding */ collectionFromPath),\n/* harmony export */ isEmptyPath: () => (/* binding */ isEmptyPath)\n/* harmony export */ });\n/* harmony import */ var _doc_createNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../doc/createNode.js */ \"./node_modules/yaml/browser/dist/doc/createNode.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _Node_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Node.js */ \"./node_modules/yaml/browser/dist/nodes/Node.js\");\n\n\n\n\nfunction collectionFromPath(schema, path, value) {\n let v = value;\n for (let i = path.length - 1; i >= 0; --i) {\n const k = path[i];\n if (typeof k === 'number' && Number.isInteger(k) && k >= 0) {\n const a = [];\n a[k] = v;\n v = a;\n }\n else {\n v = new Map([[k, v]]);\n }\n }\n return (0,_doc_createNode_js__WEBPACK_IMPORTED_MODULE_0__.createNode)(v, undefined, {\n aliasDuplicateObjects: false,\n keepUndefined: false,\n onAnchor: () => {\n throw new Error('This should not happen, please report a bug.');\n },\n schema,\n sourceObjects: new Map()\n });\n}\n// Type guard is intentionally a little wrong so as to be more useful,\n// as it does not cover untypable empty non-string iterables (e.g. []).\nconst isEmptyPath = (path) => path == null ||\n (typeof path === 'object' && !!path[Symbol.iterator]().next().done);\nclass Collection extends _Node_js__WEBPACK_IMPORTED_MODULE_2__.NodeBase {\n constructor(type, schema) {\n super(type);\n Object.defineProperty(this, 'schema', {\n value: schema,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n /**\n * Create a copy of this collection.\n *\n * @param schema - If defined, overwrites the original's schema\n */\n clone(schema) {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (schema)\n copy.schema = schema;\n copy.items = copy.items.map(it => (0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isNode)(it) || (0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isPair)(it) ? it.clone(schema) : it);\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /**\n * Adds a value to the collection. For `!!map` and `!!omap` the value must\n * be a Pair instance or a `{ key, value }` object, which may not have a key\n * that already exists in the map.\n */\n addIn(path, value) {\n if (isEmptyPath(path))\n this.add(value);\n else {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isCollection)(node))\n node.addIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n /**\n * Removes a value from the collection.\n * @returns `true` if the item was found and removed.\n */\n deleteIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.delete(key);\n const node = this.get(key, true);\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isCollection)(node))\n return node.deleteIn(rest);\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n /**\n * Returns item at `key`, or `undefined` if not found. By default unwraps\n * scalar values from their surrounding node; to disable set `keepScalar` to\n * `true` (collections are always returned intact).\n */\n getIn(path, keepScalar) {\n const [key, ...rest] = path;\n const node = this.get(key, true);\n if (rest.length === 0)\n return !keepScalar && (0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isScalar)(node) ? node.value : node;\n else\n return (0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isCollection)(node) ? node.getIn(rest, keepScalar) : undefined;\n }\n hasAllNullValues(allowScalar) {\n return this.items.every(node => {\n if (!(0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isPair)(node))\n return false;\n const n = node.value;\n return (n == null ||\n (allowScalar &&\n (0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isScalar)(n) &&\n n.value == null &&\n !n.commentBefore &&\n !n.comment &&\n !n.tag));\n });\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n */\n hasIn(path) {\n const [key, ...rest] = path;\n if (rest.length === 0)\n return this.has(key);\n const node = this.get(key, true);\n return (0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isCollection)(node) ? node.hasIn(rest) : false;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n */\n setIn(path, value) {\n const [key, ...rest] = path;\n if (rest.length === 0) {\n this.set(key, value);\n }\n else {\n const node = this.get(key, true);\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isCollection)(node))\n node.setIn(rest, value);\n else if (node === undefined && this.schema)\n this.set(key, collectionFromPath(this.schema, rest, value));\n else\n throw new Error(`Expected YAML collection at ${key}. Remaining path: ${rest}`);\n }\n }\n}\nCollection.maxFlowStringSingleLineLength = 60;\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/Collection.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/Node.js": -/*!******************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/Node.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NodeBase: () => (/* binding */ NodeBase)\n/* harmony export */ });\n/* harmony import */ var _doc_applyReviver_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../doc/applyReviver.js */ \"./node_modules/yaml/browser/dist/doc/applyReviver.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _toJS_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./toJS.js */ \"./node_modules/yaml/browser/dist/nodes/toJS.js\");\n\n\n\n\nclass NodeBase {\n constructor(type) {\n Object.defineProperty(this, _identity_js__WEBPACK_IMPORTED_MODULE_1__.NODE_TYPE, { value: type });\n }\n /** Create a copy of this node. */\n clone() {\n const copy = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));\n if (this.range)\n copy.range = this.range.slice();\n return copy;\n }\n /** A plain JavaScript representation of this node. */\n toJS(doc, { mapAsMap, maxAliasCount, onAnchor, reviver } = {}) {\n if (!(0,_identity_js__WEBPACK_IMPORTED_MODULE_1__.isDocument)(doc))\n throw new TypeError('A document argument is required');\n const ctx = {\n anchors: new Map(),\n doc,\n keep: true,\n mapAsMap: mapAsMap === true,\n mapKeyWarned: false,\n maxAliasCount: typeof maxAliasCount === 'number' ? maxAliasCount : 100\n };\n const res = (0,_toJS_js__WEBPACK_IMPORTED_MODULE_2__.toJS)(this, '', ctx);\n if (typeof onAnchor === 'function')\n for (const { count, res } of ctx.anchors.values())\n onAnchor(res, count);\n return typeof reviver === 'function'\n ? (0,_doc_applyReviver_js__WEBPACK_IMPORTED_MODULE_0__.applyReviver)(reviver, { '': res }, '', res)\n : res;\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/Node.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/Pair.js": -/*!******************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/Pair.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Pair: () => (/* binding */ Pair),\n/* harmony export */ createPair: () => (/* binding */ createPair)\n/* harmony export */ });\n/* harmony import */ var _doc_createNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../doc/createNode.js */ \"./node_modules/yaml/browser/dist/doc/createNode.js\");\n/* harmony import */ var _stringify_stringifyPair_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stringify/stringifyPair.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyPair.js\");\n/* harmony import */ var _addPairToJSMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./addPairToJSMap.js */ \"./node_modules/yaml/browser/dist/nodes/addPairToJSMap.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n\n\n\n\n\nfunction createPair(key, value, ctx) {\n const k = (0,_doc_createNode_js__WEBPACK_IMPORTED_MODULE_0__.createNode)(key, undefined, ctx);\n const v = (0,_doc_createNode_js__WEBPACK_IMPORTED_MODULE_0__.createNode)(value, undefined, ctx);\n return new Pair(k, v);\n}\nclass Pair {\n constructor(key, value = null) {\n Object.defineProperty(this, _identity_js__WEBPACK_IMPORTED_MODULE_3__.NODE_TYPE, { value: _identity_js__WEBPACK_IMPORTED_MODULE_3__.PAIR });\n this.key = key;\n this.value = value;\n }\n clone(schema) {\n let { key, value } = this;\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isNode)(key))\n key = key.clone(schema);\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isNode)(value))\n value = value.clone(schema);\n return new Pair(key, value);\n }\n toJSON(_, ctx) {\n const pair = ctx?.mapAsMap ? new Map() : {};\n return (0,_addPairToJSMap_js__WEBPACK_IMPORTED_MODULE_2__.addPairToJSMap)(ctx, pair, this);\n }\n toString(ctx, onComment, onChompKeep) {\n return ctx?.doc\n ? (0,_stringify_stringifyPair_js__WEBPACK_IMPORTED_MODULE_1__.stringifyPair)(this, ctx, onComment, onChompKeep)\n : JSON.stringify(this);\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/Pair.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/Scalar.js": -/*!********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/Scalar.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Scalar: () => (/* binding */ Scalar),\n/* harmony export */ isScalarValue: () => (/* binding */ isScalarValue)\n/* harmony export */ });\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _Node_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Node.js */ \"./node_modules/yaml/browser/dist/nodes/Node.js\");\n/* harmony import */ var _toJS_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./toJS.js */ \"./node_modules/yaml/browser/dist/nodes/toJS.js\");\n\n\n\n\nconst isScalarValue = (value) => !value || (typeof value !== 'function' && typeof value !== 'object');\nclass Scalar extends _Node_js__WEBPACK_IMPORTED_MODULE_1__.NodeBase {\n constructor(value) {\n super(_identity_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR);\n this.value = value;\n }\n toJSON(arg, ctx) {\n return ctx?.keep ? this.value : (0,_toJS_js__WEBPACK_IMPORTED_MODULE_2__.toJS)(this.value, arg, ctx);\n }\n toString() {\n return String(this.value);\n }\n}\nScalar.BLOCK_FOLDED = 'BLOCK_FOLDED';\nScalar.BLOCK_LITERAL = 'BLOCK_LITERAL';\nScalar.PLAIN = 'PLAIN';\nScalar.QUOTE_DOUBLE = 'QUOTE_DOUBLE';\nScalar.QUOTE_SINGLE = 'QUOTE_SINGLE';\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/Scalar.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/YAMLMap.js": -/*!*********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/YAMLMap.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ YAMLMap: () => (/* binding */ YAMLMap),\n/* harmony export */ findPair: () => (/* binding */ findPair)\n/* harmony export */ });\n/* harmony import */ var _stringify_stringifyCollection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stringify/stringifyCollection.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyCollection.js\");\n/* harmony import */ var _addPairToJSMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./addPairToJSMap.js */ \"./node_modules/yaml/browser/dist/nodes/addPairToJSMap.js\");\n/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Collection.js */ \"./node_modules/yaml/browser/dist/nodes/Collection.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _Pair_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Pair.js */ \"./node_modules/yaml/browser/dist/nodes/Pair.js\");\n/* harmony import */ var _Scalar_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n\n\n\n\n\n\n\nfunction findPair(items, key) {\n const k = (0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isScalar)(key) ? key.value : key;\n for (const it of items) {\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isPair)(it)) {\n if (it.key === key || it.key === k)\n return it;\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isScalar)(it.key) && it.key.value === k)\n return it;\n }\n }\n return undefined;\n}\nclass YAMLMap extends _Collection_js__WEBPACK_IMPORTED_MODULE_2__.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:map';\n }\n constructor(schema) {\n super(_identity_js__WEBPACK_IMPORTED_MODULE_3__.MAP, schema);\n this.items = [];\n }\n /**\n * A generic collection parsing method that can be extended\n * to other node classes that inherit from YAMLMap\n */\n static from(schema, obj, ctx) {\n const { keepUndefined, replacer } = ctx;\n const map = new this(schema);\n const add = (key, value) => {\n if (typeof replacer === 'function')\n value = replacer.call(obj, key, value);\n else if (Array.isArray(replacer) && !replacer.includes(key))\n return;\n if (value !== undefined || keepUndefined)\n map.items.push((0,_Pair_js__WEBPACK_IMPORTED_MODULE_4__.createPair)(key, value, ctx));\n };\n if (obj instanceof Map) {\n for (const [key, value] of obj)\n add(key, value);\n }\n else if (obj && typeof obj === 'object') {\n for (const key of Object.keys(obj))\n add(key, obj[key]);\n }\n if (typeof schema.sortMapEntries === 'function') {\n map.items.sort(schema.sortMapEntries);\n }\n return map;\n }\n /**\n * Adds a value to the collection.\n *\n * @param overwrite - If not set `true`, using a key that is already in the\n * collection will throw. Otherwise, overwrites the previous value.\n */\n add(pair, overwrite) {\n let _pair;\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isPair)(pair))\n _pair = pair;\n else if (!pair || typeof pair !== 'object' || !('key' in pair)) {\n // In TypeScript, this never happens.\n _pair = new _Pair_js__WEBPACK_IMPORTED_MODULE_4__.Pair(pair, pair?.value);\n }\n else\n _pair = new _Pair_js__WEBPACK_IMPORTED_MODULE_4__.Pair(pair.key, pair.value);\n const prev = findPair(this.items, _pair.key);\n const sortEntries = this.schema?.sortMapEntries;\n if (prev) {\n if (!overwrite)\n throw new Error(`Key ${_pair.key} already set`);\n // For scalars, keep the old node & its comments and anchors\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isScalar)(prev.value) && (0,_Scalar_js__WEBPACK_IMPORTED_MODULE_5__.isScalarValue)(_pair.value))\n prev.value.value = _pair.value;\n else\n prev.value = _pair.value;\n }\n else if (sortEntries) {\n const i = this.items.findIndex(item => sortEntries(_pair, item) < 0);\n if (i === -1)\n this.items.push(_pair);\n else\n this.items.splice(i, 0, _pair);\n }\n else {\n this.items.push(_pair);\n }\n }\n delete(key) {\n const it = findPair(this.items, key);\n if (!it)\n return false;\n const del = this.items.splice(this.items.indexOf(it), 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const it = findPair(this.items, key);\n const node = it?.value;\n return (!keepScalar && (0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isScalar)(node) ? node.value : node) ?? undefined;\n }\n has(key) {\n return !!findPair(this.items, key);\n }\n set(key, value) {\n this.add(new _Pair_js__WEBPACK_IMPORTED_MODULE_4__.Pair(key, value), true);\n }\n /**\n * @param ctx - Conversion context, originally set in Document#toJS()\n * @param {Class} Type - If set, forces the returned collection type\n * @returns Instance of Type, Map, or Object\n */\n toJSON(_, ctx, Type) {\n const map = Type ? new Type() : ctx?.mapAsMap ? new Map() : {};\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const item of this.items)\n (0,_addPairToJSMap_js__WEBPACK_IMPORTED_MODULE_1__.addPairToJSMap)(ctx, map, item);\n return map;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n for (const item of this.items) {\n if (!(0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isPair)(item))\n throw new Error(`Map items must all be pairs; found ${JSON.stringify(item)} instead`);\n }\n if (!ctx.allNullValues && this.hasAllNullValues(false))\n ctx = Object.assign({}, ctx, { allNullValues: true });\n return (0,_stringify_stringifyCollection_js__WEBPACK_IMPORTED_MODULE_0__.stringifyCollection)(this, ctx, {\n blockItemPrefix: '',\n flowChars: { start: '{', end: '}' },\n itemIndent: ctx.indent || '',\n onChompKeep,\n onComment\n });\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/YAMLMap.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/YAMLSeq.js": -/*!*********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/YAMLSeq.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ YAMLSeq: () => (/* binding */ YAMLSeq)\n/* harmony export */ });\n/* harmony import */ var _doc_createNode_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../doc/createNode.js */ \"./node_modules/yaml/browser/dist/doc/createNode.js\");\n/* harmony import */ var _stringify_stringifyCollection_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stringify/stringifyCollection.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyCollection.js\");\n/* harmony import */ var _Collection_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Collection.js */ \"./node_modules/yaml/browser/dist/nodes/Collection.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _Scalar_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _toJS_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./toJS.js */ \"./node_modules/yaml/browser/dist/nodes/toJS.js\");\n\n\n\n\n\n\n\nclass YAMLSeq extends _Collection_js__WEBPACK_IMPORTED_MODULE_2__.Collection {\n static get tagName() {\n return 'tag:yaml.org,2002:seq';\n }\n constructor(schema) {\n super(_identity_js__WEBPACK_IMPORTED_MODULE_3__.SEQ, schema);\n this.items = [];\n }\n add(value) {\n this.items.push(value);\n }\n /**\n * Removes a value from the collection.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n *\n * @returns `true` if the item was found and removed.\n */\n delete(key) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return false;\n const del = this.items.splice(idx, 1);\n return del.length > 0;\n }\n get(key, keepScalar) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n return undefined;\n const it = this.items[idx];\n return !keepScalar && (0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isScalar)(it) ? it.value : it;\n }\n /**\n * Checks if the collection includes a value with the key `key`.\n *\n * `key` must contain a representation of an integer for this to succeed.\n * It may be wrapped in a `Scalar`.\n */\n has(key) {\n const idx = asItemIndex(key);\n return typeof idx === 'number' && idx < this.items.length;\n }\n /**\n * Sets a value in this collection. For `!!set`, `value` needs to be a\n * boolean to add/remove the item from the set.\n *\n * If `key` does not contain a representation of an integer, this will throw.\n * It may be wrapped in a `Scalar`.\n */\n set(key, value) {\n const idx = asItemIndex(key);\n if (typeof idx !== 'number')\n throw new Error(`Expected a valid index, not ${key}.`);\n const prev = this.items[idx];\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isScalar)(prev) && (0,_Scalar_js__WEBPACK_IMPORTED_MODULE_4__.isScalarValue)(value))\n prev.value = value;\n else\n this.items[idx] = value;\n }\n toJSON(_, ctx) {\n const seq = [];\n if (ctx?.onCreate)\n ctx.onCreate(seq);\n let i = 0;\n for (const item of this.items)\n seq.push((0,_toJS_js__WEBPACK_IMPORTED_MODULE_5__.toJS)(item, String(i++), ctx));\n return seq;\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n return (0,_stringify_stringifyCollection_js__WEBPACK_IMPORTED_MODULE_1__.stringifyCollection)(this, ctx, {\n blockItemPrefix: '- ',\n flowChars: { start: '[', end: ']' },\n itemIndent: (ctx.indent || '') + ' ',\n onChompKeep,\n onComment\n });\n }\n static from(schema, obj, ctx) {\n const { replacer } = ctx;\n const seq = new this(schema);\n if (obj && Symbol.iterator in Object(obj)) {\n let i = 0;\n for (let it of obj) {\n if (typeof replacer === 'function') {\n const key = obj instanceof Set ? it : String(i++);\n it = replacer.call(obj, key, it);\n }\n seq.items.push((0,_doc_createNode_js__WEBPACK_IMPORTED_MODULE_0__.createNode)(it, undefined, ctx));\n }\n }\n return seq;\n }\n}\nfunction asItemIndex(key) {\n let idx = (0,_identity_js__WEBPACK_IMPORTED_MODULE_3__.isScalar)(key) ? key.value : key;\n if (idx && typeof idx === 'string')\n idx = Number(idx);\n return typeof idx === 'number' && Number.isInteger(idx) && idx >= 0\n ? idx\n : null;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/YAMLSeq.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/addPairToJSMap.js": -/*!****************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/addPairToJSMap.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ addPairToJSMap: () => (/* binding */ addPairToJSMap)\n/* harmony export */ });\n/* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../log.js */ \"./node_modules/yaml/browser/dist/log.js\");\n/* harmony import */ var _stringify_stringify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stringify/stringify.js */ \"./node_modules/yaml/browser/dist/stringify/stringify.js\");\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _Scalar_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _toJS_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toJS.js */ \"./node_modules/yaml/browser/dist/nodes/toJS.js\");\n\n\n\n\n\n\nconst MERGE_KEY = '<<';\nfunction addPairToJSMap(ctx, map, { key, value }) {\n if (ctx?.doc.schema.merge && isMergeKey(key)) {\n value = (0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isAlias)(value) ? value.resolve(ctx.doc) : value;\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isSeq)(value))\n for (const it of value.items)\n mergeToJSMap(ctx, map, it);\n else if (Array.isArray(value))\n for (const it of value)\n mergeToJSMap(ctx, map, it);\n else\n mergeToJSMap(ctx, map, value);\n }\n else {\n const jsKey = (0,_toJS_js__WEBPACK_IMPORTED_MODULE_4__.toJS)(key, '', ctx);\n if (map instanceof Map) {\n map.set(jsKey, (0,_toJS_js__WEBPACK_IMPORTED_MODULE_4__.toJS)(value, jsKey, ctx));\n }\n else if (map instanceof Set) {\n map.add(jsKey);\n }\n else {\n const stringKey = stringifyKey(key, jsKey, ctx);\n const jsValue = (0,_toJS_js__WEBPACK_IMPORTED_MODULE_4__.toJS)(value, stringKey, ctx);\n if (stringKey in map)\n Object.defineProperty(map, stringKey, {\n value: jsValue,\n writable: true,\n enumerable: true,\n configurable: true\n });\n else\n map[stringKey] = jsValue;\n }\n }\n return map;\n}\nconst isMergeKey = (key) => key === MERGE_KEY ||\n ((0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isScalar)(key) &&\n key.value === MERGE_KEY &&\n (!key.type || key.type === _Scalar_js__WEBPACK_IMPORTED_MODULE_3__.Scalar.PLAIN));\n// If the value associated with a merge key is a single mapping node, each of\n// its key/value pairs is inserted into the current mapping, unless the key\n// already exists in it. If the value associated with the merge key is a\n// sequence, then this sequence is expected to contain mapping nodes and each\n// of these nodes is merged in turn according to its order in the sequence.\n// Keys in mapping nodes earlier in the sequence override keys specified in\n// later mapping nodes. -- http://yaml.org/type/merge.html\nfunction mergeToJSMap(ctx, map, value) {\n const source = ctx && (0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isAlias)(value) ? value.resolve(ctx.doc) : value;\n if (!(0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isMap)(source))\n throw new Error('Merge sources must be maps or map aliases');\n const srcMap = source.toJSON(null, ctx, Map);\n for (const [key, value] of srcMap) {\n if (map instanceof Map) {\n if (!map.has(key))\n map.set(key, value);\n }\n else if (map instanceof Set) {\n map.add(key);\n }\n else if (!Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(map, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true\n });\n }\n }\n return map;\n}\nfunction stringifyKey(key, jsKey, ctx) {\n if (jsKey === null)\n return '';\n if (typeof jsKey !== 'object')\n return String(jsKey);\n if ((0,_identity_js__WEBPACK_IMPORTED_MODULE_2__.isNode)(key) && ctx?.doc) {\n const strCtx = (0,_stringify_stringify_js__WEBPACK_IMPORTED_MODULE_1__.createStringifyContext)(ctx.doc, {});\n strCtx.anchors = new Set();\n for (const node of ctx.anchors.keys())\n strCtx.anchors.add(node.anchor);\n strCtx.inFlow = true;\n strCtx.inStringifyKey = true;\n const strKey = key.toString(strCtx);\n if (!ctx.mapKeyWarned) {\n let jsonStr = JSON.stringify(strKey);\n if (jsonStr.length > 40)\n jsonStr = jsonStr.substring(0, 36) + '...\"';\n (0,_log_js__WEBPACK_IMPORTED_MODULE_0__.warn)(ctx.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${jsonStr}. Set mapAsMap: true to use object keys.`);\n ctx.mapKeyWarned = true;\n }\n return strKey;\n }\n return JSON.stringify(jsKey);\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/addPairToJSMap.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/identity.js": -/*!**********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/identity.js ***! - \**********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ALIAS: () => (/* binding */ ALIAS),\n/* harmony export */ DOC: () => (/* binding */ DOC),\n/* harmony export */ MAP: () => (/* binding */ MAP),\n/* harmony export */ NODE_TYPE: () => (/* binding */ NODE_TYPE),\n/* harmony export */ PAIR: () => (/* binding */ PAIR),\n/* harmony export */ SCALAR: () => (/* binding */ SCALAR),\n/* harmony export */ SEQ: () => (/* binding */ SEQ),\n/* harmony export */ hasAnchor: () => (/* binding */ hasAnchor),\n/* harmony export */ isAlias: () => (/* binding */ isAlias),\n/* harmony export */ isCollection: () => (/* binding */ isCollection),\n/* harmony export */ isDocument: () => (/* binding */ isDocument),\n/* harmony export */ isMap: () => (/* binding */ isMap),\n/* harmony export */ isNode: () => (/* binding */ isNode),\n/* harmony export */ isPair: () => (/* binding */ isPair),\n/* harmony export */ isScalar: () => (/* binding */ isScalar),\n/* harmony export */ isSeq: () => (/* binding */ isSeq)\n/* harmony export */ });\nconst ALIAS = Symbol.for('yaml.alias');\nconst DOC = Symbol.for('yaml.document');\nconst MAP = Symbol.for('yaml.map');\nconst PAIR = Symbol.for('yaml.pair');\nconst SCALAR = Symbol.for('yaml.scalar');\nconst SEQ = Symbol.for('yaml.seq');\nconst NODE_TYPE = Symbol.for('yaml.node.type');\nconst isAlias = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === ALIAS;\nconst isDocument = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === DOC;\nconst isMap = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === MAP;\nconst isPair = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === PAIR;\nconst isScalar = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SCALAR;\nconst isSeq = (node) => !!node && typeof node === 'object' && node[NODE_TYPE] === SEQ;\nfunction isCollection(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case MAP:\n case SEQ:\n return true;\n }\n return false;\n}\nfunction isNode(node) {\n if (node && typeof node === 'object')\n switch (node[NODE_TYPE]) {\n case ALIAS:\n case MAP:\n case SCALAR:\n case SEQ:\n return true;\n }\n return false;\n}\nconst hasAnchor = (node) => (isScalar(node) || isCollection(node)) && !!node.anchor;\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/identity.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/nodes/toJS.js": -/*!******************************************************!*\ - !*** ./node_modules/yaml/browser/dist/nodes/toJS.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ toJS: () => (/* binding */ toJS)\n/* harmony export */ });\n/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n\n\n/**\n * Recursively convert any node or its contents to native JavaScript\n *\n * @param value - The input value\n * @param arg - If `value` defines a `toJSON()` method, use this\n * as its first argument\n * @param ctx - Conversion context, originally set in Document#toJS(). If\n * `{ keep: true }` is not set, output should be suitable for JSON\n * stringification.\n */\nfunction toJS(value, arg, ctx) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n if (Array.isArray(value))\n return value.map((v, i) => toJS(v, String(i), ctx));\n if (value && typeof value.toJSON === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n if (!ctx || !(0,_identity_js__WEBPACK_IMPORTED_MODULE_0__.hasAnchor)(value))\n return value.toJSON(arg, ctx);\n const data = { aliasCount: 0, count: 1, res: undefined };\n ctx.anchors.set(value, data);\n ctx.onCreate = res => {\n data.res = res;\n delete ctx.onCreate;\n };\n const res = value.toJSON(arg, ctx);\n if (ctx.onCreate)\n ctx.onCreate(res);\n return res;\n }\n if (typeof value === 'bigint' && !ctx?.keep)\n return Number(value);\n return value;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/nodes/toJS.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/parse/cst-scalar.js": -/*!************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/parse/cst-scalar.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createScalarToken: () => (/* binding */ createScalarToken),\n/* harmony export */ resolveAsScalar: () => (/* binding */ resolveAsScalar),\n/* harmony export */ setScalarValue: () => (/* binding */ setScalarValue)\n/* harmony export */ });\n/* harmony import */ var _compose_resolve_block_scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../compose/resolve-block-scalar.js */ \"./node_modules/yaml/browser/dist/compose/resolve-block-scalar.js\");\n/* harmony import */ var _compose_resolve_flow_scalar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../compose/resolve-flow-scalar.js */ \"./node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../errors.js */ \"./node_modules/yaml/browser/dist/errors.js\");\n/* harmony import */ var _stringify_stringifyString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../stringify/stringifyString.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyString.js\");\n\n\n\n\n\nfunction resolveAsScalar(token, strict = true, onError) {\n if (token) {\n const _onError = (pos, code, message) => {\n const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;\n if (onError)\n onError(offset, code, message);\n else\n throw new _errors_js__WEBPACK_IMPORTED_MODULE_2__.YAMLParseError([offset, offset + 1], code, message);\n };\n switch (token.type) {\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return (0,_compose_resolve_flow_scalar_js__WEBPACK_IMPORTED_MODULE_1__.resolveFlowScalar)(token, strict, _onError);\n case 'block-scalar':\n return (0,_compose_resolve_block_scalar_js__WEBPACK_IMPORTED_MODULE_0__.resolveBlockScalar)(token, strict, _onError);\n }\n }\n return null;\n}\n/**\n * Create a new scalar token with `value`\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.indent The indent level of the token.\n * @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.\n * @param context.offset The offset position of the token.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction createScalarToken(value, context) {\n const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;\n const source = (0,_stringify_stringifyString_js__WEBPACK_IMPORTED_MODULE_3__.stringifyString)({ type, value }, {\n implicitKey,\n indent: indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n const end = context.end ?? [\n { type: 'newline', offset: -1, indent, source: '\\n' }\n ];\n switch (source[0]) {\n case '|':\n case '>': {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, end))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n return { type: 'block-scalar', offset, indent, props, source: body };\n }\n case '\"':\n return { type: 'double-quoted-scalar', offset, indent, source, end };\n case \"'\":\n return { type: 'single-quoted-scalar', offset, indent, source, end };\n default:\n return { type: 'scalar', offset, indent, source, end };\n }\n}\n/**\n * Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.\n *\n * Best efforts are made to retain any comments previously associated with the `token`,\n * though all contents within a collection's `items` will be overwritten.\n *\n * Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,\n * as this function does not support any schema operations and won't check for such conflicts.\n *\n * @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.\n * @param value The string representation of the value, which will have its content properly indented.\n * @param context.afterKey In most cases, values after a key should have an additional level of indentation.\n * @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.\n * @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.\n * @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.\n */\nfunction setScalarValue(token, value, context = {}) {\n let { afterKey = false, implicitKey = false, inFlow = false, type } = context;\n let indent = 'indent' in token ? token.indent : null;\n if (afterKey && typeof indent === 'number')\n indent += 2;\n if (!type)\n switch (token.type) {\n case 'single-quoted-scalar':\n type = 'QUOTE_SINGLE';\n break;\n case 'double-quoted-scalar':\n type = 'QUOTE_DOUBLE';\n break;\n case 'block-scalar': {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';\n break;\n }\n default:\n type = 'PLAIN';\n }\n const source = (0,_stringify_stringifyString_js__WEBPACK_IMPORTED_MODULE_3__.stringifyString)({ type, value }, {\n implicitKey: implicitKey || indent === null,\n indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',\n inFlow,\n options: { blockQuote: true, lineWidth: -1 }\n });\n switch (source[0]) {\n case '|':\n case '>':\n setBlockScalarValue(token, source);\n break;\n case '\"':\n setFlowScalarValue(token, source, 'double-quoted-scalar');\n break;\n case \"'\":\n setFlowScalarValue(token, source, 'single-quoted-scalar');\n break;\n default:\n setFlowScalarValue(token, source, 'scalar');\n }\n}\nfunction setBlockScalarValue(token, source) {\n const he = source.indexOf('\\n');\n const head = source.substring(0, he);\n const body = source.substring(he + 1) + '\\n';\n if (token.type === 'block-scalar') {\n const header = token.props[0];\n if (header.type !== 'block-scalar-header')\n throw new Error('Invalid block scalar header');\n header.source = head;\n token.source = body;\n }\n else {\n const { offset } = token;\n const indent = 'indent' in token ? token.indent : -1;\n const props = [\n { type: 'block-scalar-header', offset, indent, source: head }\n ];\n if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))\n props.push({ type: 'newline', offset: -1, indent, source: '\\n' });\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type: 'block-scalar', indent, props, source: body });\n }\n}\n/** @returns `true` if last token is a newline */\nfunction addEndtoBlockProps(props, end) {\n if (end)\n for (const st of end)\n switch (st.type) {\n case 'space':\n case 'comment':\n props.push(st);\n break;\n case 'newline':\n props.push(st);\n return true;\n }\n return false;\n}\nfunction setFlowScalarValue(token, source, type) {\n switch (token.type) {\n case 'scalar':\n case 'double-quoted-scalar':\n case 'single-quoted-scalar':\n token.type = type;\n token.source = source;\n break;\n case 'block-scalar': {\n const end = token.props.slice(1);\n let oa = source.length;\n if (token.props[0].type === 'block-scalar-header')\n oa -= token.props[0].source.length;\n for (const tok of end)\n tok.offset += oa;\n delete token.props;\n Object.assign(token, { type, source, end });\n break;\n }\n case 'block-map':\n case 'block-seq': {\n const offset = token.offset + source.length;\n const nl = { type: 'newline', offset, indent: token.indent, source: '\\n' };\n delete token.items;\n Object.assign(token, { type, source, end: [nl] });\n break;\n }\n default: {\n const indent = 'indent' in token ? token.indent : -1;\n const end = 'end' in token && Array.isArray(token.end)\n ? token.end.filter(st => st.type === 'space' ||\n st.type === 'comment' ||\n st.type === 'newline')\n : [];\n for (const key of Object.keys(token))\n if (key !== 'type' && key !== 'offset')\n delete token[key];\n Object.assign(token, { type, indent, source, end });\n }\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/parse/cst-scalar.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/parse/cst-stringify.js": -/*!***************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/parse/cst-stringify.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ stringify: () => (/* binding */ stringify)\n/* harmony export */ });\n/**\n * Stringify a CST document, token, or collection item\n *\n * Fair warning: This applies no validation whatsoever, and\n * simply concatenates the sources in their logical order.\n */\nconst stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);\nfunction stringifyToken(token) {\n switch (token.type) {\n case 'block-scalar': {\n let res = '';\n for (const tok of token.props)\n res += stringifyToken(tok);\n return res + token.source;\n }\n case 'block-map':\n case 'block-seq': {\n let res = '';\n for (const item of token.items)\n res += stringifyItem(item);\n return res;\n }\n case 'flow-collection': {\n let res = token.start.source;\n for (const item of token.items)\n res += stringifyItem(item);\n for (const st of token.end)\n res += st.source;\n return res;\n }\n case 'document': {\n let res = stringifyItem(token);\n if (token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n default: {\n let res = token.source;\n if ('end' in token && token.end)\n for (const st of token.end)\n res += st.source;\n return res;\n }\n }\n}\nfunction stringifyItem({ start, key, sep, value }) {\n let res = '';\n for (const st of start)\n res += st.source;\n if (key)\n res += stringifyToken(key);\n if (sep)\n for (const st of sep)\n res += st.source;\n if (value)\n res += stringifyToken(value);\n return res;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/parse/cst-stringify.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/parse/cst-visit.js": -/*!***********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/parse/cst-visit.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ visit: () => (/* binding */ visit)\n/* harmony export */ });\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove item');\n/**\n * Apply a visitor to a CST document or item.\n *\n * Walks through the tree (depth-first) starting from the root, calling a\n * `visitor` function with two arguments when entering each item:\n * - `item`: The current item, which included the following members:\n * - `start: SourceToken[]` – Source tokens before the key or value,\n * possibly including its anchor or tag.\n * - `key?: Token | null` – Set for pair values. May then be `null`, if\n * the key before the `:` separator is empty.\n * - `sep?: SourceToken[]` – Source tokens between the key and the value,\n * which should include the `:` map value indicator if `value` is set.\n * - `value?: Token` – The value of a sequence item, or of a map pair.\n * - `path`: The steps from the root to the current node, as an array of\n * `['key' | 'value', number]` tuples.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this token, continue with\n * next sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current item, then continue with the next one\n * - `number`: Set the index of the next step. This is useful especially if\n * the index of the current token has changed.\n * - `function`: Define the next visitor for this item. After the original\n * visitor is called on item entry, next visitors are called after handling\n * a non-empty `key` and when exiting the item.\n */\nfunction visit(cst, visitor) {\n if ('type' in cst && cst.type === 'document')\n cst = { start: cst.start, value: cst.value };\n _visit(Object.freeze([]), cst, visitor);\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current item */\nvisit.SKIP = SKIP;\n/** Remove the current item */\nvisit.REMOVE = REMOVE;\n/** Find the item at `path` from `cst` as the root */\nvisit.itemAtPath = (cst, path) => {\n let item = cst;\n for (const [field, index] of path) {\n const tok = item?.[field];\n if (tok && 'items' in tok) {\n item = tok.items[index];\n }\n else\n return undefined;\n }\n return item;\n};\n/**\n * Get the immediate parent collection of the item at `path` from `cst` as the root.\n *\n * Throws an error if the collection is not found, which should never happen if the item itself exists.\n */\nvisit.parentCollection = (cst, path) => {\n const parent = visit.itemAtPath(cst, path.slice(0, -1));\n const field = path[path.length - 1][0];\n const coll = parent?.[field];\n if (coll && 'items' in coll)\n return coll;\n throw new Error('Parent collection not found');\n};\nfunction _visit(path, item, visitor) {\n let ctrl = visitor(item, path);\n if (typeof ctrl === 'symbol')\n return ctrl;\n for (const field of ['key', 'value']) {\n const token = item[field];\n if (token && 'items' in token) {\n for (let i = 0; i < token.items.length; ++i) {\n const ci = _visit(Object.freeze(path.concat([[field, i]])), token.items[i], visitor);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n token.items.splice(i, 1);\n i -= 1;\n }\n }\n if (typeof ctrl === 'function' && field === 'key')\n ctrl = ctrl(item, path);\n }\n }\n return typeof ctrl === 'function' ? ctrl(item, path) : ctrl;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/parse/cst-visit.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/parse/cst.js": -/*!*****************************************************!*\ - !*** ./node_modules/yaml/browser/dist/parse/cst.js ***! - \*****************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BOM: () => (/* binding */ BOM),\n/* harmony export */ DOCUMENT: () => (/* binding */ DOCUMENT),\n/* harmony export */ FLOW_END: () => (/* binding */ FLOW_END),\n/* harmony export */ SCALAR: () => (/* binding */ SCALAR),\n/* harmony export */ createScalarToken: () => (/* reexport safe */ _cst_scalar_js__WEBPACK_IMPORTED_MODULE_0__.createScalarToken),\n/* harmony export */ isCollection: () => (/* binding */ isCollection),\n/* harmony export */ isScalar: () => (/* binding */ isScalar),\n/* harmony export */ prettyToken: () => (/* binding */ prettyToken),\n/* harmony export */ resolveAsScalar: () => (/* reexport safe */ _cst_scalar_js__WEBPACK_IMPORTED_MODULE_0__.resolveAsScalar),\n/* harmony export */ setScalarValue: () => (/* reexport safe */ _cst_scalar_js__WEBPACK_IMPORTED_MODULE_0__.setScalarValue),\n/* harmony export */ stringify: () => (/* reexport safe */ _cst_stringify_js__WEBPACK_IMPORTED_MODULE_1__.stringify),\n/* harmony export */ tokenType: () => (/* binding */ tokenType),\n/* harmony export */ visit: () => (/* reexport safe */ _cst_visit_js__WEBPACK_IMPORTED_MODULE_2__.visit)\n/* harmony export */ });\n/* harmony import */ var _cst_scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cst-scalar.js */ \"./node_modules/yaml/browser/dist/parse/cst-scalar.js\");\n/* harmony import */ var _cst_stringify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cst-stringify.js */ \"./node_modules/yaml/browser/dist/parse/cst-stringify.js\");\n/* harmony import */ var _cst_visit_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cst-visit.js */ \"./node_modules/yaml/browser/dist/parse/cst-visit.js\");\n\n\n\n\n/** The byte order mark */\nconst BOM = '\\u{FEFF}';\n/** Start of doc-mode */\nconst DOCUMENT = '\\x02'; // C0: Start of Text\n/** Unexpected end of flow-mode */\nconst FLOW_END = '\\x18'; // C0: Cancel\n/** Next token is a scalar value */\nconst SCALAR = '\\x1f'; // C0: Unit Separator\n/** @returns `true` if `token` is a flow or block collection */\nconst isCollection = (token) => !!token && 'items' in token;\n/** @returns `true` if `token` is a flow or block scalar; not an alias */\nconst isScalar = (token) => !!token &&\n (token.type === 'scalar' ||\n token.type === 'single-quoted-scalar' ||\n token.type === 'double-quoted-scalar' ||\n token.type === 'block-scalar');\n/* istanbul ignore next */\n/** Get a printable representation of a lexer token */\nfunction prettyToken(token) {\n switch (token) {\n case BOM:\n return '';\n case DOCUMENT:\n return '';\n case FLOW_END:\n return '';\n case SCALAR:\n return '';\n default:\n return JSON.stringify(token);\n }\n}\n/** Identify the type of a lexer token. May return `null` for unknown tokens. */\nfunction tokenType(source) {\n switch (source) {\n case BOM:\n return 'byte-order-mark';\n case DOCUMENT:\n return 'doc-mode';\n case FLOW_END:\n return 'flow-error-end';\n case SCALAR:\n return 'scalar';\n case '---':\n return 'doc-start';\n case '...':\n return 'doc-end';\n case '':\n case '\\n':\n case '\\r\\n':\n return 'newline';\n case '-':\n return 'seq-item-ind';\n case '?':\n return 'explicit-key-ind';\n case ':':\n return 'map-value-ind';\n case '{':\n return 'flow-map-start';\n case '}':\n return 'flow-map-end';\n case '[':\n return 'flow-seq-start';\n case ']':\n return 'flow-seq-end';\n case ',':\n return 'comma';\n }\n switch (source[0]) {\n case ' ':\n case '\\t':\n return 'space';\n case '#':\n return 'comment';\n case '%':\n return 'directive-line';\n case '*':\n return 'alias';\n case '&':\n return 'anchor';\n case '!':\n return 'tag';\n case \"'\":\n return 'single-quoted-scalar';\n case '\"':\n return 'double-quoted-scalar';\n case '|':\n case '>':\n return 'block-scalar-header';\n }\n return null;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/parse/cst.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/parse/lexer.js": -/*!*******************************************************!*\ - !*** ./node_modules/yaml/browser/dist/parse/lexer.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Lexer: () => (/* binding */ Lexer)\n/* harmony export */ });\n/* harmony import */ var _cst_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cst.js */ \"./node_modules/yaml/browser/dist/parse/cst.js\");\n\n\n/*\nSTART -> stream\n\nstream\n directive -> line-end -> stream\n indent + line-end -> stream\n [else] -> line-start\n\nline-end\n comment -> line-end\n newline -> .\n input-end -> END\n\nline-start\n doc-start -> doc\n doc-end -> stream\n [else] -> indent -> block-start\n\nblock-start\n seq-item-start -> block-start\n explicit-key-start -> block-start\n map-value-start -> block-start\n [else] -> doc\n\ndoc\n line-end -> line-start\n spaces -> doc\n anchor -> doc\n tag -> doc\n flow-start -> flow -> doc\n flow-end -> error -> doc\n seq-item-start -> error -> doc\n explicit-key-start -> error -> doc\n map-value-start -> doc\n alias -> doc\n quote-start -> quoted-scalar -> doc\n block-scalar-header -> line-end -> block-scalar(min) -> line-start\n [else] -> plain-scalar(false, min) -> doc\n\nflow\n line-end -> flow\n spaces -> flow\n anchor -> flow\n tag -> flow\n flow-start -> flow -> flow\n flow-end -> .\n seq-item-start -> error -> flow\n explicit-key-start -> flow\n map-value-start -> flow\n alias -> flow\n quote-start -> quoted-scalar -> flow\n comma -> flow\n [else] -> plain-scalar(true, 0) -> flow\n\nquoted-scalar\n quote-end -> .\n [else] -> quoted-scalar\n\nblock-scalar(min)\n newline + peek(indent < min) -> .\n [else] -> block-scalar(min)\n\nplain-scalar(is-flow, min)\n scalar-end(is-flow) -> .\n peek(newline + (indent < min)) -> .\n [else] -> plain-scalar(min)\n*/\nfunction isEmpty(ch) {\n switch (ch) {\n case undefined:\n case ' ':\n case '\\n':\n case '\\r':\n case '\\t':\n return true;\n default:\n return false;\n }\n}\nconst hexDigits = '0123456789ABCDEFabcdef'.split('');\nconst tagChars = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\".split('');\nconst invalidFlowScalarChars = ',[]{}'.split('');\nconst invalidAnchorChars = ' ,[]{}\\n\\r\\t'.split('');\nconst isNotAnchorChar = (ch) => !ch || invalidAnchorChars.includes(ch);\n/**\n * Splits an input string into lexical tokens, i.e. smaller strings that are\n * easily identifiable by `tokens.tokenType()`.\n *\n * Lexing starts always in a \"stream\" context. Incomplete input may be buffered\n * until a complete token can be emitted.\n *\n * In addition to slices of the original input, the following control characters\n * may also be emitted:\n *\n * - `\\x02` (Start of Text): A document starts with the next token\n * - `\\x18` (Cancel): Unexpected end of flow-mode (indicates an error)\n * - `\\x1f` (Unit Separator): Next token is a scalar value\n * - `\\u{FEFF}` (Byte order mark): Emitted separately outside documents\n */\nclass Lexer {\n constructor() {\n /**\n * Flag indicating whether the end of the current buffer marks the end of\n * all input\n */\n this.atEnd = false;\n /**\n * Explicit indent set in block scalar header, as an offset from the current\n * minimum indent, so e.g. set to 1 from a header `|2+`. Set to -1 if not\n * explicitly set.\n */\n this.blockScalarIndent = -1;\n /**\n * Block scalars that include a + (keep) chomping indicator in their header\n * include trailing empty lines, which are otherwise excluded from the\n * scalar's contents.\n */\n this.blockScalarKeep = false;\n /** Current input */\n this.buffer = '';\n /**\n * Flag noting whether the map value indicator : can immediately follow this\n * node within a flow context.\n */\n this.flowKey = false;\n /** Count of surrounding flow collection levels. */\n this.flowLevel = 0;\n /**\n * Minimum level of indentation required for next lines to be parsed as a\n * part of the current scalar value.\n */\n this.indentNext = 0;\n /** Indentation level of the current line. */\n this.indentValue = 0;\n /** Position of the next \\n character. */\n this.lineEndPos = null;\n /** Stores the state of the lexer if reaching the end of incpomplete input */\n this.next = null;\n /** A pointer to `buffer`; the current position of the lexer. */\n this.pos = 0;\n }\n /**\n * Generate YAML tokens from the `source` string. If `incomplete`,\n * a part of the last line may be left as a buffer for the next call.\n *\n * @returns A generator of lexical tokens\n */\n *lex(source, incomplete = false) {\n if (source) {\n this.buffer = this.buffer ? this.buffer + source : source;\n this.lineEndPos = null;\n }\n this.atEnd = !incomplete;\n let next = this.next ?? 'stream';\n while (next && (incomplete || this.hasChars(1)))\n next = yield* this.parseNext(next);\n }\n atLineEnd() {\n let i = this.pos;\n let ch = this.buffer[i];\n while (ch === ' ' || ch === '\\t')\n ch = this.buffer[++i];\n if (!ch || ch === '#' || ch === '\\n')\n return true;\n if (ch === '\\r')\n return this.buffer[i + 1] === '\\n';\n return false;\n }\n charAt(n) {\n return this.buffer[this.pos + n];\n }\n continueScalar(offset) {\n let ch = this.buffer[offset];\n if (this.indentNext > 0) {\n let indent = 0;\n while (ch === ' ')\n ch = this.buffer[++indent + offset];\n if (ch === '\\r') {\n const next = this.buffer[indent + offset + 1];\n if (next === '\\n' || (!next && !this.atEnd))\n return offset + indent + 1;\n }\n return ch === '\\n' || indent >= this.indentNext || (!ch && !this.atEnd)\n ? offset + indent\n : -1;\n }\n if (ch === '-' || ch === '.') {\n const dt = this.buffer.substr(offset, 3);\n if ((dt === '---' || dt === '...') && isEmpty(this.buffer[offset + 3]))\n return -1;\n }\n return offset;\n }\n getLine() {\n let end = this.lineEndPos;\n if (typeof end !== 'number' || (end !== -1 && end < this.pos)) {\n end = this.buffer.indexOf('\\n', this.pos);\n this.lineEndPos = end;\n }\n if (end === -1)\n return this.atEnd ? this.buffer.substring(this.pos) : null;\n if (this.buffer[end - 1] === '\\r')\n end -= 1;\n return this.buffer.substring(this.pos, end);\n }\n hasChars(n) {\n return this.pos + n <= this.buffer.length;\n }\n setNext(state) {\n this.buffer = this.buffer.substring(this.pos);\n this.pos = 0;\n this.lineEndPos = null;\n this.next = state;\n return null;\n }\n peek(n) {\n return this.buffer.substr(this.pos, n);\n }\n *parseNext(next) {\n switch (next) {\n case 'stream':\n return yield* this.parseStream();\n case 'line-start':\n return yield* this.parseLineStart();\n case 'block-start':\n return yield* this.parseBlockStart();\n case 'doc':\n return yield* this.parseDocument();\n case 'flow':\n return yield* this.parseFlowCollection();\n case 'quoted-scalar':\n return yield* this.parseQuotedScalar();\n case 'block-scalar':\n return yield* this.parseBlockScalar();\n case 'plain-scalar':\n return yield* this.parsePlainScalar();\n }\n }\n *parseStream() {\n let line = this.getLine();\n if (line === null)\n return this.setNext('stream');\n if (line[0] === _cst_js__WEBPACK_IMPORTED_MODULE_0__.BOM) {\n yield* this.pushCount(1);\n line = line.substring(1);\n }\n if (line[0] === '%') {\n let dirEnd = line.length;\n const cs = line.indexOf('#');\n if (cs !== -1) {\n const ch = line[cs - 1];\n if (ch === ' ' || ch === '\\t')\n dirEnd = cs - 1;\n }\n while (true) {\n const ch = line[dirEnd - 1];\n if (ch === ' ' || ch === '\\t')\n dirEnd -= 1;\n else\n break;\n }\n const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));\n yield* this.pushCount(line.length - n); // possible comment\n this.pushNewline();\n return 'stream';\n }\n if (this.atLineEnd()) {\n const sp = yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - sp);\n yield* this.pushNewline();\n return 'stream';\n }\n yield _cst_js__WEBPACK_IMPORTED_MODULE_0__.DOCUMENT;\n return yield* this.parseLineStart();\n }\n *parseLineStart() {\n const ch = this.charAt(0);\n if (!ch && !this.atEnd)\n return this.setNext('line-start');\n if (ch === '-' || ch === '.') {\n if (!this.atEnd && !this.hasChars(4))\n return this.setNext('line-start');\n const s = this.peek(3);\n if (s === '---' && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n this.indentValue = 0;\n this.indentNext = 0;\n return 'doc';\n }\n else if (s === '...' && isEmpty(this.charAt(3))) {\n yield* this.pushCount(3);\n return 'stream';\n }\n }\n this.indentValue = yield* this.pushSpaces(false);\n if (this.indentNext > this.indentValue && !isEmpty(this.charAt(1)))\n this.indentNext = this.indentValue;\n return yield* this.parseBlockStart();\n }\n *parseBlockStart() {\n const [ch0, ch1] = this.peek(2);\n if (!ch1 && !this.atEnd)\n return this.setNext('block-start');\n if ((ch0 === '-' || ch0 === '?' || ch0 === ':') && isEmpty(ch1)) {\n const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));\n this.indentNext = this.indentValue + 1;\n this.indentValue += n;\n return yield* this.parseBlockStart();\n }\n return 'doc';\n }\n *parseDocument() {\n yield* this.pushSpaces(true);\n const line = this.getLine();\n if (line === null)\n return this.setNext('doc');\n let n = yield* this.pushIndicators();\n switch (line[n]) {\n case '#':\n yield* this.pushCount(line.length - n);\n // fallthrough\n case undefined:\n yield* this.pushNewline();\n return yield* this.parseLineStart();\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel = 1;\n return 'flow';\n case '}':\n case ']':\n // this is an error\n yield* this.pushCount(1);\n return 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'doc';\n case '\"':\n case \"'\":\n return yield* this.parseQuotedScalar();\n case '|':\n case '>':\n n += yield* this.parseBlockScalarHeader();\n n += yield* this.pushSpaces(true);\n yield* this.pushCount(line.length - n);\n yield* this.pushNewline();\n return yield* this.parseBlockScalar();\n default:\n return yield* this.parsePlainScalar();\n }\n }\n *parseFlowCollection() {\n let nl, sp;\n let indent = -1;\n do {\n nl = yield* this.pushNewline();\n if (nl > 0) {\n sp = yield* this.pushSpaces(false);\n this.indentValue = indent = sp;\n }\n else {\n sp = 0;\n }\n sp += yield* this.pushSpaces(true);\n } while (nl + sp > 0);\n const line = this.getLine();\n if (line === null)\n return this.setNext('flow');\n if ((indent !== -1 && indent < this.indentNext && line[0] !== '#') ||\n (indent === 0 &&\n (line.startsWith('---') || line.startsWith('...')) &&\n isEmpty(line[3]))) {\n // Allowing for the terminal ] or } at the same (rather than greater)\n // indent level as the initial [ or { is technically invalid, but\n // failing here would be surprising to users.\n const atFlowEndMarker = indent === this.indentNext - 1 &&\n this.flowLevel === 1 &&\n (line[0] === ']' || line[0] === '}');\n if (!atFlowEndMarker) {\n // this is an error\n this.flowLevel = 0;\n yield _cst_js__WEBPACK_IMPORTED_MODULE_0__.FLOW_END;\n return yield* this.parseLineStart();\n }\n }\n let n = 0;\n while (line[n] === ',') {\n n += yield* this.pushCount(1);\n n += yield* this.pushSpaces(true);\n this.flowKey = false;\n }\n n += yield* this.pushIndicators();\n switch (line[n]) {\n case undefined:\n return 'flow';\n case '#':\n yield* this.pushCount(line.length - n);\n return 'flow';\n case '{':\n case '[':\n yield* this.pushCount(1);\n this.flowKey = false;\n this.flowLevel += 1;\n return 'flow';\n case '}':\n case ']':\n yield* this.pushCount(1);\n this.flowKey = true;\n this.flowLevel -= 1;\n return this.flowLevel ? 'flow' : 'doc';\n case '*':\n yield* this.pushUntil(isNotAnchorChar);\n return 'flow';\n case '\"':\n case \"'\":\n this.flowKey = true;\n return yield* this.parseQuotedScalar();\n case ':': {\n const next = this.charAt(1);\n if (this.flowKey || isEmpty(next) || next === ',') {\n this.flowKey = false;\n yield* this.pushCount(1);\n yield* this.pushSpaces(true);\n return 'flow';\n }\n }\n // fallthrough\n default:\n this.flowKey = false;\n return yield* this.parsePlainScalar();\n }\n }\n *parseQuotedScalar() {\n const quote = this.charAt(0);\n let end = this.buffer.indexOf(quote, this.pos + 1);\n if (quote === \"'\") {\n while (end !== -1 && this.buffer[end + 1] === \"'\")\n end = this.buffer.indexOf(\"'\", end + 2);\n }\n else {\n // double-quote\n while (end !== -1) {\n let n = 0;\n while (this.buffer[end - 1 - n] === '\\\\')\n n += 1;\n if (n % 2 === 0)\n break;\n end = this.buffer.indexOf('\"', end + 1);\n }\n }\n // Only looking for newlines within the quotes\n const qb = this.buffer.substring(0, end);\n let nl = qb.indexOf('\\n', this.pos);\n if (nl !== -1) {\n while (nl !== -1) {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = qb.indexOf('\\n', cs);\n }\n if (nl !== -1) {\n // this is an error caused by an unexpected unindent\n end = nl - (qb[nl - 1] === '\\r' ? 2 : 1);\n }\n }\n if (end === -1) {\n if (!this.atEnd)\n return this.setNext('quoted-scalar');\n end = this.buffer.length;\n }\n yield* this.pushToIndex(end + 1, false);\n return this.flowLevel ? 'flow' : 'doc';\n }\n *parseBlockScalarHeader() {\n this.blockScalarIndent = -1;\n this.blockScalarKeep = false;\n let i = this.pos;\n while (true) {\n const ch = this.buffer[++i];\n if (ch === '+')\n this.blockScalarKeep = true;\n else if (ch > '0' && ch <= '9')\n this.blockScalarIndent = Number(ch) - 1;\n else if (ch !== '-')\n break;\n }\n return yield* this.pushUntil(ch => isEmpty(ch) || ch === '#');\n }\n *parseBlockScalar() {\n let nl = this.pos - 1; // may be -1 if this.pos === 0\n let indent = 0;\n let ch;\n loop: for (let i = this.pos; (ch = this.buffer[i]); ++i) {\n switch (ch) {\n case ' ':\n indent += 1;\n break;\n case '\\n':\n nl = i;\n indent = 0;\n break;\n case '\\r': {\n const next = this.buffer[i + 1];\n if (!next && !this.atEnd)\n return this.setNext('block-scalar');\n if (next === '\\n')\n break;\n } // fallthrough\n default:\n break loop;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('block-scalar');\n if (indent >= this.indentNext) {\n if (this.blockScalarIndent === -1)\n this.indentNext = indent;\n else\n this.indentNext += this.blockScalarIndent;\n do {\n const cs = this.continueScalar(nl + 1);\n if (cs === -1)\n break;\n nl = this.buffer.indexOf('\\n', cs);\n } while (nl !== -1);\n if (nl === -1) {\n if (!this.atEnd)\n return this.setNext('block-scalar');\n nl = this.buffer.length;\n }\n }\n if (!this.blockScalarKeep) {\n do {\n let i = nl - 1;\n let ch = this.buffer[i];\n if (ch === '\\r')\n ch = this.buffer[--i];\n const lastChar = i; // Drop the line if last char not more indented\n while (ch === ' ' || ch === '\\t')\n ch = this.buffer[--i];\n if (ch === '\\n' && i >= this.pos && i + 1 + indent > lastChar)\n nl = i;\n else\n break;\n } while (true);\n }\n yield _cst_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR;\n yield* this.pushToIndex(nl + 1, true);\n return yield* this.parseLineStart();\n }\n *parsePlainScalar() {\n const inFlow = this.flowLevel > 0;\n let end = this.pos - 1;\n let i = this.pos - 1;\n let ch;\n while ((ch = this.buffer[++i])) {\n if (ch === ':') {\n const next = this.buffer[i + 1];\n if (isEmpty(next) || (inFlow && next === ','))\n break;\n end = i;\n }\n else if (isEmpty(ch)) {\n let next = this.buffer[i + 1];\n if (ch === '\\r') {\n if (next === '\\n') {\n i += 1;\n ch = '\\n';\n next = this.buffer[i + 1];\n }\n else\n end = i;\n }\n if (next === '#' || (inFlow && invalidFlowScalarChars.includes(next)))\n break;\n if (ch === '\\n') {\n const cs = this.continueScalar(i + 1);\n if (cs === -1)\n break;\n i = Math.max(i, cs - 2); // to advance, but still account for ' #'\n }\n }\n else {\n if (inFlow && invalidFlowScalarChars.includes(ch))\n break;\n end = i;\n }\n }\n if (!ch && !this.atEnd)\n return this.setNext('plain-scalar');\n yield _cst_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR;\n yield* this.pushToIndex(end + 1, true);\n return inFlow ? 'flow' : 'doc';\n }\n *pushCount(n) {\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos += n;\n return n;\n }\n return 0;\n }\n *pushToIndex(i, allowEmpty) {\n const s = this.buffer.slice(this.pos, i);\n if (s) {\n yield s;\n this.pos += s.length;\n return s.length;\n }\n else if (allowEmpty)\n yield '';\n return 0;\n }\n *pushIndicators() {\n switch (this.charAt(0)) {\n case '!':\n return ((yield* this.pushTag()) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n case '&':\n return ((yield* this.pushUntil(isNotAnchorChar)) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n case '-': // this is an error\n case '?': // this is an error outside flow collections\n case ':': {\n const inFlow = this.flowLevel > 0;\n const ch1 = this.charAt(1);\n if (isEmpty(ch1) || (inFlow && invalidFlowScalarChars.includes(ch1))) {\n if (!inFlow)\n this.indentNext = this.indentValue + 1;\n else if (this.flowKey)\n this.flowKey = false;\n return ((yield* this.pushCount(1)) +\n (yield* this.pushSpaces(true)) +\n (yield* this.pushIndicators()));\n }\n }\n }\n return 0;\n }\n *pushTag() {\n if (this.charAt(1) === '<') {\n let i = this.pos + 2;\n let ch = this.buffer[i];\n while (!isEmpty(ch) && ch !== '>')\n ch = this.buffer[++i];\n return yield* this.pushToIndex(ch === '>' ? i + 1 : i, false);\n }\n else {\n let i = this.pos + 1;\n let ch = this.buffer[i];\n while (ch) {\n if (tagChars.includes(ch))\n ch = this.buffer[++i];\n else if (ch === '%' &&\n hexDigits.includes(this.buffer[i + 1]) &&\n hexDigits.includes(this.buffer[i + 2])) {\n ch = this.buffer[(i += 3)];\n }\n else\n break;\n }\n return yield* this.pushToIndex(i, false);\n }\n }\n *pushNewline() {\n const ch = this.buffer[this.pos];\n if (ch === '\\n')\n return yield* this.pushCount(1);\n else if (ch === '\\r' && this.charAt(1) === '\\n')\n return yield* this.pushCount(2);\n else\n return 0;\n }\n *pushSpaces(allowTabs) {\n let i = this.pos - 1;\n let ch;\n do {\n ch = this.buffer[++i];\n } while (ch === ' ' || (allowTabs && ch === '\\t'));\n const n = i - this.pos;\n if (n > 0) {\n yield this.buffer.substr(this.pos, n);\n this.pos = i;\n }\n return n;\n }\n *pushUntil(test) {\n let i = this.pos;\n let ch = this.buffer[i];\n while (!test(ch))\n ch = this.buffer[++i];\n return yield* this.pushToIndex(i, false);\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/parse/lexer.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/parse/line-counter.js": -/*!**************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/parse/line-counter.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LineCounter: () => (/* binding */ LineCounter)\n/* harmony export */ });\n/**\n * Tracks newlines during parsing in order to provide an efficient API for\n * determining the one-indexed `{ line, col }` position for any offset\n * within the input.\n */\nclass LineCounter {\n constructor() {\n this.lineStarts = [];\n /**\n * Should be called in ascending order. Otherwise, call\n * `lineCounter.lineStarts.sort()` before calling `linePos()`.\n */\n this.addNewLine = (offset) => this.lineStarts.push(offset);\n /**\n * Performs a binary search and returns the 1-indexed { line, col }\n * position of `offset`. If `line === 0`, `addNewLine` has never been\n * called or `offset` is before the first known newline.\n */\n this.linePos = (offset) => {\n let low = 0;\n let high = this.lineStarts.length;\n while (low < high) {\n const mid = (low + high) >> 1; // Math.floor((low + high) / 2)\n if (this.lineStarts[mid] < offset)\n low = mid + 1;\n else\n high = mid;\n }\n if (this.lineStarts[low] === offset)\n return { line: low + 1, col: 1 };\n if (low === 0)\n return { line: 0, col: offset };\n const start = this.lineStarts[low - 1];\n return { line: low, col: offset - start + 1 };\n };\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/parse/line-counter.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/parse/parser.js": -/*!********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/parse/parser.js ***! - \********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Parser: () => (/* binding */ Parser)\n/* harmony export */ });\n/* harmony import */ var _cst_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cst.js */ \"./node_modules/yaml/browser/dist/parse/cst.js\");\n/* harmony import */ var _lexer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lexer.js */ \"./node_modules/yaml/browser/dist/parse/lexer.js\");\n\n\n\nfunction includesToken(list, type) {\n for (let i = 0; i < list.length; ++i)\n if (list[i].type === type)\n return true;\n return false;\n}\nfunction findNonEmptyIndex(list) {\n for (let i = 0; i < list.length; ++i) {\n switch (list[i].type) {\n case 'space':\n case 'comment':\n case 'newline':\n break;\n default:\n return i;\n }\n }\n return -1;\n}\nfunction isFlowToken(token) {\n switch (token?.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n case 'flow-collection':\n return true;\n default:\n return false;\n }\n}\nfunction getPrevProps(parent) {\n switch (parent.type) {\n case 'document':\n return parent.start;\n case 'block-map': {\n const it = parent.items[parent.items.length - 1];\n return it.sep ?? it.start;\n }\n case 'block-seq':\n return parent.items[parent.items.length - 1].start;\n /* istanbul ignore next should not happen */\n default:\n return [];\n }\n}\n/** Note: May modify input array */\nfunction getFirstKeyStartProps(prev) {\n if (prev.length === 0)\n return [];\n let i = prev.length;\n loop: while (--i >= 0) {\n switch (prev[i].type) {\n case 'doc-start':\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n case 'newline':\n break loop;\n }\n }\n while (prev[++i]?.type === 'space') {\n /* loop */\n }\n return prev.splice(i, prev.length);\n}\nfunction fixFlowSeqItems(fc) {\n if (fc.start.type === 'flow-seq-start') {\n for (const it of fc.items) {\n if (it.sep &&\n !it.value &&\n !includesToken(it.start, 'explicit-key-ind') &&\n !includesToken(it.sep, 'map-value-ind')) {\n if (it.key)\n it.value = it.key;\n delete it.key;\n if (isFlowToken(it.value)) {\n if (it.value.end)\n Array.prototype.push.apply(it.value.end, it.sep);\n else\n it.value.end = it.sep;\n }\n else\n Array.prototype.push.apply(it.start, it.sep);\n delete it.sep;\n }\n }\n }\n}\n/**\n * A YAML concrete syntax tree (CST) parser\n *\n * ```ts\n * const src: string = ...\n * for (const token of new Parser().parse(src)) {\n * // token: Token\n * }\n * ```\n *\n * To use the parser with a user-provided lexer:\n *\n * ```ts\n * function* parse(source: string, lexer: Lexer) {\n * const parser = new Parser()\n * for (const lexeme of lexer.lex(source))\n * yield* parser.next(lexeme)\n * yield* parser.end()\n * }\n *\n * const src: string = ...\n * const lexer = new Lexer()\n * for (const token of parse(src, lexer)) {\n * // token: Token\n * }\n * ```\n */\nclass Parser {\n /**\n * @param onNewLine - If defined, called separately with the start position of\n * each new line (in `parse()`, including the start of input).\n */\n constructor(onNewLine) {\n /** If true, space and sequence indicators count as indentation */\n this.atNewLine = true;\n /** If true, next token is a scalar value */\n this.atScalar = false;\n /** Current indentation level */\n this.indent = 0;\n /** Current offset since the start of parsing */\n this.offset = 0;\n /** On the same line with a block map key */\n this.onKeyLine = false;\n /** Top indicates the node that's currently being built */\n this.stack = [];\n /** The source of the current token, set in parse() */\n this.source = '';\n /** The type of the current token, set in parse() */\n this.type = '';\n // Must be defined after `next()`\n this.lexer = new _lexer_js__WEBPACK_IMPORTED_MODULE_1__.Lexer();\n this.onNewLine = onNewLine;\n }\n /**\n * Parse `source` as a YAML stream.\n * If `incomplete`, a part of the last line may be left as a buffer for the next call.\n *\n * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.\n *\n * @returns A generator of tokens representing each directive, document, and other structure.\n */\n *parse(source, incomplete = false) {\n if (this.onNewLine && this.offset === 0)\n this.onNewLine(0);\n for (const lexeme of this.lexer.lex(source, incomplete))\n yield* this.next(lexeme);\n if (!incomplete)\n yield* this.end();\n }\n /**\n * Advance the parser by the `source` of one lexical token.\n */\n *next(source) {\n this.source = source;\n if (this.atScalar) {\n this.atScalar = false;\n yield* this.step();\n this.offset += source.length;\n return;\n }\n const type = (0,_cst_js__WEBPACK_IMPORTED_MODULE_0__.tokenType)(source);\n if (!type) {\n const message = `Not a YAML token: ${source}`;\n yield* this.pop({ type: 'error', offset: this.offset, message, source });\n this.offset += source.length;\n }\n else if (type === 'scalar') {\n this.atNewLine = false;\n this.atScalar = true;\n this.type = 'scalar';\n }\n else {\n this.type = type;\n yield* this.step();\n switch (type) {\n case 'newline':\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine)\n this.onNewLine(this.offset + source.length);\n break;\n case 'space':\n if (this.atNewLine && source[0] === ' ')\n this.indent += source.length;\n break;\n case 'explicit-key-ind':\n case 'map-value-ind':\n case 'seq-item-ind':\n if (this.atNewLine)\n this.indent += source.length;\n break;\n case 'doc-mode':\n case 'flow-error-end':\n return;\n default:\n this.atNewLine = false;\n }\n this.offset += source.length;\n }\n }\n /** Call at end of input to push out any remaining constructions */\n *end() {\n while (this.stack.length > 0)\n yield* this.pop();\n }\n get sourceToken() {\n const st = {\n type: this.type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n return st;\n }\n *step() {\n const top = this.peek(1);\n if (this.type === 'doc-end' && (!top || top.type !== 'doc-end')) {\n while (this.stack.length > 0)\n yield* this.pop();\n this.stack.push({\n type: 'doc-end',\n offset: this.offset,\n source: this.source\n });\n return;\n }\n if (!top)\n return yield* this.stream();\n switch (top.type) {\n case 'document':\n return yield* this.document(top);\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return yield* this.scalar(top);\n case 'block-scalar':\n return yield* this.blockScalar(top);\n case 'block-map':\n return yield* this.blockMap(top);\n case 'block-seq':\n return yield* this.blockSequence(top);\n case 'flow-collection':\n return yield* this.flowCollection(top);\n case 'doc-end':\n return yield* this.documentEnd(top);\n }\n /* istanbul ignore next should not happen */\n yield* this.pop();\n }\n peek(n) {\n return this.stack[this.stack.length - n];\n }\n *pop(error) {\n const token = error ?? this.stack.pop();\n /* istanbul ignore if should not happen */\n if (!token) {\n const message = 'Tried to pop an empty stack';\n yield { type: 'error', offset: this.offset, source: '', message };\n }\n else if (this.stack.length === 0) {\n yield token;\n }\n else {\n const top = this.peek(1);\n if (token.type === 'block-scalar') {\n // Block scalars use their parent rather than header indent\n token.indent = 'indent' in top ? top.indent : 0;\n }\n else if (token.type === 'flow-collection' && top.type === 'document') {\n // Ignore all indent for top-level flow collections\n token.indent = 0;\n }\n if (token.type === 'flow-collection')\n fixFlowSeqItems(token);\n switch (top.type) {\n case 'document':\n top.value = token;\n break;\n case 'block-scalar':\n top.props.push(token); // error\n break;\n case 'block-map': {\n const it = top.items[top.items.length - 1];\n if (it.value) {\n top.items.push({ start: [], key: token, sep: [] });\n this.onKeyLine = true;\n return;\n }\n else if (it.sep) {\n it.value = token;\n }\n else {\n Object.assign(it, { key: token, sep: [] });\n this.onKeyLine = !includesToken(it.start, 'explicit-key-ind');\n return;\n }\n break;\n }\n case 'block-seq': {\n const it = top.items[top.items.length - 1];\n if (it.value)\n top.items.push({ start: [], value: token });\n else\n it.value = token;\n break;\n }\n case 'flow-collection': {\n const it = top.items[top.items.length - 1];\n if (!it || it.value)\n top.items.push({ start: [], key: token, sep: [] });\n else if (it.sep)\n it.value = token;\n else\n Object.assign(it, { key: token, sep: [] });\n return;\n }\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.pop(token);\n }\n if ((top.type === 'document' ||\n top.type === 'block-map' ||\n top.type === 'block-seq') &&\n (token.type === 'block-map' || token.type === 'block-seq')) {\n const last = token.items[token.items.length - 1];\n if (last &&\n !last.sep &&\n !last.value &&\n last.start.length > 0 &&\n findNonEmptyIndex(last.start) === -1 &&\n (token.indent === 0 ||\n last.start.every(st => st.type !== 'comment' || st.indent < token.indent))) {\n if (top.type === 'document')\n top.end = last.start;\n else\n top.items.push({ start: last.start });\n token.items.splice(-1, 1);\n }\n }\n }\n }\n *stream() {\n switch (this.type) {\n case 'directive-line':\n yield { type: 'directive', offset: this.offset, source: this.source };\n return;\n case 'byte-order-mark':\n case 'space':\n case 'comment':\n case 'newline':\n yield this.sourceToken;\n return;\n case 'doc-mode':\n case 'doc-start': {\n const doc = {\n type: 'document',\n offset: this.offset,\n start: []\n };\n if (this.type === 'doc-start')\n doc.start.push(this.sourceToken);\n this.stack.push(doc);\n return;\n }\n }\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML stream`,\n source: this.source\n };\n }\n *document(doc) {\n if (doc.value)\n return yield* this.lineEnd(doc);\n switch (this.type) {\n case 'doc-start': {\n if (findNonEmptyIndex(doc.start) !== -1) {\n yield* this.pop();\n yield* this.step();\n }\n else\n doc.start.push(this.sourceToken);\n return;\n }\n case 'anchor':\n case 'tag':\n case 'space':\n case 'comment':\n case 'newline':\n doc.start.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(doc);\n if (bv)\n this.stack.push(bv);\n else {\n yield {\n type: 'error',\n offset: this.offset,\n message: `Unexpected ${this.type} token in YAML document`,\n source: this.source\n };\n }\n }\n *scalar(scalar) {\n if (this.type === 'map-value-ind') {\n const prev = getPrevProps(this.peek(2));\n const start = getFirstKeyStartProps(prev);\n let sep;\n if (scalar.end) {\n sep = scalar.end;\n sep.push(this.sourceToken);\n delete scalar.end;\n }\n else\n sep = [this.sourceToken];\n const map = {\n type: 'block-map',\n offset: scalar.offset,\n indent: scalar.indent,\n items: [{ start, key: scalar, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else\n yield* this.lineEnd(scalar);\n }\n *blockScalar(scalar) {\n switch (this.type) {\n case 'space':\n case 'comment':\n case 'newline':\n scalar.props.push(this.sourceToken);\n return;\n case 'scalar':\n scalar.source = this.source;\n // block-scalar source includes trailing newline\n this.atNewLine = true;\n this.indent = 0;\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n yield* this.pop();\n break;\n /* istanbul ignore next should not happen */\n default:\n yield* this.pop();\n yield* this.step();\n }\n }\n *blockMap(map) {\n const it = map.items[map.items.length - 1];\n // it.sep is true-ish if pair already has key or : separator\n switch (this.type) {\n case 'newline':\n this.onKeyLine = false;\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'space':\n case 'comment':\n if (it.value) {\n map.items.push({ start: [this.sourceToken] });\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n if (this.atIndentedComment(it.start, map.indent)) {\n const prev = map.items[map.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n Array.prototype.push.apply(end, it.start);\n end.push(this.sourceToken);\n map.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n }\n if (this.indent >= map.indent) {\n const atNextItem = !this.onKeyLine && this.indent === map.indent && it.sep;\n // For empty nodes, assign newline-separated not indented empty tokens to following node\n let start = [];\n if (atNextItem && it.sep && !it.value) {\n const nl = [];\n for (let i = 0; i < it.sep.length; ++i) {\n const st = it.sep[i];\n switch (st.type) {\n case 'newline':\n nl.push(i);\n break;\n case 'space':\n break;\n case 'comment':\n if (st.indent > map.indent)\n nl.length = 0;\n break;\n default:\n nl.length = 0;\n }\n }\n if (nl.length >= 2)\n start = it.sep.splice(nl[1]);\n }\n switch (this.type) {\n case 'anchor':\n case 'tag':\n if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n it.sep.push(this.sourceToken);\n }\n else {\n it.start.push(this.sourceToken);\n }\n return;\n case 'explicit-key-ind':\n if (!it.sep && !includesToken(it.start, 'explicit-key-ind')) {\n it.start.push(this.sourceToken);\n }\n else if (atNextItem || it.value) {\n start.push(this.sourceToken);\n map.items.push({ start });\n }\n else {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n });\n }\n this.onKeyLine = true;\n return;\n case 'map-value-ind':\n if (includesToken(it.start, 'explicit-key-ind')) {\n if (!it.sep) {\n if (includesToken(it.start, 'newline')) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else {\n const start = getFirstKeyStartProps(it.start);\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n }\n else if (it.value) {\n map.items.push({ start: [], key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n });\n }\n else if (isFlowToken(it.key) &&\n !includesToken(it.sep, 'newline')) {\n const start = getFirstKeyStartProps(it.start);\n const key = it.key;\n const sep = it.sep;\n sep.push(this.sourceToken);\n // @ts-expect-error type guard is wrong here\n delete it.key, delete it.sep;\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key, sep }]\n });\n }\n else if (start.length > 0) {\n // Not actually at next item\n it.sep = it.sep.concat(start, this.sourceToken);\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n else {\n if (!it.sep) {\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n }\n else if (it.value || atNextItem) {\n map.items.push({ start, key: null, sep: [this.sourceToken] });\n }\n else if (includesToken(it.sep, 'map-value-ind')) {\n this.stack.push({\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [], key: null, sep: [this.sourceToken] }]\n });\n }\n else {\n it.sep.push(this.sourceToken);\n }\n }\n this.onKeyLine = true;\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (atNextItem || it.value) {\n map.items.push({ start, key: fs, sep: [] });\n this.onKeyLine = true;\n }\n else if (it.sep) {\n this.stack.push(fs);\n }\n else {\n Object.assign(it, { key: fs, sep: [] });\n this.onKeyLine = true;\n }\n return;\n }\n default: {\n const bv = this.startBlockValue(map);\n if (bv) {\n if (atNextItem &&\n bv.type !== 'block-seq' &&\n includesToken(it.start, 'explicit-key-ind')) {\n map.items.push({ start });\n }\n this.stack.push(bv);\n return;\n }\n }\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *blockSequence(seq) {\n const it = seq.items[seq.items.length - 1];\n switch (this.type) {\n case 'newline':\n if (it.value) {\n const end = 'end' in it.value ? it.value.end : undefined;\n const last = Array.isArray(end) ? end[end.length - 1] : undefined;\n if (last?.type === 'comment')\n end?.push(this.sourceToken);\n else\n seq.items.push({ start: [this.sourceToken] });\n }\n else\n it.start.push(this.sourceToken);\n return;\n case 'space':\n case 'comment':\n if (it.value)\n seq.items.push({ start: [this.sourceToken] });\n else {\n if (this.atIndentedComment(it.start, seq.indent)) {\n const prev = seq.items[seq.items.length - 2];\n const end = prev?.value?.end;\n if (Array.isArray(end)) {\n Array.prototype.push.apply(end, it.start);\n end.push(this.sourceToken);\n seq.items.pop();\n return;\n }\n }\n it.start.push(this.sourceToken);\n }\n return;\n case 'anchor':\n case 'tag':\n if (it.value || this.indent <= seq.indent)\n break;\n it.start.push(this.sourceToken);\n return;\n case 'seq-item-ind':\n if (this.indent !== seq.indent)\n break;\n if (it.value || includesToken(it.start, 'seq-item-ind'))\n seq.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n }\n if (this.indent > seq.indent) {\n const bv = this.startBlockValue(seq);\n if (bv) {\n this.stack.push(bv);\n return;\n }\n }\n yield* this.pop();\n yield* this.step();\n }\n *flowCollection(fc) {\n const it = fc.items[fc.items.length - 1];\n if (this.type === 'flow-error-end') {\n let top;\n do {\n yield* this.pop();\n top = this.peek(1);\n } while (top && top.type === 'flow-collection');\n }\n else if (fc.end.length === 0) {\n switch (this.type) {\n case 'comma':\n case 'explicit-key-ind':\n if (!it || it.sep)\n fc.items.push({ start: [this.sourceToken] });\n else\n it.start.push(this.sourceToken);\n return;\n case 'map-value-ind':\n if (!it || it.value)\n fc.items.push({ start: [], key: null, sep: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n Object.assign(it, { key: null, sep: [this.sourceToken] });\n return;\n case 'space':\n case 'comment':\n case 'newline':\n case 'anchor':\n case 'tag':\n if (!it || it.value)\n fc.items.push({ start: [this.sourceToken] });\n else if (it.sep)\n it.sep.push(this.sourceToken);\n else\n it.start.push(this.sourceToken);\n return;\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar': {\n const fs = this.flowScalar(this.type);\n if (!it || it.value)\n fc.items.push({ start: [], key: fs, sep: [] });\n else if (it.sep)\n this.stack.push(fs);\n else\n Object.assign(it, { key: fs, sep: [] });\n return;\n }\n case 'flow-map-end':\n case 'flow-seq-end':\n fc.end.push(this.sourceToken);\n return;\n }\n const bv = this.startBlockValue(fc);\n /* istanbul ignore else should not happen */\n if (bv)\n this.stack.push(bv);\n else {\n yield* this.pop();\n yield* this.step();\n }\n }\n else {\n const parent = this.peek(2);\n if (parent.type === 'block-map' &&\n ((this.type === 'map-value-ind' && parent.indent === fc.indent) ||\n (this.type === 'newline' &&\n !parent.items[parent.items.length - 1].sep))) {\n yield* this.pop();\n yield* this.step();\n }\n else if (this.type === 'map-value-ind' &&\n parent.type !== 'flow-collection') {\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n fixFlowSeqItems(fc);\n const sep = fc.end.splice(1, fc.end.length);\n sep.push(this.sourceToken);\n const map = {\n type: 'block-map',\n offset: fc.offset,\n indent: fc.indent,\n items: [{ start, key: fc, sep }]\n };\n this.onKeyLine = true;\n this.stack[this.stack.length - 1] = map;\n }\n else {\n yield* this.lineEnd(fc);\n }\n }\n }\n flowScalar(type) {\n if (this.onNewLine) {\n let nl = this.source.indexOf('\\n') + 1;\n while (nl !== 0) {\n this.onNewLine(this.offset + nl);\n nl = this.source.indexOf('\\n', nl) + 1;\n }\n }\n return {\n type,\n offset: this.offset,\n indent: this.indent,\n source: this.source\n };\n }\n startBlockValue(parent) {\n switch (this.type) {\n case 'alias':\n case 'scalar':\n case 'single-quoted-scalar':\n case 'double-quoted-scalar':\n return this.flowScalar(this.type);\n case 'block-scalar-header':\n return {\n type: 'block-scalar',\n offset: this.offset,\n indent: this.indent,\n props: [this.sourceToken],\n source: ''\n };\n case 'flow-map-start':\n case 'flow-seq-start':\n return {\n type: 'flow-collection',\n offset: this.offset,\n indent: this.indent,\n start: this.sourceToken,\n items: [],\n end: []\n };\n case 'seq-item-ind':\n return {\n type: 'block-seq',\n offset: this.offset,\n indent: this.indent,\n items: [{ start: [this.sourceToken] }]\n };\n case 'explicit-key-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n start.push(this.sourceToken);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start }]\n };\n }\n case 'map-value-ind': {\n this.onKeyLine = true;\n const prev = getPrevProps(parent);\n const start = getFirstKeyStartProps(prev);\n return {\n type: 'block-map',\n offset: this.offset,\n indent: this.indent,\n items: [{ start, key: null, sep: [this.sourceToken] }]\n };\n }\n }\n return null;\n }\n atIndentedComment(start, indent) {\n if (this.type !== 'comment')\n return false;\n if (this.indent <= indent)\n return false;\n return start.every(st => st.type === 'newline' || st.type === 'space');\n }\n *documentEnd(docEnd) {\n if (this.type !== 'doc-mode') {\n if (docEnd.end)\n docEnd.end.push(this.sourceToken);\n else\n docEnd.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n *lineEnd(token) {\n switch (this.type) {\n case 'comma':\n case 'doc-start':\n case 'doc-end':\n case 'flow-seq-end':\n case 'flow-map-end':\n case 'map-value-ind':\n yield* this.pop();\n yield* this.step();\n break;\n case 'newline':\n this.onKeyLine = false;\n // fallthrough\n case 'space':\n case 'comment':\n default:\n // all other values are errors\n if (token.end)\n token.end.push(this.sourceToken);\n else\n token.end = [this.sourceToken];\n if (this.type === 'newline')\n yield* this.pop();\n }\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/parse/parser.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/public-api.js": -/*!******************************************************!*\ - !*** ./node_modules/yaml/browser/dist/public-api.js ***! - \******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ parse: () => (/* binding */ parse),\n/* harmony export */ parseAllDocuments: () => (/* binding */ parseAllDocuments),\n/* harmony export */ parseDocument: () => (/* binding */ parseDocument),\n/* harmony export */ stringify: () => (/* binding */ stringify)\n/* harmony export */ });\n/* harmony import */ var _compose_composer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose/composer.js */ \"./node_modules/yaml/browser/dist/compose/composer.js\");\n/* harmony import */ var _doc_Document_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./doc/Document.js */ \"./node_modules/yaml/browser/dist/doc/Document.js\");\n/* harmony import */ var _errors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./errors.js */ \"./node_modules/yaml/browser/dist/errors.js\");\n/* harmony import */ var _log_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log.js */ \"./node_modules/yaml/browser/dist/log.js\");\n/* harmony import */ var _parse_line_counter_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./parse/line-counter.js */ \"./node_modules/yaml/browser/dist/parse/line-counter.js\");\n/* harmony import */ var _parse_parser_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parse/parser.js */ \"./node_modules/yaml/browser/dist/parse/parser.js\");\n\n\n\n\n\n\n\nfunction parseOptions(options) {\n const prettyErrors = options.prettyErrors !== false;\n const lineCounter = options.lineCounter || (prettyErrors && new _parse_line_counter_js__WEBPACK_IMPORTED_MODULE_4__.LineCounter()) || null;\n return { lineCounter, prettyErrors };\n}\n/**\n * Parse the input as a stream of YAML documents.\n *\n * Documents should be separated from each other by `...` or `---` marker lines.\n *\n * @returns If an empty `docs` array is returned, it will be of type\n * EmptyStream and contain additional stream information. In\n * TypeScript, you should use `'empty' in docs` as a type guard for it.\n */\nfunction parseAllDocuments(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser = new _parse_parser_js__WEBPACK_IMPORTED_MODULE_5__.Parser(lineCounter?.addNewLine);\n const composer = new _compose_composer_js__WEBPACK_IMPORTED_MODULE_0__.Composer(options);\n const docs = Array.from(composer.compose(parser.parse(source)));\n if (prettyErrors && lineCounter)\n for (const doc of docs) {\n doc.errors.forEach((0,_errors_js__WEBPACK_IMPORTED_MODULE_2__.prettifyError)(source, lineCounter));\n doc.warnings.forEach((0,_errors_js__WEBPACK_IMPORTED_MODULE_2__.prettifyError)(source, lineCounter));\n }\n if (docs.length > 0)\n return docs;\n return Object.assign([], { empty: true }, composer.streamInfo());\n}\n/** Parse an input string into a single YAML.Document */\nfunction parseDocument(source, options = {}) {\n const { lineCounter, prettyErrors } = parseOptions(options);\n const parser = new _parse_parser_js__WEBPACK_IMPORTED_MODULE_5__.Parser(lineCounter?.addNewLine);\n const composer = new _compose_composer_js__WEBPACK_IMPORTED_MODULE_0__.Composer(options);\n // `doc` is always set by compose.end(true) at the very latest\n let doc = null;\n for (const _doc of composer.compose(parser.parse(source), true, source.length)) {\n if (!doc)\n doc = _doc;\n else if (doc.options.logLevel !== 'silent') {\n doc.errors.push(new _errors_js__WEBPACK_IMPORTED_MODULE_2__.YAMLParseError(_doc.range.slice(0, 2), 'MULTIPLE_DOCS', 'Source contains multiple documents; please use YAML.parseAllDocuments()'));\n break;\n }\n }\n if (prettyErrors && lineCounter) {\n doc.errors.forEach((0,_errors_js__WEBPACK_IMPORTED_MODULE_2__.prettifyError)(source, lineCounter));\n doc.warnings.forEach((0,_errors_js__WEBPACK_IMPORTED_MODULE_2__.prettifyError)(source, lineCounter));\n }\n return doc;\n}\nfunction parse(src, reviver, options) {\n let _reviver = undefined;\n if (typeof reviver === 'function') {\n _reviver = reviver;\n }\n else if (options === undefined && reviver && typeof reviver === 'object') {\n options = reviver;\n }\n const doc = parseDocument(src, options);\n if (!doc)\n return null;\n doc.warnings.forEach(warning => (0,_log_js__WEBPACK_IMPORTED_MODULE_3__.warn)(doc.options.logLevel, warning));\n if (doc.errors.length > 0) {\n if (doc.options.logLevel !== 'silent')\n throw doc.errors[0];\n else\n doc.errors = [];\n }\n return doc.toJS(Object.assign({ reviver: _reviver }, options));\n}\nfunction stringify(value, replacer, options) {\n let _replacer = null;\n if (typeof replacer === 'function' || Array.isArray(replacer)) {\n _replacer = replacer;\n }\n else if (options === undefined && replacer) {\n options = replacer;\n }\n if (typeof options === 'string')\n options = options.length;\n if (typeof options === 'number') {\n const indent = Math.round(options);\n options = indent < 1 ? undefined : indent > 8 ? { indent: 8 } : { indent };\n }\n if (value === undefined) {\n const { keepUndefined } = options ?? replacer ?? {};\n if (!keepUndefined)\n return undefined;\n }\n return new _doc_Document_js__WEBPACK_IMPORTED_MODULE_1__.Document(value, _replacer, options).toString(options);\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/public-api.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/Schema.js": -/*!*********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/Schema.js ***! - \*********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Schema: () => (/* binding */ Schema)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _common_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common/map.js */ \"./node_modules/yaml/browser/dist/schema/common/map.js\");\n/* harmony import */ var _common_seq_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common/seq.js */ \"./node_modules/yaml/browser/dist/schema/common/seq.js\");\n/* harmony import */ var _common_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./common/string.js */ \"./node_modules/yaml/browser/dist/schema/common/string.js\");\n/* harmony import */ var _tags_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tags.js */ \"./node_modules/yaml/browser/dist/schema/tags.js\");\n\n\n\n\n\n\nconst sortMapEntriesByKey = (a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0;\nclass Schema {\n constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }) {\n this.compat = Array.isArray(compat)\n ? (0,_tags_js__WEBPACK_IMPORTED_MODULE_4__.getTags)(compat, 'compat')\n : compat\n ? (0,_tags_js__WEBPACK_IMPORTED_MODULE_4__.getTags)(null, compat)\n : null;\n this.merge = !!merge;\n this.name = (typeof schema === 'string' && schema) || 'core';\n this.knownTags = resolveKnownTags ? _tags_js__WEBPACK_IMPORTED_MODULE_4__.coreKnownTags : {};\n this.tags = (0,_tags_js__WEBPACK_IMPORTED_MODULE_4__.getTags)(customTags, this.name);\n this.toStringOptions = toStringDefaults ?? null;\n Object.defineProperty(this, _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.MAP, { value: _common_map_js__WEBPACK_IMPORTED_MODULE_1__.map });\n Object.defineProperty(this, _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.SCALAR, { value: _common_string_js__WEBPACK_IMPORTED_MODULE_3__.string });\n Object.defineProperty(this, _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.SEQ, { value: _common_seq_js__WEBPACK_IMPORTED_MODULE_2__.seq });\n // Used by createMap()\n this.sortMapEntries =\n typeof sortMapEntries === 'function'\n ? sortMapEntries\n : sortMapEntries === true\n ? sortMapEntriesByKey\n : null;\n }\n clone() {\n const copy = Object.create(Schema.prototype, Object.getOwnPropertyDescriptors(this));\n copy.tags = this.tags.slice();\n return copy;\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/Schema.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/common/map.js": -/*!*************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/common/map.js ***! - \*************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ map: () => (/* binding */ map)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../nodes/YAMLMap.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLMap.js\");\n\n\n\nconst map = {\n collection: 'map',\n default: true,\n nodeClass: _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_1__.YAMLMap,\n tag: 'tag:yaml.org,2002:map',\n resolve(map, onError) {\n if (!(0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(map))\n onError('Expected a mapping for this tag');\n return map;\n },\n createNode: (schema, obj, ctx) => _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_1__.YAMLMap.from(schema, obj, ctx)\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/common/map.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/common/null.js": -/*!**************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/common/null.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ nullTag: () => (/* binding */ nullTag)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n\n\nconst nullTag = {\n identify: value => value == null,\n createNode: () => new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^(?:~|[Nn]ull|NULL)?$/,\n resolve: () => new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar(null),\n stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)\n ? source\n : ctx.options.nullStr\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/common/null.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/common/seq.js": -/*!*************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/common/seq.js ***! - \*************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ seq: () => (/* binding */ seq)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../nodes/YAMLSeq.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLSeq.js\");\n\n\n\nconst seq = {\n collection: 'seq',\n default: true,\n nodeClass: _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_1__.YAMLSeq,\n tag: 'tag:yaml.org,2002:seq',\n resolve(seq, onError) {\n if (!(0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(seq))\n onError('Expected a sequence for this tag');\n return seq;\n },\n createNode: (schema, obj, ctx) => _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_1__.YAMLSeq.from(schema, obj, ctx)\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/common/seq.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/common/string.js": -/*!****************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/common/string.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ string: () => (/* binding */ string)\n/* harmony export */ });\n/* harmony import */ var _stringify_stringifyString_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stringify/stringifyString.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyString.js\");\n\n\nconst string = {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify(item, ctx, onComment, onChompKeep) {\n ctx = Object.assign({ actualString: true }, ctx);\n return (0,_stringify_stringifyString_js__WEBPACK_IMPORTED_MODULE_0__.stringifyString)(item, ctx, onComment, onChompKeep);\n }\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/common/string.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/core/bool.js": -/*!************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/core/bool.js ***! - \************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ boolTag: () => (/* binding */ boolTag)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n\n\nconst boolTag = {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,\n resolve: str => new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar(str[0] === 't' || str[0] === 'T'),\n stringify({ source, value }, ctx) {\n if (source && boolTag.test.test(source)) {\n const sv = source[0] === 't' || source[0] === 'T';\n if (value === sv)\n return source;\n }\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n }\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/core/bool.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/core/float.js": -/*!*************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/core/float.js ***! - \*************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ float: () => (/* binding */ float),\n/* harmony export */ floatExp: () => (/* binding */ floatExp),\n/* harmony export */ floatNaN: () => (/* binding */ floatNaN)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../stringify/stringifyNumber.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyNumber.js\");\n\n\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^(?:[-+]?\\.(?:inf|Inf|INF|nan|NaN|NAN))$/,\n resolve: str => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_1__.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,\n resolve: str => parseFloat(str),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : (0,_stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_1__.stringifyNumber)(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,\n resolve(str) {\n const node = new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar(parseFloat(str));\n const dot = str.indexOf('.');\n if (dot !== -1 && str[str.length - 1] === '0')\n node.minFractionDigits = str.length - dot - 1;\n return node;\n },\n stringify: _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_1__.stringifyNumber\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/core/float.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/core/int.js": -/*!***********************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/core/int.js ***! - \***********************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ int: () => (/* binding */ int),\n/* harmony export */ intHex: () => (/* binding */ intHex),\n/* harmony export */ intOct: () => (/* binding */ intOct)\n/* harmony export */ });\n/* harmony import */ var _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stringify/stringifyNumber.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyNumber.js\");\n\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nconst intResolve = (str, offset, radix, { intAsBigInt }) => (intAsBigInt ? BigInt(str) : parseInt(str.substring(offset), radix));\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value) && value >= 0)\n return prefix + value.toString(radix);\n return (0,_stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_0__.stringifyNumber)(node);\n}\nconst intOct = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^0o[0-7]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 8, opt),\n stringify: node => intStringify(node, 8, '0o')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_0__.stringifyNumber\n};\nconst intHex = {\n identify: value => intIdentify(value) && value >= 0,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^0x[0-9a-fA-F]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/core/int.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/core/schema.js": -/*!**************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/core/schema.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ schema: () => (/* binding */ schema)\n/* harmony export */ });\n/* harmony import */ var _common_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/map.js */ \"./node_modules/yaml/browser/dist/schema/common/map.js\");\n/* harmony import */ var _common_null_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/null.js */ \"./node_modules/yaml/browser/dist/schema/common/null.js\");\n/* harmony import */ var _common_seq_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/seq.js */ \"./node_modules/yaml/browser/dist/schema/common/seq.js\");\n/* harmony import */ var _common_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/string.js */ \"./node_modules/yaml/browser/dist/schema/common/string.js\");\n/* harmony import */ var _bool_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bool.js */ \"./node_modules/yaml/browser/dist/schema/core/bool.js\");\n/* harmony import */ var _float_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./float.js */ \"./node_modules/yaml/browser/dist/schema/core/float.js\");\n/* harmony import */ var _int_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./int.js */ \"./node_modules/yaml/browser/dist/schema/core/int.js\");\n\n\n\n\n\n\n\n\nconst schema = [\n _common_map_js__WEBPACK_IMPORTED_MODULE_0__.map,\n _common_seq_js__WEBPACK_IMPORTED_MODULE_2__.seq,\n _common_string_js__WEBPACK_IMPORTED_MODULE_3__.string,\n _common_null_js__WEBPACK_IMPORTED_MODULE_1__.nullTag,\n _bool_js__WEBPACK_IMPORTED_MODULE_4__.boolTag,\n _int_js__WEBPACK_IMPORTED_MODULE_6__.intOct,\n _int_js__WEBPACK_IMPORTED_MODULE_6__.int,\n _int_js__WEBPACK_IMPORTED_MODULE_6__.intHex,\n _float_js__WEBPACK_IMPORTED_MODULE_5__.floatNaN,\n _float_js__WEBPACK_IMPORTED_MODULE_5__.floatExp,\n _float_js__WEBPACK_IMPORTED_MODULE_5__.float\n];\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/core/schema.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/json/schema.js": -/*!**************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/json/schema.js ***! - \**************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ schema: () => (/* binding */ schema)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _common_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/map.js */ \"./node_modules/yaml/browser/dist/schema/common/map.js\");\n/* harmony import */ var _common_seq_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/seq.js */ \"./node_modules/yaml/browser/dist/schema/common/seq.js\");\n\n\n\n\nfunction intIdentify(value) {\n return typeof value === 'bigint' || Number.isInteger(value);\n}\nconst stringifyJSON = ({ value }) => JSON.stringify(value);\nconst jsonScalars = [\n {\n identify: value => typeof value === 'string',\n default: true,\n tag: 'tag:yaml.org,2002:str',\n resolve: str => str,\n stringify: stringifyJSON\n },\n {\n identify: value => value == null,\n createNode: () => new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar(null),\n default: true,\n tag: 'tag:yaml.org,2002:null',\n test: /^null$/,\n resolve: () => null,\n stringify: stringifyJSON\n },\n {\n identify: value => typeof value === 'boolean',\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^true|false$/,\n resolve: str => str === 'true',\n stringify: stringifyJSON\n },\n {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^-?(?:0|[1-9][0-9]*)$/,\n resolve: (str, _onError, { intAsBigInt }) => intAsBigInt ? BigInt(str) : parseInt(str, 10),\n stringify: ({ value }) => intIdentify(value) ? value.toString() : JSON.stringify(value)\n },\n {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,\n resolve: str => parseFloat(str),\n stringify: stringifyJSON\n }\n];\nconst jsonError = {\n default: true,\n tag: '',\n test: /^/,\n resolve(str, onError) {\n onError(`Unresolved plain scalar ${JSON.stringify(str)}`);\n return str;\n }\n};\nconst schema = [_common_map_js__WEBPACK_IMPORTED_MODULE_1__.map, _common_seq_js__WEBPACK_IMPORTED_MODULE_2__.seq].concat(jsonScalars, jsonError);\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/json/schema.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/tags.js": -/*!*******************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/tags.js ***! - \*******************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ coreKnownTags: () => (/* binding */ coreKnownTags),\n/* harmony export */ getTags: () => (/* binding */ getTags)\n/* harmony export */ });\n/* harmony import */ var _common_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/map.js */ \"./node_modules/yaml/browser/dist/schema/common/map.js\");\n/* harmony import */ var _common_null_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common/null.js */ \"./node_modules/yaml/browser/dist/schema/common/null.js\");\n/* harmony import */ var _common_seq_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common/seq.js */ \"./node_modules/yaml/browser/dist/schema/common/seq.js\");\n/* harmony import */ var _common_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./common/string.js */ \"./node_modules/yaml/browser/dist/schema/common/string.js\");\n/* harmony import */ var _core_bool_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./core/bool.js */ \"./node_modules/yaml/browser/dist/schema/core/bool.js\");\n/* harmony import */ var _core_float_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./core/float.js */ \"./node_modules/yaml/browser/dist/schema/core/float.js\");\n/* harmony import */ var _core_int_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./core/int.js */ \"./node_modules/yaml/browser/dist/schema/core/int.js\");\n/* harmony import */ var _core_schema_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./core/schema.js */ \"./node_modules/yaml/browser/dist/schema/core/schema.js\");\n/* harmony import */ var _json_schema_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./json/schema.js */ \"./node_modules/yaml/browser/dist/schema/json/schema.js\");\n/* harmony import */ var _yaml_1_1_binary_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./yaml-1.1/binary.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js\");\n/* harmony import */ var _yaml_1_1_omap_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./yaml-1.1/omap.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js\");\n/* harmony import */ var _yaml_1_1_pairs_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./yaml-1.1/pairs.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js\");\n/* harmony import */ var _yaml_1_1_schema_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./yaml-1.1/schema.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js\");\n/* harmony import */ var _yaml_1_1_set_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./yaml-1.1/set.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/set.js\");\n/* harmony import */ var _yaml_1_1_timestamp_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./yaml-1.1/timestamp.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst schemas = new Map([\n ['core', _core_schema_js__WEBPACK_IMPORTED_MODULE_7__.schema],\n ['failsafe', [_common_map_js__WEBPACK_IMPORTED_MODULE_0__.map, _common_seq_js__WEBPACK_IMPORTED_MODULE_2__.seq, _common_string_js__WEBPACK_IMPORTED_MODULE_3__.string]],\n ['json', _json_schema_js__WEBPACK_IMPORTED_MODULE_8__.schema],\n ['yaml11', _yaml_1_1_schema_js__WEBPACK_IMPORTED_MODULE_12__.schema],\n ['yaml-1.1', _yaml_1_1_schema_js__WEBPACK_IMPORTED_MODULE_12__.schema]\n]);\nconst tagsByName = {\n binary: _yaml_1_1_binary_js__WEBPACK_IMPORTED_MODULE_9__.binary,\n bool: _core_bool_js__WEBPACK_IMPORTED_MODULE_4__.boolTag,\n float: _core_float_js__WEBPACK_IMPORTED_MODULE_5__.float,\n floatExp: _core_float_js__WEBPACK_IMPORTED_MODULE_5__.floatExp,\n floatNaN: _core_float_js__WEBPACK_IMPORTED_MODULE_5__.floatNaN,\n floatTime: _yaml_1_1_timestamp_js__WEBPACK_IMPORTED_MODULE_14__.floatTime,\n int: _core_int_js__WEBPACK_IMPORTED_MODULE_6__.int,\n intHex: _core_int_js__WEBPACK_IMPORTED_MODULE_6__.intHex,\n intOct: _core_int_js__WEBPACK_IMPORTED_MODULE_6__.intOct,\n intTime: _yaml_1_1_timestamp_js__WEBPACK_IMPORTED_MODULE_14__.intTime,\n map: _common_map_js__WEBPACK_IMPORTED_MODULE_0__.map,\n null: _common_null_js__WEBPACK_IMPORTED_MODULE_1__.nullTag,\n omap: _yaml_1_1_omap_js__WEBPACK_IMPORTED_MODULE_10__.omap,\n pairs: _yaml_1_1_pairs_js__WEBPACK_IMPORTED_MODULE_11__.pairs,\n seq: _common_seq_js__WEBPACK_IMPORTED_MODULE_2__.seq,\n set: _yaml_1_1_set_js__WEBPACK_IMPORTED_MODULE_13__.set,\n timestamp: _yaml_1_1_timestamp_js__WEBPACK_IMPORTED_MODULE_14__.timestamp\n};\nconst coreKnownTags = {\n 'tag:yaml.org,2002:binary': _yaml_1_1_binary_js__WEBPACK_IMPORTED_MODULE_9__.binary,\n 'tag:yaml.org,2002:omap': _yaml_1_1_omap_js__WEBPACK_IMPORTED_MODULE_10__.omap,\n 'tag:yaml.org,2002:pairs': _yaml_1_1_pairs_js__WEBPACK_IMPORTED_MODULE_11__.pairs,\n 'tag:yaml.org,2002:set': _yaml_1_1_set_js__WEBPACK_IMPORTED_MODULE_13__.set,\n 'tag:yaml.org,2002:timestamp': _yaml_1_1_timestamp_js__WEBPACK_IMPORTED_MODULE_14__.timestamp\n};\nfunction getTags(customTags, schemaName) {\n let tags = schemas.get(schemaName);\n if (!tags) {\n if (Array.isArray(customTags))\n tags = [];\n else {\n const keys = Array.from(schemas.keys())\n .filter(key => key !== 'yaml11')\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown schema \"${schemaName}\"; use one of ${keys} or define customTags array`);\n }\n }\n if (Array.isArray(customTags)) {\n for (const tag of customTags)\n tags = tags.concat(tag);\n }\n else if (typeof customTags === 'function') {\n tags = customTags(tags.slice());\n }\n return tags.map(tag => {\n if (typeof tag !== 'string')\n return tag;\n const tagObj = tagsByName[tag];\n if (tagObj)\n return tagObj;\n const keys = Object.keys(tagsByName)\n .map(key => JSON.stringify(key))\n .join(', ');\n throw new Error(`Unknown custom tag \"${tag}\"; use one of ${keys}`);\n });\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/tags.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js": -/*!******************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js ***! - \******************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ binary: () => (/* binding */ binary)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _stringify_stringifyString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../stringify/stringifyString.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyString.js\");\n\n\n\nconst binary = {\n identify: value => value instanceof Uint8Array,\n default: false,\n tag: 'tag:yaml.org,2002:binary',\n /**\n * Returns a Buffer in node and an Uint8Array in browsers\n *\n * To use the resulting buffer as an image, you'll want to do something like:\n *\n * const blob = new Blob([buffer], { type: 'image/jpeg' })\n * document.querySelector('#photo').src = URL.createObjectURL(blob)\n */\n resolve(src, onError) {\n if (typeof Buffer === 'function') {\n return Buffer.from(src, 'base64');\n }\n else if (typeof atob === 'function') {\n // On IE 11, atob() can't handle newlines\n const str = atob(src.replace(/[\\n\\r]/g, ''));\n const buffer = new Uint8Array(str.length);\n for (let i = 0; i < str.length; ++i)\n buffer[i] = str.charCodeAt(i);\n return buffer;\n }\n else {\n onError('This environment does not support reading binary tags; either Buffer or atob is required');\n return src;\n }\n },\n stringify({ comment, type, value }, ctx, onComment, onChompKeep) {\n const buf = value; // checked earlier by binary.identify()\n let str;\n if (typeof Buffer === 'function') {\n str =\n buf instanceof Buffer\n ? buf.toString('base64')\n : Buffer.from(buf.buffer).toString('base64');\n }\n else if (typeof btoa === 'function') {\n let s = '';\n for (let i = 0; i < buf.length; ++i)\n s += String.fromCharCode(buf[i]);\n str = btoa(s);\n }\n else {\n throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');\n }\n if (!type)\n type = _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.BLOCK_LITERAL;\n if (type !== _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.QUOTE_DOUBLE) {\n const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);\n const n = Math.ceil(str.length / lineWidth);\n const lines = new Array(n);\n for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {\n lines[i] = str.substr(o, lineWidth);\n }\n str = lines.join(type === _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.BLOCK_LITERAL ? '\\n' : ' ');\n }\n return (0,_stringify_stringifyString_js__WEBPACK_IMPORTED_MODULE_1__.stringifyString)({ comment, type, value: str }, ctx, onComment, onChompKeep);\n }\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js": -/*!****************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ falseTag: () => (/* binding */ falseTag),\n/* harmony export */ trueTag: () => (/* binding */ trueTag)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n\n\nfunction boolStringify({ value, source }, ctx) {\n const boolObj = value ? trueTag : falseTag;\n if (source && boolObj.test.test(source))\n return source;\n return value ? ctx.options.trueStr : ctx.options.falseStr;\n}\nconst trueTag = {\n identify: value => value === true,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,\n resolve: () => new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar(true),\n stringify: boolStringify\n};\nconst falseTag = {\n identify: value => value === false,\n default: true,\n tag: 'tag:yaml.org,2002:bool',\n test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,\n resolve: () => new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar(false),\n stringify: boolStringify\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/float.js": -/*!*****************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/float.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ float: () => (/* binding */ float),\n/* harmony export */ floatExp: () => (/* binding */ floatExp),\n/* harmony export */ floatNaN: () => (/* binding */ floatNaN)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../stringify/stringifyNumber.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyNumber.js\");\n\n\n\nconst floatNaN = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?\\.(?:inf|Inf|INF|nan|NaN|NAN)$/,\n resolve: (str) => str.slice(-3).toLowerCase() === 'nan'\n ? NaN\n : str[0] === '-'\n ? Number.NEGATIVE_INFINITY\n : Number.POSITIVE_INFINITY,\n stringify: _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_1__.stringifyNumber\n};\nconst floatExp = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'EXP',\n test: /^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,\n resolve: (str) => parseFloat(str.replace(/_/g, '')),\n stringify(node) {\n const num = Number(node.value);\n return isFinite(num) ? num.toExponential() : (0,_stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_1__.stringifyNumber)(node);\n }\n};\nconst float = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n test: /^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,\n resolve(str) {\n const node = new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar(parseFloat(str.replace(/_/g, '')));\n const dot = str.indexOf('.');\n if (dot !== -1) {\n const f = str.substring(dot + 1).replace(/_/g, '');\n if (f[f.length - 1] === '0')\n node.minFractionDigits = f.length;\n }\n return node;\n },\n stringify: _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_1__.stringifyNumber\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/float.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/int.js": -/*!***************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/int.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ int: () => (/* binding */ int),\n/* harmony export */ intBin: () => (/* binding */ intBin),\n/* harmony export */ intHex: () => (/* binding */ intHex),\n/* harmony export */ intOct: () => (/* binding */ intOct)\n/* harmony export */ });\n/* harmony import */ var _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stringify/stringifyNumber.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyNumber.js\");\n\n\nconst intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);\nfunction intResolve(str, offset, radix, { intAsBigInt }) {\n const sign = str[0];\n if (sign === '-' || sign === '+')\n offset += 1;\n str = str.substring(offset).replace(/_/g, '');\n if (intAsBigInt) {\n switch (radix) {\n case 2:\n str = `0b${str}`;\n break;\n case 8:\n str = `0o${str}`;\n break;\n case 16:\n str = `0x${str}`;\n break;\n }\n const n = BigInt(str);\n return sign === '-' ? BigInt(-1) * n : n;\n }\n const n = parseInt(str, radix);\n return sign === '-' ? -1 * n : n;\n}\nfunction intStringify(node, radix, prefix) {\n const { value } = node;\n if (intIdentify(value)) {\n const str = value.toString(radix);\n return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;\n }\n return (0,_stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_0__.stringifyNumber)(node);\n}\nconst intBin = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'BIN',\n test: /^[-+]?0b[0-1_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),\n stringify: node => intStringify(node, 2, '0b')\n};\nconst intOct = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'OCT',\n test: /^[-+]?0[0-7_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),\n stringify: node => intStringify(node, 8, '0')\n};\nconst int = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n test: /^[-+]?[0-9][0-9_]*$/,\n resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),\n stringify: _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_0__.stringifyNumber\n};\nconst intHex = {\n identify: intIdentify,\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'HEX',\n test: /^[-+]?0x[0-9a-fA-F_]+$/,\n resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),\n stringify: node => intStringify(node, 16, '0x')\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/int.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js": -/*!****************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js ***! - \****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ YAMLOMap: () => (/* binding */ YAMLOMap),\n/* harmony export */ omap: () => (/* binding */ omap)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_toJS_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../nodes/toJS.js */ \"./node_modules/yaml/browser/dist/nodes/toJS.js\");\n/* harmony import */ var _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../nodes/YAMLMap.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLMap.js\");\n/* harmony import */ var _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../nodes/YAMLSeq.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLSeq.js\");\n/* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pairs.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js\");\n\n\n\n\n\n\nclass YAMLOMap extends _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_3__.YAMLSeq {\n constructor() {\n super();\n this.add = _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap.prototype.add.bind(this);\n this.delete = _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap.prototype.delete.bind(this);\n this.get = _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap.prototype.get.bind(this);\n this.has = _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap.prototype.has.bind(this);\n this.set = _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap.prototype.set.bind(this);\n this.tag = YAMLOMap.tag;\n }\n /**\n * If `ctx` is given, the return type is actually `Map`,\n * but TypeScript won't allow widening the signature of a child method.\n */\n toJSON(_, ctx) {\n if (!ctx)\n return super.toJSON(_);\n const map = new Map();\n if (ctx?.onCreate)\n ctx.onCreate(map);\n for (const pair of this.items) {\n let key, value;\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(pair)) {\n key = (0,_nodes_toJS_js__WEBPACK_IMPORTED_MODULE_1__.toJS)(pair.key, '', ctx);\n value = (0,_nodes_toJS_js__WEBPACK_IMPORTED_MODULE_1__.toJS)(pair.value, key, ctx);\n }\n else {\n key = (0,_nodes_toJS_js__WEBPACK_IMPORTED_MODULE_1__.toJS)(pair, '', ctx);\n }\n if (map.has(key))\n throw new Error('Ordered maps must not include duplicate keys');\n map.set(key, value);\n }\n return map;\n }\n static from(schema, iterable, ctx) {\n const pairs = (0,_pairs_js__WEBPACK_IMPORTED_MODULE_4__.createPairs)(schema, iterable, ctx);\n const omap = new this();\n omap.items = pairs.items;\n return omap;\n }\n}\nYAMLOMap.tag = 'tag:yaml.org,2002:omap';\nconst omap = {\n collection: 'seq',\n identify: value => value instanceof Map,\n nodeClass: YAMLOMap,\n default: false,\n tag: 'tag:yaml.org,2002:omap',\n resolve(seq, onError) {\n const pairs = (0,_pairs_js__WEBPACK_IMPORTED_MODULE_4__.resolvePairs)(seq, onError);\n const seenKeys = [];\n for (const { key } of pairs.items) {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(key)) {\n if (seenKeys.includes(key.value)) {\n onError(`Ordered maps must not include duplicate keys: ${key.value}`);\n }\n else {\n seenKeys.push(key.value);\n }\n }\n }\n return Object.assign(new YAMLOMap(), pairs);\n },\n createNode: (schema, iterable, ctx) => YAMLOMap.from(schema, iterable, ctx)\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js": -/*!*****************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createPairs: () => (/* binding */ createPairs),\n/* harmony export */ pairs: () => (/* binding */ pairs),\n/* harmony export */ resolvePairs: () => (/* binding */ resolvePairs)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../nodes/Pair.js */ \"./node_modules/yaml/browser/dist/nodes/Pair.js\");\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../nodes/YAMLSeq.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLSeq.js\");\n\n\n\n\n\nfunction resolvePairs(seq, onError) {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(seq)) {\n for (let i = 0; i < seq.items.length; ++i) {\n let item = seq.items[i];\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(item))\n continue;\n else if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(item)) {\n if (item.items.length > 1)\n onError('Each pair must have its own sequence indicator');\n const pair = item.items[0] || new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__.Pair(new _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_2__.Scalar(null));\n if (item.commentBefore)\n pair.key.commentBefore = pair.key.commentBefore\n ? `${item.commentBefore}\\n${pair.key.commentBefore}`\n : item.commentBefore;\n if (item.comment) {\n const cn = pair.value ?? pair.key;\n cn.comment = cn.comment\n ? `${item.comment}\\n${cn.comment}`\n : item.comment;\n }\n item = pair;\n }\n seq.items[i] = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(item) ? item : new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__.Pair(item);\n }\n }\n else\n onError('Expected a sequence for this tag');\n return seq;\n}\nfunction createPairs(schema, iterable, ctx) {\n const { replacer } = ctx;\n const pairs = new _nodes_YAMLSeq_js__WEBPACK_IMPORTED_MODULE_3__.YAMLSeq(schema);\n pairs.tag = 'tag:yaml.org,2002:pairs';\n let i = 0;\n if (iterable && Symbol.iterator in Object(iterable))\n for (let it of iterable) {\n if (typeof replacer === 'function')\n it = replacer.call(iterable, String(i++), it);\n let key, value;\n if (Array.isArray(it)) {\n if (it.length === 2) {\n key = it[0];\n value = it[1];\n }\n else\n throw new TypeError(`Expected [key, value] tuple: ${it}`);\n }\n else if (it && it instanceof Object) {\n const keys = Object.keys(it);\n if (keys.length === 1) {\n key = keys[0];\n value = it[key];\n }\n else {\n throw new TypeError(`Expected tuple with one key, not ${keys.length} keys`);\n }\n }\n else {\n key = it;\n }\n pairs.items.push((0,_nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__.createPair)(key, value, ctx));\n }\n return pairs;\n}\nconst pairs = {\n collection: 'seq',\n default: false,\n tag: 'tag:yaml.org,2002:pairs',\n resolve: resolvePairs,\n createNode: createPairs\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js": -/*!******************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js ***! - \******************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ schema: () => (/* binding */ schema)\n/* harmony export */ });\n/* harmony import */ var _common_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/map.js */ \"./node_modules/yaml/browser/dist/schema/common/map.js\");\n/* harmony import */ var _common_null_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/null.js */ \"./node_modules/yaml/browser/dist/schema/common/null.js\");\n/* harmony import */ var _common_seq_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/seq.js */ \"./node_modules/yaml/browser/dist/schema/common/seq.js\");\n/* harmony import */ var _common_string_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/string.js */ \"./node_modules/yaml/browser/dist/schema/common/string.js\");\n/* harmony import */ var _binary_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./binary.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js\");\n/* harmony import */ var _bool_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./bool.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js\");\n/* harmony import */ var _float_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./float.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/float.js\");\n/* harmony import */ var _int_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./int.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/int.js\");\n/* harmony import */ var _omap_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./omap.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js\");\n/* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./pairs.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js\");\n/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./set.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/set.js\");\n/* harmony import */ var _timestamp_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./timestamp.js */ \"./node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst schema = [\n _common_map_js__WEBPACK_IMPORTED_MODULE_0__.map,\n _common_seq_js__WEBPACK_IMPORTED_MODULE_2__.seq,\n _common_string_js__WEBPACK_IMPORTED_MODULE_3__.string,\n _common_null_js__WEBPACK_IMPORTED_MODULE_1__.nullTag,\n _bool_js__WEBPACK_IMPORTED_MODULE_5__.trueTag,\n _bool_js__WEBPACK_IMPORTED_MODULE_5__.falseTag,\n _int_js__WEBPACK_IMPORTED_MODULE_7__.intBin,\n _int_js__WEBPACK_IMPORTED_MODULE_7__.intOct,\n _int_js__WEBPACK_IMPORTED_MODULE_7__.int,\n _int_js__WEBPACK_IMPORTED_MODULE_7__.intHex,\n _float_js__WEBPACK_IMPORTED_MODULE_6__.floatNaN,\n _float_js__WEBPACK_IMPORTED_MODULE_6__.floatExp,\n _float_js__WEBPACK_IMPORTED_MODULE_6__.float,\n _binary_js__WEBPACK_IMPORTED_MODULE_4__.binary,\n _omap_js__WEBPACK_IMPORTED_MODULE_8__.omap,\n _pairs_js__WEBPACK_IMPORTED_MODULE_9__.pairs,\n _set_js__WEBPACK_IMPORTED_MODULE_10__.set,\n _timestamp_js__WEBPACK_IMPORTED_MODULE_11__.intTime,\n _timestamp_js__WEBPACK_IMPORTED_MODULE_11__.floatTime,\n _timestamp_js__WEBPACK_IMPORTED_MODULE_11__.timestamp\n];\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/set.js": -/*!***************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/set.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ YAMLSet: () => (/* binding */ YAMLSet),\n/* harmony export */ set: () => (/* binding */ set)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../nodes/Pair.js */ \"./node_modules/yaml/browser/dist/nodes/Pair.js\");\n/* harmony import */ var _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../nodes/YAMLMap.js */ \"./node_modules/yaml/browser/dist/nodes/YAMLMap.js\");\n\n\n\n\nclass YAMLSet extends _nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.YAMLMap {\n constructor(schema) {\n super(schema);\n this.tag = YAMLSet.tag;\n }\n add(key) {\n let pair;\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(key))\n pair = key;\n else if (key &&\n typeof key === 'object' &&\n 'key' in key &&\n 'value' in key &&\n key.value === null)\n pair = new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__.Pair(key.key, null);\n else\n pair = new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__.Pair(key, null);\n const prev = (0,_nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.findPair)(this.items, pair.key);\n if (!prev)\n this.items.push(pair);\n }\n /**\n * If `keepPair` is `true`, returns the Pair matching `key`.\n * Otherwise, returns the value of that Pair's key.\n */\n get(key, keepPair) {\n const pair = (0,_nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.findPair)(this.items, key);\n return !keepPair && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(pair)\n ? (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(pair.key)\n ? pair.key.value\n : pair.key\n : pair;\n }\n set(key, value) {\n if (typeof value !== 'boolean')\n throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);\n const prev = (0,_nodes_YAMLMap_js__WEBPACK_IMPORTED_MODULE_2__.findPair)(this.items, key);\n if (prev && !value) {\n this.items.splice(this.items.indexOf(prev), 1);\n }\n else if (!prev && value) {\n this.items.push(new _nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__.Pair(key));\n }\n }\n toJSON(_, ctx) {\n return super.toJSON(_, ctx, Set);\n }\n toString(ctx, onComment, onChompKeep) {\n if (!ctx)\n return JSON.stringify(this);\n if (this.hasAllNullValues(true))\n return super.toString(Object.assign({}, ctx, { allNullValues: true }), onComment, onChompKeep);\n else\n throw new Error('Set items must all have null values');\n }\n static from(schema, iterable, ctx) {\n const { replacer } = ctx;\n const set = new this(schema);\n if (iterable && Symbol.iterator in Object(iterable))\n for (let value of iterable) {\n if (typeof replacer === 'function')\n value = replacer.call(iterable, value, value);\n set.items.push((0,_nodes_Pair_js__WEBPACK_IMPORTED_MODULE_1__.createPair)(value, null, ctx));\n }\n return set;\n }\n}\nYAMLSet.tag = 'tag:yaml.org,2002:set';\nconst set = {\n collection: 'map',\n identify: value => value instanceof Set,\n nodeClass: YAMLSet,\n default: false,\n tag: 'tag:yaml.org,2002:set',\n createNode: (schema, iterable, ctx) => YAMLSet.from(schema, iterable, ctx),\n resolve(map, onError) {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(map)) {\n if (map.hasAllNullValues(true))\n return Object.assign(new YAMLSet(), map);\n else\n onError('Set items must all have null values');\n }\n else\n onError('Expected a mapping for this tag');\n return map;\n }\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/set.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js": -/*!*********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ floatTime: () => (/* binding */ floatTime),\n/* harmony export */ intTime: () => (/* binding */ intTime),\n/* harmony export */ timestamp: () => (/* binding */ timestamp)\n/* harmony export */ });\n/* harmony import */ var _stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../stringify/stringifyNumber.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyNumber.js\");\n\n\n/** Internal types handle bigint as number, because TS can't figure it out. */\nfunction parseSexagesimal(str, asBigInt) {\n const sign = str[0];\n const parts = sign === '-' || sign === '+' ? str.substring(1) : str;\n const num = (n) => asBigInt ? BigInt(n) : Number(n);\n const res = parts\n .replace(/_/g, '')\n .split(':')\n .reduce((res, p) => res * num(60) + num(p), num(0));\n return (sign === '-' ? num(-1) * res : res);\n}\n/**\n * hhhh:mm:ss.sss\n *\n * Internal types handle bigint as number, because TS can't figure it out.\n */\nfunction stringifySexagesimal(node) {\n let { value } = node;\n let num = (n) => n;\n if (typeof value === 'bigint')\n num = n => BigInt(n);\n else if (isNaN(value) || !isFinite(value))\n return (0,_stringify_stringifyNumber_js__WEBPACK_IMPORTED_MODULE_0__.stringifyNumber)(node);\n let sign = '';\n if (value < 0) {\n sign = '-';\n value *= num(-1);\n }\n const _60 = num(60);\n const parts = [value % _60]; // seconds, including ms\n if (value < 60) {\n parts.unshift(0); // at least one : is required\n }\n else {\n value = (value - parts[0]) / _60;\n parts.unshift(value % _60); // minutes\n if (value >= 60) {\n value = (value - parts[0]) / _60;\n parts.unshift(value); // hours\n }\n }\n return (sign +\n parts\n .map(n => String(n).padStart(2, '0'))\n .join(':')\n .replace(/000000\\d*$/, '') // % 60 may introduce error\n );\n}\nconst intTime = {\n identify: value => typeof value === 'bigint' || Number.isInteger(value),\n default: true,\n tag: 'tag:yaml.org,2002:int',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,\n resolve: (str, _onError, { intAsBigInt }) => parseSexagesimal(str, intAsBigInt),\n stringify: stringifySexagesimal\n};\nconst floatTime = {\n identify: value => typeof value === 'number',\n default: true,\n tag: 'tag:yaml.org,2002:float',\n format: 'TIME',\n test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,\n resolve: str => parseSexagesimal(str, false),\n stringify: stringifySexagesimal\n};\nconst timestamp = {\n identify: value => value instanceof Date,\n default: true,\n tag: 'tag:yaml.org,2002:timestamp',\n // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part\n // may be omitted altogether, resulting in a date format. In such a case, the time part is\n // assumed to be 00:00:00Z (start of day, UTC).\n test: RegExp('^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd\n '(?:' + // time is optional\n '(?:t|T|[ \\\\t]+)' + // t | T | whitespace\n '([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?\n '(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30\n ')?$'),\n resolve(str) {\n const match = str.match(timestamp.test);\n if (!match)\n throw new Error('!!timestamp expects a date, starting with yyyy-mm-dd');\n const [, year, month, day, hour, minute, second] = match.map(Number);\n const millisec = match[7] ? Number((match[7] + '00').substr(1, 3)) : 0;\n let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec);\n const tz = match[8];\n if (tz && tz !== 'Z') {\n let d = parseSexagesimal(tz, false);\n if (Math.abs(d) < 30)\n d *= 60;\n date -= 60000 * d;\n }\n return new Date(date);\n },\n stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\\.000Z$/, '')\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/stringify/foldFlowLines.js": -/*!*******************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/stringify/foldFlowLines.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FOLD_BLOCK: () => (/* binding */ FOLD_BLOCK),\n/* harmony export */ FOLD_FLOW: () => (/* binding */ FOLD_FLOW),\n/* harmony export */ FOLD_QUOTED: () => (/* binding */ FOLD_QUOTED),\n/* harmony export */ foldFlowLines: () => (/* binding */ foldFlowLines)\n/* harmony export */ });\nconst FOLD_FLOW = 'flow';\nconst FOLD_BLOCK = 'block';\nconst FOLD_QUOTED = 'quoted';\n/**\n * Tries to keep input at up to `lineWidth` characters, splitting only on spaces\n * not followed by newlines or spaces unless `mode` is `'quoted'`. Lines are\n * terminated with `\\n` and started with `indent`.\n */\nfunction foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {\n if (!lineWidth || lineWidth < 0)\n return text;\n const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);\n if (text.length <= endStep)\n return text;\n const folds = [];\n const escapedFolds = {};\n let end = lineWidth - indent.length;\n if (typeof indentAtStart === 'number') {\n if (indentAtStart > lineWidth - Math.max(2, minContentWidth))\n folds.push(0);\n else\n end = lineWidth - indentAtStart;\n }\n let split = undefined;\n let prev = undefined;\n let overflow = false;\n let i = -1;\n let escStart = -1;\n let escEnd = -1;\n if (mode === FOLD_BLOCK) {\n i = consumeMoreIndentedLines(text, i);\n if (i !== -1)\n end = i + endStep;\n }\n for (let ch; (ch = text[(i += 1)]);) {\n if (mode === FOLD_QUOTED && ch === '\\\\') {\n escStart = i;\n switch (text[i + 1]) {\n case 'x':\n i += 3;\n break;\n case 'u':\n i += 5;\n break;\n case 'U':\n i += 9;\n break;\n default:\n i += 1;\n }\n escEnd = i;\n }\n if (ch === '\\n') {\n if (mode === FOLD_BLOCK)\n i = consumeMoreIndentedLines(text, i);\n end = i + endStep;\n split = undefined;\n }\n else {\n if (ch === ' ' &&\n prev &&\n prev !== ' ' &&\n prev !== '\\n' &&\n prev !== '\\t') {\n // space surrounded by non-space can be replaced with newline + indent\n const next = text[i + 1];\n if (next && next !== ' ' && next !== '\\n' && next !== '\\t')\n split = i;\n }\n if (i >= end) {\n if (split) {\n folds.push(split);\n end = split + endStep;\n split = undefined;\n }\n else if (mode === FOLD_QUOTED) {\n // white-space collected at end may stretch past lineWidth\n while (prev === ' ' || prev === '\\t') {\n prev = ch;\n ch = text[(i += 1)];\n overflow = true;\n }\n // Account for newline escape, but don't break preceding escape\n const j = i > escEnd + 1 ? i - 2 : escStart - 1;\n // Bail out if lineWidth & minContentWidth are shorter than an escape string\n if (escapedFolds[j])\n return text;\n folds.push(j);\n escapedFolds[j] = true;\n end = j + endStep;\n split = undefined;\n }\n else {\n overflow = true;\n }\n }\n }\n prev = ch;\n }\n if (overflow && onOverflow)\n onOverflow();\n if (folds.length === 0)\n return text;\n if (onFold)\n onFold();\n let res = text.slice(0, folds[0]);\n for (let i = 0; i < folds.length; ++i) {\n const fold = folds[i];\n const end = folds[i + 1] || text.length;\n if (fold === 0)\n res = `\\n${indent}${text.slice(0, end)}`;\n else {\n if (mode === FOLD_QUOTED && escapedFolds[fold])\n res += `${text[fold]}\\\\`;\n res += `\\n${indent}${text.slice(fold + 1, end)}`;\n }\n }\n return res;\n}\n/**\n * Presumes `i + 1` is at the start of a line\n * @returns index of last newline in more-indented block\n */\nfunction consumeMoreIndentedLines(text, i) {\n let ch = text[i + 1];\n while (ch === ' ' || ch === '\\t') {\n do {\n ch = text[(i += 1)];\n } while (ch && ch !== '\\n');\n ch = text[i + 1];\n }\n return i;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/stringify/foldFlowLines.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/stringify/stringify.js": -/*!***************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/stringify/stringify.js ***! - \***************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createStringifyContext: () => (/* binding */ createStringifyContext),\n/* harmony export */ stringify: () => (/* binding */ stringify)\n/* harmony export */ });\n/* harmony import */ var _doc_anchors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../doc/anchors.js */ \"./node_modules/yaml/browser/dist/doc/anchors.js\");\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _stringifyComment_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stringifyComment.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyComment.js\");\n/* harmony import */ var _stringifyString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stringifyString.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyString.js\");\n\n\n\n\n\nfunction createStringifyContext(doc, options) {\n const opt = Object.assign({\n blockQuote: true,\n commentString: _stringifyComment_js__WEBPACK_IMPORTED_MODULE_2__.stringifyComment,\n defaultKeyType: null,\n defaultStringType: 'PLAIN',\n directives: null,\n doubleQuotedAsJSON: false,\n doubleQuotedMinMultiLineLength: 40,\n falseStr: 'false',\n flowCollectionPadding: true,\n indentSeq: true,\n lineWidth: 80,\n minContentWidth: 20,\n nullStr: 'null',\n simpleKeys: false,\n singleQuote: null,\n trueStr: 'true',\n verifyAliasOrder: true\n }, doc.schema.toStringOptions, options);\n let inFlow;\n switch (opt.collectionStyle) {\n case 'block':\n inFlow = false;\n break;\n case 'flow':\n inFlow = true;\n break;\n default:\n inFlow = null;\n }\n return {\n anchors: new Set(),\n doc,\n flowCollectionPadding: opt.flowCollectionPadding ? ' ' : '',\n indent: '',\n indentStep: typeof opt.indent === 'number' ? ' '.repeat(opt.indent) : ' ',\n inFlow,\n options: opt\n };\n}\nfunction getTagObject(tags, item) {\n if (item.tag) {\n const match = tags.filter(t => t.tag === item.tag);\n if (match.length > 0)\n return match.find(t => t.format === item.format) ?? match[0];\n }\n let tagObj = undefined;\n let obj;\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isScalar)(item)) {\n obj = item.value;\n const match = tags.filter(t => t.identify?.(obj));\n tagObj =\n match.find(t => t.format === item.format) ?? match.find(t => !t.format);\n }\n else {\n obj = item;\n tagObj = tags.find(t => t.nodeClass && obj instanceof t.nodeClass);\n }\n if (!tagObj) {\n const name = obj?.constructor?.name ?? typeof obj;\n throw new Error(`Tag not resolved for ${name} value`);\n }\n return tagObj;\n}\n// needs to be called before value stringifier to allow for circular anchor refs\nfunction stringifyProps(node, tagObj, { anchors, doc }) {\n if (!doc.directives)\n return '';\n const props = [];\n const anchor = ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isScalar)(node) || (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isCollection)(node)) && node.anchor;\n if (anchor && (0,_doc_anchors_js__WEBPACK_IMPORTED_MODULE_0__.anchorIsValid)(anchor)) {\n anchors.add(anchor);\n props.push(`&${anchor}`);\n }\n const tag = node.tag ? node.tag : tagObj.default ? null : tagObj.tag;\n if (tag)\n props.push(doc.directives.tagString(tag));\n return props.join(' ');\n}\nfunction stringify(item, ctx, onComment, onChompKeep) {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isPair)(item))\n return item.toString(ctx, onComment, onChompKeep);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isAlias)(item)) {\n if (ctx.doc.directives)\n return item.toString(ctx);\n if (ctx.resolvedAliases?.has(item)) {\n throw new TypeError(`Cannot stringify circular structure without alias nodes`);\n }\n else {\n if (ctx.resolvedAliases)\n ctx.resolvedAliases.add(item);\n else\n ctx.resolvedAliases = new Set([item]);\n item = item.resolve(ctx.doc);\n }\n }\n let tagObj = undefined;\n const node = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isNode)(item)\n ? item\n : ctx.doc.createNode(item, { onTagObj: o => (tagObj = o) });\n if (!tagObj)\n tagObj = getTagObject(ctx.doc.schema.tags, node);\n const props = stringifyProps(node, tagObj, ctx);\n if (props.length > 0)\n ctx.indentAtStart = (ctx.indentAtStart ?? 0) + props.length + 1;\n const str = typeof tagObj.stringify === 'function'\n ? tagObj.stringify(node, ctx, onComment, onChompKeep)\n : (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isScalar)(node)\n ? (0,_stringifyString_js__WEBPACK_IMPORTED_MODULE_3__.stringifyString)(node, ctx, onComment, onChompKeep)\n : node.toString(ctx, onComment, onChompKeep);\n if (!props)\n return str;\n return (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isScalar)(node) || str[0] === '{' || str[0] === '['\n ? `${props} ${str}`\n : `${props}\\n${ctx.indent}${str}`;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/stringify/stringify.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/stringify/stringifyCollection.js": -/*!*************************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/stringify/stringifyCollection.js ***! - \*************************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ stringifyCollection: () => (/* binding */ stringifyCollection)\n/* harmony export */ });\n/* harmony import */ var _nodes_Collection_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/Collection.js */ \"./node_modules/yaml/browser/dist/nodes/Collection.js\");\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _stringify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stringify.js */ \"./node_modules/yaml/browser/dist/stringify/stringify.js\");\n/* harmony import */ var _stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stringifyComment.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyComment.js\");\n\n\n\n\n\nfunction stringifyCollection(collection, ctx, options) {\n const flow = ctx.inFlow ?? collection.flow;\n const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;\n return stringify(collection, ctx, options);\n}\nfunction stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {\n const { indent, options: { commentString } } = ctx;\n const itemCtx = Object.assign({}, ctx, { indent: itemIndent, type: null });\n let chompKeep = false; // flag for the preceding node's status\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isNode)(item)) {\n if (!chompKeep && item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, chompKeep);\n if (item.comment)\n comment = item.comment;\n }\n else if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isPair)(item)) {\n const ik = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isNode)(item.key) ? item.key : null;\n if (ik) {\n if (!chompKeep && ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, chompKeep);\n }\n }\n chompKeep = false;\n let str = (0,_stringify_js__WEBPACK_IMPORTED_MODULE_2__.stringify)(item, itemCtx, () => (comment = null), () => (chompKeep = true));\n if (comment)\n str += (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.lineComment)(str, itemIndent, commentString(comment));\n if (chompKeep && comment)\n chompKeep = false;\n lines.push(blockItemPrefix + str);\n }\n let str;\n if (lines.length === 0) {\n str = flowChars.start + flowChars.end;\n }\n else {\n str = lines[0];\n for (let i = 1; i < lines.length; ++i) {\n const line = lines[i];\n str += line ? `\\n${indent}${line}` : '\\n';\n }\n }\n if (comment) {\n str += '\\n' + (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.indentComment)(commentString(comment), indent);\n if (onComment)\n onComment();\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n}\nfunction stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemIndent, onComment }) {\n const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx;\n itemIndent += indentStep;\n const itemCtx = Object.assign({}, ctx, {\n indent: itemIndent,\n inFlow: true,\n type: null\n });\n let reqNewline = false;\n let linesAtValue = 0;\n const lines = [];\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n let comment = null;\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isNode)(item)) {\n if (item.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, item.commentBefore, false);\n if (item.comment)\n comment = item.comment;\n }\n else if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isPair)(item)) {\n const ik = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isNode)(item.key) ? item.key : null;\n if (ik) {\n if (ik.spaceBefore)\n lines.push('');\n addCommentBefore(ctx, lines, ik.commentBefore, false);\n if (ik.comment)\n reqNewline = true;\n }\n const iv = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_1__.isNode)(item.value) ? item.value : null;\n if (iv) {\n if (iv.comment)\n comment = iv.comment;\n if (iv.commentBefore)\n reqNewline = true;\n }\n else if (item.value == null && ik?.comment) {\n comment = ik.comment;\n }\n }\n if (comment)\n reqNewline = true;\n let str = (0,_stringify_js__WEBPACK_IMPORTED_MODULE_2__.stringify)(item, itemCtx, () => (comment = null));\n if (i < items.length - 1)\n str += ',';\n if (comment)\n str += (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.lineComment)(str, itemIndent, commentString(comment));\n if (!reqNewline && (lines.length > linesAtValue || str.includes('\\n')))\n reqNewline = true;\n lines.push(str);\n linesAtValue = lines.length;\n }\n let str;\n const { start, end } = flowChars;\n if (lines.length === 0) {\n str = start + end;\n }\n else {\n if (!reqNewline) {\n const len = lines.reduce((sum, line) => sum + line.length + 2, 2);\n reqNewline = len > _nodes_Collection_js__WEBPACK_IMPORTED_MODULE_0__.Collection.maxFlowStringSingleLineLength;\n }\n if (reqNewline) {\n str = start;\n for (const line of lines)\n str += line ? `\\n${indentStep}${indent}${line}` : '\\n';\n str += `\\n${indent}${end}`;\n }\n else {\n str = `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`;\n }\n }\n if (comment) {\n str += (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.lineComment)(str, indent, commentString(comment));\n if (onComment)\n onComment();\n }\n return str;\n}\nfunction addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) {\n if (comment && chompKeep)\n comment = comment.replace(/^\\n+/, '');\n if (comment) {\n const ic = (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.indentComment)(commentString(comment), indent);\n lines.push(ic.trimStart()); // Avoid double indent on first line\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/stringify/stringifyCollection.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/stringify/stringifyComment.js": -/*!**********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/stringify/stringifyComment.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ indentComment: () => (/* binding */ indentComment),\n/* harmony export */ lineComment: () => (/* binding */ lineComment),\n/* harmony export */ stringifyComment: () => (/* binding */ stringifyComment)\n/* harmony export */ });\n/**\n * Stringifies a comment.\n *\n * Empty comment lines are left empty,\n * lines consisting of a single space are replaced by `#`,\n * and all other lines are prefixed with a `#`.\n */\nconst stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, '#');\nfunction indentComment(comment, indent) {\n if (/^\\n+$/.test(comment))\n return comment.substring(1);\n return indent ? comment.replace(/^(?! *$)/gm, indent) : comment;\n}\nconst lineComment = (str, indent, comment) => str.endsWith('\\n')\n ? indentComment(comment, indent)\n : comment.includes('\\n')\n ? '\\n' + indentComment(comment, indent)\n : (str.endsWith(' ') ? '' : ' ') + comment;\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/stringify/stringifyComment.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/stringify/stringifyDocument.js": -/*!***********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/stringify/stringifyDocument.js ***! - \***********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ stringifyDocument: () => (/* binding */ stringifyDocument)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _stringify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stringify.js */ \"./node_modules/yaml/browser/dist/stringify/stringify.js\");\n/* harmony import */ var _stringifyComment_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stringifyComment.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyComment.js\");\n\n\n\n\nfunction stringifyDocument(doc, options) {\n const lines = [];\n let hasDirectives = options.directives === true;\n if (options.directives !== false && doc.directives) {\n const dir = doc.directives.toString(doc);\n if (dir) {\n lines.push(dir);\n hasDirectives = true;\n }\n else if (doc.directives.docStart)\n hasDirectives = true;\n }\n if (hasDirectives)\n lines.push('---');\n const ctx = (0,_stringify_js__WEBPACK_IMPORTED_MODULE_1__.createStringifyContext)(doc, options);\n const { commentString } = ctx.options;\n if (doc.commentBefore) {\n if (lines.length !== 1)\n lines.unshift('');\n const cs = commentString(doc.commentBefore);\n lines.unshift((0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_2__.indentComment)(cs, ''));\n }\n let chompKeep = false;\n let contentComment = null;\n if (doc.contents) {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isNode)(doc.contents)) {\n if (doc.contents.spaceBefore && hasDirectives)\n lines.push('');\n if (doc.contents.commentBefore) {\n const cs = commentString(doc.contents.commentBefore);\n lines.push((0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_2__.indentComment)(cs, ''));\n }\n // top-level block scalars need to be indented if followed by a comment\n ctx.forceBlockIndent = !!doc.comment;\n contentComment = doc.contents.comment;\n }\n const onChompKeep = contentComment ? undefined : () => (chompKeep = true);\n let body = (0,_stringify_js__WEBPACK_IMPORTED_MODULE_1__.stringify)(doc.contents, ctx, () => (contentComment = null), onChompKeep);\n if (contentComment)\n body += (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_2__.lineComment)(body, '', commentString(contentComment));\n if ((body[0] === '|' || body[0] === '>') &&\n lines[lines.length - 1] === '---') {\n // Top-level block scalars with a preceding doc marker ought to use the\n // same line for their header.\n lines[lines.length - 1] = `--- ${body}`;\n }\n else\n lines.push(body);\n }\n else {\n lines.push((0,_stringify_js__WEBPACK_IMPORTED_MODULE_1__.stringify)(doc.contents, ctx));\n }\n if (doc.directives?.docEnd) {\n if (doc.comment) {\n const cs = commentString(doc.comment);\n if (cs.includes('\\n')) {\n lines.push('...');\n lines.push((0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_2__.indentComment)(cs, ''));\n }\n else {\n lines.push(`... ${cs}`);\n }\n }\n else {\n lines.push('...');\n }\n }\n else {\n let dc = doc.comment;\n if (dc && chompKeep)\n dc = dc.replace(/^\\n+/, '');\n if (dc) {\n if ((!chompKeep || contentComment) && lines[lines.length - 1] !== '')\n lines.push('');\n lines.push((0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_2__.indentComment)(commentString(dc), ''));\n }\n }\n return lines.join('\\n') + '\\n';\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/stringify/stringifyDocument.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/stringify/stringifyNumber.js": -/*!*********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/stringify/stringifyNumber.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ stringifyNumber: () => (/* binding */ stringifyNumber)\n/* harmony export */ });\nfunction stringifyNumber({ format, minFractionDigits, tag, value }) {\n if (typeof value === 'bigint')\n return String(value);\n const num = typeof value === 'number' ? value : Number(value);\n if (!isFinite(num))\n return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';\n let n = JSON.stringify(value);\n if (!format &&\n minFractionDigits &&\n (!tag || tag === 'tag:yaml.org,2002:float') &&\n /^\\d/.test(n)) {\n let i = n.indexOf('.');\n if (i < 0) {\n i = n.length;\n n += '.';\n }\n let d = minFractionDigits - (n.length - i - 1);\n while (d-- > 0)\n n += '0';\n }\n return n;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/stringify/stringifyNumber.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/stringify/stringifyPair.js": -/*!*******************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/stringify/stringifyPair.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ stringifyPair: () => (/* binding */ stringifyPair)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _stringify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stringify.js */ \"./node_modules/yaml/browser/dist/stringify/stringify.js\");\n/* harmony import */ var _stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stringifyComment.js */ \"./node_modules/yaml/browser/dist/stringify/stringifyComment.js\");\n\n\n\n\n\nfunction stringifyPair({ key, value }, ctx, onComment, onChompKeep) {\n const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;\n let keyComment = ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isNode)(key) && key.comment) || null;\n if (simpleKeys) {\n if (keyComment) {\n throw new Error('With simple keys, key nodes cannot have comments');\n }\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isCollection)(key)) {\n const msg = 'With simple keys, collection cannot be used as a key value';\n throw new Error(msg);\n }\n }\n let explicitKey = !simpleKeys &&\n (!key ||\n (keyComment && value == null && !ctx.inFlow) ||\n (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isCollection)(key) ||\n ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(key)\n ? key.type === _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_1__.Scalar.BLOCK_FOLDED || key.type === _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_1__.Scalar.BLOCK_LITERAL\n : typeof key === 'object'));\n ctx = Object.assign({}, ctx, {\n allNullValues: false,\n implicitKey: !explicitKey && (simpleKeys || !allNullValues),\n indent: indent + indentStep\n });\n let keyCommentDone = false;\n let chompKeep = false;\n let str = (0,_stringify_js__WEBPACK_IMPORTED_MODULE_2__.stringify)(key, ctx, () => (keyCommentDone = true), () => (chompKeep = true));\n if (!explicitKey && !ctx.inFlow && str.length > 1024) {\n if (simpleKeys)\n throw new Error('With simple keys, single line scalar must not span more than 1024 characters');\n explicitKey = true;\n }\n if (ctx.inFlow) {\n if (allNullValues || value == null) {\n if (keyCommentDone && onComment)\n onComment();\n return str === '' ? '?' : explicitKey ? `? ${str}` : str;\n }\n }\n else if ((allNullValues && !simpleKeys) || (value == null && explicitKey)) {\n str = `? ${str}`;\n if (keyComment && !keyCommentDone) {\n str += (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.lineComment)(str, ctx.indent, commentString(keyComment));\n }\n else if (chompKeep && onChompKeep)\n onChompKeep();\n return str;\n }\n if (keyCommentDone)\n keyComment = null;\n if (explicitKey) {\n if (keyComment)\n str += (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.lineComment)(str, ctx.indent, commentString(keyComment));\n str = `? ${str}\\n${indent}:`;\n }\n else {\n str = `${str}:`;\n if (keyComment)\n str += (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.lineComment)(str, ctx.indent, commentString(keyComment));\n }\n let vsb, vcb, valueComment;\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isNode)(value)) {\n vsb = !!value.spaceBefore;\n vcb = value.commentBefore;\n valueComment = value.comment;\n }\n else {\n vsb = false;\n vcb = null;\n valueComment = null;\n if (value && typeof value === 'object')\n value = doc.createNode(value);\n }\n ctx.implicitKey = false;\n if (!explicitKey && !keyComment && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(value))\n ctx.indentAtStart = str.length + 1;\n chompKeep = false;\n if (!indentSeq &&\n indentStep.length >= 2 &&\n !ctx.inFlow &&\n !explicitKey &&\n (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(value) &&\n !value.flow &&\n !value.tag &&\n !value.anchor) {\n // If indentSeq === false, consider '- ' as part of indentation where possible\n ctx.indent = ctx.indent.substring(2);\n }\n let valueCommentDone = false;\n const valueStr = (0,_stringify_js__WEBPACK_IMPORTED_MODULE_2__.stringify)(value, ctx, () => (valueCommentDone = true), () => (chompKeep = true));\n let ws = ' ';\n if (keyComment || vsb || vcb) {\n ws = vsb ? '\\n' : '';\n if (vcb) {\n const cs = commentString(vcb);\n ws += `\\n${(0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.indentComment)(cs, ctx.indent)}`;\n }\n if (valueStr === '' && !ctx.inFlow) {\n if (ws === '\\n')\n ws = '\\n\\n';\n }\n else {\n ws += `\\n${ctx.indent}`;\n }\n }\n else if (!explicitKey && (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isCollection)(value)) {\n const vs0 = valueStr[0];\n const nl0 = valueStr.indexOf('\\n');\n const hasNewline = nl0 !== -1;\n const flow = ctx.inFlow ?? value.flow ?? value.items.length === 0;\n if (hasNewline || !flow) {\n let hasPropsLine = false;\n if (hasNewline && (vs0 === '&' || vs0 === '!')) {\n let sp0 = valueStr.indexOf(' ');\n if (vs0 === '&' &&\n sp0 !== -1 &&\n sp0 < nl0 &&\n valueStr[sp0 + 1] === '!') {\n sp0 = valueStr.indexOf(' ', sp0 + 1);\n }\n if (sp0 === -1 || nl0 < sp0)\n hasPropsLine = true;\n }\n if (!hasPropsLine)\n ws = `\\n${ctx.indent}`;\n }\n }\n else if (valueStr === '' || valueStr[0] === '\\n') {\n ws = '';\n }\n str += ws + valueStr;\n if (ctx.inFlow) {\n if (valueCommentDone && onComment)\n onComment();\n }\n else if (valueComment && !valueCommentDone) {\n str += (0,_stringifyComment_js__WEBPACK_IMPORTED_MODULE_3__.lineComment)(str, ctx.indent, commentString(valueComment));\n }\n else if (chompKeep && onChompKeep) {\n onChompKeep();\n }\n return str;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/stringify/stringifyPair.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/stringify/stringifyString.js": -/*!*********************************************************************!*\ - !*** ./node_modules/yaml/browser/dist/stringify/stringifyString.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ stringifyString: () => (/* binding */ stringifyString)\n/* harmony export */ });\n/* harmony import */ var _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../nodes/Scalar.js */ \"./node_modules/yaml/browser/dist/nodes/Scalar.js\");\n/* harmony import */ var _foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foldFlowLines.js */ \"./node_modules/yaml/browser/dist/stringify/foldFlowLines.js\");\n\n\n\nconst getFoldOptions = (ctx, isBlock) => ({\n indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,\n lineWidth: ctx.options.lineWidth,\n minContentWidth: ctx.options.minContentWidth\n});\n// Also checks for lines starting with %, as parsing the output as YAML 1.1 will\n// presume that's starting a new document.\nconst containsDocumentMarker = (str) => /^(%|---|\\.\\.\\.)/m.test(str);\nfunction lineLengthOverLimit(str, lineWidth, indentLength) {\n if (!lineWidth || lineWidth < 0)\n return false;\n const limit = lineWidth - indentLength;\n const strLen = str.length;\n if (strLen <= limit)\n return false;\n for (let i = 0, start = 0; i < strLen; ++i) {\n if (str[i] === '\\n') {\n if (i - start > limit)\n return true;\n start = i + 1;\n if (strLen - start <= limit)\n return false;\n }\n }\n return true;\n}\nfunction doubleQuotedString(value, ctx) {\n const json = JSON.stringify(value);\n if (ctx.options.doubleQuotedAsJSON)\n return json;\n const { implicitKey } = ctx;\n const minMultiLineLength = ctx.options.doubleQuotedMinMultiLineLength;\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n let str = '';\n let start = 0;\n for (let i = 0, ch = json[i]; ch; ch = json[++i]) {\n if (ch === ' ' && json[i + 1] === '\\\\' && json[i + 2] === 'n') {\n // space before newline needs to be escaped to not be folded\n str += json.slice(start, i) + '\\\\ ';\n i += 1;\n start = i;\n ch = '\\\\';\n }\n if (ch === '\\\\')\n switch (json[i + 1]) {\n case 'u':\n {\n str += json.slice(start, i);\n const code = json.substr(i + 2, 4);\n switch (code) {\n case '0000':\n str += '\\\\0';\n break;\n case '0007':\n str += '\\\\a';\n break;\n case '000b':\n str += '\\\\v';\n break;\n case '001b':\n str += '\\\\e';\n break;\n case '0085':\n str += '\\\\N';\n break;\n case '00a0':\n str += '\\\\_';\n break;\n case '2028':\n str += '\\\\L';\n break;\n case '2029':\n str += '\\\\P';\n break;\n default:\n if (code.substr(0, 2) === '00')\n str += '\\\\x' + code.substr(2);\n else\n str += json.substr(i, 6);\n }\n i += 5;\n start = i + 1;\n }\n break;\n case 'n':\n if (implicitKey ||\n json[i + 2] === '\"' ||\n json.length < minMultiLineLength) {\n i += 1;\n }\n else {\n // folding will eat first newline\n str += json.slice(start, i) + '\\n\\n';\n while (json[i + 2] === '\\\\' &&\n json[i + 3] === 'n' &&\n json[i + 4] !== '\"') {\n str += '\\n';\n i += 2;\n }\n str += indent;\n // space after newline needs to be escaped to not be folded\n if (json[i + 2] === ' ')\n str += '\\\\';\n i += 1;\n start = i + 1;\n }\n break;\n default:\n i += 1;\n }\n }\n str = start ? str + json.slice(start) : json;\n return implicitKey\n ? str\n : (0,_foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__.foldFlowLines)(str, indent, _foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__.FOLD_QUOTED, getFoldOptions(ctx, false));\n}\nfunction singleQuotedString(value, ctx) {\n if (ctx.options.singleQuote === false ||\n (ctx.implicitKey && value.includes('\\n')) ||\n /[ \\t]\\n|\\n[ \\t]/.test(value) // single quoted string can't have leading or trailing whitespace around newline\n )\n return doubleQuotedString(value, ctx);\n const indent = ctx.indent || (containsDocumentMarker(value) ? ' ' : '');\n const res = \"'\" + value.replace(/'/g, \"''\").replace(/\\n+/g, `$&\\n${indent}`) + \"'\";\n return ctx.implicitKey\n ? res\n : (0,_foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__.foldFlowLines)(res, indent, _foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction quotedString(value, ctx) {\n const { singleQuote } = ctx.options;\n let qs;\n if (singleQuote === false)\n qs = doubleQuotedString;\n else {\n const hasDouble = value.includes('\"');\n const hasSingle = value.includes(\"'\");\n if (hasDouble && !hasSingle)\n qs = singleQuotedString;\n else if (hasSingle && !hasDouble)\n qs = doubleQuotedString;\n else\n qs = singleQuote ? singleQuotedString : doubleQuotedString;\n }\n return qs(value, ctx);\n}\n// The negative lookbehind avoids a polynomial search,\n// but isn't supported yet on Safari: https://caniuse.com/js-regexp-lookbehind\nlet blockEndNewlines;\ntry {\n blockEndNewlines = new RegExp('(^|(?\\n';\n // determine chomping from whitespace at value end\n let chomp;\n let endStart;\n for (endStart = value.length; endStart > 0; --endStart) {\n const ch = value[endStart - 1];\n if (ch !== '\\n' && ch !== '\\t' && ch !== ' ')\n break;\n }\n let end = value.substring(endStart);\n const endNlPos = end.indexOf('\\n');\n if (endNlPos === -1) {\n chomp = '-'; // strip\n }\n else if (value === end || endNlPos !== end.length - 1) {\n chomp = '+'; // keep\n if (onChompKeep)\n onChompKeep();\n }\n else {\n chomp = ''; // clip\n }\n if (end) {\n value = value.slice(0, -end.length);\n if (end[end.length - 1] === '\\n')\n end = end.slice(0, -1);\n end = end.replace(blockEndNewlines, `$&${indent}`);\n }\n // determine indent indicator from whitespace at value start\n let startWithSpace = false;\n let startEnd;\n let startNlPos = -1;\n for (startEnd = 0; startEnd < value.length; ++startEnd) {\n const ch = value[startEnd];\n if (ch === ' ')\n startWithSpace = true;\n else if (ch === '\\n')\n startNlPos = startEnd;\n else\n break;\n }\n let start = value.substring(0, startNlPos < startEnd ? startNlPos + 1 : startEnd);\n if (start) {\n value = value.substring(start.length);\n start = start.replace(/\\n+/g, `$&${indent}`);\n }\n const indentSize = indent ? '2' : '1'; // root is at -1\n let header = (literal ? '|' : '>') + (startWithSpace ? indentSize : '') + chomp;\n if (comment) {\n header += ' ' + commentString(comment.replace(/ ?[\\r\\n]+/g, ' '));\n if (onComment)\n onComment();\n }\n if (literal) {\n value = value.replace(/\\n+/g, `$&${indent}`);\n return `${header}\\n${indent}${start}${value}${end}`;\n }\n value = value\n .replace(/\\n+/g, '\\n$&')\n .replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g, '$1$2') // more-indented lines aren't folded\n // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent\n .replace(/\\n+/g, `$&${indent}`);\n const body = (0,_foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__.foldFlowLines)(`${start}${value}${end}`, indent, _foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__.FOLD_BLOCK, getFoldOptions(ctx, true));\n return `${header}\\n${indent}${body}`;\n}\nfunction plainString(item, ctx, onComment, onChompKeep) {\n const { type, value } = item;\n const { actualString, implicitKey, indent, indentStep, inFlow } = ctx;\n if ((implicitKey && value.includes('\\n')) ||\n (inFlow && /[[\\]{},]/.test(value))) {\n return quotedString(value, ctx);\n }\n if (!value ||\n /^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(value)) {\n // not allowed:\n // - empty string, '-' or '?'\n // - start with an indicator character (except [?:-]) or /[?-] /\n // - '\\n ', ': ' or ' \\n' anywhere\n // - '#' not preceded by a non-space char\n // - end with ' ' or ':'\n return implicitKey || inFlow || !value.includes('\\n')\n ? quotedString(value, ctx)\n : blockString(item, ctx, onComment, onChompKeep);\n }\n if (!implicitKey &&\n !inFlow &&\n type !== _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.PLAIN &&\n value.includes('\\n')) {\n // Where allowed & type not set explicitly, prefer block style for multiline strings\n return blockString(item, ctx, onComment, onChompKeep);\n }\n if (containsDocumentMarker(value)) {\n if (indent === '') {\n ctx.forceBlockIndent = true;\n return blockString(item, ctx, onComment, onChompKeep);\n }\n else if (implicitKey && indent === indentStep) {\n return quotedString(value, ctx);\n }\n }\n const str = value.replace(/\\n+/g, `$&\\n${indent}`);\n // Verify that output will be parsed as a string, as e.g. plain numbers and\n // booleans get parsed with those types in v1.2 (e.g. '42', 'true' & '0.9e-3'),\n // and others in v1.1.\n if (actualString) {\n const test = (tag) => tag.default && tag.tag !== 'tag:yaml.org,2002:str' && tag.test?.test(str);\n const { compat, tags } = ctx.doc.schema;\n if (tags.some(test) || compat?.some(test))\n return quotedString(value, ctx);\n }\n return implicitKey\n ? str\n : (0,_foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__.foldFlowLines)(str, indent, _foldFlowLines_js__WEBPACK_IMPORTED_MODULE_1__.FOLD_FLOW, getFoldOptions(ctx, false));\n}\nfunction stringifyString(item, ctx, onComment, onChompKeep) {\n const { implicitKey, inFlow } = ctx;\n const ss = typeof item.value === 'string'\n ? item\n : Object.assign({}, item, { value: String(item.value) });\n let { type } = item;\n if (type !== _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.QUOTE_DOUBLE) {\n // force double quotes on control characters & unpaired surrogates\n if (/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(ss.value))\n type = _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.QUOTE_DOUBLE;\n }\n const _stringify = (_type) => {\n switch (_type) {\n case _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.BLOCK_FOLDED:\n case _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.BLOCK_LITERAL:\n return implicitKey || inFlow\n ? quotedString(ss.value, ctx) // blocks are not valid inside flow containers\n : blockString(ss, ctx, onComment, onChompKeep);\n case _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.QUOTE_DOUBLE:\n return doubleQuotedString(ss.value, ctx);\n case _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.QUOTE_SINGLE:\n return singleQuotedString(ss.value, ctx);\n case _nodes_Scalar_js__WEBPACK_IMPORTED_MODULE_0__.Scalar.PLAIN:\n return plainString(ss, ctx, onComment, onChompKeep);\n default:\n return null;\n }\n };\n let res = _stringify(type);\n if (res === null) {\n const { defaultKeyType, defaultStringType } = ctx.options;\n const t = (implicitKey && defaultKeyType) || defaultStringType;\n res = _stringify(t);\n if (res === null)\n throw new Error(`Unsupported default string type ${t}`);\n }\n return res;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/stringify/stringifyString.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/dist/visit.js": -/*!*************************************************!*\ - !*** ./node_modules/yaml/browser/dist/visit.js ***! - \*************************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ visit: () => (/* binding */ visit),\n/* harmony export */ visitAsync: () => (/* binding */ visitAsync)\n/* harmony export */ });\n/* harmony import */ var _nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nodes/identity.js */ \"./node_modules/yaml/browser/dist/nodes/identity.js\");\n\n\nconst BREAK = Symbol('break visit');\nconst SKIP = Symbol('skip children');\nconst REMOVE = Symbol('remove node');\n/**\n * Apply a visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nfunction visit(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isDocument)(node)) {\n const cd = visit_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n visit_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisit.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisit.SKIP = SKIP;\n/** Remove the current node */\nvisit.REMOVE = REMOVE;\nfunction visit_(key, node, visitor, path) {\n const ctrl = callVisitor(key, node, visitor, path);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isNode)(ctrl) || (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(ctrl)) {\n replaceNode(key, path, ctrl);\n return visit_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isCollection)(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = visit_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(node)) {\n path = Object.freeze(path.concat(node));\n const ck = visit_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = visit_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\n/**\n * Apply an async visitor to an AST node or document.\n *\n * Walks through the tree (depth-first) starting from `node`, calling a\n * `visitor` function with three arguments:\n * - `key`: For sequence values and map `Pair`, the node's index in the\n * collection. Within a `Pair`, `'key'` or `'value'`, correspondingly.\n * `null` for the root node.\n * - `node`: The current node.\n * - `path`: The ancestry of the current node.\n *\n * The return value of the visitor may be used to control the traversal:\n * - `Promise`: Must resolve to one of the following values\n * - `undefined` (default): Do nothing and continue\n * - `visit.SKIP`: Do not visit the children of this node, continue with next\n * sibling\n * - `visit.BREAK`: Terminate traversal completely\n * - `visit.REMOVE`: Remove the current node, then continue with the next one\n * - `Node`: Replace the current node, then continue by visiting it\n * - `number`: While iterating the items of a sequence or map, set the index\n * of the next step. This is useful especially if the index of the current\n * node has changed.\n *\n * If `visitor` is a single function, it will be called with all values\n * encountered in the tree, including e.g. `null` values. Alternatively,\n * separate visitor functions may be defined for each `Map`, `Pair`, `Seq`,\n * `Alias` and `Scalar` node. To define the same visitor function for more than\n * one node type, use the `Collection` (map and seq), `Value` (map, seq & scalar)\n * and `Node` (alias, map, seq & scalar) targets. Of all these, only the most\n * specific defined one will be used for each node.\n */\nasync function visitAsync(node, visitor) {\n const visitor_ = initVisitor(visitor);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isDocument)(node)) {\n const cd = await visitAsync_(null, node.contents, visitor_, Object.freeze([node]));\n if (cd === REMOVE)\n node.contents = null;\n }\n else\n await visitAsync_(null, node, visitor_, Object.freeze([]));\n}\n// Without the `as symbol` casts, TS declares these in the `visit`\n// namespace using `var`, but then complains about that because\n// `unique symbol` must be `const`.\n/** Terminate visit traversal completely */\nvisitAsync.BREAK = BREAK;\n/** Do not visit the children of the current node */\nvisitAsync.SKIP = SKIP;\n/** Remove the current node */\nvisitAsync.REMOVE = REMOVE;\nasync function visitAsync_(key, node, visitor, path) {\n const ctrl = await callVisitor(key, node, visitor, path);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isNode)(ctrl) || (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(ctrl)) {\n replaceNode(key, path, ctrl);\n return visitAsync_(key, ctrl, visitor, path);\n }\n if (typeof ctrl !== 'symbol') {\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isCollection)(node)) {\n path = Object.freeze(path.concat(node));\n for (let i = 0; i < node.items.length; ++i) {\n const ci = await visitAsync_(i, node.items[i], visitor, path);\n if (typeof ci === 'number')\n i = ci - 1;\n else if (ci === BREAK)\n return BREAK;\n else if (ci === REMOVE) {\n node.items.splice(i, 1);\n i -= 1;\n }\n }\n }\n else if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(node)) {\n path = Object.freeze(path.concat(node));\n const ck = await visitAsync_('key', node.key, visitor, path);\n if (ck === BREAK)\n return BREAK;\n else if (ck === REMOVE)\n node.key = null;\n const cv = await visitAsync_('value', node.value, visitor, path);\n if (cv === BREAK)\n return BREAK;\n else if (cv === REMOVE)\n node.value = null;\n }\n }\n return ctrl;\n}\nfunction initVisitor(visitor) {\n if (typeof visitor === 'object' &&\n (visitor.Collection || visitor.Node || visitor.Value)) {\n return Object.assign({\n Alias: visitor.Node,\n Map: visitor.Node,\n Scalar: visitor.Node,\n Seq: visitor.Node\n }, visitor.Value && {\n Map: visitor.Value,\n Scalar: visitor.Value,\n Seq: visitor.Value\n }, visitor.Collection && {\n Map: visitor.Collection,\n Seq: visitor.Collection\n }, visitor);\n }\n return visitor;\n}\nfunction callVisitor(key, node, visitor, path) {\n if (typeof visitor === 'function')\n return visitor(key, node, path);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isMap)(node))\n return visitor.Map?.(key, node, path);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isSeq)(node))\n return visitor.Seq?.(key, node, path);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(node))\n return visitor.Pair?.(key, node, path);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isScalar)(node))\n return visitor.Scalar?.(key, node, path);\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(node))\n return visitor.Alias?.(key, node, path);\n return undefined;\n}\nfunction replaceNode(key, path, node) {\n const parent = path[path.length - 1];\n if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isCollection)(parent)) {\n parent.items[key] = node;\n }\n else if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isPair)(parent)) {\n if (key === 'key')\n parent.key = node;\n else\n parent.value = node;\n }\n else if ((0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isDocument)(parent)) {\n parent.contents = node;\n }\n else {\n const pt = (0,_nodes_identity_js__WEBPACK_IMPORTED_MODULE_0__.isAlias)(parent) ? 'alias' : 'scalar';\n throw new Error(`Cannot replace node with ${pt} parent`);\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/dist/visit.js?"); - -/***/ }), - -/***/ "./node_modules/yaml/browser/index.js": -/*!********************************************!*\ - !*** ./node_modules/yaml/browser/index.js ***! - \********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Alias: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.Alias),\n/* harmony export */ CST: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.CST),\n/* harmony export */ Composer: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.Composer),\n/* harmony export */ Document: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.Document),\n/* harmony export */ Lexer: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.Lexer),\n/* harmony export */ LineCounter: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.LineCounter),\n/* harmony export */ Pair: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.Pair),\n/* harmony export */ Parser: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.Parser),\n/* harmony export */ Scalar: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.Scalar),\n/* harmony export */ Schema: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.Schema),\n/* harmony export */ YAMLError: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.YAMLError),\n/* harmony export */ YAMLMap: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.YAMLMap),\n/* harmony export */ YAMLParseError: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.YAMLParseError),\n/* harmony export */ YAMLSeq: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.YAMLSeq),\n/* harmony export */ YAMLWarning: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.YAMLWarning),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ isAlias: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.isAlias),\n/* harmony export */ isCollection: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.isCollection),\n/* harmony export */ isDocument: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.isDocument),\n/* harmony export */ isMap: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.isMap),\n/* harmony export */ isNode: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.isNode),\n/* harmony export */ isPair: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.isPair),\n/* harmony export */ isScalar: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.isScalar),\n/* harmony export */ isSeq: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.isSeq),\n/* harmony export */ parse: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.parse),\n/* harmony export */ parseAllDocuments: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.parseAllDocuments),\n/* harmony export */ parseDocument: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.parseDocument),\n/* harmony export */ stringify: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.stringify),\n/* harmony export */ visit: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.visit),\n/* harmony export */ visitAsync: () => (/* reexport safe */ _dist_index_js__WEBPACK_IMPORTED_MODULE_0__.visitAsync)\n/* harmony export */ });\n/* harmony import */ var _dist_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dist/index.js */ \"./node_modules/yaml/browser/dist/index.js\");\n// `export * as default from ...` fails on Webpack v4\n// https://github.com/eemeli/yaml/issues/228\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_dist_index_js__WEBPACK_IMPORTED_MODULE_0__);\n\n\n\n//# sourceURL=webpack://crosswords-js/./node_modules/yaml/browser/index.js?"); - -/***/ }), - -/***/ "./src/cell-map.mjs": -/*!**************************!*\ - !*** ./src/cell-map.mjs ***! - \**************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CellMap: () => (/* binding */ CellMap)\n/* harmony export */ });\n/* harmony import */ var _helpers_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers.mjs */ \"./src/helpers.mjs\");\n\n\n// Internally used map of Crossword model data to DOM elements.\nclass CellMap {\n /** @type {Record} */\n #modelCells = {};\n\n /**\n * Adds a Cell <-> Cell Element mapping.\n * @param {*} modelCell\n * @param {HTMLDivElement} cellElement\n */\n add(modelCell, cellElement) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(modelCell, 'modelCell is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(cellElement, 'cellElement is null or undefined');\n // cellElement.dataset.xy set in CrosswordController.#newCellElement()\n this.#modelCells[cellElement.dataset.xy] = modelCell;\n }\n\n /**\n * Gets the DOM element for a modelCell.\n * @param {*} modelCell\n * @returns {HTMLDivElement}\n */\n cellElement = (modelCell) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(typeof modelCell === 'object', 'Cell is not an object');\n // modelCell.cellElement set in CrosswordController.#newCellElement()\n return modelCell.cellElement;\n };\n\n // Gets the modelCell for a DOM element.\n modelCell = (cellElement) => {\n switch (typeof cellElement) {\n case 'string':\n return this.#modelCells[cellElement];\n case 'object':\n return this.#modelCells[cellElement.dataset.xy];\n default:\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(true, 'Unexpected type for \"cellElement\"');\n break;\n }\n };\n\n get modelCells() {\n // this.#modelCells object properties are keyed by modelCell.toString()\n // Retrieve the array of associated values (modelCell) for the Object keys\n return Object.values(this.#modelCells);\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/cell-map.mjs?"); - -/***/ }), - -/***/ "./src/clue-model.mjs": -/*!****************************!*\ - !*** ./src/clue-model.mjs ***! - \****************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ boldAsteriskRegex: () => (/* binding */ boldAsteriskRegex),\n/* harmony export */ boldItalicAsteriskRegex: () => (/* binding */ boldItalicAsteriskRegex),\n/* harmony export */ boldItalicUnderscoreRegex: () => (/* binding */ boldItalicUnderscoreRegex),\n/* harmony export */ boldUnderscoreRegex: () => (/* binding */ boldUnderscoreRegex),\n/* harmony export */ cluePattern: () => (/* binding */ cluePattern),\n/* harmony export */ clueRegex: () => (/* binding */ clueRegex),\n/* harmony export */ clueTextRegex: () => (/* binding */ clueTextRegex),\n/* harmony export */ italicAsteriskRegex: () => (/* binding */ italicAsteriskRegex),\n/* harmony export */ italicUnderscoreRegex: () => (/* binding */ italicUnderscoreRegex),\n/* harmony export */ labelPartsRegex: () => (/* binding */ labelPartsRegex),\n/* harmony export */ lengthPartsRegex: () => (/* binding */ lengthPartsRegex),\n/* harmony export */ newClueModel: () => (/* binding */ newClueModel),\n/* harmony export */ parseMarkdown: () => (/* binding */ parseMarkdown)\n/* harmony export */ });\n/* harmony import */ var _helpers_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers.mjs */ \"./src/helpers.mjs\");\n\n\nconst cluePattern = 'LabelText.ClueText(LengthText)';\n\n// Parse the groups: /^\\s*LabelText\\.ClueText\\(LengthText\\)\\s*$/\n// 'LabelText' is all characters from start up to but excluding the first period '.'.\n// Leading whitespace is ignored.\n// 'ClueText' is all characters after the first period up to but excluding the last\n// the last opening parenthesis '('\n// 'LengthText' is all characters after the last opening parenthesis up to but excluding\n// the last subsequent closing parenthesis ')'. Trailing whitespace is allowed.\nconst clueRegex = /^\\s*(.*?)\\.(.*)\\((.*)\\)\\s*$/;\n// Parse 'labelText' into 1+ clue segment labels: 1+ digits,\n// optionally followed by an 'a' or a 'd'.\n// The labels are separated by any sequence of 1+ non-alphanumeric\n// characters.\nconst labelPartsRegex = /^([^bce-z]*?)(\\d+[ad]?)\\s*(.*)/;\n// Parse 'clueText' from all leading and trailing whitespace\nconst clueTextRegex = /^\\s*(.*?)\\s*$/;\n// Parse 'lengthText' into 1+ whole-numbers.\n// The lengths are separated by any sequence of 1+ non-alphanumeric\n// characters, excluding parentheses.\n// Special case: acronyms\n// Acronym letters can including a trailing period for the last letter.\n// An example is clue 9a, The Age - Cryptic 08/09/2023\n// For example 'BBQ' -> (1.1.1.)\nconst lengthPartsRegex = /^([^a-z()\\d]*?)(\\d+)[\\s.]*(.*)/;\n\n// Refer to design document: ../docs/clue-markup.md\n\n// Clue markdown regular expressions\nconst boldAsteriskRegex = /(.*?)(\\*\\*.+?\\*\\*)(.*)$/;\nconst boldItalicAsteriskRegex = /(.*?)(\\*\\*\\*.+?\\*\\*\\*)(.*)$/;\nconst italicAsteriskRegex = /(.*?)(\\*[^*]+?\\*)(.*)$/;\nconst boldUnderscoreRegex = /(.*?)(__.+?__)(.*)$/;\nconst boldItalicUnderscoreRegex = /(.*?)(___.+?___)(.*)$/;\nconst italicUnderscoreRegex = /(.*?)(_[^_]+?_)(.*)$/;\n\n// Order is significant - decreasing markdown sequence length\n// Do NOT change!\nconst markdownTransforms = [\n {\n tag: '***',\n regex: boldItalicAsteriskRegex,\n html: { open: '', close: '' },\n },\n {\n tag: '___',\n regex: boldItalicUnderscoreRegex,\n html: { open: '', close: '' },\n },\n {\n tag: '**',\n regex: boldAsteriskRegex,\n html: { open: '', close: '' },\n },\n {\n tag: '__',\n regex: boldUnderscoreRegex,\n html: { open: '', close: '' },\n },\n {\n tag: '*',\n regex: italicAsteriskRegex,\n html: { open: '', close: '' },\n },\n {\n tag: '_',\n regex: italicUnderscoreRegex,\n html: { open: '', close: '' },\n },\n];\n\n/**\n * Convert any markdown in _text_ to HTML.\n * @param {*} text source string with Markdown, or not!\n * @returns converted string\n */\nfunction parseMarkdown(text) {\n // Initialise return value\n let result = text;\n\n // Iterate through all transforms, modifying result for all matches\n markdownTransforms.forEach((mt) => {\n let prelude,\n match,\n // Initialise remainder with converted 'text' to date\n remainder = result;\n\n // Test for transform match\n if (mt.regex.test(remainder)) {\n // Extract matching groups in regex from 'remainder'\n let groups = mt.regex.exec(remainder);\n // Reset result\n result = '';\n while (groups?.length === 4) {\n [, prelude, match, remainder] = groups;\n // Replace opening tag\n match = match.replace(mt.tag, mt.html.open);\n // Replace closing tag\n match = match.replace(mt.tag, mt.html.close);\n // Append processed text to result\n result += prelude + match;\n groups = mt.regex.exec(remainder);\n }\n // Append any remainder after matches exhausted\n result += remainder;\n }\n });\n\n return result;\n}\n\n// Helper for newClueModel()\nfunction validateClueStructure(cdClue) {\n const required = { x: 1, y: 1, clue: '1. Clue (1)' };\n const optional = { answer: '', solution: '', revealed: '' };\n const requiredKeys = Object.keys(required);\n const optionalKeys = Object.keys(optional);\n const cdKeys = Object.keys(cdClue);\n\n // Test for presence of required keys\n for (const rk of requiredKeys) {\n if (!cdKeys.includes(rk)) throw new Error(`'cdClue.${rk}' is missing`);\n }\n\n // Test for type of required keys\n for (const rk of requiredKeys) {\n if (typeof required[rk] != typeof cdClue[rk]) {\n throw new Error(\n `'cdClue.${rk} (${cdClue[rk]})' must be a ${typeof required[rk]}`,\n );\n }\n }\n\n // Test for presence and type of optional keys\n for (const ok of optionalKeys) {\n if (cdKeys.includes(ok) && typeof optional[ok] != typeof cdClue[ok])\n throw new Error(\n `'cdClue.${ok} (${cdClue[ok]})' must be a ${typeof optional[ok]}`,\n );\n }\n\n // Test for additional properties in cdClue\n\n const difference = new Set(cdKeys);\n for (const rk of requiredKeys) {\n difference.delete(rk);\n }\n for (const ok of optionalKeys) {\n difference.delete(ok);\n }\n\n if (difference.size > 0) {\n throw new Error(\n `'cdClue' has unexpected properties <${[...difference].join(',')}>`,\n );\n }\n\n // Test if clue text matches expected pattern\n if (!clueRegex.test(cdClue.clue)) {\n throw new Error(\n `Clue '${cdClue.clue}' does not match the required pattern '${cluePattern}'`,\n );\n }\n}\n\n// Helper for newClueModel()\nfunction validateClueModelArguments(cdClue, isAcrossClue) {\n if (cdClue === undefined || isAcrossClue === undefined) {\n throw new Error(\"'cdClue' and 'isAcrossClue' are required\");\n }\n\n if (cdClue === null) {\n throw new Error(\"'cdClue' can't be null\");\n }\n\n if (isAcrossClue === null) {\n throw new Error(\"'isAcrossClue' can't be null\");\n }\n\n if (typeof isAcrossClue != 'boolean') {\n throw new Error(\"'isAcrossClue' must be a boolean (true,false)\");\n }\n}\n\n// Helper for newClueModel()\nfunction buildClueSegmentLabels(clueLabelText, cdClue) {\n // Ensure any clue id values use lower case for the trailing 'a' or 'd'.\n let remainingText = clueLabelText.toLowerCase();\n let clueSegmentLabels = [];\n while (labelPartsRegex.test(remainingText)) {\n // Discard separator between segmentLabel and residual - see labelPartsRegex comments.\n const [, , segmentLabel, residual] = labelPartsRegex.exec(remainingText);\n clueSegmentLabels.push(segmentLabel);\n remainingText = residual;\n }\n\n // remainingText should be an empty string ('')\n if (remainingText) {\n throw new Error(\n `'${cdClue.clue}' Error in near <${remainingText}>`,\n );\n }\n return clueSegmentLabels;\n}\n\n// Helper for newClueModel()\nfunction buildTailDescriptors(clueSegmentLabels) {\n // Nested helper\n function directionFromClueSegmentLabel(clueSegmentLabel) {\n if (clueSegmentLabel.endsWith('a')) {\n return 'across';\n } else if (clueSegmentLabel.endsWith('d')) {\n return 'down';\n } else {\n return null;\n }\n }\n\n // Copy clueSegmentLabels and remove head/first segment\n let tailSegmentLabels = clueSegmentLabels.slice(1);\n let tailDescriptors = [];\n\n // build tailDescriptors for multi-segment clue\n if (tailSegmentLabels.length > 0) {\n tailDescriptors = tailSegmentLabels.map((cs) => ({\n headNumber: parseInt(cs, 10),\n direction: directionFromClueSegmentLabel(cs),\n }));\n }\n return tailDescriptors;\n}\n\n// Helper for newClueModel()\nfunction buildWordLengths(lengthParts, cdClue) {\n let wordLengths = [];\n let remainingText = lengthParts;\n\n while (lengthPartsRegex.test(remainingText)) {\n const [, , length, residual] = lengthPartsRegex.exec(remainingText);\n wordLengths.push(parseInt(length, 10));\n remainingText = residual;\n }\n\n // remainingText should be an empty string\n if (remainingText) {\n throw new Error(\n `'${cdClue.clue}' Error in near <${remainingText}>`,\n );\n }\n return wordLengths;\n}\n\n// Helper for newClueModel()\nconst getClueId = (headSegmentLabel, isAcrossClue) => {\n // clueId is headNumber followed by direction suffix ('a' or 'd')...\n // Check last character of headSegmentLabel and append if required\n const directionSuffix = (isAcross) => {\n return isAcross ? 'a' : 'd';\n };\n const directionSuffixRegex = /[ad]$/;\n return directionSuffixRegex.test(headSegmentLabel)\n ? headSegmentLabel\n : headSegmentLabel + directionSuffix(isAcrossClue);\n};\n\n/**\n * Create a clue model from a clue read from a\n * _CrosswordDefinition_ [JSON](https://en.wikipedia.org/wiki/JSON) document.\n * @param cdClue - an object which defines the clue, with properties:\n * x: the zero-based grid column index of the starting letter of the clue\n * y: the zero-based grid row index of the starting letter of the clue\n * clue: the clue description string which has the format:\n * \".()\"\n * @param isAcrossClue - a boolean indicating the clue orientation\n * @returns - the clue model for the given definition\n */\nfunction newClueModel(cdClue, isAcrossClue) {\n // Test for null or undefined argument\n validateClueModelArguments(cdClue, isAcrossClue);\n // Test the properties and types of the cdClue argument\n validateClueStructure(cdClue);\n\n // Initialise array of crossword grid cell elements associated with\n // clue - populated as part of crossword DOM\n const cells = [];\n\n //// Extract simple properties\n\n const x = cdClue.x - 1; // Clue labels are 1 based, clue models are more useful 0 based.\n const y = cdClue.y - 1;\n const isAcross = isAcrossClue;\n // Initialise setter's solution for clue\n const solution = cdClue.solution\n ? // Strip out everything from solution except alphabetical characters\n // DO NOT substitute spaces\n cdClue.solution.toUpperCase().replaceAll(/[^A-Z]/g, '')\n : undefined;\n // Initialise revealed letters for clue\n const revealed = cdClue.revealed\n ? // string of upper-cased revealed characters\n cdClue.revealed.toUpperCase()\n : undefined;\n\n // Extract the clue components from the clue text in the crosswordDefinition\n const [, labelParts, clueGroup, lengthParts] = clueRegex.exec(cdClue.clue);\n\n //// Parse labelParts\n\n const clueSegmentLabels = buildClueSegmentLabels(labelParts, cdClue);\n const tailDescriptors = buildTailDescriptors(clueSegmentLabels);\n // headSegmentLabel is first of clueSegmentLabels\n const [headSegmentLabel] = clueSegmentLabels;\n const headNumber = parseInt(headSegmentLabel, 10);\n const labelText = headNumber.toString();\n const clueId = getClueId(headSegmentLabel, isAcross);\n\n //// Parse clueGroup\n\n const [, rawClueText] = clueTextRegex.exec(clueGroup);\n const clueText = parseMarkdown(rawClueText);\n\n //// Parse lengthParts\n\n const lengthText = `(${lengthParts})`;\n const wordLengths = buildWordLengths(lengthParts, cdClue);\n // Calculate the total length of the clue segment.\n // Sum the lengths of the clue words\n const segmentLength = wordLengths.reduce((current, wd) => current + wd, 0);\n\n //// Initialise punter's answer for clue\n\n const answer = cdClue.answer\n ? cdClue.answer\n // convert to uppercase\n .toUpperCase()\n // replace illegal characters with spaces\n .replaceAll(/[^ A-Z]/g, ' ')\n // pad out if required\n .padEnd(segmentLength)\n : // pad out null or undefined answer with spaces\n ''.padEnd(segmentLength);\n\n // Test if clue solution length matches segmentLength\n if (solution && solution.length !== segmentLength) {\n throw new Error(\n `Length of clue solution '${solution}' does not match the lengthText '${lengthText}'`,\n );\n }\n\n // Test if clue revealed length matches segmentLength\n if (revealed && revealed.length !== segmentLength) {\n throw new Error(\n `Length of clue revealed characters '${revealed}' does not match the lengthText: ${segmentLength}`,\n );\n }\n\n // Combine elements into object and exit\n return {\n answer,\n cells,\n clueId,\n clueText,\n headNumber,\n isAcross,\n labelText,\n lengthText,\n revealed,\n segmentLength,\n solution,\n tailDescriptors,\n wordLengths,\n x,\n y,\n toString: () => {\n return `${clueId}`;\n },\n };\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/clue-model.mjs?"); - -/***/ }), - -/***/ "./src/crossword-cluesview.mjs": -/*!*************************************!*\ - !*** ./src/crossword-cluesview.mjs ***! - \*************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ newCrosswordCluesView: () => (/* binding */ newCrosswordCluesView)\n/* harmony export */ });\n/* harmony import */ var _helpers_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers.mjs */ \"./src/helpers.mjs\");\n\n\n/**\n * **newCrosswordCluesView**: build a crossword clues DOM element\n * with separate blocks for across and down clues.\n * @param {*} document the root node of the [DOM](https://en.wikipedia.org/wiki/Document_Object_Model#DOM_tree_structure)\n * @param {*} controller the crossword controller object\n * @returns the clues DOM element\n */\nfunction newCrosswordCluesView(document, controller) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)('newCrosswordCluesView');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(document, '[document] is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, '[controller] is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller.model, '[controller.model] is null or undefined');\n // assert(controller.model.acrossClues,)\n function newClueBlockElement(id, title) {\n let cbElement = document.createElement('div');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(cbElement, 'crossword-clue-block');\n cbElement.id = id;\n let titleElement = document.createElement('p');\n titleElement.innerHTML = title;\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(titleElement, 'crossword-clue-block-title');\n cbElement.appendChild(titleElement);\n return cbElement;\n }\n\n function addClueElements(controller, clueBlockElement, cluesModel) {\n cluesModel.forEach((mc) => {\n let clueElement = document.createElement('div');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(clueElement, 'crossword-clue');\n clueElement.modelClue = mc;\n\n let labelElement = document.createElement('span');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(labelElement, 'crossword-clue-label');\n labelElement.innerHTML = `${mc.labelText}`;\n clueElement.appendChild(labelElement);\n\n let textElement = document.createElement('span');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(textElement, 'crossword-clue-text');\n textElement.innerHTML = `${mc.clueText} ${mc.lengthText}`;\n clueElement.appendChild(textElement);\n\n // add handler for click event\n clueElement.addEventListener('click', (element) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)(`clue(${mc.labelText}):click`);\n // eslint-disable-next-line no-param-reassign\n controller.lastMoveEvent = 'click';\n // eslint-disable-next-line no-param-reassign\n controller.currentClue = mc;\n });\n clueBlockElement.appendChild(clueElement);\n });\n }\n\n function isCurrentClueSegment(clue) {\n const currentClue = controller.currentClue;\n\n // The trivial case is that the clue is selected.\n if (clue === currentClue) {\n return true;\n } else {\n // We might also be a clue which is part of a multi-segment clue.\n const headSegment = currentClue.headSegment;\n\n return (\n headSegment === clue || headSegment.tailSegments.indexOf(clue) !== -1\n );\n }\n }\n\n // Build the DOM for the crossword clues.\n let view = {\n wrapper: document.createElement('div'),\n acrossClues: newClueBlockElement('crossword-across-clues', 'Across'),\n downClues: newClueBlockElement('crossword-down-clues', 'Down'),\n };\n\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(view.wrapper, 'crosswords-js');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(view.wrapper, 'crossword-clues');\n\n addClueElements(controller, view.acrossClues, controller.model.acrossClues);\n view.wrapper.appendChild(view.acrossClues);\n\n addClueElements(controller, view.downClues, controller.model.downClues);\n view.wrapper.appendChild(view.downClues);\n\n // Handle when current clue has changed in controller\n // eslint-disable-next-line no-param-reassign\n controller.addEventsListener(['clueSelected'], (data) => {\n for (const vac of view.acrossClues.children) {\n if (isCurrentClueSegment(vac.modelClue)) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(vac, 'current-clue-segment');\n } else {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.removeClass)(vac, 'current-clue-segment');\n }\n }\n\n for (const vdc of view.downClues.children) {\n if (isCurrentClueSegment(vdc.modelClue)) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(vdc, 'current-clue-segment');\n } else {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.removeClass)(vdc, 'current-clue-segment');\n }\n }\n });\n\n return view.wrapper;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/crossword-cluesview.mjs?"); - -/***/ }), - -/***/ "./src/crossword-controller-helpers.mjs": -/*!**********************************************!*\ - !*** ./src/crossword-controller-helpers.mjs ***! - \**********************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Outcome: () => (/* binding */ Outcome),\n/* harmony export */ checkSolved: () => (/* binding */ checkSolved),\n/* harmony export */ cleanClue: () => (/* binding */ cleanClue),\n/* harmony export */ cleanCrossword: () => (/* binding */ cleanCrossword),\n/* harmony export */ resetClue: () => (/* binding */ resetClue),\n/* harmony export */ resetCrossword: () => (/* binding */ resetCrossword),\n/* harmony export */ revealCell: () => (/* binding */ revealCell),\n/* harmony export */ revealClue: () => (/* binding */ revealClue),\n/* harmony export */ revealCrossword: () => (/* binding */ revealCrossword),\n/* harmony export */ setCellText: () => (/* binding */ setCellText),\n/* harmony export */ testClue: () => (/* binding */ testClue),\n/* harmony export */ testCrossword: () => (/* binding */ testCrossword)\n/* harmony export */ });\n/* harmony import */ var _helpers_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers.mjs */ \"./src/helpers.mjs\");\n/* harmony import */ var _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./crossword-gridview.mjs */ \"./src/crossword-gridview.mjs\");\n\n\n\nfunction revealCell(controller, cell) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(cell, ' is null or undefined');\n const clue = cell.acrossClue ? cell.acrossClue : cell.downClue;\n const letterIndex = cell.acrossClue\n ? cell.acrossClueLetterIndex\n : cell.downClueLetterIndex;\n const solutionLetter =\n letterIndex < clue.solution?.length ? clue.solution[letterIndex] : ' ';\n const clearRevealed = false;\n setCellText(controller, cell, solutionLetter, clearRevealed);\n // set visual flag in cell that letter has been revealed\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_1__.showElement)(controller.revealedElement(cell));\n // clear visual flag in cell if letter was incorrect\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_1__.hideElement)(controller.incorrectElement(cell));\n}\n\nfunction revealClue(controller, clue) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(clue, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)(`revealClue: '${clue}'`);\n clue.headSegment.flatCells.forEach((cell) => {\n revealCell(controller, cell);\n });\n}\n\nfunction revealCrossword(controller) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n controller.model.lightCells.forEach((cell) => {\n revealCell(controller, cell);\n });\n}\n\nconst Outcome = Object.freeze({\n correct: 0, // 0 elements empty, N elements correct\n incorrect: 1, // 1+ elements incorrect\n incomplete: 2, // 1+ elements empty, 0 elements incorrect\n});\n\nfunction getOutcome(incorrect, incomplete) {\n if (incorrect) {\n return Outcome.incorrect;\n } else if (incomplete) {\n return Outcome.incomplete;\n } else {\n return Outcome.correct;\n }\n}\n\nfunction testCell(controller, cell, showIncorrect = true) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(cell, ' is null or undefined');\n\n // Get index of cell-letter in clue\n // Cell can be in across and/or down clue\n const [clue, letterIndex] = cell.acrossClue\n ? [cell.acrossClue, cell.acrossClueLetterIndex]\n : [cell.downClue, cell.downClueLetterIndex];\n const answerLetter = clue.answer[letterIndex];\n const solutionLetter = clue.solution ? clue.solution[letterIndex] : undefined;\n const outcome = getOutcome(\n !(answerLetter === solutionLetter || answerLetter === ' '),\n answerLetter === ' ' || answerLetter === undefined,\n );\n\n if (outcome === Outcome.incorrect && showIncorrect) {\n // set visual flag in cell that answer letter is incorrect\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_1__.showElement)(controller.incorrectElement(cell));\n }\n return outcome;\n}\n\nfunction testClue(controller, clue, showIncorrect = true) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(clue, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)(`testClue: '${clue}'`);\n\n let incorrect = 0,\n incomplete = 0;\n\n clue.headSegment.flatCells.forEach((cell) => {\n const outcome = testCell(controller, cell, showIncorrect);\n if (outcome === Outcome.incorrect) {\n incorrect += 1;\n } else if (outcome === Outcome.incomplete) {\n incomplete += 1;\n }\n });\n\n return getOutcome(incorrect > 0, incomplete > 0);\n}\n\nfunction testCrossword(controller, showIncorrect = true) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n let incorrect = 0,\n incomplete = 0;\n\n controller.model.lightCells.forEach((cell) => {\n const outcome = testCell(controller, cell, showIncorrect);\n if (outcome === Outcome.incorrect) {\n incorrect += 1;\n } else if (outcome === Outcome.incomplete) {\n incomplete += 1;\n }\n });\n\n return getOutcome(incorrect > 0, incomplete > 0);\n}\n\nfunction checkSolved(controller) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n let incorrect = 0,\n incomplete = 0;\n const showIncorrect = false;\n // short-circuit a non-correct result - use find()\n controller.model.lightCells.find((cell) => {\n const outcome = testCell(controller, cell, showIncorrect);\n if (outcome === Outcome.incorrect) {\n incorrect += 1;\n return true;\n } else if (outcome === Outcome.incomplete) {\n incomplete += 1;\n return true;\n }\n });\n\n return getOutcome(incorrect > 0, incomplete > 0);\n}\n\nfunction setCellText(controller, cell, newText, clearRevealed = true) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(\n cell?.acrossClue || cell?.downClue,\n 'cell is null or not part of a clue',\n );\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(newText?.length === 1, 'newText must be a single character');\n\n function adjustClue(clue, letterIndex) {\n let result = clue;\n result.answer = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.setLetter)(result.answer, letterIndex, newText);\n if (clearRevealed) {\n result.revealed = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.setLetter)(result.revealed, letterIndex, newText);\n }\n }\n // Cell can be part of BOTH across and down clues\n\n // Outcome for across clue\n if (cell.acrossClue) {\n let clue = cell.acrossClue;\n // get index of cell-letter in clue\n const letterIndex = cell.acrossClueLetterIndex;\n // set stored values\n adjustClue(clue, letterIndex);\n }\n\n // Outcome for down clue\n if (cell.downClue) {\n let clue = cell.downClue;\n // get index of cell-letter in clue\n const letterIndex = cell.downClueLetterIndex;\n // set stored values\n adjustClue(clue, letterIndex);\n }\n // eslint-disable-next-line no-param-reassign\n controller.inputElement(cell).value = newText;\n}\n\nfunction resetCell(controller, cell, clearRevealed = false) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(cell, ' is null or undefined');\n\n // put a space in the cell\n setCellText(controller, cell, ' ');\n // remove visual flags in cell\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_1__.hideElement)(controller.incorrectElement(cell));\n if (clearRevealed) {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_1__.hideElement)(controller.revealedElement(cell));\n }\n}\n\nfunction resetClue(controller, clue) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(clue, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)(`resetClue: '${clue}'`);\n\n clue.headSegment.flatCells.forEach((cell) => {\n resetCell(controller, cell);\n });\n}\n\nfunction resetCrossword(controller) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n controller.model.lightCells.forEach((cell) => {\n const clearRevealed = true;\n resetCell(controller, cell, clearRevealed);\n });\n}\n\nfunction cleanCell(controller, cell) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(cell, ' is null or undefined');\n\n const wrongLetter = testCell(controller, cell) === Outcome.incorrect;\n const clearRevealed = wrongLetter;\n // is the current cell letter incorrect?\n if (wrongLetter) {\n setCellText(controller, cell, ' ', clearRevealed);\n // remove visual flags in cell\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_1__.hideElement)(controller.incorrectElement(cell));\n }\n}\n\nfunction cleanClue(controller, clue) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(clue, ' is null or undefined');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)(`cleanClue: '${clue}'`);\n clue.headSegment.flatCells.forEach((cell) => {\n cleanCell(controller, cell);\n });\n}\n\nfunction cleanCrossword(controller) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)('cleanCrossword');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(controller, ' is null or undefined');\n controller.model.lightCells.forEach((cell) => {\n cleanCell(controller, cell);\n });\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/crossword-controller-helpers.mjs?"); - -/***/ }), - -/***/ "./src/crossword-controller.mjs": -/*!**************************************!*\ - !*** ./src/crossword-controller.mjs ***! - \**************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CrosswordController: () => (/* binding */ CrosswordController),\n/* harmony export */ newCrosswordController: () => (/* binding */ newCrosswordController)\n/* harmony export */ });\n/* harmony import */ var _cell_map_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cell-map.mjs */ \"./src/cell-map.mjs\");\n/* harmony import */ var _crossword_cluesview_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./crossword-cluesview.mjs */ \"./src/crossword-cluesview.mjs\");\n/* harmony import */ var _crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./crossword-controller-helpers.mjs */ \"./src/crossword-controller-helpers.mjs\");\n/* harmony import */ var _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./crossword-gridview.mjs */ \"./src/crossword-gridview.mjs\");\n/* harmony import */ var _crossword_model_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./crossword-model.mjs */ \"./src/crossword-model.mjs\");\n/* harmony import */ var _default_eventbindings_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./default-eventbindings.mjs */ \"./src/default-eventbindings.mjs\");\n/* harmony import */ var _helpers_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers.mjs */ \"./src/helpers.mjs\");\n\n\n\n\n\n\n\n\n/**\n * Build a new CrosswordController object\n * @param {*} crosswordDefinition A crossword puzzle document imported or parsed to create an Object.\n * @param {*} domGridParentElement The webpage location (DOM element) for the GridView.\n * @param {*} domCluesParentElement The webpage location (DOM element) for the CluesView.\n * @returns A CrosswordController on successful creation, or null on failure.\n */\n\nfunction newCrosswordController(\n crosswordDefinition,\n domGridParentElement,\n domCluesParentElement,\n) {\n const controller = new CrosswordController(\n crosswordDefinition,\n domGridParentElement,\n domCluesParentElement,\n );\n return controller?.isValid ? controller : null;\n}\n\n// Regular expressions for keypress processing.\n// All pressed keys are lower-cased before testing\n// - see'keypress' event listener\nconst echoingKeyPressCharacters = /^[a-z]$/;\nconst advancingKeyPressCharacters = /^[a-z]$/;\n\n// Allow DOM event flushing after clue or crossword solution.\nconst publicationDelayMs = 5;\n\n/** **CrosswordController** - an [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller)\n * _Controller_ class for the _CrosswordsJS_ package.\n * Use this class to access the package API.\n */\nclass CrosswordController {\n #boundUserEventElements = [];\n #cellMap = new _cell_map_mjs__WEBPACK_IMPORTED_MODULE_0__.CellMap();\n #cluesView;\n #crosswordModel;\n #current = { clue: null, cell: null };\n #domCluesParentElement;\n #domGridParentElement;\n #gridView;\n #keyboardEventBindings = {};\n #lastMoveEvent;\n #pubSub = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.newPubSub)();\n #eventSubscribers = [];\n #userEventHandlers;\n #isValidController = false;\n\n // Events published by the CrosswordController\n #controllerEventNames = [\n 'cellRevealed',\n 'clueCleaned',\n 'clueIncomplete',\n 'clueReset',\n 'clueRevealed',\n 'clueSelected',\n 'clueSolved',\n 'clueTested',\n 'crosswordCleaned',\n 'crosswordIncomplete',\n 'crosswordLoaded',\n 'crosswordReset',\n 'crosswordRevealed',\n 'crosswordSolved',\n 'crosswordTested',\n ];\n\n //////////////////////////\n //// Lifecycle methods\n //////////////////////////\n\n constructor(\n crosswordDefinition,\n domGridParentElement,\n domCluesParentElement,\n ) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('CrosswordController constructor');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n crosswordDefinition?.width,\n '[crosswordDefinition] argument is null/undefined or not a crossword definition',\n );\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n domGridParentElement?.ownerDocument,\n '[domGridParentElement] argument is null/undefined or not a DOM element',\n );\n // Optional argument but must be valid if provided\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n !domCluesParentElement || domCluesParentElement.ownerDocument,\n '[domCluesParentElement] argument is not a DOM element',\n );\n\n this.#domGridParentElement = domGridParentElement;\n this.#domCluesParentElement = domCluesParentElement;\n // Set keyboard event keyBindings. Must precede gridView construction\n this.setKeyboardEventBindings([_default_eventbindings_mjs__WEBPACK_IMPORTED_MODULE_5__.defaultKeyDownBinding, _default_eventbindings_mjs__WEBPACK_IMPORTED_MODULE_5__.defaultKeyUpBinding]);\n // Create model and views\n this.#isValidController = this.#bindDefinition(crosswordDefinition);\n if (this.isValid) {\n // Mapping of DOM idents (ids or classes) to event handler methods\n this.#mapDomIdentsToUserEventHandlers();\n }\n }\n\n // Completely cleans up the crossword.\n destroy() {\n // Clear the cellMap, DOM and state change handler.\n this.#cellMap = null;\n this.#crosswordModel = null;\n this.#gridParent?.removeChild(this.gridView);\n this.#cluesParent?.removeChild(this.cluesView);\n // Remove all subscribers\n this.#eventSubscribers.forEach((s) => {\n s.remove();\n });\n // Remove all user event handlers from DOM elements\n this.#boundUserEventElements.forEach((bl) => {\n const { element, eventName, handler } = bl;\n element.removeEventListener(eventName, handler);\n });\n }\n\n //////////////////////////\n //// Grid element helpers\n //////////////////////////\n\n // Helper function to retrieve corresponding cell for cellElement\n cell = (cellElement) => {\n return this.#cellMap.modelCell(cellElement);\n };\n\n // Helper function to retrieve corresponding cellElement for cell\n cellElement = (cell) => {\n return this.#cellMap.cellElement(cell);\n };\n\n // Helper function to retrieve corresponding inputElement for cell\n inputElement = (cell) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(cell.light, `dark cell! ${cell}`);\n // The input element of a cellElement is the first child element.\n // Refer to #newCellElement()\n return this.#cellMap.cellElement(cell).children[0];\n };\n\n // Helper function to retrieve corresponding revealedElement for cell\n revealedElement = (cell) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(cell.light, `dark cell! ${cell}`);\n // The revealed element of a cellElement is the second or third child element.\n // Refer to #newCellElement()\n const childIndex = cell.labelText ? 2 : 1;\n return this.#cellMap.cellElement(cell).children[childIndex];\n };\n\n // Helper function to retrieve corresponding incorrectElement for cell\n incorrectElement = (cell) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(cell.light, `dark cell! ${cell}`);\n // The incorrect element of a cellElement is the third or fourth child element.\n // Refer to #newCellElement()\n const childIndex = cell.labelText ? 3 : 2;\n return this.#cellMap.cellElement(cell).children[childIndex];\n };\n\n //////////////////////////////////\n //// User EventHandler binding\n //////////////////////////////////\n\n // Helper function to access API event handler functions\n userEventHandler(id) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`elementEventHandler:${id}`);\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n this.#userEventHandlers.hasOwnProperty(id),\n `[${id}] is not a CrosswordController event handler.`,\n );\n // We dereference userEventHandlers object like an array to get property 'id'.\n // Note: 'this' inside an event handler is event.currentTarget.\n // So, we must bind the controller object to 'this' to override\n return this.#userEventHandlers[id].bind(this);\n }\n\n // Helper function to bind Controller user-event-handler to webpage\n // DOM elementId.\n bindUserEventHandlerToId(elementId, eventName = 'click', dom = document) {\n const element = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.eid)(elementId, dom);\n if (element) {\n const handler = this.userEventHandler(elementId);\n element.addEventListener(eventName, handler);\n this.#boundUserEventElements.push({ element, eventName, handler });\n }\n }\n\n // Helper function to bind Controller user-event-handlers to a collection\n // of webpage DOM elementIds.\n bindUserEventHandlersToIds(\n // all controller user event handlers\n elementIds = this.userEventHandlerIds,\n eventName = 'click',\n dom = document,\n ) {\n elementIds.forEach((id) => {\n this.bindUserEventHandlerToId(id, eventName, dom);\n });\n }\n\n // Helper function to bind Controller user-event-handler to webpage\n // DOM element class. Using element class names rather than element Ids\n // allows us to add controller user-event-handler to more than one\n // DOM element\n bindUserEventHandlerToClass(\n elementClass,\n eventName = 'click',\n dom = document,\n ) {\n const elements = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.ecs)(elementClass, dom);\n elements.forEach((element) => {\n const handler = this.userEventHandler(elementClass);\n element.addEventListener(eventName, handler);\n this.#boundUserEventElements.push({ element, eventName, handler });\n });\n }\n\n // Helper function to bind Controller user-event-handlers to a collection\n // of webpage DOM elementIds.\n bindUserEventHandlersToClass(\n // all user event handlers\n elementClasses = this.userEventHandlerIds,\n eventName = 'click',\n dom = document,\n ) {\n elementClasses.forEach((ec) =>\n this.bindUserEventHandlerToClass(ec, eventName, dom),\n );\n }\n\n ////////////////////////////////\n //// Public property accessors\n ////////////////////////////////\n\n get isValid() {\n return this.#isValidController;\n }\n\n // Accessors for public property currentCell\n get currentCell() {\n return this.#current.cell;\n }\n set currentCell(newCell) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`currentCell: ${newCell}`);\n const oldCell = this.currentCell;\n if (newCell !== oldCell) {\n this.#current.cell = newCell;\n this.inputElement(newCell).focus();\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__.styleCurrentCell)(this, newCell, oldCell);\n }\n }\n\n // Accessors for public property currentClue\n get currentClue() {\n return this.#current.clue;\n }\n set currentClue(newClue) {\n const oldClue = this.currentClue;\n if (newClue !== oldClue) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`currentClue: '${newClue}' [currentCell ${this.currentCell}]`);\n this.#current.clue = newClue;\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__.styleCurrentClue)(this, newClue, oldClue);\n // check if new current clue includes current cell\n if (!this.currentClue.cells.includes(this.currentCell)) {\n // switch to first cell of new current clue\n this.currentCell = newClue.cells[0];\n }\n this.#stateChange('clueSelected', newClue);\n }\n }\n\n // Accessor for public property model\n get model() {\n return this.#crosswordModel;\n }\n\n // Accessor for public property gridView\n get gridView() {\n return this.#gridView;\n }\n\n // Accessor for public property cluesView\n get cluesView() {\n return this.#cluesView;\n }\n\n // Accessor for addEventsListener - public event publisher\n get addEventsListener() {\n return this.#addEventsListener;\n }\n\n // Accessor for public property controllerEventNames\n get controllerEventNames() {\n // Return array copy\n return [...this.#controllerEventNames];\n }\n\n // Accessors for public property lastMoveEvent\n get lastMoveEvent() {\n return this.#lastMoveEvent;\n }\n set lastMoveEvent(eventName) {\n const en = eventName.toLowerCase();\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(['click', 'focus'].includes(en), `unknown event: ${eventName}`);\n this.#lastMoveEvent = en;\n }\n // Accessor for public property userEventHandlerIds\n get userEventHandlerIds() {\n return Object.keys(this.#userEventHandlers);\n }\n\n //////////////////////////\n //// Public methods\n //////////////////////////\n\n /**\n * Programmatically set the content of a crossword grid cell\n * @param {*} cellElementId The id of the associated cell DOM element\n * @param {*} character The new text content for the cell.\n */\n setGridCell(cellElementId, character) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`setCell:${cellElementId} '${character}}'`);\n const clearRevealed = true;\n (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.setCellText)(\n this,\n this.#cellMap.modelCell(cellElementId),\n character,\n clearRevealed,\n );\n }\n\n loadCrosswordSource(mimeType, crosswordSourceText, sourceFileName = '') {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(mimeType, '[mimeType] is undefined or null');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(crosswordSourceText, '[crosswordSourceText] is undefined or null');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`loadCrosswordSource: ${mimeType} ${sourceFileName}`);\n // Build a crossword definition\n const definition = (0,_crossword_model_mjs__WEBPACK_IMPORTED_MODULE_4__.newCrosswordDefinition)(mimeType, crosswordSourceText);\n if (!definition) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(\n `loadCrosswordSource: invalid crossword definition \"${sourceFileName}\"`,\n 'error',\n );\n return false;\n }\n\n return this.#bindDefinition(definition);\n }\n\n setKeyboardEventBindings(eventBindings) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n eventBindings?.length,\n '[eventBindings] argument is empty, null or undefined.',\n );\n const supportedEvents = ['keydown', 'keyup'];\n eventBindings.forEach((eb) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n eb.eventName?.trim(),\n `Missing or empty \"eventName\" property for event binding.`,\n );\n const ebn = eb.eventName.trim().toLowerCase();\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n supportedEvents.includes(ebn),\n `Binding event name \"${eb.eventName}\" is not supported.`,\n );\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n eb.keyBindings?.length,\n `Missing or empty \"keyBindings\" array property for [${ebn}].`,\n );\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`setKeyboardEventBindings: Setting keyBindings for \"${ebn}\".`);\n this.#keyboardEventBindings[ebn] = eb.keyBindings;\n });\n }\n\n /////////////////////////////////\n //// Public user event handlers\n /////////////////////////////////\n\n testCurrentClue() {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`testCurrentClue:${this.currentClue}`);\n const showIncorrect = true;\n const outcome = (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.testClue)(this, this.currentClue, showIncorrect);\n this.#stateChange('clueTested', outcome);\n if (outcome === _crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.Outcome.correct) {\n this.#delayPublish('clueSolved', this.currentClue);\n } else if (outcome === _crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.Outcome.incomplete) {\n this.#delayPublish('clueIncomplete', this.currentClue);\n }\n return outcome;\n }\n\n testCrossword() {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('testCrossword');\n const showIncorrect = true;\n // call the crossword-controller-helper testCrossword\n const outcome = (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.testCrossword)(this, showIncorrect);\n this.#stateChange('crosswordTested', outcome);\n if (outcome === _crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.Outcome.correct) {\n this.#delayPublish('crosswordSolved', this.#crosswordModel);\n } else if (outcome === _crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.Outcome.incomplete) {\n this.#delayPublish('crosswordIncomplete', this.#crosswordModel);\n }\n return outcome;\n }\n\n revealCurrentCell() {\n (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.revealCell)(this, this.currentCell);\n this.#stateChange('cellRevealed', this.currentCell);\n this.#checkSolved();\n }\n\n revealCurrentClue() {\n (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.revealClue)(this, this.currentClue);\n this.#stateChange('clueRevealed', this.currentClue);\n this.#checkSolved();\n }\n\n revealCrossword() {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('revealCrossword');\n (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.revealCrossword)(this);\n this.#stateChange('crosswordRevealed', this.model);\n //No crosswordSolved event is published in this case\n }\n\n resetCurrentClue() {\n (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.resetClue)(this, this.currentClue);\n this.#stateChange('clueReset', this.currentClue);\n }\n\n resetCrossword() {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('resetCrossword');\n (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.resetCrossword)(this);\n this.#stateChange('crosswordReset', this.model);\n }\n\n cleanCurrentClue() {\n (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.cleanClue)(this, this.currentClue);\n this.#stateChange('clueCleaned', this.currentClue);\n }\n\n cleanCrossword() {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('cleanCrossword');\n (0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.cleanCrossword)(this);\n this.#stateChange('crosswordCleaned', this.model);\n }\n\n //////////////////////////\n //// Private methods\n //////////////////////////\n\n // Accessor for document associated with DOM\n get #document() {\n return this.#gridParent.ownerDocument;\n }\n\n // Accessors for DOM parent/placeholder elements\n\n get #gridParent() {\n return this.#domGridParentElement;\n }\n\n get #cluesParent() {\n return this.#domCluesParentElement;\n }\n // Common logic for CrosswordController constructor and loadCrosswordSource()\n #bindDefinition(crosswordDefinition) {\n // Build a crossword model\n const model = (0,_crossword_model_mjs__WEBPACK_IMPORTED_MODULE_4__.newCrosswordModel)(crosswordDefinition);\n if (!model) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('#bindDefinition: crosswordModel creation failed', 'error');\n return false;\n }\n\n // Do we have an existing model?\n if (this.model) {\n // Detach DOM elements dependent on old crosswordModel\n this.#gridParent.removeChild(this.gridView);\n this.#cluesParent?.removeChild(this.cluesView);\n // Clear all mappings for old model\n this.#cellMap = new _cell_map_mjs__WEBPACK_IMPORTED_MODULE_0__.CellMap();\n }\n //// Rebuild and rebind for new model\n\n this.#crosswordModel = model;\n\n // (Re)build gridView and fill cellMap\n this.#gridView = (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__.newCrosswordGridView)(\n this.#document,\n this.model,\n this.#cellMap,\n );\n\n // For light cells, wire up controller event listeners\n this.#cellMap.modelCells\n .filter((cell) => cell.light)\n .forEach((lc) => {\n this.#addCellEventListeners(lc.cellElement);\n this.#addInputEventListeners(this.inputElement(lc));\n });\n\n // Add the crossword grid to the webpage DOM\n this.#gridParent.appendChild(this.gridView);\n\n // Build the DOM for the crossword clues.\n if (this.#cluesParent) {\n this.#cluesView = (0,_crossword_cluesview_mjs__WEBPACK_IMPORTED_MODULE_1__.newCrosswordCluesView)(this.#document, this);\n // Add the crossword clues to the webpage DOM\n this.#cluesParent.appendChild(this.cluesView);\n }\n\n // Select the first \"across\" head clue segment when the grid is complete and visible.\n this.currentClue = this.model.acrossClues.headSegments[0];\n\n // We're done! Publish event and go.\n this.#stateChange('crosswordLoaded', crosswordDefinition);\n return true;\n }\n\n // Helper function for constructor\n #mapDomIdentsToUserEventHandlers = () => {\n // Mapping of DOM element idents (ids or classes) to event handler methods\n this.#userEventHandlers = {\n // Reveal solution for current letter in answer. All revealed cells have\n // distinct styling which remains for the duration of the puzzle.\n // Public shaming is strictly enforced!\n 'reveal-cell': this.revealCurrentCell,\n // Remove incorrect letters in the answer after testing.\n 'clean-clue': this.cleanCurrentClue,\n // Clear out the answer for the current clue\n 'reset-clue': this.resetCurrentClue,\n // Reveal solution for current clue\n 'reveal-clue': this.revealCurrentClue,\n // Test the current clue answer against the solution. Incorrect letters\n // have distinct styling which is removed when 'cleared' or a new letter\n // entered in the cell.\n 'test-clue': this.testCurrentClue,\n // Clear out all incorrect letters in the entire crossword\n 'clean-crossword': this.cleanCrossword,\n // Clear out the entire crossword\n 'reset-crossword': this.resetCrossword,\n // Reveal solutions for the entire crossword.\n 'reveal-crossword': this.revealCrossword,\n // Test the answers for the entire crossword against the solutions\n 'test-crossword': this.testCrossword,\n };\n };\n\n // Helper function to subscribe to CrosswordController events.\n // Refer to #controllerEventNames for complete list of events.\n #addEventsListener = (eventNames, callback) => {\n eventNames.forEach((en) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n this.controllerEventNames.includes(en),\n `event [${en}] is not a CrosswordController event.`,\n );\n this.#eventSubscribers.push(this.#pubSub.subscribe(en, callback));\n });\n };\n\n // Helper for multi-segment current clue\n #isSiblingClue = (clue) => {\n return (\n clue &&\n (clue === this.currentClue.previousClueSegment ||\n clue === this.currentClue.nextClueSegment)\n );\n };\n\n #hasClueChanged = (focusCell) => {\n // Helper\n const resolution = (focusCell, newCurrentClue) => {\n if (newCurrentClue !== this.currentClue) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(\n `Clue has changed [was ${this.currentClue}, ` +\n `focused ${focusCell}] => ${newCurrentClue}`,\n );\n this.currentClue = newCurrentClue;\n }\n };\n\n // assigned values below are clueModel references or undefined\n const [previous, cellAcross, cellDown, ai, di] = [\n this.currentClue,\n focusCell.acrossClue,\n focusCell.downClue,\n focusCell.acrossClueLetterIndex,\n focusCell.downClueLetterIndex,\n ];\n // We are in the current clue\n if ([cellAcross, cellDown].includes(this.currentClue)) {\n resolution(focusCell, this.currentClue);\n } else if (cellAcross ? !cellDown : cellDown) {\n // We have an across clue or a down clue, but not both (i.e. xor).\n resolution(focusCell, cellAcross ?? cellDown);\n } else if (this.#isSiblingClue(cellAcross)) {\n // We've got cellAcross. If we are moving between clue segments,\n // choose the next/previous segment\n resolution(focusCell, cellAcross);\n } else if (this.#isSiblingClue(cellDown)) {\n // We've got cellDown. If we are moving between clue segments,\n // choose the next/previous segment\n resolution(focusCell, cellDown);\n } else {\n // Prefer cellAcross, unless we're on the start of a down clue\n // and not the start of an across clue\n resolution(focusCell, di === 0 && ai !== 0 ? cellDown : cellAcross);\n }\n return this.currentClue !== previous;\n };\n\n /**\n * **#stateChange**: Publish an event to the listeners subscribed to _onStateChange_.\n * @param {*} eventName The name of the event to be published\n * @param {*} data not used\n */\n #stateChange(eventName, data) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`stateChange: ${eventName}`);\n this.#pubSub.publish(eventName, data);\n }\n\n // Flush DOM event queue before publishing event\n // Used to publish user notification events so pending events complete first.\n #delayPublish(eventName, eventData) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(\n this.controllerEventNames.includes(eventName),\n `unknown event \"${eventName}\"`,\n );\n setTimeout(() => {\n this.#stateChange(eventName, eventData);\n }, publicationDelayMs);\n }\n\n // Helper to publish crosswordSolved event if the crossword is solved\n #checkSolved() {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('checkSolved');\n if ((0,_crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.checkSolved)(this) === _crossword_controller_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.Outcome.correct) {\n this.#delayPublish('crosswordSolved', this.model);\n }\n }\n\n // Assign event handlers to cell's input element\n #addInputEventListeners(inputElement) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(inputElement, 'inputElement is null or undefined');\n const controller = this;\n\n // 1. A user clicking on or touching an unfocussed inputElement generates\n // two events (focus, click)\n // 2. A user clicking on a focussed inputElement only produces a click event\n // 3. Keyboard-based movements set currentCell programmatically,\n // and the setter method calls element.focus() only, AFTER setting\n // the currentCell value.\n\n // Listen for focus events.\n inputElement.addEventListener('focus', (event) => {\n // Get the cell data.\n const eventCell = controller.cell(event.target.parentNode);\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`event:focus ${eventCell}`);\n // Have this event fired as a result of a touch or mouse click?\n if (controller.currentCell !== eventCell) {\n controller.currentCell = eventCell;\n }\n controller.lastMoveEvent = 'focus';\n controller.#hasClueChanged(eventCell);\n });\n\n // Listen for click events.\n inputElement.addEventListener('click', (event) => {\n const eventCell = controller.cell(event.target.parentNode);\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`event:click ${eventCell}`);\n // Test for second click on same cell\n if (eventCell === controller.currentCell) {\n // We don't want this to toggle clue direction if\n // immediately preceding event was a focus:\n if (controller.lastMoveEvent === 'click') {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__.toggleClueDirection)(controller, eventCell);\n }\n } else {\n controller.currentCell = eventCell;\n }\n controller.lastMoveEvent = 'click';\n });\n }\n\n // Assign event handlers to cell's input element\n #addCellEventListeners(cellElement) {\n const controller = this;\n\n // Iterate over bindable keyboard events\n Object.keys(controller.#keyboardEventBindings).forEach((eventName) => {\n const keyBindings = controller.#keyboardEventBindings[eventName];\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.assert)(keyBindings, `\"${eventName}\" bindings are null or undefined.`);\n cellElement.addEventListener(eventName, (event) => {\n const eventKey = event.key;\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`event:${eventName} key=[${eventKey}]`);\n const keyBinding = keyBindings.find((kb) => kb.key === eventKey);\n\n if (keyBinding) {\n // We don't want default behaviour.\n event.preventDefault();\n const ekName = _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__.EventKey.name(eventKey).toUpperCase();\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(event.shiftKey ? `SHIFT+${ekName}` : ekName);\n const eventCell = controller.cell(event.target.parentNode);\n keyBinding.action(controller, event, eventCell);\n }\n });\n });\n\n // Listen for keypress events.\n cellElement.addEventListener('keypress', (event) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('event:keypress');\n // We've just pressed a key that generates a character.\n // Stop default handling for input component\n event.preventDefault();\n // Get cell data.\n const [eventCell, character] = [\n controller.cell(event.target.parentNode),\n event.key,\n ];\n const [testCharacter, displayCharacter] = [\n character.toLowerCase(),\n character.toUpperCase(),\n ];\n\n if (echoingKeyPressCharacters.test(testCharacter)) {\n // Sets the letter in the current clue cell.\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)(`Setting cell content: [${displayCharacter}]`);\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__.setCellContent)(controller, event, displayCharacter);\n // remove any visual flag in cell that letter is incorrect\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__.hideElement)(controller.incorrectElement(eventCell));\n // test for crossword completion\n controller.#checkSolved();\n }\n\n if (advancingKeyPressCharacters.test(testCharacter)) {\n // Move to the next cell in the clue.\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_6__.trace)('Advancing to next cell');\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_3__.moveToCellAhead)(controller, eventCell);\n }\n });\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/crossword-controller.mjs?"); - -/***/ }), - -/***/ "./src/crossword-gridview.mjs": -/*!************************************!*\ - !*** ./src/crossword-gridview.mjs ***! - \************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ EventKey: () => (/* binding */ EventKey),\n/* harmony export */ deleteCellContent: () => (/* binding */ deleteCellContent),\n/* harmony export */ hideElement: () => (/* binding */ hideElement),\n/* harmony export */ moveToCellAhead: () => (/* binding */ moveToCellAhead),\n/* harmony export */ moveToCellBehind: () => (/* binding */ moveToCellBehind),\n/* harmony export */ moveToCellDown: () => (/* binding */ moveToCellDown),\n/* harmony export */ moveToCellLeft: () => (/* binding */ moveToCellLeft),\n/* harmony export */ moveToCellRight: () => (/* binding */ moveToCellRight),\n/* harmony export */ moveToCellUp: () => (/* binding */ moveToCellUp),\n/* harmony export */ moveToClueAhead: () => (/* binding */ moveToClueAhead),\n/* harmony export */ moveToClueBehind: () => (/* binding */ moveToClueBehind),\n/* harmony export */ newCrosswordGridView: () => (/* binding */ newCrosswordGridView),\n/* harmony export */ setCellContent: () => (/* binding */ setCellContent),\n/* harmony export */ showElement: () => (/* binding */ showElement),\n/* harmony export */ styleCurrentCell: () => (/* binding */ styleCurrentCell),\n/* harmony export */ styleCurrentClue: () => (/* binding */ styleCurrentClue),\n/* harmony export */ toggleClueDirection: () => (/* binding */ toggleClueDirection)\n/* harmony export */ });\n/* harmony import */ var _helpers_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers.mjs */ \"./src/helpers.mjs\");\n\n\n/**\n * Build a crossword grid DOM element\n * with separate blocks for across and down clues.\n * @param {*} document the root node of the [DOM](https://en.wikipedia.org/wiki/Document_Object_Model#DOM_tree_structure)\n * @param {*} model the crossword model object\n * @returns the grid DOM element\n */\n\nfunction newCrosswordGridView(document, model, cellMap) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)('newCrosswordGridView');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(\n document,\n 'DOM root element [document] argument is null or undefined.',\n );\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(model, 'CrosswordModel [model] argument is null or undefined.');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(\n cellMap,\n 'CrosswordController [cellMap] argument is null or undefined.',\n );\n\n let gridView = document.createElement('div');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(gridView, 'crosswords-js');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(gridView, 'crossword-grid');\n\n // Set the grid size variables, refer to style/crosswords.less\n // This lets us adjust the CSS grid size to match 'model' dimensions.\n gridView.style.setProperty('--row-count', model.height);\n gridView.style.setProperty('--column-count', model.width);\n\n // Create each cell.\n for (let y = 0; y < model.height; y += 1) {\n for (let x = 0; x < model.width; x += 1) {\n const modelCell = model.cells[x][y];\n\n // Build the cell element.\n const cellElement = newCellElement(document, modelCell);\n // Update the map of cells to enable element lookups\n cellMap.add(modelCell, cellElement);\n // Place cell in grid element\n gridView.appendChild(cellElement);\n }\n }\n\n return gridView;\n}\n\n/**\n * Build a crossword grid _cell_ DOM element with child elements.\n * @param {Document} document the root node of the [DOM](https://en.wikipedia.org/wiki/Document_Object_Model#DOM_tree_structure)\n * @param {HTMLDivElement} modelCell the representation of this grid cell in the _crosswordModel_.\n * @returns {HTMLDivElement} the DOM element for the _cell_\n */\nfunction newCellElement(document, modelCell) {\n let cellElement = document.createElement('div');\n // Identify cellElement with id of associated modelCell.\n // This simplifies implementation of CellMap\n cellElement.dataset.xy = modelCell;\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(cellElement, 'cwcell');\n // eslint-disable-next-line no-param-reassign\n modelCell.cellElement = cellElement;\n // Add a class.\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(cellElement, modelCell.light ? 'light' : 'dark');\n\n // If the cell is dark, we are done.\n if (!modelCell.light) {\n return cellElement;\n }\n\n // Light cells also need an input.\n const inputElement = document.createElement('input');\n // 'id' is not used, but assignment silences chromium-dev-tools issue.\n inputElement.dataset.xy = `input-${modelCell}`;\n inputElement.maxLength = 1;\n inputElement.size = 1;\n if (modelCell.answer) {\n inputElement.value = modelCell.answer;\n }\n cellElement.appendChild(inputElement);\n\n // We may need to add a clue label.\n if (modelCell.labelText) {\n const labelText = document.createElement('div');\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(labelText, 'cwclue-label');\n labelText.innerHTML = modelCell.labelText;\n cellElement.appendChild(labelText);\n }\n\n const revealedIndicator = document.createElement('div');\n // Remove 'hidden' div class to reveal\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClasses)(revealedIndicator, ['cwcell-revealed', 'hidden']);\n cellElement.appendChild(revealedIndicator);\n\n const incorrectIndicator = document.createElement('div');\n // Toggle 'hidden' div class to reveal/hide\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClasses)(incorrectIndicator, ['cwcell-incorrect', 'hidden']);\n cellElement.appendChild(incorrectIndicator);\n\n // Check for clue answer segment terminators (across and/or down)\n if (modelCell.acrossTerminator) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(inputElement, 'cw-across-word-separator');\n }\n if (modelCell.downTerminator) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(inputElement, 'cw-down-word-separator');\n }\n\n return cellElement;\n}\n\nfunction toggleClueDirection(crosswordController, eventCell) {\n // If we are in a eventCell with an across clue AND down clue, swap the\n // current clue.\n const [ec, cc, swappable] = [\n eventCell,\n crosswordController,\n eventCell.acrossClue && eventCell.downClue,\n ];\n\n if (swappable) {\n // swap clue direction\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.trace)('toggleClueDirection');\n // eslint-disable-next-line no-param-reassign\n cc.currentClue =\n ec.acrossClue === cc.currentClue ? ec.downClue : ec.acrossClue;\n }\n\n return swappable;\n}\n\nfunction moveToSegmentAhead(crosswordController, eventCell) {\n const [ec, , clue] = [\n eventCell,\n crosswordController,\n crosswordController.currentClue,\n ];\n const currentIndex =\n ec.acrossClue === clue ? ec.acrossClueLetterIndex : ec.downClueLetterIndex;\n const nextIndex = currentIndex + 1;\n // If we are at the end of the clue and we have a next segment, select it.\n const jumpable = nextIndex === clue.cells.length && clue.nextClueSegment;\n\n if (jumpable) {\n // eslint-disable-next-line no-param-reassign\n cc.currentClue = clue.nextClueSegment;\n }\n\n return jumpable;\n}\n\nfunction moveToSegmentBehind(crosswordController, eventCell) {\n const [ec, cc] = [eventCell, crosswordController];\n const clue = cc.currentClue;\n const currentIndex =\n ec.acrossClue === clue ? ec.acrossClueLetterIndex : ec.downClueLetterIndex;\n const previousIndex = currentIndex - 1;\n // If we are at the start of the clue and we have a previous segment, select it.\n const jumpable = previousIndex === -1 && clue.previousClueSegment;\n\n if (jumpable) {\n // eslint-disable-next-line no-param-reassign\n cc.currentCell = clue.previousClueSegment.cells.slice(-1)[0];\n // eslint-disable-next-line no-param-reassign\n cc.currentClue = clue.previousClueSegment;\n }\n\n return jumpable;\n}\n\nfunction moveToCellDown(crosswordController, eventCell) {\n const { x, y } = eventCell;\n const { height } = eventCell.model;\n let moved = false;\n\n if (\n eventCell.y + 1 < height &&\n eventCell.model.cells[x][y + 1].light === true\n ) {\n // eslint-disable-next-line no-param-reassign\n crosswordController.currentCell = eventCell.model.cells[x][y + 1];\n moved = true;\n } else {\n // Can we go to next segment in clue?\n moved = moveToSegmentAhead(crosswordController, eventCell);\n }\n\n return moved;\n}\n\nfunction moveToCellRight(crosswordController, eventCell) {\n const { x, y } = eventCell;\n const { width } = eventCell.model;\n let moved = false;\n\n if (\n eventCell.x + 1 < width &&\n eventCell.model.cells[x + 1][y].light === true\n ) {\n // eslint-disable-next-line no-param-reassign\n crosswordController.currentCell = eventCell.model.cells[x + 1][y];\n moved = true;\n } else {\n // Can we go to next segment in clue?\n moved = moveToSegmentAhead(crosswordController, eventCell);\n }\n\n return moved;\n}\n\nfunction moveToCellUp(crosswordController, eventCell) {\n const { x, y } = eventCell;\n let moved = false;\n\n if (eventCell.y > 0 && eventCell.model.cells[x][y - 1].light === true) {\n // eslint-disable-next-line no-param-reassign\n crosswordController.currentCell = eventCell.model.cells[x][y - 1];\n moved = true;\n } else {\n // Can we go to previous segment in clue?\n moved = moveToSegmentBehind(crosswordController, eventCell);\n }\n\n return moved;\n}\n\nfunction moveToCellLeft(crosswordController, eventCell) {\n const { x, y } = eventCell;\n let moved = false;\n\n if (eventCell.x > 0 && eventCell.model.cells[x - 1][y].light === true) {\n // eslint-disable-next-line no-param-reassign\n crosswordController.currentCell = eventCell.model.cells[x - 1][y];\n moved = true;\n } else {\n // Can we go to previous segment in clue?\n moved = moveToSegmentBehind(crosswordController, eventCell);\n }\n\n return moved;\n}\n\nfunction moveToCellAhead(crosswordController, eventCell) {\n // move to previous cell in current clue\n if (crosswordController.currentClue === eventCell.acrossClue) {\n return moveToCellRight(crosswordController, eventCell);\n } else if (crosswordController.currentClue === eventCell.downClue) {\n return moveToCellDown(crosswordController, eventCell);\n }\n}\n\nfunction moveToCellBehind(crosswordController, eventCell) {\n // move to previous cell in current clue\n if (crosswordController.currentClue === eventCell.acrossClue) {\n return moveToCellLeft(crosswordController, eventCell);\n } else if (crosswordController.currentClue === eventCell.downClue) {\n return moveToCellUp(crosswordController, eventCell);\n }\n}\n\nconst getHeadClues = (crosswordModel, clue) => {\n return clue.isAcross\n ? [\n crosswordModel.acrossClues.headSegments,\n crosswordModel.downClues.headSegments,\n ]\n : [\n crosswordModel.downClues.headSegments,\n crosswordModel.acrossClues.headSegments,\n ];\n};\n\nfunction moveToClueAhead(controller, eventCell) {\n const clue = controller.currentClue.headSegment;\n const [headClues, orthogonalHeadClues] = getHeadClues(eventCell.model, clue);\n const hci = headClues.indexOf(clue);\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(hci !== -1, `clue '${clue.clueId}' not found in headClues`);\n\n // eslint-disable-next-line no-param-reassign\n controller.currentClue =\n hci === headClues.length - 1\n ? // current head is last - flip direction, get first head clue\n orthogonalHeadClues[0]\n : // get next head\n headClues[hci + 1];\n}\n\nfunction moveToClueBehind(controller, eventCell) {\n const clue = controller.currentClue.headSegment;\n const [headClues, orthogonalHeadClues] = getHeadClues(eventCell.model, clue);\n const hci = headClues.indexOf(clue);\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(hci !== -1, `clue '${clue.clueId}' not found in headClues`);\n\n // eslint-disable-next-line no-param-reassign\n controller.currentClue =\n hci === 0\n ? // current head is first - flip direction, get last head clue\n orthogonalHeadClues.slice(-1)[0]\n : // get previous head\n headClues[hci - 1];\n}\n\nfunction deleteCellContent(crosswordController, event, eventCell) {\n // Fill cell with SPACE\n setCellContent(crosswordController, event, ' ');\n // remove any visual flag in cell that letter is incorrect\n hideElement(crosswordController.incorrectElement(eventCell));\n}\n\nfunction setCellContent(crosswordController, event, character) {\n const ec = crosswordController.cell(event.target.parentNode);\n\n // eslint-disable-next-line no-param-reassign\n event.target.value = character;\n\n // We need to update the answers\n if (ec.acrossClue) {\n ec.acrossClue.answer = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.setLetter)(\n ec.acrossClue.answer,\n ec.acrossClueLetterIndex,\n character,\n );\n }\n // across and/or down are possible\n if (ec.downClue) {\n ec.downClue.answer = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.setLetter)(\n ec.downClue.answer,\n ec.downClueLetterIndex,\n character,\n );\n }\n}\n\nconst hideElement = (element) => {\n element?.classList.add('hidden');\n};\n\nconst showElement = (element) => {\n element?.classList.remove('hidden');\n};\n\n// Style the currentClue.\nfunction styleCurrentClue(controller, newClue, oldClue) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(newClue, 'newClue is undefined');\n // Remove styles from the oldClue\n oldClue?.headSegment.flatCells.forEach((cell) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.removeClass)(controller.inputElement(cell), 'active');\n });\n newClue.headSegment.flatCells.forEach((cell) => {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(controller.inputElement(cell), 'active');\n });\n}\n\n// Style the currentCell.\nfunction styleCurrentCell(controller, newCell, oldCell) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.assert)(newCell, 'newCell is undefined');\n // Remove styles from the oldCell\n if (oldCell) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.removeClass)(controller.inputElement(oldCell), 'highlighted');\n }\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.addClass)(controller.inputElement(newCell), 'highlighted');\n}\n\nconst EventKey = Object.freeze({\n backspace: 'Backspace',\n delete: 'Delete',\n down: 'ArrowDown',\n enter: 'Enter',\n left: 'ArrowLeft',\n right: 'ArrowRight',\n space: ' ',\n tab: 'Tab',\n up: 'ArrowUp',\n shift: 'Shift',\n alt: 'Alt',\n ctrl: 'Control',\n name: (eventKey) => {\n // entry is an array [key, value]\n const entry = Object.entries(EventKey).find(\n (entry) => entry[1] === eventKey,\n );\n return entry ? entry[0] : null;\n },\n});\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/crossword-gridview.mjs?"); - -/***/ }), - -/***/ "./src/crossword-model.mjs": -/*!*********************************!*\ - !*** ./src/crossword-model.mjs ***! - \*********************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ convertSourceFileToDefinition: () => (/* binding */ convertSourceFileToDefinition),\n/* harmony export */ isWordSeparatorIndex: () => (/* binding */ isWordSeparatorIndex),\n/* harmony export */ newCrosswordDefinition: () => (/* binding */ newCrosswordDefinition),\n/* harmony export */ newCrosswordModel: () => (/* binding */ newCrosswordModel)\n/* harmony export */ });\n/* harmony import */ var yaml__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! yaml */ \"./node_modules/yaml/browser/index.js\");\n/* harmony import */ var _clue_model_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./clue-model.mjs */ \"./src/clue-model.mjs\");\n/* harmony import */ var _helpers_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers.mjs */ \"./src/helpers.mjs\");\n\n\n\n\n/**\n * **newCrosswordModel**: build a crossword model from a crosswordDefinition object.\n * - The function compiles a JSON crossword and emits diagnostic exceptions when errors are encountered.\n * @param {*} crosswordDefinition A javascript Object typically parsed or imported from a crossword description file in JSON or YAML format.\n * @returns a crossword model object\n */\nfunction newCrosswordModel(crosswordDefinition) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.trace)('newCrosswordModel');\n\n if (!validateCrosswordDefinition(crosswordDefinition)) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.trace)(\n 'newCrosswordModel: The model must be initialised with a valid crossword definition.',\n `error`,\n );\n return null;\n }\n\n // Create the basic crosswordModel structure.\n let crosswordModel = initialiseCrosswordModel(crosswordDefinition);\n // Create the array of cells. Each element has a reference back to the crosswordModel\n // for convenience.\n crosswordModel.cells = buildCellGrid(crosswordModel);\n\n // Add all the crosswordDefinition clues to the crosswordModel.\n const isAcross = /across/i;\n ['acrossClues', 'downClues'].forEach((clues) => {\n crosswordDefinition[clues].forEach(\n addClueToModel(crosswordModel, isAcross.test(clues)),\n );\n });\n\n // Process any multi-segment clues.\n [...crosswordModel.acrossClues, ...crosswordModel.downClues].forEach(\n addMultiSegmentProperties(crosswordModel),\n );\n\n // Assign lightCells property\n crosswordModel.lightCells = crosswordModel.cells\n .flat()\n .filter((cell) => cell.light);\n\n // Assign headSegment (array) properties to model's acrossClues and downClues arrays.\n ['acrossClues', 'downClues'].forEach((clues) => {\n crosswordModel[clues].headSegments = crosswordModel[clues].filter(\n (c) => c === c.headSegment,\n );\n });\n\n return crosswordModel;\n}\n\n// Helper for newCrosswordModel()\nfunction buildCellGrid(crosswordModel) {\n const { width } = crosswordModel;\n const { height } = crosswordModel;\n const array = new Array(width);\n for (let x = 0; x < width; x += 1) {\n array[x] = new Array(height);\n for (let y = 0; y < height; y += 1) {\n // assign cell object\n array[x][y] = {\n model: crosswordModel,\n x,\n y,\n toString: () => {\n return `${x},${y}`;\n },\n };\n }\n }\n return array;\n}\n\n// Helper for newCrosswordModel()\n/**\n * Is the character at letterIndex the last letter of a non-terminal\n * word in a multi-word sequence?\n * @param {*} letterIndex\n * @param {*} wordLengths array of word lengths\n * @returns boolean\n */\nfunction isWordSeparatorIndex(letterIndex, wordLengths) {\n if (letterIndex >= 0) {\n let remainingIndex = letterIndex;\n let index = 0;\n while (index < wordLengths.length) {\n const wl = wordLengths[index];\n if (remainingIndex < wl) {\n return (\n // is a word terminator\n remainingIndex === wl - 1 &&\n // is not last word\n index !== wordLengths.length - 1\n );\n } else {\n remainingIndex -= wl;\n index += 1;\n }\n }\n }\n return false;\n}\n\n// Helper for newCrosswordModel()\nfunction initialiseCrosswordModel(crosswordDefinition) {\n let crosswordModel = {\n width: crosswordDefinition.width,\n height: crosswordDefinition.height,\n acrossClues: [],\n downClues: [],\n cells: [],\n };\n if (\n crosswordModel.width === undefined ||\n crosswordModel.width === null ||\n crosswordModel.width < 0 ||\n crosswordModel.height === undefined ||\n crosswordModel.height === null ||\n crosswordModel.height < 0\n ) {\n throw new Error('The crossword bounds are invalid.');\n }\n return crosswordModel;\n}\n\n// Helper for newCrosswordModel()\nfunction validateCrosswordDefinition(crosswordDefinition) {\n const versionRegex = /^1\\.0$/;\n\n function error(message) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.trace)(`validateCrosswordDefinition: ${message}`, 'error');\n return false;\n }\n function normalise(text) {\n return text.toString().trim().toLowerCase();\n }\n\n const cd = crosswordDefinition;\n\n // Test supplied arguments\n\n if (!cd) {\n return error('[crosswordDefinition] argument is undefined or null');\n }\n\n // Test for document element\n else if (!cd.document) {\n return error('Missing \"document\" element');\n }\n // Test for document.mimetype element\n else if (!cd.document?.mimetype) {\n return error('Missing \"document.mimetype\" element');\n } else {\n const mimeType = normalise(cd.document.mimetype);\n\n // Test for valid mimetype\n\n if (mimeType !== 'application/vnd.js-crossword') {\n return error(\n `Unsupported \"document.mimetype\" (${mimeType}) Expected: application/vnd.js-crossword`,\n );\n }\n // Test for document.version element\n else if (!cd.document?.version) {\n return error('Missing \"document.mimetype\" element');\n }\n\n // Test for supported version\n else {\n const version = normalise(cd.document.version);\n\n // Final test!\n return versionRegex.test(version)\n ? true\n : error(`Unsupported document version (${version}) Expected: 1.0`);\n }\n }\n}\n\n// Helper for newCrosswordModel()\nfunction validateClueInCrossword(clueModel, crosswordModel, isAcrossClue) {\n if (\n clueModel.x < 0 ||\n clueModel.x >= crosswordModel.width ||\n clueModel.y < 0 ||\n clueModel.y >= crosswordModel.height\n ) {\n throw new Error(`Clue ${clueModel} doesn't start in the bounds.`);\n }\n\n // Make sure the clue is not too long.\n if (isAcrossClue) {\n if (clueModel.x + clueModel.segmentLength > crosswordModel.width) {\n throw new Error(`Clue ${clueModel} exceeds horizontal bounds.`);\n }\n // down clue\n } else if (clueModel.y + clueModel.segmentLength > crosswordModel.height) {\n throw new Error(`Clue ${clueModel} exceeds vertical bounds.`);\n }\n}\n\n// Helper for newCrosswordModel()\nfunction updateOrthogonalClueAnswer(cell, answer, isAcrossClue) {\n // eslint-disable-next-line no-param-reassign\n\n // We need to update the answers\n if (!isAcrossClue && cell.acrossClue) {\n // eslint-disable-next-line no-param-reassign\n cell.acrossClue.answer = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.setLetter)(\n cell.acrossClue.answer,\n cell.acrossClueLetterIndex,\n answer,\n );\n }\n if (isAcrossClue && cell.downClue) {\n // eslint-disable-next-line no-param-reassign\n cell.downClue.answer = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.setLetter)(\n cell.downClue.answer,\n cell.downClueLetterIndex,\n answer,\n );\n }\n}\n\n// Curried function returns a function to map a tailSegmentDescriptor to its clueModel (clue)\nconst tailDescriptorConverter = (crosswordModel) => {\n return (tailDescriptor) => {\n const cm = crosswordModel;\n const td = tailDescriptor;\n const hn = td.headNumber;\n\n switch (td.direction) {\n case 'across':\n // non-terminal\n return cm.acrossClues.find((ac) => ac.headNumber === hn);\n case 'down':\n // non-terminal\n return cm.downClues.find((dc) => dc.headNumber === hn);\n default:\n // terminal (direction === null)\n return (\n cm.acrossClues.find((ac) => ac.headNumber === hn) ||\n cm.downClues.find((dc) => dc.headNumber === hn)\n );\n }\n };\n};\n\n// Curried function returns a function to add a crosswordDefinition clue to a crosswordModel\nfunction addClueToModel(crosswordModel, isAcrossClue) {\n return (cdClue) => {\n // Compile the clue model from the crossword definition of the clue\n const clueModel = (0,_clue_model_mjs__WEBPACK_IMPORTED_MODULE_1__.newClueModel)(cdClue, isAcrossClue);\n // Add clue model to crosswordModel clues array.\n crosswordModel[isAcrossClue ? 'acrossClues' : 'downClues'].push(clueModel);\n\n // The clue position must be in the bounds.\n validateClueInCrossword(clueModel, crosswordModel, isAcrossClue);\n\n // We can now mark the cells as light. If the clue has\n // an answer (which is optional), we can validate it\n // is coherent.\n let { x, y } = clueModel;\n for (\n let letterIndex = 0;\n letterIndex < clueModel.segmentLength;\n letterIndex += 1\n ) {\n const cell = crosswordModel.cells[x][y];\n cell.light = true;\n cell[isAcrossClue ? 'acrossClue' : 'downClue'] = clueModel;\n cell[isAcrossClue ? 'acrossClueLetterIndex' : 'downClueLetterIndex'] =\n letterIndex;\n clueModel.cells.push(cell);\n\n // Check if we need to add a word separator to the grid cell.\n if (isWordSeparatorIndex(letterIndex, clueModel.wordLengths)) {\n cell[clueModel.isAcross ? 'acrossTerminator' : 'downTerminator'] = true;\n }\n\n // If the imported clue has an answer we set it in the cell...\n setCellAnswer(cell, clueModel, letterIndex, cdClue.answer, isAcrossClue);\n // If the imported clue has a solution we set it in the cell...\n setCellSolution(cell, clueModel, letterIndex, cdClue.solution);\n // // Set label for first cell, and check against existing value\n setCellLabel(letterIndex, cell, clueModel);\n\n if (isAcrossClue) {\n x += 1;\n } else {\n y += 1;\n }\n }\n };\n}\n\nfunction setCellLabel(letterIndex, cell, clueModel) {\n if (letterIndex === 0) {\n if (cell.labelText && cell.labelText !== clueModel.headNumber) {\n throw new Error(\n `Clue ${clueModel} has a label which is inconsistent with another clue (${cell.acrossClue}).`,\n );\n }\n // eslint-disable-next-line no-param-reassign\n cell.labelText = clueModel.headNumber;\n }\n}\n\n// Curried function returns a function to add multi-segment properties to a clueModel\nfunction addMultiSegmentProperties(crosswordModel) {\n return (cmClue) => {\n // Find the connected clues. Pass curried iterator function\n // eslint-disable-next-line no-param-reassign\n cmClue.tailSegments = cmClue.tailDescriptors.map(\n tailDescriptorConverter(crosswordModel),\n );\n\n // Rebuild the lengthText.\n // For head clue segments, it will be the aggregate of the multi-word descriptors for each segment.\n // For tail clue segments, it will be the multi-word descriptors for itself (no change).\n const multiSegmentLengths = [\n ...cmClue.wordLengths,\n ...cmClue.tailSegments.flatMap((ts) => ts.wordLengths),\n ];\n // eslint-disable-next-line no-param-reassign\n cmClue.lengthText = `(${multiSegmentLengths})`;\n\n // Each clue should know its head segment as well as the next and\n // previous clue segments.\n let clueSegmentIndex = 0;\n const clueSegments = [cmClue, ...cmClue.tailSegments];\n\n clueSegments.forEach((cs) => {\n // Set the head segment for _each_ clue segment via destructuring.\n // Note that the head segment for a one-segment clue is itself.\n // eslint-disable-next-line no-param-reassign\n [cs.headSegment] = clueSegments;\n\n // Assign previousClueSegment (all except first)\n if (clueSegmentIndex > 0) {\n // eslint-disable-next-line no-param-reassign\n cs.previousClueSegment = clueSegments[clueSegmentIndex - 1];\n }\n\n // Assign nextClueSegment (all except last)\n if (clueSegmentIndex < clueSegments.length - 1) {\n // eslint-disable-next-line no-param-reassign\n cs.nextClueSegment = clueSegments[clueSegmentIndex + 1];\n }\n clueSegmentIndex += 1;\n });\n\n // Assign flatCells property to head segment\n clueSegments[0].flatCells =\n clueSegments.length === 1\n ? clueSegments[0].cells\n : // Remove duplicates from intersecting multiple segments by constructing a set\n new Set(clueSegments.flatMap((cs) => cs.cells));\n\n // Rewrite the clue label.\n // Head clues will get a comma-separated list of connected segments.\n // eslint-disable-next-line no-param-reassign\n cmClue.labelText = `${[cmClue.headNumber]\n .concat(cmClue.tailSegments.map((ts) => ts.headNumber))\n .join(',')}.`;\n\n // The tail clues have no lengthText\n cmClue.tailSegments.forEach((ts) => {\n // eslint-disable-next-line no-param-reassign\n ts.lengthText = '';\n });\n };\n}\n\n/**\n * **convertSourceFileToDefinition** build a _crosswordDefinition_ from a YAML or JSON file.\n * @param {*} mimeType The [MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) type of the\n * _documentText_: `application/json` or `application/yaml`\n * @param {*} crosswordSourcePath system file path to a JSON or YAML crosswordSource.\n * @returns {*} a crosswordDefinition Object on successful conversion, or null.\n *\n * > NOTE: This function can't be called from client/browser code.\n * > Local file system access is typically not allowed in that context.\n */\nfunction convertSourceFileToDefinition(mimeType, crosswordSourcePath) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.assert)(fileExists(crosswordSourcePath));\n const crosswordSource = readFileSync(crosswordSourcePath, {\n encoding: 'utf8',\n flag: 'r',\n });\n\n return newCrosswordDefinition(mimeType, crosswordSource.toString());\n}\n\n// Helper function to build a CrosswordDefinition\n\n/**\n * **newCrosswordDefinition** build a _crosswordDefinition_ from a _crosswordSource_ in JSON or YAML format.\n * @param {*} mimeType The [MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) type of the\n * _documentText_, `application/json` or `application/yaml`\n * @param {*} crosswordSource a structured text description of a crossword puzzle in _mimeType_ format.\n * @returns {*} a crosswordDefinition object on successful conversion, or null.\n */\nfunction newCrosswordDefinition(mimeType, crosswordSource) {\n let parsedDocument;\n switch (mimeType.trim().toLowerCase()) {\n case 'application/json':\n try {\n parsedDocument = JSON.parse(crosswordSource);\n } catch (error) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.trace)(\n `newCrosswordDefinition: [documentText] is not a simple JSON object.\\n` +\n `Error: ${error.message}\\n`,\n `error`,\n );\n return null;\n }\n break;\n case 'application/yaml':\n case 'application/x-yaml':\n try {\n parsedDocument = yaml__WEBPACK_IMPORTED_MODULE_0__[\"default\"].parse(crosswordSource);\n } catch (error) {\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.trace)(\n `newCrosswordDefinition: [documentText] is not a YAML object.\\n` +\n `Error: ${error.message}\\n`,\n `error`,\n );\n return null;\n }\n break;\n default:\n (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.trace)(\n `newCrosswordDefinition: Unsupported file type: (${mimeType})`,\n 'error',\n );\n return null;\n }\n return validateCrosswordDefinition(parsedDocument) ? parsedDocument : null;\n}\n\nfunction propertyErrorText(clueModel, cell, letterIndex, property) {\n const gridCoords = `(${clueModel.x + 1},${clueModel.y + 1})`;\n const propVal = `[${clueModel[property]}[${letterIndex + 1}],${\n clueModel[property][letterIndex]\n }]`;\n const prevClue = `(${cell.acrossClue})`;\n const prevVal = `[${cell.acrossClue[property]},${cell[property]}]`;\n\n return (\n `Clue ${clueModel} ${property} at ${gridCoords} ${propVal} is not coherent` +\n ` with previous clue ${prevClue} ${property} ${prevVal}.`\n );\n}\n\n// Helper function to set solution letter in a cell\nfunction setCellSolution(cell, clueModel, letterIndex, clueSolution) {\n const cellDefaultSolution = ' ';\n\n if (clueSolution) {\n // ...set solution only if it is NOT different to an existing solution.\n if (\n cell.solution &&\n // We can overwrite any cells that have the default value\n cell.solution !== cellDefaultSolution &&\n cell.solution !== clueModel.solution[letterIndex]\n ) {\n throw new Error(\n propertyErrorText(clueModel, cell, letterIndex, 'solution'),\n );\n } else {\n // if (cell.solution && cell.solution !== ' '\n // eslint-disable-next-line no-param-reassign\n cell.solution = clueModel.solution[letterIndex];\n }\n } else {\n // eslint-disable-next-line no-param-reassign\n cell.solution = cellDefaultSolution;\n }\n}\n\n// Helper function to set answer letter in a cell\nfunction setCellAnswer(cell, clueModel, letterIndex, clueAnswer, isAcrossClue) {\n const cellDefaultAnswer = ' ';\n\n if (clueAnswer) {\n const clueAnswerLetter = clueModel.answer[letterIndex];\n\n // ...but only if it is not different to an existing answer.\n if (\n cell.answer &&\n // We can overwrite any cells that have default value\n cell.answer !== cellDefaultAnswer &&\n cell.answer !== clueAnswerLetter\n ) {\n throw new Error(\n propertyErrorText(clueModel, cell, letterIndex, 'answer'),\n );\n }\n // if cell.answer && cell.answer !== ' '\n // eslint-disable-next-line no-param-reassign\n cell.answer = clueAnswerLetter;\n // check if cell appears in a clue in the other direction\n updateOrthogonalClueAnswer(cell, cell.answer, isAcrossClue);\n }\n\n // No answer in imported clue, insert default if cell is vacant.\n // Don't clobber an existing value\n else if (!cell.answer) {\n // eslint-disable-next-line no-param-reassign\n cell.answer = cellDefaultAnswer;\n }\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/crossword-model.mjs?"); - -/***/ }), - -/***/ "./src/default-eventbindings.mjs": -/*!***************************************!*\ - !*** ./src/default-eventbindings.mjs ***! - \***************************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ defaultKeyDownBinding: () => (/* binding */ defaultKeyDownBinding),\n/* harmony export */ defaultKeyUpBinding: () => (/* binding */ defaultKeyUpBinding)\n/* harmony export */ });\n/* harmony import */ var _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crossword-gridview.mjs */ \"./src/crossword-gridview.mjs\");\n\n\n// eventBinding = {eventName,keyBindings[keybinding,...]}\n// keybinding = {key, action}\n// action = (controller, event, eventCell) => {...}\n\nconst defaultKeyDownBinding = {\n eventName: 'keydown',\n keyBindings: [\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.backspace,\n action: (controller, event, eventCell) => {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.deleteCellContent)(controller, event, eventCell);\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToCellBehind)(controller, eventCell);\n },\n },\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.delete,\n action: (controller, event, eventCell) => {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.deleteCellContent)(controller, event, eventCell);\n },\n },\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.enter,\n action: (controller, event, eventCell) => {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.toggleClueDirection)(controller, eventCell);\n },\n },\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.tab,\n action: (controller, event, eventCell) => {\n event.shiftKey\n ? (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToClueBehind)(controller, eventCell)\n : (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToClueAhead)(controller, eventCell);\n },\n },\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.space,\n action: (controller, event, eventCell) => {\n event.shiftKey\n ? (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToCellBehind)(controller, eventCell)\n : (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToCellAhead)(controller, eventCell);\n },\n },\n ],\n};\n\nconst defaultKeyUpBinding = {\n eventName: 'keyup',\n keyBindings: [\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.left,\n action: (controller, event, eventCell) => {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToCellLeft)(controller, eventCell);\n },\n },\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.up,\n action: (controller, event, eventCell) => {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToCellUp)(controller, eventCell);\n },\n },\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.right,\n action: (controller, event, eventCell) => {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToCellRight)(controller, eventCell);\n },\n },\n {\n key: _crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.EventKey.down,\n action: (controller, event, eventCell) => {\n (0,_crossword_gridview_mjs__WEBPACK_IMPORTED_MODULE_0__.moveToCellDown)(controller, eventCell);\n },\n },\n ],\n};\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/default-eventbindings.mjs?"); - -/***/ }), - -/***/ "./src/helpers.mjs": -/*!*************************!*\ - !*** ./src/helpers.mjs ***! - \*************************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ addClass: () => (/* binding */ addClass),\n/* harmony export */ addClasses: () => (/* binding */ addClasses),\n/* harmony export */ assert: () => (/* binding */ assert),\n/* harmony export */ ecs: () => (/* binding */ ecs),\n/* harmony export */ eid: () => (/* binding */ eid),\n/* harmony export */ first: () => (/* binding */ first),\n/* harmony export */ last: () => (/* binding */ last),\n/* harmony export */ memoize: () => (/* binding */ memoize),\n/* harmony export */ newPubSub: () => (/* binding */ newPubSub),\n/* harmony export */ removeClass: () => (/* binding */ removeClass),\n/* harmony export */ replaceStrAt: () => (/* binding */ replaceStrAt),\n/* harmony export */ setLetter: () => (/* binding */ setLetter),\n/* harmony export */ toHexString: () => (/* binding */ toHexString),\n/* harmony export */ toggleClass: () => (/* binding */ toggleClass),\n/* harmony export */ trace: () => (/* binding */ trace),\n/* harmony export */ tracing: () => (/* binding */ tracing)\n/* harmony export */ });\n// Lightweight helper functions.\n\n/**\n * **addClass** - add a [CSS](https://en.wikipedia.org/wiki/CSS) class to a\n * [DOM](https://en.wikipedia.org/wiki/Document_Object_Model) element.\n * @param {*} element the element (object reference)\n * @param {*} className the class to add (string)\n */\nfunction addClass(element, className) {\n element.classList.add(className);\n}\nfunction addClasses(element, classNames) {\n classNames.forEach((cn) => {\n element.classList.add(cn);\n });\n}\n\n/**\n * **assert** - logical constraint testing\n * @param condition - test expression (boolean)\n * @param message - (string) recorded on test failure - _condition_ evaluates to `false`.\n */\nfunction assert(condition, message) {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n\n//// Shortcut functions\n\nconst eid = (elementId, dom = document) => {\n return dom.getElementById(elementId);\n};\n\n// Returns an array of elements\nconst ecs = (elementClass, dom = document) => {\n return dom.getElementsByClassName(elementClass);\n};\n\n/**\n * **first** - get the first element of an array\n * @param {*} array\n * @returns the first element of _array_ or null for empty,undefined or null array\n */\nfunction first(array) {\n // If array is not nullish, return first element\n return array ? array[0] : null;\n}\n\n/**\n * replaceStrAt - overlay **str** onto **original** string starting at **index**\n * @param original - the string to be mutated\n * @param index - the index of _original_ to start the overlay. Negative values supported like `string.slice()`.\n * @param str - the overlaying text\n * @returns the mutated _original_. Any null or undefined arguments returns _original_.\n * _index_ outside range [0,_original_.length) returns _original_.\n */\nfunction replaceStrAt(original, index, str) {\n let result = original;\n if (original && index != null && str) {\n let pos = parseInt(index, 10);\n if (pos < 0) {\n // Normalise negative index values\n pos = original.length + pos;\n }\n if (pos >= 0 && original.length > pos) {\n result = `${original.slice(0, pos)}${str}${original.slice(\n pos + str.length,\n )}`;\n }\n }\n return result;\n}\n\n/**\n * **last** - get the last element of an array\n * @param {*} array\n * @returns the last element of _array_ or null for empty,undefined or null array\n */\nfunction last(array) {\n // If array is not nullish, return last element\n return array ? array.slice(-1) : null;\n}\n\n/**\n * **memoize** - wrap an arbitrary, single-argument,\n * [idempotent](https://en.wikipedia.org/wiki/Idempotence)\n * function with result-caching.\n * Useful for [_expensive_](https://en.wikipedia.org/wiki/Analysis_of_algorithms) functions.\n * @param {*} fn the function to be [memoized](https://en.wikipedia.org/wiki/Memoization)\n * @returns a reference to the wrapped function. Assign this reference to a variable\n * and invoke in the same manner as a function.\n */\nconst memoize = (fn) => {\n // A hopefully unique object property name/key!\n const id = 'id_Z?7kQ;x8j!';\n const cache = {};\n return (arg) => {\n if (!arg[id]) {\n // Attach a random id property to this object\n // eslint-disable-next-line no-param-reassign\n arg[id] = Math.random().toString(16).slice(2);\n }\n\n if (!(arg[id] in cache)) {\n cache[arg[id]] = fn(arg);\n trace(`memoize:caching id ${arg[id]}`);\n }\n\n return cache[arg[id]];\n };\n};\n\n/**\n * **removeClass** - remove a [CSS](https://en.wikipedia.org/wiki/CSS) class from a\n * [DOM](https://en.wikipedia.org/wiki/Document_Object_Model) element.\n * @param {*} element the element (object reference)\n * @param {*} className the class to add (string)\n */\nfunction removeClass(element, className) {\n element.classList.remove(className);\n}\n\n/**\n * setLetter - Set the _source_ letter at _index_ to _newLetter_. Pad _source_ if required.\n * @param {*} source string to be modified\n * @param {*} index target position in _source_\n * @param {*} newLetter replacement letter\n * @returns\n */\nfunction setLetter(source, index, newLetter) {\n let result = source === null || source === undefined ? '' : source;\n result = result.padEnd(index + 1, ' ');\n return replaceStrAt(result, index, newLetter);\n}\n\n/**\n * **toggleClass** - _toggle_(add/remove) a [CSS](https://en.wikipedia.org/wiki/CSS) class on a\n * [DOM](https://en.wikipedia.org/wiki/Document_Object_Model) element.\n * @param {*} element the element (object reference)\n * @param {*} className the class to add (string)\n */\nfunction toggleClass(element, className) {\n element.classList.toggle(className);\n}\n\n/**\n * toHexString - convert an object to a hexadecimal string\n * @param {} obj - object to be converted\n * @returns string of hexadecimal digits\n */\nconst toHexString = (obj) => {\n // Fails for circular objects\n return `0x${[...JSON.stringify(obj)]\n .map((c, i) => str.charCodeAt(i).toString(16))\n .join('')}`;\n};\n\n// module scope variable to toggle log tracing\nlet tracingEnabled = false;\n\n/**\n * **tracing** - enable or disable console logging\n * @param {*} enabled logging is on/off\n */\nconst tracing = (enabled) => {\n tracingEnabled = enabled;\n};\n\n/**\n * trace - console logging\n * @param action - 'log', 'warn' or 'error'. Default is 'log'\n * @param message - string to be logged\n */\nconst trace = (message, action = 'log') => {\n if (tracingEnabled) {\n assert(\n ['log', 'warn', 'error'].includes(action),\n `Unsupported action'${action}'.`,\n );\n console[action](message);\n }\n};\n\n// https://dev.to/adancarrasco/implementing-pub-sub-in-javascript-3l2e\n// Topics should only be modified from the eventRouter itself (return value of newPubSub)\nconst newPubSub = () => {\n const topics = {};\n const hOP = topics.hasOwnProperty;\n\n return {\n publish: (topic, info) => {\n // No topics\n if (!hOP.call(topics, topic)) return;\n\n // Emit the message to any of the receivers\n topics[topic].forEach((item) => {\n // Send any arguments if specified\n item(info !== undefined ? info : {});\n });\n },\n subscribe: (topic, callback) => {\n // Create the array of topics if not initialized yet\n if (!hOP.call(topics, topic)) topics[topic] = [];\n\n // We define the index where this receiver is stored in the topics array\n const index = topics[topic].push(callback) - 1;\n\n // When we subscribe we return an object to later remove the subscription\n return {\n remove: () => {\n delete topics[topic][index];\n },\n };\n },\n };\n};\n\nfunction newEnum(values) {\n const enumeration = {};\n for (const val of values) {\n enumeration[val] = val;\n }\n return Object.freeze(enumeration);\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/helpers.mjs?"); - -/***/ }), - -/***/ "./src/index.mjs": -/*!***********************!*\ - !*** ./src/index.mjs ***! - \***********************/ -/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { - -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ CrosswordsJS: () => (/* binding */ CrosswordsJS)\n/* harmony export */ });\n/* harmony import */ var _crossword_model_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./crossword-model.mjs */ \"./src/crossword-model.mjs\");\n/* harmony import */ var _crossword_controller_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./crossword-controller.mjs */ \"./src/crossword-controller.mjs\");\n\n\n\n// Define our public API.\nconst CrosswordsJS = {\n compileCrossword: _crossword_model_mjs__WEBPACK_IMPORTED_MODULE_0__.newCrosswordModel,\n Controller: _crossword_controller_mjs__WEBPACK_IMPORTED_MODULE_1__.CrosswordController,\n};\n\n// If we are in the browser, add the API to the global scope.\nif (typeof window !== 'undefined') {\n window.CrosswordsJS = CrosswordsJS;\n}\n\n\n\n\n//# sourceURL=webpack://crosswords-js/./src/index.mjs?"); - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ // Check if module is in cache -/******/ var cachedModule = __webpack_module_cache__[moduleId]; -/******/ if (cachedModule !== undefined) { -/******/ return cachedModule.exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __webpack_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __webpack_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/************************************************************************/ -/******/ -/******/ // startup -/******/ // Load entry module and return exports -/******/ // This entry module can't be inlined because the eval devtool is used. -/******/ var __webpack_exports__ = __webpack_require__("./src/index.mjs"); -/******/ -/******/ })() -; \ No newline at end of file +var Kr = Object.defineProperty; +var Vr = (e, n, r) => n in e ? Kr(e, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[n] = r; +var j = (e, n, r) => (Vr(e, typeof n != "symbol" ? n + "" : n, r), r), Ve = (e, n, r) => { + if (!n.has(e)) + throw TypeError("Cannot " + r); +}; +var p = (e, n, r) => (Ve(e, n, "read from private field"), r ? r.call(e) : n.get(e)), v = (e, n, r) => { + if (n.has(e)) + throw TypeError("Cannot add the same private member more than once"); + n instanceof WeakSet ? n.add(e) : n.set(e, r); +}, D = (e, n, r, i) => (Ve(e, n, "write to private field"), i ? i.call(e, r) : n.set(e, r), r); +var E = (e, n, r) => (Ve(e, n, "access private method"), r); +function F(e, n) { + e.classList.add(n); +} +function Le(e, n) { + n.forEach((r) => { + e.classList.add(r); + }); +} +function d(e, n) { + if (!e) + throw new Error(n || "Assertion failed"); +} +const On = (e, n = document) => n.getElementById(e), Nn = (e, n = document) => n.getElementsByClassName(e); +function qr(e, n, r) { + let i = e; + if (e && n != null && r) { + let t = parseInt(n, 10); + t < 0 && (t = e.length + t), t >= 0 && e.length > t && (i = `${e.slice(0, t)}${r}${e.slice( + t + r.length + )}`); + } + return i; +} +function ke(e, n) { + e.classList.remove(n); +} +function oe(e, n, r) { + let i = e ?? ""; + return i = i.padEnd(n + 1, " "), qr(i, n, r); +} +let $n = !1; +const Gr = (e) => { + $n = e; +}, x = (e, n = "log") => { + $n && (d( + ["log", "warn", "error"].includes(n), + `Unsupported action'${n}'.` + ), console[n](e)); +}, Wr = () => { + const e = {}, n = e.hasOwnProperty; + return { + publish: (r, i) => { + n.call(e, r) && e[r].forEach((t) => { + t(i !== void 0 ? i : {}); + }); + }, + subscribe: (r, i) => { + n.call(e, r) || (e[r] = []); + const t = e[r].push(i) - 1; + return { + remove: () => { + delete e[r][t]; + } + }; + } + }; +}; +var V; +class dn { + constructor() { + /** @type {Record} */ + v(this, V, {}); + /** + * Gets the DOM element for a modelCell. + * @param {*} modelCell + * @returns {HTMLDivElement} + */ + j(this, "cellElement", (n) => (d(typeof n == "object", "Cell is not an object"), n.cellElement)); + // Gets the modelCell for a DOM element. + j(this, "modelCell", (n) => { + switch (typeof n) { + case "string": + return p(this, V)[n]; + case "object": + return p(this, V)[n.dataset.xy]; + default: + d(!0, 'Unexpected type for "cellElement"'); + break; + } + }); + } + /** + * Adds a Cell <-> Cell Element mapping. + * @param {*} modelCell + * @param {HTMLDivElement} cellElement + */ + add(n, r) { + d(n, "modelCell is null or undefined"), d(r, "cellElement is null or undefined"), p(this, V)[r.dataset.xy] = n; + } + get modelCells() { + return Object.values(p(this, V)); + } +} +V = new WeakMap(); +function zr(e, n) { + x("newCrosswordCluesView"), d(e, "[document] is null or undefined"), d(n, "[controller] is null or undefined"), d(n.model, "[controller.model] is null or undefined"); + function r(o, u) { + let s = e.createElement("div"); + F(s, "crossword-clue-block"), s.id = o; + let c = e.createElement("p"); + return c.innerHTML = u, F(c, "crossword-clue-block-title"), s.appendChild(c), s; + } + function i(o, u, s) { + s.forEach((c) => { + let f = e.createElement("div"); + F(f, "crossword-clue"), f.modelClue = c; + let a = e.createElement("span"); + F(a, "crossword-clue-label"), a.innerHTML = `${c.labelText}`, f.appendChild(a); + let m = e.createElement("span"); + F(m, "crossword-clue-text"), m.innerHTML = `${c.clueText} ${c.lengthText}`, f.appendChild(m), f.addEventListener("click", (g) => { + x(`clue(${c.labelText}):click`), o.lastMoveEvent = "click", o.currentClue = c; + }), u.appendChild(f); + }); + } + function t(o) { + const u = n.currentClue; + if (o === u) + return !0; + { + const s = u.headSegment; + return s === o || s.tailSegments.indexOf(o) !== -1; + } + } + let l = { + wrapper: e.createElement("div"), + acrossClues: r("crossword-across-clues", "Across"), + downClues: r("crossword-down-clues", "Down") + }; + return Le(l.wrapper, ["crosswords-js", "crossword-clues"]), i(n, l.acrossClues, n.model.acrossClues), l.wrapper.appendChild(l.acrossClues), i(n, l.downClues, n.model.downClues), l.wrapper.appendChild(l.downClues), n.addEventsListener(["clueSelected"], (o) => { + for (const u of l.acrossClues.children) + t(u.modelClue) ? F(u, "current-clue-segment") : ke(u, "current-clue-segment"); + for (const u of l.downClues.children) + t(u.modelClue) ? F(u, "current-clue-segment") : ke(u, "current-clue-segment"); + }), l.wrapper; +} +function Qr(e, n, r) { + x("newCrosswordGridView"), d( + e, + "DOM root element [document] argument is null or undefined." + ), d(n, "CrosswordModel [model] argument is null or undefined."), d( + r, + "CrosswordController [cellMap] argument is null or undefined." + ); + let i = e.createElement("div"); + Le(i, ["crosswords-js", "crossword-grid"]), i.style.setProperty("--row-count", n.height), i.style.setProperty("--column-count", n.width); + for (let t = 0; t < n.height; t += 1) + for (let l = 0; l < n.width; l += 1) { + const o = n.cells[l][t], u = Xr(e, o); + r.add(o, u), i.appendChild(u); + } + return i; +} +function Xr(e, n) { + let r = e.createElement("div"); + if (r.dataset.xy = n, F(r, "cwcell"), n.cellElement = r, F(r, n.light ? "light" : "dark"), !n.light) + return r; + const i = e.createElement("input"); + if (i.name = `input-${n}`, i.maxLength = 1, i.size = 1, n.answer && (i.value = n.answer), r.appendChild(i), n.labelText) { + const o = e.createElement("div"); + F(o, "cwclue-label"), o.innerHTML = n.labelText, r.appendChild(o); + } + const t = e.createElement("div"); + Le(t, ["cwcell-revealed", "hidden"]), r.appendChild(t); + const l = e.createElement("div"); + return Le(l, ["cwcell-incorrect", "hidden"]), r.appendChild(l), n.acrossTerminator && F(i, "cw-across-word-separator"), n.downTerminator && F(i, "cw-down-word-separator"), r; +} +function Rn(e, n) { + const [r, i, t] = [ + n, + e, + n.acrossClue && n.downClue + ]; + return t && (x("toggleClueDirection"), i.currentClue = r.acrossClue === i.currentClue ? r.downClue : r.acrossClue), t; +} +function Dn(e, n) { + const [r, , i] = [ + n, + e, + e.currentClue + ], o = (r.acrossClue === i ? r.acrossClueLetterIndex : r.downClueLetterIndex) + 1 === i.cells.length && i.nextClueSegment; + return o && (cc.currentClue = i.nextClueSegment), o; +} +function Mn(e, n) { + const [r, i] = [n, e], t = i.currentClue, u = (r.acrossClue === t ? r.acrossClueLetterIndex : r.downClueLetterIndex) - 1 === -1 && t.previousClueSegment; + return u && (i.currentCell = t.previousClueSegment.cells.slice(-1)[0], i.currentClue = t.previousClueSegment), u; +} +function Bn(e, n) { + const { x: r, y: i } = n, { height: t } = n.model; + let l = !1; + return n.y + 1 < t && n.model.cells[r][i + 1].light === !0 ? (e.currentCell = n.model.cells[r][i + 1], l = !0) : l = Dn(e, n), l; +} +function Hn(e, n) { + const { x: r, y: i } = n, { width: t } = n.model; + let l = !1; + return n.x + 1 < t && n.model.cells[r + 1][i].light === !0 ? (e.currentCell = n.model.cells[r + 1][i], l = !0) : l = Dn(e, n), l; +} +function jn(e, n) { + const { x: r, y: i } = n; + let t = !1; + return n.y > 0 && n.model.cells[r][i - 1].light === !0 ? (e.currentCell = n.model.cells[r][i - 1], t = !0) : t = Mn(e, n), t; +} +function Pn(e, n) { + const { x: r, y: i } = n; + let t = !1; + return n.x > 0 && n.model.cells[r - 1][i].light === !0 ? (e.currentCell = n.model.cells[r - 1][i], t = !0) : t = Mn(e, n), t; +} +function Un(e, n) { + if (e.currentClue === n.acrossClue) + return Hn(e, n); + if (e.currentClue === n.downClue) + return Bn(e, n); +} +function hn(e, n) { + if (e.currentClue === n.acrossClue) + return Pn(e, n); + if (e.currentClue === n.downClue) + return jn(e, n); +} +const Yn = (e, n) => n.isAcross ? [ + e.acrossClues.headSegments, + e.downClues.headSegments +] : [ + e.downClues.headSegments, + e.acrossClues.headSegments +]; +function Zr(e, n) { + const r = e.currentClue.headSegment, [i, t] = Yn(n.model, r), l = i.indexOf(r); + d(l !== -1, `clue '${r.clueId}' not found in headClues`), e.currentClue = l === i.length - 1 ? ( + // current head is last - flip direction, get first head clue + t[0] + ) : ( + // get next head + i[l + 1] + ); +} +function Jr(e, n) { + const r = e.currentClue.headSegment, [i, t] = Yn(n.model, r), l = i.indexOf(r); + d(l !== -1, `clue '${r.clueId}' not found in headClues`), e.currentClue = l === 0 ? ( + // current head is first - flip direction, get last head clue + t.slice(-1)[0] + ) : ( + // get previous head + i[l - 1] + ); +} +function pn(e, n, r) { + Kn(e, n, " "), ue(e.incorrectElement(r)); +} +function Kn(e, n, r) { + const i = e.cell(n.target.parentNode); + n.target.value = r, i.acrossClue && (i.acrossClue.answer = oe( + i.acrossClue.answer, + i.acrossClueLetterIndex, + r + )), i.downClue && (i.downClue.answer = oe( + i.downClue.answer, + i.downClueLetterIndex, + r + )); +} +const ue = (e) => { + e == null || e.classList.add("hidden"); +}, Vn = (e) => { + e == null || e.classList.remove("hidden"); +}; +function ei(e, n, r) { + d(n, "newClue is undefined"), r == null || r.headSegment.flatCells.forEach((i) => { + ke(e.inputElement(i), "active"); + }), n.headSegment.flatCells.forEach((i) => { + F(e.inputElement(i), "active"); + }); +} +function ni(e, n, r) { + d(n, "newCell is undefined"), r && ke(e.inputElement(r), "highlighted"), F(e.inputElement(n), "highlighted"); +} +const M = Object.freeze({ + backspace: "Backspace", + delete: "Delete", + down: "ArrowDown", + enter: "Enter", + left: "ArrowLeft", + right: "ArrowRight", + space: " ", + tab: "Tab", + up: "ArrowUp", + shift: "Shift", + alt: "Alt", + ctrl: "Control", + name: (e) => { + const n = Object.entries(M).find( + (r) => r[1] === e + ); + return n ? n[0] : null; + } +}); +function rn(e, n) { + var o; + d(e, " is null or undefined"), d(n, " is null or undefined"); + const r = n.acrossClue ? n.acrossClue : n.downClue, i = n.acrossClue ? n.acrossClueLetterIndex : n.downClueLetterIndex, t = i < ((o = r.solution) == null ? void 0 : o.length) ? r.solution[i] : " "; + Ye(e, n, t, !1), Vn(e.revealedElement(n)), ue(e.incorrectElement(n)); +} +function ri(e, n) { + d(e, " is null or undefined"), d(n, " is null or undefined"), x(`revealClue: '${n}'`), n.headSegment.flatCells.forEach((r) => { + rn(e, r); + }); +} +function ii(e) { + d(e, " is null or undefined"), e.model.lightCells.forEach((n) => { + rn(e, n); + }); +} +const T = Object.freeze({ + correct: 0, + // 0 elements empty, N elements correct + incorrect: 1, + // 1+ elements incorrect + incomplete: 2 + // 1+ elements empty, 0 elements incorrect +}); +function Pe(e, n) { + return e ? T.incorrect : n ? T.incomplete : T.correct; +} +function Ue(e, n, r = !0) { + d(e, " is null or undefined"), d(n, " is null or undefined"); + const [i, t] = n.acrossClue ? [n.acrossClue, n.acrossClueLetterIndex] : [n.downClue, n.downClueLetterIndex], l = i.answer[t], o = i.solution ? i.solution[t] : void 0, u = Pe( + !(l === o || l === " "), + l === " " || l === void 0 + ); + return u === T.incorrect && r && Vn(e.incorrectElement(n)), u; +} +function ti(e, n, r = !0) { + d(e, " is null or undefined"), d(n, " is null or undefined"), x(`testClue: '${n}'`); + let i = 0, t = 0; + return n.headSegment.flatCells.forEach((l) => { + const o = Ue(e, l, r); + o === T.incorrect ? i += 1 : o === T.incomplete && (t += 1); + }), Pe(i > 0, t > 0); +} +function li(e, n = !0) { + d(e, " is null or undefined"); + let r = 0, i = 0; + return e.model.lightCells.forEach((t) => { + const l = Ue(e, t, n); + l === T.incorrect ? r += 1 : l === T.incomplete && (i += 1); + }), Pe(r > 0, i > 0); +} +function oi(e) { + d(e, " is null or undefined"); + let n = 0, r = 0; + const i = !1; + return e.model.lightCells.find((t) => { + const l = Ue(e, t, i); + if (l === T.incorrect) + return n += 1, !0; + if (l === T.incomplete) + return r += 1, !0; + }), Pe(n > 0, r > 0); +} +function Ye(e, n, r, i = !0) { + d(e, " is null or undefined"), d( + (n == null ? void 0 : n.acrossClue) || (n == null ? void 0 : n.downClue), + "cell is null or not part of a clue" + ), d((r == null ? void 0 : r.length) === 1, "newText must be a single character"); + function t(l, o) { + let u = l; + u.answer = oe(u.answer, o, r), i && (u.revealed = oe(u.revealed, o, r)); + } + if (n.acrossClue) { + let l = n.acrossClue; + const o = n.acrossClueLetterIndex; + t(l, o); + } + if (n.downClue) { + let l = n.downClue; + const o = n.downClueLetterIndex; + t(l, o); + } + e.inputElement(n).value = r; +} +function qn(e, n, r = !1) { + d(e, " is null or undefined"), d(n, " is null or undefined"), Ye(e, n, " "), ue(e.incorrectElement(n)), r && ue(e.revealedElement(n)); +} +function ui(e, n) { + d(e, " is null or undefined"), d(n, " is null or undefined"), x(`resetClue: '${n}'`), n.headSegment.flatCells.forEach((r) => { + qn(e, r); + }); +} +function si(e) { + d(e, " is null or undefined"), e.model.lightCells.forEach((n) => { + qn(e, n, !0); + }); +} +function Gn(e, n) { + d(e, " is null or undefined"), d(n, " is null or undefined"); + const r = Ue(e, n) === T.incorrect; + r && (Ye(e, n, " ", r), ue(e.incorrectElement(n))); +} +function ci(e, n) { + d(e, " is null or undefined"), d(n, " is null or undefined"), x(`cleanClue: '${n}'`), n.headSegment.flatCells.forEach((r) => { + Gn(e, r); + }); +} +function ai(e) { + x("cleanCrossword"), d(e, " is null or undefined"), e.model.lightCells.forEach((n) => { + Gn(e, n); + }); +} +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +function Wn(e) { + return typeof e > "u" || e === null; +} +function fi(e) { + return typeof e == "object" && e !== null; +} +function di(e) { + return Array.isArray(e) ? e : Wn(e) ? [] : [e]; +} +function hi(e, n) { + var r, i, t, l; + if (n) + for (l = Object.keys(n), r = 0, i = l.length; r < i; r += 1) + t = l[r], e[t] = n[t]; + return e; +} +function pi(e, n) { + var r = "", i; + for (i = 0; i < n; i += 1) + r += e; + return r; +} +function mi(e) { + return e === 0 && Number.NEGATIVE_INFINITY === 1 / e; +} +var gi = Wn, xi = fi, Ci = di, wi = pi, vi = mi, yi = hi, S = { + isNothing: gi, + isObject: xi, + toArray: Ci, + repeat: wi, + isNegativeZero: vi, + extend: yi +}; +function zn(e, n) { + var r = "", i = e.reason || "(unknown reason)"; + return e.mark ? (e.mark.name && (r += 'in "' + e.mark.name + '" '), r += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !n && e.mark.snippet && (r += ` + +` + e.mark.snippet), i + " " + r) : i; +} +function de(e, n) { + Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = n, this.message = zn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; +} +de.prototype = Object.create(Error.prototype); +de.prototype.constructor = de; +de.prototype.toString = function(n) { + return this.name + ": " + zn(this, n); +}; +var I = de; +function qe(e, n, r, i, t) { + var l = "", o = "", u = Math.floor(t / 2) - 1; + return i - n > u && (l = " ... ", n = i - u + l.length), r - i > u && (o = " ...", r = i + u - o.length), { + str: l + e.slice(n, r).replace(/\t/g, "→") + o, + pos: i - n + l.length + // relative position + }; +} +function Ge(e, n) { + return S.repeat(" ", n - e.length) + e; +} +function Ei(e, n) { + if (n = Object.create(n || null), !e.buffer) + return null; + n.maxLength || (n.maxLength = 79), typeof n.indent != "number" && (n.indent = 1), typeof n.linesBefore != "number" && (n.linesBefore = 3), typeof n.linesAfter != "number" && (n.linesAfter = 2); + for (var r = /\r?\n|\r|\0/g, i = [0], t = [], l, o = -1; l = r.exec(e.buffer); ) + t.push(l.index), i.push(l.index + l[0].length), e.position <= l.index && o < 0 && (o = i.length - 2); + o < 0 && (o = i.length - 1); + var u = "", s, c, f = Math.min(e.line + n.linesAfter, t.length).toString().length, a = n.maxLength - (n.indent + f + 3); + for (s = 1; s <= n.linesBefore && !(o - s < 0); s++) + c = qe( + e.buffer, + i[o - s], + t[o - s], + e.position - (i[o] - i[o - s]), + a + ), u = S.repeat(" ", n.indent) + Ge((e.line - s + 1).toString(), f) + " | " + c.str + ` +` + u; + for (c = qe(e.buffer, i[o], t[o], e.position, a), u += S.repeat(" ", n.indent) + Ge((e.line + 1).toString(), f) + " | " + c.str + ` +`, u += S.repeat("-", n.indent + f + 3 + c.pos) + `^ +`, s = 1; s <= n.linesAfter && !(o + s >= t.length); s++) + c = qe( + e.buffer, + i[o + s], + t[o + s], + e.position - (i[o] - i[o + s]), + a + ), u += S.repeat(" ", n.indent) + Ge((e.line + s + 1).toString(), f) + " | " + c.str + ` +`; + return u.replace(/\n$/, ""); +} +var Ai = Ei, bi = [ + "kind", + "multi", + "resolve", + "construct", + "instanceOf", + "predicate", + "represent", + "representName", + "defaultStyle", + "styleAliases" +], Si = [ + "scalar", + "sequence", + "mapping" +]; +function _i(e) { + var n = {}; + return e !== null && Object.keys(e).forEach(function(r) { + e[r].forEach(function(i) { + n[String(i)] = r; + }); + }), n; +} +function Ti(e, n) { + if (n = n || {}, Object.keys(n).forEach(function(r) { + if (bi.indexOf(r) === -1) + throw new I('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.'); + }), this.options = n, this.tag = e, this.kind = n.kind || null, this.resolve = n.resolve || function() { + return !0; + }, this.construct = n.construct || function(r) { + return r; + }, this.instanceOf = n.instanceOf || null, this.predicate = n.predicate || null, this.represent = n.represent || null, this.representName = n.representName || null, this.defaultStyle = n.defaultStyle || null, this.multi = n.multi || !1, this.styleAliases = _i(n.styleAliases || null), Si.indexOf(this.kind) === -1) + throw new I('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.'); +} +var _ = Ti; +function mn(e, n) { + var r = []; + return e[n].forEach(function(i) { + var t = r.length; + r.forEach(function(l, o) { + l.tag === i.tag && l.kind === i.kind && l.multi === i.multi && (t = o); + }), r[t] = i; + }), r; +} +function Li() { + var e = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, n, r; + function i(t) { + t.multi ? (e.multi[t.kind].push(t), e.multi.fallback.push(t)) : e[t.kind][t.tag] = e.fallback[t.tag] = t; + } + for (n = 0, r = arguments.length; n < r; n += 1) + arguments[n].forEach(i); + return e; +} +function ze(e) { + return this.extend(e); +} +ze.prototype.extend = function(n) { + var r = [], i = []; + if (n instanceof _) + i.push(n); + else if (Array.isArray(n)) + i = i.concat(n); + else if (n && (Array.isArray(n.implicit) || Array.isArray(n.explicit))) + n.implicit && (r = r.concat(n.implicit)), n.explicit && (i = i.concat(n.explicit)); + else + throw new I("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); + r.forEach(function(l) { + if (!(l instanceof _)) + throw new I("Specified list of YAML types (or a single Type object) contains a non-Type object."); + if (l.loadKind && l.loadKind !== "scalar") + throw new I("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); + if (l.multi) + throw new I("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); + }), i.forEach(function(l) { + if (!(l instanceof _)) + throw new I("Specified list of YAML types (or a single Type object) contains a non-Type object."); + }); + var t = Object.create(ze.prototype); + return t.implicit = (this.implicit || []).concat(r), t.explicit = (this.explicit || []).concat(i), t.compiledImplicit = mn(t, "implicit"), t.compiledExplicit = mn(t, "explicit"), t.compiledTypeMap = Li(t.compiledImplicit, t.compiledExplicit), t; +}; +var Qn = ze, Xn = new _("tag:yaml.org,2002:str", { + kind: "scalar", + construct: function(e) { + return e !== null ? e : ""; + } +}), Zn = new _("tag:yaml.org,2002:seq", { + kind: "sequence", + construct: function(e) { + return e !== null ? e : []; + } +}), Jn = new _("tag:yaml.org,2002:map", { + kind: "mapping", + construct: function(e) { + return e !== null ? e : {}; + } +}), er = new Qn({ + explicit: [ + Xn, + Zn, + Jn + ] +}); +function ki(e) { + if (e === null) + return !0; + var n = e.length; + return n === 1 && e === "~" || n === 4 && (e === "null" || e === "Null" || e === "NULL"); +} +function Ii() { + return null; +} +function Fi(e) { + return e === null; +} +var nr = new _("tag:yaml.org,2002:null", { + kind: "scalar", + resolve: ki, + construct: Ii, + predicate: Fi, + represent: { + canonical: function() { + return "~"; + }, + lowercase: function() { + return "null"; + }, + uppercase: function() { + return "NULL"; + }, + camelcase: function() { + return "Null"; + }, + empty: function() { + return ""; + } + }, + defaultStyle: "lowercase" +}); +function Oi(e) { + if (e === null) + return !1; + var n = e.length; + return n === 4 && (e === "true" || e === "True" || e === "TRUE") || n === 5 && (e === "false" || e === "False" || e === "FALSE"); +} +function Ni(e) { + return e === "true" || e === "True" || e === "TRUE"; +} +function $i(e) { + return Object.prototype.toString.call(e) === "[object Boolean]"; +} +var rr = new _("tag:yaml.org,2002:bool", { + kind: "scalar", + resolve: Oi, + construct: Ni, + predicate: $i, + represent: { + lowercase: function(e) { + return e ? "true" : "false"; + }, + uppercase: function(e) { + return e ? "TRUE" : "FALSE"; + }, + camelcase: function(e) { + return e ? "True" : "False"; + } + }, + defaultStyle: "lowercase" +}); +function Ri(e) { + return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102; +} +function Di(e) { + return 48 <= e && e <= 55; +} +function Mi(e) { + return 48 <= e && e <= 57; +} +function Bi(e) { + if (e === null) + return !1; + var n = e.length, r = 0, i = !1, t; + if (!n) + return !1; + if (t = e[r], (t === "-" || t === "+") && (t = e[++r]), t === "0") { + if (r + 1 === n) + return !0; + if (t = e[++r], t === "b") { + for (r++; r < n; r++) + if (t = e[r], t !== "_") { + if (t !== "0" && t !== "1") + return !1; + i = !0; + } + return i && t !== "_"; + } + if (t === "x") { + for (r++; r < n; r++) + if (t = e[r], t !== "_") { + if (!Ri(e.charCodeAt(r))) + return !1; + i = !0; + } + return i && t !== "_"; + } + if (t === "o") { + for (r++; r < n; r++) + if (t = e[r], t !== "_") { + if (!Di(e.charCodeAt(r))) + return !1; + i = !0; + } + return i && t !== "_"; + } + } + if (t === "_") + return !1; + for (; r < n; r++) + if (t = e[r], t !== "_") { + if (!Mi(e.charCodeAt(r))) + return !1; + i = !0; + } + return !(!i || t === "_"); +} +function Hi(e) { + var n = e, r = 1, i; + if (n.indexOf("_") !== -1 && (n = n.replace(/_/g, "")), i = n[0], (i === "-" || i === "+") && (i === "-" && (r = -1), n = n.slice(1), i = n[0]), n === "0") + return 0; + if (i === "0") { + if (n[1] === "b") + return r * parseInt(n.slice(2), 2); + if (n[1] === "x") + return r * parseInt(n.slice(2), 16); + if (n[1] === "o") + return r * parseInt(n.slice(2), 8); + } + return r * parseInt(n, 10); +} +function ji(e) { + return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !S.isNegativeZero(e); +} +var ir = new _("tag:yaml.org,2002:int", { + kind: "scalar", + resolve: Bi, + construct: Hi, + predicate: ji, + represent: { + binary: function(e) { + return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1); + }, + octal: function(e) { + return e >= 0 ? "0o" + e.toString(8) : "-0o" + e.toString(8).slice(1); + }, + decimal: function(e) { + return e.toString(10); + }, + /* eslint-disable max-len */ + hexadecimal: function(e) { + return e >= 0 ? "0x" + e.toString(16).toUpperCase() : "-0x" + e.toString(16).toUpperCase().slice(1); + } + }, + defaultStyle: "decimal", + styleAliases: { + binary: [2, "bin"], + octal: [8, "oct"], + decimal: [10, "dec"], + hexadecimal: [16, "hex"] + } +}), Pi = new RegExp( + // 2.5e4, 2.5 and integers + "^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$" +); +function Ui(e) { + return !(e === null || !Pi.test(e) || // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + e[e.length - 1] === "_"); +} +function Yi(e) { + var n, r; + return n = e.replace(/_/g, "").toLowerCase(), r = n[0] === "-" ? -1 : 1, "+-".indexOf(n[0]) >= 0 && (n = n.slice(1)), n === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n === ".nan" ? NaN : r * parseFloat(n, 10); +} +var Ki = /^[-+]?[0-9]+e/; +function Vi(e, n) { + var r; + if (isNaN(e)) + switch (n) { + case "lowercase": + return ".nan"; + case "uppercase": + return ".NAN"; + case "camelcase": + return ".NaN"; + } + else if (Number.POSITIVE_INFINITY === e) + switch (n) { + case "lowercase": + return ".inf"; + case "uppercase": + return ".INF"; + case "camelcase": + return ".Inf"; + } + else if (Number.NEGATIVE_INFINITY === e) + switch (n) { + case "lowercase": + return "-.inf"; + case "uppercase": + return "-.INF"; + case "camelcase": + return "-.Inf"; + } + else if (S.isNegativeZero(e)) + return "-0.0"; + return r = e.toString(10), Ki.test(r) ? r.replace("e", ".e") : r; +} +function qi(e) { + return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || S.isNegativeZero(e)); +} +var tr = new _("tag:yaml.org,2002:float", { + kind: "scalar", + resolve: Ui, + construct: Yi, + predicate: qi, + represent: Vi, + defaultStyle: "lowercase" +}), lr = er.extend({ + implicit: [ + nr, + rr, + ir, + tr + ] +}), or = lr, ur = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" +), sr = new RegExp( + "^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$" +); +function Gi(e) { + return e === null ? !1 : ur.exec(e) !== null || sr.exec(e) !== null; +} +function Wi(e) { + var n, r, i, t, l, o, u, s = 0, c = null, f, a, m; + if (n = ur.exec(e), n === null && (n = sr.exec(e)), n === null) + throw new Error("Date resolve error"); + if (r = +n[1], i = +n[2] - 1, t = +n[3], !n[4]) + return new Date(Date.UTC(r, i, t)); + if (l = +n[4], o = +n[5], u = +n[6], n[7]) { + for (s = n[7].slice(0, 3); s.length < 3; ) + s += "0"; + s = +s; + } + return n[9] && (f = +n[10], a = +(n[11] || 0), c = (f * 60 + a) * 6e4, n[9] === "-" && (c = -c)), m = new Date(Date.UTC(r, i, t, l, o, u, s)), c && m.setTime(m.getTime() - c), m; +} +function zi(e) { + return e.toISOString(); +} +var cr = new _("tag:yaml.org,2002:timestamp", { + kind: "scalar", + resolve: Gi, + construct: Wi, + instanceOf: Date, + represent: zi +}); +function Qi(e) { + return e === "<<" || e === null; +} +var ar = new _("tag:yaml.org,2002:merge", { + kind: "scalar", + resolve: Qi +}), tn = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`; +function Xi(e) { + if (e === null) + return !1; + var n, r, i = 0, t = e.length, l = tn; + for (r = 0; r < t; r++) + if (n = l.indexOf(e.charAt(r)), !(n > 64)) { + if (n < 0) + return !1; + i += 6; + } + return i % 8 === 0; +} +function Zi(e) { + var n, r, i = e.replace(/[\r\n=]/g, ""), t = i.length, l = tn, o = 0, u = []; + for (n = 0; n < t; n++) + n % 4 === 0 && n && (u.push(o >> 16 & 255), u.push(o >> 8 & 255), u.push(o & 255)), o = o << 6 | l.indexOf(i.charAt(n)); + return r = t % 4 * 6, r === 0 ? (u.push(o >> 16 & 255), u.push(o >> 8 & 255), u.push(o & 255)) : r === 18 ? (u.push(o >> 10 & 255), u.push(o >> 2 & 255)) : r === 12 && u.push(o >> 4 & 255), new Uint8Array(u); +} +function Ji(e) { + var n = "", r = 0, i, t, l = e.length, o = tn; + for (i = 0; i < l; i++) + i % 3 === 0 && i && (n += o[r >> 18 & 63], n += o[r >> 12 & 63], n += o[r >> 6 & 63], n += o[r & 63]), r = (r << 8) + e[i]; + return t = l % 3, t === 0 ? (n += o[r >> 18 & 63], n += o[r >> 12 & 63], n += o[r >> 6 & 63], n += o[r & 63]) : t === 2 ? (n += o[r >> 10 & 63], n += o[r >> 4 & 63], n += o[r << 2 & 63], n += o[64]) : t === 1 && (n += o[r >> 2 & 63], n += o[r << 4 & 63], n += o[64], n += o[64]), n; +} +function et(e) { + return Object.prototype.toString.call(e) === "[object Uint8Array]"; +} +var fr = new _("tag:yaml.org,2002:binary", { + kind: "scalar", + resolve: Xi, + construct: Zi, + predicate: et, + represent: Ji +}), nt = Object.prototype.hasOwnProperty, rt = Object.prototype.toString; +function it(e) { + if (e === null) + return !0; + var n = [], r, i, t, l, o, u = e; + for (r = 0, i = u.length; r < i; r += 1) { + if (t = u[r], o = !1, rt.call(t) !== "[object Object]") + return !1; + for (l in t) + if (nt.call(t, l)) + if (!o) + o = !0; + else + return !1; + if (!o) + return !1; + if (n.indexOf(l) === -1) + n.push(l); + else + return !1; + } + return !0; +} +function tt(e) { + return e !== null ? e : []; +} +var dr = new _("tag:yaml.org,2002:omap", { + kind: "sequence", + resolve: it, + construct: tt +}), lt = Object.prototype.toString; +function ot(e) { + if (e === null) + return !0; + var n, r, i, t, l, o = e; + for (l = new Array(o.length), n = 0, r = o.length; n < r; n += 1) { + if (i = o[n], lt.call(i) !== "[object Object]" || (t = Object.keys(i), t.length !== 1)) + return !1; + l[n] = [t[0], i[t[0]]]; + } + return !0; +} +function ut(e) { + if (e === null) + return []; + var n, r, i, t, l, o = e; + for (l = new Array(o.length), n = 0, r = o.length; n < r; n += 1) + i = o[n], t = Object.keys(i), l[n] = [t[0], i[t[0]]]; + return l; +} +var hr = new _("tag:yaml.org,2002:pairs", { + kind: "sequence", + resolve: ot, + construct: ut +}), st = Object.prototype.hasOwnProperty; +function ct(e) { + if (e === null) + return !0; + var n, r = e; + for (n in r) + if (st.call(r, n) && r[n] !== null) + return !1; + return !0; +} +function at(e) { + return e !== null ? e : {}; +} +var pr = new _("tag:yaml.org,2002:set", { + kind: "mapping", + resolve: ct, + construct: at +}), ln = or.extend({ + implicit: [ + cr, + ar + ], + explicit: [ + fr, + dr, + hr, + pr + ] +}), K = Object.prototype.hasOwnProperty, Ie = 1, mr = 2, gr = 3, Fe = 4, We = 1, ft = 2, gn = 3, dt = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ht = /[\x85\u2028\u2029]/, pt = /[,\[\]\{\}]/, xr = /^(?:!|!!|![a-z\-]+!)$/i, Cr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; +function xn(e) { + return Object.prototype.toString.call(e); +} +function B(e) { + return e === 10 || e === 13; +} +function Q(e) { + return e === 9 || e === 32; +} +function O(e) { + return e === 9 || e === 32 || e === 10 || e === 13; +} +function ne(e) { + return e === 44 || e === 91 || e === 93 || e === 123 || e === 125; +} +function mt(e) { + var n; + return 48 <= e && e <= 57 ? e - 48 : (n = e | 32, 97 <= n && n <= 102 ? n - 97 + 10 : -1); +} +function gt(e) { + return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0; +} +function xt(e) { + return 48 <= e && e <= 57 ? e - 48 : -1; +} +function Cn(e) { + return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? ` +` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "…" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : ""; +} +function Ct(e) { + return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode( + (e - 65536 >> 10) + 55296, + (e - 65536 & 1023) + 56320 + ); +} +var wr = new Array(256), vr = new Array(256); +for (var Z = 0; Z < 256; Z++) + wr[Z] = Cn(Z) ? 1 : 0, vr[Z] = Cn(Z); +function wt(e, n) { + this.input = e, this.filename = n.filename || null, this.schema = n.schema || ln, this.onWarning = n.onWarning || null, this.legacy = n.legacy || !1, this.json = n.json || !1, this.listener = n.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = []; +} +function yr(e, n) { + var r = { + name: e.filename, + buffer: e.input.slice(0, -1), + // omit trailing \0 + position: e.position, + line: e.line, + column: e.position - e.lineStart + }; + return r.snippet = Ai(r), new I(n, r); +} +function h(e, n) { + throw yr(e, n); +} +function Oe(e, n) { + e.onWarning && e.onWarning.call(null, yr(e, n)); +} +var wn = { + YAML: function(n, r, i) { + var t, l, o; + n.version !== null && h(n, "duplication of %YAML directive"), i.length !== 1 && h(n, "YAML directive accepts exactly one argument"), t = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), t === null && h(n, "ill-formed argument of the YAML directive"), l = parseInt(t[1], 10), o = parseInt(t[2], 10), l !== 1 && h(n, "unacceptable YAML version of the document"), n.version = i[0], n.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Oe(n, "unsupported YAML version of the document"); + }, + TAG: function(n, r, i) { + var t, l; + i.length !== 2 && h(n, "TAG directive accepts exactly two arguments"), t = i[0], l = i[1], xr.test(t) || h(n, "ill-formed tag handle (first argument) of the TAG directive"), K.call(n.tagMap, t) && h(n, 'there is a previously declared suffix for "' + t + '" tag handle'), Cr.test(l) || h(n, "ill-formed tag prefix (second argument) of the TAG directive"); + try { + l = decodeURIComponent(l); + } catch { + h(n, "tag prefix is malformed: " + l); + } + n.tagMap[t] = l; + } +}; +function Y(e, n, r, i) { + var t, l, o, u; + if (n < r) { + if (u = e.input.slice(n, r), i) + for (t = 0, l = u.length; t < l; t += 1) + o = u.charCodeAt(t), o === 9 || 32 <= o && o <= 1114111 || h(e, "expected valid JSON character"); + else + dt.test(u) && h(e, "the stream contains non-printable characters"); + e.result += u; + } +} +function vn(e, n, r, i) { + var t, l, o, u; + for (S.isObject(r) || h(e, "cannot merge mappings; the provided source object is unacceptable"), t = Object.keys(r), o = 0, u = t.length; o < u; o += 1) + l = t[o], K.call(n, l) || (n[l] = r[l], i[l] = !0); +} +function re(e, n, r, i, t, l, o, u, s) { + var c, f; + if (Array.isArray(t)) + for (t = Array.prototype.slice.call(t), c = 0, f = t.length; c < f; c += 1) + Array.isArray(t[c]) && h(e, "nested arrays are not supported inside keys"), typeof t == "object" && xn(t[c]) === "[object Object]" && (t[c] = "[object Object]"); + if (typeof t == "object" && xn(t) === "[object Object]" && (t = "[object Object]"), t = String(t), n === null && (n = {}), i === "tag:yaml.org,2002:merge") + if (Array.isArray(l)) + for (c = 0, f = l.length; c < f; c += 1) + vn(e, n, l[c], r); + else + vn(e, n, l, r); + else + !e.json && !K.call(r, t) && K.call(n, t) && (e.line = o || e.line, e.lineStart = u || e.lineStart, e.position = s || e.position, h(e, "duplicated mapping key")), t === "__proto__" ? Object.defineProperty(n, t, { + configurable: !0, + enumerable: !0, + writable: !0, + value: l + }) : n[t] = l, delete r[t]; + return n; +} +function on(e) { + var n; + n = e.input.charCodeAt(e.position), n === 10 ? e.position++ : n === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : h(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1; +} +function b(e, n, r) { + for (var i = 0, t = e.input.charCodeAt(e.position); t !== 0; ) { + for (; Q(t); ) + t === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), t = e.input.charCodeAt(++e.position); + if (n && t === 35) + do + t = e.input.charCodeAt(++e.position); + while (t !== 10 && t !== 13 && t !== 0); + if (B(t)) + for (on(e), t = e.input.charCodeAt(e.position), i++, e.lineIndent = 0; t === 32; ) + e.lineIndent++, t = e.input.charCodeAt(++e.position); + else + break; + } + return r !== -1 && i !== 0 && e.lineIndent < r && Oe(e, "deficient indentation"), i; +} +function Ke(e) { + var n = e.position, r; + return r = e.input.charCodeAt(n), !!((r === 45 || r === 46) && r === e.input.charCodeAt(n + 1) && r === e.input.charCodeAt(n + 2) && (n += 3, r = e.input.charCodeAt(n), r === 0 || O(r))); +} +function un(e, n) { + n === 1 ? e.result += " " : n > 1 && (e.result += S.repeat(` +`, n - 1)); +} +function vt(e, n, r) { + var i, t, l, o, u, s, c, f, a = e.kind, m = e.result, g; + if (g = e.input.charCodeAt(e.position), O(g) || ne(g) || g === 35 || g === 38 || g === 42 || g === 33 || g === 124 || g === 62 || g === 39 || g === 34 || g === 37 || g === 64 || g === 96 || (g === 63 || g === 45) && (t = e.input.charCodeAt(e.position + 1), O(t) || r && ne(t))) + return !1; + for (e.kind = "scalar", e.result = "", l = o = e.position, u = !1; g !== 0; ) { + if (g === 58) { + if (t = e.input.charCodeAt(e.position + 1), O(t) || r && ne(t)) + break; + } else if (g === 35) { + if (i = e.input.charCodeAt(e.position - 1), O(i)) + break; + } else { + if (e.position === e.lineStart && Ke(e) || r && ne(g)) + break; + if (B(g)) + if (s = e.line, c = e.lineStart, f = e.lineIndent, b(e, !1, -1), e.lineIndent >= n) { + u = !0, g = e.input.charCodeAt(e.position); + continue; + } else { + e.position = o, e.line = s, e.lineStart = c, e.lineIndent = f; + break; + } + } + u && (Y(e, l, o, !1), un(e, e.line - s), l = o = e.position, u = !1), Q(g) || (o = e.position + 1), g = e.input.charCodeAt(++e.position); + } + return Y(e, l, o, !1), e.result ? !0 : (e.kind = a, e.result = m, !1); +} +function yt(e, n) { + var r, i, t; + if (r = e.input.charCodeAt(e.position), r !== 39) + return !1; + for (e.kind = "scalar", e.result = "", e.position++, i = t = e.position; (r = e.input.charCodeAt(e.position)) !== 0; ) + if (r === 39) + if (Y(e, i, e.position, !0), r = e.input.charCodeAt(++e.position), r === 39) + i = e.position, e.position++, t = e.position; + else + return !0; + else + B(r) ? (Y(e, i, t, !0), un(e, b(e, !1, n)), i = t = e.position) : e.position === e.lineStart && Ke(e) ? h(e, "unexpected end of the document within a single quoted scalar") : (e.position++, t = e.position); + h(e, "unexpected end of the stream within a single quoted scalar"); +} +function Et(e, n) { + var r, i, t, l, o, u; + if (u = e.input.charCodeAt(e.position), u !== 34) + return !1; + for (e.kind = "scalar", e.result = "", e.position++, r = i = e.position; (u = e.input.charCodeAt(e.position)) !== 0; ) { + if (u === 34) + return Y(e, r, e.position, !0), e.position++, !0; + if (u === 92) { + if (Y(e, r, e.position, !0), u = e.input.charCodeAt(++e.position), B(u)) + b(e, !1, n); + else if (u < 256 && wr[u]) + e.result += vr[u], e.position++; + else if ((o = gt(u)) > 0) { + for (t = o, l = 0; t > 0; t--) + u = e.input.charCodeAt(++e.position), (o = mt(u)) >= 0 ? l = (l << 4) + o : h(e, "expected hexadecimal character"); + e.result += Ct(l), e.position++; + } else + h(e, "unknown escape sequence"); + r = i = e.position; + } else + B(u) ? (Y(e, r, i, !0), un(e, b(e, !1, n)), r = i = e.position) : e.position === e.lineStart && Ke(e) ? h(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position); + } + h(e, "unexpected end of the stream within a double quoted scalar"); +} +function At(e, n) { + var r = !0, i, t, l, o = e.tag, u, s = e.anchor, c, f, a, m, g, C = /* @__PURE__ */ Object.create(null), y, A, N, w; + if (w = e.input.charCodeAt(e.position), w === 91) + f = 93, g = !1, u = []; + else if (w === 123) + f = 125, g = !0, u = {}; + else + return !1; + for (e.anchor !== null && (e.anchorMap[e.anchor] = u), w = e.input.charCodeAt(++e.position); w !== 0; ) { + if (b(e, !0, n), w = e.input.charCodeAt(e.position), w === f) + return e.position++, e.tag = o, e.anchor = s, e.kind = g ? "mapping" : "sequence", e.result = u, !0; + r ? w === 44 && h(e, "expected the node content, but found ','") : h(e, "missed comma between flow collection entries"), A = y = N = null, a = m = !1, w === 63 && (c = e.input.charCodeAt(e.position + 1), O(c) && (a = m = !0, e.position++, b(e, !0, n))), i = e.line, t = e.lineStart, l = e.position, se(e, n, Ie, !1, !0), A = e.tag, y = e.result, b(e, !0, n), w = e.input.charCodeAt(e.position), (m || e.line === i) && w === 58 && (a = !0, w = e.input.charCodeAt(++e.position), b(e, !0, n), se(e, n, Ie, !1, !0), N = e.result), g ? re(e, u, C, A, y, N, i, t, l) : a ? u.push(re(e, null, C, A, y, N, i, t, l)) : u.push(y), b(e, !0, n), w = e.input.charCodeAt(e.position), w === 44 ? (r = !0, w = e.input.charCodeAt(++e.position)) : r = !1; + } + h(e, "unexpected end of the stream within a flow collection"); +} +function bt(e, n) { + var r, i, t = We, l = !1, o = !1, u = n, s = 0, c = !1, f, a; + if (a = e.input.charCodeAt(e.position), a === 124) + i = !1; + else if (a === 62) + i = !0; + else + return !1; + for (e.kind = "scalar", e.result = ""; a !== 0; ) + if (a = e.input.charCodeAt(++e.position), a === 43 || a === 45) + We === t ? t = a === 43 ? gn : ft : h(e, "repeat of a chomping mode identifier"); + else if ((f = xt(a)) >= 0) + f === 0 ? h(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? h(e, "repeat of an indentation width identifier") : (u = n + f - 1, o = !0); + else + break; + if (Q(a)) { + do + a = e.input.charCodeAt(++e.position); + while (Q(a)); + if (a === 35) + do + a = e.input.charCodeAt(++e.position); + while (!B(a) && a !== 0); + } + for (; a !== 0; ) { + for (on(e), e.lineIndent = 0, a = e.input.charCodeAt(e.position); (!o || e.lineIndent < u) && a === 32; ) + e.lineIndent++, a = e.input.charCodeAt(++e.position); + if (!o && e.lineIndent > u && (u = e.lineIndent), B(a)) { + s++; + continue; + } + if (e.lineIndent < u) { + t === gn ? e.result += S.repeat(` +`, l ? 1 + s : s) : t === We && l && (e.result += ` +`); + break; + } + for (i ? Q(a) ? (c = !0, e.result += S.repeat(` +`, l ? 1 + s : s)) : c ? (c = !1, e.result += S.repeat(` +`, s + 1)) : s === 0 ? l && (e.result += " ") : e.result += S.repeat(` +`, s) : e.result += S.repeat(` +`, l ? 1 + s : s), l = !0, o = !0, s = 0, r = e.position; !B(a) && a !== 0; ) + a = e.input.charCodeAt(++e.position); + Y(e, r, e.position, !1); + } + return !0; +} +function yn(e, n) { + var r, i = e.tag, t = e.anchor, l = [], o, u = !1, s; + if (e.firstTabInLine !== -1) + return !1; + for (e.anchor !== null && (e.anchorMap[e.anchor] = l), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, h(e, "tab characters must not be used in indentation")), !(s !== 45 || (o = e.input.charCodeAt(e.position + 1), !O(o)))); ) { + if (u = !0, e.position++, b(e, !0, -1) && e.lineIndent <= n) { + l.push(null), s = e.input.charCodeAt(e.position); + continue; + } + if (r = e.line, se(e, n, gr, !1, !0), l.push(e.result), b(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === r || e.lineIndent > n) && s !== 0) + h(e, "bad indentation of a sequence entry"); + else if (e.lineIndent < n) + break; + } + return u ? (e.tag = i, e.anchor = t, e.kind = "sequence", e.result = l, !0) : !1; +} +function St(e, n, r) { + var i, t, l, o, u, s, c = e.tag, f = e.anchor, a = {}, m = /* @__PURE__ */ Object.create(null), g = null, C = null, y = null, A = !1, N = !1, w; + if (e.firstTabInLine !== -1) + return !1; + for (e.anchor !== null && (e.anchorMap[e.anchor] = a), w = e.input.charCodeAt(e.position); w !== 0; ) { + if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, h(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), l = e.line, (w === 63 || w === 58) && O(i)) + w === 63 ? (A && (re(e, a, m, g, C, null, o, u, s), g = C = y = null), N = !0, A = !0, t = !0) : A ? (A = !1, t = !0) : h(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, w = i; + else { + if (o = e.line, u = e.lineStart, s = e.position, !se(e, r, mr, !1, !0)) + break; + if (e.line === l) { + for (w = e.input.charCodeAt(e.position); Q(w); ) + w = e.input.charCodeAt(++e.position); + if (w === 58) + w = e.input.charCodeAt(++e.position), O(w) || h(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (re(e, a, m, g, C, null, o, u, s), g = C = y = null), N = !0, A = !1, t = !1, g = e.tag, C = e.result; + else if (N) + h(e, "can not read an implicit mapping pair; a colon is missed"); + else + return e.tag = c, e.anchor = f, !0; + } else if (N) + h(e, "can not read a block mapping entry; a multiline key may not be an implicit key"); + else + return e.tag = c, e.anchor = f, !0; + } + if ((e.line === l || e.lineIndent > n) && (A && (o = e.line, u = e.lineStart, s = e.position), se(e, n, Fe, !0, t) && (A ? C = e.result : y = e.result), A || (re(e, a, m, g, C, y, o, u, s), g = C = y = null), b(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === l || e.lineIndent > n) && w !== 0) + h(e, "bad indentation of a mapping entry"); + else if (e.lineIndent < n) + break; + } + return A && re(e, a, m, g, C, null, o, u, s), N && (e.tag = c, e.anchor = f, e.kind = "mapping", e.result = a), N; +} +function _t(e) { + var n, r = !1, i = !1, t, l, o; + if (o = e.input.charCodeAt(e.position), o !== 33) + return !1; + if (e.tag !== null && h(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (r = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (i = !0, t = "!!", o = e.input.charCodeAt(++e.position)) : t = "!", n = e.position, r) { + do + o = e.input.charCodeAt(++e.position); + while (o !== 0 && o !== 62); + e.position < e.length ? (l = e.input.slice(n, e.position), o = e.input.charCodeAt(++e.position)) : h(e, "unexpected end of the stream within a verbatim tag"); + } else { + for (; o !== 0 && !O(o); ) + o === 33 && (i ? h(e, "tag suffix cannot contain exclamation marks") : (t = e.input.slice(n - 1, e.position + 1), xr.test(t) || h(e, "named tag handle cannot contain such characters"), i = !0, n = e.position + 1)), o = e.input.charCodeAt(++e.position); + l = e.input.slice(n, e.position), pt.test(l) && h(e, "tag suffix cannot contain flow indicator characters"); + } + l && !Cr.test(l) && h(e, "tag name cannot contain such characters: " + l); + try { + l = decodeURIComponent(l); + } catch { + h(e, "tag name is malformed: " + l); + } + return r ? e.tag = l : K.call(e.tagMap, t) ? e.tag = e.tagMap[t] + l : t === "!" ? e.tag = "!" + l : t === "!!" ? e.tag = "tag:yaml.org,2002:" + l : h(e, 'undeclared tag handle "' + t + '"'), !0; +} +function Tt(e) { + var n, r; + if (r = e.input.charCodeAt(e.position), r !== 38) + return !1; + for (e.anchor !== null && h(e, "duplication of an anchor property"), r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !O(r) && !ne(r); ) + r = e.input.charCodeAt(++e.position); + return e.position === n && h(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(n, e.position), !0; +} +function Lt(e) { + var n, r, i; + if (i = e.input.charCodeAt(e.position), i !== 42) + return !1; + for (i = e.input.charCodeAt(++e.position), n = e.position; i !== 0 && !O(i) && !ne(i); ) + i = e.input.charCodeAt(++e.position); + return e.position === n && h(e, "name of an alias node must contain at least one character"), r = e.input.slice(n, e.position), K.call(e.anchorMap, r) || h(e, 'unidentified alias "' + r + '"'), e.result = e.anchorMap[r], b(e, !0, -1), !0; +} +function se(e, n, r, i, t) { + var l, o, u, s = 1, c = !1, f = !1, a, m, g, C, y, A; + if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, l = o = u = Fe === r || gr === r, i && b(e, !0, -1) && (c = !0, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)), s === 1) + for (; _t(e) || Tt(e); ) + b(e, !0, -1) ? (c = !0, u = l, e.lineIndent > n ? s = 1 : e.lineIndent === n ? s = 0 : e.lineIndent < n && (s = -1)) : u = !1; + if (u && (u = c || t), (s === 1 || Fe === r) && (Ie === r || mr === r ? y = n : y = n + 1, A = e.position - e.lineStart, s === 1 ? u && (yn(e, A) || St(e, A, y)) || At(e, y) ? f = !0 : (o && bt(e, y) || yt(e, y) || Et(e, y) ? f = !0 : Lt(e) ? (f = !0, (e.tag !== null || e.anchor !== null) && h(e, "alias node should not have any properties")) : vt(e, y, Ie === r) && (f = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (f = u && yn(e, A))), e.tag === null) + e.anchor !== null && (e.anchorMap[e.anchor] = e.result); + else if (e.tag === "?") { + for (e.result !== null && e.kind !== "scalar" && h(e, 'unacceptable node kind for ! tag; it should be "scalar", not "' + e.kind + '"'), a = 0, m = e.implicitTypes.length; a < m; a += 1) + if (C = e.implicitTypes[a], C.resolve(e.result)) { + e.result = C.construct(e.result), e.tag = C.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result); + break; + } + } else if (e.tag !== "!") { + if (K.call(e.typeMap[e.kind || "fallback"], e.tag)) + C = e.typeMap[e.kind || "fallback"][e.tag]; + else + for (C = null, g = e.typeMap.multi[e.kind || "fallback"], a = 0, m = g.length; a < m; a += 1) + if (e.tag.slice(0, g[a].tag.length) === g[a].tag) { + C = g[a]; + break; + } + C || h(e, "unknown tag !<" + e.tag + ">"), e.result !== null && C.kind !== e.kind && h(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + C.kind + '", not "' + e.kind + '"'), C.resolve(e.result, e.tag) ? (e.result = C.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : h(e, "cannot resolve a node with !<" + e.tag + "> explicit tag"); + } + return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || f; +} +function kt(e) { + var n = e.position, r, i, t, l = !1, o; + for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (b(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) { + for (l = !0, o = e.input.charCodeAt(++e.position), r = e.position; o !== 0 && !O(o); ) + o = e.input.charCodeAt(++e.position); + for (i = e.input.slice(r, e.position), t = [], i.length < 1 && h(e, "directive name must not be less than one character in length"); o !== 0; ) { + for (; Q(o); ) + o = e.input.charCodeAt(++e.position); + if (o === 35) { + do + o = e.input.charCodeAt(++e.position); + while (o !== 0 && !B(o)); + break; + } + if (B(o)) + break; + for (r = e.position; o !== 0 && !O(o); ) + o = e.input.charCodeAt(++e.position); + t.push(e.input.slice(r, e.position)); + } + o !== 0 && on(e), K.call(wn, i) ? wn[i](e, i, t) : Oe(e, 'unknown document directive "' + i + '"'); + } + if (b(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, b(e, !0, -1)) : l && h(e, "directives end mark is expected"), se(e, e.lineIndent - 1, Fe, !1, !0), b(e, !0, -1), e.checkLineBreaks && ht.test(e.input.slice(n, e.position)) && Oe(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Ke(e)) { + e.input.charCodeAt(e.position) === 46 && (e.position += 3, b(e, !0, -1)); + return; + } + if (e.position < e.length - 1) + h(e, "end of the stream or a document separator is expected"); + else + return; +} +function Er(e, n) { + e = String(e), n = n || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += ` +`), e.charCodeAt(0) === 65279 && (e = e.slice(1))); + var r = new wt(e, n), i = e.indexOf("\0"); + for (i !== -1 && (r.position = i, h(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; ) + r.lineIndent += 1, r.position += 1; + for (; r.position < r.length - 1; ) + kt(r); + return r.documents; +} +function It(e, n, r) { + n !== null && typeof n == "object" && typeof r > "u" && (r = n, n = null); + var i = Er(e, r); + if (typeof n != "function") + return i; + for (var t = 0, l = i.length; t < l; t += 1) + n(i[t]); +} +function Ft(e, n) { + var r = Er(e, n); + if (r.length !== 0) { + if (r.length === 1) + return r[0]; + throw new I("expected a single document in the stream, but found more"); + } +} +var Ot = It, Nt = Ft, Ar = { + loadAll: Ot, + load: Nt +}, br = Object.prototype.toString, Sr = Object.prototype.hasOwnProperty, sn = 65279, $t = 9, he = 10, Rt = 13, Dt = 32, Mt = 33, Bt = 34, Qe = 35, Ht = 37, jt = 38, Pt = 39, Ut = 42, _r = 44, Yt = 45, Ne = 58, Kt = 61, Vt = 62, qt = 63, Gt = 64, Tr = 91, Lr = 93, Wt = 96, kr = 123, zt = 124, Ir = 125, L = {}; +L[0] = "\\0"; +L[7] = "\\a"; +L[8] = "\\b"; +L[9] = "\\t"; +L[10] = "\\n"; +L[11] = "\\v"; +L[12] = "\\f"; +L[13] = "\\r"; +L[27] = "\\e"; +L[34] = '\\"'; +L[92] = "\\\\"; +L[133] = "\\N"; +L[160] = "\\_"; +L[8232] = "\\L"; +L[8233] = "\\P"; +var Qt = [ + "y", + "Y", + "yes", + "Yes", + "YES", + "on", + "On", + "ON", + "n", + "N", + "no", + "No", + "NO", + "off", + "Off", + "OFF" +], Xt = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; +function Zt(e, n) { + var r, i, t, l, o, u, s; + if (n === null) + return {}; + for (r = {}, i = Object.keys(n), t = 0, l = i.length; t < l; t += 1) + o = i[t], u = String(n[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), s = e.compiledTypeMap.fallback[o], s && Sr.call(s.styleAliases, u) && (u = s.styleAliases[u]), r[o] = u; + return r; +} +function Jt(e) { + var n, r, i; + if (n = e.toString(16).toUpperCase(), e <= 255) + r = "x", i = 2; + else if (e <= 65535) + r = "u", i = 4; + else if (e <= 4294967295) + r = "U", i = 8; + else + throw new I("code point within a string may not be greater than 0xFFFFFFFF"); + return "\\" + r + S.repeat("0", i - n.length) + n; +} +var el = 1, pe = 2; +function nl(e) { + this.schema = e.schema || ln, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = S.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Zt(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? pe : el, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null; +} +function En(e, n) { + for (var r = S.repeat(" ", n), i = 0, t = -1, l = "", o, u = e.length; i < u; ) + t = e.indexOf(` +`, i), t === -1 ? (o = e.slice(i), i = u) : (o = e.slice(i, t + 1), i = t + 1), o.length && o !== ` +` && (l += r), l += o; + return l; +} +function Xe(e, n) { + return ` +` + S.repeat(" ", e.indent * n); +} +function rl(e, n) { + var r, i, t; + for (r = 0, i = e.implicitTypes.length; r < i; r += 1) + if (t = e.implicitTypes[r], t.resolve(n)) + return !0; + return !1; +} +function $e(e) { + return e === Dt || e === $t; +} +function me(e) { + return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== sn || 65536 <= e && e <= 1114111; +} +function An(e) { + return me(e) && e !== sn && e !== Rt && e !== he; +} +function bn(e, n, r) { + var i = An(e), t = i && !$e(e); + return ( + // ns-plain-safe + (r ? ( + // c = flow-in + i + ) : i && e !== _r && e !== Tr && e !== Lr && e !== kr && e !== Ir) && e !== Qe && !(n === Ne && !t) || An(n) && !$e(n) && e === Qe || n === Ne && t + ); +} +function il(e) { + return me(e) && e !== sn && !$e(e) && e !== Yt && e !== qt && e !== Ne && e !== _r && e !== Tr && e !== Lr && e !== kr && e !== Ir && e !== Qe && e !== jt && e !== Ut && e !== Mt && e !== zt && e !== Kt && e !== Vt && e !== Pt && e !== Bt && e !== Ht && e !== Gt && e !== Wt; +} +function tl(e) { + return !$e(e) && e !== Ne; +} +function ce(e, n) { + var r = e.charCodeAt(n), i; + return r >= 55296 && r <= 56319 && n + 1 < e.length && (i = e.charCodeAt(n + 1), i >= 56320 && i <= 57343) ? (r - 55296) * 1024 + i - 56320 + 65536 : r; +} +function Fr(e) { + var n = /^\n* /; + return n.test(e); +} +var Or = 1, Ze = 2, Nr = 3, $r = 4, J = 5; +function ll(e, n, r, i, t, l, o, u) { + var s, c = 0, f = null, a = !1, m = !1, g = i !== -1, C = -1, y = il(ce(e, 0)) && tl(ce(e, e.length - 1)); + if (n || o) + for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) { + if (c = ce(e, s), !me(c)) + return J; + y = y && bn(c, f, u), f = c; + } + else { + for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) { + if (c = ce(e, s), c === he) + a = !0, g && (m = m || // Foldable line = too long, and not more-indented. + s - C - 1 > i && e[C + 1] !== " ", C = s); + else if (!me(c)) + return J; + y = y && bn(c, f, u), f = c; + } + m = m || g && s - C - 1 > i && e[C + 1] !== " "; + } + return !a && !m ? y && !o && !t(e) ? Or : l === pe ? J : Ze : r > 9 && Fr(e) ? J : o ? l === pe ? J : Ze : m ? $r : Nr; +} +function ol(e, n, r, i, t) { + e.dump = function() { + if (n.length === 0) + return e.quotingType === pe ? '""' : "''"; + if (!e.noCompatMode && (Qt.indexOf(n) !== -1 || Xt.test(n))) + return e.quotingType === pe ? '"' + n + '"' : "'" + n + "'"; + var l = e.indent * Math.max(1, r), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - l), u = i || e.flowLevel > -1 && r >= e.flowLevel; + function s(c) { + return rl(e, c); + } + switch (ll( + n, + u, + e.indent, + o, + s, + e.quotingType, + e.forceQuotes && !i, + t + )) { + case Or: + return n; + case Ze: + return "'" + n.replace(/'/g, "''") + "'"; + case Nr: + return "|" + Sn(n, e.indent) + _n(En(n, l)); + case $r: + return ">" + Sn(n, e.indent) + _n(En(ul(n, o), l)); + case J: + return '"' + sl(n) + '"'; + default: + throw new I("impossible error: invalid scalar style"); + } + }(); +} +function Sn(e, n) { + var r = Fr(e) ? String(n) : "", i = e[e.length - 1] === ` +`, t = i && (e[e.length - 2] === ` +` || e === ` +`), l = t ? "+" : i ? "" : "-"; + return r + l + ` +`; +} +function _n(e) { + return e[e.length - 1] === ` +` ? e.slice(0, -1) : e; +} +function ul(e, n) { + for (var r = /(\n+)([^\n]*)/g, i = function() { + var c = e.indexOf(` +`); + return c = c !== -1 ? c : e.length, r.lastIndex = c, Tn(e.slice(0, c), n); + }(), t = e[0] === ` +` || e[0] === " ", l, o; o = r.exec(e); ) { + var u = o[1], s = o[2]; + l = s[0] === " ", i += u + (!t && !l && s !== "" ? ` +` : "") + Tn(s, n), t = l; + } + return i; +} +function Tn(e, n) { + if (e === "" || e[0] === " ") + return e; + for (var r = / [^ ]/g, i, t = 0, l, o = 0, u = 0, s = ""; i = r.exec(e); ) + u = i.index, u - t > n && (l = o > t ? o : u, s += ` +` + e.slice(t, l), t = l + 1), o = u; + return s += ` +`, e.length - t > n && o > t ? s += e.slice(t, o) + ` +` + e.slice(o + 1) : s += e.slice(t), s.slice(1); +} +function sl(e) { + for (var n = "", r = 0, i, t = 0; t < e.length; r >= 65536 ? t += 2 : t++) + r = ce(e, t), i = L[r], !i && me(r) ? (n += e[t], r >= 65536 && (n += e[t + 1])) : n += i || Jt(r); + return n; +} +function cl(e, n, r) { + var i = "", t = e.tag, l, o, u; + for (l = 0, o = r.length; l < o; l += 1) + u = r[l], e.replacer && (u = e.replacer.call(r, String(l), u)), (H(e, n, u, !1, !1) || typeof u > "u" && H(e, n, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump); + e.tag = t, e.dump = "[" + i + "]"; +} +function Ln(e, n, r, i) { + var t = "", l = e.tag, o, u, s; + for (o = 0, u = r.length; o < u; o += 1) + s = r[o], e.replacer && (s = e.replacer.call(r, String(o), s)), (H(e, n + 1, s, !0, !0, !1, !0) || typeof s > "u" && H(e, n + 1, null, !0, !0, !1, !0)) && ((!i || t !== "") && (t += Xe(e, n)), e.dump && he === e.dump.charCodeAt(0) ? t += "-" : t += "- ", t += e.dump); + e.tag = l, e.dump = t || "[]"; +} +function al(e, n, r) { + var i = "", t = e.tag, l = Object.keys(r), o, u, s, c, f; + for (o = 0, u = l.length; o < u; o += 1) + f = "", i !== "" && (f += ", "), e.condenseFlow && (f += '"'), s = l[o], c = r[s], e.replacer && (c = e.replacer.call(r, s, c)), H(e, n, s, !1, !1) && (e.dump.length > 1024 && (f += "? "), f += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), H(e, n, c, !1, !1) && (f += e.dump, i += f)); + e.tag = t, e.dump = "{" + i + "}"; +} +function fl(e, n, r, i) { + var t = "", l = e.tag, o = Object.keys(r), u, s, c, f, a, m; + if (e.sortKeys === !0) + o.sort(); + else if (typeof e.sortKeys == "function") + o.sort(e.sortKeys); + else if (e.sortKeys) + throw new I("sortKeys must be a boolean or a function"); + for (u = 0, s = o.length; u < s; u += 1) + m = "", (!i || t !== "") && (m += Xe(e, n)), c = o[u], f = r[c], e.replacer && (f = e.replacer.call(r, c, f)), H(e, n + 1, c, !0, !0, !0) && (a = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, a && (e.dump && he === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, a && (m += Xe(e, n)), H(e, n + 1, f, !0, a) && (e.dump && he === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, t += m)); + e.tag = l, e.dump = t || "{}"; +} +function kn(e, n, r) { + var i, t, l, o, u, s; + for (t = r ? e.explicitTypes : e.implicitTypes, l = 0, o = t.length; l < o; l += 1) + if (u = t[l], (u.instanceOf || u.predicate) && (!u.instanceOf || typeof n == "object" && n instanceof u.instanceOf) && (!u.predicate || u.predicate(n))) { + if (r ? u.multi && u.representName ? e.tag = u.representName(n) : e.tag = u.tag : e.tag = "?", u.represent) { + if (s = e.styleMap[u.tag] || u.defaultStyle, br.call(u.represent) === "[object Function]") + i = u.represent(n, s); + else if (Sr.call(u.represent, s)) + i = u.represent[s](n, s); + else + throw new I("!<" + u.tag + '> tag resolver accepts not "' + s + '" style'); + e.dump = i; + } + return !0; + } + return !1; +} +function H(e, n, r, i, t, l, o) { + e.tag = null, e.dump = r, kn(e, r, !1) || kn(e, r, !0); + var u = br.call(e.dump), s = i, c; + i && (i = e.flowLevel < 0 || e.flowLevel > n); + var f = u === "[object Object]" || u === "[object Array]", a, m; + if (f && (a = e.duplicates.indexOf(r), m = a !== -1), (e.tag !== null && e.tag !== "?" || m || e.indent !== 2 && n > 0) && (t = !1), m && e.usedDuplicates[a]) + e.dump = "*ref_" + a; + else { + if (f && m && !e.usedDuplicates[a] && (e.usedDuplicates[a] = !0), u === "[object Object]") + i && Object.keys(e.dump).length !== 0 ? (fl(e, n, e.dump, t), m && (e.dump = "&ref_" + a + e.dump)) : (al(e, n, e.dump), m && (e.dump = "&ref_" + a + " " + e.dump)); + else if (u === "[object Array]") + i && e.dump.length !== 0 ? (e.noArrayIndent && !o && n > 0 ? Ln(e, n - 1, e.dump, t) : Ln(e, n, e.dump, t), m && (e.dump = "&ref_" + a + e.dump)) : (cl(e, n, e.dump), m && (e.dump = "&ref_" + a + " " + e.dump)); + else if (u === "[object String]") + e.tag !== "?" && ol(e, e.dump, n, l, s); + else { + if (u === "[object Undefined]") + return !1; + if (e.skipInvalid) + return !1; + throw new I("unacceptable kind of an object to dump " + u); + } + e.tag !== null && e.tag !== "?" && (c = encodeURI( + e.tag[0] === "!" ? e.tag.slice(1) : e.tag + ).replace(/!/g, "%21"), e.tag[0] === "!" ? c = "!" + c : c.slice(0, 18) === "tag:yaml.org,2002:" ? c = "!!" + c.slice(18) : c = "!<" + c + ">", e.dump = c + " " + e.dump); + } + return !0; +} +function dl(e, n) { + var r = [], i = [], t, l; + for (Je(e, r, i), t = 0, l = i.length; t < l; t += 1) + n.duplicates.push(r[i[t]]); + n.usedDuplicates = new Array(l); +} +function Je(e, n, r) { + var i, t, l; + if (e !== null && typeof e == "object") + if (t = n.indexOf(e), t !== -1) + r.indexOf(t) === -1 && r.push(t); + else if (n.push(e), Array.isArray(e)) + for (t = 0, l = e.length; t < l; t += 1) + Je(e[t], n, r); + else + for (i = Object.keys(e), t = 0, l = i.length; t < l; t += 1) + Je(e[i[t]], n, r); +} +function hl(e, n) { + n = n || {}; + var r = new nl(n); + r.noRefs || dl(e, r); + var i = e; + return r.replacer && (i = r.replacer.call({ "": i }, "", i)), H(r, 0, i, !0, !0) ? r.dump + ` +` : ""; +} +var pl = hl, ml = { + dump: pl +}; +function cn(e, n) { + return function() { + throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + n + " instead, which is now safe by default."); + }; +} +var gl = _, xl = Qn, Cl = er, wl = lr, vl = or, yl = ln, El = Ar.load, Al = Ar.loadAll, bl = ml.dump, Sl = I, _l = { + binary: fr, + float: tr, + map: Jn, + null: nr, + pairs: hr, + set: pr, + timestamp: cr, + bool: rr, + int: ir, + merge: ar, + omap: dr, + seq: Zn, + str: Xn +}, Tl = cn("safeLoad", "load"), Ll = cn("safeLoadAll", "loadAll"), kl = cn("safeDump", "dump"), Il = { + Type: gl, + Schema: xl, + FAILSAFE_SCHEMA: Cl, + JSON_SCHEMA: wl, + CORE_SCHEMA: vl, + DEFAULT_SCHEMA: yl, + load: El, + loadAll: Al, + dump: bl, + YAMLException: Sl, + types: _l, + safeLoad: Tl, + safeLoadAll: Ll, + safeDump: kl +}; +const Fl = "LabelText.ClueText(LengthText)", Rr = /^\s*(.*?)\.(.*)\((.*)\)\s*$/, In = /^([^bce-z]*?)(\d+[ad]?)\s*(.*)/, Ol = /^\s*(.*?)\s*$/, Fn = /^([^a-z()\d]*?)(\d+)[\s.]*(.*)/, Nl = /(.*?)(\*\*.+?\*\*)(.*)$/, $l = /(.*?)(\*\*\*.+?\*\*\*)(.*)$/, Rl = /(.*?)(\*[^*]+?\*)(.*)$/, Dl = /(.*?)(__.+?__)(.*)$/, Ml = /(.*?)(___.+?___)(.*)$/, Bl = /(.*?)(_[^_]+?_)(.*)$/, Hl = [ + { + tag: "***", + regex: $l, + html: { open: '', close: "" } + }, + { + tag: "___", + regex: Ml, + html: { open: '', close: "" } + }, + { + tag: "**", + regex: Nl, + html: { open: '', close: "" } + }, + { + tag: "__", + regex: Dl, + html: { open: '', close: "" } + }, + { + tag: "*", + regex: Rl, + html: { open: '', close: "" } + }, + { + tag: "_", + regex: Bl, + html: { open: '', close: "" } + } +]; +function jl(e) { + let n = e; + return Hl.forEach((r) => { + let i, t, l = n; + if (r.regex.test(l)) { + let o = r.regex.exec(l); + for (n = ""; (o == null ? void 0 : o.length) === 4; ) + [, i, t, l] = o, t = t.replace(r.tag, r.html.open), t = t.replace(r.tag, r.html.close), n += i + t, o = r.regex.exec(l); + n += l; + } + }), n; +} +function Pl(e) { + const n = { x: 1, y: 1, clue: "1. Clue (1)" }, r = { answer: "", solution: "", revealed: "" }, i = Object.keys(n), t = Object.keys(r), l = Object.keys(e); + for (const u of i) + if (!l.includes(u)) + throw new Error(`'cdClue.${u}' is missing`); + for (const u of i) + if (typeof n[u] != typeof e[u]) + throw new Error( + `'cdClue.${u} (${e[u]})' must be a ${typeof n[u]}` + ); + for (const u of t) + if (l.includes(u) && typeof r[u] != typeof e[u]) + throw new Error( + `'cdClue.${u} (${e[u]})' must be a ${typeof r[u]}` + ); + const o = new Set(l); + for (const u of i) + o.delete(u); + for (const u of t) + o.delete(u); + if (o.size > 0) + throw new Error( + `'cdClue' has unexpected properties <${[...o].join(",")}>` + ); + if (!Rr.test(e.clue)) + throw new Error( + `Clue '${e.clue}' does not match the required pattern '${Fl}'` + ); +} +function Ul(e, n) { + if (e === void 0 || n === void 0) + throw new Error("'cdClue' and 'isAcrossClue' are required"); + if (e === null) + throw new Error("'cdClue' can't be null"); + if (n === null) + throw new Error("'isAcrossClue' can't be null"); + if (typeof n != "boolean") + throw new Error("'isAcrossClue' must be a boolean (true,false)"); +} +function Yl(e, n) { + let r = e.toLowerCase(), i = []; + for (; In.test(r); ) { + const [, , t, l] = In.exec(r); + i.push(t), r = l; + } + if (r) + throw new Error( + `'${n.clue}' Error in near <${r}>` + ); + return i; +} +function Kl(e) { + function n(t) { + return t.endsWith("a") ? "across" : t.endsWith("d") ? "down" : null; + } + let r = e.slice(1), i = []; + return r.length > 0 && (i = r.map((t) => ({ + headNumber: parseInt(t, 10), + direction: n(t) + }))), i; +} +function Vl(e, n) { + let r = [], i = e; + for (; Fn.test(i); ) { + const [, , t, l] = Fn.exec(i); + r.push(parseInt(t, 10)), i = l; + } + if (i) + throw new Error( + `'${n.clue}' Error in near <${i}>` + ); + return r; +} +const ql = (e, n) => { + const r = (t) => t ? "a" : "d"; + return /[ad]$/.test(e) ? e : e + r(n); +}; +function Gl(e, n) { + Ul(e, n), Pl(e); + const r = [], i = e.x - 1, t = e.y - 1, l = n, o = e.solution ? ( + // Strip out everything from solution except alphabetical characters + // DO NOT substitute spaces + e.solution.toUpperCase().replaceAll(/[^A-Z]/g, "") + ) : void 0, u = e.revealed ? ( + // string of upper-cased revealed characters + e.revealed.toUpperCase() + ) : void 0, [, s, c, f] = Rr.exec(e.clue), a = Yl(s, e), m = Kl(a), [g] = a, C = parseInt(g, 10), y = C.toString(), A = ql(g, l), [, N] = Ol.exec(c), w = jl(N), an = `(${f})`, fn = Vl(f, e), X = fn.reduce((Ur, Yr) => Ur + Yr, 0), Pr = e.answer ? e.answer.toUpperCase().replaceAll(/[^ A-Z]/g, " ").padEnd(X) : ( + // pad out null or undefined answer with spaces + "".padEnd(X) + ); + if (o && o.length !== X) + throw new Error( + `Length of clue solution '${o}' does not match the lengthText '${an}'` + ); + if (u && u.length !== X) + throw new Error( + `Length of clue revealed characters '${u}' does not match the lengthText: ${X}` + ); + return { + answer: Pr, + cells: r, + clueId: A, + clueText: w, + headNumber: C, + isAcross: l, + labelText: y, + lengthText: an, + revealed: u, + segmentLength: X, + solution: o, + tailDescriptors: m, + wordLengths: fn, + x: i, + y: t, + toString: () => `${A}` + }; +} +function Wl(e) { + if (x("newCrosswordModel"), !Dr(e)) + return x( + "newCrosswordModel: The model must be initialised with a valid crossword definition.", + "error" + ), null; + let n = Xl(e); + n.cells = zl(n); + const r = /across/i; + return ["acrossClues", "downClues"].forEach((i) => { + e[i].forEach( + no(n, r.test(i)) + ); + }), [...n.acrossClues, ...n.downClues].forEach( + io(n) + ), n.lightCells = n.cells.flat().filter((i) => i.light), ["acrossClues", "downClues"].forEach((i) => { + n[i].headSegments = n[i].filter( + (t) => t === t.headSegment + ); + }), n; +} +function zl(e) { + const { width: n } = e, { height: r } = e, i = new Array(n); + for (let t = 0; t < n; t += 1) { + i[t] = new Array(r); + for (let l = 0; l < r; l += 1) + i[t][l] = { + model: e, + x: t, + y: l, + toString: () => `${t},${l}` + }; + } + return i; +} +function Ql(e, n) { + if (e >= 0) { + let r = e, i = 0; + for (; i < n.length; ) { + const t = n[i]; + if (r < t) + return ( + // is a word terminator + r === t - 1 && // is not last word + i !== n.length - 1 + ); + r -= t, i += 1; + } + } + return !1; +} +function Xl(e) { + let n = { + width: e.width, + height: e.height, + acrossClues: [], + downClues: [], + cells: [] + }; + if (n.width === void 0 || n.width === null || n.width < 0 || n.height === void 0 || n.height === null || n.height < 0) + throw new Error("The crossword bounds are invalid."); + return n; +} +function Dr(e) { + var l, o; + const n = /^1\.0$/; + function r(u) { + return x(`validateCrosswordDefinition: ${u}`, "error"), !1; + } + function i(u) { + return u.toString().trim().toLowerCase(); + } + const t = e; + if (t) + if (t.document) + if ((l = t.document) != null && l.mimetype) { + const u = i(t.document.mimetype); + if (u !== "application/vnd.js-crossword") + return r( + `Unsupported "document.mimetype" (${u}) Expected: application/vnd.js-crossword` + ); + if ((o = t.document) != null && o.version) { + const s = i(t.document.version); + return n.test(s) ? !0 : r(`Unsupported document version (${s}) Expected: 1.0`); + } else + return r('Missing "document.mimetype" element'); + } else + return r('Missing "document.mimetype" element'); + else + return r('Missing "document" element'); + else + return r("[crosswordDefinition] argument is undefined or null"); +} +function Zl(e, n, r) { + if (e.x < 0 || e.x >= n.width || e.y < 0 || e.y >= n.height) + throw new Error(`Clue ${e} doesn't start in the bounds.`); + if (r) { + if (e.x + e.segmentLength > n.width) + throw new Error(`Clue ${e} exceeds horizontal bounds.`); + } else if (e.y + e.segmentLength > n.height) + throw new Error(`Clue ${e} exceeds vertical bounds.`); +} +function Jl(e, n, r) { + !r && e.acrossClue && (e.acrossClue.answer = oe( + e.acrossClue.answer, + e.acrossClueLetterIndex, + n + )), r && e.downClue && (e.downClue.answer = oe( + e.downClue.answer, + e.downClueLetterIndex, + n + )); +} +const eo = (e) => (n) => { + const r = e, i = n, t = i.headNumber; + switch (i.direction) { + case "across": + return r.acrossClues.find((l) => l.headNumber === t); + case "down": + return r.downClues.find((l) => l.headNumber === t); + default: + return r.acrossClues.find((l) => l.headNumber === t) || r.downClues.find((l) => l.headNumber === t); + } +}; +function no(e, n) { + return (r) => { + const i = Gl(r, n); + e[n ? "acrossClues" : "downClues"].push(i), Zl(i, e, n); + let { x: t, y: l } = i; + for (let o = 0; o < i.segmentLength; o += 1) { + const u = e.cells[t][l]; + u.light = !0, u[n ? "acrossClue" : "downClue"] = i, u[n ? "acrossClueLetterIndex" : "downClueLetterIndex"] = o, i.cells.push(u), Ql(o, i.wordLengths) && (u[i.isAcross ? "acrossTerminator" : "downTerminator"] = !0), lo(u, i, o, r.answer, n), to(u, i, o, r.solution), ro(o, u, i), n ? t += 1 : l += 1; + } + }; +} +function ro(e, n, r) { + if (e === 0) { + if (n.labelText && n.labelText !== r.headNumber) + throw new Error( + `Clue ${r} has a label which is inconsistent with another clue (${n.acrossClue}).` + ); + n.labelText = r.headNumber; + } +} +function io(e) { + return (n) => { + n.tailSegments = n.tailDescriptors.map( + eo(e) + ); + const r = [ + ...n.wordLengths, + ...n.tailSegments.flatMap((l) => l.wordLengths) + ]; + n.lengthText = `(${r})`; + let i = 0; + const t = [n, ...n.tailSegments]; + t.forEach((l) => { + [l.headSegment] = t, i > 0 && (l.previousClueSegment = t[i - 1]), i < t.length - 1 && (l.nextClueSegment = t[i + 1]), i += 1; + }), t[0].flatCells = t.length === 1 ? t[0].cells : ( + // Remove duplicates from intersecting multiple segments by constructing a set + new Set(t.flatMap((l) => l.cells)) + ), n.labelText = `${[n.headNumber].concat(n.tailSegments.map((l) => l.headNumber)).join(",")}.`, n.tailSegments.forEach((l) => { + l.lengthText = ""; + }); + }; +} +function po(e, n) { + d(fileExists(n)); + const r = readFileSync(n, { + encoding: "utf8", + flag: "r" + }); + return Mr(e, r.toString()); +} +function Mr(e, n) { + let r; + switch (e.trim().toLowerCase()) { + case "application/json": + try { + r = JSON.parse(n); + } catch (i) { + return x( + `newCrosswordDefinition: [documentText] is not a simple JSON object. +Error: ${i.message} +`, + "error" + ), null; + } + break; + case "application/yaml": + case "application/x-yaml": + try { + r = Il.load(n); + } catch (i) { + return x( + `newCrosswordDefinition: [documentText] is not a YAML object. +Error: ${i.message} +`, + "error" + ), null; + } + break; + default: + return x( + `newCrosswordDefinition: Unsupported file type: (${e})`, + "error" + ), null; + } + return Dr(r) ? r : null; +} +function Br(e, n, r, i) { + const t = `(${e.x + 1},${e.y + 1})`, l = `[${e[i]}[${r + 1}],${e[i][r]}]`, o = `(${n.acrossClue})`, u = `[${n.acrossClue[i]},${n[i]}]`; + return `Clue ${e} ${i} at ${t} ${l} is not coherent with previous clue ${o} ${i} ${u}.`; +} +function to(e, n, r, i) { + const t = " "; + if (i) { + if (e.solution && // We can overwrite any cells that have the default value + e.solution !== t && e.solution !== n.solution[r]) + throw new Error( + Br(n, e, r, "solution") + ); + e.solution = n.solution[r]; + } else + e.solution = t; +} +function lo(e, n, r, i, t) { + const l = " "; + if (i) { + const o = n.answer[r]; + if (e.answer && // We can overwrite any cells that have default value + e.answer !== l && e.answer !== o) + throw new Error( + Br(n, e, r, "answer") + ); + e.answer = o, Jl(e, e.answer, t); + } else + e.answer || (e.answer = l); +} +const oo = { + eventName: "keydown", + keyBindings: [ + { + key: M.backspace, + action: (e, n, r) => { + pn(e, n, r), hn(e, r); + } + }, + { + key: M.delete, + action: (e, n, r) => { + pn(e, n, r); + } + }, + { + key: M.enter, + action: (e, n, r) => { + Rn(e, r); + } + }, + { + key: M.tab, + action: (e, n, r) => { + n.shiftKey ? Jr(e, r) : Zr(e, r); + } + }, + { + key: M.space, + action: (e, n, r) => { + n.shiftKey ? hn(e, r) : Un(e, r); + } + } + ] +}, uo = { + eventName: "keyup", + keyBindings: [ + { + key: M.left, + action: (e, n, r) => { + Pn(e, r); + } + }, + { + key: M.up, + action: (e, n, r) => { + jn(e, r); + } + }, + { + key: M.right, + action: (e, n, r) => { + Hn(e, r); + } + }, + { + key: M.down, + action: (e, n, r) => { + Bn(e, r); + } + } + ] +}; +function mo(e, n, r) { + const i = new fo( + e, + n, + r + ); + return i != null && i.isValid ? i : null; +} +const so = /^[a-z]$/, co = /^[a-z]$/, ao = 5; +var ie, R, ge, P, q, xe, Ce, we, te, ve, ye, Ee, G, Ae, Re, be, en, W, ae, z, fe, Se, nn, De, Me, _e, Be, k, $, U, ee, le, Te, He, Hr, je, jr; +class fo { + ////////////////////////// + //// Lifecycle methods + ////////////////////////// + constructor(n, r, i) { + ////////////////////////// + //// Private methods + ////////////////////////// + // Accessor for document associated with DOM + v(this, be); + // Accessors for DOM parent/placeholder elements + v(this, W); + v(this, z); + // Common logic for CrosswordController constructor and loadCrosswordSource() + v(this, Se); + /** + * **#stateChange**: Publish an event to the listeners subscribed to _onStateChange_. + * @param {*} eventName The name of the event to be published + * @param {*} data not used + */ + v(this, k); + // Flush DOM event queue before publishing event + // Used to publish user notification events so pending events complete first. + v(this, U); + // Helper to publish crosswordSolved event if the crossword is solved + v(this, le); + // Assign event handlers to cell's input element + v(this, He); + // Assign event handlers to cell's input element + v(this, je); + v(this, ie, []); + v(this, R, new dn()); + v(this, ge, void 0); + v(this, P, void 0); + v(this, q, { clue: null, cell: null }); + v(this, xe, void 0); + v(this, Ce, void 0); + v(this, we, void 0); + v(this, te, {}); + v(this, ve, void 0); + v(this, ye, Wr()); + v(this, Ee, []); + v(this, G, void 0); + v(this, Ae, !1); + // Events published by the CrosswordController + v(this, Re, [ + "cellRevealed", + "clueCleaned", + "clueIncomplete", + "clueReset", + "clueRevealed", + "clueSelected", + "clueSolved", + "clueTested", + "crosswordCleaned", + "crosswordIncomplete", + "crosswordLoaded", + "crosswordReset", + "crosswordRevealed", + "crosswordSolved", + "crosswordTested" + ]); + ////////////////////////// + //// Grid element helpers + ////////////////////////// + // Helper function to retrieve corresponding cell for cellElement + j(this, "cell", (n) => p(this, R).modelCell(n)); + // Helper function to retrieve corresponding cellElement for cell + j(this, "cellElement", (n) => p(this, R).cellElement(n)); + // Helper function to retrieve corresponding inputElement for cell + j(this, "inputElement", (n) => (d(n.light, `dark cell! ${n}`), p(this, R).cellElement(n).children[0])); + // Helper function to retrieve corresponding revealedElement for cell + j(this, "revealedElement", (n) => { + d(n.light, `dark cell! ${n}`); + const r = n.labelText ? 2 : 1; + return p(this, R).cellElement(n).children[r]; + }); + // Helper function to retrieve corresponding incorrectElement for cell + j(this, "incorrectElement", (n) => { + d(n.light, `dark cell! ${n}`); + const r = n.labelText ? 3 : 2; + return p(this, R).cellElement(n).children[r]; + }); + // Helper function for constructor + v(this, De, () => { + D(this, G, { + // Reveal solution for current letter in answer. All revealed cells have + // distinct styling which remains for the duration of the puzzle. + // Public shaming is strictly enforced! + "reveal-cell": this.revealCurrentCell, + // Remove incorrect letters in the answer after testing. + "clean-clue": this.cleanCurrentClue, + // Clear out the answer for the current clue + "reset-clue": this.resetCurrentClue, + // Reveal solution for current clue + "reveal-clue": this.revealCurrentClue, + // Test the current clue answer against the solution. Incorrect letters + // have distinct styling which is removed when 'cleared' or a new letter + // entered in the cell. + "test-clue": this.testCurrentClue, + // Clear out all incorrect letters in the entire crossword + "clean-crossword": this.cleanCrossword, + // Clear out the entire crossword + "reset-crossword": this.resetCrossword, + // Reveal solutions for the entire crossword. + "reveal-crossword": this.revealCrossword, + // Test the answers for the entire crossword against the solutions + "test-crossword": this.testCrossword + }); + }); + // Helper function to subscribe to CrosswordController events. + // Refer to #controllerEventNames for complete list of events. + v(this, Me, (n, r) => { + n.forEach((i) => { + d( + this.controllerEventNames.includes(i), + `event [${i}] is not a CrosswordController event.` + ), p(this, Ee).push(p(this, ye).subscribe(i, r)); + }); + }); + // Helper for multi-segment current clue + v(this, _e, (n) => n && (n === this.currentClue.previousClueSegment || n === this.currentClue.nextClueSegment)); + v(this, Be, (n) => { + const r = (s, c) => { + c !== this.currentClue && (x( + `Clue has changed [was ${this.currentClue}, focused ${s}] => ${c}` + ), this.currentClue = c); + }, [i, t, l, o, u] = [ + this.currentClue, + n.acrossClue, + n.downClue, + n.acrossClueLetterIndex, + n.downClueLetterIndex + ]; + return [t, l].includes(this.currentClue) ? r(n, this.currentClue) : (t ? !l : l) ? r(n, t ?? l) : p(this, _e).call(this, t) ? r(n, t) : p(this, _e).call(this, l) ? r(n, l) : r(n, u === 0 && o !== 0 ? l : t), this.currentClue !== i; + }); + x("CrosswordController constructor"), d( + n == null ? void 0 : n.width, + "[crosswordDefinition] argument is null/undefined or not a crossword definition" + ), d( + r == null ? void 0 : r.ownerDocument, + "[domGridParentElement] argument is null/undefined or not a DOM element" + ), d( + !i || i.ownerDocument, + "[domCluesParentElement] argument is not a DOM element" + ), D(this, Ce, r), D(this, xe, i), this.setKeyboardEventBindings([oo, uo]), D(this, Ae, E(this, Se, nn).call(this, n)), this.isValid && p(this, De).call(this); + } + // Completely cleans up the crossword. + destroy() { + var n, r; + D(this, R, null), D(this, P, null), (n = p(this, W, ae)) == null || n.removeChild(this.gridView), (r = p(this, z, fe)) == null || r.removeChild(this.cluesView), p(this, Ee).forEach((i) => { + i.remove(); + }), p(this, ie).forEach((i) => { + const { element: t, eventName: l, handler: o } = i; + t.removeEventListener(l, o); + }); + } + ////////////////////////////////// + //// User EventHandler binding + ////////////////////////////////// + // Helper function to access API event handler functions + userEventHandler(n) { + return x(`elementEventHandler:${n}`), d( + p(this, G).hasOwnProperty(n), + `[${n}] is not a CrosswordController event handler.` + ), p(this, G)[n].bind(this); + } + // Helper function to bind Controller user-event-handler to webpage + // DOM elementId. + bindUserEventHandlerToId(n, r = "click", i = document) { + const t = On(n, i); + if (t) { + const l = this.userEventHandler(n); + t.addEventListener(r, l), p(this, ie).push({ element: t, eventName: r, handler: l }); + } + } + // Helper function to bind Controller user-event-handlers to a collection + // of webpage DOM elementIds. + bindUserEventHandlersToIds(n = this.userEventHandlerIds, r = "click", i = document) { + n.forEach((t) => { + this.bindUserEventHandlerToId(t, r, i); + }); + } + // Helper function to bind Controller user-event-handler to webpage + // DOM element class. Using element class names rather than element Ids + // allows us to add controller user-event-handler to more than one + // DOM element + bindUserEventHandlerToClass(n, r = "click", i = document) { + Nn(n, i).forEach((l) => { + const o = this.userEventHandler(n); + l.addEventListener(r, o), p(this, ie).push({ element: l, eventName: r, handler: o }); + }); + } + // Helper function to bind Controller user-event-handlers to a collection + // of webpage DOM elementIds. + bindUserEventHandlersToClass(n = this.userEventHandlerIds, r = "click", i = document) { + n.forEach( + (t) => this.bindUserEventHandlerToClass(t, r, i) + ); + } + //////////////////////////////// + //// Public property accessors + //////////////////////////////// + get isValid() { + return p(this, Ae); + } + // Accessors for public property currentCell + get currentCell() { + return p(this, q).cell; + } + set currentCell(n) { + x(`currentCell: ${n}`); + const r = this.currentCell; + n !== r && (p(this, q).cell = n, this.inputElement(n).focus(), ni(this, n, r)); + } + // Accessors for public property currentClue + get currentClue() { + return p(this, q).clue; + } + set currentClue(n) { + const r = this.currentClue; + n !== r && (x(`currentClue: '${n}' [currentCell ${this.currentCell}]`), p(this, q).clue = n, ei(this, n, r), this.currentClue.cells.includes(this.currentCell) || (this.currentCell = n.cells[0]), E(this, k, $).call(this, "clueSelected", n)); + } + // Accessor for public property model + get model() { + return p(this, P); + } + // Accessor for public property gridView + get gridView() { + return p(this, we); + } + // Accessor for public property cluesView + get cluesView() { + return p(this, ge); + } + // Accessor for addEventsListener - public event publisher + get addEventsListener() { + return p(this, Me); + } + // Accessor for public property controllerEventNames + get controllerEventNames() { + return [...p(this, Re)]; + } + // Accessors for public property lastMoveEvent + get lastMoveEvent() { + return p(this, ve); + } + set lastMoveEvent(n) { + const r = n.toLowerCase(); + d(["click", "focus"].includes(r), `unknown event: ${n}`), D(this, ve, r); + } + // Accessor for public property userEventHandlerIds + get userEventHandlerIds() { + return Object.keys(p(this, G)); + } + ////////////////////////// + //// Public methods + ////////////////////////// + /** + * Programmatically set the content of a crossword grid cell + * @param {*} cellElementId The id of the associated cell DOM element + * @param {*} character The new text content for the cell. + */ + setGridCell(n, r) { + x(`setCell:${n} '${r}}'`); + const i = !0; + Ye( + this, + p(this, R).modelCell(n), + r, + i + ); + } + loadCrosswordSource(n, r, i = "") { + d(n, "[mimeType] is undefined or null"), d(r, "[crosswordSourceText] is undefined or null"), x(`loadCrosswordSource: ${n} ${i}`); + const t = Mr(n, r); + return t ? E(this, Se, nn).call(this, t) : (x( + `loadCrosswordSource: invalid crossword definition "${i}"`, + "error" + ), !1); + } + setKeyboardEventBindings(n) { + d( + n == null ? void 0 : n.length, + "[eventBindings] argument is empty, null or undefined." + ); + const r = ["keydown", "keyup"]; + n.forEach((i) => { + var l, o; + d( + (l = i.eventName) == null ? void 0 : l.trim(), + 'Missing or empty "eventName" property for event binding.' + ); + const t = i.eventName.trim().toLowerCase(); + d( + r.includes(t), + `Binding event name "${i.eventName}" is not supported.` + ), d( + (o = i.keyBindings) == null ? void 0 : o.length, + `Missing or empty "keyBindings" array property for [${t}].` + ), x(`setKeyboardEventBindings: Setting keyBindings for "${t}".`), p(this, te)[t] = i.keyBindings; + }); + } + ///////////////////////////////// + //// Public user event handlers + ///////////////////////////////// + testCurrentClue() { + x(`testCurrentClue:${this.currentClue}`); + const n = !0, r = ti(this, this.currentClue, n); + return E(this, k, $).call(this, "clueTested", r), r === T.correct ? E(this, U, ee).call(this, "clueSolved", this.currentClue) : r === T.incomplete && E(this, U, ee).call(this, "clueIncomplete", this.currentClue), r; + } + testCrossword() { + x("testCrossword"); + const r = li(this, !0); + return E(this, k, $).call(this, "crosswordTested", r), r === T.correct ? E(this, U, ee).call(this, "crosswordSolved", p(this, P)) : r === T.incomplete && E(this, U, ee).call(this, "crosswordIncomplete", p(this, P)), r; + } + revealCurrentCell() { + rn(this, this.currentCell), E(this, k, $).call(this, "cellRevealed", this.currentCell), E(this, le, Te).call(this); + } + revealCurrentClue() { + ri(this, this.currentClue), E(this, k, $).call(this, "clueRevealed", this.currentClue), E(this, le, Te).call(this); + } + revealCrossword() { + x("revealCrossword"), ii(this), E(this, k, $).call(this, "crosswordRevealed", this.model); + } + resetCurrentClue() { + ui(this, this.currentClue), E(this, k, $).call(this, "clueReset", this.currentClue); + } + resetCrossword() { + x("resetCrossword"), si(this), E(this, k, $).call(this, "crosswordReset", this.model); + } + cleanCurrentClue() { + ci(this, this.currentClue), E(this, k, $).call(this, "clueCleaned", this.currentClue); + } + cleanCrossword() { + x("cleanCrossword"), ai(this), E(this, k, $).call(this, "crosswordCleaned", this.model); + } +} +ie = new WeakMap(), R = new WeakMap(), ge = new WeakMap(), P = new WeakMap(), q = new WeakMap(), xe = new WeakMap(), Ce = new WeakMap(), we = new WeakMap(), te = new WeakMap(), ve = new WeakMap(), ye = new WeakMap(), Ee = new WeakMap(), G = new WeakMap(), Ae = new WeakMap(), Re = new WeakMap(), be = new WeakSet(), en = function() { + return p(this, W, ae).ownerDocument; +}, W = new WeakSet(), ae = function() { + return p(this, Ce); +}, z = new WeakSet(), fe = function() { + return p(this, xe); +}, Se = new WeakSet(), nn = function(n) { + var i; + const r = Wl(n); + return r ? (this.model && (p(this, W, ae).removeChild(this.gridView), (i = p(this, z, fe)) == null || i.removeChild(this.cluesView), D(this, R, new dn())), D(this, P, r), D(this, we, Qr( + p(this, be, en), + this.model, + p(this, R) + )), p(this, R).modelCells.filter((t) => t.light).forEach((t) => { + E(this, je, jr).call(this, t.cellElement), E(this, He, Hr).call(this, this.inputElement(t)); + }), p(this, W, ae).appendChild(this.gridView), p(this, z, fe) && (D(this, ge, zr(p(this, be, en), this)), p(this, z, fe).appendChild(this.cluesView)), this.currentClue = this.model.acrossClues.headSegments[0], E(this, k, $).call(this, "crosswordLoaded", n), !0) : (x("#bindDefinition: crosswordModel creation failed", "error"), !1); +}, De = new WeakMap(), Me = new WeakMap(), _e = new WeakMap(), Be = new WeakMap(), k = new WeakSet(), $ = function(n, r) { + x(`stateChange: ${n}`), p(this, ye).publish(n, r); +}, U = new WeakSet(), ee = function(n, r) { + d( + this.controllerEventNames.includes(n), + `unknown event "${n}"` + ), setTimeout(() => { + E(this, k, $).call(this, n, r); + }, ao); +}, le = new WeakSet(), Te = function() { + x("checkSolved"), oi(this) === T.correct && E(this, U, ee).call(this, "crosswordSolved", this.model); +}, He = new WeakSet(), Hr = function(n) { + d(n, "inputElement is null or undefined"); + const r = this; + n.addEventListener("focus", (i) => { + var l; + const t = r.cell(i.target.parentNode); + x(`event:focus ${t}`), r.currentCell !== t && (r.currentCell = t), r.lastMoveEvent = "focus", p(l = r, Be).call(l, t); + }), n.addEventListener("click", (i) => { + const t = r.cell(i.target.parentNode); + x(`event:click ${t}`), t === r.currentCell ? r.lastMoveEvent === "click" && Rn(r, t) : r.currentCell = t, r.lastMoveEvent = "click"; + }); +}, je = new WeakSet(), jr = function(n) { + const r = this; + Object.keys(p(r, te)).forEach((i) => { + const t = p(r, te)[i]; + d(t, `"${i}" bindings are null or undefined.`), n.addEventListener(i, (l) => { + const o = l.key; + x(`event:${i} key=[${o}]`); + const u = t.find((s) => s.key === o); + if (u) { + l.preventDefault(); + const s = M.name(o).toUpperCase(); + x(l.shiftKey ? `SHIFT+${s}` : s); + const c = r.cell(l.target.parentNode); + u.action(r, l, c); + } + }); + }), n.addEventListener("keypress", (i) => { + var s; + x("event:keypress"), i.preventDefault(); + const [t, l] = [ + r.cell(i.target.parentNode), + i.key + ], [o, u] = [ + l.toLowerCase(), + l.toUpperCase() + ]; + so.test(o) && (x(`Setting cell content: [${u}]`), Kn(r, i, u), ue(r.incorrectElement(t)), E(s = r, le, Te).call(s)), co.test(o) && (x("Advancing to next cell"), Un(r, t)); + }); +}; +const go = { + assert: d, + // Validate function arguments and entry conditions + ecs: Nn, + // DOM helper, wrapper for document.getElementByClass() + eid: On, + // DOM helper, wrapper for document.getElementById() + trace: x, + // Log information, warnings and errors to the console + tracing: Gr + // Console logging toggle - pass boolean 'true' to emit messages to the console. +}; +export { + fo as Controller, + Wl as compileCrossword, + po as convertSourceFileToDefinition, + go as helpers, + mo as newCrosswordController, + Mr as newCrosswordDefinition +}; diff --git a/dist/crosswords.umd.cjs b/dist/crosswords.umd.cjs new file mode 100644 index 0000000..521c5a0 --- /dev/null +++ b/dist/crosswords.umd.cjs @@ -0,0 +1,36 @@ +var co=Object.defineProperty;var ao=(w,b,v)=>b in w?co(w,b,{enumerable:!0,configurable:!0,writable:!0,value:v}):w[b]=v;var q=(w,b,v)=>(ao(w,typeof b!="symbol"?b+"":b,v),v),an=(w,b,v)=>{if(!b.has(w))throw TypeError("Cannot "+v)};var p=(w,b,v)=>(an(w,b,"read from private field"),v?v.call(w):b.get(w)),E=(w,b,v)=>{if(b.has(w))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(w):b.set(w,v)},B=(w,b,v,G)=>(an(w,b,"write to private field"),G?G.call(w,v):b.set(w,v),v);var S=(w,b,v)=>(an(w,b,"access private method"),v);(function(w,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(w=typeof globalThis<"u"?globalThis:w||self,b(w.crosswords={}))})(this,function(w){var z,ue,$,xe,K,Q,Ce,we,ve,se,ye,Ee,Ae,X,be,He,Se,fn,Z,Le,J,ke,Te,dn,Pe,Ue,_e,Ye,N,M,V,fe,ce,qe,Ke,Yr,Ve,Kr;"use strict";const b="";function v(e,n){e.classList.add(n)}function G(e,n){n.forEach(r=>{e.classList.add(r)})}function d(e,n){if(!e)throw new Error(n||"Assertion failed")}const hn=(e,n=document)=>n.getElementById(e),pn=(e,n=document)=>n.getElementsByClassName(e);function Vr(e,n,r){let i=e;if(e&&n!=null&&r){let t=parseInt(n,10);t<0&&(t=e.length+t),t>=0&&e.length>t&&(i=`${e.slice(0,t)}${r}${e.slice(t+r.length)}`)}return i}function Ie(e,n){e.classList.remove(n)}function ee(e,n,r){let i=e??"";return i=i.padEnd(n+1," "),Vr(i,n,r)}let mn=!1;const qr=e=>{mn=e},x=(e,n="log")=>{mn&&(d(["log","warn","error"].includes(n),`Unsupported action'${n}'.`),console[n](e))},Gr=()=>{const e={},n=e.hasOwnProperty;return{publish:(r,i)=>{n.call(e,r)&&e[r].forEach(t=>{t(i!==void 0?i:{})})},subscribe:(r,i)=>{n.call(e,r)||(e[r]=[]);const t=e[r].push(i)-1;return{remove:()=>{delete e[r][t]}}}}};class gn{constructor(){E(this,z,{});q(this,"cellElement",n=>(d(typeof n=="object","Cell is not an object"),n.cellElement));q(this,"modelCell",n=>{switch(typeof n){case"string":return p(this,z)[n];case"object":return p(this,z)[n.dataset.xy];default:d(!0,'Unexpected type for "cellElement"');break}})}add(n,r){d(n,"modelCell is null or undefined"),d(r,"cellElement is null or undefined"),p(this,z)[r.dataset.xy]=n}get modelCells(){return Object.values(p(this,z))}}z=new WeakMap;function Wr(e,n){x("newCrosswordCluesView"),d(e,"[document] is null or undefined"),d(n,"[controller] is null or undefined"),d(n.model,"[controller.model] is null or undefined");function r(o,u){let s=e.createElement("div");v(s,"crossword-clue-block"),s.id=o;let c=e.createElement("p");return c.innerHTML=u,v(c,"crossword-clue-block-title"),s.appendChild(c),s}function i(o,u,s){s.forEach(c=>{let f=e.createElement("div");v(f,"crossword-clue"),f.modelClue=c;let a=e.createElement("span");v(a,"crossword-clue-label"),a.innerHTML=`${c.labelText}`,f.appendChild(a);let m=e.createElement("span");v(m,"crossword-clue-text"),m.innerHTML=`${c.clueText} ${c.lengthText}`,f.appendChild(m),f.addEventListener("click",g=>{x(`clue(${c.labelText}):click`),o.lastMoveEvent="click",o.currentClue=c}),u.appendChild(f)})}function t(o){const u=n.currentClue;if(o===u)return!0;{const s=u.headSegment;return s===o||s.tailSegments.indexOf(o)!==-1}}let l={wrapper:e.createElement("div"),acrossClues:r("crossword-across-clues","Across"),downClues:r("crossword-down-clues","Down")};return G(l.wrapper,["crosswords-js","crossword-clues"]),i(n,l.acrossClues,n.model.acrossClues),l.wrapper.appendChild(l.acrossClues),i(n,l.downClues,n.model.downClues),l.wrapper.appendChild(l.downClues),n.addEventsListener(["clueSelected"],o=>{for(const u of l.acrossClues.children)t(u.modelClue)?v(u,"current-clue-segment"):Ie(u,"current-clue-segment");for(const u of l.downClues.children)t(u.modelClue)?v(u,"current-clue-segment"):Ie(u,"current-clue-segment")}),l.wrapper}function zr(e,n,r){x("newCrosswordGridView"),d(e,"DOM root element [document] argument is null or undefined."),d(n,"CrosswordModel [model] argument is null or undefined."),d(r,"CrosswordController [cellMap] argument is null or undefined.");let i=e.createElement("div");G(i,["crosswords-js","crossword-grid"]),i.style.setProperty("--row-count",n.height),i.style.setProperty("--column-count",n.width);for(let t=0;t0&&n.model.cells[r][i-1].light===!0?(e.currentCell=n.model.cells[r][i-1],t=!0):t=wn(e,n),t}function An(e,n){const{x:r,y:i}=n;let t=!1;return n.x>0&&n.model.cells[r-1][i].light===!0?(e.currentCell=n.model.cells[r-1][i],t=!0):t=wn(e,n),t}function bn(e,n){if(e.currentClue===n.acrossClue)return yn(e,n);if(e.currentClue===n.downClue)return vn(e,n)}function Sn(e,n){if(e.currentClue===n.acrossClue)return An(e,n);if(e.currentClue===n.downClue)return En(e,n)}const Tn=(e,n)=>n.isAcross?[e.acrossClues.headSegments,e.downClues.headSegments]:[e.downClues.headSegments,e.acrossClues.headSegments];function Xr(e,n){const r=e.currentClue.headSegment,[i,t]=Tn(n.model,r),l=i.indexOf(r);d(l!==-1,`clue '${r.clueId}' not found in headClues`),e.currentClue=l===i.length-1?t[0]:i[l+1]}function Zr(e,n){const r=e.currentClue.headSegment,[i,t]=Tn(n.model,r),l=i.indexOf(r);d(l!==-1,`clue '${r.clueId}' not found in headClues`),e.currentClue=l===0?t.slice(-1)[0]:i[l-1]}function _n(e,n,r){Ln(e,n," "),ne(e.incorrectElement(r))}function Ln(e,n,r){const i=e.cell(n.target.parentNode);n.target.value=r,i.acrossClue&&(i.acrossClue.answer=ee(i.acrossClue.answer,i.acrossClueLetterIndex,r)),i.downClue&&(i.downClue.answer=ee(i.downClue.answer,i.downClueLetterIndex,r))}const ne=e=>{e==null||e.classList.add("hidden")},kn=e=>{e==null||e.classList.remove("hidden")};function Jr(e,n,r){d(n,"newClue is undefined"),r==null||r.headSegment.flatCells.forEach(i=>{Ie(e.inputElement(i),"active")}),n.headSegment.flatCells.forEach(i=>{v(e.inputElement(i),"active")})}function ei(e,n,r){d(n,"newCell is undefined"),r&&Ie(e.inputElement(r),"highlighted"),v(e.inputElement(n),"highlighted")}const j=Object.freeze({backspace:"Backspace",delete:"Delete",down:"ArrowDown",enter:"Enter",left:"ArrowLeft",right:"ArrowRight",space:" ",tab:"Tab",up:"ArrowUp",shift:"Shift",alt:"Alt",ctrl:"Control",name:e=>{const n=Object.entries(j).find(r=>r[1]===e);return n?n[0]:null}});function Ge(e,n){var o;d(e," is null or undefined"),d(n," is null or undefined");const r=n.acrossClue?n.acrossClue:n.downClue,i=n.acrossClue?n.acrossClueLetterIndex:n.downClueLetterIndex,t=i<((o=r.solution)==null?void 0:o.length)?r.solution[i]:" ";Ne(e,n,t,!1),kn(e.revealedElement(n)),ne(e.incorrectElement(n))}function ni(e,n){d(e," is null or undefined"),d(n," is null or undefined"),x(`revealClue: '${n}'`),n.headSegment.flatCells.forEach(r=>{Ge(e,r)})}function ri(e){d(e," is null or undefined"),e.model.lightCells.forEach(n=>{Ge(e,n)})}const I=Object.freeze({correct:0,incorrect:1,incomplete:2});function Fe(e,n){return e?I.incorrect:n?I.incomplete:I.correct}function Oe(e,n,r=!0){d(e," is null or undefined"),d(n," is null or undefined");const[i,t]=n.acrossClue?[n.acrossClue,n.acrossClueLetterIndex]:[n.downClue,n.downClueLetterIndex],l=i.answer[t],o=i.solution?i.solution[t]:void 0,u=Fe(!(l===o||l===" "),l===" "||l===void 0);return u===I.incorrect&&r&&kn(e.incorrectElement(n)),u}function ii(e,n,r=!0){d(e," is null or undefined"),d(n," is null or undefined"),x(`testClue: '${n}'`);let i=0,t=0;return n.headSegment.flatCells.forEach(l=>{const o=Oe(e,l,r);o===I.incorrect?i+=1:o===I.incomplete&&(t+=1)}),Fe(i>0,t>0)}function ti(e,n=!0){d(e," is null or undefined");let r=0,i=0;return e.model.lightCells.forEach(t=>{const l=Oe(e,t,n);l===I.incorrect?r+=1:l===I.incomplete&&(i+=1)}),Fe(r>0,i>0)}function li(e){d(e," is null or undefined");let n=0,r=0;const i=!1;return e.model.lightCells.find(t=>{const l=Oe(e,t,i);if(l===I.incorrect)return n+=1,!0;if(l===I.incomplete)return r+=1,!0}),Fe(n>0,r>0)}function Ne(e,n,r,i=!0){d(e," is null or undefined"),d((n==null?void 0:n.acrossClue)||(n==null?void 0:n.downClue),"cell is null or not part of a clue"),d((r==null?void 0:r.length)===1,"newText must be a single character");function t(l,o){let u=l;u.answer=ee(u.answer,o,r),i&&(u.revealed=ee(u.revealed,o,r))}if(n.acrossClue){let l=n.acrossClue;const o=n.acrossClueLetterIndex;t(l,o)}if(n.downClue){let l=n.downClue;const o=n.downClueLetterIndex;t(l,o)}e.inputElement(n).value=r}function In(e,n,r=!1){d(e," is null or undefined"),d(n," is null or undefined"),Ne(e,n," "),ne(e.incorrectElement(n)),r&&ne(e.revealedElement(n))}function oi(e,n){d(e," is null or undefined"),d(n," is null or undefined"),x(`resetClue: '${n}'`),n.headSegment.flatCells.forEach(r=>{In(e,r)})}function ui(e){d(e," is null or undefined"),e.model.lightCells.forEach(n=>{In(e,n,!0)})}function Fn(e,n){d(e," is null or undefined"),d(n," is null or undefined");const r=Oe(e,n)===I.incorrect;r&&(Ne(e,n," ",r),ne(e.incorrectElement(n)))}function si(e,n){d(e," is null or undefined"),d(n," is null or undefined"),x(`cleanClue: '${n}'`),n.headSegment.flatCells.forEach(r=>{Fn(e,r)})}function ci(e){x("cleanCrossword"),d(e," is null or undefined"),e.model.lightCells.forEach(n=>{Fn(e,n)})}/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function On(e){return typeof e>"u"||e===null}function ai(e){return typeof e=="object"&&e!==null}function fi(e){return Array.isArray(e)?e:On(e)?[]:[e]}function di(e,n){var r,i,t,l;if(n)for(l=Object.keys(n),r=0,i=l.length;ru&&(l=" ... ",n=i-u+l.length),r-i>u&&(o=" ...",r=i+u-o.length),{str:l+e.slice(n,r).replace(/\t/g,"→")+o,pos:i-n+l.length}}function ze(e,n){return L.repeat(" ",n-e.length)+e}function yi(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],t=[],l,o=-1;l=r.exec(e.buffer);)t.push(l.index),i.push(l.index+l[0].length),e.position<=l.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var u="",s,c,f=Math.min(e.line+n.linesAfter,t.length).toString().length,a=n.maxLength-(n.indent+f+3);for(s=1;s<=n.linesBefore&&!(o-s<0);s++)c=We(e.buffer,i[o-s],t[o-s],e.position-(i[o]-i[o-s]),a),u=L.repeat(" ",n.indent)+ze((e.line-s+1).toString(),f)+" | "+c.str+` +`+u;for(c=We(e.buffer,i[o],t[o],e.position,a),u+=L.repeat(" ",n.indent)+ze((e.line+1).toString(),f)+" | "+c.str+` +`,u+=L.repeat("-",n.indent+f+3+c.pos)+`^ +`,s=1;s<=n.linesAfter&&!(o+s>=t.length);s++)c=We(e.buffer,i[o+s],t[o+s],e.position-(i[o]-i[o+s]),a),u+=L.repeat(" ",n.indent)+ze((e.line+s+1).toString(),f)+" | "+c.str+` +`;return u.replace(/\n$/,"")}var Ei=yi,Ai=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],bi=["scalar","sequence","mapping"];function Si(e){var n={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){n[String(i)]=r})}),n}function Ti(e,n){if(n=n||{},Object.keys(n).forEach(function(r){if(Ai.indexOf(r)===-1)throw new O('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Si(n.styleAliases||null),bi.indexOf(this.kind)===-1)throw new O('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var k=Ti;function Rn(e,n){var r=[];return e[n].forEach(function(i){var t=r.length;r.forEach(function(l,o){l.tag===i.tag&&l.kind===i.kind&&l.multi===i.multi&&(t=o)}),r[t]=i}),r}function _i(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function i(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(n=0,r=arguments.length;n=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Hi=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Pi(e){return!(e===null||!Hi.test(e)||e[e.length-1]==="_")}function Ui(e){var n,r;return n=e.replace(/_/g,"").toLowerCase(),r=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:r*parseFloat(n,10)}var Yi=/^[-+]?[0-9]+e/;function Ki(e,n){var r;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(L.isNegativeZero(e))return"-0.0";return r=e.toString(10),Yi.test(r)?r.replace("e",".e"):r}function Vi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||L.isNegativeZero(e))}var Yn=new k("tag:yaml.org,2002:float",{kind:"scalar",resolve:Pi,construct:Ui,predicate:Vi,represent:Ki,defaultStyle:"lowercase"}),Kn=jn.extend({implicit:[Hn,Pn,Un,Yn]}),Vn=Kn,qn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Gn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function qi(e){return e===null?!1:qn.exec(e)!==null||Gn.exec(e)!==null}function Gi(e){var n,r,i,t,l,o,u,s=0,c=null,f,a,m;if(n=qn.exec(e),n===null&&(n=Gn.exec(e)),n===null)throw new Error("Date resolve error");if(r=+n[1],i=+n[2]-1,t=+n[3],!n[4])return new Date(Date.UTC(r,i,t));if(l=+n[4],o=+n[5],u=+n[6],n[7]){for(s=n[7].slice(0,3);s.length<3;)s+="0";s=+s}return n[9]&&(f=+n[10],a=+(n[11]||0),c=(f*60+a)*6e4,n[9]==="-"&&(c=-c)),m=new Date(Date.UTC(r,i,t,l,o,u,s)),c&&m.setTime(m.getTime()-c),m}function Wi(e){return e.toISOString()}var Wn=new k("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:qi,construct:Gi,instanceOf:Date,represent:Wi});function zi(e){return e==="<<"||e===null}var zn=new k("tag:yaml.org,2002:merge",{kind:"scalar",resolve:zi}),Xe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Qi(e){if(e===null)return!1;var n,r,i=0,t=e.length,l=Xe;for(r=0;r64)){if(n<0)return!1;i+=6}return i%8===0}function Xi(e){var n,r,i=e.replace(/[\r\n=]/g,""),t=i.length,l=Xe,o=0,u=[];for(n=0;n>16&255),u.push(o>>8&255),u.push(o&255)),o=o<<6|l.indexOf(i.charAt(n));return r=t%4*6,r===0?(u.push(o>>16&255),u.push(o>>8&255),u.push(o&255)):r===18?(u.push(o>>10&255),u.push(o>>2&255)):r===12&&u.push(o>>4&255),new Uint8Array(u)}function Zi(e){var n="",r=0,i,t,l=e.length,o=Xe;for(i=0;i>18&63],n+=o[r>>12&63],n+=o[r>>6&63],n+=o[r&63]),r=(r<<8)+e[i];return t=l%3,t===0?(n+=o[r>>18&63],n+=o[r>>12&63],n+=o[r>>6&63],n+=o[r&63]):t===2?(n+=o[r>>10&63],n+=o[r>>4&63],n+=o[r<<2&63],n+=o[64]):t===1&&(n+=o[r>>2&63],n+=o[r<<4&63],n+=o[64],n+=o[64]),n}function Ji(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Qn=new k("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Qi,construct:Xi,predicate:Ji,represent:Zi}),et=Object.prototype.hasOwnProperty,nt=Object.prototype.toString;function rt(e){if(e===null)return!0;var n=[],r,i,t,l,o,u=e;for(r=0,i=u.length;r>10)+55296,(e-65536&1023)+56320)}for(var ur=new Array(256),sr=new Array(256),ie=0;ie<256;ie++)ur[ie]=or(ie)?1:0,sr[ie]=or(ie);function Ct(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Ze,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function cr(e,n){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Ei(r),new O(n,r)}function h(e,n){throw cr(e,n)}function De(e,n){e.onWarning&&e.onWarning.call(null,cr(e,n))}var ar={YAML:function(n,r,i){var t,l,o;n.version!==null&&h(n,"duplication of %YAML directive"),i.length!==1&&h(n,"YAML directive accepts exactly one argument"),t=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),t===null&&h(n,"ill-formed argument of the YAML directive"),l=parseInt(t[1],10),o=parseInt(t[2],10),l!==1&&h(n,"unacceptable YAML version of the document"),n.version=i[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&De(n,"unsupported YAML version of the document")},TAG:function(n,r,i){var t,l;i.length!==2&&h(n,"TAG directive accepts exactly two arguments"),t=i[0],l=i[1],ir.test(t)||h(n,"ill-formed tag handle (first argument) of the TAG directive"),U.call(n.tagMap,t)&&h(n,'there is a previously declared suffix for "'+t+'" tag handle'),tr.test(l)||h(n,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{h(n,"tag prefix is malformed: "+l)}n.tagMap[t]=l}};function Y(e,n,r,i){var t,l,o,u;if(n1&&(e.result+=L.repeat(` +`,n-1))}function wt(e,n,r){var i,t,l,o,u,s,c,f,a=e.kind,m=e.result,g;if(g=e.input.charCodeAt(e.position),R(g)||re(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(t=e.input.charCodeAt(e.position+1),R(t)||r&&re(t)))return!1;for(e.kind="scalar",e.result="",l=o=e.position,u=!1;g!==0;){if(g===58){if(t=e.input.charCodeAt(e.position+1),R(t)||r&&re(t))break}else if(g===35){if(i=e.input.charCodeAt(e.position-1),R(i))break}else{if(e.position===e.lineStart&&Me(e)||r&&re(g))break;if(H(g))if(s=e.line,c=e.lineStart,f=e.lineIndent,_(e,!1,-1),e.lineIndent>=n){u=!0,g=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=s,e.lineStart=c,e.lineIndent=f;break}}u&&(Y(e,l,o,!1),nn(e,e.line-s),l=o=e.position,u=!1),W(g)||(o=e.position+1),g=e.input.charCodeAt(++e.position)}return Y(e,l,o,!1),e.result?!0:(e.kind=a,e.result=m,!1)}function vt(e,n){var r,i,t;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=t=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Y(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,t=e.position;else return!0;else H(r)?(Y(e,i,t,!0),nn(e,_(e,!1,n)),i=t=e.position):e.position===e.lineStart&&Me(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,t=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function yt(e,n){var r,i,t,l,o,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return Y(e,r,e.position,!0),e.position++,!0;if(u===92){if(Y(e,r,e.position,!0),u=e.input.charCodeAt(++e.position),H(u))_(e,!1,n);else if(u<256&&ur[u])e.result+=sr[u],e.position++;else if((o=mt(u))>0){for(t=o,l=0;t>0;t--)u=e.input.charCodeAt(++e.position),(o=pt(u))>=0?l=(l<<4)+o:h(e,"expected hexadecimal character");e.result+=xt(l),e.position++}else h(e,"unknown escape sequence");r=i=e.position}else H(u)?(Y(e,r,i,!0),nn(e,_(e,!1,n)),r=i=e.position):e.position===e.lineStart&&Me(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function Et(e,n){var r=!0,i,t,l,o=e.tag,u,s=e.anchor,c,f,a,m,g,C=Object.create(null),A,T,D,y;if(y=e.input.charCodeAt(e.position),y===91)f=93,g=!1,u=[];else if(y===123)f=125,g=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),y=e.input.charCodeAt(++e.position);y!==0;){if(_(e,!0,n),y=e.input.charCodeAt(e.position),y===f)return e.position++,e.tag=o,e.anchor=s,e.kind=g?"mapping":"sequence",e.result=u,!0;r?y===44&&h(e,"expected the node content, but found ','"):h(e,"missed comma between flow collection entries"),T=A=D=null,a=m=!1,y===63&&(c=e.input.charCodeAt(e.position+1),R(c)&&(a=m=!0,e.position++,_(e,!0,n))),i=e.line,t=e.lineStart,l=e.position,le(e,n,Re,!1,!0),T=e.tag,A=e.result,_(e,!0,n),y=e.input.charCodeAt(e.position),(m||e.line===i)&&y===58&&(a=!0,y=e.input.charCodeAt(++e.position),_(e,!0,n),le(e,n,Re,!1,!0),D=e.result),g?te(e,u,C,T,A,D,i,t,l):a?u.push(te(e,null,C,T,A,D,i,t,l)):u.push(A),_(e,!0,n),y=e.input.charCodeAt(e.position),y===44?(r=!0,y=e.input.charCodeAt(++e.position)):r=!1}h(e,"unexpected end of the stream within a flow collection")}function At(e,n){var r,i,t=Je,l=!1,o=!1,u=n,s=0,c=!1,f,a;if(a=e.input.charCodeAt(e.position),a===124)i=!1;else if(a===62)i=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)Je===t?t=a===43?rr:at:h(e,"repeat of a chomping mode identifier");else if((f=gt(a))>=0)f===0?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?h(e,"repeat of an indentation width identifier"):(u=n+f-1,o=!0);else break;if(W(a)){do a=e.input.charCodeAt(++e.position);while(W(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!H(a)&&a!==0)}for(;a!==0;){for(en(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!o||e.lineIndentu&&(u=e.lineIndent),H(a)){s++;continue}if(e.lineIndentn)&&s!==0)h(e,"bad indentation of a sequence entry");else if(e.lineIndentn)&&(T&&(o=e.line,u=e.lineStart,s=e.position),le(e,n,$e,!0,t)&&(T?C=e.result:A=e.result),T||(te(e,a,m,g,C,A,o,u,s),g=C=A=null),_(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>n)&&y!==0)h(e,"bad indentation of a mapping entry");else if(e.lineIndentn?s=1:e.lineIndent===n?s=0:e.lineIndentn?s=1:e.lineIndent===n?s=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),a=0,m=e.implicitTypes.length;a"),e.result!==null&&C.kind!==e.kind&&h(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+C.kind+'", not "'+e.kind+'"'),C.resolve(e.result,e.tag)?(e.result=C.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function Lt(e){var n=e.position,r,i,t,l=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(_(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(l=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!R(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),t=[],i.length<1&&h(e,"directive name must not be less than one character in length");o!==0;){for(;W(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!H(o));break}if(H(o))break;for(r=e.position;o!==0&&!R(o);)o=e.input.charCodeAt(++e.position);t.push(e.input.slice(r,e.position))}o!==0&&en(e),U.call(ar,i)?ar[i](e,i,t):De(e,'unknown document directive "'+i+'"')}if(_(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,_(e,!0,-1)):l&&h(e,"directives end mark is expected"),le(e,e.lineIndent-1,$e,!1,!0),_(e,!0,-1),e.checkLineBreaks&&dt.test(e.input.slice(n,e.position))&&De(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Me(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_(e,!0,-1));return}if(e.position"u"&&(r=n,n=null);var i=hr(e,r);if(typeof n!="function")return i;for(var t=0,l=i.length;t=55296&&r<=56319&&n+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function Sr(e){var n=/^\n* /;return n.test(e)}var Tr=1,on=2,_r=3,Lr=4,oe=5;function tl(e,n,r,i,t,l,o,u){var s,c=0,f=null,a=!1,m=!1,g=i!==-1,C=-1,A=rl(ge(e,0))&&il(ge(e,e.length-1));if(n||o)for(s=0;s=65536?s+=2:s++){if(c=ge(e,s),!me(c))return oe;A=A&&br(c,f,u),f=c}else{for(s=0;s=65536?s+=2:s++){if(c=ge(e,s),c===he)a=!0,g&&(m=m||s-C-1>i&&e[C+1]!==" ",C=s);else if(!me(c))return oe;A=A&&br(c,f,u),f=c}m=m||g&&s-C-1>i&&e[C+1]!==" "}return!a&&!m?A&&!o&&!t(e)?Tr:l===pe?oe:on:r>9&&Sr(e)?oe:o?l===pe?oe:on:m?Lr:_r}function ll(e,n,r,i,t){e.dump=function(){if(n.length===0)return e.quotingType===pe?'""':"''";if(!e.noCompatMode&&(zt.indexOf(n)!==-1||Qt.test(n)))return e.quotingType===pe?'"'+n+'"':"'"+n+"'";var l=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),u=i||e.flowLevel>-1&&r>=e.flowLevel;function s(c){return nl(e,c)}switch(tl(n,u,e.indent,o,s,e.quotingType,e.forceQuotes&&!i,t)){case Tr:return n;case on:return"'"+n.replace(/'/g,"''")+"'";case _r:return"|"+kr(n,e.indent)+Ir(Er(n,l));case Lr:return">"+kr(n,e.indent)+Ir(Er(ol(n,o),l));case oe:return'"'+ul(n)+'"';default:throw new O("impossible error: invalid scalar style")}}()}function kr(e,n){var r=Sr(e)?String(n):"",i=e[e.length-1]===` +`,t=i&&(e[e.length-2]===` +`||e===` +`),l=t?"+":i?"":"-";return r+l+` +`}function Ir(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function ol(e,n){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(` +`);return c=c!==-1?c:e.length,r.lastIndex=c,Fr(e.slice(0,c),n)}(),t=e[0]===` +`||e[0]===" ",l,o;o=r.exec(e);){var u=o[1],s=o[2];l=s[0]===" ",i+=u+(!t&&!l&&s!==""?` +`:"")+Fr(s,n),t=l}return i}function Fr(e,n){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,t=0,l,o=0,u=0,s="";i=r.exec(e);)u=i.index,u-t>n&&(l=o>t?o:u,s+=` +`+e.slice(t,l),t=l+1),o=u;return s+=` +`,e.length-t>n&&o>t?s+=e.slice(t,o)+` +`+e.slice(o+1):s+=e.slice(t),s.slice(1)}function ul(e){for(var n="",r=0,i,t=0;t=65536?t+=2:t++)r=ge(e,t),i=F[r],!i&&me(r)?(n+=e[t],r>=65536&&(n+=e[t+1])):n+=i||Zt(r);return n}function sl(e,n,r){var i="",t=e.tag,l,o,u;for(l=0,o=r.length;l"u"&&P(e,n,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=t,e.dump="["+i+"]"}function Or(e,n,r,i){var t="",l=e.tag,o,u,s;for(o=0,u=r.length;o"u"&&P(e,n+1,null,!0,!0,!1,!0))&&((!i||t!=="")&&(t+=ln(e,n)),e.dump&&he===e.dump.charCodeAt(0)?t+="-":t+="- ",t+=e.dump);e.tag=l,e.dump=t||"[]"}function cl(e,n,r){var i="",t=e.tag,l=Object.keys(r),o,u,s,c,f;for(o=0,u=l.length;o1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),P(e,n,c,!1,!1)&&(f+=e.dump,i+=f));e.tag=t,e.dump="{"+i+"}"}function al(e,n,r,i){var t="",l=e.tag,o=Object.keys(r),u,s,c,f,a,m;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new O("sortKeys must be a boolean or a function");for(u=0,s=o.length;u1024,a&&(e.dump&&he===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,a&&(m+=ln(e,n)),P(e,n+1,f,!0,a)&&(e.dump&&he===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,t+=m));e.tag=l,e.dump=t||"{}"}function Nr(e,n,r){var i,t,l,o,u,s;for(t=r?e.explicitTypes:e.implicitTypes,l=0,o=t.length;l tag resolver accepts not "'+s+'" style');e.dump=i}return!0}return!1}function P(e,n,r,i,t,l,o){e.tag=null,e.dump=r,Nr(e,r,!1)||Nr(e,r,!0);var u=mr.call(e.dump),s=i,c;i&&(i=e.flowLevel<0||e.flowLevel>n);var f=u==="[object Object]"||u==="[object Array]",a,m;if(f&&(a=e.duplicates.indexOf(r),m=a!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&n>0)&&(t=!1),m&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(f&&m&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),u==="[object Object]")i&&Object.keys(e.dump).length!==0?(al(e,n,e.dump,t),m&&(e.dump="&ref_"+a+e.dump)):(cl(e,n,e.dump),m&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?Or(e,n-1,e.dump,t):Or(e,n,e.dump,t),m&&(e.dump="&ref_"+a+e.dump)):(sl(e,n,e.dump),m&&(e.dump="&ref_"+a+" "+e.dump));else if(u==="[object String]")e.tag!=="?"&&ll(e,e.dump,n,l,s);else{if(u==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new O("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}function fl(e,n){var r=[],i=[],t,l;for(un(e,r,i),t=0,l=i.length;t',close:""}},{tag:"___",regex:/(.*?)(___.+?___)(.*)$/,html:{open:'',close:""}},{tag:"**",regex:/(.*?)(\*\*.+?\*\*)(.*)$/,html:{open:'',close:""}},{tag:"__",regex:/(.*?)(__.+?__)(.*)$/,html:{open:'',close:""}},{tag:"*",regex:/(.*?)(\*[^*]+?\*)(.*)$/,html:{open:'',close:""}},{tag:"_",regex:/(.*?)(_[^_]+?_)(.*)$/,html:{open:'',close:""}}];function Nl(e){let n=e;return Ol.forEach(r=>{let i,t,l=n;if(r.regex.test(l)){let o=r.regex.exec(l);for(n="";(o==null?void 0:o.length)===4;)[,i,t,l]=o,t=t.replace(r.tag,r.html.open),t=t.replace(r.tag,r.html.close),n+=i+t,o=r.regex.exec(l);n+=l}}),n}function Rl(e){const n={x:1,y:1,clue:"1. Clue (1)"},r={answer:"",solution:"",revealed:""},i=Object.keys(n),t=Object.keys(r),l=Object.keys(e);for(const u of i)if(!l.includes(u))throw new Error(`'cdClue.${u}' is missing`);for(const u of i)if(typeof n[u]!=typeof e[u])throw new Error(`'cdClue.${u} (${e[u]})' must be a ${typeof n[u]}`);for(const u of t)if(l.includes(u)&&typeof r[u]!=typeof e[u])throw new Error(`'cdClue.${u} (${e[u]})' must be a ${typeof r[u]}`);const o=new Set(l);for(const u of i)o.delete(u);for(const u of t)o.delete(u);if(o.size>0)throw new Error(`'cdClue' has unexpected properties <${[...o].join(",")}>`);if(!Rr.test(e.clue))throw new Error(`Clue '${e.clue}' does not match the required pattern '${Il}'`)}function $l(e,n){if(e===void 0||n===void 0)throw new Error("'cdClue' and 'isAcrossClue' are required");if(e===null)throw new Error("'cdClue' can't be null");if(n===null)throw new Error("'isAcrossClue' can't be null");if(typeof n!="boolean")throw new Error("'isAcrossClue' must be a boolean (true,false)")}function Dl(e,n){let r=e.toLowerCase(),i=[];for(;$r.test(r);){const[,,t,l]=$r.exec(r);i.push(t),r=l}if(r)throw new Error(`'${n.clue}' Error in near <${r}>`);return i}function Ml(e){function n(t){return t.endsWith("a")?"across":t.endsWith("d")?"down":null}let r=e.slice(1),i=[];return r.length>0&&(i=r.map(t=>({headNumber:parseInt(t,10),direction:n(t)}))),i}function Bl(e,n){let r=[],i=e;for(;Dr.test(i);){const[,,t,l]=Dr.exec(i);r.push(parseInt(t,10)),i=l}if(i)throw new Error(`'${n.clue}' Error in near <${i}>`);return r}const jl=(e,n)=>{const r=t=>t?"a":"d";return/[ad]$/.test(e)?e:e+r(n)};function Hl(e,n){$l(e,n),Rl(e);const r=[],i=e.x-1,t=e.y-1,l=n,o=e.solution?e.solution.toUpperCase().replaceAll(/[^A-Z]/g,""):void 0,u=e.revealed?e.revealed.toUpperCase():void 0,[,s,c,f]=Rr.exec(e.clue),a=Dl(s,e),m=Ml(a),[g]=a,C=parseInt(g,10),A=C.toString(),T=jl(g,l),[,D]=Fl.exec(c),y=Nl(D),Pr=`(${f})`,Ur=Bl(f,e),ae=Ur.reduce((uo,so)=>uo+so,0),oo=e.answer?e.answer.toUpperCase().replaceAll(/[^ A-Z]/g," ").padEnd(ae):"".padEnd(ae);if(o&&o.length!==ae)throw new Error(`Length of clue solution '${o}' does not match the lengthText '${Pr}'`);if(u&&u.length!==ae)throw new Error(`Length of clue revealed characters '${u}' does not match the lengthText: ${ae}`);return{answer:oo,cells:r,clueId:T,clueText:y,headNumber:C,isAcross:l,labelText:A,lengthText:Pr,revealed:u,segmentLength:ae,solution:o,tailDescriptors:m,wordLengths:Ur,x:i,y:t,toString:()=>`${T}`}}function Mr(e){if(x("newCrosswordModel"),!Br(e))return x("newCrosswordModel: The model must be initialised with a valid crossword definition.","error"),null;let n=Yl(e);n.cells=Pl(n);const r=/across/i;return["acrossClues","downClues"].forEach(i=>{e[i].forEach(Gl(n,r.test(i)))}),[...n.acrossClues,...n.downClues].forEach(zl(n)),n.lightCells=n.cells.flat().filter(i=>i.light),["acrossClues","downClues"].forEach(i=>{n[i].headSegments=n[i].filter(t=>t===t.headSegment)}),n}function Pl(e){const{width:n}=e,{height:r}=e,i=new Array(n);for(let t=0;t`${t},${l}`}}return i}function Ul(e,n){if(e>=0){let r=e,i=0;for(;i=n.width||e.y<0||e.y>=n.height)throw new Error(`Clue ${e} doesn't start in the bounds.`);if(r){if(e.x+e.segmentLength>n.width)throw new Error(`Clue ${e} exceeds horizontal bounds.`)}else if(e.y+e.segmentLength>n.height)throw new Error(`Clue ${e} exceeds vertical bounds.`)}function Vl(e,n,r){!r&&e.acrossClue&&(e.acrossClue.answer=ee(e.acrossClue.answer,e.acrossClueLetterIndex,n)),r&&e.downClue&&(e.downClue.answer=ee(e.downClue.answer,e.downClueLetterIndex,n))}const ql=e=>n=>{const r=e,i=n,t=i.headNumber;switch(i.direction){case"across":return r.acrossClues.find(l=>l.headNumber===t);case"down":return r.downClues.find(l=>l.headNumber===t);default:return r.acrossClues.find(l=>l.headNumber===t)||r.downClues.find(l=>l.headNumber===t)}};function Gl(e,n){return r=>{const i=Hl(r,n);e[n?"acrossClues":"downClues"].push(i),Kl(i,e,n);let{x:t,y:l}=i;for(let o=0;o{n.tailSegments=n.tailDescriptors.map(ql(e));const r=[...n.wordLengths,...n.tailSegments.flatMap(l=>l.wordLengths)];n.lengthText=`(${r})`;let i=0;const t=[n,...n.tailSegments];t.forEach(l=>{[l.headSegment]=t,i>0&&(l.previousClueSegment=t[i-1]),il.cells)),n.labelText=`${[n.headNumber].concat(n.tailSegments.map(l=>l.headNumber)).join(",")}.`,n.tailSegments.forEach(l=>{l.lengthText=""})}}function Ql(e,n){d(fileExists(n));const r=readFileSync(n,{encoding:"utf8",flag:"r"});return cn(e,r.toString())}function cn(e,n){let r;switch(e.trim().toLowerCase()){case"application/json":try{r=JSON.parse(n)}catch(i){return x(`newCrosswordDefinition: [documentText] is not a simple JSON object. +Error: ${i.message} +`,"error"),null}break;case"application/yaml":case"application/x-yaml":try{r=kl.load(n)}catch(i){return x(`newCrosswordDefinition: [documentText] is not a YAML object. +Error: ${i.message} +`,"error"),null}break;default:return x(`newCrosswordDefinition: Unsupported file type: (${e})`,"error"),null}return Br(r)?r:null}function jr(e,n,r,i){const t=`(${e.x+1},${e.y+1})`,l=`[${e[i]}[${r+1}],${e[i][r]}]`,o=`(${n.acrossClue})`,u=`[${n.acrossClue[i]},${n[i]}]`;return`Clue ${e} ${i} at ${t} ${l} is not coherent with previous clue ${o} ${i} ${u}.`}function Xl(e,n,r,i){const t=" ";if(i){if(e.solution&&e.solution!==t&&e.solution!==n.solution[r])throw new Error(jr(n,e,r,"solution"));e.solution=n.solution[r]}else e.solution=t}function Zl(e,n,r,i,t){const l=" ";if(i){const o=n.answer[r];if(e.answer&&e.answer!==l&&e.answer!==o)throw new Error(jr(n,e,r,"answer"));e.answer=o,Vl(e,e.answer,t)}else e.answer||(e.answer=l)}const Jl={eventName:"keydown",keyBindings:[{key:j.backspace,action:(e,n,r)=>{_n(e,n,r),Sn(e,r)}},{key:j.delete,action:(e,n,r)=>{_n(e,n,r)}},{key:j.enter,action:(e,n,r)=>{xn(e,r)}},{key:j.tab,action:(e,n,r)=>{n.shiftKey?Zr(e,r):Xr(e,r)}},{key:j.space,action:(e,n,r)=>{n.shiftKey?Sn(e,r):bn(e,r)}}]},eo={eventName:"keyup",keyBindings:[{key:j.left,action:(e,n,r)=>{An(e,r)}},{key:j.up,action:(e,n,r)=>{En(e,r)}},{key:j.right,action:(e,n,r)=>{yn(e,r)}},{key:j.down,action:(e,n,r)=>{vn(e,r)}}]};function no(e,n,r){const i=new Hr(e,n,r);return i!=null&&i.isValid?i:null}const ro=/^[a-z]$/,io=/^[a-z]$/,to=5;class Hr{constructor(n,r,i){E(this,Se);E(this,Z);E(this,J);E(this,Te);E(this,N);E(this,V);E(this,ce);E(this,Ke);E(this,Ve);E(this,ue,[]);E(this,$,new gn);E(this,xe,void 0);E(this,K,void 0);E(this,Q,{clue:null,cell:null});E(this,Ce,void 0);E(this,we,void 0);E(this,ve,void 0);E(this,se,{});E(this,ye,void 0);E(this,Ee,Gr());E(this,Ae,[]);E(this,X,void 0);E(this,be,!1);E(this,He,["cellRevealed","clueCleaned","clueIncomplete","clueReset","clueRevealed","clueSelected","clueSolved","clueTested","crosswordCleaned","crosswordIncomplete","crosswordLoaded","crosswordReset","crosswordRevealed","crosswordSolved","crosswordTested"]);q(this,"cell",n=>p(this,$).modelCell(n));q(this,"cellElement",n=>p(this,$).cellElement(n));q(this,"inputElement",n=>(d(n.light,`dark cell! ${n}`),p(this,$).cellElement(n).children[0]));q(this,"revealedElement",n=>{d(n.light,`dark cell! ${n}`);const r=n.labelText?2:1;return p(this,$).cellElement(n).children[r]});q(this,"incorrectElement",n=>{d(n.light,`dark cell! ${n}`);const r=n.labelText?3:2;return p(this,$).cellElement(n).children[r]});E(this,Pe,()=>{B(this,X,{"reveal-cell":this.revealCurrentCell,"clean-clue":this.cleanCurrentClue,"reset-clue":this.resetCurrentClue,"reveal-clue":this.revealCurrentClue,"test-clue":this.testCurrentClue,"clean-crossword":this.cleanCrossword,"reset-crossword":this.resetCrossword,"reveal-crossword":this.revealCrossword,"test-crossword":this.testCrossword})});E(this,Ue,(n,r)=>{n.forEach(i=>{d(this.controllerEventNames.includes(i),`event [${i}] is not a CrosswordController event.`),p(this,Ae).push(p(this,Ee).subscribe(i,r))})});E(this,_e,n=>n&&(n===this.currentClue.previousClueSegment||n===this.currentClue.nextClueSegment));E(this,Ye,n=>{const r=(s,c)=>{c!==this.currentClue&&(x(`Clue has changed [was ${this.currentClue}, focused ${s}] => ${c}`),this.currentClue=c)},[i,t,l,o,u]=[this.currentClue,n.acrossClue,n.downClue,n.acrossClueLetterIndex,n.downClueLetterIndex];return[t,l].includes(this.currentClue)?r(n,this.currentClue):(t?!l:l)?r(n,t??l):p(this,_e).call(this,t)?r(n,t):p(this,_e).call(this,l)?r(n,l):r(n,u===0&&o!==0?l:t),this.currentClue!==i});x("CrosswordController constructor"),d(n==null?void 0:n.width,"[crosswordDefinition] argument is null/undefined or not a crossword definition"),d(r==null?void 0:r.ownerDocument,"[domGridParentElement] argument is null/undefined or not a DOM element"),d(!i||i.ownerDocument,"[domCluesParentElement] argument is not a DOM element"),B(this,we,r),B(this,Ce,i),this.setKeyboardEventBindings([Jl,eo]),B(this,be,S(this,Te,dn).call(this,n)),this.isValid&&p(this,Pe).call(this)}destroy(){var n,r;B(this,$,null),B(this,K,null),(n=p(this,Z,Le))==null||n.removeChild(this.gridView),(r=p(this,J,ke))==null||r.removeChild(this.cluesView),p(this,Ae).forEach(i=>{i.remove()}),p(this,ue).forEach(i=>{const{element:t,eventName:l,handler:o}=i;t.removeEventListener(l,o)})}userEventHandler(n){return x(`elementEventHandler:${n}`),d(p(this,X).hasOwnProperty(n),`[${n}] is not a CrosswordController event handler.`),p(this,X)[n].bind(this)}bindUserEventHandlerToId(n,r="click",i=document){const t=hn(n,i);if(t){const l=this.userEventHandler(n);t.addEventListener(r,l),p(this,ue).push({element:t,eventName:r,handler:l})}}bindUserEventHandlersToIds(n=this.userEventHandlerIds,r="click",i=document){n.forEach(t=>{this.bindUserEventHandlerToId(t,r,i)})}bindUserEventHandlerToClass(n,r="click",i=document){pn(n,i).forEach(l=>{const o=this.userEventHandler(n);l.addEventListener(r,o),p(this,ue).push({element:l,eventName:r,handler:o})})}bindUserEventHandlersToClass(n=this.userEventHandlerIds,r="click",i=document){n.forEach(t=>this.bindUserEventHandlerToClass(t,r,i))}get isValid(){return p(this,be)}get currentCell(){return p(this,Q).cell}set currentCell(n){x(`currentCell: ${n}`);const r=this.currentCell;n!==r&&(p(this,Q).cell=n,this.inputElement(n).focus(),ei(this,n,r))}get currentClue(){return p(this,Q).clue}set currentClue(n){const r=this.currentClue;n!==r&&(x(`currentClue: '${n}' [currentCell ${this.currentCell}]`),p(this,Q).clue=n,Jr(this,n,r),this.currentClue.cells.includes(this.currentCell)||(this.currentCell=n.cells[0]),S(this,N,M).call(this,"clueSelected",n))}get model(){return p(this,K)}get gridView(){return p(this,ve)}get cluesView(){return p(this,xe)}get addEventsListener(){return p(this,Ue)}get controllerEventNames(){return[...p(this,He)]}get lastMoveEvent(){return p(this,ye)}set lastMoveEvent(n){const r=n.toLowerCase();d(["click","focus"].includes(r),`unknown event: ${n}`),B(this,ye,r)}get userEventHandlerIds(){return Object.keys(p(this,X))}setGridCell(n,r){x(`setCell:${n} '${r}}'`);const i=!0;Ne(this,p(this,$).modelCell(n),r,i)}loadCrosswordSource(n,r,i=""){d(n,"[mimeType] is undefined or null"),d(r,"[crosswordSourceText] is undefined or null"),x(`loadCrosswordSource: ${n} ${i}`);const t=cn(n,r);return t?S(this,Te,dn).call(this,t):(x(`loadCrosswordSource: invalid crossword definition "${i}"`,"error"),!1)}setKeyboardEventBindings(n){d(n==null?void 0:n.length,"[eventBindings] argument is empty, null or undefined.");const r=["keydown","keyup"];n.forEach(i=>{var l,o;d((l=i.eventName)==null?void 0:l.trim(),'Missing or empty "eventName" property for event binding.');const t=i.eventName.trim().toLowerCase();d(r.includes(t),`Binding event name "${i.eventName}" is not supported.`),d((o=i.keyBindings)==null?void 0:o.length,`Missing or empty "keyBindings" array property for [${t}].`),x(`setKeyboardEventBindings: Setting keyBindings for "${t}".`),p(this,se)[t]=i.keyBindings})}testCurrentClue(){x(`testCurrentClue:${this.currentClue}`);const n=!0,r=ii(this,this.currentClue,n);return S(this,N,M).call(this,"clueTested",r),r===I.correct?S(this,V,fe).call(this,"clueSolved",this.currentClue):r===I.incomplete&&S(this,V,fe).call(this,"clueIncomplete",this.currentClue),r}testCrossword(){x("testCrossword");const r=ti(this,!0);return S(this,N,M).call(this,"crosswordTested",r),r===I.correct?S(this,V,fe).call(this,"crosswordSolved",p(this,K)):r===I.incomplete&&S(this,V,fe).call(this,"crosswordIncomplete",p(this,K)),r}revealCurrentCell(){Ge(this,this.currentCell),S(this,N,M).call(this,"cellRevealed",this.currentCell),S(this,ce,qe).call(this)}revealCurrentClue(){ni(this,this.currentClue),S(this,N,M).call(this,"clueRevealed",this.currentClue),S(this,ce,qe).call(this)}revealCrossword(){x("revealCrossword"),ri(this),S(this,N,M).call(this,"crosswordRevealed",this.model)}resetCurrentClue(){oi(this,this.currentClue),S(this,N,M).call(this,"clueReset",this.currentClue)}resetCrossword(){x("resetCrossword"),ui(this),S(this,N,M).call(this,"crosswordReset",this.model)}cleanCurrentClue(){si(this,this.currentClue),S(this,N,M).call(this,"clueCleaned",this.currentClue)}cleanCrossword(){x("cleanCrossword"),ci(this),S(this,N,M).call(this,"crosswordCleaned",this.model)}}ue=new WeakMap,$=new WeakMap,xe=new WeakMap,K=new WeakMap,Q=new WeakMap,Ce=new WeakMap,we=new WeakMap,ve=new WeakMap,se=new WeakMap,ye=new WeakMap,Ee=new WeakMap,Ae=new WeakMap,X=new WeakMap,be=new WeakMap,He=new WeakMap,Se=new WeakSet,fn=function(){return p(this,Z,Le).ownerDocument},Z=new WeakSet,Le=function(){return p(this,we)},J=new WeakSet,ke=function(){return p(this,Ce)},Te=new WeakSet,dn=function(n){var i;const r=Mr(n);return r?(this.model&&(p(this,Z,Le).removeChild(this.gridView),(i=p(this,J,ke))==null||i.removeChild(this.cluesView),B(this,$,new gn)),B(this,K,r),B(this,ve,zr(p(this,Se,fn),this.model,p(this,$))),p(this,$).modelCells.filter(t=>t.light).forEach(t=>{S(this,Ve,Kr).call(this,t.cellElement),S(this,Ke,Yr).call(this,this.inputElement(t))}),p(this,Z,Le).appendChild(this.gridView),p(this,J,ke)&&(B(this,xe,Wr(p(this,Se,fn),this)),p(this,J,ke).appendChild(this.cluesView)),this.currentClue=this.model.acrossClues.headSegments[0],S(this,N,M).call(this,"crosswordLoaded",n),!0):(x("#bindDefinition: crosswordModel creation failed","error"),!1)},Pe=new WeakMap,Ue=new WeakMap,_e=new WeakMap,Ye=new WeakMap,N=new WeakSet,M=function(n,r){x(`stateChange: ${n}`),p(this,Ee).publish(n,r)},V=new WeakSet,fe=function(n,r){d(this.controllerEventNames.includes(n),`unknown event "${n}"`),setTimeout(()=>{S(this,N,M).call(this,n,r)},to)},ce=new WeakSet,qe=function(){x("checkSolved"),li(this)===I.correct&&S(this,V,fe).call(this,"crosswordSolved",this.model)},Ke=new WeakSet,Yr=function(n){d(n,"inputElement is null or undefined");const r=this;n.addEventListener("focus",i=>{var l;const t=r.cell(i.target.parentNode);x(`event:focus ${t}`),r.currentCell!==t&&(r.currentCell=t),r.lastMoveEvent="focus",p(l=r,Ye).call(l,t)}),n.addEventListener("click",i=>{const t=r.cell(i.target.parentNode);x(`event:click ${t}`),t===r.currentCell?r.lastMoveEvent==="click"&&xn(r,t):r.currentCell=t,r.lastMoveEvent="click"})},Ve=new WeakSet,Kr=function(n){const r=this;Object.keys(p(r,se)).forEach(i=>{const t=p(r,se)[i];d(t,`"${i}" bindings are null or undefined.`),n.addEventListener(i,l=>{const o=l.key;x(`event:${i} key=[${o}]`);const u=t.find(s=>s.key===o);if(u){l.preventDefault();const s=j.name(o).toUpperCase();x(l.shiftKey?`SHIFT+${s}`:s);const c=r.cell(l.target.parentNode);u.action(r,l,c)}})}),n.addEventListener("keypress",i=>{var s;x("event:keypress"),i.preventDefault();const[t,l]=[r.cell(i.target.parentNode),i.key],[o,u]=[l.toLowerCase(),l.toUpperCase()];ro.test(o)&&(x(`Setting cell content: [${u}]`),Ln(r,i,u),ne(r.incorrectElement(t)),S(s=r,ce,qe).call(s)),io.test(o)&&(x("Advancing to next cell"),bn(r,t))})};const lo={assert:d,ecs:pn,eid:hn,trace:x,tracing:qr};w.Controller=Hr,w.compileCrossword=Mr,w.convertSourceFileToDefinition=Ql,w.helpers=lo,w.newCrosswordController=no,w.newCrosswordDefinition=cn,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})}); diff --git a/docs/crossword-styling.md b/docs/crossword-styling.md index a5ec468..a37f074 100644 --- a/docs/crossword-styling.md +++ b/docs/crossword-styling.md @@ -14,15 +14,15 @@ The library ships with some simple default styles out of the box, under [`./dist/crosswords.css`][19], which can be applied in the normal way (e.g. `import 'crosswords-js/dist/crosswords.css'`, if your bundler has a CSS file loader). The styles use [CSS variables][17] to set styles. Some of these variables can be overridden to customise the look and feel of the crosswords on your web page. Refer to [`./style/cwdimensions.less`][11] to see variables related to UI sizing and dimensions, at various breakpoints (screen widths). See [`./style/cwcolors.less`][12] for variables related to colors (highlight/active/grid colors, etc.). -The crossword uses [CSS grid][1] to arrange the cells, so the styles that we recommend you do _not_ modify are the properties related to that. That is, the `grid-template-rows` and `grid-template-columns` properties, as well as the CSS variables `--row-count` and `--column-count` which are set directly from JavaScript. Changing them can break the visual layout of the crossword. +The crossword uses [CSS grid][1] to arrange the cells, so the styles that we recommend you do _not_ modify are the properties related to that. Specifically, the `grid-template-rows` and `grid-template-columns` properties. The values of those properties contain CSS variables `--row-count` and `--column-count`, respectively. The variable values are set directly in JavaScript ([newCrosswordGridView()][21]) from the puzzle dimensions, whenever a puzzle is loaded. Changing the `grid-template-*` properties can break the visual layout of the crossword. -A goal of this library is to allow users to style their crosswords easily, while providing sensible defaults - but if the styles shipped by this library prove difficult to override in some areas (for example, if you find yourself having to override one thing in several places, or use `!important`), please [raise an issue][20]. +A goal of this library is to allow users to style their crosswords easily, while providing sensible defaults. If the styles shipped by this library prove difficult to override in some areas (for example, if you find yourself having to override one thing in several places, or use `!important`), please [raise an issue][20]. ## Internals - The stylesheets for the **crosswords-js** module are located in the [`style`][8] directory - The stylesheets are mostly written in [Less][5], which is a [CSS][6] preprocessor. -- The _Less_ source code is converted to _CSS_ automatically by the [ViteJS][7] bundler for the demo app, and using [lessc via the command-line][18] for npm distribution. +- The _Less_ source code is converted to _CSS_ automatically by the [ViteJS][7] bundler for the demo app, and for npm distribution. The styles are spread across four files: @@ -81,3 +81,4 @@ The styles are spread across four files: [18]: https://lesscss.org/usage/#command-line-usage [19]: ../dist/crosswords.css [20]: https://github.com/dwmkerr/crosswords-js/issues +[21]: ../src/crossword-gridview.mjs diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index cc796a1..0000000 --- a/jsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "module": "system", - "noImplicitAny": true, - "removeComments": true, - "preserveConstEnums": true, - "outFile": "../../built/local/tsc.js", - "sourceMap": true - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "**/*.spec.ts"] -} diff --git a/makefile b/makefile deleted file mode 100644 index 93e69f2..0000000 --- a/makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Create the distributables. -build: - npm i - ./node_modules/.bin/webpack-cli --mode=production - -# Serve the sample site locally for testing. -serve: - ./node_modules/.bin/webpack-dev-server - -# Execute all tests/linting. -test: - npm run lint - npm run test:coverage - -# Build the static site. -build-sample-site: - # Clean up the artifacts folder, create the sample site location. - rm -rf artifacts || true - mkdir artifacts - mkdir artifacts/sample-site - cp -r dist/. sample/. artifacts/sample-site/. - -.PHONY: build serve build-sample-site diff --git a/package-lock.json b/package-lock.json index ad7b161..021b680 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,33 +9,22 @@ "version": "0.1.14", "license": "MIT", "dependencies": { - "yaml": "^2.3.1" + "js-yaml": "^4.1.0" }, "devDependencies": { "chai": "^4.3.7", - "connect-livereload": "^0.6.1", "cspell": "^6.30.2", - "css-loader": "^6.7.3", "eslint": "^8.33.0", - "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-prettier": "^5.0.0", "esm": "^3.2.25", "ignore-styles": "^5.0.1", "less": "^4.1.3", - "less-loader": "^11.1.0", - "mini-css-extract-plugin": "^2.7.2", "mocha": "^10.2.0", "nyc": "^15.1.0", - "open": "^8.4.0", "prettier": "^3.0.0", - "style-loader": "^3.3.1", - "typescript": "^5.0.4", - "vite": "^4.2.1", - "webpack": "^5.76.2", - "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.11.1" + "vite": "^4.2.1" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -145,18 +134,18 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", - "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", + "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.0.tgz", - "integrity": "sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", + "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -164,10 +153,10 @@ "@babel/generator": "^7.23.0", "@babel/helper-compilation-targets": "^7.22.15", "@babel/helper-module-transforms": "^7.23.0", - "@babel/helpers": "^7.23.0", + "@babel/helpers": "^7.23.2", "@babel/parser": "^7.23.0", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.0", + "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", @@ -355,13 +344,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.1.tgz", - "integrity": "sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", + "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.0", + "@babel/traverse": "^7.23.2", "@babel/types": "^7.23.0" }, "engines": { @@ -480,9 +469,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.0.tgz", - "integrity": "sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.22.13", @@ -638,15 +627,15 @@ "dev": true }, "node_modules/@cspell/dict-companies": { - "version": "3.0.24", - "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.0.24.tgz", - "integrity": "sha512-zn9QN99yIvhpGl6fZwt0mvHYcsV2w6XDdK2XWA86A0s9A94U1LCCUsvA4wijUclbZEj9ewsNMlidHcV/D329eQ==", + "version": "3.0.26", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.0.26.tgz", + "integrity": "sha512-BGRZ/Uykx+IgQoTGqvRqbBMQy7QSuY0pbTHgtmKtc1scgzZMJQKMDwyuE6LJzlhdlrV7TsVY0lyXREybnDpQPQ==", "dev": true }, "node_modules/@cspell/dict-cpp": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-5.0.5.tgz", - "integrity": "sha512-ojCpQ4z+sHHLJYfvA3SApqQ1BjO/k3TUdDgqR3sVhFl5qjT9yz1/srBNzqCaBBSz/fiO5A8NKdSA9+IFrUHcig==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-5.0.9.tgz", + "integrity": "sha512-ql9WPNp8c+fhdpVpjpZEUWmxBHJXs9CJuiVVfW/iwv5AX7VuMHyEwid+9/6nA8qnCxkUQ5pW83Ums1lLjn8ScA==", "dev": true }, "node_modules/@cspell/dict-cryptocurrencies": { @@ -662,9 +651,9 @@ "dev": true }, "node_modules/@cspell/dict-css": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.10.tgz", - "integrity": "sha512-3W5rBoOJQDs3pty0TxRd2xDolTYaOk7rdsWVv3rs8YpyyHNEJIfI/zXGjYECmCAmZiUVvCnorNawUSComOo5uQ==", + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.12.tgz", + "integrity": "sha512-vGBgPM92MkHQF5/2jsWcnaahOZ+C6OE/fPvd5ScBP72oFY9tn5GLuomcyO0z8vWCr2e0nUSX1OGimPtcQAlvSw==", "dev": true }, "node_modules/@cspell/dict-dart": { @@ -704,9 +693,9 @@ "dev": true }, "node_modules/@cspell/dict-en_us": { - "version": "4.3.8", - "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.8.tgz", - "integrity": "sha512-rCPsbDHuRnFUbzWAY6O1H9+cLZt5FNQwjPVw2TdQZfipdb0lim984aLGY+nupi1iKC3lfjyd5SVUgmSZEG1QNA==", + "version": "4.3.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.11.tgz", + "integrity": "sha512-GhdavZFlS2YbUNcRtPbgJ9j6aUyq116LmDQ2/Q5SpQxJ5/6vVs8Yj5WxV1JD+Zh/Zim1NJDcneTOuLsUGi+Czw==", "dev": true }, "node_modules/@cspell/dict-en-common-misspellings": { @@ -752,9 +741,9 @@ "dev": true }, "node_modules/@cspell/dict-golang": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.3.tgz", - "integrity": "sha512-KiNnjAeqDBq6zH4s46hzBrKgqIrkSZ9bbHzQ54PbHfe+jurZkSZ4lXz6E+315RNh2TkRLcNppFvaZqJvKZXomA==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.4.tgz", + "integrity": "sha512-jOfewPEyN6U9Q80okE3b1PTYBfqZgHh7w4o271GSuAX+VKJ1lUDhdR4bPKRxSDdO5jHArw2u5C8nH2CWGuygbQ==", "dev": true }, "node_modules/@cspell/dict-haskell": { @@ -782,9 +771,9 @@ "dev": true }, "node_modules/@cspell/dict-k8s": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.1.tgz", - "integrity": "sha512-gc5y4Nm3hVdMZNBZfU2M1AsAmObZsRWjCUk01NFPfGhFBXyVne41T7E62rpnzu5330FV/6b/TnFcPgRmak9lLw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.2.tgz", + "integrity": "sha512-tLT7gZpNPnGa+IIFvK9SP1LrSpPpJ94a/DulzAPOb1Q2UBFwdpFd82UWhio0RNShduvKG/WiMZf/wGl98pn+VQ==", "dev": true }, "node_modules/@cspell/dict-latex": { @@ -800,9 +789,9 @@ "dev": true }, "node_modules/@cspell/dict-lua": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.1.tgz", - "integrity": "sha512-j0MFmeCouSoC6EdZTbvGe1sJ9V+ruwKSeF+zRkNNNload7R72Co5kX1haW2xLHGdlq0kqSy1ODRZKdVl0e+7hg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.2.tgz", + "integrity": "sha512-eeC20Q+UnHcTVBK6pgwhSjGIVugO2XqU7hv4ZfXp2F9DxGx1RME0+1sKX4qAGhdFGwOBsEzb2fwUsAEP6Mibpg==", "dev": true }, "node_modules/@cspell/dict-node": { @@ -812,15 +801,15 @@ "dev": true }, "node_modules/@cspell/dict-npm": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.0.10.tgz", - "integrity": "sha512-idwEgqP6Rgxr6W9UFCfS4E8gIpM1cwEz24+VOnMc/0hFztu9MTtAu8wkdKcBuHG2mQuplqbLLcL0e1cy68ecOQ==", + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.0.12.tgz", + "integrity": "sha512-T/+WeQmtbxo7ad6hrdI8URptYstKJP+kXyWJZfuVJJGWJQ7yubxrI5Z5AfM+Dh/ff4xHmdzapxD9adaEQ727uw==", "dev": true }, "node_modules/@cspell/dict-php": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.3.tgz", - "integrity": "sha512-PxtSmWJCDEB4M8R9ER9ijxBum/tvUqYT26QeuV58q2IFs5IrPZ6hocQKvnFGXItjCWH4oYXyAEAAzINlBC4Opg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.4.tgz", + "integrity": "sha512-fRlLV730fJbulDsLIouZxXoxHt3KIH6hcLFwxaupHL+iTXDg0lo7neRpbqD5MScr/J3idEr7i9G8XWzIikKFug==", "dev": true }, "node_modules/@cspell/dict-powershell": { @@ -830,9 +819,9 @@ "dev": true }, "node_modules/@cspell/dict-public-licenses": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.4.tgz", - "integrity": "sha512-KjsfuGwMWvPkp6s0nR+s4mZc9SQhh1tHDOyQZfEVRwi+2ev7f8l7R6ts9sP2Mplb8UcxwO6YmKwxHjN+XHoMoA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.5.tgz", + "integrity": "sha512-91HK4dSRri/HqzAypHgduRMarJAleOX5NugoI8SjDLPzWYkwZ1ftuCXSk+fy8DLc3wK7iOaFcZAvbjmnLhVs4A==", "dev": true }, "node_modules/@cspell/dict-python": { @@ -851,9 +840,9 @@ "dev": true }, "node_modules/@cspell/dict-ruby": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.0.tgz", - "integrity": "sha512-ssb96QxLZ76yPqFrikWxItnCbUKhYXJ2owkoIYzUGNFl2CHSoHCb5a6Zetum9mQ/oUA3gNeUhd28ZUlXs0la2A==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.1.tgz", + "integrity": "sha512-rruTm7Emhty/BSYavSm8ZxRuVw0OBqzJkwIFXcV0cX7To8D1qbmS9HFHRuRg8IL11+/nJvtdDz+lMFBSmPUagQ==", "dev": true }, "node_modules/@cspell/dict-rust": { @@ -869,15 +858,15 @@ "dev": true }, "node_modules/@cspell/dict-software-terms": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-3.3.2.tgz", - "integrity": "sha512-OLyBo9IBB2w8m98OI75npY+Q3tdUdhtarXTj+fKKlwP7I2lXZcphNO3v1WxZvkpQF9z+39bWud4VvFozIdLMcg==", + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-3.3.9.tgz", + "integrity": "sha512-/O3EWe0SIznx18S7J3GAXPDe7sexn3uTsf4IlnGYK9WY6ZRuEywkXCB+5/USLTGf4+QC05pkHofphdvVSifDyA==", "dev": true }, "node_modules/@cspell/dict-sql": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.1.1.tgz", - "integrity": "sha512-v1mswi9NF40+UDUMuI148YQPEQvWjac72P6ZsjlRdLjEiQEEMEsTQ+zlkIdnzC9QCNyJaqD5Liq9Mn78/8Zxtw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.1.2.tgz", + "integrity": "sha512-Pi0hAcvsSGtZZeyyAN1VfGtQJbrXos5x2QjJU0niAQKhmITSOrXU/1II1Gogk+FYDjWyV9wP2De0U2f7EWs6oQ==", "dev": true }, "node_modules/@cspell/dict-svelte": { @@ -925,15 +914,6 @@ "node": ">=14.6" } }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/@esbuild/android-arm": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", @@ -1302,9 +1282,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.0.tgz", - "integrity": "sha512-zJmuCWj2VLBt4c25CfBIbMZLGLyhkvs7LznyVX5HfpzeocThgIj5XQK4L+g3U36mMcx8bPMhGyPpwCATamC4jQ==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", + "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -1334,21 +1314,21 @@ } }, "node_modules/@eslint/js": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", - "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", + "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", - "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", + "@humanwhocodes/object-schema": "^2.0.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, @@ -1370,9 +1350,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { @@ -1506,16 +1486,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", - "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", @@ -1523,21 +1493,15 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.19", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", - "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@leichtgewicht/ip-codec": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", - "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", - "dev": true - }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1593,436 +1557,18 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@pkgr/utils/node_modules/define-lazy-prop": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", - "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@pkgr/utils/node_modules/open": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", - "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", - "dev": true, - "dependencies": { - "default-browser": "^4.0.0", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@types/body-parser": { - "version": "1.19.3", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.3.tgz", - "integrity": "sha512-oyl4jvAfTGX9Bt6Or4H9ni1Z447/tQuxnZsytsCaExKlmJiU8sFgnIBRzJUpKwB5eWn9HuBYlUlVA74q/yN0eQ==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/bonjour": { - "version": "3.5.11", - "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.11.tgz", - "integrity": "sha512-isGhjmBtLIxdHBDl2xGwUzEM8AOyOvWsADWq7rqirdi/ZQoHnLWErHvsThcEzTX8juDRiZtzp2Qkv5bgNh6mAg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.36", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.36.tgz", - "integrity": "sha512-P63Zd/JUGq+PdrM1lv0Wv5SBYeA2+CORvbrXbngriYY0jzLUWfQMQQxOhjONEz/wlHOAxOdY7CY65rgQdTjq2w==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect-history-api-fallback": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.5.1.tgz", - "integrity": "sha512-iaQslNbARe8fctL5Lk+DsmgWOM83lM+7FzP0eQUJs1jd3kBE8NWqBTIT2S8SqQOJjxvt2eyIjpOuYeRXq2AdMw==", - "dev": true, - "dependencies": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "node_modules/@types/eslint": { - "version": "8.44.3", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.3.tgz", - "integrity": "sha512-iM/WfkwAhwmPff3wZuPLYiHX18HI24jU8k1ZSH7P8FHwxTjZ2P6CoX2wnF43oprR+YXJM6UUxATkNvyv/JHd+g==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.5", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.5.tgz", - "integrity": "sha512-JNvhIEyxVW6EoMIFIvj93ZOywYFatlpu9deeH6eSx6PE3WHYvHaQtmHmQeNw7aA81bYGBPPQqdtBm6b1SsQMmA==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", - "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", - "dev": true - }, - "node_modules/@types/express": { - "version": "4.17.18", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.18.tgz", - "integrity": "sha512-Sxv8BSLLgsBYmcnGdGjjEjqET2U+AKAdCRODmMiq02FgjwuV75Ut85DRpvFjyw/Mk0vgUOliGRU0UUmuuZHByQ==", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.37", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.37.tgz", - "integrity": "sha512-ZohaCYTgGFcOP7u6aJOhY9uIZQgZ2vxC2yWoArY+FeDXlqeH66ZVBjgvg+RLVAS/DWNq4Ap9ZXu1+SUQiiWYMg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*", - "@types/send": "*" - } - }, - "node_modules/@types/http-errors": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.2.tgz", - "integrity": "sha512-lPG6KlZs88gef6aD85z3HNkztpj7w2R7HmR3gygjfXCQmsLloWNARFkMuzKiiY8FGdh1XDpgBdrSf4aKDiA7Kg==", - "dev": true - }, - "node_modules/@types/http-proxy": { - "version": "1.17.12", - "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.12.tgz", - "integrity": "sha512-kQtujO08dVtQ2wXAuSFfk9ASy3sug4+ogFR8Kd8UgP8PEuc1/G/8yjYRmp//PcDNJEUKOza/MrQu15bouEUCiw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/json-schema": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", - "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", - "dev": true - }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", "dev": true }, - "node_modules/@types/mime": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.3.tgz", - "integrity": "sha512-Ys+/St+2VF4+xuY6+kDIXGxbNRO0mesVg0bbxEfB97Od1Vjpjx9KD1qxs64Gcb3CWPirk9Xe+PT4YiiHQ9T+eg==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.7.1.tgz", - "integrity": "sha512-LT+OIXpp2kj4E2S/p91BMe+VgGX2+lfO+XTpfXhh+bCk2LkQtHZSub8ewFBMGP5ClysPjTDFa4sMI8Q3n4T0wg==", - "dev": true - }, - "node_modules/@types/qs": { - "version": "6.9.8", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.8.tgz", - "integrity": "sha512-u95svzDlTysU5xecFNTgfFG5RUWu1A9P0VzgpcIiGZA9iraHOdSzcxMxQ55DyeRaGCSxQi7LxXDI4rzq/MYfdg==", - "dev": true - }, - "node_modules/@types/range-parser": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.5.tgz", - "integrity": "sha512-xrO9OoVPqFuYyR/loIHjnbvvyRZREYKLjxV4+dY6v3FQR3stQ9ZxIGkaclF7YhI9hfjpuTbu14hZEy94qKLtOA==", - "dev": true - }, - "node_modules/@types/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==", - "dev": true - }, - "node_modules/@types/send": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.2.tgz", - "integrity": "sha512-aAG6yRf6r0wQ29bkS+x97BIs64ZLxeE/ARwyS6wrldMm3C1MdKwCcnnEwMC1slI8wuxJOpiUH9MioC0A0i+GJw==", - "dev": true, - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-index": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.2.tgz", - "integrity": "sha512-asaEIoc6J+DbBKXtO7p2shWUpKacZOoMBEGBgPG91P8xhO53ohzHWGCs4ScZo5pQMf5ukQzVT9fhX1WzpHihig==", - "dev": true, - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.3.tgz", - "integrity": "sha512-yVRvFsEMrv7s0lGhzrggJjNOSmZCdgCjw9xWrPr/kNNLp6FaDfMC1KaYl3TSJ0c58bECwNBMoQrZJ8hA8E1eFg==", - "dev": true, - "dependencies": { - "@types/http-errors": "*", - "@types/mime": "*", - "@types/node": "*" - } - }, - "node_modules/@types/sockjs": { - "version": "0.3.34", - "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.34.tgz", - "integrity": "sha512-R+n7qBFnm/6jinlteC9DBL5dGiDGjWAvjo4viUanpnc/dG1y7uDoacXPIQ/PQEg1fI912SMHIa014ZjRpvDw4g==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/ws": { - "version": "8.5.6", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.6.tgz", - "integrity": "sha512-8B5EO9jLVCy+B58PLHvLDuOD8DRVMgQzq8d55SjLCOn9kqGyqOvy27exVaTio1q1nX5zLu8/6N0n2ThSxOM6tg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", - "dev": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webpack-cli/configtest": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", - "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x", - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", - "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", - "dev": true, - "dependencies": { - "envinfo": "^7.7.3" - }, - "peerDependencies": { - "webpack-cli": "4.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", - "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true, - "peerDependencies": { - "webpack-cli": "4.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { + "node_modules/@ungap/structured-clone": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", @@ -2035,15 +1581,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -2082,54 +1619,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -2139,18 +1628,6 @@ "node": ">=6" } }, - "node_modules/ansi-html-community": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", - "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", - "dev": true, - "engines": [ - "node >= 0.8.0" - ], - "bin": { - "ansi-html": "bin/ansi-html" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2209,8 +1686,7 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", @@ -2225,12 +1701,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-flatten": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", - "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==", - "dev": true - }, "node_modules/array-includes": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", @@ -2359,12 +1829,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true - }, "node_modules/big-integer": { "version": "1.6.51", "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", @@ -2383,78 +1847,6 @@ "node": ">=8" } }, - "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/bonjour-service": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.1.1.tgz", - "integrity": "sha512-Z/5lQRMOG9k7W+FkeGTNjh7htqn/2LMnfOvBZ8pynNZCM9MwkQkI3zeI4oz09uWdcgmgHugVvBqxGg4VQJ5PCg==", - "dev": true, - "dependencies": { - "array-flatten": "^2.1.2", - "dns-equal": "^1.0.0", - "fast-deep-equal": "^3.1.3", - "multicast-dns": "^7.2.5" - } - }, "node_modules/bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -2527,12 +1919,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, "node_modules/bundle-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", @@ -2548,15 +1934,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/caching-transform": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", @@ -2573,13 +1950,14 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2604,9 +1982,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001541", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001541.tgz", - "integrity": "sha512-bLOsqxDgTqUBkzxbNlSBt8annkDpQB9NdzdTbO2ooJ+eC/IQcvDspDc058g84ejCelF7vHUx57KIOjEecOHXaw==", + "version": "1.0.30001554", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001554.tgz", + "integrity": "sha512-A2E3U//MBwbJVzebddm1YfNp7Nud5Ip+IPn4BozBmn4KqVX7AvluoIDFWjsv5OkGnKUXQVmMSoMKLa3ScCblcQ==", "dev": true, "funding": [ { @@ -2708,15 +2086,6 @@ "node": ">= 6" } }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true, - "engines": { - "node": ">=6.0" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -2753,20 +2122,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2785,12 +2140,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/colorette": { - "version": "2.0.20", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", - "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", - "dev": true - }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", @@ -2822,57 +2171,6 @@ "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, - "node_modules/compressible": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", - "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==", - "dev": true, - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz", - "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==", - "dev": true, - "dependencies": { - "accepts": "~1.3.5", - "bytes": "3.0.0", - "compressible": "~2.0.16", - "debug": "2.6.9", - "on-headers": "~1.0.2", - "safe-buffer": "5.1.2", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/compression/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/compression/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2896,72 +2194,12 @@ "node": ">=8" } }, - "node_modules/confusing-browser-globals": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", - "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", - "dev": true - }, - "node_modules/connect-history-api-fallback": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", - "integrity": "sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/connect-livereload": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.6.1.tgz", - "integrity": "sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", "dev": true }, - "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true - }, "node_modules/copy-anything": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", @@ -3173,44 +2411,6 @@ "node": ">=14" } }, - "node_modules/css-loader": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.8.1.tgz", - "integrity": "sha512-xDAXtEVGlD0gJ07iclwWVkLoZOpEvAWaSyf6W18S2pOC//K8+qUDIx8IIT3D+HjnmkJPQeesOPv5aiUaJsCM2g==", - "dev": true, - "dependencies": { - "icss-utils": "^5.1.0", - "postcss": "^8.4.21", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.3", - "postcss-modules-scope": "^3.0.0", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "semver": "^7.3.8" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3289,128 +2489,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/default-browser/node_modules/execa": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", - "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.1", - "human-signals": "^4.3.0", - "is-stream": "^3.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^5.1.0", - "onetime": "^6.0.0", - "signal-exit": "^3.0.7", - "strip-final-newline": "^3.0.0" - }, - "engines": { - "node": "^14.18.0 || ^16.14.0 || >=18.0.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/default-browser/node_modules/human-signals": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", - "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", - "dev": true, - "engines": { - "node": ">=14.18.0" - } - }, - "node_modules/default-browser/node_modules/is-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", - "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/mimic-fn": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/npm-run-path": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", - "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", - "dev": true, - "dependencies": { - "path-key": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/onetime": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", - "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser/node_modules/strip-final-newline": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", - "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-gateway": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", - "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", - "dev": true, - "dependencies": { - "execa": "^5.0.0" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/default-require-extensions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", @@ -3427,9 +2505,9 @@ } }, "node_modules/define-data-property": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.0.tgz", - "integrity": "sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", "dev": true, "dependencies": { "get-intrinsic": "^1.2.1", @@ -3441,12 +2519,15 @@ } }, "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", "dev": true, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/define-properties": { @@ -3466,31 +2547,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-node": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", - "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==", - "dev": true - }, "node_modules/diff": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", @@ -3500,24 +2556,6 @@ "node": ">=0.3.1" } }, - "node_modules/dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg==", - "dev": true - }, - "node_modules/dns-packet": { - "version": "5.6.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-5.6.1.tgz", - "integrity": "sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw==", - "dev": true, - "dependencies": { - "@leichtgewicht/ip-codec": "^2.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3542,16 +2580,10 @@ "node": ">=8" } }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, "node_modules/electron-to-chromium": { - "version": "1.4.536", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.536.tgz", - "integrity": "sha512-L4VgC/76m6y8WVCgnw5kJy/xs7hXrViCFdNKVG8Y7B2isfwrFryFyJzumh3ugxhd/oB1uEaEEvRdmeLrnd7OFA==", + "version": "1.4.566", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.566.tgz", + "integrity": "sha512-mv+fAy27uOmTVlUULy15U3DVJ+jg+8iyKH1bpwboCRhtDC69GKf1PPTZvEIhCyDr81RFqfxZJYrbgp933a1vtg==", "dev": true }, "node_modules/emoji-regex": { @@ -3560,40 +2592,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/envinfo": { - "version": "7.10.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", - "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/errno": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", @@ -3617,26 +2615,26 @@ } }, "node_modules/es-abstract": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz", - "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==", + "version": "1.22.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", + "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", "arraybuffer.prototype.slice": "^1.0.2", "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.5", "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.1", + "get-intrinsic": "^1.2.2", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has": "^1.0.3", "has-property-descriptors": "^1.0.0", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", + "hasown": "^2.0.0", "internal-slot": "^1.0.5", "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", @@ -3646,7 +2644,7 @@ "is-string": "^1.0.7", "is-typed-array": "^1.1.12", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.3", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.5.1", @@ -3660,7 +2658,7 @@ "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -3669,33 +2667,27 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", - "dev": true - }, "node_modules/es-set-tostringtag": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", - "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", + "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.3", - "has": "^1.0.3", - "has-tostringtag": "^1.0.0" + "get-intrinsic": "^1.2.2", + "has-tostringtag": "^1.0.0", + "hasown": "^2.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" } }, "node_modules/es-to-primitive": { @@ -3767,12 +2759,6 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -3786,18 +2772,19 @@ } }, "node_modules/eslint": { - "version": "8.50.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", - "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", + "version": "8.52.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", + "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.50.0", - "@humanwhocodes/config-array": "^0.11.11", + "@eslint/js": "8.52.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -3839,34 +2826,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-config-airbnb-base": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", - "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", - "dev": true, - "dependencies": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.5", - "semver": "^6.3.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "peerDependencies": { - "eslint": "^7.32.0 || ^8.2.0", - "eslint-plugin-import": "^2.25.2" - } - }, - "node_modules/eslint-config-airbnb-base/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/eslint-config-prettier": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", @@ -3926,26 +2885,26 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.28.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", - "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", + "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", "dev": true, "dependencies": { - "array-includes": "^3.1.6", - "array.prototype.findlastindex": "^1.2.2", - "array.prototype.flat": "^1.3.1", - "array.prototype.flatmap": "^1.3.1", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.7", + "eslint-import-resolver-node": "^0.3.9", "eslint-module-utils": "^2.8.0", - "has": "^1.0.3", - "is-core-module": "^2.13.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.6", - "object.groupby": "^1.0.0", - "object.values": "^1.1.6", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", "semver": "^6.3.1", "tsconfig-paths": "^3.14.2" }, @@ -3987,9 +2946,9 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz", - "integrity": "sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.1.tgz", + "integrity": "sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0", @@ -4124,116 +3083,41 @@ "node": ">=0.10.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "dev": true - }, - "node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", "dev": true, "dependencies": { "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" }, "engines": { - "node": ">=10" + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dev": true, - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/execa/node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4292,15 +3176,6 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", - "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", - "dev": true, - "engines": { - "node": ">= 4.9.1" - } - }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", @@ -4310,18 +3185,6 @@ "reusify": "^1.0.4" } }, - "node_modules/faye-websocket": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz", - "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==", - "dev": true, - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -4346,39 +3209,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, "node_modules/find-cache-dir": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", @@ -4422,12 +3252,12 @@ } }, "node_modules/flat-cache": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", - "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", + "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", "dev": true, "dependencies": { - "flatted": "^3.2.7", + "flatted": "^3.2.9", "keyv": "^4.5.3", "rimraf": "^3.0.2" }, @@ -4441,26 +3271,6 @@ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, - "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -4483,24 +3293,6 @@ "node": ">=8.0.0" } }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fromentries": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", @@ -4521,12 +3313,6 @@ } ] }, - "node_modules/fs-monkey": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.5.tgz", - "integrity": "sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==", - "dev": true - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4548,10 +3334,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/function.prototype.name": { "version": "1.1.6", @@ -4617,15 +3406,15 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", - "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", + "function-bind": "^1.1.2", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3" + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4712,12 +3501,6 @@ "node": ">=10.13.0" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, "node_modules/global-dirs": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", @@ -4731,9 +3514,9 @@ } }, "node_modules/globals": { - "version": "13.22.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", - "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -4784,24 +3567,6 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, - "node_modules/handle-thing": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", - "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -4830,12 +3595,12 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.1" + "get-intrinsic": "^1.2.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4905,6 +3670,18 @@ "node": ">=8" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -4914,184 +3691,42 @@ "he": "bin/he" } }, - "node_modules/hpack.js": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", - "integrity": "sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "node_modules/hpack.js/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "node_modules/hpack.js/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "engines": { + "node": ">=14.18.0" } }, - "node_modules/hpack.js/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/hpack.js/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, + "optional": true, "dependencies": { - "safe-buffer": "~5.1.0" + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/html-entities": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.4.0.tgz", - "integrity": "sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==", + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/mdevils" - }, - { - "type": "patreon", - "url": "https://patreon.com/mdevils" - } - ] - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/http-deceiver": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", - "integrity": "sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw==", - "dev": true - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", - "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==", - "dev": true - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", - "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", - "dev": true, - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/http-proxy-middleware": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", - "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", - "dev": true, - "dependencies": { - "@types/http-proxy": "^1.17.8", - "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", - "is-plain-obj": "^3.0.0", - "micromatch": "^4.0.2" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@types/express": "^4.17.13" - }, - "peerDependenciesMeta": { - "@types/express": { - "optional": true - } - } - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "optional": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/icss-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "engines": { - "node": ">= 4" - } + "engines": { + "node": ">= 4" + } }, "node_modules/ignore-styles": { "version": "5.0.1", @@ -5149,25 +3784,6 @@ "node": ">=4" } }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/import-meta-resolve": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-2.2.2.tgz", @@ -5219,37 +3835,19 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", - "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", + "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.0", - "has": "^1.0.3", + "get-intrinsic": "^1.2.2", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { "node": ">= 0.4" } }, - "node_modules/interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/ipaddr.js": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", - "integrity": "sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", @@ -5323,12 +3921,12 @@ } }, "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5350,15 +3948,15 @@ } }, "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", "dev": true, "bin": { "is-docker": "cli.js" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5412,21 +4010,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-inside-container/node_modules/is-docker": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", - "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", - "dev": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -5482,27 +4065,12 @@ } }, "node_modules/is-plain-obj": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz", - "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/is-regex": { @@ -5647,6 +4215,21 @@ "node": ">=8" } }, + "node_modules/is-wsl/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", @@ -5659,15 +4242,6 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -5786,35 +4360,6 @@ "node": ">=8" } }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -5825,7 +4370,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -5882,33 +4426,14 @@ } }, "node_modules/keyv": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", - "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "dependencies": { "json-buffer": "3.0.1" } }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/launch-editor": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.0.tgz", - "integrity": "sha512-JpDCcQnyAAzZZaZ7vEiSqL690w7dAEyLao+KC96zBplnYbJS7TYNjvM3M7y3dGz+v7aIsJk3hllWuc0kWAjyRQ==", - "dev": true, - "dependencies": { - "picocolors": "^1.0.0", - "shell-quote": "^1.7.3" - } - }, "node_modules/less": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/less/-/less-4.2.0.tgz", @@ -5935,23 +4460,6 @@ "source-map": "~0.6.0" } }, - "node_modules/less-loader": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-11.1.3.tgz", - "integrity": "sha512-A5b7O8dH9xpxvkosNrP0dFp2i/dISOJa9WwGF3WJflfqIERE2ybxh1BFDj5CovC2+jCE4M354mk90hN6ziXlVw==", - "dev": true, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "less": "^3.5.0 || ^4.0.0", - "webpack": "^5.0.0" - } - }, "node_modules/less/node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -5995,15 +4503,6 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, - "node_modules/loader-runner": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", - "dev": true, - "engines": { - "node": ">=6.11.5" - } - }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -6048,12 +4547,12 @@ } }, "node_modules/loupe": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", - "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "dependencies": { - "get-func-name": "^2.0.0" + "get-func-name": "^2.0.1" } }, "node_modules/lru-cache": { @@ -6089,33 +4588,6 @@ "semver": "bin/semver.js" } }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memfs": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.5.3.tgz", - "integrity": "sha512-UERzLsxzllchadvbPs5aolHh65ISpKpM+ccLbOJ8/vvpBKmAWf+la7dXFy7Mr0ySHbdHrFv5kGFCUHHe6GFEmw==", - "dev": true, - "dependencies": { - "fs-monkey": "^1.0.4" - }, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -6131,15 +4603,6 @@ "node": ">= 8" } }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -6158,6 +4621,7 @@ "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "dev": true, + "optional": true, "bin": { "mime": "cli.js" }, @@ -6165,80 +4629,37 @@ "node": ">=4" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, "engines": { - "node": ">= 0.6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "mime-db": "1.52.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">= 0.6" + "node": "*" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/mini-css-extract-plugin": { - "version": "2.7.6", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.6.tgz", - "integrity": "sha512-Qk7HcgaPkGG6eD77mLvZS1nmxlao3j+9PkrT9Uc7HAE1id3F41+DdBRYRYkbyfNRGzm8/YWtzhw7nVPmwhqTQw==", - "dev": true, - "dependencies": { - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/mocha": { @@ -6329,19 +4750,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/multicast-dns": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz", - "integrity": "sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg==", - "dev": true, - "dependencies": { - "dns-packet": "^5.2.2", - "thunky": "^1.0.2" - }, - "bin": { - "multicast-dns": "cli.js" - } - }, "node_modules/nanoid": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", @@ -6388,21 +4796,6 @@ "ms": "^2.1.1" } }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -6423,15 +4816,6 @@ } } }, - "node_modules/node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", - "dev": true, - "engines": { - "node": ">= 6.13.0" - } - }, "node_modules/node-preload": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", @@ -6460,15 +4844,30 @@ } }, "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "path-key": "^4.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/nyc": { @@ -6631,9 +5030,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -6666,20 +5065,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.entries": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz", - "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.fromentries": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", @@ -6726,33 +5111,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/obuf": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", - "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", - "dev": true - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -6763,32 +5121,33 @@ } }, "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", "dev": true, "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", "is-wsl": "^2.2.0" }, "engines": { - "node": ">=12" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -6853,19 +5212,6 @@ "node": ">=8" } }, - "node_modules/p-retry": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", - "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", - "dev": true, - "dependencies": { - "@types/retry": "0.12.0", - "retry": "^0.13.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -6929,15 +5275,6 @@ "node": ">= 0.10" } }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -6971,12 +5308,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -7115,84 +5446,6 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-local-by-default": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.3.tgz", - "integrity": "sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-scope": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", - "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.4" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", - "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", - "dev": true, - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, "node_modules/postcss/node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -7247,12 +5500,6 @@ "node": ">=6.0.0" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, "node_modules/process-on-spawn": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", @@ -7265,28 +5512,6 @@ "node": ">=8" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-addr/node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", @@ -7303,21 +5528,6 @@ "node": ">=6" } }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -7347,65 +5557,6 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dev": true, - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -7418,18 +5569,6 @@ "node": ">=8.10.0" } }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", @@ -7477,31 +5616,16 @@ "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, "node_modules/resolve": { - "version": "1.22.6", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.6.tgz", - "integrity": "sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, "dependencies": { "is-core-module": "^2.13.0", @@ -7515,22 +5639,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "engines": { "node": ">=8" @@ -7548,15 +5660,6 @@ "node": ">=8" } }, - "node_modules/retry": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", - "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -7613,6 +5716,83 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/run-applescript/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/run-applescript/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7692,7 +5872,8 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true + "dev": true, + "optional": true }, "node_modules/sax": { "version": "1.3.0", @@ -7701,77 +5882,6 @@ "dev": true, "optional": true }, - "node_modules/schema-utils": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", - "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/schema-utils/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/schema-utils/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/schema-utils/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/select-hose": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", - "integrity": "sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==", - "dev": true - }, - "node_modules/selfsigned": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.1.1.tgz", - "integrity": "sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ==", - "dev": true, - "dependencies": { - "node-forge": "^1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -7805,51 +5915,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -7859,105 +5924,27 @@ "randombytes": "^2.1.0" } }, - "node_modules/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", - "dev": true, - "dependencies": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/serve-index/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/serve-index/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, - "node_modules/serve-index/node_modules/ms": { + "node_modules/set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/serve-index/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, - "node_modules/serve-index/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", "dev": true, "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" }, "engines": { - "node": ">= 0.8.0" + "node": ">= 0.4" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, "node_modules/set-function-name": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz", @@ -7972,24 +5959,6 @@ "node": ">= 0.4" } }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -8011,15 +5980,6 @@ "node": ">=8" } }, - "node_modules/shell-quote": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", - "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -8040,17 +6000,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/sockjs": { - "version": "0.3.24", - "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz", - "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==", - "dev": true, - "dependencies": { - "faye-websocket": "^0.11.3", - "uuid": "^8.3.2", - "websocket-driver": "^0.7.4" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -8069,16 +6018,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, "node_modules/spawn-wrap": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", @@ -8096,60 +6035,12 @@ "node": ">=8" } }, - "node_modules/spdy": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", - "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/spdy-transport": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz", - "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -8231,12 +6122,15 @@ } }, "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-json-comments": { @@ -8248,23 +6142,7 @@ "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/style-loader": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.3.tgz", - "integrity": "sha512-53BiGLXAcll9maCYtZi2RCQZKa8NQQai5C4horqKyRmHj9H7QmcUyucrH+4KW/gBQbXM2AsB0axoEcFZPlfPcw==", - "dev": true, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/supports-color": { @@ -8307,100 +6185,6 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.20.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.20.0.tgz", - "integrity": "sha512-e56ETryaQDyebBwJIWYB2TT6f2EZ0fL0sW/JRXNMN26zZdKi2u/E/5my5lG6jNxym6qsrVXfFRmOdV42zlAgLQ==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -8421,12 +6205,6 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, - "node_modules/thunky": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", - "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", - "dev": true - }, "node_modules/titleize": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", @@ -8460,15 +6238,6 @@ "node": ">=8.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -8547,19 +6316,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typed-array-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", @@ -8634,19 +6390,6 @@ "is-typedarray": "^1.0.0" } }, - "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -8674,15 +6417,6 @@ "node": ">=8" } }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", @@ -8731,21 +6465,6 @@ "punycode": "^2.1.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -8755,19 +6474,10 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/vite": { - "version": "4.4.9", - "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz", - "integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz", + "integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==", "dev": true, "dependencies": { "esbuild": "^0.18.10", @@ -8826,309 +6536,17 @@ "dev": true }, "node_modules/vscode-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz", - "integrity": "sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", "dev": true }, - "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/wbuf": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", - "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", - "dev": true, - "dependencies": { - "minimalistic-assert": "^1.0.0" - } - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, - "node_modules/webpack": { - "version": "5.88.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", - "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", - "dev": true, - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", - "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", - "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.2.0", - "@webpack-cli/info": "^1.5.0", - "@webpack-cli/serve": "^1.7.0", - "colorette": "^2.0.14", - "commander": "^7.0.0", - "cross-spawn": "^7.0.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "4.x.x || 5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "@webpack-cli/migrate": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/webpack-dev-middleware": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz", - "integrity": "sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA==", - "dev": true, - "dependencies": { - "colorette": "^2.0.10", - "memfs": "^3.4.3", - "mime-types": "^2.1.31", - "range-parser": "^1.2.1", - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/webpack-dev-server": { - "version": "4.15.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz", - "integrity": "sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==", - "dev": true, - "dependencies": { - "@types/bonjour": "^3.5.9", - "@types/connect-history-api-fallback": "^1.3.5", - "@types/express": "^4.17.13", - "@types/serve-index": "^1.9.1", - "@types/serve-static": "^1.13.10", - "@types/sockjs": "^0.3.33", - "@types/ws": "^8.5.5", - "ansi-html-community": "^0.0.8", - "bonjour-service": "^1.0.11", - "chokidar": "^3.5.3", - "colorette": "^2.0.10", - "compression": "^1.7.4", - "connect-history-api-fallback": "^2.0.0", - "default-gateway": "^6.0.3", - "express": "^4.17.3", - "graceful-fs": "^4.2.6", - "html-entities": "^2.3.2", - "http-proxy-middleware": "^2.0.3", - "ipaddr.js": "^2.0.1", - "launch-editor": "^2.6.0", - "open": "^8.0.9", - "p-retry": "^4.5.0", - "rimraf": "^3.0.2", - "schema-utils": "^4.0.0", - "selfsigned": "^2.1.1", - "serve-index": "^1.9.1", - "sockjs": "^0.3.24", - "spdy": "^4.0.2", - "webpack-dev-middleware": "^5.3.1", - "ws": "^8.13.0" - }, - "bin": { - "webpack-dev-server": "bin/webpack-dev-server.js" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.37.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - }, - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-merge": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", - "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/webpack/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", - "dev": true, - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", - "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", @@ -9177,13 +6595,13 @@ "dev": true }, "node_modules/which-typed-array": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", - "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "call-bind": "^1.0.4", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-tostringtag": "^1.0.0" @@ -9195,12 +6613,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true - }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -9242,27 +6654,6 @@ "typedarray-to-buffer": "^3.1.5" } }, - "node_modules/ws": { - "version": "8.14.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", - "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/xdg-basedir": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", @@ -9287,14 +6678,6 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true }, - "node_modules/yaml": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.2.tgz", - "integrity": "sha512-N/lyzTPaJasoDmfV7YTrYCI0G/3ivm/9wdG0aHuheKowWQwGTsK0Eoiw6utmzAnI6pkJa0DUVygvp3spqqEKXg==", - "engines": { - "node": ">= 14" - } - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -9361,15 +6744,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 610f216..e0743a9 100644 --- a/package.json +++ b/package.json @@ -11,48 +11,37 @@ ], "type": "module", "dependencies": { - "yaml": "^2.3.1" + "js-yaml": "^4.1.0" }, "devDependencies": { "chai": "^4.3.7", - "connect-livereload": "^0.6.1", "cspell": "^6.30.2", - "css-loader": "^6.7.3", "eslint": "^8.33.0", - "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-prettier": "^5.0.0", "esm": "^3.2.25", "ignore-styles": "^5.0.1", "less": "^4.1.3", - "less-loader": "^11.1.0", - "mini-css-extract-plugin": "^2.7.2", "mocha": "^10.2.0", "nyc": "^15.1.0", - "open": "^8.4.0", "prettier": "^3.0.0", - "style-loader": "^3.3.1", - "typescript": "^5.0.4", - "vite": "^4.2.1", - "webpack": "^5.76.2", - "webpack-cli": "^4.10.0", - "webpack-dev-server": "^4.11.1" + "vite": "^4.2.1" }, "scripts": { - "build": "webpack && lessc style/crosswords.less dist/crosswords.css", + "build": "vite build", "cssgrid": "vite serve test", - "dev:build": "vite build dev", - "dev:prod": "vite build dev && vite preview dev", + "dev:build": "bin/build-dev.sh", + "dev:preview": "vite build dev && vite preview dev", "dev": "vite serve dev", "lint:fix": "eslint --fix *.{js,mjs} src/**/*.{js,mjs} {test,dev}/*.{js,mjs} sample*/*.{js,mjs}", "lint": "eslint *.{js,mjs} src/**/*.{js,mjs} {test,dev}/*.{js,mjs} sample/*.{js,mjs}", "prettier:fix": "prettier --write *.{html,js,json,md,mjs} docs/*.{html,js,json,md,mjs} src/**/*.{html,js,json,md,mjs} {dev,test}/*.{css,html,js,json,less,md,mjs} sample/*.{html,js,json,md,mjs} style/*.less data/*.{json,yml}", "prettier": "prettier --check *.{html,js,json,md,mjs} docs/*.{html,js,json,md,mjs} sample/*.{html,js,json,md,mjs} {dev,test}/*.{css,html,js,json,less,md,mjs} style/*.less data/*.{json,yml}", + "qa:install": "bin/install-githook.sh", "spell:all": "cspell *.{html,js,md,mjs} docs/**/*.{html,js,json,md,mjs} src/**/*.{html,js,json,md,mjs} {dev,test}/*.{html,js,json,md,mjs} sample/*.{html,js,json,md,mjs} style/*.less", "spell:changed": "git diff --staged --diff-filter=AMU --name-only | npx cspell --no-summary --no-progress --no-must-find-files --file-list stdin", "spell": "git diff --staged --diff-filter=AM --name-only | npx cspell --no-summary --no-progress --no-must-find-files --file-list stdin", - "start:angular": "webpack-dev-server", "start": "vite serve dev", "test:cov": "nyc mocha", "test:debug": "mocha --inspect-brk -w", diff --git a/pull-request-config.sh b/pull-request-config.sh index 8973edc..bba5bf5 100644 --- a/pull-request-config.sh +++ b/pull-request-config.sh @@ -6,20 +6,29 @@ # Fill in the details for the pull request variables - trim all whitespace! export forkRepoOwner= -# For example: bobthecoder +# For example: export forkRepoOwner=bobthecoder export forkRepoUrl= -# For example: https://github.com/bobthecoder/forkedrepo.git +# For example: export forkRepoUrl=https://github.com/bobthecoder/forkedrepo.git -# The forker's branch name for the pull request code +# The forker's branch name for the pull request # Often main/master -export prBranch= -# For example: bobspr +export prBranch= +# For example: export prBranch=bobspr # The local destination branch for an accepted pull request # Typically main/master export localTargetBranch= -# For example: main +# For example: export localTargetBranch=main + +# The GitHub Pull Request number +export prNumber= +# For example: export prNumber=47 + +# The tag to identify the head of $localTargetBranch prior to merging +# Default: pre-PR${prNumber} +export prePrTag=pre-PR${prNumber} +# Using our example: pre-PR47 # A (temporary) local branch to inspect the pull request code # Default: $forkRepoOwner-$prBranch diff --git a/pull-request.config b/pull-request.config deleted file mode 100644 index 5b22492..0000000 --- a/pull-request.config +++ /dev/null @@ -1,25 +0,0 @@ -# Process a pull request locally... -# Instructions: https://gist.github.com/pvspain/92ead8ecd4552bedd643922877d62500 - -# Fill in the details for the pull request variables - trim all whitespace! - -export forkRepoOwner= -# For example: bobthecoder - -export forkRepoUrl= -# For example: https://github.com/bobthecoder/forkedrepo.git - -# The forker's branch name for the pull request code -# Often main/master -export prBranch= -# For example: bobspr - -# The local destination branch for an accepted pull request -# Typically main/master -export localTargetBranch= -# For example: main - -# A (temporary) local branch to inspect the pull request code -# Default: $forkRepoOwner-$prBranch -export localPrBranch=$forkRepoOwner-$prBranch -# Using our example: bobthecoder-bobspr \ No newline at end of file diff --git a/src/cell-map.mjs b/src/cell-map.mjs index d7295c6..215fad0 100644 --- a/src/cell-map.mjs +++ b/src/cell-map.mjs @@ -24,7 +24,7 @@ class CellMap { */ cellElement = (modelCell) => { assert(typeof modelCell === 'object', 'Cell is not an object'); - // modelCell.cellElement set in CrosswordController.#newCellElement() + // modelCell.cellElement set in ./crosswordGridView.mjs:newCellElement() return modelCell.cellElement; }; diff --git a/src/crossword-cluesview.mjs b/src/crossword-cluesview.mjs index e96cad7..ae05e14 100644 --- a/src/crossword-cluesview.mjs +++ b/src/crossword-cluesview.mjs @@ -1,4 +1,10 @@ -import { addClass, assert, removeClass, trace } from './helpers.mjs'; +import { + addClass, + addClasses, + assert, + removeClass, + trace, +} from './helpers.mjs'; /** * **newCrosswordCluesView**: build a crossword clues DOM element @@ -75,8 +81,7 @@ function newCrosswordCluesView(document, controller) { downClues: newClueBlockElement('crossword-down-clues', 'Down'), }; - addClass(view.wrapper, 'crosswords-js'); - addClass(view.wrapper, 'crossword-clues'); + addClasses(view.wrapper, ['crosswords-js', 'crossword-clues']); addClueElements(controller, view.acrossClues, controller.model.acrossClues); view.wrapper.appendChild(view.acrossClues); diff --git a/src/crossword-controller.mjs b/src/crossword-controller.mjs index fd0c57b..1ba9482 100644 --- a/src/crossword-controller.mjs +++ b/src/crossword-controller.mjs @@ -175,7 +175,7 @@ class CrosswordController { inputElement = (cell) => { assert(cell.light, `dark cell! ${cell}`); // The input element of a cellElement is the first child element. - // Refer to #newCellElement() + // Refer to ./crosswordGridView.mjs:newCellElement() return this.#cellMap.cellElement(cell).children[0]; }; @@ -183,7 +183,7 @@ class CrosswordController { revealedElement = (cell) => { assert(cell.light, `dark cell! ${cell}`); // The revealed element of a cellElement is the second or third child element. - // Refer to #newCellElement() + // Refer to ./crosswordGridView.mjs:newCellElement() const childIndex = cell.labelText ? 2 : 1; return this.#cellMap.cellElement(cell).children[childIndex]; }; @@ -192,7 +192,7 @@ class CrosswordController { incorrectElement = (cell) => { assert(cell.light, `dark cell! ${cell}`); // The incorrect element of a cellElement is the third or fourth child element. - // Refer to #newCellElement() + // Refer to ./crosswordGridView.mjs:newCellElement() const childIndex = cell.labelText ? 3 : 2; return this.#cellMap.cellElement(cell).children[childIndex]; }; diff --git a/src/crossword-gridview.mjs b/src/crossword-gridview.mjs index 452d5e3..0444b3d 100644 --- a/src/crossword-gridview.mjs +++ b/src/crossword-gridview.mjs @@ -28,8 +28,7 @@ function newCrosswordGridView(document, model, cellMap) { ); let gridView = document.createElement('div'); - addClass(gridView, 'crosswords-js'); - addClass(gridView, 'crossword-grid'); + addClasses(gridView, ['crosswords-js', 'crossword-grid']); // Set the grid size variables, refer to style/crosswords.less // This lets us adjust the CSS grid size to match 'model' dimensions. diff --git a/src/crossword-model.mjs b/src/crossword-model.mjs index d360bff..5b323a9 100644 --- a/src/crossword-model.mjs +++ b/src/crossword-model.mjs @@ -1,4 +1,4 @@ -import YAML from 'yaml'; +import yaml from 'js-yaml'; import { newClueModel } from './clue-model.mjs'; import { assert, setLetter, trace } from './helpers.mjs'; @@ -423,7 +423,7 @@ function newCrosswordDefinition(mimeType, crosswordSource) { case 'application/yaml': case 'application/x-yaml': try { - parsedDocument = YAML.parse(crosswordSource); + parsedDocument = yaml.load(crosswordSource); } catch (error) { trace( `newCrosswordDefinition: [documentText] is not a YAML object.\n` + diff --git a/dev/crosswords.js b/src/crosswords.js similarity index 80% rename from dev/crosswords.js rename to src/crosswords.js index f477c8a..846684a 100644 --- a/dev/crosswords.js +++ b/src/crosswords.js @@ -1,13 +1,16 @@ +// ViteJS will bundle the converted CSS as ../dist/crosswords.css +import "../style/crosswords.less"; + import { CrosswordController as Controller, newCrosswordController, -} from "../src/crossword-controller.mjs"; +} from "./crossword-controller.mjs"; import { newCrosswordModel as compileCrossword, convertSourceFileToDefinition, newCrosswordDefinition, -} from "../src/crossword-model.mjs"; -import { assert, ecs, eid, trace, tracing } from "../src/helpers.mjs"; +} from "./crossword-model.mjs"; +import { assert, ecs, eid, trace, tracing } from "./helpers.mjs"; const helpers = { assert, // Validate function arguments and entry conditions @@ -18,7 +21,7 @@ const helpers = { }; export { - newCrosswordDefinition, // create a new CrosswordDefinition input and validate its structure. + newCrosswordDefinition, // Create a new CrosswordDefinition input and validate its structure. convertSourceFileToDefinition, // Create a CrosswordDefinition from a filesystem path to a crossword source file (.json, .yml). // NOTE: This function accesses the local file system, and is therefore typically limited to server-side code. compileCrossword, // Used by puzzle setters to verify the conformance of a crosswordDefinition diff --git a/src/index.mjs b/src/index.mjs deleted file mode 100644 index 72e95c5..0000000 --- a/src/index.mjs +++ /dev/null @@ -1,15 +0,0 @@ -import { newCrosswordModel } from './crossword-model.mjs'; -import { CrosswordController } from './crossword-controller.mjs'; - -// Define our public API. -const CrosswordsJS = { - compileCrossword: newCrosswordModel, - Controller: CrosswordController, -}; - -// If we are in the browser, add the API to the global scope. -if (typeof window !== 'undefined') { - window.CrosswordsJS = CrosswordsJS; -} - -export { CrosswordsJS }; diff --git a/style/crosswords.less b/style/crosswords.less index 33cd7bc..64865ed 100644 --- a/style/crosswords.less +++ b/style/crosswords.less @@ -1,5 +1,5 @@ -@import url('../style/cwdimensions.less'); -@import url('../style/cwcolors.less'); +@import url('cwdimensions.less'); +@import url('cwcolors.less'); .crossword-grid { --letter-weight: bold; @@ -8,29 +8,8 @@ grid-template-rows: repeat(var(--row-count), var(--grid-cell-size)); grid-template-columns: repeat(var(--column-count), var(--grid-cell-size)); - input { - font-size: var(--letter-size); - } - - .cwclue-label { - font-size: var(--label-size); - } - - .cwcell-revealed { - /* display a triangle base on border intersections */ - border-left: var(--revealed-size) solid transparent; - border-bottom: var(--revealed-size) solid var(--cell-revealed-color); - } - - .crossword-clues { - .crossword-clue-text { - max-width: var(--clue-text-width); - } - } - gap: var(--grid-line-size); border-collapse: collapse; - box-sizing: border-box; // padding around outside of grid padding: var(--grid-line-size); width: min-content; @@ -38,10 +17,16 @@ background-color: var(--grid-background-color); color: var(--grid-text-color); // Any border and padding is outside grids width and height - box-sizing: content-box; + box-sizing: border-box; font-family: sans-serif; font-size: x-large; + .crossword-clues { + .crossword-clue-text { + max-width: var(--clue-text-width); + } + } + .cwcell { // .cwclue-label, .cwcell-revealed and .cwcell-incorrect // children use 'absolute' positioning, 'relative' to parent @@ -62,6 +47,7 @@ } input { + font-size: var(--letter-size); text-align: center; font-weight: var(--letter-weight); // Padding must be disabled @@ -74,10 +60,12 @@ &.active { background-color: var(--clue-background-current-color); + color: var(--grid-text-active-color); } &.highlighted { background-color: var(--cell-background-current-color); + color: var(--grid-text-highlighted-color); } &:focus { @@ -89,15 +77,6 @@ } } - .cwclue-label { - margin: 1px 0px 0px 1px; - position: absolute; - // top & left - place-self: start; - // click events need to pass through to input element - pointer-events: none; - } - // right-triangle with side length var(--revealed-size) // in bottom right corner .cwcell-revealed { @@ -107,6 +86,9 @@ place-self: end; // click events must pass through to input element pointer-events: none; + // display a triangle base on border intersections + border-left: var(--revealed-size) solid transparent; + border-bottom: var(--revealed-size) solid var(--cell-revealed-color); } // diagonal stripe bottom-left to top-right @@ -128,6 +110,16 @@ opacity: 0.5; } + .cwclue-label { + font-size: var(--label-size); + margin: 1px 0px 0px 1px; + position: absolute; + // top & left + place-self: start; + // click events need to pass through to input element + pointer-events: none; + } + .cw-across-word-separator { box-shadow: inset -3px 0px 0px 0px var(--word-separator-color); } diff --git a/style/cwcolors.less b/style/cwcolors.less index 80014b8..98430db 100644 --- a/style/cwcolors.less +++ b/style/cwcolors.less @@ -10,6 +10,8 @@ --grid-background-color: var(--dark-color); --grid-line-color: var(--dark-color); --grid-text-color: var(--dark-color); + --grid-text-highlighted-color: var(--dark-color); + --grid-text-active-color: var(--light-color); --clue-background-current-color: var(--clue-current-color); --cell-background-current-color: var(--cell-current-color); diff --git a/style/cwdimensions.less b/style/cwdimensions.less index 6d37a50..3869db6 100644 --- a/style/cwdimensions.less +++ b/style/cwdimensions.less @@ -3,7 +3,8 @@ @large-screen-min-width: 556px; .crosswords-js { - /* default grid size, this is overriden in JS */ + // Default grid size, this may be overridden + // in ../src/crossword-gridview.mjs:newCrosswordGridView() --row-count: 15; --column-count: 15; @@ -14,8 +15,8 @@ --letter-size: 1.14rem; --label-size: 0.4rem; --revealed-size: 0.4rem; - --clue-text-width: 17rem; --clue-label-width: 3rem; + --clue-text-width: 17rem; } @media screen and (max-width: (@medium-screen-min-width - 1px)) { @@ -39,7 +40,7 @@ } @media screen and (min-width: @large-screen-min-width) { - .crosswords-js{ + .crosswords-js { --grid-cell-size: 2.25rem; --letter-size: 1.7rem; --label-size: 0.4em; diff --git a/test/crossword-model.specs.mjs b/test/crossword-model.specs.mjs index 9d23026..8fb4c19 100644 --- a/test/crossword-model.specs.mjs +++ b/test/crossword-model.specs.mjs @@ -16,6 +16,7 @@ const quiptic89 = require('../data/quiptic_89.json'); const alberich4 = require('../data/alberich_4.json'); const ftimes17095 = require('../data/ftimes_17095.json'); const daquick20230818 = require('../data/da_quick_20230818.json'); +const bletchley001 = require('../data/bletchley_001.json'); const { width, height, acrossClues, downClues } = quiptic89; const mimetype = 'application/vnd.js-crossword'; @@ -296,8 +297,10 @@ describe('newCrosswordModel()', () => { }); it('should validate the test crosswords', () => { - [ftimes17095, alberich4, quiptic89, daquick20230818].forEach((cd) => { - newCrosswordModel(cd); - }); + [ftimes17095, alberich4, quiptic89, daquick20230818, bletchley001].forEach( + (cd) => { + expect(newCrosswordModel(cd)).is.not.null; + }, + ); }); }); diff --git a/test/index.specs.mjs b/test/index.specs.mjs deleted file mode 100644 index 7a89a74..0000000 --- a/test/index.specs.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { expect } from 'chai'; -import { CrosswordsJS } from '../src/index.mjs'; -const { compileCrossword, Controller } = CrosswordsJS; - -describe('index.js', () => { - it('should export a compileCrossword function', () => { - expect(compileCrossword).to.be.a('Function'); - }); - it('should export a controller object', () => { - expect(Controller).to.be.a('Function'); - }); -}); diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..6ddaa40 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,26 @@ +// vite.config.js +import { resolve } from "path"; +// eslint-disable-next-line import/no-extraneous-dependencies +import { defineConfig } from "vite"; + +export default defineConfig({ + build: { + lib: { + // Could also be a dictionary or array of multiple entry points + entry: resolve(__dirname, "src/crosswords.js"), + name: "crosswords", + // the proper extensions will be added + fileName: "crosswords", + }, + rollupOptions: { + output: { + // https://rollupjs.org/configuration-options/#output-assetfilenames + // https://github.com/vitejs/vite/issues/4863#issuecomment-1005451468 + assetFileNames: (assetInfo) => { + if (assetInfo.name === "style.css") return "crosswords.css"; + return assetInfo.name; + }, + }, + }, + }, +}); diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 6fd07d1..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,47 +0,0 @@ -import { dirname, join, resolve } from "path"; -import { fileURLToPath } from "url"; -import MiniCssExtractPlugin from "mini-css-extract-plugin"; -const { loader } = MiniCssExtractPlugin; -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -export default (env, argv) => { - const isProduction = argv.mode === "production"; - - return { - entry: "./src/index.mjs", - - devServer: { - static: { - directory: join(__dirname, "sample"), - }, - compress: true, - }, - - mode: "development", - - module: { - rules: [ - { - test: /\.less$/, - use: [ - isProduction ? loader : "style-loader", - "css-loader", - "less-loader", - ], - }, - ], - }, - - // Add an instance of the MiniCssExtractPlugin to the plugins list - // But remember - only for production! - plugins: isProduction - ? [new MiniCssExtractPlugin({ filename: "crosswords.css" })] - : [], - - output: { - path: resolve(__dirname, "dist"), - filename: "crosswords.js", - }, - }; -};