diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 37ded67e..6ea4ec07 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -17,6 +17,29 @@ jobs: with: fetch-depth: 0 # Fetch all history for tags + # Build frontend WebUI + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Build Frontend WebUI + run: | + cd lightrag_webui + bun install --frozen-lockfile --production + bun run build + cd .. + + - name: Verify Frontend Build + run: | + if [ ! -f "lightrag/api/webui/index.html" ]; then + echo "❌ Error: Frontend build failed - index.html not found" + exit 1 + fi + echo "✅ Frontend build verified" + echo "Frontend files:" + ls -lh lightrag/api/webui/ | head -10 + - uses: actions/setup-python@v5 with: python-version: "3.x" diff --git a/.gitignore b/.gitignore index 5092b7b5..25650406 100644 --- a/.gitignore +++ b/.gitignore @@ -65,9 +65,11 @@ download_models_hf.py lightrag-dev/ gui/ +# Frontend build output (built during PyPI release) +lightrag/api/webui/ + # unit-test files test_* # Cline files -memory-bank memory-bank/ diff --git a/docs/FrontendBuildGuide.md b/docs/FrontendBuildGuide.md new file mode 100644 index 00000000..1e82c4f0 --- /dev/null +++ b/docs/FrontendBuildGuide.md @@ -0,0 +1,207 @@ +# Frontend Build Guide + +## Overview + +The LightRAG project includes a React-based WebUI frontend. This guide explains how frontend building works in different scenarios. + +## Key Principle + +- **Git Repository**: Frontend build results are **NOT** included (kept clean) +- **PyPI Package**: Frontend build results **ARE** included (ready to use) +- **Build Tool**: Uses **Bun** (not npm/yarn) + +## Installation Scenarios + +### 1. End Users (From PyPI) ✨ + +**Command:** +```bash +pip install lightrag-hku[api] +``` + +**What happens:** +- Frontend is already built and included in the package +- No additional steps needed +- Web interface works immediately + +--- + +### 2. Development Mode (Recommended for Contributors) 🔧 + +**Command:** +```bash +# Clone the repository +git clone https://github.com/HKUDS/LightRAG.git +cd LightRAG + +# Install in editable mode (no frontend build required yet) +pip install -e ".[api]" + +# Build frontend when needed (can be done anytime) +cd lightrag_webui +bun install --frozen-lockfile +bun run build +cd .. +``` + +**Advantages:** +- Install first, build later (flexible workflow) +- Changes take effect immediately (symlink mode) +- Frontend can be rebuilt anytime without reinstalling + +**How it works:** +- Creates symlinks to source directory +- Frontend build output goes to `lightrag/api/webui/` +- Changes are immediately visible in installed package + +--- + +### 3. Normal Installation (Testing Package Build) 📦 + +**Command:** +```bash +# Clone the repository +git clone https://github.com/HKUDS/LightRAG.git +cd LightRAG + +# ⚠️ MUST build frontend FIRST +cd lightrag_webui +bun install --frozen-lockfile +bun run build +cd .. + +# Now install +pip install ".[api]" +``` + +**What happens:** +- Frontend files are **copied** to site-packages +- Post-build modifications won't affect installed package +- Requires rebuild + reinstall to update + +**When to use:** +- Testing complete installation process +- Verifying package configuration +- Simulating PyPI user experience + +--- + +### 4. Creating Distribution Package 🚀 + +**Command:** +```bash +# Build frontend first +cd lightrag_webui +bun install --frozen-lockfile --production +bun run build +cd .. + +# Create distribution packages +python -m build + +# Output: dist/lightrag_hku-*.whl and dist/lightrag_hku-*.tar.gz +``` + +**What happens:** +- `setup.py` checks if frontend is built +- If missing, installation fails with helpful error message +- Generated package includes all frontend files + +--- + +## GitHub Actions (Automated Release) + +When creating a release on GitHub: + +1. **Automatically builds frontend** using Bun +2. **Verifies** build completed successfully +3. **Creates Python package** with frontend included +4. **Publishes to PyPI** using existing trusted publisher setup + +**No manual intervention required!** + +--- + +## Quick Reference + +| Scenario | Command | Frontend Required | Can Build After | +|----------|---------|-------------------|-----------------| +| From PyPI | `pip install lightrag-hku[api]` | Included | No (already installed) | +| Development | `pip install -e ".[api]"` | No | ✅ Yes (anytime) | +| Normal Install | `pip install ".[api]"` | ✅ Yes (before) | No (must reinstall) | +| Create Package | `python -m build` | ✅ Yes (before) | N/A | + +--- + +## Bun Installation + +If you don't have Bun installed: + +```bash +# macOS/Linux +curl -fsSL https://bun.sh/install | bash + +# Windows +powershell -c "irm bun.sh/install.ps1 | iex" +``` + +Official documentation: https://bun.sh + +--- + +## File Structure + +``` +LightRAG/ +├── lightrag_webui/ # Frontend source code +│ ├── src/ # React components +│ ├── package.json # Dependencies +│ └── vite.config.ts # Build configuration +│ └── outDir: ../lightrag/api/webui # Build output +│ +├── lightrag/ +│ └── api/ +│ └── webui/ # Frontend build output (gitignored) +│ ├── index.html # Built files (after running bun run build) +│ └── assets/ # Built assets +│ +├── setup.py # Build checks +├── pyproject.toml # Package configuration +└── .gitignore # Excludes lightrag/api/webui/* (except .gitkeep) +``` + +--- + +## Troubleshooting + +### Q: I installed in development mode but the web interface doesn't work + +**A:** Build the frontend: +```bash +cd lightrag_webui && bun run build +``` + +### Q: I built the frontend but it's not in my installed package + +**A:** You probably used `pip install .` after building. Either: +- Use `pip install -e ".[api]"` for development +- Or reinstall: `pip uninstall lightrag-hku && pip install ".[api]"` + +### Q: Where are the built frontend files? + +**A:** In `lightrag/api/webui/` after running `bun run build` + +### Q: Can I use npm or yarn instead of Bun? + +**A:** The project is configured for Bun. While npm/yarn might work, Bun is recommended per project standards. + +--- + +## Summary + +✅ **PyPI users**: No action needed, frontend included +✅ **Developers**: Use `pip install -e ".[api]"`, build frontend when needed +✅ **CI/CD**: Automatic build in GitHub Actions +✅ **Git**: Frontend build output never committed + +For questions or issues, please open a GitHub issue. diff --git a/lightrag/api/README-zh.md b/lightrag/api/README-zh.md index d8cb2554..74d0e63e 100644 --- a/lightrag/api/README-zh.md +++ b/lightrag/api/README-zh.md @@ -21,15 +21,24 @@ pip install "lightrag-hku[api]" * 从源代码安装 ```bash -# 克隆仓库 +# Clone the repository git clone https://github.com/HKUDS/lightrag.git -# 切换到仓库目录 +# Change to the repository directory cd lightrag -# 如有必要,创建 Python 虚拟环境 -# 以可编辑模式安装并支持 API +# Create a Python virtual environment +uv venv --seed --python 3.12 +source .venv/bin/acivate + +# Install in editable mode with API support pip install -e ".[api]" + +# Build front-end artifacts +cd lightrag_webui +bun install --frozen-lockfile --production +bun run build +cd .. ``` ### 启动 LightRAG 服务器前的准备 diff --git a/lightrag/api/README.md b/lightrag/api/README.md index ebd6c0bb..90ebd4db 100644 --- a/lightrag/api/README.md +++ b/lightrag/api/README.md @@ -27,9 +27,18 @@ git clone https://github.com/HKUDS/lightrag.git # Change to the repository directory cd lightrag -# create a Python virtual environment if necessary +# Create a Python virtual environment +uv venv --seed --python 3.12 +source .venv/bin/acivate + # Install in editable mode with API support pip install -e ".[api]" + +# Build front-end artifacts +cd lightrag_webui +bun install --frozen-lockfile --production +bun run build +cd .. ``` ### Before Starting LightRAG Server diff --git a/lightrag/api/__init__.py b/lightrag/api/__init__.py index 3f1635e4..5531deaa 100644 --- a/lightrag/api/__init__.py +++ b/lightrag/api/__init__.py @@ -1 +1 @@ -__api_version__ = "0238" +__api_version__ = "0239" diff --git a/lightrag/api/lightrag_server.py b/lightrag/api/lightrag_server.py index fb0f7985..9c1ec9e5 100644 --- a/lightrag/api/lightrag_server.py +++ b/lightrag/api/lightrag_server.py @@ -145,7 +145,35 @@ class LLMConfigCache: self.ollama_embedding_options = {} +def check_frontend_build(): + """Check if frontend is built before starting server""" + webui_dir = Path(__file__).parent / "webui" + index_html = webui_dir / "index.html" + + if not index_html.exists(): + ASCIIColors.red("\n" + "=" * 80) + ASCIIColors.red("ERROR: Frontend Not Built") + ASCIIColors.red("=" * 80) + ASCIIColors.yellow("The WebUI frontend has not been built yet.") + ASCIIColors.yellow( + "Please build the frontend code first using the following commands:\n" + ) + ASCIIColors.cyan(" cd lightrag_webui") + ASCIIColors.cyan(" bun install --frozen-lockfile") + ASCIIColors.cyan(" bun run build") + ASCIIColors.cyan(" cd ..") + ASCIIColors.yellow("\nThen restart the service.\n") + ASCIIColors.cyan( + "Note: Make sure you have Bun installed. Visit https://bun.sh for installation." + ) + ASCIIColors.red("=" * 80 + "\n") + sys.exit(1) # Exit immediately + + def create_app(args): + # Check frontend build first + check_frontend_build() + # Setup logging logger.setLevel(args.log_level) set_verbose_debug(args.verbose) diff --git a/lightrag/api/webui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 b/lightrag/api/webui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 deleted file mode 100644 index 0acaaff0..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff b/lightrag/api/webui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff deleted file mode 100644 index b804d7b3..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf b/lightrag/api/webui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf deleted file mode 100644 index c6f9a5e7..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf b/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf deleted file mode 100644 index 9ff4a5e0..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff b/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff deleted file mode 100644 index 9759710d..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 b/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 deleted file mode 100644 index f390922e..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff b/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff deleted file mode 100644 index 9bdd534f..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 b/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 deleted file mode 100644 index 75344a1f..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf b/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf deleted file mode 100644 index f522294f..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf b/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf deleted file mode 100644 index 4e98259c..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff b/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff deleted file mode 100644 index e7730f66..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 b/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 deleted file mode 100644 index 395f28be..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-CB_wures.ttf b/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-CB_wures.ttf deleted file mode 100644 index b8461b27..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-CB_wures.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 b/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 deleted file mode 100644 index 735f6948..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff b/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff deleted file mode 100644 index acab069f..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Bold-Cx986IdX.woff2 b/lightrag/api/webui/assets/KaTeX_Main-Bold-Cx986IdX.woff2 deleted file mode 100644 index ab2ad21d..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Bold-Cx986IdX.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Bold-Jm3AIy58.woff b/lightrag/api/webui/assets/KaTeX_Main-Bold-Jm3AIy58.woff deleted file mode 100644 index f38136ac..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Bold-Jm3AIy58.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Bold-waoOVXN0.ttf b/lightrag/api/webui/assets/KaTeX_Main-Bold-waoOVXN0.ttf deleted file mode 100644 index 4060e627..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Bold-waoOVXN0.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 b/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 deleted file mode 100644 index 5931794d..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf b/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf deleted file mode 100644 index dc007977..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff b/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff deleted file mode 100644 index 67807b0b..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Italic-3WenGoN9.ttf b/lightrag/api/webui/assets/KaTeX_Main-Italic-3WenGoN9.ttf deleted file mode 100644 index 0e9b0f35..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Italic-3WenGoN9.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Italic-BMLOBm91.woff b/lightrag/api/webui/assets/KaTeX_Main-Italic-BMLOBm91.woff deleted file mode 100644 index 6f43b594..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Italic-BMLOBm91.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 b/lightrag/api/webui/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 deleted file mode 100644 index b50920e1..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Regular-B22Nviop.woff2 b/lightrag/api/webui/assets/KaTeX_Main-Regular-B22Nviop.woff2 deleted file mode 100644 index eb24a7ba..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Regular-B22Nviop.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Regular-Dr94JaBh.woff b/lightrag/api/webui/assets/KaTeX_Main-Regular-Dr94JaBh.woff deleted file mode 100644 index 21f58129..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Regular-Dr94JaBh.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Main-Regular-ypZvNtVU.ttf b/lightrag/api/webui/assets/KaTeX_Main-Regular-ypZvNtVU.ttf deleted file mode 100644 index dd45e1ed..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Main-Regular-ypZvNtVU.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf b/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf deleted file mode 100644 index 728ce7a1..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 b/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 deleted file mode 100644 index 29657023..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff b/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff deleted file mode 100644 index 0ae390d7..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Math-Italic-DA0__PXp.woff b/lightrag/api/webui/assets/KaTeX_Math-Italic-DA0__PXp.woff deleted file mode 100644 index eb5159d4..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Math-Italic-DA0__PXp.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Math-Italic-flOr_0UB.ttf b/lightrag/api/webui/assets/KaTeX_Math-Italic-flOr_0UB.ttf deleted file mode 100644 index 70d559b4..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Math-Italic-flOr_0UB.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Math-Italic-t53AETM-.woff2 b/lightrag/api/webui/assets/KaTeX_Math-Italic-t53AETM-.woff2 deleted file mode 100644 index 215c143f..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Math-Italic-t53AETM-.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf b/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf deleted file mode 100644 index 2f65a8a3..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 b/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 deleted file mode 100644 index cfaa3bda..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff b/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff deleted file mode 100644 index 8d47c02d..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 b/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 deleted file mode 100644 index 349c06dc..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff b/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff deleted file mode 100644 index 7e02df96..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf b/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf deleted file mode 100644 index d5850df9..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf b/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf deleted file mode 100644 index 537279f6..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff b/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff deleted file mode 100644 index 31b84829..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 b/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 deleted file mode 100644 index a90eea85..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Script-Regular-C5JkGWo-.ttf b/lightrag/api/webui/assets/KaTeX_Script-Regular-C5JkGWo-.ttf deleted file mode 100644 index fd679bf3..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Script-Regular-C5JkGWo-.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 b/lightrag/api/webui/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 deleted file mode 100644 index b3048fc1..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Script-Regular-D5yQViql.woff b/lightrag/api/webui/assets/KaTeX_Script-Regular-D5yQViql.woff deleted file mode 100644 index 0e7da821..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Script-Regular-D5yQViql.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size1-Regular-C195tn64.woff b/lightrag/api/webui/assets/KaTeX_Size1-Regular-C195tn64.woff deleted file mode 100644 index 7f292d91..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size1-Regular-C195tn64.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf b/lightrag/api/webui/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf deleted file mode 100644 index 871fd7d1..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 b/lightrag/api/webui/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 deleted file mode 100644 index c5a8462f..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf b/lightrag/api/webui/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf deleted file mode 100644 index 7a212caf..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 b/lightrag/api/webui/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 deleted file mode 100644 index e1bccfe2..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size2-Regular-oD1tc_U0.woff b/lightrag/api/webui/assets/KaTeX_Size2-Regular-oD1tc_U0.woff deleted file mode 100644 index d241d9be..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size2-Regular-oD1tc_U0.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size3-Regular-CTq5MqoE.woff b/lightrag/api/webui/assets/KaTeX_Size3-Regular-CTq5MqoE.woff deleted file mode 100644 index e6e9b658..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size3-Regular-CTq5MqoE.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf b/lightrag/api/webui/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf deleted file mode 100644 index 00bff349..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size4-Regular-BF-4gkZK.woff b/lightrag/api/webui/assets/KaTeX_Size4-Regular-BF-4gkZK.woff deleted file mode 100644 index e1ec5457..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size4-Regular-BF-4gkZK.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size4-Regular-DWFBv043.ttf b/lightrag/api/webui/assets/KaTeX_Size4-Regular-DWFBv043.ttf deleted file mode 100644 index 74f08921..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size4-Regular-DWFBv043.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 b/lightrag/api/webui/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 deleted file mode 100644 index 680c1308..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff b/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff deleted file mode 100644 index 2432419f..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 b/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 deleted file mode 100644 index 771f1af7..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 and /dev/null differ diff --git a/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf b/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf deleted file mode 100644 index c83252c5..00000000 Binary files a/lightrag/api/webui/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf and /dev/null differ diff --git a/lightrag/api/webui/assets/_basePickBy-UdMCOwSh.js b/lightrag/api/webui/assets/_basePickBy-UdMCOwSh.js deleted file mode 100644 index d527b5cb..00000000 --- a/lightrag/api/webui/assets/_basePickBy-UdMCOwSh.js +++ /dev/null @@ -1 +0,0 @@ -import{e as v,c as b,g as m,k as O,h as P,j as p,l as w,m as A,n as x,t as c,o as N}from"./_baseUniq-DknB5v3H.js";import{aQ as g,aA as E,aR as F,aS as M,aT as T,aU as I,aV as _,aW as $,aX as y,aY as B}from"./index-bjrbS6e8.js";var S=/\s/;function R(n){for(var r=n.length;r--&&S.test(n.charAt(r)););return r}var G=/^\s+/;function H(n){return n&&n.slice(0,R(n)+1).replace(G,"")}var o=NaN,L=/^[-+]0x[0-9a-f]+$/i,W=/^0b[01]+$/i,X=/^0o[0-7]+$/i,Y=parseInt;function q(n){if(typeof n=="number")return n;if(v(n))return o;if(g(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=g(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=H(n);var t=W.test(n);return t||X.test(n)?Y(n.slice(2),t?2:8):L.test(n)?o:+n}var z=1/0,C=17976931348623157e292;function K(n){if(!n)return n===0?n:0;if(n=q(n),n===z||n===-1/0){var r=n<0?-1:1;return r*C}return n===n?n:0}function Q(n){var r=K(n),t=r%1;return r===r?t?r-t:r:0}function fn(n){var r=n==null?0:n.length;return r?b(n):[]}var l=Object.prototype,U=l.hasOwnProperty,dn=E(function(n,r){n=Object(n);var t=-1,e=r.length,a=e>2?r[2]:void 0;for(a&&F(r[0],r[1],a)&&(e=1);++t-1?a[f?r[i]:i]:void 0}}var J=Math.max;function Z(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var a=t==null?0:Q(t);return a<0&&(a=J(e+a,0)),P(n,m(r),a)}var hn=D(Z);function V(n,r){var t=-1,e=I(n)?Array(n.length):[];return p(n,function(a,f,i){e[++t]=r(a,f,i)}),e}function gn(n,r){var t=_(n)?w:V;return t(n,m(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function mn(n,r){return n!=null&&A(n,r,nn)}function rn(n,r){return n-1}function $(n){return sn(n)?xn(n):mn(n)}var kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||B(n)?!0:nr.test(n)||!kn.test(n)||r!=null&&n in Object(r)}var rr=500;function er(n){var r=Cn(n,function(t){return e.size===rr&&e.clear(),t}),e=r.cache;return r}var tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,fr=er(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(tr,function(e,t,f,i){r.push(f?i.replace(ir,"$1"):t||e)}),r});function ar(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:fr(ar(n))}function m(n){if(typeof n=="string"||B(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&es))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&ve?new I:void 0;for(i.set(n,r),i.set(r,n);++o=ht){var b=r?null:Tt(n);if(b)return H(b);a=!1,f=En,u=new I}else u=r?[]:s;n:for(;++tr*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,F=un(c-f),t=c>f;if(a||(a=n=O()),sy))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(un(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(Fy?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=i},function(A,G,L){var u=L(0);function l(){}for(var n in u)l[n]=u[n];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=l},function(A,G,L){function u(l,n){l==null&&n==null?(this.x=0,this.y=0):(this.x=l,this.y=n)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(l){this.x=l},u.prototype.setY=function(l){this.y=l},u.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},A.exports=u},function(A,G,L){var u=L(2),l=L(10),n=L(0),r=L(7),e=L(3),f=L(1),i=L(13),g=L(12),t=L(11);function s(c,h,T){u.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,h,T){if(h==null&&T==null){var v=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(v)>-1)throw"Node already in graph!";return v.owner=this,this.getNodes().push(v),v}else{var d=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(d.source=h,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),T!=h&&T.edges.push(d),d)}},s.prototype.remove=function(c){var h=c;if(c instanceof e){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),v,d=T.length,N=0;N-1&&P>-1))throw"Source and/or target doesn't know this edge!";v.source.edges.splice(M,1),v.target!=v.source&&v.target.edges.splice(P,1);var S=v.source.owner.getEdges().indexOf(v);if(S==-1)throw"Not in owner's edge list!";v.source.owner.getEdges().splice(S,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,v,d,N=this.getNodes(),S=N.length,M=0;MT&&(c=T),h>v&&(h=v)}return c==l.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,v=l.MAX_VALUE,d=-l.MAX_VALUE,N,S,M,P,K,Y=this.nodes,Z=Y.length,D=0;DN&&(h=N),TM&&(v=M),dN&&(h=N),TM&&(v=M),d=this.nodes.length){var Z=0;T.forEach(function(D){D.owner==c&&Z++}),Z==this.nodes.length&&(this.isConnected=!0)}},A.exports=s},function(A,G,L){var u,l=L(1);function n(r){u=L(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(r,e,f,i,g){if(f==null&&i==null&&g==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{g=f,i=e,f=r;var t=i.getOwner(),s=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,i,g);if(f.isInterGraph=!0,f.source=i,f.target=g,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},n.prototype.remove=function(r){if(r instanceof u){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var i,g=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(e[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(e[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var g=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(g=1);var t=g*e[0],s=e[1]/g;e[0]t)return e[0]=f,e[1]=o,e[2]=g,e[3]=Y,!1;if(ig)return e[0]=s,e[1]=i,e[2]=P,e[3]=t,!1;if(fg?(e[0]=h,e[1]=T,a=!0):(e[0]=c,e[1]=o,a=!0):p===y&&(f>g?(e[0]=s,e[1]=o,a=!0):(e[0]=v,e[1]=T,a=!0)),-E===y?g>f?(e[2]=K,e[3]=Y,m=!0):(e[2]=P,e[3]=M,m=!0):E===y&&(g>f?(e[2]=S,e[3]=M,m=!0):(e[2]=Z,e[3]=Y,m=!0)),a&&m)return!1;if(f>g?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!a)switch(I){case 1:W=o,R=f+-N/y,e[0]=R,e[1]=W;break;case 2:R=v,W=i+d*y,e[0]=R,e[1]=W;break;case 3:W=T,R=f+N/y,e[0]=R,e[1]=W;break;case 4:R=h,W=i+-d*y,e[0]=R,e[1]=W;break}if(!m)switch(w){case 1:q=M,x=g+-rt/y,e[2]=x,e[3]=q;break;case 2:x=Z,q=t+D*y,e[2]=x,e[3]=q;break;case 3:q=Y,x=g+rt/y,e[2]=x,e[3]=q;break;case 4:x=K,q=t+-D*y,e[2]=x,e[3]=q;break}}return!1},l.getCardinalDirection=function(n,r,e){return n>r?e:1+e%4},l.getIntersection=function(n,r,e,f){if(f==null)return this.getIntersection2(n,r,e);var i=n.x,g=n.y,t=r.x,s=r.y,o=e.x,c=e.y,h=f.x,T=f.y,v=void 0,d=void 0,N=void 0,S=void 0,M=void 0,P=void 0,K=void 0,Y=void 0,Z=void 0;return N=s-g,M=i-t,K=t*g-i*s,S=T-c,P=o-h,Y=h*c-o*T,Z=N*P-S*M,Z===0?null:(v=(M*Y-P*K)/Z,d=(S*K-N*Y)/Z,new u(v,d))},l.angleOfVector=function(n,r,e,f){var i=void 0;return n!==e?(i=Math.atan((f-r)/(e-n)),e=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),v=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:v>=0&&v<=1?[v]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,A.exports=l},function(A,G,L){function u(){}u.sign=function(l){return l>0?1:l<0?-1:0},u.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},u.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},A.exports=u},function(A,G,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,A.exports=u},function(A,G,L){var u=function(){function i(g,t){for(var s=0;s"u"?"undefined":u(n);return n==null||r!="object"&&r!="function"},A.exports=l},function(A,G,L){function u(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c0&&c;){for(N.push(M[0]);N.length>0&&c;){var P=N[0];N.splice(0,1),d.add(P);for(var K=P.getEdges(),v=0;v-1&&M.splice(rt,1)}d=new Set,S=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),v=0;v0){for(var T=this.edgeToDummyNodes.get(h),v=0;v=0&&c.splice(Y,1);var Z=S.getNeighborsList();Z.forEach(function(a){if(h.indexOf(a)<0){var m=T.get(a),p=m-1;p==1&&P.push(a),T.set(a,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(v=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=s},function(A,G,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},A.exports=u},function(A,G,L){var u=L(5);function l(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(n){this.lworldExtX=n},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(n){this.lworldExtY=n},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},l.prototype.transformX=function(n){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/e),r},l.prototype.transformY=function(n){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/e),r},l.prototype.inverseTransformX=function(n){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/e),r},l.prototype.inverseTransformY=function(n){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/e),r},l.prototype.inverseTransformPoint=function(n){var r=new u(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},A.exports=l},function(A,G,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sn.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,h,T,v=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oN||d>N)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(v>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=v.length||N>=v[0].length)){for(var S=0;Si}}]),e}();A.exports=r},function(A,G,L){function u(){}u.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var n=Math.min(this.m,this.n);this.s=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(Math.min(this.m+1,this.n)),this.U=function(Nt){var Mt=function kt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)Mt.push(0);return Mt}(this.n),e=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(this.m),f=!0,i=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;V--){if(function(Nt,Mt){return Nt&&Mt}(V0;){var J=void 0,Rt=void 0;for(J=a-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=lt+_*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===a-2)Rt=4;else{var Lt=void 0;for(Lt=a-1;Lt>=J&&Lt!==J;Lt--){var vt=(Lt!==a?Math.abs(r[Lt]):0)+(Lt!==J+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*vt){this.s[Lt]=0;break}}Lt===J?Rt=3:Lt===a-1?Rt=1:(Rt=2,J=Lt)}switch(J++,Rt){case 1:{var it=r[a-2];r[a-2]=0;for(var gt=a-2;gt>=J;gt--){var Tt=u.hypot(this.s[gt],it),At=this.s[gt]/Tt,Dt=it/Tt;this.s[gt]=Tt,gt!==J&&(it=-Dt*r[gt-1],r[gt-1]=At*r[gt-1]);for(var mt=0;mt=this.s[J+1]);){var Ct=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Ct,JMath.abs(n)?(r=n/l,r=Math.abs(l)*Math.sqrt(1+r*r)):n!=0?(r=l/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},A.exports=u},function(A,G,L){var u=function(){function r(e,f){for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=e,this.sequence2=f,this.match_score=i,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;e--){var f=this.listeners[e];f.event===n&&f.callback===r&&this.listeners.splice(e,1)}},l.emit=function(n,r){for(var e=0;e{var G={45:(n,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),n.exports=f},806:(n,r,e)=>{var f=e(551).FDLayoutConstants;function i(){}for(var g in f)i[g]=f[g];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,n.exports=i},767:(n,r,e)=>{var f=e(551).FDLayoutEdge;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var g in f)i[g]=f[g];n.exports=i},880:(n,r,e)=>{var f=e(551).LGraph;function i(t,s,o){f.call(this,t,s,o)}i.prototype=Object.create(f.prototype);for(var g in f)i[g]=f[g];n.exports=i},578:(n,r,e)=>{var f=e(551).LGraphManager;function i(t){f.call(this,t)}i.prototype=Object.create(f.prototype);for(var g in f)i[g]=f[g];n.exports=i},765:(n,r,e)=>{var f=e(551).FDLayout,i=e(578),g=e(880),t=e(991),s=e(767),o=e(806),c=e(902),h=e(551).FDLayoutConstants,T=e(551).LayoutConstants,v=e(551).Point,d=e(551).PointD,N=e(551).DimensionD,S=e(551).Layout,M=e(551).Integer,P=e(551).IGeometry,K=e(551).LGraph,Y=e(551).Transform,Z=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var a=new i(this);return this.graphManager=a,a},D.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},D.prototype.newNode=function(a){return new t(this.graphManager,a)},D.prototype.newEdge=function(a){return new s(null,null,a)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%h.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return a.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[H],O[H]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(H)||(a.nodesInRelativeHorizontal.push(H),a.nodeToRelativeConstraintMapHorizontal.set(H,[]),a.dummyToNodeForVerticalAlignment.has(H)?a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(H).getCenterX())),a.nodesInRelativeHorizontal.includes(B)||(a.nodesInRelativeHorizontal.push(B),a.nodeToRelativeConstraintMapHorizontal.set(B,[]),a.dummyToNodeForVerticalAlignment.has(B)?a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(B).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(_)||(a.nodesInRelativeVertical.push(_),a.nodeToRelativeConstraintMapVertical.set(_,[]),a.dummyToNodeForHorizontalAlignment.has(_)?a.nodeToTempPositionMapVertical.set(_,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(_,a.idToNodeMap.get(_).getCenterY())),a.nodesInRelativeVertical.includes(lt)||(a.nodesInRelativeVertical.push(lt),a.nodeToRelativeConstraintMapVertical.set(lt,[]),a.dummyToNodeForHorizontalAlignment.has(lt)?a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(lt).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var q=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;q.has(H)?q.get(H).push(B):q.set(H,[B]),q.has(B)?q.get(B).push(H):q.set(B,[H])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;V.has(_)?V.get(_).push(lt):V.set(_,[lt]),V.has(lt)?V.get(lt).push(_):V.set(lt,[_])}});var U=function(H,B){var _=[],lt=[],J=new Z,Rt=new Set,Lt=0;return H.forEach(function(vt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var gt=it;for(J.push(gt),Rt.add(gt),_[Lt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(lt[Lt]=!0);var Tt=H.get(gt);Tt.forEach(function(At){Rt.has(At)||(J.push(At),Rt.add(At),_[Lt].push(At))})}Lt++}}),{components:_,isFixed:lt}},et=U(q,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(V,a.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=a.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(a,m,p){var E=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=K.calculateBounds(a),I=new Y;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w1;){var B=H[0];H.splice(0,1);var _=V.indexOf(B);_>=0&&V.splice(_,1),z--,U--}m!=null?O=(V.indexOf(H[0])+1)%z:O=0;for(var lt=Math.abs(E-p)/U,J=O;et!=U;J=++J%z){var Rt=V[J].getOtherEnd(a);if(Rt!=m){var Lt=(p+et*lt)%360,vt=(Lt+lt)%360;D.branchRadialLayout(Rt,a,Lt,vt,y+I,I),et++}}},D.maxDiagonalInTree=function(a){for(var m=M.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var a=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;a.memberGroups[x]=m[W];var q=m[W][0].getParent(),V=new t(a.graphManager);V.id=x,V.paddingLeft=q.paddingLeft||0,V.paddingRight=q.paddingRight||0,V.paddingBottom=q.paddingBottom||0,V.paddingTop=q.paddingTop||0,a.idToDummyNode[x]=V;var U=a.getGraphManager().add(a.newGraph(),V),et=q.getChild();et.add(V);for(var z=0;zy?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var m=this.compoundOrder[a],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=a.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;a.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,R)})},D.prototype.getToBeTiled=function(a){var m=a.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=a.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(a){a.id;for(var m=a.getEdges(),p=0,E=0;Eq&&(q=U.rect.height)}p+=q+a.verticalPadding}},D.prototype.tileCompoundMembers=function(a,m){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(a[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(a,m){var p=this.tileNodesByFavoringDim(a,m,!0),E=this.tileNodesByFavoringDim(a,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var W=I/y,x=w/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,V=(E-p+Math.sqrt(q))/(2*(W+E)),U;m?(U=Math.ceil(V),U==V&&U++):U=Math.floor(V);var et=U*(W+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(a,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(a,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};a.sort(function(z,O){var H=W;return w.idealRowWidth?(H=I,H(z.id,O.id)):H(z,O)});for(var x=0,q=0,V=0;V0&&(w+=a.horizontalPadding),a.rowWidth[p]=w,a.width0&&(R+=a.verticalPadding);var W=0;R>a.rowHeight[p]&&(W=a.rowHeight[p],a.rowHeight[p]=R,W=a.rowHeight[p]-W),a.height+=W,a.rows[p].push(m)},D.prototype.getShortestRowIndex=function(a){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=a.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(a,m,p){if(a.idealRowWidth){var E=a.rows.length-1,y=a.rowWidth[E];return y+m+a.horizontalPadding<=a.idealRowWidth}var I=this.getShortestRowIndex(a);if(I<0)return!0;var w=a.rowWidth[I];if(w+a.horizontalPadding+m<=a.width)return!0;var R=0;a.rowHeight[I]0&&(R=p+a.verticalPadding-a.rowHeight[I]);var W;a.width-w>=m+a.horizontalPadding?W=(a.height+R)/(w+m+a.horizontalPadding):W=(a.height+R)/a.width,R=p+a.verticalPadding;var x;return a.widthI&&m!=p){E.splice(-1,1),a.rows[p].push(y),a.rowWidth[m]=a.rowWidth[m]-I,a.rowWidth[p]=a.rowWidth[p]+I,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=a.verticalPadding);var W=a.rowHeight[m]+a.rowHeight[p];a.rowHeight[m]=w,a.rowHeight[p]0)for(var et=y;et<=I;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)U[3]+=this.grid[y-1][et].length+this.grid[y][et].length-1;for(var z=M.MAX_VALUE,O,H,B=0;B{var f=e(551).FDLayoutNode,i=e(551).IMath;function g(s,o,c,h){f.call(this,s,o,c,h)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h0){var Ct=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,v.has(ht)?d[v.get(ht)]:k.get(ht)),Ct+=tt.get(ht)):(tt.set(ht,v.has(ht)?N[v.get(ht)]:k.get(ht)),Ct+=tt.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){Q.has(ht)||tt.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=v.has(ht)?d[v.get(ht)]:k.get(ht):ct+=v.has(ht)?N[v.get(ht)]:k.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Ct=b.get(st);Ct.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){Mt=!0,kt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(Mt)throw kt}}var ge=(Ct+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ge)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,Q=0,k=0,nt=0;if(b.forEach(function(j){j.left?d[v.get(j.left)]-d[v.get(j.right)]>=0?$++:Q++:N[v.get(j.top)]-N[v.get(j.bottom)]>=0?k++:nt++}),$>Q&&k>nt)for(var ut=0;utQ)for(var ot=0;otnt)for(var tt=0;tt1)h.fixedNodeConstraint.forEach(function(F,b){E[b]=[F.position.x,F.position.y],y[b]=[d[v.get(F.nodeId)],N[v.get(F.nodeId)]]}),I=!0;else if(h.alignmentConstraint)(function(){var F=0;if(h.alignmentConstraint.vertical){for(var b=h.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var dt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;dt.size>0?wt=d[v.get(dt.values().next().value)]:wt=Z(j).x,b[tt].forEach(function(yt){E[F]=[wt,N[v.get(yt)]],y[F]=[d[v.get(yt)],N[v.get(yt)]],F++})},Q=0;Q0?wt=d[v.get(dt.values().next().value)]:wt=Z(j).y,k[tt].forEach(function(yt){E[F]=[d[v.get(yt)],wt],y[F]=[d[v.get(yt)],N[v.get(yt)]],F++})},ut=0;utV&&(V=q[et].length,U=et);if(V0){var mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(F,b){var $={x:d[v.get(F.nodeId)],y:N[v.get(F.nodeId)]},Q=F.position,k=Y(Q,$);mt.x+=k.x,mt.y+=k.y}),mt.x/=h.fixedNodeConstraint.length,mt.y/=h.fixedNodeConstraint.length,d.forEach(function(F,b){d[b]+=mt.x}),N.forEach(function(F,b){N[b]+=mt.y}),h.fixedNodeConstraint.forEach(function(F){d[v.get(F.nodeId)]=F.position.x,N[v.get(F.nodeId)]=F.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var xt=h.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(nt){$.add(nt)});var Q=new Set([].concat(f($)).filter(function(nt){return R.has(nt)})),k=void 0;Q.size>0?k=d[v.get(Q.values().next().value)]:k=Z($).x,$.forEach(function(nt){R.has(nt)||(d[v.get(nt)]=k)})},Vt=0;Vt0?k=N[v.get(Q.values().next().value)]:k=Z($).y,$.forEach(function(nt){R.has(nt)||(N[v.get(nt)]=k)})},bt=0;bt{n.exports=A}},L={};function u(n){var r=L[n];if(r!==void 0)return r.exports;var e=L[n]={exports:{}};return G[n](e,e.exports,u),e.exports}var l=u(45);return l})()})}(fe)),fe.exports}var Er=le.exports,Re;function mr(){return Re||(Re=1,function(C,X){(function(G,L){C.exports=L(yr())})(Er,function(A){return(()=>{var G={658:n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),i=1;i{var f=function(){function t(s,o){var c=[],h=!0,T=!1,v=void 0;try{for(var d=s[Symbol.iterator](),N;!(h=(N=d.next()).done)&&(c.push(N.value),!(o&&c.length===o));h=!0);}catch(S){T=!0,v=S}finally{try{!h&&d.return&&d.return()}finally{if(T)throw v}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=e(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var w=0;w1){N=v[0],S=N.connectedEdges().length,v.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),K),Y},g.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,N=!1,S=void 0;try{for(var M=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=M.next()).done);d=!0){var K=P.value,Y=f(K,2),Z=Y[0],D=Y[1],rt=o.cy.getElementById(Z);if(rt){var a=rt.boundingBox(),m=s.xCoords[D]-a.w/2,p=s.xCoords[D]+a.w/2,E=s.yCoords[D]-a.h/2,y=s.yCoords[D]+a.h/2;mh&&(h=p),Ev&&(v=y)}}}catch(x){N=!0,S=x}finally{try{!d&&M.return&&M.return()}finally{if(N)throw S}}var I=t.x-(h+c)/2,w=t.y-(v+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+w})}else{Object.keys(s).forEach(function(x){var q=s[x],V=q.getRect().x,U=q.getRect().x+q.getRect().width,et=q.getRect().y,z=q.getRect().y+q.getRect().height;Vh&&(h=U),etv&&(v=z)});var R=t.x-(h+c)/2,W=t.y-(v+T)/2;Object.keys(s).forEach(function(x){var q=s[x];q.setCenter(q.getCenterX()+R,q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,v=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,S=void 0,M=void 0,P=void 0,K=t.descendants().not(":parent"),Y=K.length,Z=0;ZN&&(h=N),TM&&(v=M),d{var f=e(548),i=e(140).CoSELayout,g=e(140).CoSENode,t=e(140).layoutBase.PointD,s=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,h=e(140).CoSEConstants,T=function(d,N){var S=d.cy,M=d.eles,P=M.nodes(),K=M.edges(),Y=void 0,Z=void 0,D=void 0,rt={};d.randomize&&(Y=N.nodeIndexes,Z=N.xCoords,D=N.yCoords);var a=function(x){return typeof x=="function"},m=function(x,q){return a(x)?x(q):x},p=f.calcParentsWithoutChildren(S,M),E=function W(x,q,V,U){for(var et=q.length,z=0;z0){var J=void 0;J=V.getGraphManager().add(V.newGraph(),B),W(J,H,V,U)}}},y=function(x,q,V){for(var U=0,et=0,z=0;z0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:a(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,d),y(w,R,K),I(w,d),w.runLayout(),rt};n.exports={coseLayout:T}},212:(n,r,e)=>{var f=function(){function d(N,S){for(var M=0;M0)if(p){var I=t.getTopMostNodes(M.eles.nodes());if(D=t.connectComponents(P,M.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),M.randomize&&D.forEach(function(vt){M.eles=vt,Y.push(o(M))}),M.quality=="default"||M.quality=="proof"){var w=P.collection();if(M.tile){var R=new Map,W=[],x=[],q=0,V={nodeIndexes:R,xCoords:W,yCoords:x},U=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,Tt){w.merge(vt.nodes()[Tt]),gt.isParent()||(V.nodeIndexes.set(vt.nodes()[Tt].id(),q++),V.xCoords.push(vt.nodes()[0].position().x),V.yCoords.push(vt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),Y.push(V);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),Y.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(vt,it){M.eles=vt,Z.push(h(M,Y[it])),t.relocateComponent(rt[it],Z[it],M)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],Y[it],M)});var O=new Set;if(D.length>1){var H=[],B=K.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(M.quality=="draft"&&(gt=Y[it].nodeIndexes),vt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Dt){if(M.quality=="draft")if(!Dt.isParent())At=gt.get(Dt.id()),Tt.nodes.push({x:Y[it].xCoords[At]-Dt.boundingbox().w/2,y:Y[it].yCoords[At]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,gt);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else Z[it][Dt.id()]&&Tt.nodes.push({x:Z[it][Dt.id()].getLeft(),y:Z[it][Dt.id()].getTop(),width:Z[it][Dt.id()].getWidth(),height:Z[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(M.quality=="draft"){var St=gt.get(mt.id()),Vt=gt.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,gt);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(Y[it].xCoords[St]),Xt.push(Y[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,Y[it].xCoords,Y[it].yCoords,gt);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(Y[it].xCoords[Vt]),Ut.push(Y[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else Z[it][mt.id()]&&Z[it][xt.id()]&&Tt.edges.push({startX:Z[it][mt.id()].getCenterX(),startY:Z[it][mt.id()].getCenterY(),endX:Z[it][xt.id()].getCenterX(),endY:Z[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(H.push(Tt),O.add(it))}});var _=m.packComponents(H,M.randomize).shifts;if(M.quality=="draft")Y.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+_[it].dx}),Tt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=gt,vt.yCoords=Tt});else{var lt=0;O.forEach(function(vt){Object.keys(Z[vt]).forEach(function(it){var gt=Z[vt][it];gt.setCenter(gt.getCenterX()+_[lt].dx,gt.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=M.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),M.randomize){var y=o(M);Y.push(y)}M.quality=="default"||M.quality=="proof"?(Z.push(h(M,Y[0])),t.relocateComponent(rt[0],Z[0],M)):t.relocateComponent(rt[0],Y[0],M)}var J=function(it,gt){if(M.quality=="default"||M.quality=="proof"){typeof it=="number"&&(it=gt);var Tt=void 0,At=void 0,Dt=it.data("id");return Z.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},At=xt[Dt])}),M.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Tt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Tt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Tt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Tt.y-=At.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return Y.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(M.quality=="default"||M.quality=="proof"||M.randomize){var Rt=t.calcParentsWithoutChildren(P,K),Lt=K.filter(function(vt){return vt.css("display")=="none"});M.eles=K.not(Lt),K.nodes().not(":parent").not(Lt).layoutPositions(S,M,J),Rt.length>0&&Rt.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();n.exports=v},657:(n,r,e)=>{var f=e(548),i=e(140).layoutBase.Matrix,g=e(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),v=h.nodes(":parent"),d=new Map,N=new Map,S=new Map,M=[],P=[],K=[],Y=[],Z=[],D=[],rt=[],a=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,W=function(){for(var b=0,$=0,Q=!1;$=nt;){ot=k[nt++];for(var It=M[ot],ft=0;ftdt&&(dt=Z[Ct],wt=Ct)}return wt},q=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var k=0;k=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?M[b].push(S.get($.id())):M[b].push($.id()))})});var Lt=function(b){var $=N.get(b),Q=void 0;d.get(b).forEach(function(k){c.getElementById(k).isParent()?Q=S.get(k):Q=k,M[$].push(Q),M[N.get(Q)].push(b)})},vt=!0,it=!1,gt=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),At;!(vt=(At=Tt.next()).done);vt=!0){var Dt=At.value;Lt(Dt)}}catch(F){it=!0,gt=F}finally{try{!vt&&Tt.return&&Tt.return()}finally{if(it)throw gt}}m=N.size;var mt=void 0;if(m>2){R=m{var f=e(212),i=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&i(cytoscape),n.exports=i},140:n=>{n.exports=A}},L={};function u(n){var r=L[n];if(r!==void 0)return r.exports;var e=L[n]={exports:{}};return G[n](e,e.exports,u),e.exports}var l=u(579);return l})()})}(le)),le.exports}var Tr=mr();const Nr=Je(Tr);var Se={L:"left",R:"right",T:"top",B:"bottom"},Fe={L:at(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:at(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:at(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:at(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},he={L:at((C,X)=>C-X+2,"L"),R:at((C,X)=>C-2,"R"),T:at((C,X)=>C-X+2,"T"),B:at((C,X)=>C-2,"B")},Lr=at(function(C){return zt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),be=at(function(C){const X=C;return X==="L"||X==="R"||X==="T"||X==="B"},"isArchitectureDirection"),zt=at(function(C){const X=C;return X==="L"||X==="R"},"isArchitectureDirectionX"),Qt=at(function(C){const X=C;return X==="T"||X==="B"},"isArchitectureDirectionY"),Ce=at(function(C,X){const A=zt(C)&&Qt(X),G=Qt(C)&&zt(X);return A||G},"isArchitectureDirectionXY"),Cr=at(function(C){const X=C[0],A=C[1],G=zt(X)&&Qt(A),L=Qt(X)&&zt(A);return G||L},"isArchitecturePairXY"),Mr=at(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),me=at(function(C,X){const A=`${C}${X}`;return Mr(A)?A:void 0},"getArchitectureDirectionPair"),Ar=at(function([C,X],A){const G=A[0],L=A[1];return zt(G)?Qt(L)?[C+(G==="L"?-1:1),X+(L==="T"?1:-1)]:[C+(G==="L"?-1:1),X]:zt(L)?[C+(L==="L"?1:-1),X+(G==="T"?1:-1)]:[C,X+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),wr=at(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Or=at(function(C,X){return Ce(C,X)?"bend":zt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Dr=at(function(C){return C.type==="service"},"isArchitectureService"),xr=at(function(C){return C.type==="junction"},"isArchitectureJunction"),Ue=at(C=>C.data(),"edgeData"),ae=at(C=>C.data(),"nodeData"),Ye=or.architecture,pt=new ur(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ye,dataStructures:void 0,elements:{}})),Ir=at(()=>{pt.reset(),sr()},"clear"),Rr=at(function({id:C,icon:X,in:A,title:G,iconText:L}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The service [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[A]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"service",icon:X,iconText:L,title:G,edges:[],in:A}},"addService"),Sr=at(()=>Object.values(pt.records.nodes).filter(Dr),"getServices"),Fr=at(function({id:C,in:X}){pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"junction",edges:[],in:X}},"addJunction"),br=at(()=>Object.values(pt.records.nodes).filter(xr),"getJunctions"),Pr=at(()=>Object.values(pt.records.nodes),"getNodes"),Te=at(C=>pt.records.nodes[C],"getNode"),Gr=at(function({id:C,icon:X,in:A,title:G}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The group [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[A]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="group",pt.records.groups[C]={id:C,icon:X,title:G,in:A}},"addGroup"),Ur=at(()=>Object.values(pt.records.groups),"getGroups"),Yr=at(function({lhsId:C,rhsId:X,lhsDir:A,rhsDir:G,lhsInto:L,rhsInto:u,lhsGroup:l,rhsGroup:n,title:r}){if(!be(A))throw new Error(`Invalid direction given for left hand side of edge ${C}--${X}. Expected (L,R,T,B) got ${A}`);if(!be(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${X}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[C]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[X]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The right-hand id [${X}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[C].in,f=pt.records.nodes[X].in;if(l&&e&&f&&e==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(n&&e&&f&&e==f)throw new Error(`The right-hand id [${X}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const i={lhsId:C,lhsDir:A,lhsInto:L,lhsGroup:l,rhsId:X,rhsDir:G,rhsInto:u,rhsGroup:n,title:r};pt.records.edges.push(i),pt.records.nodes[C]&&pt.records.nodes[X]&&(pt.records.nodes[C].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[X].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Xr=at(()=>pt.records.edges,"getEdges"),Hr=at(()=>{if(pt.records.dataStructures===void 0){const C={},X=Object.entries(pt.records.nodes).reduce((n,[r,e])=>(n[r]=e.edges.reduce((f,i)=>{var s,o;const g=(s=Te(i.lhsId))==null?void 0:s.in,t=(o=Te(i.rhsId))==null?void 0:o.in;if(g&&t&&g!==t){const c=Or(i.lhsDir,i.rhsDir);c!=="bend"&&(C[g]??(C[g]={}),C[g][t]=c,C[t]??(C[t]={}),C[t][g]=c)}if(i.lhsId===r){const c=me(i.lhsDir,i.rhsDir);c&&(f[c]=i.rhsId)}else{const c=me(i.rhsDir,i.lhsDir);c&&(f[c]=i.lhsId)}return f},{}),n),{}),A=Object.keys(X)[0],G={[A]:1},L=Object.keys(X).reduce((n,r)=>r===A?n:{...n,[r]:1},{}),u=at(n=>{const r={[n]:[0,0]},e=[n];for(;e.length>0;){const f=e.shift();if(f){G[f]=1,delete L[f];const i=X[f],[g,t]=r[f];Object.entries(i).forEach(([s,o])=>{G[o]||(r[o]=Ar([g,t],s),e.push(o))})}}return r},"BFS"),l=[u(A)];for(;Object.keys(L).length>0;)l.push(u(Object.keys(L)[0]));pt.records.dataStructures={adjList:X,spatialMaps:l,groupAlignments:C}}return pt.records.dataStructures},"getDataStructures"),Wr=at((C,X)=>{pt.records.elements[C]=X},"setElementForId"),Vr=at(C=>pt.records.elements[C],"getElementById"),Xe=at(()=>nr({...Ye,...ar().architecture}),"getConfig"),ue={clear:Ir,setDiagramTitle:er,getDiagramTitle:tr,setAccTitle:_e,getAccTitle:je,setAccDescription:Ke,getAccDescription:Qe,getConfig:Xe,addService:Rr,getServices:Sr,addJunction:Fr,getJunctions:br,getNodes:Pr,getNode:Te,addGroup:Gr,getGroups:Ur,addEdge:Yr,getEdges:Xr,setElementForId:Wr,getElementById:Vr,getDataStructures:Hr};function Pt(C){return Xe()[C]}at(Pt,"getConfigField");var zr=at((C,X)=>{cr(C,X),C.groups.map(X.addGroup),C.services.map(A=>X.addService({...A,type:"service"})),C.junctions.map(A=>X.addJunction({...A,type:"junction"})),C.edges.map(X.addEdge)},"populateDb"),Br={parse:at(async C=>{const X=await gr("architecture",C);Pe.debug(X),zr(X,ue)},"parse")},$r=at(C=>` - .edge { - stroke-width: ${C.archEdgeWidth}; - stroke: ${C.archEdgeColor}; - fill: none; - } - - .arrow { - fill: ${C.archEdgeArrowColor}; - } - - .node-bkg { - fill: none; - stroke: ${C.archGroupBorderColor}; - stroke-width: ${C.archGroupBorderWidth}; - stroke-dasharray: 8; - } - .node-icon-text { - display: flex; - align-items: center; - } - - .node-icon-text > div { - color: #fff; - margin: 1px; - height: fit-content; - text-align: center; - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - } -`,"getStyles"),kr=$r,ne=at(C=>`${C}`,"wrapIcon"),oe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ne('')},server:{body:ne('')},disk:{body:ne('')},internet:{body:ne('')},cloud:{body:ne('')},unknown:fr,blank:{body:ne("")}}},Zr=at(async function(C,X){const A=Pt("padding"),G=Pt("iconSize"),L=G/2,u=G/6,l=u/2;await Promise.all(X.edges().map(async n=>{var P,K;const{source:r,sourceDir:e,sourceArrow:f,sourceGroup:i,target:g,targetDir:t,targetArrow:s,targetGroup:o,label:c}=Ue(n);let{x:h,y:T}=n[0].sourceEndpoint();const{x:v,y:d}=n[0].midpoint();let{x:N,y:S}=n[0].targetEndpoint();const M=A+4;if(i&&(zt(e)?h+=e==="L"?-M:M:T+=e==="T"?-M:M+18),o&&(zt(t)?N+=t==="L"?-M:M:S+=t==="T"?-M:M+18),!i&&((P=ue.getNode(r))==null?void 0:P.type)==="junction"&&(zt(e)?h+=e==="L"?L:-L:T+=e==="T"?L:-L),!o&&((K=ue.getNode(g))==null?void 0:K.type)==="junction"&&(zt(t)?N+=t==="L"?L:-L:S+=t==="T"?L:-L),n[0]._private.rscratch){const Y=C.insert("g");if(Y.insert("path").attr("d",`M ${h},${T} L ${v},${d} L${N},${S} `).attr("class","edge"),f){const Z=zt(e)?he[e](h,u):h-l,D=Qt(e)?he[e](T,u):T-l;Y.insert("polygon").attr("points",Fe[e](u)).attr("transform",`translate(${Z},${D})`).attr("class","arrow")}if(s){const Z=zt(t)?he[t](N,u):N-l,D=Qt(t)?he[t](S,u):S-l;Y.insert("polygon").attr("points",Fe[t](u)).attr("transform",`translate(${Z},${D})`).attr("class","arrow")}if(c){const Z=Ce(e,t)?"XY":zt(e)?"X":"Y";let D=0;Z==="X"?D=Math.abs(h-N):Z==="Y"?D=Math.abs(T-S)/1.5:D=Math.abs(h-N)/2;const rt=Y.append("g");if(await Ne(rt,c,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},Le()),rt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),Z==="X")rt.attr("transform","translate("+v+", "+d+")");else if(Z==="Y")rt.attr("transform","translate("+v+", "+d+") rotate(-90)");else if(Z==="XY"){const a=me(e,t);if(a&&Cr(a)){const m=rt.node().getBoundingClientRect(),[p,E]=wr(a);rt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*p*E*45})`);const y=rt.node().getBoundingClientRect();rt.attr("transform",` - translate(${v}, ${d-m.height/2}) - translate(${p*y.width/2}, ${E*y.height/2}) - rotate(${-1*p*E*45}, 0, ${m.height/2}) - `)}}}}}))},"drawEdges"),qr=at(async function(C,X){const G=Pt("padding")*.75,L=Pt("fontSize"),l=Pt("iconSize")/2;await Promise.all(X.nodes().map(async n=>{const r=ae(n);if(r.type==="group"){const{h:e,w:f,x1:i,y1:g}=n.boundingBox();C.append("rect").attr("x",i+l).attr("y",g+l).attr("width",f).attr("height",e).attr("class","node-bkg");const t=C.append("g");let s=i,o=g;if(r.icon){const c=t.append("g");c.html(`${await Ee(r.icon,{height:G,width:G,fallbackPrefix:oe.prefix})}`),c.attr("transform","translate("+(s+l+1)+", "+(o+l+1)+")"),s+=G,o+=L/2-1-2}if(r.label){const c=t.append("g");await Ne(c,r.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},Le()),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),c.attr("transform","translate("+(s+l+4)+", "+(o+l+2)+")")}}}))},"drawGroups"),Jr=at(async function(C,X,A){for(const G of A){const L=X.append("g"),u=Pt("iconSize");if(G.title){const e=L.append("g");await Ne(e,G.title,{useHtmlLabels:!1,width:u*1.5,classes:"architecture-service-label"},Le()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+u/2+", "+u+")")}const l=L.append("g");if(G.icon)l.html(`${await Ee(G.icon,{height:u,width:u,fallbackPrefix:oe.prefix})}`);else if(G.iconText){l.html(`${await Ee("blank",{height:u,width:u,fallbackPrefix:oe.prefix})}`);const i=l.append("g").append("foreignObject").attr("width",u).attr("height",u).append("div").attr("class","node-icon-text").attr("style",`height: ${u}px;`).append("div").html(G.iconText),g=parseInt(window.getComputedStyle(i.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;i.attr("style",`-webkit-line-clamp: ${Math.floor((u-2)/g)};`)}else l.append("path").attr("class","node-bkg").attr("id","node-"+G.id).attr("d",`M0 ${u} v${-u} q0,-5 5,-5 h${u} q5,0 5,5 v${u} H0 Z`);L.attr("class","architecture-service");const{width:n,height:r}=L._groups[0][0].getBBox();G.width=n,G.height=r,C.setElementForId(G.id,L)}return 0},"drawServices"),Qr=at(function(C,X,A){A.forEach(G=>{const L=X.append("g"),u=Pt("iconSize");L.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",u).attr("height",u),L.attr("class","architecture-junction");const{width:n,height:r}=L._groups[0][0].getBBox();L.width=n,L.height=r,C.setElementForId(G.id,L)})},"drawJunctions");lr([{name:oe.prefix,icons:oe}]);Ge.use(Nr);function He(C,X){C.forEach(A=>{X.add({group:"nodes",data:{type:"service",id:A.id,icon:A.icon,label:A.title,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-service"})})}at(He,"addServices");function We(C,X){C.forEach(A=>{X.add({group:"nodes",data:{type:"junction",id:A.id,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-junction"})})}at(We,"addJunctions");function Ve(C,X){X.nodes().map(A=>{const G=ae(A);if(G.type==="group")return;G.x=A.position().x,G.y=A.position().y,C.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}at(Ve,"positionNodes");function ze(C,X){C.forEach(A=>{X.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}at(ze,"addGroups");function Be(C,X){C.forEach(A=>{const{lhsId:G,rhsId:L,lhsInto:u,lhsGroup:l,rhsInto:n,lhsDir:r,rhsDir:e,rhsGroup:f,title:i}=A,g=Ce(A.lhsDir,A.rhsDir)?"segments":"straight",t={id:`${G}-${L}`,label:i,source:G,sourceDir:r,sourceArrow:u,sourceGroup:l,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:L,targetDir:e,targetArrow:n,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};X.add({group:"edges",data:t,classes:g})})}at(Be,"addEdges");function $e(C,X,A){const G=at((n,r)=>Object.entries(n).reduce((e,[f,i])=>{var s;let g=0;const t=Object.entries(i);if(t.length===1)return e[f]=t[0][1],e;for(let o=0;o{const r={},e={};return Object.entries(n).forEach(([f,[i,g]])=>{var s,o,c;const t=((s=C.getNode(f))==null?void 0:s.in)??"default";r[g]??(r[g]={}),(o=r[g])[t]??(o[t]=[]),r[g][t].push(f),e[i]??(e[i]={}),(c=e[i])[t]??(c[t]=[]),e[i][t].push(f)}),{horiz:Object.values(G(r,"horizontal")).filter(f=>f.length>1),vert:Object.values(G(e,"vertical")).filter(f=>f.length>1)}}),[u,l]=L.reduce(([n,r],{horiz:e,vert:f})=>[[...n,...e],[...r,...f]],[[],[]]);return{horizontal:u,vertical:l}}at($e,"getAlignments");function ke(C){const X=[],A=at(L=>`${L[0]},${L[1]}`,"posToStr"),G=at(L=>L.split(",").map(u=>parseInt(u)),"strToPos");return C.forEach(L=>{const u=Object.fromEntries(Object.entries(L).map(([e,f])=>[A(f),e])),l=[A([0,0])],n={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;l.length>0;){const e=l.shift();if(e){n[e]=1;const f=u[e];if(f){const i=G(e);Object.entries(r).forEach(([g,t])=>{const s=A([i[0]+t[0],i[1]+t[1]]),o=u[s];o&&!n[s]&&(l.push(s),X.push({[Se[g]]:o,[Se[Lr(g)]]:f,gap:1.5*Pt("iconSize")}))})}}}}),X}at(ke,"getRelativeConstraints");function Ze(C,X,A,G,L,{spatialMaps:u,groupAlignments:l}){return new Promise(n=>{const r=hr("body").append("div").attr("id","cy").attr("style","display:none"),e=Ge({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Pt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Pt("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});r.remove(),ze(A,e),He(C,e),We(X,e),Be(G,e);const f=$e(L,u,l),i=ke(u),g=e.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[s,o]=t.connectedNodes(),{parent:c}=ae(s),{parent:h}=ae(o);return c===h?1.5*Pt("iconSize"):.5*Pt("iconSize")},edgeElasticity(t){const[s,o]=t.connectedNodes(),{parent:c}=ae(s),{parent:h}=ae(o);return c===h?.45:.001},alignmentConstraint:f,relativePlacementConstraint:i});g.one("layoutstop",()=>{var s;function t(o,c,h,T){let v,d;const{x:N,y:S}=o,{x:M,y:P}=c;d=(T-S+(N-h)*(S-P)/(N-M))/Math.sqrt(1+Math.pow((S-P)/(N-M),2)),v=Math.sqrt(Math.pow(T-S,2)+Math.pow(h-N,2)-Math.pow(d,2));const K=Math.sqrt(Math.pow(M-N,2)+Math.pow(P-S,2));v=v/K;let Y=(M-N)*(T-S)-(P-S)*(h-N);switch(!0){case Y>=0:Y=1;break;case Y<0:Y=-1;break}let Z=(M-N)*(h-N)+(P-S)*(T-S);switch(!0){case Z>=0:Z=1;break;case Z<0:Z=-1;break}return d=Math.abs(d)*Y,v=v*Z,{distances:d,weights:v}}at(t,"getSegmentWeights"),e.startBatch();for(const o of Object.values(e.edges()))if((s=o.data)!=null&&s.call(o)){const{x:c,y:h}=o.source().position(),{x:T,y:v}=o.target().position();if(c!==T&&h!==v){const d=o.sourceEndpoint(),N=o.targetEndpoint(),{sourceDir:S}=Ue(o),[M,P]=Qt(S)?[d.x,N.y]:[N.x,d.y],{weights:K,distances:Y}=t(d,N,M,P);o.style("segment-distances",Y),o.style("segment-weights",K)}}e.endBatch(),g.run()}),g.run(),e.ready(t=>{Pe.info("Ready",t),n(e)})})}at(Ze,"layoutArchitecture");var Kr=at(async(C,X,A,G)=>{const L=G.db,u=L.getServices(),l=L.getJunctions(),n=L.getGroups(),r=L.getEdges(),e=L.getDataStructures(),f=rr(X),i=f.append("g");i.attr("class","architecture-edges");const g=f.append("g");g.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Jr(L,g,u),Qr(L,g,l);const s=await Ze(u,l,n,r,L,e);await Zr(i,s),await qr(t,s),Ve(L,s),ir(void 0,f,Pt("padding"),Pt("useMaxWidth"))},"draw"),jr={draw:Kr},si={parser:Br,db:ue,renderer:jr,styles:kr};export{si as diagram}; diff --git a/lightrag/api/webui/assets/blockDiagram-6J76NXCF-uKai_NGQ.js b/lightrag/api/webui/assets/blockDiagram-6J76NXCF-uKai_NGQ.js deleted file mode 100644 index 1ee50c2c..00000000 --- a/lightrag/api/webui/assets/blockDiagram-6J76NXCF-uKai_NGQ.js +++ /dev/null @@ -1,122 +0,0 @@ -import{g as de}from"./chunk-E2GYISFI-Csg-WUa_.js";import{_ as d,E as at,d as R,e as ge,l as m,y as ue,A as pe,c as z,ai as fe,R as xe,S as ye,O as be,aj as Z,ak as Yt,al as we,u as tt,k as me,am as Le,an as xt,ao as Se,i as Tt}from"./index-bjrbS6e8.js";import{c as ve}from"./clone-g5iXXiWA.js";import{G as Ee}from"./graph-OaiGNqgf.js";import{c as _e}from"./channel-oXqxytzI.js";import"./_baseUniq-DknB5v3H.js";var yt=function(){var e=d(function(N,x,g,u){for(g=g||{},u=N.length;u--;g[N[u]]=x);return g},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],l=[1,17],o=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],y=[1,23],b=[1,24],L=[8,15,16,21,28,29,30,31,32,40,44,47],E=[8,15,16,21,27,28,29,30,31,32,40,44,47],D=[1,49],v={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,g,u,w,S,c,_){var p=c.length-1;switch(S){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",c[p-1]),w.setHierarchy(c[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",c[p]),typeof c[p].length=="number"?this.$=c[p]:this.$=[c[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",c[p-1]),this.$=[c[p-1]].concat(c[p]);break;case 14:w.getLogger().debug("Rule: link: ",c[p],x),this.$={edgeTypeStr:c[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",c[p-3],c[p-1],c[p]),this.$={edgeTypeStr:c[p],label:c[p-1]};break;case 18:const A=parseInt(c[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",c[p-2],c[p-1],c[p]," typestr: ",c[p-1].edgeTypeStr);const X=w.edgeStrToEdgeData(c[p-1].edgeTypeStr);this.$=[{id:c[p-2].id,label:c[p-2].label,type:c[p-2].type,directions:c[p-2].directions},{id:c[p-2].id+"-"+c[p].id,start:c[p-2].id,end:c[p].id,label:c[p-1].label,type:"edge",directions:c[p].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",c[p-1],c[p]),this.$={id:c[p-1].id,label:c[p-1].label,type:w.typeStr2Type(c[p-1].typeStr),directions:c[p-1].directions,widthInColumns:parseInt(c[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",c[p]),this.$={id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",c[p]),this.$={type:"column-setting",columns:c[p]==="auto"?-1:parseInt(c[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",c[p-2],c[p-1]),w.generateId(),this.$={...c[p-2],type:"composite",children:c[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",c[p-2],c[p-1],c[p]);const W=w.generateId();this.$={id:W,type:"composite",label:"",children:c[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",c[p]),this.$={id:c[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",c[p-1],c[p]),this.$={id:c[p-1],label:c[p].label,typeStr:c[p].typeStr,directions:c[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",c[p]),this.$=[c[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",c[p-1],c[p]),this.$=[c[p-1]].concat(c[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",c[p-2],c[p-1],c[p]),this.$={typeStr:c[p-2]+c[p],label:c[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",c[p-3],c[p-2]," #3:",c[p-1],c[p]),this.$={typeStr:c[p-3]+c[p],label:c[p-2],directions:c[p-1]};break;case 35:case 36:this.$={type:"classDef",id:c[p-1].trim(),css:c[p].trim()};break;case 37:this.$={type:"applyClass",id:c[p-1].trim(),styleClass:c[p].trim()};break;case 38:this.$={type:"applyStyles",id:c[p-1].trim(),stylesStr:c[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:a,40:s,44:l,47:o}),e(h,[2,16],{14:22,15:y,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(L,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(E,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},e(L,[2,24]),{11:37,13:4,14:22,15:y,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(E,[2,30]),{18:[1,43]},{18:[1,44]},e(L,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:D},{15:[1,50]},e(h,[2,27]),e(E,[2,33]),{39:[1,51]},{34:52,35:D,39:[2,31]},{32:[2,15]},e(E,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,g){if(g.recoverable)this.trace(x);else{var u=new Error(x);throw u.hash=g,u}},"parseError"),parse:d(function(x){var g=this,u=[0],w=[],S=[null],c=[],_=this.table,p="",A=0,O=0,X=2,W=1,ce=c.slice.call(arguments,1),M=Object.create(this.lexer),J={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(J.yy[gt]=this.yy[gt]);M.setInput(x,J.yy),J.yy.lexer=M,J.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ut=M.yylloc;c.push(ut);var oe=M.options&&M.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(H){u.length=u.length-2*H,S.length=S.length-H,c.length=c.length-H}d(he,"popStack");function Dt(){var H;return H=w.pop()||M.lex()||W,typeof H!="number"&&(H instanceof Array&&(w=H,H=w.pop()),H=g.symbols_[H]||H),H}d(Dt,"lex");for(var Y,Q,U,pt,$={},st,q,Nt,it;;){if(Q=u[u.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=Dt()),U=_[Q]&&_[Q][Y]),typeof U>"u"||!U.length||!U[0]){var ft="";it=[];for(st in _[Q])this.terminals_[st]&&st>X&&it.push("'"+this.terminals_[st]+"'");M.showPosition?ft="Parse error on line "+(A+1)+`: -`+M.showPosition()+` -Expecting `+it.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ft="Parse error on line "+(A+1)+": Unexpected "+(Y==W?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ft,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:ut,expected:it})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(U[0]){case 1:u.push(Y),S.push(M.yytext),c.push(M.yylloc),u.push(U[1]),Y=null,O=M.yyleng,p=M.yytext,A=M.yylineno,ut=M.yylloc;break;case 2:if(q=this.productions_[U[1]][1],$.$=S[S.length-q],$._$={first_line:c[c.length-(q||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(q||1)].first_column,last_column:c[c.length-1].last_column},oe&&($._$.range=[c[c.length-(q||1)].range[0],c[c.length-1].range[1]]),pt=this.performAction.apply($,[p,O,A,J.yy,U[1],S,c].concat(ce)),typeof pt<"u")return pt;q&&(u=u.slice(0,-1*q*2),S=S.slice(0,-1*q),c=c.slice(0,-1*q)),u.push(this.productions_[U[1]][0]),S.push($.$),c.push($._$),Nt=_[u[u.length-2]][u[u.length-1]],u.push(Nt);break;case 3:return!0}}return!0},"parse")},T=function(){var N={EOF:1,parseError:d(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:d(function(x,g){return this.yy=g||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var g=x.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var g=x.length,u=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var w=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===w.length?this.yylloc.first_column:0)+w[w.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),g=new Array(x.length+1).join("-");return x+this.upcomingInput()+` -`+g+"^"},"showPosition"),test_match:d(function(x,g){var u,w,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),w=x[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],u=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var c in S)this[c]=S[c];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,g,u,w;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),c=0;cg[0].length)){if(g=u,w=c,this.options.backtrack_lexer){if(x=this.test_match(u,S[c]),x!==!1)return x;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(x=this.test_match(g,S[w]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,u,w,S){switch(w){case 0:return 10;case 1:return g.getLogger().debug("Found space-block"),31;case 2:return g.getLogger().debug("Found nl-block"),31;case 3:return g.getLogger().debug("Found space-block"),29;case 4:g.getLogger().debug(".",u.yytext);break;case 5:g.getLogger().debug("_",u.yytext);break;case 6:return 5;case 7:return u.yytext=-1,28;case 8:return u.yytext=u.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:g.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 14:return g.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 15:return u.yytext=u.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 16:return u.yytext="1",g.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return g.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),g.getLogger().debug("LEX ARR START"),38;case 75:return g.getLogger().debug("Lex: NODE_ID",u.yytext),32;case 76:return g.getLogger().debug("Lex: EOF",u.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:g.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:g.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return g.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 84:g.getLogger().debug("LEX POPPING"),this.popState();break;case 85:g.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (left):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (x):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (y):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (up):",u.yytext),"DIR";case 91:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (down):",u.yytext),"DIR";case 92:return u.yytext="]>",g.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 94:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 95:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 96:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 97:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 98:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 99:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return g.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 103:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 104:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 105:return g.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return N}();v.lexer=T;function k(){this.yy={}}return d(k,"Parser"),k.prototype=v,v.Parser=k,new k}();yt.parser=yt;var ke=yt,V=new Map,St=[],bt=new Map,Ct="color",Bt="fill",De="bgFill",Ht=",",Ne=z(),ct=new Map,Te=d(e=>me.sanitizeText(e,Ne),"sanitizeText"),Ce=d(function(e,t=""){let r=ct.get(e);r||(r={id:e,styles:[],textStyles:[]},ct.set(e,r)),t!=null&&t.split(Ht).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ct).exec(n)){const s=i.replace(Bt,De).replace(Ct,Bt);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),Be=d(function(e,t=""){const r=V.get(e);t!=null&&(r.styles=t.split(Ht))},"addStyle2Node"),Ie=d(function(e,t){e.split(",").forEach(function(r){let n=V.get(r);if(n===void 0){const i=r.trim();n={id:i,type:"na",children:[]},V.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),Kt=d((e,t)=>{const r=e.flat(),n=[];for(const i of r){if(i.label&&(i.label=Te(i.label)),i.type==="classDef"){Ce(i.id,i.css);continue}if(i.type==="applyClass"){Ie(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&Be(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const a=(bt.get(i.id)??0)+1;bt.set(i.id,a),i.id=a+"-"+i.id,St.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const a=V.get(i.id);if(a===void 0?V.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Kt(i.children,i),i.type==="space"){const s=i.width??1;for(let l=0;l{m.debug("Clear called"),ue(),rt={id:"root",type:"composite",children:[],columns:-1},V=new Map([["root",rt]]),vt=[],ct=new Map,St=[],bt=new Map},"clear");function Xt(e){switch(m.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return m.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(Xt,"typeStr2Type");function Ut(e){switch(m.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(Ut,"edgeTypeStr2Type");function jt(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}d(jt,"edgeStrToEdgeData");var It=0,Re=d(()=>(It++,"id-"+Math.random().toString(36).substr(2,12)+"-"+It),"generateId"),ze=d(e=>{rt.children=e,Kt(e,rt),vt=rt.children},"setHierarchy"),Ae=d(e=>{const t=V.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Me=d(()=>[...V.values()],"getBlocksFlat"),Fe=d(()=>vt||[],"getBlocks"),We=d(()=>St,"getEdges"),Pe=d(e=>V.get(e),"getBlock"),Ye=d(e=>{V.set(e.id,e)},"setBlock"),He=d(()=>m,"getLogger"),Ke=d(function(){return ct},"getClasses"),Xe={getConfig:d(()=>at().block,"getConfig"),typeStr2Type:Xt,edgeTypeStr2Type:Ut,edgeStrToEdgeData:jt,getLogger:He,getBlocksFlat:Me,getBlocks:Fe,getEdges:We,setHierarchy:ze,getBlock:Pe,setBlock:Ye,getColumns:Ae,getClasses:Ke,clear:Oe,generateId:Re},Ue=Xe,nt=d((e,t)=>{const r=_e,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return pe(n,i,a,t)},"fade"),je=d(e=>`.label { - font-family: ${e.fontFamily}; - color: ${e.nodeTextColor||e.textColor}; - } - .cluster-label text { - fill: ${e.titleColor}; - } - .cluster-label span,p { - color: ${e.titleColor}; - } - - - - .label text,span,p { - fill: ${e.nodeTextColor||e.textColor}; - color: ${e.nodeTextColor||e.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - stroke-width: 1px; - } - .flowchart-label text { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${e.arrowheadColor}; - } - - .edgePath .path { - stroke: ${e.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${e.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${e.edgeLabelBackground}; - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${nt(e.edgeLabelBackground,.5)}; - // background-color: - } - - .node .cluster { - // fill: ${nt(e.mainBkg,.5)}; - fill: ${nt(e.clusterBkg,.5)}; - stroke: ${nt(e.clusterBorder,.2)}; - box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; - stroke-width: 1px; - } - - .cluster text { - fill: ${e.titleColor}; - } - - .cluster span,p { - color: ${e.titleColor}; - } - /* .cluster div { - color: ${e.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${e.fontFamily}; - font-size: 12px; - background: ${e.tertiaryColor}; - border: 1px solid ${e.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; - } - ${de()} -`,"getStyles"),Ve=je,Ge=d((e,t,r,n)=>{t.forEach(i=>{sr[i](e,r,n)})},"insertMarkers"),Ze=d((e,t,r)=>{m.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),qe=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Je=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Qe=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),$e=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),tr=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),er=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),rr=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),ar=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),sr={extension:Ze,composition:qe,aggregation:Je,dependency:Qe,lollipop:$e,point:tr,circle:er,cross:rr,barb:ar},ir=Ge,Wt,Pt,I=((Pt=(Wt=z())==null?void 0:Wt.block)==null?void 0:Pt.padding)??8;function Vt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,n=Math.floor(t/e);return{px:r,py:n}}d(Vt,"calculateBlockPosition");var nr=d(e=>{let t=0,r=0;for(const n of e.children){const{width:i,height:a,x:s,y:l}=n.size??{width:0,height:0,x:0,y:0};m.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),a>r&&(r=a))}return{width:t,height:r}},"getMaxChildSize");function ot(e,t,r=0,n=0){var s,l,o,f,h,y,b,L,E,D,v;m.debug("setBlockSizes abc95 (start)",e.id,(s=e==null?void 0:e.size)==null?void 0:s.x,"block width =",e==null?void 0:e.size,"siblingWidth",r),(l=e==null?void 0:e.size)!=null&&l.width||(e.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(((o=e.children)==null?void 0:o.length)>0){for(const S of e.children)ot(S,t);const T=nr(e);i=T.width,a=T.height,m.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,a);for(const S of e.children)S.size&&(m.debug(`abc95 Setting size of children of ${e.id} id=${S.id} ${i} ${a} ${JSON.stringify(S.size)}`),S.size.width=i*(S.widthInColumns??1)+I*((S.widthInColumns??1)-1),S.size.height=a,S.size.x=0,S.size.y=0,m.debug(`abc95 updating size of ${e.id} children child:${S.id} maxWidth:${i} maxHeight:${a}`));for(const S of e.children)ot(S,t,i,a);const k=e.columns??-1;let N=0;for(const S of e.children)N+=S.widthInColumns??1;let x=e.children.length;k>0&&k0?Math.min(e.children.length,k):e.children.length;if(S>0){const c=(u-S*I-I)/S;m.debug("abc95 (growing to fit) width",e.id,u,(b=e.size)==null?void 0:b.width,c);for(const _ of e.children)_.size&&(_.size.width=c)}}e.size={width:u,height:w,x:0,y:0}}m.debug("setBlockSizes abc94 (done)",e.id,(L=e==null?void 0:e.size)==null?void 0:L.x,(E=e==null?void 0:e.size)==null?void 0:E.width,(D=e==null?void 0:e.size)==null?void 0:D.y,(v=e==null?void 0:e.size)==null?void 0:v.height)}d(ot,"setBlockSizes");function Et(e,t){var n,i,a,s,l,o,f,h,y,b,L,E,D,v,T,k,N;m.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(a=e==null?void 0:e.size)==null?void 0:a.width}`);const r=e.columns??-1;if(m.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const x=((l=(s=e==null?void 0:e.children[0])==null?void 0:s.size)==null?void 0:l.width)??0,g=e.children.length*x+(e.children.length-1)*I;m.debug("widthOfChildren 88",g,"posX");let u=0;m.debug("abc91 block?.size?.x",e.id,(o=e==null?void 0:e.size)==null?void 0:o.x);let w=(f=e==null?void 0:e.size)!=null&&f.x?((h=e==null?void 0:e.size)==null?void 0:h.x)+(-((y=e==null?void 0:e.size)==null?void 0:y.width)/2||0):-I,S=0;for(const c of e.children){const _=e;if(!c.size)continue;const{width:p,height:A}=c.size,{px:O,py:X}=Vt(r,u);if(X!=S&&(S=X,w=(b=e==null?void 0:e.size)!=null&&b.x?((L=e==null?void 0:e.size)==null?void 0:L.x)+(-((E=e==null?void 0:e.size)==null?void 0:E.width)/2||0):-I,m.debug("New row in layout for block",e.id," and child ",c.id,S)),m.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${u} (px, py) ${O},${X} (${(D=_==null?void 0:_.size)==null?void 0:D.x},${(v=_==null?void 0:_.size)==null?void 0:v.y}) parent: ${_.id} width: ${p}${I}`),_.size){const W=p/2;c.size.x=w+I+W,m.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${W} padding=${I} width=${p} halfWidth=${W} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${p*((c==null?void 0:c.widthInColumns)??1)/2}`),w=c.size.x+W,c.size.y=_.size.y-_.size.height/2+X*(A+I)+A/2+I,m.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${I}${W}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${p*((c==null?void 0:c.widthInColumns)??1)/2}`)}c.children&&Et(c),u+=(c==null?void 0:c.widthInColumns)??1,m.debug("abc88 columnsPos",c,u)}}m.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(T=e==null?void 0:e.size)==null?void 0:T.x} y: ${(k=e==null?void 0:e.size)==null?void 0:k.y} width: ${(N=e==null?void 0:e.size)==null?void 0:N.width}`)}d(Et,"layoutBlocks");function _t(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:a,y:s,width:l,height:o}=e.size;a-l/2n&&(n=a+l/2),s+o/2>i&&(i=s+o/2)}if(e.children)for(const a of e.children)({minX:t,minY:r,maxX:n,maxY:i}=_t(a,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}d(_t,"findBounds");function Gt(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),Et(t),m.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:n,maxX:i,maxY:a}=_t(t),s=a-n,l=i-r;return{x:r,y:n,width:l,height:s}}d(Gt,"layout");function wt(e,t){t&&e.attr("style",t)}d(wt,"applyStyle");function Zt(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),wt(a,e.labelStyle),a.attr("class",i),wt(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(Zt,"addHtmlLabel");var lr=d(async(e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Z(z().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),m.debug("vertexText"+i);const a=await Le(xt(i)),s={isNode:n,label:a,labelStyle:t.replace("fill:","color:")};return Zt(s)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(const l of s){const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=l.trim(),a.appendChild(o)}return a}},"createLabel"),j=lr,cr=d((e,t,r,n,i)=>{t.arrowTypeStart&&Ot(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Ot(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),or={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=d((e,t,r,n,i,a)=>{const s=or[r];if(!s){m.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker"),mt={},P={},hr=d(async(e,t)=>{const r=z(),n=Z(r.flowchart.htmlLabels),i=t.labelType==="markdown"?Yt(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):await j(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(n){const f=i.children[0],h=R(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),mt[t.id]=a,t.width=l.width,t.height=l.height;let o;if(t.startLabelLeft){const f=await j(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startLeft=h,et(o,t.startLabelLeft)}if(t.startLabelRight){const f=await j(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=h.node().appendChild(f),y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startRight=h,et(o,t.startLabelRight)}if(t.endLabelLeft){const f=await j(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endLeft=h,et(o,t.endLabelLeft)}if(t.endLabelRight){const f=await j(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endRight=h,et(o,t.endLabelRight)}return i},"insertEdgeLabel");function et(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(et,"setTerminalWidth");var dr=d((e,t)=>{m.debug("Moving label abc88 ",e.id,e.label,mt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:i}=we(n);if(e.label){const a=mt[e.id];let s=e.x,l=e.y;if(r){const o=tt.calcLabelPosition(r);m.debug("Moving label "+e.label+" from (",s,",",l,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(s=o.x,l=o.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(e.startLabelLeft){const a=P[e.id].startLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){const a=P[e.id].startRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){const a=P[e.id].endLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){const a=P[e.id].endRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),gr=d((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),s=e.width/2,l=e.height/2;return i>=s||a>=l},"outsideNode"),ur=d((e,t,r)=>{m.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(t)} - insidePoint : ${JSON.stringify(r)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),s=e.width/2;let l=r.xMath.abs(n-t.x)*o){let y=r.y{m.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(!gr(t,a)&&!i){const s=ur(t,n,a);let l=!1;r.forEach(o=>{l=l||o.x===s.x&&o.y===s.y}),r.some(o=>o.x===s.x&&o.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),pr=d(function(e,t,r,n,i,a,s){let l=r.points;m.debug("abc88 InsertEdge: edge=",r,"e=",t);let o=!1;const f=a.node(t.v);var h=a.node(t.w);h!=null&&h.intersect&&(f!=null&&f.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(f.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(m.debug("to cluster abc88",n[r.toCluster]),l=Rt(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(m.debug("from cluster abc88",n[r.fromCluster]),l=Rt(l.reverse(),n[r.fromCluster].node).reverse(),o=!0);const y=l.filter(x=>!Number.isNaN(x.y));let b=ye;r.curve&&(i==="graph"||i==="flowchart")&&(b=r.curve);const{x:L,y:E}=fe(r),D=xe().x(L).y(E).curve(b);let v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}const T=e.append("path").attr("d",D(y)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=be(!0)),cr(T,r,k,s,i);let N={};return o&&(N.updatedPath=l),N.originalPath=r.points,N},"insertEdge"),fr=d(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),xr=d((e,t,r)=>{const n=fr(e),i=2,a=t.height+2*r.padding,s=a/i,l=t.width+2*s+r.padding,o=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:l/2,y:2*o},{x:l-s,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*o,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-s,y:-a},{x:l/2,y:-a-2*o},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:l-s,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:l,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-s},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a+o}]:n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function qt(e,t){return e.intersect(t)}d(qt,"intersectNode");var yr=qt;function Jt(e,t,r,n){var i=e.x,a=e.y,s=i-n.x,l=a-n.y,o=Math.sqrt(t*t*l*l+r*r*s*s),f=Math.abs(t*r*s/o);n.x0}d(Lt,"sameSign");var wr=te,mr=ee;function ee(e,t,r){var n=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(E){s=Math.min(s,E.x),l=Math.min(l,E.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var o=n-e.width/2-s,f=i-e.height/2-l,h=0;h1&&a.sort(function(E,D){var v=E.x-r.x,T=E.y-r.y,k=Math.sqrt(v*v+T*T),N=D.x-r.x,x=D.y-r.y,g=Math.sqrt(N*N+x*x);return k{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,l=e.height/2,o,f;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),o=a===0?0:l*i/a,f=l):(i<0&&(s=-s),o=s,f=i===0?0:s*a/i),{x:r+o,y:n+f}},"intersectRect"),Sr=Lr,C={node:yr,circle:br,ellipse:Qt,polygon:mr,rect:Sr},F=d(async(e,t,r,n)=>{const i=z();let a;const s=t.useHtmlLabels||Z(i.flowchart.htmlLabels);r?a=r:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=l.insert("g").attr("class","label").attr("style",t.labelStyle);let f;t.labelText===void 0?f="":f=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=o.node();let y;t.labelType==="markdown"?y=Yt(o,Tt(xt(f),i),{useHtmlLabels:s,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):y=h.appendChild(await j(Tt(xt(f),i),t.labelStyle,!1,n));let b=y.getBBox();const L=t.padding/2;if(Z(i.flowchart.htmlLabels)){const E=y.children[0],D=R(y),v=E.getElementsByTagName("img");if(v){const T=f.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(k=>new Promise(N=>{function x(){if(k.style.display="flex",k.style.flexDirection="column",T){const g=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(g,10)*5+"px";k.style.minWidth=w,k.style.maxWidth=w}else k.style.width="100%";N(k)}d(x,"setupImage"),setTimeout(()=>{k.complete&&x()}),k.addEventListener("error",x),k.addEventListener("load",x)})))}b=E.getBoundingClientRect(),D.attr("width",b.width),D.attr("height",b.height)}return s?o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):o.attr("transform","translate(0, "+-b.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:L,label:o}},"labelHelper"),B=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function G(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(G,"insertPolygonShape");var vr=d(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:i,halfPadding:a}=await F(e,t,"node "+t.classes,!0);m.info("Classes = ",t.classes);const s=n.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),B(t,s),t.intersect=function(l){return C.rect(t,l)},n},"note"),Er=vr,zt=d(e=>e?" "+e:"","formatClass"),K=d((e,t)=>`${t||"node default"}${zt(e.classes)} ${zt(e.class)}`,"getClassesFromNode"),At=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];m.info("Question main (Circle)");const o=G(r,s,s,l);return o.attr("style",t.style),B(t,o),t.intersect=function(f){return m.warn("Intersect called"),C.polygon(t,l,f)},r},"question"),_r=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return C.circle(t,14,s)},r},"choice"),kr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=4,a=n.height+t.padding,s=a/i,l=n.width+2*s+t.padding,o=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"hexagon"),Dr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,void 0,!0),i=2,a=n.height+2*t.padding,s=a/i,l=n.width+2*s+t.padding,o=xr(t.directions,n,t),f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"block_arrow"),Nr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return G(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_left_inv_arrow"),Tr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_right"),Cr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_left"),Br=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"trapezoid"),Ir=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"inv_trapezoid"),Or=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_right_inv_arrow"),Rr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=i/2,s=a/(2.5+i/50),l=n.height+s+t.padding,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,f=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return B(t,f),t.intersect=function(h){const y=C.rect(t,h),b=y.x-t.x;if(a!=0&&(Math.abs(b)t.height/2-s)){let L=s*s*(1-b*b/(a*a));L!=0&&(L=Math.sqrt(L)),L=s-L,h.y-t.y>0&&(L=-L),y.y+=L}return y},r},"cylinder"),zr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{m.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"rect"),Ar=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{m.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"composite"),Mr=d(async(e,t)=>{const{shapeSvg:r}=await F(e,t,"label",!0);m.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(ht(n,t.props.borders,i,a),s.delete("borders")),s.forEach(l=>{m.warn(`Unknown node property ${l}`)})}return B(t,n),t.intersect=function(s){return C.rect(t,s)},r},"labelRect");function ht(e,t,r,n){const i=[],a=d(l=>{i.push(l,0)},"addBorder"),s=d(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(m.debug("add top border"),a(r)):s(r),t.includes("r")?(m.debug("add right border"),a(n)):s(n),t.includes("b")?(m.debug("add bottom border"),a(r)):s(r),t.includes("l")?(m.debug("add left border"),a(n)):s(n),e.attr("stroke-dasharray",i.join(" "))}d(ht,"applyNodePropertyBorders");var Fr=d(async(e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let o="";typeof l=="object"?o=l[0]:o=l,m.info("Label text abc79",o,l,typeof l=="object");const f=s.node().appendChild(await j(o,t.labelStyle,!0,!0));let h={width:0,height:0};if(Z(z().flowchart.htmlLabels)){const D=f.children[0],v=R(f);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}m.info("Text 2",l);const y=l.slice(1,l.length);let b=f.getBBox();const L=s.node().appendChild(await j(y.join?y.join("
"):y,t.labelStyle,!0,!0));if(Z(z().flowchart.htmlLabels)){const D=L.children[0],v=R(L);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}const E=t.padding/2;return R(L).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+E+5)+")"),R(f).attr("transform","translate( "+(h.width{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.height+t.padding,a=n.width+i/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return B(t,s),t.intersect=function(l){return C.rect(t,l)},r},"stadium"),Pr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),m.info("Circle main"),B(t,a),t.intersect=function(s){return m.info("Circle intersect",t,n.width/2+i,s),C.circle(t,n.width/2+i,s)},r},"circle"),Yr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),o=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+a).attr("width",n.width+t.padding+a*2).attr("height",n.height+t.padding+a*2),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),m.info("DoubleCircle main"),B(t,l),t.intersect=function(f){return m.info("DoubleCircle intersect",t,n.width/2+i+a,f),C.circle(t,n.width/2+i+a,f)},r},"doublecircle"),Hr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"subroutine"),Kr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,n),t.intersect=function(i){return C.circle(t,7,i)},r},"start"),Mt=d((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,a=10;r==="LR"&&(i=10,a=70);const s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return B(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return C.rect(t,l)},n},"forkJoin"),Xr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,i),t.intersect=function(a){return C.circle(t,7,a)},r},"end"),Ur=d(async(e,t)=>{var S;const r=t.padding/2,n=4,i=8;let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),o=s.insert("line"),f=s.insert("line");let h=0,y=n;const b=s.insert("g").attr("class","label");let L=0;const E=(S=t.classData.annotations)==null?void 0:S[0],D=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",v=b.node().appendChild(await j(D,t.labelStyle,!0,!0));let T=v.getBBox();if(Z(z().flowchart.htmlLabels)){const c=v.children[0],_=R(v);T=c.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}t.classData.annotations[0]&&(y+=T.height+n,h+=T.width);let k=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?k+="<"+t.classData.type+">":k+="<"+t.classData.type+">");const N=b.node().appendChild(await j(k,t.labelStyle,!0,!0));R(N).attr("class","classTitle");let x=N.getBBox();if(Z(z().flowchart.htmlLabels)){const c=N.children[0],_=R(N);x=c.getBoundingClientRect(),_.attr("width",x.width),_.attr("height",x.height)}y+=x.height+n,x.width>h&&(h=x.width);const g=[];t.classData.members.forEach(async c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(await j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,g.push(A)}),y+=i;const u=[];if(t.classData.methods.forEach(async c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(await j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,u.push(A)}),y+=i,E){let c=(h-T.width)/2;R(v).attr("transform","translate( "+(-1*h/2+c)+", "+-1*y/2+")"),L=T.height+n}let w=(h-x.width)/2;return R(N).attr("transform","translate( "+(-1*h/2+w)+", "+(-1*y/2+L)+")"),L+=x.height+n,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+L).attr("y2",-y/2-r+i+L),L+=i,g.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+L+i/2)+")");const _=c==null?void 0:c.getBBox();L+=((_==null?void 0:_.height)??0)+n}),L+=i,f.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+L).attr("y2",-y/2-r+i+L),L+=i,u.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+L)+")");const _=c==null?void 0:c.getBBox();L+=((_==null?void 0:_.height)??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(y/2)-r).attr("width",h+t.padding).attr("height",y+t.padding),B(t,l),t.intersect=function(c){return C.rect(t,c)},s},"class_box"),Ft={rhombus:At,composite:Ar,question:At,rect:zr,labelRect:Mr,rectWithTitle:Fr,choice:_r,circle:Pr,doublecircle:Yr,stadium:Wr,hexagon:kr,block_arrow:Dr,rect_left_inv_arrow:Nr,lean_right:Tr,lean_left:Cr,trapezoid:Br,inv_trapezoid:Ir,rect_right_inv_arrow:Or,cylinder:Rr,start:Kr,end:Xr,note:Er,subroutine:Hr,fork:Mt,join:Mt,class_box:Ur},lt={},re=d(async(e,t,r)=>{let n,i;if(t.link){let a;z().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),i=await Ft[t.shape](n,t,r)}else i=await Ft[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),lt[t.id]=n,t.haveCallback&<[t.id].attr("class",lt[t.id].attr("class")+" clickable"),n},"insertNode"),jr=d(e=>{const t=lt[e.id];m.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function kt(e,t,r=!1){var b,L,E;const n=e;let i="default";(((b=n==null?void 0:n.classes)==null?void 0:b.length)||0)>0&&(i=((n==null?void 0:n.classes)??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",l;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const o=Se((n==null?void 0:n.styles)??[]),f=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:o.labelStyle,shape:s,labelText:f,rx:a,ry:a,class:i,style:o.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:l??((E=(L=at())==null?void 0:L.block)==null?void 0:E.padding)??0}}d(kt,"getNodeFromBlock");async function ae(e,t,r){const n=kt(t,r,!1);if(n.type==="group")return;const i=at(),a=await re(e,n,{config:i}),s=a.node().getBBox(),l=r.getBlock(n.id);l.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}d(ae,"calculateBlockSize");async function se(e,t,r){const n=kt(t,r,!0);if(r.getBlock(n.id).type!=="space"){const a=at();await re(e,n,{config:a}),t.intersect=n==null?void 0:n.intersect,jr(n)}}d(se,"insertBlockPositioned");async function dt(e,t,r,n){for(const i of t)await n(e,i,r),i.children&&await dt(e,i.children,r,n)}d(dt,"performOperations");async function ie(e,t,r){await dt(e,t,r,ae)}d(ie,"calculateBlockSizes");async function ne(e,t,r){await dt(e,t,r,se)}d(ne,"insertBlocks");async function le(e,t,r,n,i){const a=new Ee({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of t)if(s.start&&s.end){const l=n.getBlock(s.start),o=n.getBlock(s.end);if(l!=null&&l.size&&(o!=null&&o.size)){const f=l.size,h=o.size,y=[{x:f.x,y:f.y},{x:f.x+(h.x-f.x)/2,y:f.y+(h.y-f.y)/2},{x:h.x,y:h.y}];pr(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await hr(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),dr({...s,x:y[1].x,y:y[1].y},{originalPath:y}))}}}d(le,"insertEdges");var Vr=d(function(e,t){return t.db.getClasses()},"getClasses"),Gr=d(async function(e,t,r,n){const{securityLevel:i,block:a}=at(),s=n.db;let l;i==="sandbox"&&(l=R("#i"+t));const o=i==="sandbox"?R(l.nodes()[0].contentDocument.body):R("body"),f=i==="sandbox"?o.select(`[id="${t}"]`):R(`[id="${t}"]`);ir(f,["point","circle","cross"],n.type,t);const y=s.getBlocks(),b=s.getBlocksFlat(),L=s.getEdges(),E=f.insert("g").attr("class","block");await ie(E,y,s);const D=Gt(s);if(await ne(E,y,s),await le(E,L,b,s,t),D){const v=D,T=Math.max(1,Math.round(.125*(v.width/v.height))),k=v.height+T+10,N=v.width+10,{useMaxWidth:x}=a;ge(f,k,N,!!x),m.debug("Here Bounds",D,v),f.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Zr={draw:Gr,getClasses:Vr},ra={parser:ke,db:Ue,renderer:Zr,styles:Ve};export{ra as diagram}; diff --git a/lightrag/api/webui/assets/c4Diagram-6F6E4RAY-D__gcenR.js b/lightrag/api/webui/assets/c4Diagram-6F6E4RAY-D__gcenR.js deleted file mode 100644 index 8ad15a8c..00000000 --- a/lightrag/api/webui/assets/c4Diagram-6F6E4RAY-D__gcenR.js +++ /dev/null @@ -1,10 +0,0 @@ -import{g as Se,d as De}from"./chunk-67H74DCK-BDUtSXeJ.js";import{_ as g,s as Pe,g as Be,a as Ie,b as Me,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./index-bjrbS6e8.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],n=[1,28],r=[1,63],i=[1,64],a=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],nt=[1,44],at=[1,45],it=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:i,37:a,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:n}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:n,34:r,36:i,37:a,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: -`+D.showPosition()+` -Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+` -`+m+"^"},"showPosition"),test_match:g(function(x,m){var v,b,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,m,v,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;hm[0].length)){if(m=v,b=h,this.options.backtrack_lexer){if(x=this.test_match(v,R[h]),x!==!1)return x;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(x=this.test_match(m,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return g(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ae="",ie=!1,Vt=4,zt=2,be,Fe=g(function(){return be},"getC4Type"),Ve=g(function(e){be=ge(e,Bt())},"setC4Type"),ze=g(function(e,t,s,o,l,n,r,i,a){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[f,y]=Object.entries(l)[0];u[f]={text:y}}else u.techn={text:l};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[f,y]=Object.entries(n)[0];u[f]={text:y}}else u.descr={text:n};if(typeof r=="object"){let[f,y]=Object.entries(r)[0];u[f]=y}else u.sprite=r;if(typeof i=="object"){let[f,y]=Object.entries(i)[0];u[f]=y}else u.tags=i;if(typeof a=="object"){let[f,y]=Object.entries(a)[0];u[f]=y}else u.link=a;u.wrap=mt()},"addRel"),Xe=g(function(e,t,s,o,l,n,r){if(t===null||s===null)return;let i={};const a=V.find(u=>u.alias===t);if(a&&t===a.alias?i=a:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];i[u]={text:d}}else i.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];i[u]=d}else i.sprite=l;if(typeof n=="object"){let[u,d]=Object.entries(n)[0];i[u]=d}else i.tags=n;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];i[u]=d}else i.link=r;i.typeC4Shape={text:e},i.parentBoundary=B,i.wrap=mt()},"addPersonOrSystem"),We=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,V.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.techn={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof n=="object"){let[d,f]=Object.entries(n)[0];a[d]=f}else a.sprite=n;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.wrap=mt(),a.typeC4Shape={text:e},a.parentBoundary=B},"addContainer"),Qe=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,V.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.techn={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof n=="object"){let[d,f]=Object.entries(n)[0];a[d]=f}else a.sprite=n;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.wrap=mt(),a.typeC4Shape={text:e},a.parentBoundary=B},"addComponent"),He=g(function(e,t,s,o,l){if(e===null||t===null)return;let n={};const r=X.find(i=>i.alias===e);if(r&&e===r.alias?n=r:(n.alias=e,X.push(n)),t==null?n.label={text:""}:n.label={text:t},s==null)n.type={text:"system"};else if(typeof s=="object"){let[i,a]=Object.entries(s)[0];n[i]={text:a}}else n.type={text:s};if(typeof o=="object"){let[i,a]=Object.entries(o)[0];n[i]=a}else n.tags=o;if(typeof l=="object"){let[i,a]=Object.entries(l)[0];n[i]=a}else n.link=l;n.parentBoundary=B,n.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let n={};const r=X.find(i=>i.alias===e);if(r&&e===r.alias?n=r:(n.alias=e,X.push(n)),t==null?n.label={text:""}:n.label={text:t},s==null)n.type={text:"container"};else if(typeof s=="object"){let[i,a]=Object.entries(s)[0];n[i]={text:a}}else n.type={text:s};if(typeof o=="object"){let[i,a]=Object.entries(o)[0];n[i]=a}else n.tags=o;if(typeof l=="object"){let[i,a]=Object.entries(l)[0];n[i]=a}else n.link=l;n.parentBoundary=B,n.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),Ge=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,X.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.type={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.nodeType=e,a.parentBoundary=B,a.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=g(function(e,t,s,o,l,n,r,i,a,u,d){let f=V.find(y=>y.alias===t);if(!(f===void 0&&(f=X.find(y=>y.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[y,E]=Object.entries(s)[0];f[y]=E}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[y,E]=Object.entries(o)[0];f[y]=E}else f.fontColor=o;if(l!=null)if(typeof l=="object"){let[y,E]=Object.entries(l)[0];f[y]=E}else f.borderColor=l;if(n!=null)if(typeof n=="object"){let[y,E]=Object.entries(n)[0];f[y]=E}else f.shadowing=n;if(r!=null)if(typeof r=="object"){let[y,E]=Object.entries(r)[0];f[y]=E}else f.shape=r;if(i!=null)if(typeof i=="object"){let[y,E]=Object.entries(i)[0];f[y]=E}else f.sprite=i;if(a!=null)if(typeof a=="object"){let[y,E]=Object.entries(a)[0];f[y]=E}else f.techn=a;if(u!=null)if(typeof u=="object"){let[y,E]=Object.entries(u)[0];f[y]=E}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[y,E]=Object.entries(d)[0];f[y]=E}else f.legendSprite=d}},"updateElStyle"),Ze=g(function(e,t,s,o,l,n,r){const i=It.find(a=>a.from===t&&a.to===s);if(i!==void 0){if(o!=null)if(typeof o=="object"){let[a,u]=Object.entries(o)[0];i[a]=u}else i.textColor=o;if(l!=null)if(typeof l=="object"){let[a,u]=Object.entries(l)[0];i[a]=u}else i.lineColor=l;if(n!=null)if(typeof n=="object"){let[a,u]=Object.entries(n)[0];i[a]=parseInt(u)}else i.offsetX=parseInt(n);if(r!=null)if(typeof r=="object"){let[a,u]=Object.entries(r)[0];i[a]=parseInt(u)}else i.offsetY=parseInt(r)}},"updateRelStyle"),$e=g(function(e,t,s){let o=Vt,l=zt;if(typeof t=="object"){const n=Object.values(t)[0];o=parseInt(n)}else o=parseInt(t);if(typeof s=="object"){const n=Object.values(s)[0];l=parseInt(n)}else l=parseInt(s);o>=1&&(Vt=o),l>=1&&(zt=l)},"updateLayoutConfig"),t0=g(function(){return Vt},"getC4ShapeInRow"),e0=g(function(){return zt},"getC4BoundaryInRow"),n0=g(function(){return B},"getCurrentBoundaryParse"),a0=g(function(){return F},"getParentBoundaryParse"),_e=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),i0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),r0=g(function(e){return Object.keys(_e(e))},"getC4ShapeKeys"),xe=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),s0=xe,l0=g(function(){return It},"getRels"),o0=g(function(){return ae},"getTitle"),c0=g(function(e){ie=e},"setWrap"),mt=g(function(){return ie},"autoWrap"),h0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ae="",ie=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=g(function(e){ae=ge(e,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:i0,getC4ShapeKeys:r0,getBoundaries:xe,getBoundarys:s0,getCurrentBoundaryParse:n0,getParentBoundaryParse:a0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Me,getAccTitle:Ie,getAccDescription:Be,setAccDescription:Pe,getConfig:g(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},re=g(function(e,t){return De(e,t)},"drawRect"),me=g(function(e,t,s,o,l,n){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let i=n.startsWith("data:image/png;base64")?n:Ye.sanitizeUrl(n);r.attr("xlink:href",i)},"drawImage"),y0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let n of t){let r=n.textColor?n.textColor:"#444444",i=n.lineColor?n.lineColor:"#444444",a=n.offsetX?parseInt(n.offsetX):0,u=n.offsetY?parseInt(n.offsetY):0,d="";if(l===0){let y=o.append("line");y.attr("x1",n.startPoint.x),y.attr("y1",n.startPoint.y),y.attr("x2",n.endPoint.x),y.attr("y2",n.endPoint.y),y.attr("stroke-width","1"),y.attr("stroke",i),y.style("fill","none"),n.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let y=o.append("path");y.attr("fill","none").attr("stroke-width","1").attr("stroke",i).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",n.startPoint.x).replaceAll("starty",n.startPoint.y).replaceAll("controlx",n.startPoint.x+(n.endPoint.x-n.startPoint.x)/2-(n.endPoint.x-n.startPoint.x)/4).replaceAll("controly",n.startPoint.y+(n.endPoint.y-n.startPoint.y)/2).replaceAll("stopx",n.endPoint.x).replaceAll("stopy",n.endPoint.y)),n.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)")}let f=s.messageFont();Q(s)(n.label.text,o,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+a,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+u,n.label.width,n.label.height,{fill:r},f),n.techn&&n.techn.text!==""&&(f=s.messageFont(),Q(s)("["+n.techn.text+"]",o,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+a,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+s.messageFontSize+5+u,Math.max(n.label.width,n.techn.width),n.techn.height,{fill:r,"font-style":"italic"},f))}},"drawRels"),g0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",n=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",i={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(i={"stroke-width":1});let a={x:t.x,y:t.y,fill:l,stroke:n,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:i};re(o,a);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=g(function(e,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],n=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const i=e.append("g");i.attr("class","person-man");const a=Se();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":a.x=t.x,a.y=t.y,a.fill=o,a.width=t.width,a.height=t.height,a.stroke=l,a.rx=2.5,a.ry=2.5,a.attrs={"stroke-width":.5},re(i,a);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":i.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),i.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":i.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),i.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=w0(s,t.typeC4Shape.text);switch(i.append("text").attr("fill",n).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(i,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=n,Q(s)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:n},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=n,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,i,t.x,t.y+t.techn.Y,t.width,t.height,{fill:n,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:n,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=n,Q(s)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:n},d)),t.height},"drawC4Shape"),_0=g(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=g(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=g(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=g(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=g(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),k0=g(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),A0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),C0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),s.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function e(l,n,r,i,a,u,d){const f=n.append("text").attr("x",r+a/2).attr("y",i+u/2+5).style("text-anchor","middle").text(l);o(f,d)}g(e,"byText");function t(l,n,r,i,a,u,d,f){const{fontSize:y,fontFamily:E,fontWeight:O}=f,S=l.split($t.lineBreakRegex);for(let P=0;P=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=l+t.height,this.nextData.cnt=1),t.x=s,t.y=l,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ne(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},g(Ot,"Bounds"),Ot),ne=g(function(e){Ne(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Ut=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),T0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=je(t[e].text,l,o),t[e].textLines=t[e].text.split($t.lineBreakRegex).length,t[e].width=l,t[e].height=fe(t[e].text,o);else{let n=t[e].text.split($t.lineBreakRegex);t[e].textLines=n.length;let r=0;t[e].height=0,t[e].width=0;for(const i of n)t[e].width=Math.max(Tt(i,o),t[e].width),r=fe(i,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ke=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Ut(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let n=Tt(t.label.text,l);j("label",t,o,l,n),z.drawBoundary(e,t,_)},"drawBoundary"),Ae=g(function(e,t,s,o){let l=0;for(const n of o){l=0;const r=s[n];let i=Pt(_,r.typeC4Shape.text);switch(i.fontSize=i.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",i),r.typeC4Shape.height=i.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let a=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,a,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=Pt(_,r.typeC4Shape.text);j("type",r,a,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=Pt(_,r.techn.text);j("techn",r,a,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let f=l,y=r.label.width;if(r.descr&&r.descr.text!==""){let E=Pt(_,r.typeC4Shape.text);j("descr",r,a,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,y=Math.max(r.label.width,r.descr.width),f=l-r.descr.textLines*5}y=y+_.c4ShapePadding,r.width=Math.max(r.width||_.width,y,_.width),r.height=Math.max(r.height||_.height,f,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},g(Rt,"Point"),Rt),pe=g(function(e,t){let s=e.x,o=e.y,l=t.x,n=t.y,r=s+e.width/2,i=o+e.height/2,a=Math.abs(s-l),u=Math.abs(o-n),d=u/a,f=e.height/e.width,y=null;return o==n&&sl?y=new Y(s,i):s==l&&on&&(y=new Y(r,o)),s>l&&o=d?y=new Y(s,i+d*e.width/2):y=new Y(r-a/u*e.height/2,o+e.height):s=d?y=new Y(s+e.width,i+d*e.width/2):y=new Y(r+a/u*e.height/2,o+e.height):sn?f>=d?y=new Y(s+e.width,i-d*e.width/2):y=new Y(r+e.height/2*a/u,o):s>l&&o>n&&(f>=d?y=new Y(s,i-e.width/2*d):y=new Y(r-e.height/2*a/u,o)),y},"getIntersectPoint"),O0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=pe(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),R0=g(function(e,t,s,o){let l=0;for(let n of t){l=l+1;let r=n.wrap&&_.wrap,i=T0(_);o.db.getC4Type()==="C4Dynamic"&&(n.label.text=l+": "+n.label.text);let u=Tt(n.label.text,i);j("label",n,r,i,u),n.techn&&n.techn.text!==""&&(u=Tt(n.techn.text,i),j("techn",n,r,i,u)),n.descr&&n.descr.text!==""&&(u=Tt(n.descr.text,i),j("descr",n,r,i,u));let d=s(n.from),f=s(n.to),y=O0(d,f);n.startPoint=y.startPoint,n.endPoint=y.endPoint}z.drawRels(e,t,_)},"drawRels");function se(e,t,s,o,l){let n=new Ee(l);n.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[r,i]of o.entries()){let a=0;i.image={width:0,height:0,Y:0},i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=a,a=i.image.Y+i.image.height);let u=i.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",i,u,d,n.data.widthLimit),i.label.Y=a+8,a=i.label.Y+i.label.height,i.type&&i.type.text!==""){i.type.text="["+i.type.text+"]";let O=Ut(_);j("type",i,u,O,n.data.widthLimit),i.type.Y=a+5,a=i.type.Y+i.type.height}if(i.descr&&i.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",i,u,O,n.data.widthLimit),i.descr.Y=a+20,a=i.descr.Y+i.descr.height}if(r==0||r%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+a;n.setData(O,O,S,S)}else{let O=n.data.stopx!==n.data.startx?n.data.stopx+_.diagramMarginX:n.data.startx,S=n.data.starty;n.setData(O,O,S,S)}n.name=i.alias;let f=l.db.getC4ShapeArray(i.alias),y=l.db.getC4ShapeKeys(i.alias);y.length>0&&Ae(n,e,f,y),t=i.alias;let E=l.db.getBoundaries(t);E.length>0&&se(e,t,n,E,l),i.alias!=="global"&&ke(e,i,n),s.data.stopy=Math.max(n.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(n.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}g(se,"drawInsideBoundary");var S0=g(function(e,t,s,o){_=Bt().c4;const l=Bt().securityLevel;let n;l==="sandbox"&&(n=jt("#i"+t));const r=l==="sandbox"?jt(n.nodes()[0].contentDocument.body):jt("body");let i=o.db;o.db.setWrap(_.wrap),ve=i.getC4ShapeInRow(),ee=i.getC4BoundaryInRow(),de.debug(`C:${JSON.stringify(_,null,2)}`);const a=l==="sandbox"?r.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(a),z.insertDatabaseIcon(a),z.insertClockIcon(a);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundaries("");se(a,"",u,f,o),z.insertArrowHead(a),z.insertArrowEnd(a),z.insertArrowCrossHead(a),z.insertArrowFilledHead(a),R0(a,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Xt,u.data.stopy=Wt;const y=u.data;let O=y.stopy-y.starty+2*_.diagramMarginY;const P=y.stopx-y.startx+2*_.diagramMarginX;d&&a.append("text").text(d).attr("x",(y.stopx-y.startx)/2-4*_.diagramMarginX).attr("y",y.starty+_.diagramMarginY),Le(a,O,P,_.useMaxWidth);const M=d?60:0;a.attr("viewBox",y.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),de.debug("models:",y)},"draw"),ye={drawPersonOrSystemArray:Ae,drawBoundary:ke,setConf:ne,draw:S0},D0=g(e=>`.person { - stroke: ${e.personBorder}; - fill: ${e.personBkg}; - } -`,"getStyles"),P0=D0,M0={parser:Ue,db:te,renderer:ye,styles:P0,init:g(({c4:e,wrap:t})=>{ye.setConf(e),te.setWrap(t)},"init")};export{M0 as diagram}; diff --git a/lightrag/api/webui/assets/channel-oXqxytzI.js b/lightrag/api/webui/assets/channel-oXqxytzI.js deleted file mode 100644 index 5524a850..00000000 --- a/lightrag/api/webui/assets/channel-oXqxytzI.js +++ /dev/null @@ -1 +0,0 @@ -import{ap as o,aq as n}from"./index-bjrbS6e8.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c}; diff --git a/lightrag/api/webui/assets/chunk-353BL4L5-BJGenYOY.js b/lightrag/api/webui/assets/chunk-353BL4L5-BJGenYOY.js deleted file mode 100644 index c415839c..00000000 --- a/lightrag/api/webui/assets/chunk-353BL4L5-BJGenYOY.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as l}from"./index-bjrbS6e8.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; diff --git a/lightrag/api/webui/assets/chunk-67H74DCK-BDUtSXeJ.js b/lightrag/api/webui/assets/chunk-67H74DCK-BDUtSXeJ.js deleted file mode 100644 index 6c4eafe0..00000000 --- a/lightrag/api/webui/assets/chunk-67H74DCK-BDUtSXeJ.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as n,U as x,j as l}from"./index-bjrbS6e8.js";var c=n((s,t)=>{const e=s.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),d=n((s,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};c(s,e).lower()},"drawBackgroundRect"),g=n((s,t)=>{const e=t.text.replace(x," "),r=s.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const a=r.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),r},"drawText"),h=n((s,t,e,r)=>{const a=s.append("image");a.attr("x",t),a.attr("y",e);const i=l.sanitizeUrl(r);a.attr("xlink:href",i)},"drawImage"),m=n((s,t,e,r)=>{const a=s.append("use");a.attr("x",t),a.attr("y",e);const i=l.sanitizeUrl(r);a.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),y=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{d as a,p as b,m as c,c as d,h as e,g as f,y as g}; diff --git a/lightrag/api/webui/assets/chunk-AACKK3MU-Cz8YDG2R.js b/lightrag/api/webui/assets/chunk-AACKK3MU-Cz8YDG2R.js deleted file mode 100644 index 54fc223a..00000000 --- a/lightrag/api/webui/assets/chunk-AACKK3MU-Cz8YDG2R.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s}from"./index-bjrbS6e8.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; diff --git a/lightrag/api/webui/assets/chunk-BFAMUDN2-DaWGHPR3.js b/lightrag/api/webui/assets/chunk-BFAMUDN2-DaWGHPR3.js deleted file mode 100644 index edb5713c..00000000 --- a/lightrag/api/webui/assets/chunk-BFAMUDN2-DaWGHPR3.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,d as o}from"./index-bjrbS6e8.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/lightrag/api/webui/assets/chunk-E2GYISFI-Csg-WUa_.js b/lightrag/api/webui/assets/chunk-E2GYISFI-Csg-WUa_.js deleted file mode 100644 index eec827ae..00000000 --- a/lightrag/api/webui/assets/chunk-E2GYISFI-Csg-WUa_.js +++ /dev/null @@ -1,15 +0,0 @@ -import{_ as e}from"./index-bjrbS6e8.js";var l=e(()=>` - /* Font Awesome icon styling - consolidated */ - .label-icon { - display: inline-block; - height: 1em; - overflow: visible; - vertical-align: -0.125em; - } - - .node .label-icon path { - fill: currentColor; - stroke: revert; - stroke-width: revert; - } -`,"getIconStyles");export{l as g}; diff --git a/lightrag/api/webui/assets/chunk-OW32GOEJ-BuH8nVF7.js b/lightrag/api/webui/assets/chunk-OW32GOEJ-BuH8nVF7.js deleted file mode 100644 index dd3285d5..00000000 --- a/lightrag/api/webui/assets/chunk-OW32GOEJ-BuH8nVF7.js +++ /dev/null @@ -1,220 +0,0 @@ -import{g as te}from"./chunk-BFAMUDN2-DaWGHPR3.js";import{s as ee}from"./chunk-SKB7J2MH-ty0WEC-6.js";import{_ as f,l as D,c as F,r as se,u as ie,a as re,b as ae,g as ne,s as le,p as oe,q as ce,T as he,k as W,y as ue}from"./index-bjrbS6e8.js";var vt=function(){var e=f(function(V,l,h,n){for(h=h||{},n=V.length;n--;h[V[n]]=l);return h},"o"),t=[1,2],s=[1,3],a=[1,4],i=[2,4],o=[1,9],d=[1,11],S=[1,16],p=[1,17],T=[1,18],_=[1,19],m=[1,33],k=[1,20],A=[1,21],$=[1,22],x=[1,23],R=[1,24],u=[1,26],L=[1,27],I=[1,28],N=[1,29],G=[1,30],P=[1,31],B=[1,32],at=[1,35],nt=[1,36],lt=[1,37],ot=[1,38],K=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],xt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],gt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:f(function(l,h,n,g,E,r,Z){var c=r.length-1;switch(E){case 3:return g.setRootDoc(r[c]),r[c];case 4:this.$=[];break;case 5:r[c]!="nl"&&(r[c-1].push(r[c]),this.$=r[c-1]);break;case 6:case 7:this.$=r[c];break;case 8:this.$="nl";break;case 12:this.$=r[c];break;case 13:const tt=r[c-1];tt.description=g.trimColon(r[c]),this.$=tt;break;case 14:this.$={stmt:"relation",state1:r[c-2],state2:r[c]};break;case 15:const Tt=g.trimColon(r[c]);this.$={stmt:"relation",state1:r[c-3],state2:r[c-1],description:Tt};break;case 19:this.$={stmt:"state",id:r[c-3],type:"default",description:"",doc:r[c-1]};break;case 20:var U=r[c],X=r[c-2].trim();if(r[c].match(":")){var ut=r[c].split(":");U=ut[0],X=[X,ut[1]]}this.$={stmt:"state",id:U,type:"default",description:X};break;case 21:this.$={stmt:"state",id:r[c-3],type:"default",description:r[c-5],doc:r[c-1]};break;case 22:this.$={stmt:"state",id:r[c],type:"fork"};break;case 23:this.$={stmt:"state",id:r[c],type:"join"};break;case 24:this.$={stmt:"state",id:r[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[c-1].trim(),note:{position:r[c-2].trim(),text:r[c].trim()}};break;case 29:this.$=r[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[c-3],url:r[c-2],tooltip:r[c-1]};break;case 33:this.$={stmt:"click",id:r[c-3],url:r[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[c-1].trim(),classes:r[c].trim()};break;case 36:this.$={stmt:"style",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 37:this.$={stmt:"applyClass",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:s,6:a},{1:[3]},{3:5,4:t,5:s,6:a},{3:6,4:t,5:s,6:a},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:lt,54:ot,57:K},e(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:S,17:p,19:T,22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:lt,54:ot,57:K},e(y,[2,7]),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(y,[2,11]),e(y,[2,12],{14:[1,40],15:[1,41]}),e(y,[2,16]),{18:[1,42]},e(y,[2,18],{20:[1,43]}),{23:[1,44]},e(y,[2,22]),e(y,[2,23]),e(y,[2,24]),e(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(y,[2,28]),{34:[1,49]},{36:[1,50]},e(y,[2,31]),{13:51,24:m,57:K},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(ct,[2,44],{58:[1,56]}),e(ct,[2,45],{58:[1,57]}),e(y,[2,38]),e(y,[2,39]),e(y,[2,40]),e(y,[2,41]),e(y,[2,6]),e(y,[2,13]),{13:58,24:m,57:K},e(y,[2,17]),e(xt,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(y,[2,29]),e(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(y,[2,14],{14:[1,71]}),{4:o,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,21:[1,72],22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:lt,54:ot,57:K},e(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(y,[2,34]),e(y,[2,35]),e(y,[2,36]),e(y,[2,37]),e(ct,[2,46]),e(ct,[2,47]),e(y,[2,15]),e(y,[2,19]),e(xt,i,{7:78}),e(y,[2,26]),e(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:d,8:8,9:10,10:12,11:13,12:14,13:15,16:S,17:p,19:T,21:[1,81],22:_,24:m,25:k,26:A,27:$,28:x,29:R,32:25,33:u,35:L,37:I,38:N,41:G,45:P,48:B,51:at,52:nt,53:lt,54:ot,57:K},e(y,[2,32]),e(y,[2,33]),e(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(l,h){if(h.recoverable)this.trace(l);else{var n=new Error(l);throw n.hash=h,n}},"parseError"),parse:f(function(l){var h=this,n=[0],g=[],E=[null],r=[],Z=this.table,c="",U=0,X=0,ut=2,tt=1,Tt=r.slice.call(arguments,1),b=Object.create(this.lexer),j={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(j.yy[Et]=this.yy[Et]);b.setInput(l,j.yy),j.yy.lexer=b,j.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var _t=b.yylloc;r.push(_t);var Qt=b.options&&b.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Zt(O){n.length=n.length-2*O,E.length=E.length-O,r.length=r.length-O}f(Zt,"popStack");function Lt(){var O;return O=g.pop()||b.lex()||tt,typeof O!="number"&&(O instanceof Array&&(g=O,O=g.pop()),O=h.symbols_[O]||O),O}f(Lt,"lex");for(var C,H,w,mt,J={},dt,Y,Ot,ft;;){if(H=n[n.length-1],this.defaultActions[H]?w=this.defaultActions[H]:((C===null||typeof C>"u")&&(C=Lt()),w=Z[H]&&Z[H][C]),typeof w>"u"||!w.length||!w[0]){var Dt="";ft=[];for(dt in Z[H])this.terminals_[dt]&&dt>ut&&ft.push("'"+this.terminals_[dt]+"'");b.showPosition?Dt="Parse error on line "+(U+1)+`: -`+b.showPosition()+` -Expecting `+ft.join(", ")+", got '"+(this.terminals_[C]||C)+"'":Dt="Parse error on line "+(U+1)+": Unexpected "+(C==tt?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(Dt,{text:b.match,token:this.terminals_[C]||C,line:b.yylineno,loc:_t,expected:ft})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+C);switch(w[0]){case 1:n.push(C),E.push(b.yytext),r.push(b.yylloc),n.push(w[1]),C=null,X=b.yyleng,c=b.yytext,U=b.yylineno,_t=b.yylloc;break;case 2:if(Y=this.productions_[w[1]][1],J.$=E[E.length-Y],J._$={first_line:r[r.length-(Y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Y||1)].first_column,last_column:r[r.length-1].last_column},Qt&&(J._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(J,[c,X,U,j.yy,w[1],E,r].concat(Tt)),typeof mt<"u")return mt;Y&&(n=n.slice(0,-1*Y*2),E=E.slice(0,-1*Y),r=r.slice(0,-1*Y)),n.push(this.productions_[w[1]][0]),E.push(J.$),r.push(J._$),Ot=Z[n[n.length-2]][n[n.length-1]],n.push(Ot);break;case 3:return!0}}return!0},"parse")},qt=function(){var V={EOF:1,parseError:f(function(h,n){if(this.yy.parser)this.yy.parser.parseError(h,n);else throw new Error(h)},"parseError"),setInput:f(function(l,h){return this.yy=h||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var h=l.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:f(function(l){var h=l.length,n=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===g.length?this.yylloc.first_column:0)+g[g.length-n.length].length-n[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(l){this.unput(this.match.slice(l))},"less"),pastInput:f(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var l=this.pastInput(),h=new Array(l.length+1).join("-");return l+this.upcomingInput()+` -`+h+"^"},"showPosition"),test_match:f(function(l,h){var n,g,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),g=l[0].match(/(?:\r\n?|\n).*/g),g&&(this.yylineno+=g.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:g?g[g.length-1].length-g[g.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],n=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in E)this[r]=E[r];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,h,n,g;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),r=0;rh[0].length)){if(h=n,g=r,this.options.backtrack_lexer){if(l=this.test_match(n,E[r]),l!==!1)return l;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(l=this.test_match(h,E[g]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(h,n,g,E){switch(g){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 70:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return n.yytext=n.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};return V}();gt.lexer=qt;function ht(){this.yy={}}return f(ht,"Parser"),ht.prototype=gt,gt.Parser=ht,new ht}();vt.parser=vt;var Be=vt,de="TB",Yt="TB",Rt="dir",Q="state",q="root",Ct="relation",fe="classDef",pe="style",Se="applyClass",it="default",Gt="divider",Bt="fill:none",Vt="fill: #333",Mt="c",Ut="text",jt="normal",bt="rect",kt="rectWithTitle",ye="stateStart",ge="stateEnd",It="divider",Nt="roundedWithTitle",Te="note",Ee="noteGroup",rt="statediagram",_e="state",me=`${rt}-${_e}`,Ht="transition",De="note",be="note-edge",ke=`${Ht} ${be}`,ve=`${rt}-${De}`,Ce="cluster",Ae=`${rt}-${Ce}`,xe="cluster-alt",Le=`${rt}-${xe}`,Wt="parent",zt="note",Oe="state",At="----",Re=`${At}${zt}`,wt=`${At}${Wt}`,Kt=f((e,t=Yt)=>{if(!e.doc)return t;let s=t;for(const a of e.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir"),Ie=f(function(e,t){return t.db.getClasses()},"getClasses"),Ne=f(async function(e,t,s,a){D.info("REF0:"),D.info("Drawing state diagram (v2)",t);const{securityLevel:i,state:o,layout:d}=F();a.db.extract(a.db.getRootDocV2());const S=a.db.getData(),p=te(t,i);S.type=a.type,S.layoutAlgorithm=d,S.nodeSpacing=(o==null?void 0:o.nodeSpacing)||50,S.rankSpacing=(o==null?void 0:o.rankSpacing)||50,S.markers=["barb"],S.diagramId=t,await se(S,p);const T=8;try{(typeof a.db.getLinks=="function"?a.db.getLinks():new Map).forEach((m,k)=>{var I;const A=typeof k=="string"?k:typeof(k==null?void 0:k.id)=="string"?k.id:"";if(!A){D.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(k));return}const $=(I=p.node())==null?void 0:I.querySelectorAll("g");let x;if($==null||$.forEach(N=>{var P;((P=N.textContent)==null?void 0:P.trim())===A&&(x=N)}),!x){D.warn("⚠️ Could not find node matching text:",A);return}const R=x.parentNode;if(!R){D.warn("⚠️ Node has no parent, cannot wrap:",A);return}const u=document.createElementNS("http://www.w3.org/2000/svg","a"),L=m.url.replace(/^"+|"+$/g,"");if(u.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",L),u.setAttribute("target","_blank"),m.tooltip){const N=m.tooltip.replace(/^"+|"+$/g,"");u.setAttribute("title",N)}R.replaceChild(u,x),u.appendChild(x),D.info("🔗 Wrapped node in tag for:",A,m.url)})}catch(_){D.error("❌ Error injecting clickable links:",_)}ie.insertTitle(p,"statediagramTitleText",(o==null?void 0:o.titleTopMargin)??25,a.db.getDiagramTitle()),ee(p,T,rt,(o==null?void 0:o.useMaxWidth)??!0)},"draw"),Ve={getClasses:Ie,draw:Ne,getDir:Kt},St=new Map,M=0;function yt(e="",t=0,s="",a=At){const i=s!==null&&s.length>0?`${a}${s}`:"";return`${Oe}-${e}${i}-${t}`}f(yt,"stateDomId");var we=f((e,t,s,a,i,o,d,S)=>{D.trace("items",t),t.forEach(p=>{switch(p.stmt){case Q:st(e,p,s,a,i,o,d,S);break;case it:st(e,p,s,a,i,o,d,S);break;case Ct:{st(e,p.state1,s,a,i,o,d,S),st(e,p.state2,s,a,i,o,d,S);const T={id:"edge"+M,start:p.state1.id,end:p.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Bt,labelStyle:"",label:W.sanitizeText(p.description??"",F()),arrowheadStyle:Vt,labelpos:Mt,labelType:Ut,thickness:jt,classes:Ht,look:d};i.push(T),M++}break}})},"setupDoc"),$t=f((e,t=Yt)=>{let s=t;if(e.doc)for(const a of e.doc)a.stmt==="dir"&&(s=a.value);return s},"getDir");function et(e,t,s){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(i=>{const o=s.get(i);o&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...o.styles])}));const a=e.find(i=>i.id===t.id);a?Object.assign(a,t):e.push(t)}f(et,"insertOrUpdateNode");function Xt(e){var t;return((t=e==null?void 0:e.classes)==null?void 0:t.join(" "))??""}f(Xt,"getClassesFromDbInfo");function Jt(e){return(e==null?void 0:e.styles)??[]}f(Jt,"getStylesFromDbInfo");var st=f((e,t,s,a,i,o,d,S)=>{var A,$,x;const p=t.id,T=s.get(p),_=Xt(T),m=Jt(T),k=F();if(D.info("dataFetcher parsedItem",t,T,m),p!=="root"){let R=bt;t.start===!0?R=ye:t.start===!1&&(R=ge),t.type!==it&&(R=t.type),St.get(p)||St.set(p,{id:p,shape:R,description:W.sanitizeText(p,k),cssClasses:`${_} ${me}`,cssStyles:m});const u=St.get(p);t.description&&(Array.isArray(u.description)?(u.shape=kt,u.description.push(t.description)):(A=u.description)!=null&&A.length&&u.description.length>0?(u.shape=kt,u.description===p?u.description=[t.description]:u.description=[u.description,t.description]):(u.shape=bt,u.description=t.description),u.description=W.sanitizeTextOrArray(u.description,k)),(($=u.description)==null?void 0:$.length)===1&&u.shape===kt&&(u.type==="group"?u.shape=Nt:u.shape=bt),!u.type&&t.doc&&(D.info("Setting cluster for XCX",p,$t(t)),u.type="group",u.isGroup=!0,u.dir=$t(t),u.shape=t.type===Gt?It:Nt,u.cssClasses=`${u.cssClasses} ${Ae} ${o?Le:""}`);const L={labelStyle:"",shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:p,dir:u.dir,domId:yt(p,M),type:u.type,isGroup:u.type==="group",padding:8,rx:10,ry:10,look:d};if(L.shape===It&&(L.label=""),e&&e.id!=="root"&&(D.trace("Setting node ",p," to be child of its parent ",e.id),L.parentId=e.id),L.centerLabel=!0,t.note){const I={labelStyle:"",shape:Te,label:t.note.text,cssClasses:ve,cssStyles:[],cssCompiledStyles:[],id:p+Re+"-"+M,domId:yt(p,M,zt),type:u.type,isGroup:u.type==="group",padding:(x=k.flowchart)==null?void 0:x.padding,look:d,position:t.note.position},N=p+wt,G={labelStyle:"",shape:Ee,label:t.note.text,cssClasses:u.cssClasses,cssStyles:[],id:p+wt,domId:yt(p,M,Wt),type:"group",isGroup:!0,padding:16,look:d,position:t.note.position};M++,G.id=N,I.parentId=N,et(a,G,S),et(a,I,S),et(a,L,S);let P=p,B=I.id;t.note.position==="left of"&&(P=I.id,B=p),i.push({id:P+"-"+B,start:P,end:B,arrowhead:"none",arrowTypeEnd:"",style:Bt,labelStyle:"",classes:ke,arrowheadStyle:Vt,labelpos:Mt,labelType:Ut,thickness:jt,look:d})}else et(a,L,S)}t.doc&&(D.trace("Adding nodes children "),we(t,t.doc,s,a,i,!o,d,S))},"dataFetcher"),$e=f(()=>{St.clear(),M=0},"reset"),v={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Pt=f(()=>new Map,"newClassesList"),Ft=f(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),pt=f(e=>JSON.parse(JSON.stringify(e)),"clone"),z,Me=(z=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Pt(),this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=re,this.setAccTitle=ae,this.getAccDescription=ne,this.setAccDescription=le,this.setDiagramTitle=oe,this.getDiagramTitle=ce,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}extract(t){this.clear(!0);for(const i of Array.isArray(t)?t:t.doc)switch(i.stmt){case Q:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case Ct:this.addRelation(i.state1,i.state2,i.description);break;case fe:this.addStyleClass(i.id.trim(),i.classes);break;case pe:this.handleStyleDef(i);break;case Se:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}const s=this.getStates(),a=F();$e(),st(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,a.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){const s=t.id.trim().split(","),a=t.styleClass.split(",");for(const i of s){let o=this.getState(i);if(!o){const d=i.trim();this.addState(d),o=this.getState(d)}o&&(o.styles=a.map(d=>{var S;return(S=d.replace(/;/g,""))==null?void 0:S.trim()}))}}setRootDoc(t){D.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,s,a){if(s.stmt===Ct){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===Q&&(s.id===v.START_NODE?(s.id=t.id+(a?"_start":"_end"),s.start=a):s.id=s.id.trim()),s.stmt!==q&&s.stmt!==Q||!s.doc)return;const i=[];let o=[];for(const d of s.doc)if(d.type===Gt){const S=pt(d);S.doc=pt(o),i.push(S),o=[]}else o.push(d);if(i.length>0&&o.length>0){const d={stmt:Q,id:he(),type:"divider",doc:pt(o)};i.push(pt(d)),s.doc=i}s.doc.forEach(d=>this.docTranslator(s,d,!0))}getRootDocV2(){return this.docTranslator({id:q,stmt:q},{id:q,stmt:q,doc:this.rootDoc},!0),{id:q,doc:this.rootDoc}}addState(t,s=it,a=void 0,i=void 0,o=void 0,d=void 0,S=void 0,p=void 0){const T=t==null?void 0:t.trim();if(!this.currentDocument.states.has(T))D.info("Adding state ",T,i),this.currentDocument.states.set(T,{stmt:Q,id:T,descriptions:[],type:s,doc:a,note:o,classes:[],styles:[],textStyles:[]});else{const _=this.currentDocument.states.get(T);if(!_)throw new Error(`State not found: ${T}`);_.doc||(_.doc=a),_.type||(_.type=s)}if(i&&(D.info("Setting state description",T,i),(Array.isArray(i)?i:[i]).forEach(m=>this.addDescription(T,m.trim()))),o){const _=this.currentDocument.states.get(T);if(!_)throw new Error(`State not found: ${T}`);_.note=o,_.note.text=W.sanitizeText(_.note.text,F())}d&&(D.info("Setting state classes",T,d),(Array.isArray(d)?d:[d]).forEach(m=>this.setCssClass(T,m.trim()))),S&&(D.info("Setting state styles",T,S),(Array.isArray(S)?S:[S]).forEach(m=>this.setStyle(T,m.trim()))),p&&(D.info("Setting state styles",T,S),(Array.isArray(p)?p:[p]).forEach(m=>this.setTextStyle(T,m.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Ft()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Pt(),t||(this.links=new Map,ue())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){D.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,s,a){this.links.set(t,{url:s,tooltip:a}),D.warn("Adding link",t,s,a)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===v.START_NODE?(this.startEndCount++,`${v.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",s=it){return t===v.START_NODE?v.START_TYPE:s}endIdIfNeeded(t=""){return t===v.END_NODE?(this.startEndCount++,`${v.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",s=it){return t===v.END_NODE?v.END_TYPE:s}addRelationObjs(t,s,a=""){const i=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type),d=this.startIdIfNeeded(s.id.trim()),S=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(i,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(d,S,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:i,id2:d,relationTitle:W.sanitizeText(a,F())})}addRelation(t,s,a){if(typeof t=="object"&&typeof s=="object")this.addRelationObjs(t,s,a);else if(typeof t=="string"&&typeof s=="string"){const i=this.startIdIfNeeded(t.trim()),o=this.startTypeIfNeeded(t),d=this.endIdIfNeeded(s.trim()),S=this.endTypeIfNeeded(s);this.addState(i,o),this.addState(d,S),this.currentDocument.relations.push({id1:i,id2:d,relationTitle:a?W.sanitizeText(a,F()):void 0})}}addDescription(t,s){var o;const a=this.currentDocument.states.get(t),i=s.startsWith(":")?s.replace(":","").trim():s;(o=a==null?void 0:a.descriptions)==null||o.push(W.sanitizeText(i,F()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,s=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const a=this.classes.get(t);s&&a&&s.split(v.STYLECLASS_SEP).forEach(i=>{const o=i.replace(/([^;]*);/,"$1").trim();if(RegExp(v.COLOR_KEYWORD).exec(i)){const S=o.replace(v.FILL_KEYWORD,v.BG_FILL).replace(v.COLOR_KEYWORD,v.FILL_KEYWORD);a.textStyles.push(S)}a.styles.push(o)})}getClasses(){return this.classes}setCssClass(t,s){t.split(",").forEach(a=>{var o;let i=this.getState(a);if(!i){const d=a.trim();this.addState(d),i=this.getState(d)}(o=i==null?void 0:i.classes)==null||o.push(s)})}setStyle(t,s){var a,i;(i=(a=this.getState(t))==null?void 0:a.styles)==null||i.push(s)}setTextStyle(t,s){var a,i;(i=(a=this.getState(t))==null?void 0:a.textStyles)==null||i.push(s)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Rt)}getDirection(){var t;return((t=this.getDirectionStatement())==null?void 0:t.value)??de}setDirection(t){const s=this.getDirectionStatement();s?s.value=t:this.rootDoc.unshift({stmt:Rt,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=F();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Kt(this.getRootDocV2())}}getConfig(){return F().state}},f(z,"StateDB"),z.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},z),Pe=f(e=>` -defs #statediagram-barbEnd { - fill: ${e.transitionColor}; - stroke: ${e.transitionColor}; - } -g.stateGroup text { - fill: ${e.nodeBorder}; - stroke: none; - font-size: 10px; -} -g.stateGroup text { - fill: ${e.textColor}; - stroke: none; - font-size: 10px; - -} -g.stateGroup .state-title { - font-weight: bolder; - fill: ${e.stateLabelColor}; -} - -g.stateGroup rect { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; -} - -g.stateGroup line { - stroke: ${e.lineColor}; - stroke-width: 1; -} - -.transition { - stroke: ${e.transitionColor}; - stroke-width: 1; - fill: none; -} - -.stateGroup .composit { - fill: ${e.background}; - border-bottom: 1px -} - -.stateGroup .alt-composit { - fill: #e0e0e0; - border-bottom: 1px -} - -.state-note { - stroke: ${e.noteBorderColor}; - fill: ${e.noteBkgColor}; - - text { - fill: ${e.noteTextColor}; - stroke: none; - font-size: 10px; - } -} - -.stateLabel .box { - stroke: none; - stroke-width: 0; - fill: ${e.mainBkg}; - opacity: 0.5; -} - -.edgeLabel .label rect { - fill: ${e.labelBackgroundColor}; - opacity: 0.5; -} -.edgeLabel { - background-color: ${e.edgeLabelBackground}; - p { - background-color: ${e.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; -} -.edgeLabel .label text { - fill: ${e.transitionLabelColor||e.tertiaryTextColor}; -} -.label div .edgeLabel { - color: ${e.transitionLabelColor||e.tertiaryTextColor}; -} - -.stateLabel text { - fill: ${e.stateLabelColor}; - font-size: 10px; - font-weight: bold; -} - -.node circle.state-start { - fill: ${e.specialStateColor}; - stroke: ${e.specialStateColor}; -} - -.node .fork-join { - fill: ${e.specialStateColor}; - stroke: ${e.specialStateColor}; -} - -.node circle.state-end { - fill: ${e.innerEndBackground}; - stroke: ${e.background}; - stroke-width: 1.5 -} -.end-state-inner { - fill: ${e.compositeBackground||e.background}; - // stroke: ${e.background}; - stroke-width: 1.5 -} - -.node rect { - fill: ${e.stateBkg||e.mainBkg}; - stroke: ${e.stateBorder||e.nodeBorder}; - stroke-width: 1px; -} -.node polygon { - fill: ${e.mainBkg}; - stroke: ${e.stateBorder||e.nodeBorder};; - stroke-width: 1px; -} -#statediagram-barbEnd { - fill: ${e.lineColor}; -} - -.statediagram-cluster rect { - fill: ${e.compositeTitleBackground}; - stroke: ${e.stateBorder||e.nodeBorder}; - stroke-width: 1px; -} - -.cluster-label, .nodeLabel { - color: ${e.stateLabelColor}; - // line-height: 1; -} - -.statediagram-cluster rect.outer { - rx: 5px; - ry: 5px; -} -.statediagram-state .divider { - stroke: ${e.stateBorder||e.nodeBorder}; -} - -.statediagram-state .title-state { - rx: 5px; - ry: 5px; -} -.statediagram-cluster.statediagram-cluster .inner { - fill: ${e.compositeBackground||e.background}; -} -.statediagram-cluster.statediagram-cluster-alt .inner { - fill: ${e.altBackground?e.altBackground:"#efefef"}; -} - -.statediagram-cluster .inner { - rx:0; - ry:0; -} - -.statediagram-state rect.basic { - rx: 5px; - ry: 5px; -} -.statediagram-state rect.divider { - stroke-dasharray: 10,10; - fill: ${e.altBackground?e.altBackground:"#efefef"}; -} - -.note-edge { - stroke-dasharray: 5; -} - -.statediagram-note rect { - fill: ${e.noteBkgColor}; - stroke: ${e.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} -.statediagram-note rect { - fill: ${e.noteBkgColor}; - stroke: ${e.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} - -.statediagram-note text { - fill: ${e.noteTextColor}; -} - -.statediagram-note .nodeLabel { - color: ${e.noteTextColor}; -} -.statediagram .edgeLabel { - color: red; // ${e.noteTextColor}; -} - -#dependencyStart, #dependencyEnd { - fill: ${e.lineColor}; - stroke: ${e.lineColor}; - stroke-width: 1; -} - -.statediagramTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; -} -`,"getStyles"),Ue=Pe;export{Me as S,Be as a,Ve as b,Ue as s}; diff --git a/lightrag/api/webui/assets/chunk-SKB7J2MH-ty0WEC-6.js b/lightrag/api/webui/assets/chunk-SKB7J2MH-ty0WEC-6.js deleted file mode 100644 index 804359e4..00000000 --- a/lightrag/api/webui/assets/chunk-SKB7J2MH-ty0WEC-6.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,e as w,l as x}from"./index-bjrbS6e8.js";var d=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=l(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{d as s}; diff --git a/lightrag/api/webui/assets/chunk-SZ463SBG-3gzxcxJa.js b/lightrag/api/webui/assets/chunk-SZ463SBG-3gzxcxJa.js deleted file mode 100644 index 9fd3f228..00000000 --- a/lightrag/api/webui/assets/chunk-SZ463SBG-3gzxcxJa.js +++ /dev/null @@ -1,165 +0,0 @@ -import{g as et}from"./chunk-E2GYISFI-Csg-WUa_.js";import{g as tt}from"./chunk-BFAMUDN2-DaWGHPR3.js";import{s as st}from"./chunk-SKB7J2MH-ty0WEC-6.js";import{_ as f,l as Oe,c as F,o as it,r as at,u as we,d as $,b as nt,a as rt,s as ut,g as lt,p as ct,q as ot,k as v,y as ht,x as dt,i as pt,Q as R}from"./index-bjrbS6e8.js";var Ve=function(){var s=f(function(I,c,h,p){for(h=h||{},p=I.length;p--;h[I[p]]=c);return h},"o"),i=[1,18],a=[1,19],u=[1,20],l=[1,41],r=[1,42],o=[1,26],A=[1,24],g=[1,25],k=[1,32],L=[1,33],Ae=[1,34],m=[1,45],fe=[1,35],ge=[1,36],Ce=[1,37],me=[1,38],be=[1,27],Ee=[1,28],ye=[1,29],Te=[1,30],ke=[1,31],b=[1,44],E=[1,46],y=[1,43],D=[1,47],De=[1,9],d=[1,8,9],ee=[1,58],te=[1,59],se=[1,60],ie=[1,61],ae=[1,62],Fe=[1,63],Be=[1,64],ne=[1,8,9,41],Pe=[1,76],P=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],re=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],ue=[13,58,84,99,101,102],z=[13,58,71,72,84,99,101,102],Me=[13,58,66,67,68,69,70,84,99,101,102],_e=[1,98],K=[1,115],Y=[1,107],Q=[1,113],W=[1,108],j=[1,109],X=[1,110],q=[1,111],H=[1,112],J=[1,114],Re=[22,58,59,80,84,85,86,87,88,89],Se=[1,8,9,39,41,44],le=[1,8,9,22],Ge=[1,143],Ue=[1,8,9,59],N=[1,8,9,22,58,59,80,84,85,86,87,88,89],Ne={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:f(function(c,h,p,n,C,e,Z){var t=e.length-1;switch(C){case 8:this.$=e[t-1];break;case 9:case 12:case 14:this.$=e[t];break;case 10:case 13:this.$=e[t-2]+"."+e[t];break;case 11:case 15:this.$=e[t-1]+e[t];break;case 16:case 17:this.$=e[t-1]+"~"+e[t]+"~";break;case 18:n.addRelation(e[t]);break;case 19:e[t-1].title=n.cleanupLabel(e[t]),n.addRelation(e[t-1]);break;case 30:this.$=e[t].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=e[t].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(e[t-3],e[t-1]);break;case 34:n.addClassesToNamespace(e[t-4],e[t-1]);break;case 35:this.$=e[t],n.addNamespace(e[t]);break;case 36:this.$=[e[t]];break;case 37:this.$=[e[t-1]];break;case 38:e[t].unshift(e[t-2]),this.$=e[t];break;case 40:n.setCssClass(e[t-2],e[t]);break;case 41:n.addMembers(e[t-3],e[t-1]);break;case 42:n.setCssClass(e[t-5],e[t-3]),n.addMembers(e[t-5],e[t-1]);break;case 43:this.$=e[t],n.addClass(e[t]);break;case 44:this.$=e[t-1],n.addClass(e[t-1]),n.setClassLabel(e[t-1],e[t]);break;case 45:n.addAnnotation(e[t],e[t-2]);break;case 46:case 59:this.$=[e[t]];break;case 47:e[t].push(e[t-1]),this.$=e[t];break;case 48:break;case 49:n.addMember(e[t-1],n.cleanupLabel(e[t]));break;case 50:break;case 51:break;case 52:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 54:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 55:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 56:n.addNote(e[t],e[t-1]);break;case 57:n.addNote(e[t]);break;case 58:this.$=e[t-2],n.defineClass(e[t-1],e[t]);break;case 60:this.$=e[t-2].concat([e[t]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 66:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 67:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 68:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=e[t-2],n.setClickEvent(e[t-1],e[t]);break;case 77:case 83:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 78:this.$=e[t-2],n.setLink(e[t-1],e[t]);break;case 79:this.$=e[t-3],n.setLink(e[t-2],e[t-1],e[t]);break;case 80:this.$=e[t-3],n.setLink(e[t-2],e[t-1]),n.setTooltip(e[t-2],e[t]);break;case 81:this.$=e[t-4],n.setLink(e[t-3],e[t-2],e[t]),n.setTooltip(e[t-3],e[t-1]);break;case 84:this.$=e[t-3],n.setClickEvent(e[t-2],e[t-1],e[t]);break;case 85:this.$=e[t-4],n.setClickEvent(e[t-3],e[t-2],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 86:this.$=e[t-3],n.setLink(e[t-2],e[t]);break;case 87:this.$=e[t-4],n.setLink(e[t-3],e[t-1],e[t]);break;case 88:this.$=e[t-4],n.setLink(e[t-3],e[t-1]),n.setTooltip(e[t-3],e[t]);break;case 89:this.$=e[t-5],n.setLink(e[t-4],e[t-2],e[t]),n.setTooltip(e[t-4],e[t-1]);break;case 90:this.$=e[t-2],n.setCssStyle(e[t-1],e[t]);break;case 91:n.setCssClass(e[t-1],e[t]);break;case 92:this.$=[e[t]];break;case 93:e[t-2].push(e[t]),this.$=e[t-2];break;case 95:this.$=e[t-1]+e[t];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(De,[2,5],{8:[1,48]}),{8:[1,49]},s(d,[2,18],{22:[1,50]}),s(d,[2,20]),s(d,[2,21]),s(d,[2,22]),s(d,[2,23]),s(d,[2,24]),s(d,[2,25]),s(d,[2,26]),s(d,[2,27]),s(d,[2,28]),s(d,[2,29]),{34:[1,51]},{36:[1,52]},s(d,[2,32]),s(d,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:ee,67:te,68:se,69:ie,70:ae,71:Fe,72:Be}),{39:[1,65]},s(ne,[2,39],{39:[1,67],44:[1,66]}),s(d,[2,50]),s(d,[2,51]),{16:68,58:m,84:b,99:E,101:y},{16:39,18:69,19:40,58:m,84:b,99:E,101:y,102:D},{16:39,18:70,19:40,58:m,84:b,99:E,101:y,102:D},{16:39,18:71,19:40,58:m,84:b,99:E,101:y,102:D},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:m,84:b,99:E,101:y,102:D},{13:Pe,53:75},{56:77,58:[1,78]},s(d,[2,61]),s(d,[2,62]),s(d,[2,63]),s(d,[2,64]),s(P,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:m,84:b,99:E,101:y,102:D}),s(P,[2,14],{20:[1,82]}),{15:83,16:84,58:m,84:b,99:E,101:y},{16:39,18:85,19:40,58:m,84:b,99:E,101:y,102:D},s(re,[2,118]),s(re,[2,119]),s(re,[2,120]),s(re,[2,121]),s([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),s(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:i,35:a,37:u,42:l,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:u,38:22,42:l,43:23,46:r,47:o,49:A,50:g,52:k,54:L,55:Ae,58:m,60:fe,61:ge,62:Ce,63:me,73:be,74:Ee,76:ye,80:Te,81:ke,84:b,99:E,101:y,102:D},s(d,[2,19]),s(d,[2,30]),s(d,[2,31]),{13:[1,89],16:39,18:88,19:40,58:m,84:b,99:E,101:y,102:D},{51:90,64:56,65:57,66:ee,67:te,68:se,69:ie,70:ae,71:Fe,72:Be},s(d,[2,49]),{65:91,71:Fe,72:Be},s(ue,[2,68],{64:92,66:ee,67:te,68:se,69:ie,70:ae}),s(z,[2,69]),s(z,[2,70]),s(z,[2,71]),s(z,[2,72]),s(z,[2,73]),s(Me,[2,74]),s(Me,[2,75]),{8:[1,94],24:95,40:93,43:23,46:r},{16:96,58:m,84:b,99:E,101:y},{45:97,49:_e},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:K,57:104,58:Y,80:Q,82:105,83:106,84:W,85:j,86:X,87:q,88:H,89:J},{58:[1,116]},{13:Pe,53:117},s(d,[2,57]),s(d,[2,123]),{22:K,57:118,58:Y,59:[1,119],80:Q,82:105,83:106,84:W,85:j,86:X,87:q,88:H,89:J},s(Re,[2,59]),{16:39,18:120,19:40,58:m,84:b,99:E,101:y,102:D},s(P,[2,15]),s(P,[2,16]),s(P,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:m,84:b,99:E,101:y},s(Se,[2,43],{11:123,12:[1,124]}),s(De,[2,7]),{9:[1,125]},s(le,[2,52]),{16:39,18:126,19:40,58:m,84:b,99:E,101:y,102:D},{13:[1,128],16:39,18:127,19:40,58:m,84:b,99:E,101:y,102:D},s(ue,[2,67],{64:129,66:ee,67:te,68:se,69:ie,70:ae}),s(ue,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:r},{8:[1,132],41:[2,36]},s(ne,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:_e},{16:39,18:136,19:40,58:m,84:b,99:E,101:y,102:D},s(d,[2,76],{13:[1,137]}),s(d,[2,78],{13:[1,139],75:[1,138]}),s(d,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},s(d,[2,90],{59:Ge}),s(Ue,[2,92],{83:144,22:K,58:Y,80:Q,84:W,85:j,86:X,87:q,88:H,89:J}),s(N,[2,94]),s(N,[2,96]),s(N,[2,97]),s(N,[2,98]),s(N,[2,99]),s(N,[2,100]),s(N,[2,101]),s(N,[2,102]),s(N,[2,103]),s(N,[2,104]),s(d,[2,91]),s(d,[2,56]),s(d,[2,58],{59:Ge}),{58:[1,145]},s(P,[2,13]),{15:146,16:84,58:m,84:b,99:E,101:y},{39:[2,11]},s(Se,[2,44]),{13:[1,147]},{1:[2,4]},s(le,[2,54]),s(le,[2,53]),{16:39,18:148,19:40,58:m,84:b,99:E,101:y,102:D},s(ue,[2,65]),s(d,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:r},{45:151,49:_e},s(ne,[2,41]),{41:[2,47]},s(d,[2,45]),s(d,[2,77]),s(d,[2,79]),s(d,[2,80],{75:[1,152]}),s(d,[2,83]),s(d,[2,84],{13:[1,153]}),s(d,[2,86],{13:[1,155],75:[1,154]}),{22:K,58:Y,80:Q,82:156,83:106,84:W,85:j,86:X,87:q,88:H,89:J},s(N,[2,95]),s(Re,[2,60]),{39:[2,10]},{14:[1,157]},s(le,[2,55]),s(d,[2,34]),{41:[2,38]},{41:[1,158]},s(d,[2,81]),s(d,[2,85]),s(d,[2,87]),s(d,[2,88],{75:[1,159]}),s(Ue,[2,93],{83:144,22:K,58:Y,80:Q,84:W,85:j,86:X,87:q,88:H,89:J}),s(Se,[2,8]),s(ne,[2,42]),s(d,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:f(function(c,h){if(h.recoverable)this.trace(c);else{var p=new Error(c);throw p.hash=h,p}},"parseError"),parse:f(function(c){var h=this,p=[0],n=[],C=[null],e=[],Z=this.table,t="",oe=0,ze=0,He=2,Ke=1,Je=e.slice.call(arguments,1),T=Object.create(this.lexer),O={yy:{}};for(var Le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Le)&&(O.yy[Le]=this.yy[Le]);T.setInput(c,O.yy),O.yy.lexer=T,O.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var xe=T.yylloc;e.push(xe);var Ze=T.options&&T.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $e(_){p.length=p.length-2*_,C.length=C.length-_,e.length=e.length-_}f($e,"popStack");function Ye(){var _;return _=n.pop()||T.lex()||Ke,typeof _!="number"&&(_ instanceof Array&&(n=_,_=n.pop()),_=h.symbols_[_]||_),_}f(Ye,"lex");for(var B,w,S,ve,M={},he,x,Qe,de;;){if(w=p[p.length-1],this.defaultActions[w]?S=this.defaultActions[w]:((B===null||typeof B>"u")&&(B=Ye()),S=Z[w]&&Z[w][B]),typeof S>"u"||!S.length||!S[0]){var Ie="";de=[];for(he in Z[w])this.terminals_[he]&&he>He&&de.push("'"+this.terminals_[he]+"'");T.showPosition?Ie="Parse error on line "+(oe+1)+`: -`+T.showPosition()+` -Expecting `+de.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Ie="Parse error on line "+(oe+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Ie,{text:T.match,token:this.terminals_[B]||B,line:T.yylineno,loc:xe,expected:de})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+B);switch(S[0]){case 1:p.push(B),C.push(T.yytext),e.push(T.yylloc),p.push(S[1]),B=null,ze=T.yyleng,t=T.yytext,oe=T.yylineno,xe=T.yylloc;break;case 2:if(x=this.productions_[S[1]][1],M.$=C[C.length-x],M._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},Ze&&(M._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),ve=this.performAction.apply(M,[t,ze,oe,O.yy,S[1],C,e].concat(Je)),typeof ve<"u")return ve;x&&(p=p.slice(0,-1*x*2),C=C.slice(0,-1*x),e=e.slice(0,-1*x)),p.push(this.productions_[S[1]][0]),C.push(M.$),e.push(M._$),Qe=Z[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},qe=function(){var I={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(c,h){return this.yy=h||this.yy||{},this._input=c,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var h=c.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:f(function(c){var h=c.length,p=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===n.length?this.yylloc.first_column:0)+n[n.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(c){this.unput(this.match.slice(c))},"less"),pastInput:f(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var c=this.pastInput(),h=new Array(c.length+1).join("-");return c+this.upcomingInput()+` -`+h+"^"},"showPosition"),test_match:f(function(c,h){var p,n,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),n=c[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(c[0].length),this.matched+=c[0],p=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var e in C)this[e]=C[e];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,h,p,n;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),e=0;eh[0].length)){if(h=p,n=e,this.options.backtrack_lexer){if(c=this.test_match(p,C[e]),c!==!1)return c;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(c=this.test_match(h,C[n]),c!==!1?c:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:f(function(h,p,n,C){switch(n){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return I}();Ne.lexer=qe;function ce(){this.yy={}}return f(ce,"Parser"),ce.prototype=Ne,Ne.Parser=ce,new ce}();Ve.parser=Ve;var Tt=Ve,We=["#","+","~","-",""],G,je=(G=class{constructor(i,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";const u=pt(i,F());this.parseMember(u)}getDisplayDetails(){let i=this.visibility+R(this.id);this.memberType==="method"&&(i+=`(${R(this.parameters.trim())})`,this.returnType&&(i+=" : "+R(this.returnType))),i=i.trim();const a=this.parseClassifier();return{displayText:i,cssStyle:a}}parseMember(i){let a="";if(this.memberType==="method"){const r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(r){const o=r[1]?r[1].trim():"";if(We.includes(o)&&(this.visibility=o),this.id=r[2],this.parameters=r[3]?r[3].trim():"",a=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",a===""){const A=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(A)&&(a=A,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const l=i.length,r=i.substring(0,1),o=i.substring(l-1);We.includes(r)&&(this.visibility=r),/[$*]/.exec(o)&&(a=o),this.id=i.substring(this.visibility===""?0:1,a===""?l:l-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const u=`${this.visibility?"\\"+this.visibility:""}${R(this.id)}${this.memberType==="method"?`(${R(this.parameters)})${this.returnType?" : "+R(this.returnType):""}`:""}`;this.text=u.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},f(G,"ClassMember"),G),pe="classId-",Xe=0,V=f(s=>v.sanitizeText(s,F()),"sanitizeText"),U,kt=(U=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=f(i=>{let a=$(".mermaidTooltip");(a._groups||a)[0][0]===null&&(a=$("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),$(i).select("svg").selectAll("g.node").on("mouseover",r=>{const o=$(r.currentTarget);if(o.attr("title")===null)return;const g=this.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.text(o.attr("title")).style("left",window.scrollX+g.left+(g.right-g.left)/2+"px").style("top",window.scrollY+g.top-14+document.body.scrollTop+"px"),a.html(a.html().replace(/<br\/>/g,"
")),o.classed("hover",!0)}).on("mouseout",r=>{a.transition().duration(500).style("opacity",0),$(r.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=nt,this.getAccTitle=rt,this.setAccDescription=ut,this.getAccDescription=lt,this.setDiagramTitle=ct,this.getDiagramTitle=ot,this.getConfig=f(()=>F().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(i){const a=v.sanitizeText(i,F());let u="",l=a;if(a.indexOf("~")>0){const r=a.split("~");l=V(r[0]),u=V(r[1])}return{className:l,type:u}}setClassLabel(i,a){const u=v.sanitizeText(i,F());a&&(a=V(a));const{className:l}=this.splitClassNameAndType(u);this.classes.get(l).label=a,this.classes.get(l).text=`${a}${this.classes.get(l).type?`<${this.classes.get(l).type}>`:""}`}addClass(i){const a=v.sanitizeText(i,F()),{className:u,type:l}=this.splitClassNameAndType(a);if(this.classes.has(u))return;const r=v.sanitizeText(u,F());this.classes.set(r,{id:r,type:l,label:r,text:`${r}${l?`<${l}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:pe+r+"-"+Xe}),Xe++}addInterface(i,a){const u={id:`interface${this.interfaces.length}`,label:i,classId:a};this.interfaces.push(u)}lookUpDomId(i){const a=v.sanitizeText(i,F());if(this.classes.has(a))return this.classes.get(a).domId;throw new Error("Class not found: "+a)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",ht()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(i){Oe.debug("Adding relation: "+JSON.stringify(i));const a=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!a.includes(i.relation.type2)?(this.addClass(i.id2),this.addInterface(i.id1,i.id2),i.id1=`interface${this.interfaces.length-1}`):i.relation.type2===this.relationType.LOLLIPOP&&!a.includes(i.relation.type1)?(this.addClass(i.id1),this.addInterface(i.id2,i.id1),i.id2=`interface${this.interfaces.length-1}`):(this.addClass(i.id1),this.addClass(i.id2)),i.id1=this.splitClassNameAndType(i.id1).className,i.id2=this.splitClassNameAndType(i.id2).className,i.relationTitle1=v.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=v.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,a){const u=this.splitClassNameAndType(i).className;this.classes.get(u).annotations.push(a)}addMember(i,a){this.addClass(i);const u=this.splitClassNameAndType(i).className,l=this.classes.get(u);if(typeof a=="string"){const r=a.trim();r.startsWith("<<")&&r.endsWith(">>")?l.annotations.push(V(r.substring(2,r.length-2))):r.indexOf(")")>0?l.methods.push(new je(r,"method")):r&&l.members.push(new je(r,"attribute"))}}addMembers(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(u=>this.addMember(i,u)))}addNote(i,a){const u={id:`note${this.notes.length}`,class:a,text:i};this.notes.push(u)}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),V(i.trim())}setCssClass(i,a){i.split(",").forEach(u=>{let l=u;/\d/.exec(u[0])&&(l=pe+l);const r=this.classes.get(l);r&&(r.cssClasses+=" "+a)})}defineClass(i,a){for(const u of i){let l=this.styleClasses.get(u);l===void 0&&(l={id:u,styles:[],textStyles:[]},this.styleClasses.set(u,l)),a&&a.forEach(r=>{if(/color/.exec(r)){const o=r.replace("fill","bgFill");l.textStyles.push(o)}l.styles.push(r)}),this.classes.forEach(r=>{r.cssClasses.includes(u)&&r.styles.push(...a.flatMap(o=>o.split(",")))})}}setTooltip(i,a){i.split(",").forEach(u=>{a!==void 0&&(this.classes.get(u).tooltip=V(a))})}getTooltip(i,a){return a&&this.namespaces.has(a)?this.namespaces.get(a).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,a,u){const l=F();i.split(",").forEach(r=>{let o=r;/\d/.exec(r[0])&&(o=pe+o);const A=this.classes.get(o);A&&(A.link=we.formatUrl(a,l),l.securityLevel==="sandbox"?A.linkTarget="_top":typeof u=="string"?A.linkTarget=V(u):A.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,a,u){i.split(",").forEach(l=>{this.setClickFunc(l,a,u),this.classes.get(l).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,a,u){const l=v.sanitizeText(i,F());if(F().securityLevel!=="loose"||a===void 0)return;const o=l;if(this.classes.has(o)){const A=this.lookUpDomId(o);let g=[];if(typeof u=="string"){g=u.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k{const k=document.querySelector(`[id="${A}"]`);k!==null&&k.addEventListener("click",()=>{we.runFunc(a,...g)},!1)})}}bindFunctions(i){this.functions.forEach(a=>{a(i)})}getDirection(){return this.direction}setDirection(i){this.direction=i}addNamespace(i){this.namespaces.has(i)||(this.namespaces.set(i,{id:i,classes:new Map,children:{},domId:pe+i+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,a){if(this.namespaces.has(i))for(const u of a){const{className:l}=this.splitClassNameAndType(u);this.classes.get(l).parent=i,this.namespaces.get(i).classes.set(l,this.classes.get(l))}}setCssStyle(i,a){const u=this.classes.get(i);if(!(!a||!u))for(const l of a)l.includes(",")?u.styles.push(...l.split(",")):u.styles.push(l)}getArrowMarker(i){let a;switch(i){case 0:a="aggregation";break;case 1:a="extension";break;case 2:a="composition";break;case 3:a="dependency";break;case 4:a="lollipop";break;default:a="none"}return a}getData(){var r;const i=[],a=[],u=F();for(const o of this.namespaces.keys()){const A=this.namespaces.get(o);if(A){const g={id:A.id,label:A.id,isGroup:!0,padding:u.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:u.look};i.push(g)}}for(const o of this.classes.keys()){const A=this.classes.get(o);if(A){const g=A;g.parentId=A.parent,g.look=u.look,i.push(g)}}let l=0;for(const o of this.notes){l++;const A={id:o.id,label:o.text,isGroup:!1,shape:"note",padding:u.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${u.themeVariables.noteBkgColor}`,`stroke: ${u.themeVariables.noteBorderColor}`],look:u.look};i.push(A);const g=((r=this.classes.get(o.class))==null?void 0:r.id)??"";if(g){const k={id:`edgeNote${l}`,start:o.id,end:g,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:u.look};a.push(k)}}for(const o of this.interfaces){const A={id:o.id,label:o.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:u.look};i.push(A)}l=0;for(const o of this.relations){l++;const A={id:dt(o.id1,o.id2,{prefix:"id",counter:l}),start:o.id1,end:o.id2,type:"normal",label:o.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(o.relation.type1),arrowTypeEnd:this.getArrowMarker(o.relation.type2),startLabelRight:o.relationTitle1==="none"?"":o.relationTitle1,endLabelLeft:o.relationTitle2==="none"?"":o.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:o.style||"",pattern:o.relation.lineType==1?"dashed":"solid",look:u.look};a.push(A)}return{nodes:i,edges:a,other:{},config:u,direction:this.getDirection()}}},f(U,"ClassDB"),U),At=f(s=>`g.classGroup text { - fill: ${s.nodeBorder||s.classText}; - stroke: none; - font-family: ${s.fontFamily}; - font-size: 10px; - - .title { - font-weight: bolder; - } - -} - -.nodeLabel, .edgeLabel { - color: ${s.classText}; -} -.edgeLabel .label rect { - fill: ${s.mainBkg}; -} -.label text { - fill: ${s.classText}; -} - -.labelBkg { - background: ${s.mainBkg}; -} -.edgeLabel .label span { - background: ${s.mainBkg}; -} - -.classTitle { - font-weight: bolder; -} -.node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${s.mainBkg}; - stroke: ${s.nodeBorder}; - stroke-width: 1px; - } - - -.divider { - stroke: ${s.nodeBorder}; - stroke-width: 1; -} - -g.clickable { - cursor: pointer; -} - -g.classGroup rect { - fill: ${s.mainBkg}; - stroke: ${s.nodeBorder}; -} - -g.classGroup line { - stroke: ${s.nodeBorder}; - stroke-width: 1; -} - -.classLabel .box { - stroke: none; - stroke-width: 0; - fill: ${s.mainBkg}; - opacity: 0.5; -} - -.classLabel .label { - fill: ${s.nodeBorder}; - font-size: 10px; -} - -.relation { - stroke: ${s.lineColor}; - stroke-width: 1; - fill: none; -} - -.dashed-line{ - stroke-dasharray: 3; -} - -.dotted-line{ - stroke-dasharray: 1 2; -} - -#compositionStart, .composition { - fill: ${s.lineColor} !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#compositionEnd, .composition { - fill: ${s.lineColor} !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#dependencyStart, .dependency { - fill: ${s.lineColor} !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#dependencyStart, .dependency { - fill: ${s.lineColor} !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#extensionStart, .extension { - fill: transparent !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#extensionEnd, .extension { - fill: transparent !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#aggregationStart, .aggregation { - fill: transparent !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#aggregationEnd, .aggregation { - fill: transparent !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#lollipopStart, .lollipop { - fill: ${s.mainBkg} !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -#lollipopEnd, .lollipop { - fill: ${s.mainBkg} !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; -} - -.edgeTerminals { - font-size: 11px; - line-height: initial; -} - -.classTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${s.textColor}; -} - ${et()} -`,"getStyles"),Dt=At,ft=f((s,i="TB")=>{if(!s.doc)return i;let a=i;for(const u of s.doc)u.stmt==="dir"&&(a=u.value);return a},"getDir"),gt=f(function(s,i){return i.db.getClasses()},"getClasses"),Ct=f(async function(s,i,a,u){Oe.info("REF0:"),Oe.info("Drawing class diagram (v3)",i);const{securityLevel:l,state:r,layout:o}=F(),A=u.db.getData(),g=tt(i,l);A.type=u.type,A.layoutAlgorithm=it(o),A.nodeSpacing=(r==null?void 0:r.nodeSpacing)||50,A.rankSpacing=(r==null?void 0:r.rankSpacing)||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=i,await at(A,g);const k=8;we.insertTitle(g,"classDiagramTitleText",(r==null?void 0:r.titleTopMargin)??25,u.db.getDiagramTitle()),st(g,k,"classDiagram",(r==null?void 0:r.useMaxWidth)??!0)},"draw"),Ft={getClasses:gt,draw:Ct,getDir:ft};export{kt as C,Tt as a,Ft as c,Dt as s}; diff --git a/lightrag/api/webui/assets/classDiagram-M3E45YP4-CtKtKEN8.js b/lightrag/api/webui/assets/classDiagram-M3E45YP4-CtKtKEN8.js deleted file mode 100644 index f25aa8bd..00000000 --- a/lightrag/api/webui/assets/classDiagram-M3E45YP4-CtKtKEN8.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-SZ463SBG-3gzxcxJa.js";import{_ as i}from"./index-bjrbS6e8.js";import"./chunk-E2GYISFI-Csg-WUa_.js";import"./chunk-BFAMUDN2-DaWGHPR3.js";import"./chunk-SKB7J2MH-ty0WEC-6.js";var p={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{p as diagram}; diff --git a/lightrag/api/webui/assets/classDiagram-v2-YAWTLIQI-CtKtKEN8.js b/lightrag/api/webui/assets/classDiagram-v2-YAWTLIQI-CtKtKEN8.js deleted file mode 100644 index f25aa8bd..00000000 --- a/lightrag/api/webui/assets/classDiagram-v2-YAWTLIQI-CtKtKEN8.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-SZ463SBG-3gzxcxJa.js";import{_ as i}from"./index-bjrbS6e8.js";import"./chunk-E2GYISFI-Csg-WUa_.js";import"./chunk-BFAMUDN2-DaWGHPR3.js";import"./chunk-SKB7J2MH-ty0WEC-6.js";var p={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{p as diagram}; diff --git a/lightrag/api/webui/assets/clone-g5iXXiWA.js b/lightrag/api/webui/assets/clone-g5iXXiWA.js deleted file mode 100644 index bb642358..00000000 --- a/lightrag/api/webui/assets/clone-g5iXXiWA.js +++ /dev/null @@ -1 +0,0 @@ -import{b as r}from"./_baseUniq-DknB5v3H.js";var e=4;function a(o){return r(o,e)}export{a as c}; diff --git a/lightrag/api/webui/assets/cytoscape.esm-CfBqOv7Q.js b/lightrag/api/webui/assets/cytoscape.esm-CfBqOv7Q.js deleted file mode 100644 index dc213bc6..00000000 --- a/lightrag/api/webui/assets/cytoscape.esm-CfBqOv7Q.js +++ /dev/null @@ -1,191 +0,0 @@ -function cs(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return s=l.done,l},e:function(l){o=!0,i=l},f:function(){try{s||r.return==null||r.return()}finally{if(o)throw i}}}}function Ll(t,e,r){return(e=Ol(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qf(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Vf(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,n,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(a=i.call(r)).done)&&(o.push(a.value),o.length!==e);l=!0);}catch(v){u=!0,n=v}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw n}}return o}}function _f(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gf(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function je(t,e){return Nf(t)||Vf(t,e)||Rs(t,e)||_f()}function Il(t){return Ff(t)||qf(t)||Rs(t)||Gf()}function Hf(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Ol(t){var e=Hf(t,"string");return typeof e=="symbol"?e:e+""}function We(t){"@babel/helpers - typeof";return We=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},We(t)}function Rs(t,e){if(t){if(typeof t=="string")return cs(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cs(t,e):void 0}}var Ke=typeof window>"u"?null:window,so=Ke?Ke.navigator:null;Ke&&Ke.document;var Kf=We(""),Nl=We({}),$f=We(function(){}),Wf=typeof HTMLElement>"u"?"undefined":We(HTMLElement),Ca=function(e){return e&&e.instanceString&&_e(e.instanceString)?e.instanceString():null},fe=function(e){return e!=null&&We(e)==Kf},_e=function(e){return e!=null&&We(e)===$f},Le=function(e){return!bt(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},ke=function(e){return e!=null&&We(e)===Nl&&!Le(e)&&e.constructor===Object},Uf=function(e){return e!=null&&We(e)===Nl},ae=function(e){return e!=null&&We(e)===We(1)&&!isNaN(e)},Yf=function(e){return ae(e)&&Math.floor(e)===e},un=function(e){if(Wf!=="undefined")return e!=null&&e instanceof HTMLElement},bt=function(e){return Ta(e)||Fl(e)},Ta=function(e){return Ca(e)==="collection"&&e._private.single},Fl=function(e){return Ca(e)==="collection"&&!e._private.single},Ms=function(e){return Ca(e)==="core"},zl=function(e){return Ca(e)==="stylesheet"},Xf=function(e){return Ca(e)==="event"},tr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},Zf=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Qf=function(e){return ke(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},Jf=function(e){return Uf(e)&&_e(e.then)},jf=function(){return so&&so.userAgent.match(/msie|trident|edge/i)},Vr=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;sr?1:0},sc=function(e,r){return-1*Vl(e,r)},ge=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(g-=1),g<1/6?d+(y-d)*6*g:g<1/2?y:g<2/3?d+(y-d)*(2/3-g)*6:d}var f=new RegExp("^"+rc+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),l=Math.round(255*v(h,c,a)),u=Math.round(255*v(h,c,a-1/3))}r=[o,l,u,s]}return r},lc=function(e){var r,a=new RegExp("^"+ec+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},vc=function(e){return fc[e.toLowerCase()]},_l=function(e){return(Le(e)?e:null)||vc(e)||oc(e)||lc(e)||uc(e)},fc={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Gl=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i=l||R<0||m&&L>=c}function S(){var P=e();if(x(P))return k(P);d=setTimeout(S,C(P))}function k(P){return d=void 0,b&&v?w(P):(v=f=void 0,h)}function B(){d!==void 0&&clearTimeout(d),g=0,v=y=f=d=void 0}function D(){return d===void 0?h:k(e())}function A(){var P=e(),R=x(P);if(v=arguments,f=this,y=P,R){if(d===void 0)return E(y);if(m)return clearTimeout(d),d=setTimeout(S,l),w(y)}return d===void 0&&(d=setTimeout(S,l)),h}return A.cancel=B,A.flush=D,A}return ei=s,ei}var xc=wc(),Pa=Sa(xc),ti=Ke?Ke.performance:null,$l=ti&&ti.now?function(){return ti.now()}:function(){return Date.now()},Ec=function(){if(Ke){if(Ke.requestAnimationFrame)return function(t){Ke.requestAnimationFrame(t)};if(Ke.mozRequestAnimationFrame)return function(t){Ke.mozRequestAnimationFrame(t)};if(Ke.webkitRequestAnimationFrame)return function(t){Ke.webkitRequestAnimationFrame(t)};if(Ke.msRequestAnimationFrame)return function(t){Ke.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t($l())},1e3/60)}}(),ln=function(e){return Ec(e)},$t=$l,Mr=9261,Wl=65599,sa=5381,Ul=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mr,a=r,n;n=e.next(),!n.done;)a=a*Wl+n.value|0;return a},da=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mr;return r*Wl+e|0},ha=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:sa;return(r<<5)+r+e|0},Cc=function(e,r){return e*2097152+r},Xt=function(e){return e[0]*2097152+e[1]},za=function(e,r){return[da(e[0],r[0]),ha(e[1],r[1])]},Co=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0;n--)e[n]===r&&e.splice(n,1)},Fs=function(e){e.splice(0,e.length)},Ac=function(e,r){for(var a=0;a"u"?"undefined":We(Set))!==Mc?Set:Lc,Cn=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!Ms(e)){Ve("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Ve("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new $r,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Le(r.classes)?u=r.classes:fe(r.classes)&&(u=r.classes.split(/\s+/));for(var v=0,f=u.length;vm?1:0},v=function(p,m,b,w,E){var C;if(b==null&&(b=0),E==null&&(E=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=p.length);bB;0<=B?k++:k--)S.push(k);return S}).apply(this).reverse(),x=[],w=0,E=C.length;wD;0<=D?++S:--S)A.push(s(p,b));return A},y=function(p,m,b,w){var E,C,x;for(w==null&&(w=a),E=p[b];b>m;){if(x=b-1>>1,C=p[x],w(E,C)<0){p[b]=C,b=x;continue}break}return p[b]=E},g=function(p,m,b){var w,E,C,x,S;for(b==null&&(b=a),E=p.length,S=m,C=p[m],w=2*m+1;w0;){var C=m.pop(),x=g(C),S=C.id();if(c[S]=x,x!==1/0)for(var k=C.neighborhood().intersect(d),B=0;B0)for(O.unshift(M);f[H];){var F=f[H];O.unshift(F.edge),O.unshift(F.node),_=F.node,H=_.id()}return o.spawn(O)}}}},Vc={kruskal:function(e){e=e||function(b){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,l=function(w){for(var E=0;E0;){if(E(),x++,w===v){for(var S=[],k=i,B=v,D=p[B];S.unshift(k),D!=null&&S.unshift(D),k=g[B],k!=null;)B=k.id(),D=p[B];return{found:!0,distance:f[w],path:this.spawn(S),steps:x}}h[w]=!0;for(var A=b._private.edges,P=0;PD&&(d[B]=D,m[B]=k,b[B]=E),!i){var A=k*v+S;!i&&d[A]>D&&(d[A]=D,m[A]=S,b[A]=E)}}}for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:s,de=b(se),ye=[],he=de;;){if(he==null)return r.spawn();var me=m(he),Ce=me.edge,Se=me.pred;if(ye.unshift(he[0]),he.same(ue)&&ye.length>0)break;Ce!=null&&ye.unshift(Ce),he=Se}return l.spawn(ye)},C=0;C=0;v--){var f=u[v],c=f[1],h=f[2];(r[c]===o&&r[h]===l||r[c]===l&&r[h]===o)&&u.splice(v,1)}for(var d=0;dn;){var i=Math.floor(Math.random()*r.length);r=Yc(i,e,r),a--}return r},Xc={kargerStein:function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(O){return O.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/Uc);if(i<2){Ve("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,h){return c-h});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},td=function(e){return Math.PI*e/180},qa=function(e,r){return Math.atan2(r,e)-Math.PI/2},zs=Math.log2||function(t){return Math.log(t)/Math.log(2)},ev=function(e){return e>0?1:e<0?-1:0},yr=function(e,r){return Math.sqrt(cr(e,r))},cr=function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},rd=function(e){for(var r=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},nd=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},id=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},sd=function(e,r,a){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+a,y2:e.y2+a,w:e.w,h:e.h}},tv=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},od=function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},Qa=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Ja=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=je(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Bo=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},qs=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},_r=function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},ud=function(e,r){return _r(e,r.x,r.y)},rv=function(e,r){return _r(e,r.x1,r.y1)&&_r(e,r.x2,r.y2)},av=function(e,r,a,n,i,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?mr(i,s):l,v=i/2,f=s/2;u=Math.min(u,v,f);var c=u!==v,h=u!==f,d;if(c){var y=a-v+u-o,g=n-f-o,p=a+v-u+o,m=g;if(d=Jt(e,r,a,n,y,g,p,m,!1),d.length>0)return d}if(h){var b=a+v+o,w=n-f+u-o,E=b,C=n+f-u+o;if(d=Jt(e,r,a,n,b,w,E,C,!1),d.length>0)return d}if(c){var x=a-v+u-o,S=n+f+o,k=a+v-u+o,B=S;if(d=Jt(e,r,a,n,x,S,k,B,!1),d.length>0)return d}if(h){var D=a-v-o,A=n-f+u-o,P=D,R=n+f-u+o;if(d=Jt(e,r,a,n,D,A,P,R,!1),d.length>0)return d}var L;{var I=a-v+u,M=n-f+u;if(L=oa(e,r,a,n,I,M,u+o),L.length>0&&L[0]<=I&&L[1]<=M)return[L[0],L[1]]}{var O=a+v-u,_=n-f+u;if(L=oa(e,r,a,n,O,_,u+o),L.length>0&&L[0]>=O&&L[1]<=_)return[L[0],L[1]]}{var H=a+v-u,F=n+f-u;if(L=oa(e,r,a,n,H,F,u+o),L.length>0&&L[0]>=H&&L[1]>=F)return[L[0],L[1]]}{var G=a-v+u,U=n+f-u;if(L=oa(e,r,a,n,G,U,u+o),L.length>0&&L[0]<=G&&L[1]>=U)return[L[0],L[1]]}return[]},ld=function(e,r,a,n,i,s,o){var l=o,u=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=v+l&&f-l<=r&&r<=c+l},vd=function(e,r,a,n,i,s,o,l,u){var v={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ev.x2||rv.y2)},fd=function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},cd=function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,l,u,v,f,c,h,d;if(l=(3*a-r*r)/9,u=-(27*n)+r*(9*a-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,h=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+f+c,h+=(f+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+f)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}l=-l,v=l*l*l,v=Math.acos(u/Math.sqrt(v)),d=2*Math.sqrt(l),i[0]=-h+d*Math.cos(v/3),i[2]=-h+d*Math.cos((v+2*Math.PI)/3),i[4]=-h+d*Math.cos((v+4*Math.PI)/3)},dd=function(e,r,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,v=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,f=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,h=[];cd(u,v,f,c,h);for(var d=1e-7,y=[],g=0;g<6;g+=2)Math.abs(h[g+1])=0&&h[g]<=1&&y.push(h[g]);y.push(1),y.push(0);for(var p=-1,m,b,w,E=0;E=0?wu?(e-i)*(e-i)+(r-s)*(r-s):v-c},gt=function(e,r,a){for(var n,i,s,o,l,u=0,v=0;v=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},Wt=function(e,r,a,n,i,s,o,l,u){var v=new Array(a.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var c=Math.cos(-f),h=Math.sin(-f),d=0;d0){var g=cn(v,-u);y=fn(g)}else y=v;return gt(e,r,y)},gd=function(e,r,a,n,i,s,o,l){for(var u=new Array(a.length*2),v=0;v=0&&g<=1&&m.push(g),p>=0&&p<=1&&m.push(p),m.length===0)return[];var b=m[0]*l[0]+e,w=m[0]*l[1]+r;if(m.length>1){if(m[0]==m[1])return[b,w];var E=m[1]*l[0]+e,C=m[1]*l[1]+r;return[b,w,E,C]}else return[b,w]},ni=function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},Jt=function(e,r,a,n,i,s,o,l,u){var v=e-i,f=a-e,c=o-i,h=r-s,d=n-r,y=l-s,g=c*h-y*v,p=f*h-d*v,m=y*f-c*d;if(m!==0){var b=g/m,w=p/m,E=.001,C=0-E,x=1+E;return C<=b&&b<=x&&C<=w&&w<=x?[e+b*f,r+b*d]:u?[e+b*f,r+b*d]:[]}else return g===0||p===0?ni(e,a,o)===o?[o,l]:ni(e,a,i)===i?[i,s]:ni(i,o,a)===a?[a,n]:[]:[]},ya=function(e,r,a,n,i,s,o,l){var u=[],v,f=new Array(a.length),c=!0;s==null&&(c=!1);var h;if(c){for(var d=0;d0){var y=cn(f,-l);h=fn(y)}else h=f}else h=a;for(var g,p,m,b,w=0;w2){for(var d=[v[0],v[1]],y=Math.pow(d[0]-e,2)+Math.pow(d[1]-r,2),g=1;gv&&(v=w)},get:function(b){return u[b]}},c=0;c0?L=R.edgesTo(P)[0]:L=P.edgesTo(R)[0];var I=n(L);P=P.id(),x[P]>x[D]+I&&(x[P]=x[D]+I,S.nodes.indexOf(P)<0?S.push(P):S.updateItem(P),C[P]=0,E[P]=[]),x[P]==x[D]+I&&(C[P]=C[P]+C[D],E[P].push(D))}else for(var M=0;M0;){for(var F=w.pop(),G=0;G0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},Rd=function(e,r){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:Id,o=n,l,u,v=0;v=2?ea(e,r,a,0,Io,Od):ea(e,r,a,0,Lo)},squaredEuclidean:function(e,r,a){return ea(e,r,a,0,Io)},manhattan:function(e,r,a){return ea(e,r,a,0,Lo)},max:function(e,r,a){return ea(e,r,a,-1/0,Nd)}};Gr["squared-euclidean"]=Gr.squaredEuclidean;Gr.squaredeuclidean=Gr.squaredEuclidean;function Sn(t,e,r,a,n,i){var s;return _e(t)?s=t:s=Gr[t]||Gr.euclidean,e===0&&_e(t)?s(n,i):s(e,r,a,n,i)}var Fd=Ue({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),_s=function(e){return Fd(e)},dn=function(e,r,a,n,i){var s=i!=="kMedoids",o=s?function(f){return a[f]}:function(f){return n[f](a)},l=function(c){return n[c](r)},u=a,v=r;return Sn(e,n.length,o,l,u,v)},ii=function(e,r,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(r),l=null,u=0;ua)return!1}return!0},Vd=function(e,r,a){for(var n=0;no&&(o=r[u][v],l=v);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=r[s],y=r[n[s]],g;i.mode==="dendrogram"?g={left:d,right:y,key:d.key}:g={value:d.value.concat(y.value),key:d.key},e[d.index]=g,e.splice(y.index,1),r[d.key]=g;for(var p=0;pa[y.key][m.key]&&(l=a[y.key][m.key])):i.linkage==="max"?(l=a[d.key][m.key],a[d.key][m.key]0&&n.push(i);return n},Vo=function(e,r,a){for(var n=[],i=0;io&&(s=u,o=r[i*e+u])}s>0&&n.push(s)}for(var v=0;vu&&(l=v,u=f)}a[i]=s[l]}return n=Vo(e,r,a),n},_o=function(e){for(var r=this.cy(),a=this.nodes(),n=Jd(e),i={},s=0;s=D?(A=D,D=R,P=L):R>A&&(A=R);for(var I=0;I0?1:0;x[k%n.minIterations*o+G]=U,F+=U}if(F>0&&(k>=n.minIterations-1||k==n.maxIterations-1)){for(var X=0,Z=0;Z1||C>1)&&(o=!0),f[b]=[],m.outgoers().forEach(function(S){S.isEdge()&&f[b].push(S.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var w=m.degree(!0);w%2&&(l?u?o=!0:u=b:l=b),f[b]=[],m.connectedEdges().forEach(function(E){return f[b].push(E.id())})}else c[b]=[m.source().id(),m.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(u&&l)if(i){if(v&&u!=v)return h;v=u}else{if(v&&u!=v&&l!=v)return h;v||(v=u)}else v||(v=s[0].id());var d=function(b){for(var w=b,E=[b],C,x,S;f[w].length;)C=f[w].shift(),x=c[C][0],S=c[C][1],w!=S?(f[S]=f[S].filter(function(k){return k!=C}),w=S):!i&&w!=x&&(f[x]=f[x].filter(function(k){return k!=C}),w=x),E.unshift(C),E.unshift(w);return E},y=[],g=[];for(g=d(v);g.length!=1;)f[g[0]].length==0?(y.unshift(s.getElementById(g.shift())),y.unshift(s.getElementById(g.shift()))):g=d(g.shift()).concat(g);y.unshift(s.getElementById(g.shift()));for(var p in f)if(f[p].length)return h;return h.found=!0,h.trail=this.spawn(y,!0),h}},_a=function(){var e=this,r={},a=0,n=0,i=[],s=[],o={},l=function(c,h){for(var d=s.length-1,y=[],g=e.spawn();s[d].x!=c||s[d].y!=h;)y.push(s.pop().edge),d--;y.push(s.pop().edge),y.forEach(function(p){var m=p.connectedNodes().intersection(e);g.merge(p),m.forEach(function(b){var w=b.id(),E=b.connectedEdges().intersection(e);g.merge(b),r[w].cutVertex?g.merge(E.filter(function(C){return C.isLoop()})):g.merge(E)})}),i.push(g)},u=function(c,h,d){c===d&&(n+=1),r[h]={id:a,low:a++,cutVertex:!1};var y=e.getElementById(h).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(h)));else{var g,p,m,b;y.forEach(function(w){g=w.source().id(),p=w.target().id(),m=g===h?p:g,m!==d&&(b=w.id(),o[b]||(o[b]=!0,s.push({x:h,y:m,edge:w})),m in r?r[h].low=Math.min(r[h].low,r[m].id):(u(c,m,h),r[h].low=Math.min(r[h].low,r[m].low),r[h].id<=r[m].low&&(r[h].cutVertex=!0,l(h,m))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in r||(n=0,u(c,c),r[c].cutVertex=n>1)}});var v=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},sh={hopcroftTarjanBiconnected:_a,htbc:_a,htb:_a,hopcroftTarjanBiconnectedComponents:_a},Ga=function(){var e=this,r={},a=0,n=[],i=[],s=e.spawn(e),o=function(u){i.push(u),r[u]={index:a,low:a++,explored:!1};var v=e.getElementById(u).connectedEdges().intersection(e);if(v.forEach(function(y){var g=y.target().id();g!==u&&(g in r||o(g),r[g].explored||(r[u].low=Math.min(r[u].low,r[g].low)))}),r[u].index===r[u].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),r[c].low=r[u].index,r[c].explored=!0,c===u)break}var h=f.edgesWith(f),d=f.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:n}},oh={tarjanStronglyConnected:Ga,tsc:Ga,tscc:Ga,tarjanStronglyConnectedComponents:Ga},vv={};[ga,qc,Vc,Gc,Kc,Wc,Xc,wd,Fr,zr,gs,Ld,Wd,Zd,ah,ih,sh,oh].forEach(function(t){ge(vv,t)});/*! -Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable -Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) -Licensed under The MIT License (http://opensource.org/licenses/MIT) -*/var fv=0,cv=1,dv=2,At=function(e){if(!(this instanceof At))return new At(e);this.id="Thenable/1.0.7",this.state=fv,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};At.prototype={fulfill:function(e){return Go(this,cv,"fulfillValue",e)},reject:function(e){return Go(this,dv,"rejectReason",e)},then:function(e,r){var a=this,n=new At;return a.onFulfilled.push(Ko(e,n,"fulfill")),a.onRejected.push(Ko(r,n,"reject")),hv(a),n.proxy}};var Go=function(e,r,a,n){return e.state===fv&&(e.state=r,e[a]=n,hv(e)),e},hv=function(e){e.state===cv?Ho(e,"onFulfilled",e.fulfillValue):e.state===dv&&Ho(e,"onRejected",e.rejectReason)},Ho=function(e,r,a){if(e[r].length!==0){var n=e[r];e[r]=[];var i=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s-1}return ki=e,ki}var Pi,du;function Dh(){if(du)return Pi;du=1;var t=Pn();function e(r,a){var n=this.__data__,i=t(n,r);return i<0?(++this.size,n.push([r,a])):n[i][1]=a,this}return Pi=e,Pi}var Bi,hu;function kh(){if(hu)return Bi;hu=1;var t=Eh(),e=Ch(),r=Th(),a=Sh(),n=Dh();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&a%1==0&&a0&&this.spawn(n).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){Le(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=r===void 0,i=[],s=0,o=a.length;s0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var a=this;if(r==null)r=250;else if(r===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},r),a}};ja.className=ja.classNames=ja.classes;var De={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:$e,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};De.variable="(?:[\\w-.]|(?:\\\\"+De.metaChar+"))+";De.className="(?:[\\w-]|(?:\\\\"+De.metaChar+"))+";De.value=De.string+"|"+De.number;De.id=De.variable;(function(){var t,e,r;for(t=De.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(De.comparatorOp+="|\\!"+e)})();var Me=function(){return{checks:[]}},oe={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},bs=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return sc(t.selector,e.selector)}),ng=function(){for(var t={},e,r=0;r0&&v.edgeCount>0)return Re("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return Re("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&Re("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},vg=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},r=function(v){return fe(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,h=v.value;switch(c){case oe.GROUP:{var d=e(h);return d.substring(0,d.length-1)}case oe.DATA_COMPARE:{var y=v.field,g=v.operator;return"["+y+a(e(g))+r(h)+"]"}case oe.DATA_BOOL:{var p=v.operator,m=v.field;return"["+e(p)+m+"]"}case oe.DATA_EXIST:{var b=v.field;return"["+b+"]"}case oe.META_COMPARE:{var w=v.operator,E=v.field;return"[["+E+a(e(w))+r(h)+"]]"}case oe.STATE:return h;case oe.ID:return"#"+h;case oe.CLASS:return"."+h;case oe.PARENT:case oe.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case oe.ANCESTOR:case oe.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case oe.COMPOUND_SPLIT:{var C=i(v.left,f),x=i(v.subject,f),S=i(v.right,f);return C+(C.length>0?" ":"")+x+S}case oe.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,h,d){return c+(f===v&&d===0?"$":"")+n(h,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),v=!0),(i||o||v)&&(l=!i&&!s?"":""+e,u=""+a),v&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),r){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),o&&a(n,i,v)}return t}function Ev(t,e,r){if(r.isParent())for(var a=r._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return $s(this,t,e,Ev)};function Cv(t,e,r){if(r.isChild()){var a=r._private.parent;e.has(a.id())||t.push(a)}}Hr.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return $s(this,t,e,Cv)};function mg(t,e,r){Cv(t,e,r),Ev(t,e,r)}Hr.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return $s(this,t,e,mg)};Hr.ancestors=Hr.parents;var ma,Tv;ma=Tv={data:Ae.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Ae.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ae.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ae.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ae.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ae.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};ma.attr=ma.data;ma.removeAttr=ma.removeData;var bg=Tv,An={};function as(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var a=0,n=r[0],i=n._private.edges,s=0;se}),minIndegree:Sr("indegree",function(t,e){return te}),minOutdegree:Sr("outdegree",function(t,e){return te})});ge(An,{totalDegree:function(e){for(var r=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var h=c?v.position():{x:0,y:0};r!==void 0?u.position(e,r+h[e]):i!==void 0&&u.position({x:i.x+h.x,y:i.y+h.y})}else{var d=a.position(),y=o?a.parent():null,g=y&&y.length>0,p=g;g&&(y=y[0]);var m=p?y.position():{x:0,y:0};return i={x:d.x-m.x,y:d.y-m.y},e===void 0?i:i[e]}else if(!s)return;return this}};Bt.modelPosition=Bt.point=Bt.position;Bt.modelPositions=Bt.points=Bt.positions;Bt.renderedPoint=Bt.renderedPosition;Bt.relativePoint=Bt.relativePosition;var wg=Sv,qr,lr;qr=lr={};lr.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),a=r.zoom(),n=r.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};lr.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var a=r._private;a.compoundBoundsClean=!1,a.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};lr.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),c=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function h(k,B,D){var A=0,P=0,R=B+D;return k>0&&R>0&&(A=B/R*k,P=D/R*k),{biasDiff:A,biasComplementDiff:P}}function d(k,B,D,A){if(D.units==="%")switch(A){case"width":return k>0?D.pfValue*k:0;case"height":return B>0?D.pfValue*B:0;case"average":return k>0&&B>0?D.pfValue*(k+B)/2:0;case"min":return k>0&&B>0?k>B?D.pfValue*B:D.pfValue*k:0;case"max":return k>0&&B>0?k>B?D.pfValue*k:D.pfValue*B:0;default:return 0}else return D.units==="px"?D.pfValue:0}var y=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(y=y*100/v.width.val);var g=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(g=g*100/v.width.val);var p=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(p=p*100/v.height.val);var m=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(m=m*100/v.height.val);var b=h(v.width.val-f.w,y,g),w=b.biasDiff,E=b.biasComplementDiff,C=h(v.height.val-f.h,p,m),x=C.biasDiff,S=C.biasComplementDiff;o.autoPadding=d(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+E)/2,o.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+S)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},dr=function(e,r){return r==null?e:kt(e,r.x1,r.y1,r.x2,r.y2)},ta=function(e,r,a){return Et(e,r,a)},Ha=function(e,r,a){if(!r.cy().headless()){var n=r._private,i=n.rstyle,s=i.arrowWidth/2,o=r.pstyle(a+"-arrow-shape").value,l,u;if(o!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,Qa(f,1),kt(e,f.x1,f.y1,f.x2,f.y2)}}},ns=function(e,r,a){if(!r.cy().headless()){var n;a?n=a+"-":n="";var i=r._private,s=i.rstyle,o=r.pstyle(n+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),v=ta(s,"labelWidth",a),f=ta(s,"labelHeight",a),c=ta(s,"labelX",a),h=ta(s,"labelY",a),d=r.pstyle(n+"text-margin-x").pfValue,y=r.pstyle(n+"text-margin-y").pfValue,g=r.isEdge(),p=r.pstyle(n+"text-rotation"),m=r.pstyle("text-outline-width").pfValue,b=r.pstyle("text-border-width").pfValue,w=b/2,E=r.pstyle("text-background-padding").pfValue,C=2,x=f,S=v,k=S/2,B=x/2,D,A,P,R;if(g)D=c-k,A=c+k,P=h-B,R=h+B;else{switch(l.value){case"left":D=c-S,A=c;break;case"center":D=c-k,A=c+k;break;case"right":D=c,A=c+S;break}switch(u.value){case"top":P=h-x,R=h;break;case"center":P=h-B,R=h+B;break;case"bottom":P=h,R=h+x;break}}var L=d-Math.max(m,w)-E-C,I=d+Math.max(m,w)+E+C,M=y-Math.max(m,w)-E-C,O=y+Math.max(m,w)+E+C;D+=L,A+=I,P+=M,R+=O;var _=a||"main",H=i.labelBounds,F=H[_]=H[_]||{};F.x1=D,F.y1=P,F.x2=A,F.y2=R,F.w=A-D,F.h=R-P,F.leftPad=L,F.rightPad=I,F.topPad=M,F.botPad=O;var G=g&&p.strValue==="autorotate",U=p.pfValue!=null&&p.pfValue!==0;if(G||U){var X=G?ta(i.rstyle,"labelAngle",a):p.pfValue,Z=Math.cos(X),Q=Math.sin(X),ee=(D+A)/2,te=(P+R)/2;if(!g){switch(l.value){case"left":ee=A;break;case"right":ee=D;break}switch(u.value){case"top":te=R;break;case"bottom":te=P;break}}var K=function(Be,se){return Be=Be-ee,se=se-te,{x:Be*Z-se*Q+ee,y:Be*Q+se*Z+te}},N=K(D,P),$=K(D,R),J=K(A,P),re=K(A,R);D=Math.min(N.x,$.x,J.x,re.x),A=Math.max(N.x,$.x,J.x,re.x),P=Math.min(N.y,$.y,J.y,re.y),R=Math.max(N.y,$.y,J.y,re.y)}var le=_+"Rot",xe=H[le]=H[le]||{};xe.x1=D,xe.y1=P,xe.x2=A,xe.y2=R,xe.w=A-D,xe.h=R-P,kt(e,D,P,A,R),kt(i.labelBounds.all,D,P,A,R)}return e}},xg=function(e,r){if(!r.cy().headless()){var a=r.pstyle("outline-opacity").value,n=r.pstyle("outline-width").value;if(a>0&&n>0){var i=r.pstyle("outline-offset").value,s=r.pstyle("shape").value,o=n+i,l=(e.w+o*2)/e.w,u=(e.h+o*2)/e.h,v=0,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+o*2.4)/e.w,f=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+o*2.4)/e.w:s==="star"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.6)/e.h,f=-o/3.8):s==="triangle"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.4)/e.h,f=-o/1.4):s==="vee"&&(l=(e.w+o*4.4)/e.w,u=(e.h+o*3.8)/e.h,f=-o*.5);var c=e.h*u-e.h,h=e.w*l-e.w;if(Ja(e,[Math.ceil(c/2),Math.ceil(h/2)]),v!=0||f!==0){var d=sd(e,v,f);tv(e,d)}}}},Eg=function(e,r){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=pt(),o=e._private,l=e.isNode(),u=e.isEdge(),v,f,c,h,d,y,g=o.rstyle,p=l&&n?e.pstyle("bounds-expansion").pfValue:[0],m=function(Ie){return Ie.pstyle("display").value!=="none"},b=!n||m(e)&&(!u||m(e.source())&&m(e.target()));if(b){var w=0,E=0;n&&r.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(E=e.pstyle("overlay-padding").value));var C=0,x=0;n&&r.includeUnderlays&&(C=e.pstyle("underlay-opacity").value,C!==0&&(x=e.pstyle("underlay-padding").value));var S=Math.max(E,x),k=0,B=0;if(n&&(k=e.pstyle("width").pfValue,B=k/2),l&&r.includeNodes){var D=e.position();d=D.x,y=D.y;var A=e.outerWidth(),P=A/2,R=e.outerHeight(),L=R/2;v=d-P,f=d+P,c=y-L,h=y+L,kt(s,v,c,f,h),n&&r.includeOutlines&&xg(s,e)}else if(u&&r.includeEdges)if(n&&!i){var I=e.pstyle("curve-style").strValue;if(v=Math.min(g.srcX,g.midX,g.tgtX),f=Math.max(g.srcX,g.midX,g.tgtX),c=Math.min(g.srcY,g.midY,g.tgtY),h=Math.max(g.srcY,g.midY,g.tgtY),v-=B,f+=B,c-=B,h+=B,kt(s,v,c,f,h),I==="haystack"){var M=g.haystackPts;if(M&&M.length===2){if(v=M[0].x,c=M[0].y,f=M[1].x,h=M[1].y,v>f){var O=v;v=f,f=O}if(c>h){var _=c;c=h,h=_}kt(s,v-B,c-B,f+B,h+B)}}else if(I==="bezier"||I==="unbundled-bezier"||I.endsWith("segments")||I.endsWith("taxi")){var H;switch(I){case"bezier":case"unbundled-bezier":H=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":H=g.linePts;break}if(H!=null)for(var F=0;Ff){var ee=v;v=f,f=ee}if(c>h){var te=c;c=h,h=te}v-=B,f+=B,c-=B,h+=B,kt(s,v,c,f,h)}if(n&&r.includeEdges&&u&&(Ha(s,e,"mid-source"),Ha(s,e,"mid-target"),Ha(s,e,"source"),Ha(s,e,"target")),n){var K=e.pstyle("ghost").value==="yes";if(K){var N=e.pstyle("ghost-offset-x").pfValue,$=e.pstyle("ghost-offset-y").pfValue;kt(s,s.x1+N,s.y1+$,s.x2+N,s.y2+$)}}var J=o.bodyBounds=o.bodyBounds||{};Bo(J,s),Ja(J,p),Qa(J,1),n&&(v=s.x1,f=s.x2,c=s.y1,h=s.y2,kt(s,v-S,c-S,f+S,h+S));var re=o.overlayBounds=o.overlayBounds||{};Bo(re,s),Ja(re,p),Qa(re,1);var le=o.labelBounds=o.labelBounds||{};le.all!=null?id(le.all):le.all=pt(),n&&r.includeLabels&&(r.includeMainLabels&&ns(s,e,null),u&&(r.includeSourceLabels&&ns(s,e,"source"),r.includeTargetLabels&&ns(s,e,"target")))}return s.x1=Ct(s.x1),s.y1=Ct(s.y1),s.x2=Ct(s.x2),s.y2=Ct(s.y2),s.w=Ct(s.x2-s.x1),s.h=Ct(s.y2-s.y1),s.w>0&&s.h>0&&b&&(Ja(s,p),Qa(s,1)),s},kv=function(e){var r=0,a=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:Fg,e=arguments.length>1?arguments[1]:void 0,r=0;r=0;o--)s(o);return this};sr.removeAllListeners=function(){return this.removeListener("*")};sr.emit=sr.trigger=function(t,e,r){var a=this.listeners,n=a.length;return this.emitting++,Le(e)||(e=[e]),zg(this,function(i,s){r!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],n=a.length);for(var o=function(){var v=a[l];if(v.type===s.type&&(!v.namespace||v.namespace===s.namespace||v.namespace===Ng)&&i.eventMatches(i.context,v,s)){var f=[s];e!=null&&Ac(f,e),i.beforeEmit(i.context,v,s),v.conf&&v.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==v}));var c=i.callbackContext(i.context,v,s),h=v.callback.apply(c,f);i.afterEmit(i.context,v,s),h===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,a=e._private.data.id,n=r.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&fe(e)){var a=e;e=r.mutableElements().filter(a)}for(var n=0;n=0;r--){var a=this[r];e(a)&&this.unmergeAt(r)}return this},map:function(e,r){for(var a=[],n=this,i=0;ia&&(a=l,n=o)}return{value:a,ele:n}},min:function(e,r){for(var a=1/0,n,i=this,s=0;s=0&&i"u"?"undefined":We(Symbol))!=e&&We(Symbol.iterator)!=e;r&&(hn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return Ll({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,n.style().apply(a));var i=a._private.style[e];return i??(r?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var a=r.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=this[0];if(a)return r.style().getRenderedStyle(a,e)},style:function(e,r){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(ke(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(fe(e))if(r===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,r,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=!1,n=r.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(v[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});ot.neighbourhood=ot.neighborhood;ot.closedNeighbourhood=ot.closedNeighborhood;ot.openNeighbourhood=ot.openNeighborhood;ge(ot,{source:Tt(function(e){var r=this[0],a;return r&&(a=r._private.source||r.cy().collection()),a&&e?a.filter(e):a},"source"),target:Tt(function(e){var r=this[0],a;return r&&(a=r._private.target||r.cy().collection()),a&&e?a.filter(e):a},"target"),sources:ju({attr:"source"}),targets:ju({attr:"target"})});function ju(t){return function(r){for(var a=[],n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});ot.componentsOf=ot.components;var nt=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Ve("A collection must have a reference to the core");return}var i=new Kt,s=!1;if(!r)r=[];else if(r.length>0&&ke(r[0])&&!Ta(r[0])){s=!0;for(var o=[],l=new $r,u=0,v=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,a=r.cy(),n=a._private,i=[],s=[],o,l=0,u=r.length;l0){for(var _=o.length===r.length?r:new nt(a,o),H=0;H<_.length;H++){var F=_[H];F.isNode()||(F.parallelEdges().clearTraversalCache(),F.source().clearTraversalCache(),F.target().clearTraversalCache())}var G;n.hasCompoundNodes?G=a.collection().merge(_).merge(_.connectedNodes()).merge(_.parent()):G=_,G.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?_.emitAndNotify("add"):e&&_.emit("add")}return r};Fe.removed=function(){var t=this[0];return t&&t._private.removed};Fe.inside=function(){var t=this[0];return t&&!t._private.removed};Fe.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,a=[],n={},i=r._private.cy;function s(R){for(var L=R._private.edges,I=0;I0&&(t?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var A=0;A0?A=R:D=R;while(Math.abs(P)>s&&++L=i?m(B,L):I===0?L:w(B,D,D+u)}var C=!1;function x(){C=!0,(t!==e||r!==a)&&b()}var S=function(D){return C||x(),t===e&&r===a?D:D===0?0:D===1?1:g(E(D),e,a)};S.getControlPoints=function(){return[{x:t,y:e},{x:r,y:a}]};var k="generateBezier("+[t,e,r,a]+")";return S.toString=function(){return k},S}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var Xg=function(){function t(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:t(s)}}function r(a,n){var i={dx:a.v,dv:t(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),l=e(a,n,o),u=1/6*(i.dx+2*(s.dx+o.dx)+l.dx),v=1/6*(i.dv+2*(s.dv+o.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+v*n,a}return function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,v=1/1e4,f=16/1e3,c,h,d;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,c=s!==null,c?(u=a(n,i),h=u/s*f):h=f;d=r(d||o,h),l.push(1+d.x),u+=16,Math.abs(d.x)>v&&Math.abs(d.v)>v;);return c?function(y){return l[y*(l.length-1)|0]}:u}}(),Ne=function(e,r,a,n){var i=Yg(e,r,a,n);return function(s,o,l){return s+(o-s)*i(l)}},tn={linear:function(e,r,a){return e+(r-e)*a},ease:Ne(.25,.1,.25,1),"ease-in":Ne(.42,0,1,1),"ease-out":Ne(0,0,.58,1),"ease-in-out":Ne(.42,0,.58,1),"ease-in-sine":Ne(.47,0,.745,.715),"ease-out-sine":Ne(.39,.575,.565,1),"ease-in-out-sine":Ne(.445,.05,.55,.95),"ease-in-quad":Ne(.55,.085,.68,.53),"ease-out-quad":Ne(.25,.46,.45,.94),"ease-in-out-quad":Ne(.455,.03,.515,.955),"ease-in-cubic":Ne(.55,.055,.675,.19),"ease-out-cubic":Ne(.215,.61,.355,1),"ease-in-out-cubic":Ne(.645,.045,.355,1),"ease-in-quart":Ne(.895,.03,.685,.22),"ease-out-quart":Ne(.165,.84,.44,1),"ease-in-out-quart":Ne(.77,0,.175,1),"ease-in-quint":Ne(.755,.05,.855,.06),"ease-out-quint":Ne(.23,1,.32,1),"ease-in-out-quint":Ne(.86,0,.07,1),"ease-in-expo":Ne(.95,.05,.795,.035),"ease-out-expo":Ne(.19,1,.22,1),"ease-in-out-expo":Ne(1,0,0,1),"ease-in-circ":Ne(.6,.04,.98,.335),"ease-out-circ":Ne(.075,.82,.165,1),"ease-in-out-circ":Ne(.785,.135,.15,.86),spring:function(e,r,a){if(a===0)return tn.linear;var n=Xg(e,r,a);return function(i,s,o){return i+(s-i)*n(o)}},"cubic-bezier":Ne};function rl(t,e,r,a,n){if(a===1||e===r)return r;var i=n(e,r,a);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}function al(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function Dr(t,e,r,a,n){var i=n!=null?n.type:null;r<0?r=0:r>1&&(r=1);var s=al(t,n),o=al(e,n);if(ae(s)&&ae(o))return rl(i,s,o,r,a);if(Le(s)&&Le(o)){for(var l=[],u=0;u0?(h==="spring"&&d.push(s.duration),s.easingImpl=tn[h].apply(null,d)):s.easingImpl=tn[h]}var y=s.easingImpl,g;if(s.duration===0?g=1:g=(r-l)/s.duration,s.applying&&(g=s.progress),g<0?g=0:g>1&&(g=1),s.delay==null){var p=s.startPosition,m=s.position;if(m&&n&&!t.locked()){var b={};aa(p.x,m.x)&&(b.x=Dr(p.x,m.x,g,y)),aa(p.y,m.y)&&(b.y=Dr(p.y,m.y,g,y)),t.position(b)}var w=s.startPan,E=s.pan,C=i.pan,x=E!=null&&a;x&&(aa(w.x,E.x)&&(C.x=Dr(w.x,E.x,g,y)),aa(w.y,E.y)&&(C.y=Dr(w.y,E.y,g,y)),t.emit("pan"));var S=s.startZoom,k=s.zoom,B=k!=null&&a;B&&(aa(S,k)&&(i.zoom=pa(i.minZoom,Dr(S,k,g,y),i.maxZoom)),t.emit("zoom")),(x||B)&&t.emit("viewport");var D=s.style;if(D&&D.length>0&&n){for(var A=0;A=0;x--){var S=C[x];S()}C.splice(0,C.length)},m=h.length-1;m>=0;m--){var b=h[m],w=b._private;if(w.stopped){h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||Qg(v,b,t),Zg(v,b,t,f),w.applying&&(w.applying=!1),p(w.frames),w.step!=null&&w.step(t),b.completed()&&(h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.completes)),y=!0)}return!f&&h.length===0&&d.length===0&&a.push(v),y}for(var i=!1,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(a),e.emit("step")}var Jg={animate:Ae.animate(),animation:Ae.animation(),animated:Ae.animated(),clearQueue:Ae.clearQueue(),delay:Ae.delay(),delayAnimation:Ae.delayAnimation(),stop:Ae.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&ln(function(i){nl(i,e),r()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,s){nl(s,e)},a.beforeRenderPriorities.animations):r()}},jg={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,a){var n=r.qualifier;return n!=null?e!==a.target&&Ta(a.target)&&n.matches(a.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,a){return r.qualifier!=null?a.target:e}},Wa=function(e){return fe(e)?new nr(e):e},zv={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Rn(jg,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,a){return this.emitter().on(e,Wa(r),a),this},removeListener:function(e,r,a){return this.emitter().removeListener(e,Wa(r),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,a){return this.emitter().one(e,Wa(r),a),this},once:function(e,r,a){return this.emitter().one(e,Wa(r),a),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};Ae.eventAliasesOn(zv);var xs={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};xs.jpeg=xs.jpg;var rn={layout:function(e){var r=this;if(e==null){Ve("Layout options must be specified to make a layout");return}if(e.name==null){Ve("A `name` must be specified to make a layout");return}var a=e.name,n=r.extension("layout",a);if(n==null){Ve("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;fe(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var s=new n(ge({},e,{cy:r,eles:i}));return s}};rn.createLayout=rn.makeLayout=rn.layout;var ep={notify:function(e,r){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();r!=null&&n.merge(r);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?r.notify(a):r.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Es.invalidateDimensions=Es.resize;var an={collection:function(e,r){return fe(e)?this.$(e):bt(e)?e.collection():Le(e)?(r||(r={}),new nt(this,e,r.unique,r.removed)):new nt(this)},nodes:function(e){var r=this.$(function(a){return a.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(a){return a.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};an.elements=an.filter=an.$;var tt={},va="t",rp="f";tt.apply=function(t){for(var e=this,r=e._private,a=r.cy,n=a.collection(),i=0;i0;if(c||f&&h){var d=void 0;c&&h||c?d=u.properties:h&&(d=u.mappedProperties);for(var y=0;y1&&(w=1),o.color){var C=a.valueMin[0],x=a.valueMax[0],S=a.valueMin[1],k=a.valueMax[1],B=a.valueMin[2],D=a.valueMax[2],A=a.valueMin[3]==null?1:a.valueMin[3],P=a.valueMax[3]==null?1:a.valueMax[3],R=[Math.round(C+(x-C)*w),Math.round(S+(k-S)*w),Math.round(B+(D-B)*w),Math.round(A+(P-A)*w)];i={bypass:a.bypass,name:a.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else if(o.number){var L=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,L,a.bypass,c)}else return!1;if(!i)return y(),!1;i.mapping=a,a=i;break}case s.data:{for(var I=a.field.split("."),M=f.data,O=0;O0&&i>0){for(var o={},l=!1,u=0;u0?t.delayAnimation(s).play().promise().then(b):b()}).then(function(){return t.animation({style:o,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,n),t.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(t,n),t.emitAndNotify("style"),a.transitioning=!1)};tt.checkTrigger=function(t,e,r,a,n,i){var s=this.properties[e],o=n(s);t.removed()||o!=null&&o(r,a,t)&&i(s)};tt.checkZOrderTrigger=function(t,e,r,a){var n=this;this.checkTrigger(t,e,r,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",t)})};tt.checkBoundsTrigger=function(t,e,r,a){this.checkTrigger(t,e,r,a,function(n){return n.triggersBounds},function(n){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};tt.checkConnectedEdgesBoundsTrigger=function(t,e,r,a){this.checkTrigger(t,e,r,a,function(n){return n.triggersBoundsOfConnectedEdges},function(n){t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};tt.checkParallelEdgesBoundsTrigger=function(t,e,r,a){this.checkTrigger(t,e,r,a,function(n){return n.triggersBoundsOfParallelEdges},function(n){t.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};tt.checkTriggers=function(t,e,r,a){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,a),this.checkBoundsTrigger(t,e,r,a),this.checkConnectedEdgesBoundsTrigger(t,e,r,a),this.checkParallelEdgesBoundsTrigger(t,e,r,a)};var Ra={};Ra.applyBypass=function(t,e,r,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;on.length?a=a.substr(n.length):a=""}function l(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var u=a.match(/^\s*$/);if(u)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){Re("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new nr(f);if(c.invalid){Re("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var h=v[2],d=!1;i=h;for(var y=[];;){var g=i.match(/^\s*$/);if(g)break;var p=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Re("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}s=p[0];var m=p[1],b=p[2],w=e.properties[m];if(!w){Re("Skipping property: Invalid property name in: "+s),l();continue}var E=r.parse(m,b);if(!E){Re("Skipping property: Invalid property definition in: "+s),l();continue}y.push({name:m,val:b}),l()}if(d){o();break}r.selector(f);for(var C=0;C=7&&e[0]==="d"&&(v=new RegExp(o.data.regex).exec(e))){if(r)return!1;var c=o.data;return{name:t,value:v,strValue:""+e,mapped:c,field:v[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var h=o.mapData;if(!(u.color||u.number))return!1;var d=this.parse(t,f[4]);if(!d||d.mapped)return!1;var y=this.parse(t,f[5]);if(!y||y.mapped)return!1;if(d.pfValue===y.pfValue||d.strValue===y.strValue)return Re("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+d.strValue+"`"),this.parse(t,d.strValue);if(u.color){var g=d.value,p=y.value,m=g[0]===p[0]&&g[1]===p[1]&&g[2]===p[2]&&(g[3]===p[3]||(g[3]==null||g[3]===1)&&(p[3]==null||p[3]===1));if(m)return!1}return{name:t,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:d.value,valueMax:y.value,bypass:r}}}if(u.multiple&&a!=="multiple"){var b;if(l?b=e.split(/\s+/):Le(e)?b=e:b=[e],u.evenMultiple&&b.length%2!==0)return null;for(var w=[],E=[],C=[],x="",S=!1,k=0;k0?" ":"")+B.strValue}return u.validate&&!u.validate(w,E)?null:u.singleEnum&&S?w.length===1&&fe(w[0])?{name:t,value:w[0],strValue:w[0],bypass:r}:null:{name:t,value:w,pfValue:C,strValue:x,bypass:r,units:E}}var D=function(){for(var K=0;Ku.max||u.strictMax&&e===u.max))return null;var I={name:t,value:e,strValue:""+e+(A||""),units:A,bypass:r};return u.unitless||A!=="px"&&A!=="em"?I.pfValue=e:I.pfValue=A==="px"||!A?e:this.getEmSizeInPixels()*e,(A==="ms"||A==="s")&&(I.pfValue=A==="ms"?e:1e3*e),(A==="deg"||A==="rad")&&(I.pfValue=A==="rad"?e:td(e)),A==="%"&&(I.pfValue=e/100),I}else if(u.propList){var M=[],O=""+e;if(O!=="none"){for(var _=O.split(/\s*,\s*|\s+/),H=0;H<_.length;H++){var F=_[H].trim();n.properties[F]?M.push(F):Re("`"+F+"` is not a valid property name")}if(M.length===0)return null}return{name:t,value:M,strValue:M.length===0?"none":M.join(" "),bypass:r}}else if(u.color){var G=_l(e);return G?{name:t,value:G,pfValue:G,strValue:"rgb("+G[0]+","+G[1]+","+G[2]+")",bypass:r}:null}else if(u.regex||u.regexes){if(u.enums){var U=D();if(U)return U}for(var X=u.regexes?u.regexes:[u.regex],Z=0;Z0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((s-2*r)/a.w,(o-2*r)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=a.minZoom&&(a.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,a=r.pan,n=r.zoom,i,s,o=!1;if(r.zoomingEnabled||(o=!0),ae(e)?s=e:ke(e)&&(s=e.level,e.position!=null?i=Tn(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;ae(u.x)&&(r.pan.x=u.x,o=!1),ae(u.y)&&(r.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(fe(e)){var a=e;e=this.mutableElements().filter(a)}else bt(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(i-r*(n.x1+n.x2))/2,y:(s-r*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,a=this;return e.sizeCache=e.sizeCache||(r?function(){var n=a.window().getComputedStyle(r),i=function(o){return parseFloat(n.getPropertyValue(o))};return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/r,x2:(a.x2-e.x)/r,y1:(a.y1-e.y)/r,y2:(a.y2-e.y)/r};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};wr.centre=wr.center;wr.autolockNodes=wr.autolock;wr.autoungrabifyNodes=wr.autoungrabify;var wa={data:Ae.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ae.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ae.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ae.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};wa.attr=wa.data;wa.removeAttr=wa.removeData;var xa=function(e){var r=this;e=ge({},e);var a=e.container;a&&!un(a)&&un(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=r;var s=Ke!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=ge({name:s?"grid":"null"},o.layout),o.renderer=ge({name:s?"canvas":"null"},o.renderer);var l=function(d,y,g){return y!==void 0?y:g!==void 0?g:d},u=this._private={container:a,ready:!1,options:o,elements:new nt(this),listeners:[],aniEles:new nt(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:ae(o.zoom)?o.zoom:1,pan:{x:ke(o.pan)&&ae(o.pan.x)?o.pan.x:0,y:ke(o.pan)&&ae(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var v=function(d,y){var g=d.some(Jf);if(g)return Wr.all(d).then(y);y(d)};u.styleEnabled&&r.setStyle([]);var f=ge({},o,o.renderer);r.initRenderer(f);var c=function(d,y,g){r.notifications(!1);var p=r.mutableElements();p.length>0&&p.remove(),d!=null&&(ke(d)||Le(d))&&r.add(d),r.one("layoutready",function(b){r.notifications(!0),r.emit(b),r.one("load",y),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",g),r.emit("done")});var m=ge({},r._private.options.layout);m.eles=r.elements(),r.layout(m).run()};v([o.style,o.elements],function(h){var d=h[0],y=h[1];u.styleEnabled&&r.style().append(d),c(y,function(){r.startAnimationLoop(),u.ready=!0,_e(o.ready)&&r.on("ready",o.ready);for(var g=0;g0,o=!!t.boundingBox,l=e.extent(),u=pt(o?t.boundingBox:{x1:l.x1,y1:l.y1,w:l.w,h:l.h}),v;if(bt(t.roots))v=t.roots;else if(Le(t.roots)){for(var f=[],c=0;c0;){var L=R(),I=B(L,A);if(I)L.outgoers().filter(function(se){return se.isNode()&&r.has(se)}).forEach(P);else if(I===null){Re("Detected double maximal shift for node `"+L.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var M=0;if(t.avoidOverlap)for(var O=0;O0&&m[0].length<=3?me/2:0),Se=2*Math.PI/m[ye].length*he;return ye===0&&m[0].length===1&&(Ce=1),{x:re.x+Ce*Math.cos(Se),y:re.y+Ce*Math.sin(Se)}}else{var j=m[ye].length,T=Math.max(j===1?0:o?(u.w-t.padding*2-le.w)/((t.grid?Ie:j)-1):(u.w-t.padding*2-le.w)/((t.grid?Ie:j)+1),M),q={x:re.x+(he+1-(j+1)/2)*T,y:re.y+(ye+1-(Q+1)/2)*xe};return q}};return r.nodes().layoutPositions(this,t,Be),this};var op={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function Vv(t){this.options=ge({},op,t)}Vv.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var p=Math.cos(u)-Math.cos(0),m=Math.sin(u)-Math.sin(0),b=Math.sqrt(f*f/(p*p+m*m));v=Math.max(b,v)}var w=function(C,x){var S=e.startAngle+x*u*(n?1:-1),k=v*Math.cos(S),B=v*Math.sin(S),D={x:o.x+k,y:o.y+B};return D};return a.nodes().layoutPositions(this,e,w),this};var up={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function _v(t){this.options=ge({},up,t)}_v.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=t.cy,n=e.eles,i=n.nodes().not(":parent"),s=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,v=0;v0){var E=Math.abs(m[0].value-w.value);E>=g&&(m=[],p.push(m))}m.push(w)}var C=u+e.minNodeSpacing;if(!e.avoidOverlap){var x=p.length>0&&p[0].length>1,S=Math.min(s.w,s.h)/2-C,k=S/(p.length+x?1:0);C=Math.min(C,k)}for(var B=0,D=0;D1&&e.avoidOverlap){var L=Math.cos(R)-Math.cos(0),I=Math.sin(R)-Math.sin(0),M=Math.sqrt(C*C/(L*L+I*I));B=Math.max(M,B)}A.r=B,B+=C}if(e.equidistant){for(var O=0,_=0,H=0;H=t.numIter||(gp(a,t),a.temperature=a.temperature*t.coolingFactor,a.temperature=t.animationThreshold&&i(),ln(v)}};v()}else{for(;u;)u=s(l),l++;ol(a,t),o()}return this};Nn.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Nn.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var vp=function(e,r,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=pt(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=a.eles.components(),u={},v=0;v0){o.graphSet.push(S);for(var v=0;vn.count?0:n.graph},Gv=function(e,r,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(o*o+l*l),h=f*o/c,d=f*l/c;else var y=pn(e,o,l),g=pn(r,-1*o,-1*l),p=g.x-y.x,m=g.y-y.y,b=p*p+m*m,c=Math.sqrt(b),f=(e.nodeRepulsion+r.nodeRepulsion)/b,h=f*p/c,d=f*m/c;e.isLocked||(e.offsetX-=h,e.offsetY-=d),r.isLocked||(r.offsetX+=h,r.offsetY+=d)}},mp=function(e,r,a,n){if(a>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(n>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},pn=function(e,r,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=a/r,u=s/o,v={};return r===0&&0a?(v.x=n,v.y=i+s/2,v):0r&&-1*u<=l&&l<=u?(v.x=n-o/2,v.y=i-o*a/2/r,v):0=u)?(v.x=n+s*r/2/a,v.y=i+s/2,v):(0>a&&(l<=-1*u||l>=u)&&(v.x=n-s*r/2/a,v.y=i-s/2),v)},bp=function(e,r){for(var a=0;aa){var g=r.gravity*h/y,p=r.gravity*d/y;c.offsetX+=g,c.offsetY+=p}}}}},xp=function(e,r){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0a)var i={x:a*e/n,y:a*r/n};else var i={x:e,y:r};return i},Kv=function(e,r){var a=e.parentId;if(a!=null){var n=r.layoutNodes[r.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopp&&(d+=g+r.componentSpacing,h=0,y=0,g=0)}}},Tp={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function $v(t){this.options=ge({},Tp,t)}$v.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(U){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),v=function(X){if(X==null)return Math.min(l,u);var Z=Math.min(l,u);Z==l?l=X:u=X},f=function(X){if(X==null)return Math.max(l,u);var Z=Math.max(l,u);Z==l?l=X:u=X},c=e.rows,h=e.cols!=null?e.cols:e.columns;if(c!=null&&h!=null)l=c,u=h;else if(c!=null&&h==null)l=c,u=Math.ceil(s/l);else if(c==null&&h!=null)u=h,l=Math.ceil(s/u);else if(u*l>s){var d=v(),y=f();(d-1)*y>=s?v(d-1):(y-1)*d>=s&&f(y-1)}else for(;u*l=s?f(p+1):v(g+1)}var m=i.w/u,b=i.h/l;if(e.condense&&(m=0,b=0),e.avoidOverlap)for(var w=0;w=u&&(L=0,R++)},M={},O=0;O(L=hd(t,e,I[M],I[M+1],I[M+2],I[M+3])))return g(x,L),!0}else if(k.edgeType==="bezier"||k.edgeType==="multibezier"||k.edgeType==="self"||k.edgeType==="compound"){for(var I=k.allpts,M=0;M+5(L=dd(t,e,I[M],I[M+1],I[M+2],I[M+3],I[M+4],I[M+5])))return g(x,L),!0}for(var O=O||S.source,_=_||S.target,H=n.getArrowWidth(B,D),F=[{name:"source",x:k.arrowStartX,y:k.arrowStartY,angle:k.srcArrowAngle},{name:"target",x:k.arrowEndX,y:k.arrowEndY,angle:k.tgtArrowAngle},{name:"mid-source",x:k.midX,y:k.midY,angle:k.midsrcArrowAngle},{name:"mid-target",x:k.midX,y:k.midY,angle:k.midtgtArrowAngle}],M=0;M0&&(p(O),p(_))}function b(x,S,k){return Et(x,S,k)}function w(x,S){var k=x._private,B=c,D;S?D=S+"-":D="",x.boundingBox();var A=k.labelBounds[S||"main"],P=x.pstyle(D+"label").value,R=x.pstyle("text-events").strValue==="yes";if(!(!R||!P)){var L=b(k.rscratch,"labelX",S),I=b(k.rscratch,"labelY",S),M=b(k.rscratch,"labelAngle",S),O=x.pstyle(D+"text-margin-x").pfValue,_=x.pstyle(D+"text-margin-y").pfValue,H=A.x1-B-O,F=A.x2+B-O,G=A.y1-B-_,U=A.y2+B-_;if(M){var X=Math.cos(M),Z=Math.sin(M),Q=function(re,le){return re=re-L,le=le-I,{x:re*X-le*Z+L,y:re*Z+le*X+I}},ee=Q(H,G),te=Q(H,U),K=Q(F,G),N=Q(F,U),$=[ee.x+O,ee.y+_,K.x+O,K.y+_,N.x+O,N.y+_,te.x+O,te.y+_];if(gt(t,e,$))return g(x),!0}else if(_r(A,t,e))return g(x),!0}}for(var E=s.length-1;E>=0;E--){var C=s[E];C.isNode()?p(C)||w(C):m(C)||w(C)||w(C,"source")||w(C,"target")}return o};Er.getAllInBox=function(t,e,r,a){var n=this.getCachedZSortedEles().interactive,i=[],s=Math.min(t,r),o=Math.max(t,r),l=Math.min(e,a),u=Math.max(e,a);t=s,r=o,e=l,a=u;for(var v=pt({x1:t,y1:e,x2:r,y2:a}),f=0;f0?-(Math.PI-e.ang):Math.PI+e.ang},Ap=function(e,r,a,n,i){if(e!==cl?dl(r,e,Ot):Bp(xt,Ot),dl(r,a,xt),vl=Ot.nx*xt.ny-Ot.ny*xt.nx,fl=Ot.nx*xt.nx-Ot.ny*-xt.ny,Gt=Math.asin(Math.max(-1,Math.min(1,vl))),Math.abs(Gt)<1e-6){Cs=r.x,Ts=r.y,hr=Pr=0;return}gr=1,nn=!1,fl<0?Gt<0?Gt=Math.PI+Gt:(Gt=Math.PI-Gt,gr=-1,nn=!0):Gt>0&&(gr=-1,nn=!0),r.radius!==void 0?Pr=r.radius:Pr=n,fr=Gt/2,Ua=Math.min(Ot.len/2,xt.len/2),i?(It=Math.abs(Math.cos(fr)*Pr/Math.sin(fr)),It>Ua?(It=Ua,hr=Math.abs(It*Math.sin(fr)/Math.cos(fr))):hr=Pr):(It=Math.min(Ua,Pr),hr=Math.abs(It*Math.sin(fr)/Math.cos(fr))),Ss=r.x+xt.nx*It,Ds=r.y+xt.ny*It,Cs=Ss-xt.ny*hr*gr,Ts=Ds+xt.nx*hr*gr,Xv=r.x+Ot.nx*It,Zv=r.y+Ot.ny*It,cl=r};function Qv(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Qs(t,e,r,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Ap(t,e,r,a,n),{cx:Cs,cy:Ts,radius:hr,startX:Xv,startY:Zv,stopX:Ss,stopY:Ds,startAngle:Ot.ang+Math.PI/2*gr,endAngle:xt.ang-Math.PI/2*gr,counterClockwise:nn})}var Ea=.01,Rp=Math.sqrt(2*Ea),lt={};lt.findMidptPtsEtc=function(t,e){var r=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(E,C,x,S){var k=S-C,B=x-E,D=Math.sqrt(B*B+k*k);return{x:-k/D,y:B/D}},v=t.pstyle("edge-distances").value;switch(v){case"node-position":i=r;break;case"intersection":i=a;break;case"endpoints":{if(l){var f=this.manualEndptToPx(t.source()[0],s),c=je(f,2),h=c[0],d=c[1],y=this.manualEndptToPx(t.target()[0],o),g=je(y,2),p=g[0],m=g[1],b={x1:h,y1:d,x2:p,y2:m};n=u(h,d,p,m),i=b}else Re("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};lt.findHaystackPoints=function(t){for(var e=0;e0?Math.max(Y-ie,0):Math.min(Y+ie,0)},P=A(B,S),R=A(D,k),L=!1;m===u?p=Math.abs(P)>Math.abs(R)?n:a:m===l||m===o?(p=a,L=!0):(m===i||m===s)&&(p=n,L=!0);var I=p===a,M=I?R:P,O=I?D:B,_=ev(O),H=!1;!(L&&(w||C))&&(m===o&&O<0||m===l&&O>0||m===i&&O>0||m===s&&O<0)&&(_*=-1,M=_*Math.abs(M),H=!0);var F;if(w){var G=E<0?1+E:E;F=G*M}else{var U=E<0?M:0;F=U+E*_}var X=function(Y){return Math.abs(Y)=Math.abs(M)},Z=X(F),Q=X(Math.abs(M)-Math.abs(F)),ee=Z||Q;if(ee&&!H)if(I){var te=Math.abs(O)<=c/2,K=Math.abs(B)<=h/2;if(te){var N=(v.x1+v.x2)/2,$=v.y1,J=v.y2;r.segpts=[N,$,N,J]}else if(K){var re=(v.y1+v.y2)/2,le=v.x1,xe=v.x2;r.segpts=[le,re,xe,re]}else r.segpts=[v.x1,v.y2]}else{var Ie=Math.abs(O)<=f/2,Be=Math.abs(D)<=d/2;if(Ie){var se=(v.y1+v.y2)/2,ue=v.x1,de=v.x2;r.segpts=[ue,se,de,se]}else if(Be){var ye=(v.x1+v.x2)/2,he=v.y1,me=v.y2;r.segpts=[ye,he,ye,me]}else r.segpts=[v.x2,v.y1]}else if(I){var Ce=v.y1+F+(g?c/2*_:0),Se=v.x1,j=v.x2;r.segpts=[Se,Ce,j,Ce]}else{var T=v.x1+F+(g?f/2*_:0),q=v.y1,W=v.y2;r.segpts=[T,q,T,W]}if(r.isRound){var z=t.pstyle("taxi-radius").value,V=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(z),r.isArcRadius=new Array(r.segpts.length/2).fill(V)}};lt.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,h=e.srcRs,d=e.tgtRs,y=!ae(r.startX)||!ae(r.startY),g=!ae(r.arrowStartX)||!ae(r.arrowStartY),p=!ae(r.endX)||!ae(r.endY),m=!ae(r.arrowEndX)||!ae(r.arrowEndY),b=3,w=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,E=b*w,C=yr({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),x=CO.poolIndex()){var _=M;M=O,O=_}var H=P.srcPos=M.position(),F=P.tgtPos=O.position(),G=P.srcW=M.outerWidth(),U=P.srcH=M.outerHeight(),X=P.tgtW=O.outerWidth(),Z=P.tgtH=O.outerHeight(),Q=P.srcShape=r.nodeShapes[e.getNodeShape(M)],ee=P.tgtShape=r.nodeShapes[e.getNodeShape(O)],te=P.srcCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,K=P.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,N=P.tgtRs=O._private.rscratch,$=P.srcRs=M._private.rscratch;P.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var J=0;J=Rp||(j=Math.sqrt(Math.max(Se*Se,Ea)+Math.max(Ce*Ce,Ea)));var T=P.vector={x:Se,y:Ce},q=P.vectorNorm={x:T.x/j,y:T.y/j},W={x:-q.y,y:q.x};P.nodesOverlap=!ae(j)||ee.checkPoint(se[0],se[1],0,X,Z,F.x,F.y,K,N)||Q.checkPoint(de[0],de[1],0,G,U,H.x,H.y,te,$),P.vectorNormInverse=W,R={nodesOverlap:P.nodesOverlap,dirCounts:P.dirCounts,calculatedIntersection:!0,hasBezier:P.hasBezier,hasUnbundled:P.hasUnbundled,eles:P.eles,srcPos:F,srcRs:N,tgtPos:H,tgtRs:$,srcW:X,srcH:Z,tgtW:G,tgtH:U,srcIntn:ye,tgtIntn:ue,srcShape:ee,tgtShape:Q,posPts:{x1:me.x2,y1:me.y2,x2:me.x1,y2:me.y1},intersectionPts:{x1:he.x2,y1:he.y2,x2:he.x1,y2:he.y1},vector:{x:-T.x,y:-T.y},vectorNorm:{x:-q.x,y:-q.y},vectorNormInverse:{x:-W.x,y:-W.y}}}var z=Be?R:P;le.nodesOverlap=z.nodesOverlap,le.srcIntn=z.srcIntn,le.tgtIntn=z.tgtIntn,le.isRound=xe.startsWith("round"),n&&(M.isParent()||M.isChild()||O.isParent()||O.isChild())&&(M.parents().anySame(O)||O.parents().anySame(M)||M.same(O)&&M.isParent())?e.findCompoundLoopPoints(re,z,J,Ie):M===O?e.findLoopPoints(re,z,J,Ie):xe.endsWith("segments")?e.findSegmentsPoints(re,z):xe.endsWith("taxi")?e.findTaxiPoints(re,z):xe==="straight"||!Ie&&P.eles.length%2===1&&J===Math.floor(P.eles.length/2)?e.findStraightEdgePoints(re):e.findBezierPoints(re,z,J,Ie,Be),e.findEndpoints(re),e.tryToCorrectInvalidPoints(re,z),e.checkForInvalidEdgeWarning(re),e.storeAllpts(re),e.storeEdgeProjections(re),e.calculateArrowAngles(re),e.recalculateEdgeLabelProjections(re),e.calculateLabelAngles(re)}},x=0;x0){var J=i,re=cr(J,Lr(r)),le=cr(J,Lr($)),xe=re;if(le2){var Ie=cr(J,{x:$[2],y:$[3]});Ie0){var W=s,z=cr(W,Lr(r)),V=cr(W,Lr(q)),ne=z;if(V2){var Y=cr(W,{x:q[2],y:q[3]});Y=d||x){g={cp:w,segment:C};break}}if(g)break}var S=g.cp,k=g.segment,B=(d-p)/k.length,D=k.t1-k.t0,A=h?k.t0+D*B:k.t1-D*B;A=pa(0,A,1),e=Nr(S.p0,S.p1,S.p2,A),c=Lp(S.p0,S.p1,S.p2,A);break}case"straight":case"segments":case"haystack":{for(var P=0,R,L,I,M,O=a.allpts.length,_=0;_+3=d));_+=2);var H=d-L,F=H/R;F=pa(0,F,1),e=ad(I,M,F),c=ef(I,M);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,c)}};u("source"),u("target"),this.applyLabelDimensions(t)}};zt.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};zt.applyPrefixedLabelDimensions=function(t,e){var r=t._private,a=this.getLabelText(t,e),n=rr(a,t._private.labelDimsKey);if(Et(r.rscratch,"prefixedLabelDimsKey",e)!==n){Ht(r.rscratch,"prefixedLabelDimsKey",e,n);var i=this.calculateLabelDimensions(t,a),s=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,l=Et(r.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),v=i.height/u,f=v*s,c=i.width,h=i.height+(u-1)*(s-1)*v;Ht(r.rstyle,"labelWidth",e,c),Ht(r.rscratch,"labelWidth",e,c),Ht(r.rstyle,"labelHeight",e,h),Ht(r.rscratch,"labelHeight",e,h),Ht(r.rscratch,"labelLineHeight",e,f)}};zt.getLabelText=function(t,e){var r=t._private,a=e?e+"-":"",n=t.pstyle(a+"label").strValue,i=t.pstyle("text-transform").value,s=function(U,X){return X?(Ht(r.rscratch,U,e,X),X):Et(r.rscratch,U,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="​",v=n.split(` -`),f=t.pstyle("text-max-width").pfValue,c=t.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,g=0;gf){var E=p.matchAll(y),C="",x=0,S=Pt(E),k;try{for(S.s();!(k=S.n()).done;){var B=k.value,D=B[0],A=p.substring(x,B.index);x=B.index+D.length;var P=C.length===0?A:C+A+D,R=this.calculateLabelDimensions(t,P),L=R.width;L<=f?C+=A+D:(C&&d.push(C),C=A+D)}}catch(G){S.e(G)}finally{S.f()}C.match(/^[\s\u200b]+$/)||d.push(C)}else d.push(p)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(` -`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var I=t.pstyle("text-max-width").pfValue,M="",O="…",_=!1;if(this.calculateLabelDimensions(t,n).widthI)break;M+=n[H],H===n.length-1&&(_=!0)}return _||(M+=O),M}return n};zt.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};zt.calculateLabelDimensions=function(t,e){var r=this,a=r.cy.window(),n=a.document,i=0,s=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue,l=t.pstyle("font-family").strValue,u=t.pstyle("font-weight").strValue,v=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=v.getContext("2d");var c=v.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}f.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var h=0,d=0,y=e.split(` -`),g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=t.desktopTapThreshold2}var vt=i(T);qe&&(t.hoverData.tapholdCancelled=!0);var ft=function(){var Lt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Lt.length===0?(Lt.push(pe[0]),Lt.push(pe[1])):(Lt[0]+=pe[0],Lt[1]+=pe[1])};W=!0,n(ve,["mousemove","vmousemove","tapdrag"],T,{x:Y[0],y:Y[1]});var Rt=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||z.emit({originalEvent:T,type:"boxstart",position:{x:Y[0],y:Y[1]}}),Ee[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(qe){var wt={originalEvent:T,type:"cxtdrag",position:{x:Y[0],y:Y[1]}};we?we.emit(wt):z.emit(wt),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ve!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:Y[0],y:Y[1]}}),t.hoverData.cxtOver=ve,ve&&ve.emit({originalEvent:T,type:"cxtdragover",position:{x:Y[0],y:Y[1]}}))}}else if(t.hoverData.dragging){if(W=!0,z.panningEnabled()&&z.userPanningEnabled()){var Mt;if(t.hoverData.justStartedPan){var Vt=t.hoverData.mdownPos;Mt={x:(Y[0]-Vt[0])*V,y:(Y[1]-Vt[1])*V},t.hoverData.justStartedPan=!1}else Mt={x:pe[0]*V,y:pe[1]*V};z.panBy(Mt),z.emit("dragpan"),t.hoverData.dragged=!0}Y=t.projectIntoViewport(T.clientX,T.clientY)}else if(Ee[4]==1&&(we==null||we.pannable())){if(qe){if(!t.hoverData.dragging&&z.boxSelectionEnabled()&&(vt||!z.panningEnabled()||!z.userPanningEnabled()))Rt();else if(!t.hoverData.selecting&&z.panningEnabled()&&z.userPanningEnabled()){var _t=s(we,t.hoverData.downs);_t&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Ee[4]=0,t.data.bgActivePosistion=Lr(ie),t.redrawHint("select",!0),t.redraw())}we&&we.pannable()&&we.active()&&we.unactivate()}}else{if(we&&we.pannable()&&we.active()&&we.unactivate(),(!we||!we.grabbed())&&ve!=be&&(be&&n(be,["mouseout","tapdragout"],T,{x:Y[0],y:Y[1]}),ve&&n(ve,["mouseover","tapdragover"],T,{x:Y[0],y:Y[1]}),t.hoverData.last=ve),we)if(qe){if(z.boxSelectionEnabled()&&vt)we&&we.grabbed()&&(p(Oe),we.emit("freeon"),Oe.emit("free"),t.dragData.didDrag&&(we.emit("dragfreeon"),Oe.emit("dragfree"))),Rt();else if(we&&we.grabbed()&&t.nodeIsDraggable(we)){var st=!t.dragData.didDrag;st&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||y(Oe,{inDragLayer:!0});var Qe={x:0,y:0};if(ae(pe[0])&&ae(pe[1])&&(Qe.x+=pe[0],Qe.y+=pe[1],st)){var ht=t.hoverData.dragDelta;ht&&ae(ht[0])&&ae(ht[1])&&(Qe.x+=ht[0],Qe.y+=ht[1])}t.hoverData.draggingEles=!0,Oe.silentShift(Qe).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else ft();W=!0}if(Ee[2]=Y[0],Ee[3]=Y[1],W)return T.stopPropagation&&T.stopPropagation(),T.preventDefault&&T.preventDefault(),!1}},!1);var A,P,R;t.registerBinding(e,"mouseup",function(T){if(!(t.hoverData.which===1&&T.which!==1&&t.hoverData.capture)){var q=t.hoverData.capture;if(q){t.hoverData.capture=!1;var W=t.cy,z=t.projectIntoViewport(T.clientX,T.clientY),V=t.selection,ne=t.findNearestElement(z[0],z[1],!0,!1),Y=t.dragData.possibleDragElements,ie=t.hoverData.down,ce=i(T);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,ie&&ie.unactivate(),t.hoverData.which===3){var Ee={originalEvent:T,type:"cxttapend",position:{x:z[0],y:z[1]}};if(ie?ie.emit(Ee):W.emit(Ee),!t.hoverData.cxtDragged){var ve={originalEvent:T,type:"cxttap",position:{x:z[0],y:z[1]}};ie?ie.emit(ve):W.emit(ve)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(n(ne,["mouseup","tapend","vmouseup"],T,{x:z[0],y:z[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(n(ie,["click","tap","vclick"],T,{x:z[0],y:z[1]}),P=!1,T.timeStamp-R<=W.multiClickDebounceTime()?(A&&clearTimeout(A),P=!0,R=null,n(ie,["dblclick","dbltap","vdblclick"],T,{x:z[0],y:z[1]})):(A=setTimeout(function(){P||n(ie,["oneclick","onetap","voneclick"],T,{x:z[0],y:z[1]})},W.multiClickDebounceTime()),R=T.timeStamp)),ie==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!i(T)&&(W.$(r).unselect(["tapunselect"]),Y.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=Y=W.collection()),ne==ie&&!t.dragData.didDrag&&!t.hoverData.selecting&&ne!=null&&ne._private.selectable&&(t.hoverData.dragging||(W.selectionType()==="additive"||ce?ne.selected()?ne.unselect(["tapunselect"]):ne.select(["tapselect"]):ce||(W.$(r).unmerge(ne).unselect(["tapunselect"]),ne.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var be=W.collection(t.getAllInBox(V[0],V[1],V[2],V[3]));t.redrawHint("select",!0),be.length>0&&t.redrawHint("eles",!0),W.emit({type:"boxend",originalEvent:T,position:{x:z[0],y:z[1]}});var we=function(qe){return qe.selectable()&&!qe.selected()};W.selectionType()==="additive"||ce||W.$(r).unmerge(be).unselect(),be.emit("box").stdFilter(we).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!V[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var pe=ie&&ie.grabbed();p(Y),pe&&(ie.emit("freeon"),Y.emit("free"),t.dragData.didDrag&&(ie.emit("dragfreeon"),Y.emit("dragfree")))}}V[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var L=function(T){if(!t.scrollingPage){var q=t.cy,W=q.zoom(),z=q.pan(),V=t.projectIntoViewport(T.clientX,T.clientY),ne=[V[0]*W+z.x,V[1]*W+z.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||k()){T.preventDefault();return}if(q.panningEnabled()&&q.userPanningEnabled()&&q.zoomingEnabled()&&q.userZoomingEnabled()){T.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var Y;T.deltaY!=null?Y=T.deltaY/-250:T.wheelDeltaY!=null?Y=T.wheelDeltaY/1e3:Y=T.wheelDelta/1e3,Y=Y*t.wheelSensitivity;var ie=T.deltaMode===1;ie&&(Y*=33);var ce=q.zoom()*Math.pow(10,Y);T.type==="gesturechange"&&(ce=t.gestureStartZoom*T.scale),q.zoom({level:ce,renderedPosition:{x:ne[0],y:ne[1]}}),q.emit(T.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",L,!0),t.registerBinding(e,"scroll",function(T){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(T){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||T.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(j){t.hasTouchStarted||L(j)},!0),t.registerBinding(t.container,"mouseout",function(T){var q=t.projectIntoViewport(T.clientX,T.clientY);t.cy.emit({originalEvent:T,type:"mouseout",position:{x:q[0],y:q[1]}})},!1),t.registerBinding(t.container,"mouseover",function(T){var q=t.projectIntoViewport(T.clientX,T.clientY);t.cy.emit({originalEvent:T,type:"mouseover",position:{x:q[0],y:q[1]}})},!1);var I,M,O,_,H,F,G,U,X,Z,Q,ee,te,K=function(T,q,W,z){return Math.sqrt((W-T)*(W-T)+(z-q)*(z-q))},N=function(T,q,W,z){return(W-T)*(W-T)+(z-q)*(z-q)},$;t.registerBinding(t.container,"touchstart",$=function(T){if(t.hasTouchStarted=!0,!!B(T)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var q=t.cy,W=t.touchData.now,z=t.touchData.earlier;if(T.touches[0]){var V=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);W[0]=V[0],W[1]=V[1]}if(T.touches[1]){var V=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);W[2]=V[0],W[3]=V[1]}if(T.touches[2]){var V=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);W[4]=V[0],W[5]=V[1]}if(T.touches[1]){t.touchData.singleTouchMoved=!0,p(t.dragData.touchDragEles);var ne=t.findContainerClientCoords();X=ne[0],Z=ne[1],Q=ne[2],ee=ne[3],I=T.touches[0].clientX-X,M=T.touches[0].clientY-Z,O=T.touches[1].clientX-X,_=T.touches[1].clientY-Z,te=0<=I&&I<=Q&&0<=O&&O<=Q&&0<=M&&M<=ee&&0<=_&&_<=ee;var Y=q.pan(),ie=q.zoom();H=K(I,M,O,_),F=N(I,M,O,_),G=[(I+O)/2,(M+_)/2],U=[(G[0]-Y.x)/ie,(G[1]-Y.y)/ie];var ce=200,Ee=ce*ce;if(F=1){for(var mt=t.touchData.startPosition=[null,null,null,null,null,null],He=0;He=t.touchTapThreshold2}if(q&&t.touchData.cxt){T.preventDefault();var mt=T.touches[0].clientX-X,He=T.touches[0].clientY-Z,Xe=T.touches[1].clientX-X,Ze=T.touches[1].clientY-Z,vt=N(mt,He,Xe,Ze),ft=vt/F,Rt=150,wt=Rt*Rt,Mt=1.5,Vt=Mt*Mt;if(ft>=Vt||vt>=wt){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var _t={originalEvent:T,type:"cxttapend",position:{x:V[0],y:V[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(_t),t.touchData.start=null):z.emit(_t)}}if(q&&t.touchData.cxt){var _t={originalEvent:T,type:"cxtdrag",position:{x:V[0],y:V[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(_t):z.emit(_t),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var st=t.findNearestElement(V[0],V[1],!0,!0);(!t.touchData.cxtOver||st!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:V[0],y:V[1]}}),t.touchData.cxtOver=st,st&&st.emit({originalEvent:T,type:"cxtdragover",position:{x:V[0],y:V[1]}}))}else if(q&&T.touches[2]&&z.boxSelectionEnabled())T.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||z.emit({originalEvent:T,type:"boxstart",position:{x:V[0],y:V[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,W[4]=1,!W||W.length===0||W[0]===void 0?(W[0]=(V[0]+V[2]+V[4])/3,W[1]=(V[1]+V[3]+V[5])/3,W[2]=(V[0]+V[2]+V[4])/3+1,W[3]=(V[1]+V[3]+V[5])/3+1):(W[2]=(V[0]+V[2]+V[4])/3,W[3]=(V[1]+V[3]+V[5])/3),t.redrawHint("select",!0),t.redraw();else if(q&&T.touches[1]&&!t.touchData.didSelect&&z.zoomingEnabled()&&z.panningEnabled()&&z.userZoomingEnabled()&&z.userPanningEnabled()){T.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Qe=t.dragData.touchDragEles;if(Qe){t.redrawHint("drag",!0);for(var ht=0;ht0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var re;t.registerBinding(e,"touchcancel",re=function(T){var q=t.touchData.start;t.touchData.capture=!1,q&&q.unactivate()});var le,xe,Ie,Be;if(t.registerBinding(e,"touchend",le=function(T){var q=t.touchData.start,W=t.touchData.capture;if(W)T.touches.length===0&&(t.touchData.capture=!1),T.preventDefault();else return;var z=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var V=t.cy,ne=V.zoom(),Y=t.touchData.now,ie=t.touchData.earlier;if(T.touches[0]){var ce=t.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);Y[0]=ce[0],Y[1]=ce[1]}if(T.touches[1]){var ce=t.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);Y[2]=ce[0],Y[3]=ce[1]}if(T.touches[2]){var ce=t.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);Y[4]=ce[0],Y[5]=ce[1]}q&&q.unactivate();var Ee;if(t.touchData.cxt){if(Ee={originalEvent:T,type:"cxttapend",position:{x:Y[0],y:Y[1]}},q?q.emit(Ee):V.emit(Ee),!t.touchData.cxtDragged){var ve={originalEvent:T,type:"cxttap",position:{x:Y[0],y:Y[1]}};q?q.emit(ve):V.emit(ve)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!T.touches[2]&&V.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var be=V.collection(t.getAllInBox(z[0],z[1],z[2],z[3]));z[0]=void 0,z[1]=void 0,z[2]=void 0,z[3]=void 0,z[4]=0,t.redrawHint("select",!0),V.emit({type:"boxend",originalEvent:T,position:{x:Y[0],y:Y[1]}});var we=function(wt){return wt.selectable()&&!wt.selected()};be.emit("box").stdFilter(we).select().emit("boxselect"),be.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(q!=null&&q.unactivate(),T.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!T.touches[1]){if(!T.touches[0]){if(!T.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var pe=t.dragData.touchDragEles;if(q!=null){var Oe=q._private.grabbed;p(pe),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Oe&&(q.emit("freeon"),pe.emit("free"),t.dragData.didDrag&&(q.emit("dragfreeon"),pe.emit("dragfree"))),n(q,["touchend","tapend","vmouseup","tapdragout"],T,{x:Y[0],y:Y[1]}),q.unactivate(),t.touchData.start=null}else{var qe=t.findNearestElement(Y[0],Y[1],!0,!0);n(qe,["touchend","tapend","vmouseup","tapdragout"],T,{x:Y[0],y:Y[1]})}var yt=t.touchData.startPosition[0]-Y[0],mt=yt*yt,He=t.touchData.startPosition[1]-Y[1],Xe=He*He,Ze=mt+Xe,vt=Ze*ne*ne;t.touchData.singleTouchMoved||(q||V.$(":selected").unselect(["tapunselect"]),n(q,["tap","vclick"],T,{x:Y[0],y:Y[1]}),xe=!1,T.timeStamp-Be<=V.multiClickDebounceTime()?(Ie&&clearTimeout(Ie),xe=!0,Be=null,n(q,["dbltap","vdblclick"],T,{x:Y[0],y:Y[1]})):(Ie=setTimeout(function(){xe||n(q,["onetap","voneclick"],T,{x:Y[0],y:Y[1]})},V.multiClickDebounceTime()),Be=T.timeStamp)),q!=null&&!t.dragData.didDrag&&q._private.selectable&&vt"u"){var se=[],ue=function(T){return{clientX:T.clientX,clientY:T.clientY,force:1,identifier:T.pointerId,pageX:T.pageX,pageY:T.pageY,radiusX:T.width/2,radiusY:T.height/2,screenX:T.screenX,screenY:T.screenY,target:T.target}},de=function(T){return{event:T,touch:ue(T)}},ye=function(T){se.push(de(T))},he=function(T){for(var q=0;q0)return G[0]}return null},d=Object.keys(c),y=0;y0?h:av(i,s,e,r,a,n,o,l)},checkPoint:function(e,r,a,n,i,s,o,l){l=l==="auto"?mr(n,i):l;var u=2*l;if(Wt(e,r,this.points,s,o,n,i-u,[0,-1],a)||Wt(e,r,this.points,s,o,n-u,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[s-v,o-f,s-v,o,s+v,o,s+v,o-f];return!!(gt(e,r,c)||pr(e,r,u,u,s+n/2-l,o+i/2-l,a)||pr(e,r,u,u,s-n/2+l,o+i/2-l,a))}}};Ut.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",ct(3,0)),this.generateRoundPolygon("round-triangle",ct(3,0)),this.generatePolygon("rectangle",ct(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",ct(5,0)),this.generateRoundPolygon("round-pentagon",ct(5,0)),this.generatePolygon("hexagon",ct(6,0)),this.generateRoundPolygon("round-hexagon",ct(6,0)),this.generatePolygon("heptagon",ct(7,0)),this.generateRoundPolygon("round-heptagon",ct(7,0)),this.generatePolygon("octagon",ct(8,0)),this.generateRoundPolygon("round-octagon",ct(8,0));var a=new Array(20);{var n=ds(5,0),i=ds(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*w)break}else if(u){if(m>=e.deqCost*h||m>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*os)break;var E=e.deq(a,g,y);if(E.length>0)for(var C=0;C0&&(e.onDeqd(a,d),!u&&e.shouldRedraw(a,d,g,y)&&i())},o=e.priority||Ns;n.beforeRender(s,o(a))}}}},Op=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vn;or(this,t),this.idsByKey=new Kt,this.keyForId=new Kt,this.cachesByLvl=new Kt,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return ur(t,[{key:"getIdsFor",value:function(r){r==null&&Ve("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(r);return n||(n=new $r,a.set(r,n)),n}},{key:"addIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).add(a)}},{key:"deleteIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).delete(a)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var a=r.id(),n=this.keyForId.get(a),i=this.getKey(r);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(r){var a=r.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(r){var a=r.id(),n=this.keyForId.get(a),i=this.getKey(r);return n!==i}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var a=this.cachesByLvl,n=this.lvls,i=a.get(r);return i||(i=new Kt,a.set(r,i),n.push(r)),i}},{key:"getCache",value:function(r,a){return this.getCachesAt(a).get(r)}},{key:"get",value:function(r,a){var n=this.getKey(r),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(r),i}},{key:"getForCachedKey",value:function(r,a){var n=this.keyForId.get(r.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(r,a){return this.getCachesAt(a).has(r)}},{key:"has",value:function(r,a){var n=this.getKey(r);return this.hasCache(n,a)}},{key:"setCache",value:function(r,a,n){n.key=r,this.getCachesAt(a).set(r,n)}},{key:"set",value:function(r,a,n){var i=this.getKey(r);this.setCache(i,a,n),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,a){this.getCachesAt(a).delete(r)}},{key:"delete",value:function(r,a){var n=this.getKey(r);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(r){var a=this;this.lvls.forEach(function(n){return a.deleteCache(r,n)})}},{key:"invalidate",value:function(r){var a=r.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}])}(),yl=25,Ya=50,sn=-4,ks=3,of=7.99,Np=8,Fp=1024,zp=1024,qp=1024,Vp=.2,_p=.8,Gp=10,Hp=.15,Kp=.1,$p=.9,Wp=.9,Up=100,Yp=1,Or={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Xp=Ue({getKey:null,doesEleInvalidateKey:vn,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Xl,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),la=function(e,r){var a=this;a.renderer=e,a.onDequeues=[];var n=Xp(r);ge(a,n),a.lookup=new Op(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},Ye=la.prototype;Ye.reasons=Or;Ye.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Ye.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=r[t]=r[t]||[];return a};Ye.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Ba(function(r,a){return a.reqs-r.reqs});return e};Ye.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Ye.getElement=function(t,e,r,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(a==null&&(a=Math.ceil(zs(o*r))),a=of||a>ks)return null;var u=Math.pow(2,a),v=e.h*u,f=e.w*u,c=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,c))return null;var h=l.get(t,a);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var d;if(v<=yl?d=yl:v<=Ya?d=Ya:d=Math.ceil(v/Ya)*Ya,v>qp||f>zp)return null;var y=i.getTextureQueue(d),g=y[y.length-2],p=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};g||(g=y[y.length-1]),g||(g=p()),g.width-g.usedWidtha;D--)k=i.getElement(t,e,r,D,Or.downscale);B()}else return i.queueElement(t,C.level-1),C;else{var A;if(!b&&!w&&!E)for(var P=a-1;P>=sn;P--){var R=l.get(t,P);if(R){A=R;break}}if(m(A))return i.queueElement(t,a),A;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,t,e,c,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return h={x:g.usedWidth,texture:g,level:a,scale:u,width:f,height:v,scaledLabelShown:c},g.usedWidth+=Math.ceil(f+Np),g.eleCaches.push(h),l.set(t,a,h),i.checkTextureFullness(g),h};Ye.invalidateElements=function(t){for(var e=0;e=Vp*t.width&&this.retireTexture(t)};Ye.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>_p&&t.fullnessChecks>=Gp?ar(r,t):t.fullnessChecks++};Ye.retireTexture=function(t){var e=this,r=t.height,a=e.getTextureQueue(r),n=this.lookup;ar(a,t),t.retired=!0;for(var i=t.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,Fs(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),ar(n,s),a.push(s),s}};Ye.queueElement=function(t,e){var r=this,a=r.getElementQueue(),n=r.getElementKeyToQueue(),i=this.getKey(t),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,a.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:i};a.push(o),n[i]=o}};Ye.dequeue=function(t){for(var e=this,r=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],v=i.hasCache(u,o.level);if(a[l]=null,v)continue;n.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,t,o.level,Or.dequeue)}return n};Ye.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(t),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=Os,r.updateItem(i),r.pop(),a[n]=null):i.eles.unmerge(t))};Ye.onDequeue=function(t){this.onDequeues.push(t)};Ye.offDequeue=function(t){ar(this.onDequeues,t)};Ye.setupDequeueing=sf.setupDequeueing({deqRedrawThreshold:Up,deqCost:Hp,deqAvgCost:Kp,deqNoDrawCost:$p,deqFastCost:Wp,deq:function(e,r,a){return e.dequeue(r,a)},onDeqd:function(e,r){for(var a=0;a=Qp||r>mn)return null}a.validateLayersElesOrdering(r,t);var l=a.layersByLevel,u=Math.pow(2,r),v=l[r]=l[r]||[],f,c=a.levelIsComplete(r,t),h,d=function(){var B=function(L){if(a.validateLayersElesOrdering(L,t),a.levelIsComplete(L,t))return h=l[L],!0},D=function(L){if(!h)for(var I=r+L;fa<=I&&I<=mn&&!B(I);I+=L);};D(1),D(-1);for(var A=v.length-1;A>=0;A--){var P=v[A];P.invalid&&ar(v,P)}};if(!c)d();else return v;var y=function(){if(!f){f=pt();for(var B=0;Bbl||P>bl)return null;var R=A*P;if(R>iy)return null;var L=a.makeLayer(f,r);if(D!=null){var I=v.indexOf(D)+1;v.splice(I,0,L)}else(B.insert===void 0||B.insert)&&v.unshift(L);return L};if(a.skipping&&!o)return null;for(var p=null,m=t.length/Zp,b=!o,w=0;w=m||!rv(p.bb,E.boundingBox()))&&(p=g({insert:!0,after:p}),!p))return null;h||b?a.queueLayer(p,E):a.drawEleInLayer(p,E,r,e),p.eles.push(E),x[r]=p}return h||(b?null:v)};it.getEleLevelForLayerLevel=function(t,e){return t};it.drawEleInLayer=function(t,e,r,a){var n=this,i=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=n.getEleLevelForLayerLevel(r,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,r,sy),i.setImgSmoothing(s,!0))};it.levelIsComplete=function(t,e){var r=this,a=r.layersByLevel[t];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||s.invalid)return!1;n+=s.eles.length}return n===e.length};it.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var a=0;a0){e=!0;break}}return e};it.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=$t(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(a,n,i){e.invalidateLayer(a)}))};it.invalidateLayer=function(t){if(this.lastInvalidationTime=$t(),!t.invalid){var e=t.level,r=t.eles,a=this.layersByLevel[e];ar(a,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,d=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,g=e.pstyle("line-outline-color").value,p=u*v,m=u*v,b=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;f==="straight-triangle"?(s.eleStrokeStyle(t,e,L),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=h,t.lineCap=d,s.eleStrokeStyle(t,e,L),s.drawEdgePath(e,t,o.allpts,c),t.lineCap="butt")},w=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;if(t.lineWidth=h+y,t.lineCap=d,y>0)s.colorStrokeStyle(t,g[0],g[1],g[2],L);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,c),t.lineCap="butt")},E=function(){n&&s.drawEdgeOverlay(t,e)},C=function(){n&&s.drawEdgeUnderlay(t,e)},x=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;s.drawArrowheads(t,e,L)},S=function(){s.drawElementText(t,e,null,a)};t.lineJoin="round";var k=e.pstyle("ghost").value==="yes";if(k){var B=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,A=e.pstyle("ghost-opacity").value,P=p*A;t.translate(B,D),b(P),x(P),t.translate(-B,-D)}else w();C(),b(),x(),E(),S(),r&&t.translate(l.x1,l.y1)}};var vf=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,v=a.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,v[0],v[1],v[2],n),i.drawEdgePath(a,r,o.allpts,"solid")}}}};Yt.drawEdgeOverlay=vf("overlay");Yt.drawEdgeUnderlay=vf("underlay");Yt.drawEdgePath=function(t,e,r,a){var n=t._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,v=t.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(u||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;t.textAlign="center",t.textBaseline="bottom"}var h=!r,d;r&&(d=r,t.translate(-d.x1,-d.y1)),n==null?(s.drawText(t,e,null,h,i),e.isEdge()&&(s.drawText(t,e,"source",h,i),s.drawText(t,e,"target",h,i))):s.drawText(t,e,n,h,i),r&&t.translate(d.x1,d.y1)};Cr.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;t.font=a+" "+s+" "+n+" "+i,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,v[0],v[1],v[2],l)};function ls(t,e,r,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+i,r),t.lineTo(e+a-i,r),t.quadraticCurveTo(e+a,r,e+a,r+i),t.lineTo(e+a,r+n-i),t.quadraticCurveTo(e+a,r+n,e+a-i,r+n),t.lineTo(e+i,r+n),t.quadraticCurveTo(e,r+n,e,r+n-i),t.lineTo(e,r+i),t.quadraticCurveTo(e,r,e+i,r),t.closePath(),s?t.stroke():t.fill()}Cr.getTextAngle=function(t,e){var r,a=t._private,n=a.rscratch,i=e?e+"-":"",s=t.pstyle(i+"text-rotation");if(s.strValue==="autorotate"){var o=Et(n,"labelAngle",e);r=t.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};Cr.drawText=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Et(s,"labelX",r),u=Et(s,"labelY",r),v,f,c=this.getLabelText(e,r);if(c!=null&&c!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,n);var h=r?r+"-":"",d=Et(s,"labelWidth",r),y=Et(s,"labelHeight",r),g=e.pstyle(h+"text-margin-x").pfValue,p=e.pstyle(h+"text-margin-y").pfValue,m=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;m&&(b="center",w="center"),l+=g,u+=p;var E;switch(a?E=this.getTextAngle(e,r):E=0,E!==0&&(v=l,f=u,t.translate(v,f),t.rotate(E),l=0,u=0),w){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y;break}var C=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,S=e.pstyle("text-border-width").pfValue,k=e.pstyle("text-background-padding").pfValue,B=e.pstyle("text-background-shape").strValue,D=B.indexOf("round")===0,A=2;if(C>0||S>0&&x>0){var P=l-k;switch(b){case"left":P-=d;break;case"center":P-=d/2;break}var R=u-y-k,L=d+2*k,I=y+2*k;if(C>0){var M=t.fillStyle,O=e.pstyle("text-background-color").value;t.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+C*o+")",D?ls(t,P,R,L,I,A):t.fillRect(P,R,L,I),t.fillStyle=M}if(S>0&&x>0){var _=t.strokeStyle,H=t.lineWidth,F=e.pstyle("text-border-color").value,G=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+F[0]+","+F[1]+","+F[2]+","+x*o+")",t.lineWidth=S,t.setLineDash)switch(G){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=S/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(D?ls(t,P,R,L,I,A,"stroke"):t.strokeRect(P,R,L,I),G==="double"){var U=S/2;D?ls(t,P+U,R+U,L-U*2,I-U*2,A,"stroke"):t.strokeRect(P+U,R+U,L-U*2,I-U*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=H,t.strokeStyle=_}}var X=2*e.pstyle("text-outline-width").pfValue;if(X>0&&(t.lineWidth=X),e.pstyle("text-wrap").value==="wrap"){var Z=Et(s,"labelWrapCachedLines",r),Q=Et(s,"labelLineHeight",r),ee=d/2,te=this.getLabelJustification(e);switch(te==="auto"||(b==="left"?te==="left"?l+=-d:te==="center"&&(l+=-ee):b==="center"?te==="left"?l+=-ee:te==="right"&&(l+=ee):b==="right"&&(te==="center"?l+=ee:te==="right"&&(l+=d))),w){case"top":u-=(Z.length-1)*Q;break;case"center":case"bottom":u-=(Z.length-1)*Q;break}for(var K=0;K0&&t.strokeText(Z[K],l,u),t.fillText(Z[K],l,u),u+=Q}else X>0&&t.strokeText(c,l,u),t.fillText(c,l,u);E!==0&&(t.rotate(-E),t.translate(-v,-f))}}};var Qr={};Qr.drawNode=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,v=u.rscratch,f=e.position();if(!(!ae(f.x)||!ae(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,h=s.usePaths(),d,y=!1,g=e.padding();o=e.width()+2*g,l=e.height()+2*g;var p;r&&(p=r,t.translate(-p.x1,-p.y1));for(var m=e.pstyle("background-image"),b=m.value,w=new Array(b.length),E=new Array(b.length),C=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:P;s.eleFillStyle(t,e,z)},K=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F;s.colorStrokeStyle(t,R[0],R[1],R[2],z)},N=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z;s.colorStrokeStyle(t,U[0],U[1],U[2],z)},$=function(z,V,ne,Y){var ie=s.nodePathCache=s.nodePathCache||[],ce=Yl(ne==="polygon"?ne+","+Y.join(","):ne,""+V,""+z,""+ee),Ee=ie[ce],ve,be=!1;return Ee!=null?(ve=Ee,be=!0,v.pathCache=ve):(ve=new Path2D,ie[ce]=v.pathCache=ve),{path:ve,cacheHit:be}},J=e.pstyle("shape").strValue,re=e.pstyle("shape-polygon-points").pfValue;if(h){t.translate(f.x,f.y);var le=$(o,l,J,re);d=le.path,y=le.cacheHit}var xe=function(){if(!y){var z=f;h&&(z={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(d||t,z.x,z.y,o,l,ee,v)}h?t.fill(d):t.fill()},Ie=function(){for(var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ne=u.backgrounding,Y=0,ie=0;ie0&&arguments[0]!==void 0?arguments[0]:!1,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasPie(e)&&(s.drawPie(t,e,V),z&&(h||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,ee,v)))},se=function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,V=(D>0?D:-D)*z,ne=D>0?0:255;D!==0&&(s.colorFillStyle(t,ne,ne,ne,V),h?t.fill(d):t.fill())},ue=function(){if(A>0){if(t.lineWidth=A,t.lineCap=M,t.lineJoin=I,t.setLineDash)switch(L){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(_),t.lineDashOffset=H;break;case"solid":case"double":t.setLineDash([]);break}if(O!=="center"){if(t.save(),t.lineWidth*=2,O==="inside")h?t.clip(d):t.clip();else{var z=new Path2D;z.rect(-o/2-A,-l/2-A,o+2*A,l+2*A),z.addPath(d),t.clip(z,"evenodd")}h?t.stroke(d):t.stroke(),t.restore()}else h?t.stroke(d):t.stroke();if(L==="double"){t.lineWidth=A/3;var V=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",h?t.stroke(d):t.stroke(),t.globalCompositeOperation=V}t.setLineDash&&t.setLineDash([])}},de=function(){if(G>0){if(t.lineWidth=G,t.lineCap="butt",t.setLineDash)switch(X){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var z=f;h&&(z={x:0,y:0});var V=s.getNodeShape(e),ne=A;O==="inside"&&(ne=0),O==="outside"&&(ne*=2);var Y=(o+ne+(G+Q))/o,ie=(l+ne+(G+Q))/l,ce=o*Y,Ee=l*ie,ve=s.nodeShapes[V].points,be;if(h){var we=$(ce,Ee,V,ve);be=we.path}if(V==="ellipse")s.drawEllipsePath(be||t,z.x,z.y,ce,Ee);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(V)){var pe=0,Oe=0,qe=0;V==="round-diamond"?pe=(ne+Q+G)*1.4:V==="round-heptagon"?(pe=(ne+Q+G)*1.075,qe=-(ne/2+Q+G)/35):V==="round-hexagon"?pe=(ne+Q+G)*1.12:V==="round-pentagon"?(pe=(ne+Q+G)*1.13,qe=-(ne/2+Q+G)/15):V==="round-tag"?(pe=(ne+Q+G)*1.12,Oe=(ne/2+G+Q)*.07):V==="round-triangle"&&(pe=(ne+Q+G)*(Math.PI/2),qe=-(ne+Q/2+G)/Math.PI),pe!==0&&(Y=(o+pe)/o,ce=o*Y,["round-hexagon","round-tag"].includes(V)||(ie=(l+pe)/l,Ee=l*ie)),ee=ee==="auto"?iv(ce,Ee):ee;for(var yt=ce/2,mt=Ee/2,He=ee+(ne+G+Q)/2,Xe=new Array(ve.length/2),Ze=new Array(ve.length/2),vt=0;vt0){if(n=n||a.position(),i==null||s==null){var h=a.padding();i=a.width()+2*h,s=a.height()+2*h}o.colorFillStyle(r,v[0],v[1],v[2],u),o.nodeShapes[f].draw(r,n.x,n.y,i+l*2,s+l*2,c),r.fill()}}}};Qr.drawNodeOverlay=ff("overlay");Qr.drawNodeUnderlay=ff("underlay");Qr.hasPie=function(t){return t=t[0],t._private.hasPie};Qr.drawPie=function(t,e,r,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=a.x,o=a.y,l=e.width(),u=e.height(),v=Math.min(l,u)/2,f=0,c=this.usePaths();c&&(s=0,o=0),i.units==="%"?v=v*i.pfValue:i.pfValue!==void 0&&(v=i.pfValue/2);for(var h=1;h<=n.pieBackgroundN;h++){var d=e.pstyle("pie-"+h+"-background-size").value,y=e.pstyle("pie-"+h+"-background-color").value,g=e.pstyle("pie-"+h+"-background-opacity").value*r,p=d/100;p+f>1&&(p=1-f);var m=1.5*Math.PI+2*Math.PI*f,b=2*Math.PI*p,w=m+b;d===0||f>=1||f+p>1||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,v,m,w),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],g),t.fill(),f+=p)}};var dt={},yy=100;dt.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};dt.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,a,n=0;ne.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(v[e.NODE]=!0,v[e.SELECT_BOX]=!0);var m=r.style(),b=r.zoom(),w=s!==void 0?s:b,E=r.pan(),C={x:E.x,y:E.y},x={zoom:b,pan:{x:E.x,y:E.y}},S=e.prevViewport,k=S===void 0||x.zoom!==S.zoom||x.pan.x!==S.pan.x||x.pan.y!==S.pan.y;!k&&!(y&&!d)&&(e.motionBlurPxRatio=1),o&&(C=o),w*=l,C.x*=l,C.y*=l;var B=e.getCachedZSortedEles();function D(K,N,$,J,re){var le=K.globalCompositeOperation;K.globalCompositeOperation="destination-out",e.colorFillStyle(K,255,255,255,e.motionBlurTransparency),K.fillRect(N,$,J,re),K.globalCompositeOperation=le}function A(K,N){var $,J,re,le;!e.clearingMotionBlur&&(K===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||K===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?($={x:E.x*h,y:E.y*h},J=b*h,re=e.canvasWidth*h,le=e.canvasHeight*h):($=C,J=w,re=e.canvasWidth,le=e.canvasHeight),K.setTransform(1,0,0,1,0,0),N==="motionBlur"?D(K,0,0,re,le):!a&&(N===void 0||N)&&K.clearRect(0,0,re,le),n||(K.translate($.x,$.y),K.scale(J,J)),o&&K.translate(o.x,o.y),s&&K.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var P=e.data.bufferContexts[e.TEXTURE_BUFFER];P.setTransform(1,0,0,1,0,0),P.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:P,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var x=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[e.DRAG]=!1,v[e.NODE]=!1;var R=u.contexts[e.NODE],L=e.textureCache.texture,x=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),c?D(R,0,0,x.width,x.height):R.clearRect(0,0,x.width,x.height);var I=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,I[0],I[1],I[2],M),R.fillRect(0,0,x.width,x.height);var b=r.zoom();A(R,!1),R.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l),R.drawImage(L,x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l)}else e.textureOnViewport&&!a&&(e.textureCache=null);var O=r.extent(),_=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),H=e.hideEdgesOnViewport&&_,F=[];if(F[e.NODE]=!v[e.NODE]&&c&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,F[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),F[e.DRAG]=!v[e.DRAG]&&c&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,F[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),v[e.NODE]||n||i||F[e.NODE]){var G=c&&!F[e.NODE]&&h!==1,R=a||(G?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),U=c&&!G?"motionBlur":void 0;A(R,U),H?e.drawCachedNodes(R,B.nondrag,l,O):e.drawLayeredElements(R,B.nondrag,l,O),e.debug&&e.drawDebugPoints(R,B.nondrag),!n&&!c&&(v[e.NODE]=!1)}if(!i&&(v[e.DRAG]||n||F[e.DRAG])){var G=c&&!F[e.DRAG]&&h!==1,R=a||(G?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);A(R,c&&!G?"motionBlur":void 0),H?e.drawCachedNodes(R,B.drag,l,O):e.drawCachedElements(R,B.drag,l,O),e.debug&&e.drawDebugPoints(R,B.drag),!n&&!c&&(v[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,A),c&&h!==1){var X=u.contexts[e.NODE],Z=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],Q=u.contexts[e.DRAG],ee=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],te=function(N,$,J){N.setTransform(1,0,0,1,0,0),J||!p?N.clearRect(0,0,e.canvasWidth,e.canvasHeight):D(N,0,0,e.canvasWidth,e.canvasHeight);var re=h;N.drawImage($,0,0,e.canvasWidth*re,e.canvasHeight*re,0,0,e.canvasWidth,e.canvasHeight)};(v[e.NODE]||F[e.NODE])&&(te(X,Z,F[e.NODE]),v[e.NODE]=!1),(v[e.DRAG]||F[e.DRAG])&&(te(Q,ee,F[e.DRAG]),v[e.DRAG]=!1)}e.prevViewport=x,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),c&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,v[e.NODE]=!0,v[e.DRAG]=!0,e.redraw()},yy)),a||r.emit("render")};var na;dt.drawSelectionRectangle=function(t,e){var r=this,a=r.cy,n=r.data,i=a.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=n.canvasNeedsRedraw,u=t.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var v=u||n.contexts[r.SELECT_BOX];if(e(v),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),c=i.core("selection-box-border-width").value/f;v.lineWidth=c,v.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",v.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),c>0&&(v.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",v.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(n.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),h=n.bgActivePosistion;v.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",v.beginPath(),v.arc(h.x,h.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),v.fill()}var d=r.lastRedrawTime;if(r.showFps&&d){d=Math.round(d);var y=Math.round(1e3/d),g="1 frame = "+d+" ms = "+y+" fps";if(v.setTransform(1,0,0,1,0,0),v.fillStyle="rgba(255, 0, 0, 0.75)",v.strokeStyle="rgba(255, 0, 0, 0.75)",v.font="30px Arial",!na){var p=v.measureText(g);na=p.actualBoundingBoxAscent}v.fillText(g,0,na);var m=60;v.strokeRect(0,na+10,250,20),v.fillRect(0,na+10,250*Math.min(y/m,1),20)}o||(l[r.SELECT_BOX]=!1)}};function Cl(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(a));return a}function my(t,e,r){var a=Cl(t,t.VERTEX_SHADER,e),n=Cl(t,t.FRAGMENT_SHADER,r),i=t.createProgram();if(t.attachShader(i,a),t.attachShader(i,n),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function by(t,e,r){r===void 0&&(r=e);var a=t.makeOffscreenCanvas(e,r),n=a.context=a.getContext("2d");return a.clear=function(){return n.clearRect(0,0,a.width,a.height)},a.clear(),a}function eo(t){var e=t.pixelRatio,r=t.cy.zoom(),a=t.cy.pan();return{zoom:r*e,pan:{x:a.x*e,y:a.y*e}}}function wy(t,e,r,a,n){var i=a*r+e.x,s=n*r+e.y;return s=Math.round(t.canvasHeight-s),[i,s]}function ia(t,e,r){var a=t[0]/255,n=t[1]/255,i=t[2]/255,s=e,o=r||new Array(4);return o[0]=a*s,o[1]=n*s,o[2]=i*s,o[3]=s,o}function Br(t,e){var r=e||new Array(4);return r[0]=(t>>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function xy(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function Ey(t,e){var r=t.createTexture();return r.buffer=function(a){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function cf(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function df(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function Cy(t,e,r,a,n,i){switch(e){case t.FLOAT:return new Float32Array(r.buffer,i*a,n);case t.INT:return new Int32Array(r.buffer,i*a,n)}}function Ty(t,e,r,a){var n=cf(t,e),i=je(n,2),s=i[0],o=i[1],l=df(t,o,a),u=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,l,t.STATIC_DRAW),o===t.FLOAT?t.vertexAttribPointer(r,s,o,!1,0,0):o===t.INT&&t.vertexAttribIPointer(r,s,o,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),u}function Qt(t,e,r,a){var n=cf(t,r),i=je(n,3),s=i[0],o=i[1],l=i[2],u=df(t,o,e*s),v=s*l,f=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,f),t.bufferData(t.ARRAY_BUFFER,e*v,t.DYNAMIC_DRAW),t.enableVertexAttribArray(a),o===t.FLOAT?t.vertexAttribPointer(a,s,o,!1,v,0):o===t.INT&&t.vertexAttribIPointer(a,s,o,v,0),t.vertexAttribDivisor(a,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;hs&&(o=s/a,l=a*o,u=n*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(r,a,n){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(a),v=u.scale,f=u.texW,c=u.texH,h=[null,null],d=function(b,w){if(n&&w){var E=w.context,C=b.x,x=b.row,S=C,k=l*x;E.save(),E.translate(S,k),E.scale(v,v),n(E,a),E.restore()}},y=function(){d(i.freePointer,i.canvas),h[0]={x:i.freePointer.x,y:i.freePointer.row*l,w:f,h:c},h[1]={x:i.freePointer.x+f,y:i.freePointer.row*l,w:0,h:c},i.freePointer.x+=f,i.freePointer.x==s&&(i.freePointer.x=0,i.freePointer.row++)},g=function(){var b=i.scratch,w=i.canvas;b.clear(),d({x:0,row:0},b);var E=s-i.freePointer.x,C=f-E,x=l;{var S=i.freePointer.x,k=i.freePointer.row*l,B=E;w.context.drawImage(b,0,0,B,x,S,k,B,x),h[0]={x:S,y:k,w:B,h:c}}{var D=E,A=(i.freePointer.row+1)*l,P=C;w&&w.context.drawImage(b,D,0,P,x,0,A,P,x),h[1]={x:0,y:A,w:P,h:c}}i.freePointer.x=C,i.freePointer.row++},p=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+f<=s)y();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(p(),y()):this.enableWrapping?g():(p(),y())}return this.keyToLocation.set(r,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var a=this.texSize,n=this.texRows,i=this.getScale(r),s=i.texW;return this.freePointer.x+s>a?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},n=a.forceRedraw,i=n===void 0?!1:n,s=a.filterEle,o=s===void 0?function(){return!0}:s,l=a.filterType,u=l===void 0?function(){return!0}:l,v=!1,f=!1,c=Pt(r),h;try{for(c.s();!(h=c.n()).done;){var d=h.value;if(o(d)){var y=Pt(this.renderTypes.values()),g;try{for(y.s();!(g=y.n()).done;){var p=g.value,m=p.type;if(u(m)){var b=p.getKey(d),w=this.collections.get(p.collection);if(i)w.markKeyForGC(b),f=!0;else{var E=p.getID?p.getID(d):d.id(),C=this._key(m,E),x=this.typeAndIdToKey.get(C);x!==void 0&&x!==b&&(this.typeAndIdToKey.delete(C),w.markKeyForGC(x),v=!0)}}}}catch(S){y.e(S)}finally{y.f()}}}}catch(S){c.e(S)}finally{c.f()}return f&&(this.gc(),v=!1),v}},{key:"gc",value:function(){var r=Pt(this.collections.values()),a;try{for(r.s();!(a=r.n()).done;){var n=a.value;n.gc()}}catch(i){r.e(i)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,a,n){var i=this.renderTypes.get(a),s=i.getKey(r);n||(n=i.getBoundingBox(r));var o=this.collections.get(i.collection),l=!1,u=o.draw(s,n,function(c){i.drawElement(c,r,n,!0,!0),l=!0});if(l){var v=i.getID?i.getID(r):r.id(),f=this._key(a,v);this.typeAndIdToKey.set(f,s)}return u}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r,a){if(this.batchAtlases.length===this.maxAtlasesPerBatch){var n=this.renderTypes.get(a),i=n.getKey(r),s=this.collections.get(n.collection),o=s.getAtlas(i);return!!o&&this.batchAtlases.includes(o)}return!0}},{key:"getAtlasIndexForBatch",value:function(r){var a=this.batchAtlases.indexOf(r);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(r),a=this.batchAtlases.length-1}return a}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,a){return a})}},{key:"getAtlasInfo",value:function(r,a){var n=this.renderTypes.get(a),i=n.getBoundingBox(r),s=this.getOrCreateAtlas(r,a,i),o=this.getAtlasIndexForBatch(s);if(o!==void 0){var l=n.getKey(r),u=s.getOffsets(l),v=je(u,2),f=v[0],c=v[1];return{index:o,tex1:f,tex2:c,bb:i}}}},{key:"setTransformMatrix",value:function(r,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=this.getRenderTypeOpts(n),l=o.getPadding?o.getPadding(r):0;if(i){var u=i.bb,v=i.tex1,f=i.tex2,c=v.w/(v.w+f.w);s||(c=1-c);var h=this.getAdjustedBB(u,l,s,c);this._applyTransformMatrix(a,h,o,r)}else{var d=o.getBoundingBox(r),y=this.getAdjustedBB(d,l,!0,1);this._applyTransformMatrix(a,y,o,r)}}},{key:"_applyTransformMatrix",value:function(r,a,n,i){var s,o;hf(r);var l=n.getRotation?n.getRotation(i):0;if(l!==0){var u=n.getRotationPoint(i),v=u.x,f=u.y;bn(r,r,[v,f]),gf(r,r,l);var c=n.getRotationOffset(i);s=c.x+a.xOffset,o=c.y}else s=a.x1,o=a.y1;bn(r,r,[s,o]),to(r,r,[a.w,a.h])}},{key:"getAdjustedBB",value:function(r,a,n,i){var s=r.x1,o=r.y1,l=r.w,u=r.h;a&&(s-=a,o-=a,l+=2*a,u+=2*a);var v=0,f=l*i;return n&&i<1?l=f:!n&&i<1&&(v=l-f,s+=v,l=f),{x1:s,y1:o,w:l,h:u,xOffset:v}}},{key:"getDebugInfo",value:function(){var r=[],a=Pt(this.collections),n;try{for(a.s();!(n=a.n()).done;){var i=je(n.value,2),s=i[0],o=i[1],l=o.getCounts(),u=l.keyCount,v=l.atlasCount;r.push({type:s,keyCount:u,atlasCount:v})}}catch(f){a.e(f)}finally{a.f()}return r}}])}(),Xa=0,Dl=1,kl=2,vs=3,Pl=4,Ly=function(){function t(e,r,a){or(this,t),this.r=e,this.gl=r,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=by,this.atlasManager=new My(e,a),this.program=this.createShaderProgram(ca.SCREEN),this.pickingProgram=this.createShaderProgram(ca.PICKING),this.vao=this.createVAO()}return ur(t,[{key:"addAtlasCollection",value:function(r,a){this.atlasManager.addAtlasCollection(r,a)}},{key:"addAtlasRenderType",value:function(r,a){this.atlasManager.addRenderType(r,a)}},{key:"invalidate",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(r,{filterType:function(o){return o===n},forceRedraw:!0}):i.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"createShaderProgram",value:function(r){var a=this.gl,n=`#version 300 es - precision highp float; - - uniform mat3 uPanZoomMatrix; - uniform int uAtlasSize; - - // instanced - in vec2 aPosition; - - in mat3 aTransform; - - // what are we rendering? - in int aVertType; - - // for picking - in vec4 aIndex; - - // For textures - in int aAtlasId; // which shader unit/atlas to use - in vec4 aTex; // x/y/w/h of texture in atlas - - // for edges - in vec4 aPointAPointB; - in vec4 aPointCPointD; - in float aLineWidth; - in vec4 aColor; - - out vec2 vTexCoord; - out vec4 vColor; - flat out int vAtlasId; - flat out vec4 vIndex; - flat out int vVertType; - - void main(void) { - int vid = gl_VertexID; - vec2 position = aPosition; - - if(aVertType == `.concat(Xa,`) { - float texX = aTex.x; - float texY = aTex.y; - float texW = aTex.z; - float texH = aTex.w; - - int vid = gl_VertexID; - - if(vid == 1 || vid == 2 || vid == 4) { - texX += texW; - } - if(vid == 2 || vid == 4 || vid == 5) { - texY += texH; - } - - float d = float(uAtlasSize); - vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 - - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - } - else if(aVertType == `).concat(Pl,`) { - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - vColor = aColor; - } - else if(aVertType == `).concat(Dl,`) { - vec2 source = aPointAPointB.xy; - vec2 target = aPointAPointB.zw; - - // adjust the geometry so that the line is centered on the edge - position.y = position.y - 0.5; - - vec2 xBasis = target - source; - vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); - vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y; - - gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); - vColor = aColor; - } - else if(aVertType == `).concat(kl,`) { - vec2 pointA = aPointAPointB.xy; - vec2 pointB = aPointAPointB.zw; - vec2 pointC = aPointCPointD.xy; - vec2 pointD = aPointCPointD.zw; - - // adjust the geometry so that the line is centered on the edge - position.y = position.y - 0.5; - - vec2 p0 = pointA; - vec2 p1 = pointB; - vec2 p2 = pointC; - vec2 pos = position; - if(position.x == 1.0) { - p0 = pointD; - p1 = pointC; - p2 = pointB; - pos = vec2(0.0, -position.y); - } - - vec2 p01 = p1 - p0; - vec2 p12 = p2 - p1; - vec2 p21 = p1 - p2; - - // Find the normal vector. - vec2 tangent = normalize(normalize(p12) + normalize(p01)); - vec2 normal = vec2(-tangent.y, tangent.x); - - // Find the vector perpendicular to p0 -> p1. - vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); - - // Determine the bend direction. - float sigma = sign(dot(p01 + p21, normal)); - float width = aLineWidth; - - if(sign(pos.y) == -sigma) { - // This is an intersecting vertex. Adjust the position so that there's no overlap. - vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); - gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); - } else { - // This is a non-intersecting vertex. Treat it like a mitre join. - vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); - gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); - } - - vColor = aColor; - } - else if(aVertType == `).concat(vs,` && vid < 3) { - // massage the first triangle into an edge arrow - if(vid == 0) - position = vec2(-0.15, -0.3); - if(vid == 1) - position = vec2( 0.0, 0.0); - if(vid == 2) - position = vec2( 0.15, -0.3); - - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - vColor = aColor; - } - else { - gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space - } - - vAtlasId = aAtlasId; - vIndex = aIndex; - vVertType = aVertType; - } - `),i=this.atlasManager.getIndexArray(),s=`#version 300 es - precision highp float; - - // define texture unit for each node in the batch - `.concat(i.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` - `),` - - uniform vec4 uBGColor; - - in vec2 vTexCoord; - in vec4 vColor; - flat in int vAtlasId; - flat in vec4 vIndex; - flat in int vVertType; - - out vec4 outColor; - - void main(void) { - if(vVertType == `).concat(Xa,`) { - `).concat(i.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` - else `),` - } else if(vVertType == `).concat(vs,`) { - // blend arrow color with background (using premultiplied alpha) - outColor.rgb = vColor.rgb + (uBGColor.rgb * (1.0 - vColor.a)); - outColor.a = 1.0; // make opaque, masks out line under arrow - } else { - outColor = vColor; - } - - `).concat(r.picking?`if(outColor.a == 0.0) discard; - else outColor = vIndex;`:"",` - } - `),o=my(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aTransform=a.getAttribLocation(o,"aTransform"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex=a.getAttribLocation(o,"aTex"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aColor=a.getAttribLocation(o,"aColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:ca.SCREEN;this.panZoomMatrix=r,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.rectangleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.atlasManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"getTempMatrix",value:function(){return this.tempMatrix=this.tempMatrix||on()}},{key:"drawTexture",value:function(r,a,n){var i=this.atlasManager;if(r.visible()&&i.getRenderTypeOpts(n).isVisible(r)){i.canAddToCurrentBatch(r,n)||this.endBatch(),this.instanceCount+1>=this.maxInstances&&this.endBatch();var s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=Xa;var o=this.indexBuffer.getView(s);Br(a,o);var l=i.getAtlasInfo(r,n),u=l.index,v=l.tex1,f=l.tex2;f.w>0&&this.wrappedCount++;for(var c=!0,h=0,d=[v,f];h=this.maxInstances&&this.endBatch()}}},{key:"drawSimpleRectangle",value:function(r,a,n){if(r.visible()){var i=this.atlasManager,s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=Pl;var o=this.indexBuffer.getView(s);Br(a,o);var l=r.pstyle("background-color").value,u=r.pstyle("background-opacity").value,v=this.colorBuffer.getView(s);ia(l,u,v);var f=this.transformBuffer.getMatrixView(s);i.setTransformMatrix(r,f,n),this.rectangleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"drawEdgeArrow",value:function(r,a,n){if(r.visible()){var i=r._private.rscratch,s,o,l;if(n==="source"?(s=i.arrowStartX,o=i.arrowStartY,l=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=r.pstyle(n+"-arrow-shape").value;if(u!=="none"){var v=r.pstyle(n+"-arrow-color").value,f=r.pstyle("opacity").value,c=r.pstyle("line-opacity").value,h=f*c,d=r.pstyle("width").pfValue,y=r.pstyle("arrow-scale").value,g=this.r.getArrowWidth(d,y),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);hf(m),bn(m,m,[s,o]),to(m,m,[g,g]),gf(m,m,l),this.vertTypeBuffer.getView(p)[0]=vs;var b=this.indexBuffer.getView(p);Br(a,b);var w=this.colorBuffer.getView(p);ia(v,h,w),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,a){if(r.visible()){var n=this.getEdgePoints(r);if(n){var i=r.pstyle("opacity").value,s=r.pstyle("line-opacity").value,o=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,u=i*s;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=Dl;var f=this.indexBuffer.getView(v);Br(a,f);var c=this.colorBuffer.getView(v);ia(l,u,c);var h=this.lineWidthBuffer.getView(v);h[0]=o;var d=this.pointAPointBBuffer.getView(v);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y=this.maxInstances&&this.endBatch()}}}}},{key:"getEdgePoints",value:function(r){var a=r._private.rscratch;if(!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))){var n=a.allpts;if(n.length==4)return n;var i=this.getNumSegments(r);return this.getCurveSegmentPoints(n,i)}}},{key:"getNumSegments",value:function(r){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"getCurveSegmentPoints",value:function(r,a){if(r.length==4)return r;for(var n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=r[0],n[1]=r[1];else if(i==a)n[i*2]=r[r.length-2],n[i*2+1]=r[r.length-1];else{var s=i/a;this.setCurvePoint(r,s,n,i*2)}return n}},{key:"setCurvePoint",value:function(r,a,n,i){if(r.length<=2)n[i]=r[0],n[i+1]=r[1];else{for(var s=Array(r.length-2),o=0;o0}},{key:"getStyle",value:function(r,a){var n=a.pstyle("".concat(r,"-opacity")).value,i=a.pstyle("".concat(r,"-color")).value,s=a.pstyle("".concat(r,"-shape")).value;return{opacity:n,color:i,shape:s}}},{key:"getPadding",value:function(r,a){return a.pstyle("".concat(r,"-padding")).pfValue}},{key:"draw",value:function(r,a,n,i){if(this.isVisible(r,n)){var s=this.r,o=i.w,l=i.h,u=o/2,v=l/2,f=this.getStyle(r,n),c=f.shape,h=f.color,d=f.opacity;a.save(),a.fillStyle=Bl(h,d),c==="round-rectangle"||c==="roundrectangle"?s.drawRoundRectanglePath(a,u,v,o,l,"auto"):c==="ellipse"&&s.drawEllipsePath(a,u,v,o,l),a.fill(),a.restore()}}}])}(),pf={};pf.initWebgl=function(t,e){var r=this,a=r.data.contexts[r.WEBGL];t.bgColor=Oy(r),t.webglTexSize=Math.min(t.webglTexSize,a.getParameter(a.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,r.pickingFrameBuffer=Dy(a),r.pickingFrameBuffer.needsDraw=!0;var n=function(u){return function(v){return r.getTextAngle(v,u)}},i=function(u){return function(v){var f=v.pstyle(u);return f&&f.value}};r.drawing=new Ly(r,a,t);var s=new Iy(r);r.drawing.addAtlasCollection("node",Sl({texRows:t.webglTexRowsNodes})),r.drawing.addAtlasCollection("label",Sl({texRows:t.webglTexRows})),r.drawing.addAtlasRenderType("node-body",Ar({collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement})),r.drawing.addAtlasRenderType("label",Ar({collection:"label",getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")})),r.drawing.addAtlasRenderType("node-overlay",Ar({collection:"node",getBoundingBox:e.getElementBox,getKey:function(u){return s.getStyleKey("overlay",u)},drawElement:function(u,v,f){return s.draw("overlay",u,v,f)},isVisible:function(u){return s.isVisible("overlay",u)},getPadding:function(u){return s.getPadding("overlay",u)}})),r.drawing.addAtlasRenderType("node-underlay",Ar({collection:"node",getBoundingBox:e.getElementBox,getKey:function(u){return s.getStyleKey("underlay",u)},drawElement:function(u,v,f){return s.draw("underlay",u,v,f)},isVisible:function(u){return s.isVisible("underlay",u)},getPadding:function(u){return s.getPadding("underlay",u)}})),r.drawing.addAtlasRenderType("edge-source-label",Ar({collection:"label",getKey:e.getSourceLabelKey,getBoundingBox:e.getSourceLabelBox,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")})),r.drawing.addAtlasRenderType("edge-target-label",Ar({collection:"label",getKey:e.getTargetLabelKey,getBoundingBox:e.getTargetLabelBox,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")}));var o=Pa(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(l,u){var v=!1;u&&u.length>0&&(v|=r.drawing.invalidate(u)),v&&o()}),Ny(r)};function Oy(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return _l(r)}function Ny(t){{var e=t.render;t.render=function(i){i=i||{};var s=t.cy;t.webgl&&(s.zoom()>of?(Fy(t),e.call(t,i)):(zy(t),mf(t,i,ca.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(i){r.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,s,o,l){return Ky(t,i,s)};{var a=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){a.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var n=t.notify;t.notify=function(i,s){n.call(t,i,s),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(s,{type:"node-body"})}}}function Fy(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function zy(t){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,t.canvasWidth,t.canvasHeight),a.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function qy(t){var e=t.canvasWidth,r=t.canvasHeight,a=eo(t),n=a.pan,i=a.zoom,s=on();bn(s,s,[n.x,n.y]),to(s,s,[i,i]);var o=on();Py(o,e,r);var l=on();return ky(l,o,s),l}function yf(t,e){var r=t.canvasWidth,a=t.canvasHeight,n=eo(t),i=n.pan,s=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,a),e.translate(i.x,i.y),e.scale(s,s)}function Vy(t,e){t.drawSelectionRectangle(e,function(r){return yf(t,r)})}function _y(t){var e=t.data.contexts[t.NODE];e.save(),yf(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function Gy(t){var e=function(n,i,s){for(var o=n.atlasManager.getAtlasCollection(i),l=t.data.contexts[t.NODE],u=.125,v=o.atlases,f=0;f=0&&w.add(x)}return w}function Ky(t,e,r){var a=Hy(t,e,r),n=t.getCachedZSortedEles(),i,s,o=Pt(a),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,v=n[u];if(!i&&v.isNode()&&(i=v),!s&&v.isEdge()&&(s=v),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function $y(t){return t.pstyle("shape").value==="rectangle"&&t.pstyle("background-fill").value==="solid"&&t.pstyle("border-width").pfValue===0&&t.pstyle("background-image").strValue==="none"}function fs(t,e,r){var a=t.drawing;e+=1,r.isNode()?(a.drawTexture(r,e,"node-underlay"),$y(r)?a.drawSimpleRectangle(r,e,"node-body"):a.drawTexture(r,e,"node-body"),a.drawTexture(r,e,"label"),a.drawTexture(r,e,"node-overlay")):(a.drawEdgeLine(r,e),a.drawEdgeArrow(r,e,"source"),a.drawEdgeArrow(r,e,"target"),a.drawTexture(r,e,"label"),a.drawTexture(r,e,"edge-source-label"),a.drawTexture(r,e,"edge-target-label"))}function mf(t,e,r){var a;t.webglDebug&&(a=performance.now());var n=t.drawing,i=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&Vy(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var s=t.data.contexts[t.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=qy(t),l=t.getCachedZSortedEles();if(i=l.length,n.startFrame(o,r),r.screen){for(var u=0;u0&&s>0){h.clearRect(0,0,i,s),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(t.full)h.translate(-a.x1*u,-a.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(a.x1*u,a.y1*u);else{var y=e.pan(),g={x:y.x*u,y:y.y*u};u*=e.zoom(),h.translate(g.x,g.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-g.x,-g.y)}t.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=t.bg,h.rect(0,0,i,s),h.fill())}return c};function Wy(t,e){for(var r=atob(t),a=new ArrayBuffer(r.length),n=new Uint8Array(a),i=0;i"u"?"undefined":We(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var a=this.cy.window(),n=a.document;r=n.createElement("canvas"),r.width=t,r.height=e}return r};[lf,qt,Yt,js,Cr,Qr,dt,pf,vr,Ia,xf].forEach(function(t){ge(Te,t)});var Xy=[{name:"null",impl:Yv},{name:"base",impl:nf},{name:"canvas",impl:Uy}],Zy=[{type:"layout",extensions:Pp},{type:"renderer",extensions:Xy}],Cf={},Tf={};function Sf(t,e,r){var a=r,n=function(S){Re("Can not register `"+e+"` for `"+t+"` since `"+S+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(xa.prototype[e])return n(e);xa.prototype[e]=r}else if(t==="collection"){if(nt.prototype[e])return n(e);nt.prototype[e]=r}else if(t==="layout"){for(var i=function(S){this.options=S,r.call(this,S),ke(this._private)||(this._private={}),this._private.cy=S.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(r.prototype),o=[],l=0;l{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const v=t.edge(l.v,l.w,l.name);i.info("Edge data",v,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,v,l.name),n.setEdge(l.v,l.w,v,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",p(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,p(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const v=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",p(e)),G(r,e,v,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:v}),i.warn("New graph after copy node: (",r,")",p(v)),i.debug("Old graph after copy",p(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=X(e=>M(e,e.children()),"sortNodesByHierarchy"),j=X(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",p(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),v=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const w=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX - Node.id = `,d,` - data=`,w.height,` -Parent cluster`,c.height),t.setNode(c.id,w),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,w))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:w,nodesep:m}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:w+25,nodesep:m});const N=await j(g,s.graph,n,o,t.node(d),a),S=N.elem;z(s,S),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),U(S,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await X(async()=>{const d=t.edges().map(async function(s){const w=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,w)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(p(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(p(t)));let E=0,{subGraphTitleTotalMargin:y}=q(a);return await Promise.all(oe(t).map(async function(d){var w;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=y,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=y,t.node(s.parentId);const m=(s==null?void 0:s.padding)/2||0,N=((w=s==null?void 0:s.labelBBox)==null?void 0:w.height)||0,S=N-m||0;i.debug("OffsetY",S,"labelHeight",N,"halfPadding",m),await K(l,s),f.get(s.id).node=s}else{const m=t.node(s.parentId);s.y+=y/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",m,m==null?void 0:m.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(S=>S.y+=y/2);const w=t.node(d.v);var m=t.node(d.w);const N=Q(v,s,f,n,w,m,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(E=s.diff)}),i.warn("Returning from recursive render XAX",u,E),{elem:u,diff:E}},"recursiveRender"),ge=X(async(e,t)=>{var a,r,u,l,v,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(v=e.config)==null?void 0:v.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const h=g.start,E=h+"---"+h+"---1",y=h+"---"+h+"---2",d=n.node(h);n.setNode(E,{domId:E,id:E,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(E,d.parentId),n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(y,d.parentId);const s=structuredClone(g),w=structuredClone(g),m=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=h+"-cyclic-special-1",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=h+"-cyclic-special-mid",m.label="",d.isGroup&&(s.fromCluster=h,m.toCluster=h),m.id=h+"-cyclic-special-2",m.arrowTypeStart="none",n.setEdge(h,E,s,h+"-cyclic-special-0"),n.setEdge(E,y,w,h+"-cyclic-special-1"),n.setEdge(y,h,m,h+"-cyc=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function J(n){return n=j(Math.abs(n)),n?n[1]:NaN}function K(n,t){return function(e,i){for(var o=e.length,f=[],c=0,u=n[0],p=0;o>0&&u>0&&(p+u+1>i&&(u=Math.max(1,i-p)),f.push(e.substring(o-=u,o+u)),!((p+=u+1)>i));)u=n[c=(c+1)%n.length];return f.reverse().join(t)}}function Q(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var V=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function N(n){if(!(t=V.exec(n)))throw new Error("invalid format: "+n);var t;return new $({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}N.prototype=$.prototype;function $(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function W(n){n:for(var t=n.length,e=1,i=-1,o;e0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var U;function _(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1],f=o-(U=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return f===c?i:f>c?i+new Array(f-c+1).join("0"):f>0?i.slice(0,f)+"."+i.slice(f):"0."+new Array(1-f).join("0")+j(n,Math.max(0,t+f-1))[0]}function G(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const I={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:H,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>G(n*100,t),r:G,s:_,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function X(n){return n}var O=Array.prototype.map,R=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v(n){var t=n.grouping===void 0||n.thousands===void 0?X:K(O.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?X:Q(O.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",p=n.nan===void 0?"NaN":n.nan+"";function F(a){a=N(a);var x=a.fill,M=a.align,m=a.sign,w=a.symbol,l=a.zero,S=a.width,E=a.comma,g=a.precision,L=a.trim,d=a.type;d==="n"?(E=!0,d="g"):I[d]||(g===void 0&&(g=12),L=!0,d="g"),(l||x==="0"&&M==="=")&&(l=!0,x="0",M="=");var Z=w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",q=w==="$"?i:/[%p]/.test(d)?c:"",T=I[d],B=/[defgprs%]/.test(d);g=g===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(r){var y=Z,h=q,b,D,k;if(d==="c")h=T(r)+h,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?p:T(Math.abs(r),g),L&&(r=W(r)),P&&+r==0&&m!=="+"&&(P=!1),y=(P?m==="("?m:u:m==="-"||m==="("?"":m)+y,h=(d==="s"?R[8+U/3]:"")+h+(P&&m==="("?")":""),B){for(b=-1,D=r.length;++bk||k>57){h=(k===46?o+r.slice(b+1):r.slice(b))+h,r=r.slice(0,b);break}}}E&&!l&&(r=t(r,1/0));var z=y.length+r.length+h.length,s=z>1)+y+r+h+s.slice(z);break;default:r=s+y+r+h;break}return f(r)}return C.toString=function(){return a+""},C}function Y(a,x){var M=F((a=N(a),a.type="f",a)),m=Math.max(-8,Math.min(8,Math.floor(J(x)/3)))*3,w=Math.pow(10,-m),l=R[8+m/3];return function(S){return M(w*S)+l}}return{format:F,formatPrefix:Y}}var A,nn,tn;rn({thousands:",",grouping:[3],currency:["$",""]});function rn(n){return A=v(n),nn=A.format,tn=A.formatPrefix,A}export{tn as a,nn as b,J as e,N as f}; diff --git a/lightrag/api/webui/assets/diagram-5UYTHUR4-drHgj1y7.js b/lightrag/api/webui/assets/diagram-5UYTHUR4-drHgj1y7.js deleted file mode 100644 index 96065f83..00000000 --- a/lightrag/api/webui/assets/diagram-5UYTHUR4-drHgj1y7.js +++ /dev/null @@ -1,24 +0,0 @@ -import{p as y}from"./chunk-353BL4L5-BJGenYOY.js";import{_ as l,s as B,g as S,q as F,p as z,a as E,b as P,D as v,H as W,e as D,y as T,E as _,F as A,l as w}from"./index-bjrbS6e8.js";import{p as N}from"./treemap-75Q7IDZK-DNUGBdnj.js";import"./_baseUniq-DknB5v3H.js";import"./_basePickBy-UdMCOwSh.js";import"./clone-g5iXXiWA.js";var x={packet:[]},m=structuredClone(x),L=A.packet,Y=l(()=>{const t=v({...L,..._().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),H=l(()=>m.packet,"getPacket"),I=l(t=>{t.length>0&&m.packet.push(t)},"pushWord"),M=l(()=>{T(),m=structuredClone(x)},"clear"),u={pushWord:I,getPacket:H,getConfig:Y,clear:M,setAccTitle:P,getAccTitle:E,setDiagramTitle:z,getDiagramTitle:F,getAccDescription:S,setAccDescription:B},O=1e4,q=l(t=>{y(t,u);let e=-1,o=[],n=1;const{bitsPerRow:s}=u.getConfig();for(let{start:a,end:r,bits:c,label:f}of t.blocks){if(a!==void 0&&r!==void 0&&r{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*o)return[t,void 0];const n=e*o-1,s=e*o;return[{start:t.start,end:n,label:t.label,bits:n-t.start},{start:s,end:t.end,label:t.label,bits:t.end-s}]},"getNextFittingBlock"),K={parse:l(async t=>{const e=await N("packet",t);w.debug(e),q(e)},"parse")},R=l((t,e,o,n)=>{const s=n.db,a=s.getConfig(),{rowHeight:r,paddingY:c,bitWidth:f,bitsPerRow:d}=a,p=s.getPacket(),i=s.getDiagramTitle(),k=r+c,g=k*(p.length+1)-(i?0:r),b=f*d+2,h=W(e);h.attr("viewbox",`0 0 ${b} ${g}`),D(h,g,b,a.useMaxWidth);for(const[C,$]of p.entries())U(h,$,C,a);h.append("text").text(i).attr("x",b/2).attr("y",g-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),U=l((t,e,o,{rowHeight:n,paddingX:s,paddingY:a,bitWidth:r,bitsPerRow:c,showBits:f})=>{const d=t.append("g"),p=o*(n+a)+a;for(const i of e){const k=i.start%c*r+1,g=(i.end-i.start+1)*r-s;if(d.append("rect").attr("x",k).attr("y",p).attr("width",g).attr("height",n).attr("class","packetBlock"),d.append("text").attr("x",k+g/2).attr("y",p+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!f)continue;const b=i.end===i.start,h=p-2;d.append("text").attr("x",k+(b?g/2:0)).attr("y",h).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",b?"middle":"start").text(i.start),b||d.append("text").attr("x",k+g).attr("y",h).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),X={draw:R},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=l(({packet:t}={})=>{const e=v(j,t);return` - .packetByte { - font-size: ${e.byteFontSize}; - } - .packetByte.start { - fill: ${e.startByteColor}; - } - .packetByte.end { - fill: ${e.endByteColor}; - } - .packetLabel { - fill: ${e.labelColor}; - font-size: ${e.labelFontSize}; - } - .packetTitle { - fill: ${e.titleColor}; - font-size: ${e.titleFontSize}; - } - .packetBlock { - stroke: ${e.blockStrokeColor}; - stroke-width: ${e.blockStrokeWidth}; - fill: ${e.blockFillColor}; - } - `},"styles"),rt={parser:K,db:u,renderer:X,styles:J};export{rt as diagram}; diff --git a/lightrag/api/webui/assets/diagram-VMROVX33-C95hc9hP.js b/lightrag/api/webui/assets/diagram-VMROVX33-C95hc9hP.js deleted file mode 100644 index 71b0d3ce..00000000 --- a/lightrag/api/webui/assets/diagram-VMROVX33-C95hc9hP.js +++ /dev/null @@ -1,24 +0,0 @@ -import{s as he}from"./chunk-SKB7J2MH-ty0WEC-6.js";import{_ as w,D as te,E as ae,H as ue,e as pe,l as K,aZ as P,d as Y,b as fe,a as ge,p as me,q as ye,g as Se,s as ve,F as xe,a_ as be,y as we}from"./index-bjrbS6e8.js";import{p as Ce}from"./chunk-353BL4L5-BJGenYOY.js";import{p as Te}from"./treemap-75Q7IDZK-DNUGBdnj.js";import{b as O}from"./defaultLocale-C4B-KCzX.js";import{o as J}from"./ordinal-BENe2yWM.js";import"./_baseUniq-DknB5v3H.js";import"./_basePickBy-UdMCOwSh.js";import"./clone-g5iXXiWA.js";import"./init-Gi6I4Gst.js";function Le(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function $e(){return this.eachAfter(Le)}function Ae(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function Fe(t,a){for(var l=this,n=[l],o,s,d=-1;l=n.pop();)if(t.call(a,l,++d,this),o=l.children)for(s=o.length-1;s>=0;--s)n.push(o[s]);return this}function ke(t,a){for(var l=this,n=[l],o=[],s,d,h,g=-1;l=n.pop();)if(o.push(l),s=l.children)for(d=0,h=s.length;d=0;)l+=n[o].value;a.value=l})}function _e(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function ze(t){for(var a=this,l=Ve(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var o=n.length;t!==l;)n.splice(o,0,t),t=t.parent;return n}function Ve(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),o=null;for(t=l.pop(),a=n.pop();t===a;)o=t,t=l.pop(),a=n.pop();return o}function De(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Pe(){return Array.from(this)}function Be(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ee(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Re(){var t=this,a,l=[t],n,o,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(o=0,s=n.length;o=0;--h)o.push(s=d[h]=new Z(d[h])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(qe)}function We(){return Q(this).eachBefore(Oe)}function He(t){return t.children}function Ie(t){return Array.isArray(t)?t[1]:null}function Oe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function qe(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function Z(t){this.data=t,this.depth=this.height=0,this.parent=null}Z.prototype=Q.prototype={constructor:Z,count:$e,each:Ae,eachAfter:ke,eachBefore:Fe,find:Ne,sum:Me,sort:_e,path:ze,ancestors:De,descendants:Pe,leaves:Be,links:Ee,copy:We,[Symbol.iterator]:Re};function Ge(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function G(t){return function(){return t}}function Xe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function je(t,a,l,n,o){for(var s=t.children,d,h=-1,g=s.length,c=t.value&&(n-a)/t.value;++hN&&(N=c),M=p*p*R,k=Math.max(N/M,M/m),k>V){p-=c;break}V=k}d.push(g={value:p,dice:x1?n:1)},l}(Ze);function Ke(){var t=Je,a=!1,l=1,n=1,o=[0],s=q,d=q,h=q,g=q,c=q;function u(r){return r.x0=r.y0=0,r.x1=l,r.y1=n,r.eachBefore(b),o=[0],a&&r.eachBefore(Xe),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,p=r.x1-x,m=r.y1-x;p{be(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){we(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(E,"TreeMapDB"),E);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const o={name:n.name,children:n.type==="Leaf"?void 0:[]};for(o.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(o.cssCompiledStyles=[n.cssCompiledStyles]),n.type==="Leaf"&&n.value!==void 0&&(o.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(o);else{const s=l[l.length-1].node;s.children?s.children.push(o):s.children=[o]}n.type!=="Leaf"&&l.push({node:o,level:n.level})}),a}w(le,"buildHierarchy");var Qe=w((t,a)=>{Ce(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const d=s.item;if(!d)continue;const h=s.indent?parseInt(s.indent):0,g=et(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c.join(";"):void 0,b={level:h,name:g,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};l.push(b)}const n=le(l),o=w((s,d)=>{for(const h of s)a.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(n,0)},"populate"),et=w(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Te("treemap",t);K.debug("Treemap AST:",n);const o=(a=re.parser)==null?void 0:a.yy;if(!(o instanceof ne))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Qe(n,o)}catch(l){throw K.error("Error parsing treemap:",l),l}},"parse")},tt=10,B=10,X=25,at=w((t,a,l,n)=>{const o=n.db,s=o.getConfig(),d=s.padding??tt,h=o.getDiagramTitle(),g=o.getRoot(),{themeVariables:c}=ae();if(!g)return;const u=h?30:0,b=ue(a),r=s.nodeWidth?s.nodeWidth*B:960,x=s.nodeHeight?s.nodeHeight*B:500,S=r,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),pe(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(i=>"$"+O(",")(i),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const i=/\.\d+/.exec(e),f=i?i[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const i=e.substring(1);p=w(f=>"$"+O(i||"")(f),"valueFormat")}else p=O(e)}catch(e){K.error("Error creating format function:",e),p=O(",")}const m=J().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=J().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=J().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),R=Q(g).sum(e=>e.value??0).sort((e,i)=>(i.value??0)-(e.value??0)),ee=Ke().size([r,x]).paddingTop(e=>e.children&&e.children.length>0?X+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(R),se=ee.descendants().filter(e=>e.children&&e.children.length>0),W=V.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",X).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),W.append("clipPath").attr("id",(e,i)=>`clip-section-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",X),W.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,i)=>`treemapSection section${i}`).attr("fill",e=>m(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>N(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const i=P({cssCompiledStyles:e.data.cssCompiledStyles});return i.nodeStyles+";"+i.borderStyles.join(";")}),W.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",X/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(e.depth===0)return"display: none;";const i="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const i=Y(this),f=e.data.name;i.text(f);const C=e.x1-e.x0,$=6;let A;s.showValues!==!1&&e.value?A=C-10-30-10-$:A=C-$-6;const F=Math.max(15,A),y=i.node();if(y.getComputedTextLength()>F){const T="...";let L=f;for(;L.length>0;){if(L=f.substring(0,L.length-1),L.length===0){i.text(T),y.getComputedTextLength()>F&&i.text("");break}if(i.text(L+T),y.getComputedTextLength()<=F)break}}}),s.showValues!==!1&&W.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",X/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const i="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")});const ie=ee.leaves(),j=V.selectAll(".treemapLeafGroup").data(ie).enter().append("g").attr("class",(e,i)=>`treemapNode treemapLeafGroup leaf${i}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?m(e.parent.data.name):m(e.data.name)).attr("style",e=>P({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?m(e.parent.data.name):m(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,i)=>`clip-${a}-${i}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const i="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";",f=P({cssCompiledStyles:e.data.cssCompiledStyles});return i+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,i)=>`url(#clip-${a}-${i})`).text(e=>e.data.name).each(function(e){const i=Y(this),f=e.x1-e.x0,C=e.y1-e.y0,$=i.node(),A=4,D=f-2*A,F=C-2*A;if(D<10||F<10){i.style("display","none");return}let y=parseInt(i.style("font-size"),10);const _=8,T=28,L=.6,z=6,H=2;for(;$.getComputedTextLength()>D&&y>_;)y--,i.style("font-size",`${y}px`);let I=Math.max(z,Math.min(T,Math.round(y*L))),U=y+H+I;for(;U>F&&y>_&&(y--,I=Math.max(z,Math.min(T,Math.round(y*L))),!(ID||y<_||F(i.x1-i.x0)/2).attr("y",function(i){return(i.y1-i.y0)/2}).attr("style",i=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(i.data.name)+";",C=P({cssCompiledStyles:i.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(i,f)=>`url(#clip-${a}-${f})`).text(i=>i.value?p(i.value):"").each(function(i){const f=Y(this),C=this.parentNode;if(!C){f.style("display","none");return}const $=Y(C).select(".treemapLabel");if($.empty()||$.style("display")==="none"){f.style("display","none");return}const A=parseFloat($.style("font-size")),D=28,F=.6,y=6,_=2,T=Math.max(y,Math.min(D,Math.round(A*F)));f.style("font-size",`${T}px`);const z=(i.y1-i.y0)/2+A/2+_;f.attr("y",z);const H=i.x1-i.x0,ce=i.y1-i.y0-4,de=H-2*4;f.node().getComputedTextLength()>de||z+T>ce||T{const a=te(rt,t);return` - .treemapNode.section { - stroke: ${a.sectionStrokeColor}; - stroke-width: ${a.sectionStrokeWidth}; - fill: ${a.sectionFillColor}; - } - .treemapNode.leaf { - stroke: ${a.leafStrokeColor}; - stroke-width: ${a.leafStrokeWidth}; - fill: ${a.leafFillColor}; - } - .treemapLabel { - fill: ${a.labelColor}; - font-size: ${a.labelFontSize}; - } - .treemapValue { - fill: ${a.valueColor}; - font-size: ${a.valueFontSize}; - } - .treemapTitle { - fill: ${a.titleColor}; - font-size: ${a.titleFontSize}; - } - `},"getStyles"),it=st,vt={parser:re,get db(){return new ne},renderer:lt,styles:it};export{vt as diagram}; diff --git a/lightrag/api/webui/assets/diagram-ZTM2IBQH-Fm-2H3OV.js b/lightrag/api/webui/assets/diagram-ZTM2IBQH-Fm-2H3OV.js deleted file mode 100644 index 8109b456..00000000 --- a/lightrag/api/webui/assets/diagram-ZTM2IBQH-Fm-2H3OV.js +++ /dev/null @@ -1,43 +0,0 @@ -import{p as k}from"./chunk-353BL4L5-BJGenYOY.js";import{_ as l,s as R,g as E,q as F,p as I,a as _,b as D,H as G,y as P,D as y,E as C,F as z,l as H,K as V}from"./index-bjrbS6e8.js";import{p as W}from"./treemap-75Q7IDZK-DNUGBdnj.js";import"./_baseUniq-DknB5v3H.js";import"./_basePickBy-UdMCOwSh.js";import"./clone-g5iXXiWA.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:h},m=structuredClone(w),B=z.radar,j=l(()=>y({...B,...C().radar}),"getConfig"),b=l(()=>m.axes,"getAxes"),q=l(()=>m.curves,"getCurves"),K=l(()=>m.options,"getOptions"),N=l(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),U=l(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:X(t.entries)}))},"setCurves"),X=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var o;return((o=s.axis)==null?void 0:o.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),Y=l(a=>{var e,r,s,o,i;const t=a.reduce((n,c)=>(n[c.name]=c,n),{});m.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??h.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??h.ticks,max:((s=t.max)==null?void 0:s.value)??h.max,min:((o=t.min)==null?void 0:o.value)??h.min,graticule:((i=t.graticule)==null?void 0:i.value)??h.graticule}},"setOptions"),Z=l(()=>{P(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:q,getOptions:K,setAxes:N,setCurves:U,setOptions:Y,getConfig:j,clear:Z,setAccTitle:D,getAccTitle:_,setDiagramTitle:I,getDiagramTitle:F,getAccDescription:E,setAccDescription:R},J=l(a=>{k(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),Q={parse:l(async a=>{const t=await W("radar",a);H.debug(t),J(t)},"parse")},tt=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),u=G(t),p=et(u,c),g=n.max??Math.max(...i.map(f=>Math.max(...f.entries))),x=n.min,v=Math.min(c.width,c.height)/2;at(p,o,v,n.ticks,n.graticule),rt(p,o,v,c),M(p,o,i,x,g,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),et=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return a.attr("viewbox",`0 0 ${e} ${r}`).attr("width",e).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),at=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o{const p=2*u*Math.PI/o-Math.PI/2,g=n*Math.cos(p),x=n*Math.sin(p);return`${g},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),rt=l((a,t,e,r)=>{const s=t.length;for(let o=0;o{if(d.entries.length!==n)return;const p=d.entries.map((g,x)=>{const v=2*Math.PI*x/n-Math.PI/2,f=A(g,r,s,c),O=f*Math.cos(v),S=f*Math.sin(v);return{x:O,y:S}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",p.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var st={draw:tt},nt=l((a,t)=>{let e="";for(let r=0;r{const t=V(),e=C(),r=y(t,e.themeVariables),s=y(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),it=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=ot(a);return` - .radarTitle { - font-size: ${t.fontSize}; - color: ${t.titleColor}; - dominant-baseline: hanging; - text-anchor: middle; - } - .radarAxisLine { - stroke: ${e.axisColor}; - stroke-width: ${e.axisStrokeWidth}; - } - .radarAxisLabel { - dominant-baseline: middle; - text-anchor: middle; - font-size: ${e.axisLabelFontSize}px; - color: ${e.axisColor}; - } - .radarGraticule { - fill: ${e.graticuleColor}; - fill-opacity: ${e.graticuleOpacity}; - stroke: ${e.graticuleColor}; - stroke-width: ${e.graticuleStrokeWidth}; - } - .radarLegendText { - text-anchor: start; - font-size: ${e.legendFontSize}px; - dominant-baseline: hanging; - } - ${nt(t,e)} - `},"styles"),mt={parser:Q,db:$,renderer:st,styles:it};export{mt as diagram}; diff --git a/lightrag/api/webui/assets/erDiagram-3M52JZNH-Df8Y6784.js b/lightrag/api/webui/assets/erDiagram-3M52JZNH-Df8Y6784.js deleted file mode 100644 index 9667b35c..00000000 --- a/lightrag/api/webui/assets/erDiagram-3M52JZNH-Df8Y6784.js +++ /dev/null @@ -1,60 +0,0 @@ -import{g as Dt}from"./chunk-BFAMUDN2-DaWGHPR3.js";import{s as wt}from"./chunk-SKB7J2MH-ty0WEC-6.js";import{_ as u,b as Vt,a as Lt,s as Mt,g as Bt,p as Ft,q as Yt,c as tt,l as D,y as Pt,x as zt,A as Gt,B as Kt,o as Zt,r as Ut,d as jt,u as Wt}from"./index-bjrbS6e8.js";import{c as Qt}from"./channel-oXqxytzI.js";var dt=function(){var s=u(function(R,n,a,c){for(a=a||{},c=R.length;c--;a[R[c]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],h=[1,10],d=[1,11],o=[1,12],l=[1,13],f=[1,20],_=[1,21],E=[1,22],V=[1,23],Z=[1,24],S=[1,19],et=[1,25],U=[1,26],T=[1,18],L=[1,33],st=[1,34],it=[1,35],rt=[1,36],nt=[1,37],pt=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],A=[1,43],M=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],N=[1,58],P=[1,62],z=[1,64],j=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],yt=[63,64,65,66,67],ft=[1,81],_t=[1,80],gt=[1,78],bt=[1,79],mt=[6,10,42,47],v=[6,10,13,41,42,47,48,49],W=[1,89],Q=[1,88],X=[1,87],G=[19,56],Et=[1,98],kt=[1,97],at=[19,56,58,60],ct={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:u(function(n,a,c,r,p,t,K){var e=t.length-1;switch(p){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 56:case 64:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 76:case 77:this.$=t[e].replace(/"/g,"");break;case 55:case 78:this.$=t[e];break;case 57:t[e].push(t[e-1]),this.$=t[e];break;case 58:this.$={type:t[e-1],name:t[e]};break;case 59:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 60:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 61:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 62:case 63:case 66:this.$=t[e];break;case 65:t[e-2].push(t[e]),this.$=t[e-2];break;case 67:this.$=t[e].replace(/"/g,"");break;case 68:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:27,11:9,22:h,24:d,26:o,28:l,29:14,30:15,31:16,32:17,33:f,34:_,35:E,36:V,37:Z,40:S,43:et,44:U,50:T},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:L,64:st,65:it,66:rt,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(pt,[2,54]),s(pt,[2,55]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:41,40:O,41:A},{16:44,40:O,41:A},{16:45,40:O,41:A},s(i,[2,4]),{11:46,40:S,50:T},{16:47,40:O,41:A},{18:48,19:[1,49],51:50,52:51,56:M},{11:53,40:S,50:T},{62:54,68:[1,55],69:[1,56]},s(B,[2,69]),s(B,[2,70]),s(B,[2,71]),s(B,[2,72]),s(B,[2,73]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:F,38:57,41:Y,42:N,45:59,46:60,48:P,49:z},s(j,[2,37]),s(j,[2,38]),{16:65,40:O,41:A,42:N},{13:F,38:66,41:Y,42:N,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},s(i,[2,17],{61:32,12:69,17:[1,70],42:N,63:L,64:st,65:it,66:rt,67:nt}),{19:[1,71]},s(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:M},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:L,64:st,65:it,66:rt,67:nt},s(yt,[2,74]),s(yt,[2,75]),{6:ft,10:_t,39:77,42:gt,47:bt},{40:[1,82],41:[1,83]},s(mt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),s(v,[2,45]),s(v,[2,50]),s(v,[2,51]),s(v,[2,52]),s(v,[2,53]),s(i,[2,41],{42:N}),{6:ft,10:_t,39:85,42:gt,47:bt},{14:86,40:W,50:Q,70:X},{16:90,40:O,41:A},{11:91,40:S,50:T},{18:92,19:[1,93],51:50,52:51,56:M},s(i,[2,12]),{19:[2,57]},s(G,[2,58],{54:94,55:95,57:96,59:Et,60:kt}),s([19,56,59,60],[2,63]),s(i,[2,22],{15:[1,100],17:[1,99]}),s([40,50],[2,68]),s(i,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(j,[2,39]),s(j,[2,40]),s(v,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,76]),s(i,[2,77]),s(i,[2,78]),{13:[1,102],42:N},{13:[1,104],15:[1,103]},{19:[1,105]},s(i,[2,15]),s(G,[2,59],{55:106,58:[1,107],60:kt}),s(G,[2,60]),s(at,[2,64]),s(G,[2,67]),s(at,[2,66]),{18:108,19:[1,109],51:50,52:51,56:M},{16:110,40:O,41:A},s(mt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:W,50:Q,70:X},{16:112,40:O,41:A},{14:113,40:W,50:Q,70:X},s(i,[2,13]),s(G,[2,61]),{57:114,59:Et},{19:[1,115]},s(i,[2,20]),s(i,[2,23],{17:[1,116],42:N}),s(i,[2,11]),{13:[1,117],42:N},s(i,[2,10]),s(at,[2,65]),s(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:M},{14:120,40:W,50:Q,70:X},{19:[1,121]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:u(function(n,a){if(a.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=a,c}},"parseError"),parse:u(function(n){var a=this,c=[0],r=[],p=[null],t=[],K=this.table,e="",H=0,St=0,xt=2,Tt=1,It=t.slice.call(arguments,1),y=Object.create(this.lexer),x={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&(x.yy[lt]=this.yy[lt]);y.setInput(n,x.yy),x.yy.lexer=y,x.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var ot=y.yylloc;t.push(ot);var vt=y.options&&y.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(b){c.length=c.length-2*b,p.length=p.length-b,t.length=t.length-b}u(Ct,"popStack");function Ot(){var b;return b=r.pop()||y.lex()||Tt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}u(Ot,"lex");for(var g,I,m,ht,C={},J,k,At,$;;){if(I=c[c.length-1],this.defaultActions[I]?m=this.defaultActions[I]:((g===null||typeof g>"u")&&(g=Ot()),m=K[I]&&K[I][g]),typeof m>"u"||!m.length||!m[0]){var ut="";$=[];for(J in K[I])this.terminals_[J]&&J>xt&&$.push("'"+this.terminals_[J]+"'");y.showPosition?ut="Parse error on line "+(H+1)+`: -`+y.showPosition()+` -Expecting `+$.join(", ")+", got '"+(this.terminals_[g]||g)+"'":ut="Parse error on line "+(H+1)+": Unexpected "+(g==Tt?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(ut,{text:y.match,token:this.terminals_[g]||g,line:y.yylineno,loc:ot,expected:$})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+g);switch(m[0]){case 1:c.push(g),p.push(y.yytext),t.push(y.yylloc),c.push(m[1]),g=null,St=y.yyleng,e=y.yytext,H=y.yylineno,ot=y.yylloc;break;case 2:if(k=this.productions_[m[1]][1],C.$=p[p.length-k],C._$={first_line:t[t.length-(k||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(k||1)].first_column,last_column:t[t.length-1].last_column},vt&&(C._$.range=[t[t.length-(k||1)].range[0],t[t.length-1].range[1]]),ht=this.performAction.apply(C,[e,St,H,x.yy,m[1],p,t].concat(It)),typeof ht<"u")return ht;k&&(c=c.slice(0,-1*k*2),p=p.slice(0,-1*k),t=t.slice(0,-1*k)),c.push(this.productions_[m[1]][0]),p.push(C.$),t.push(C._$),At=K[c[c.length-2]][c[c.length-1]],c.push(At);break;case 3:return!0}}return!0},"parse")},Rt=function(){var R={EOF:1,parseError:u(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:u(function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:u(function(n){var a=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===r.length?this.yylloc.first_column:0)+r[r.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(n){this.unput(this.match.slice(n))},"less"),pastInput:u(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+` -`+a+"^"},"showPosition"),test_match:u(function(n,a){var c,r,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),r=n[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in p)this[t]=p[t];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,c,r;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),t=0;ta[0].length)){if(a=c,r=t,this.options.backtrack_lexer){if(n=this.test_match(c,p[t]),n!==!1)return n;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(n=this.test_match(a,p[r]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var a=this.next();return a||this.lex()},"lex"),begin:u(function(a){this.conditionStack.push(a)},"begin"),popState:u(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:u(function(a){this.begin(a)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(a,c,r,p){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:return 56;case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;case 30:return c.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;case 40:return 43;case 41:return 63;case 42:return 65;case 43:return 65;case 44:return 65;case 45:return 63;case 46:return 63;case 47:return 64;case 48:return 64;case 49:return 64;case 50:return 64;case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:return 66;case 56:return 66;case 57:return 66;case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:return 69;case 65:return 69;case 66:return 68;case 67:return 68;case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return c.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};return R}();ct.lexer=Rt;function q(){this.yy={}}return u(q,"Parser"),q.prototype=ct,ct.Parser=q,new q}();dt.parser=dt;var Xt=dt,w,qt=(w=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Vt,this.getAccTitle=Lt,this.setAccDescription=Mt,this.getAccDescription=Bt,this.setDiagramTitle=Ft,this.getDiagramTitle=Yt,this.getConfig=u(()=>tt().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(i,h=""){var d;return this.entities.has(i)?!((d=this.entities.get(i))!=null&&d.alias)&&h&&(this.entities.get(i).alias=h,D.info(`Add alias '${h}' to entity '${i}'`)):(this.entities.set(i,{id:`entity-${i}-${this.entities.size}`,label:i,attributes:[],alias:h,shape:"erBox",look:tt().look??"default",cssClasses:"default",cssStyles:[]}),D.info("Added new entity :",i)),this.entities.get(i)}getEntity(i){return this.entities.get(i)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(i,h){const d=this.addEntity(i);let o;for(o=h.length-1;o>=0;o--)h[o].keys||(h[o].keys=[]),h[o].comment||(h[o].comment=""),d.attributes.push(h[o]),D.debug("Added attribute ",h[o].name)}addRelationship(i,h,d,o){const l=this.entities.get(i),f=this.entities.get(d);if(!l||!f)return;const _={entityA:l.id,roleA:h,entityB:f.id,relSpec:o};this.relationships.push(_),D.debug("Added new relationship :",_)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(i){this.direction=i}getCompiledStyles(i){let h=[];for(const d of i){const o=this.classes.get(d);o!=null&&o.styles&&(h=[...h,...o.styles??[]].map(l=>l.trim())),o!=null&&o.textStyles&&(h=[...h,...o.textStyles??[]].map(l=>l.trim()))}return h}addCssStyles(i,h){for(const d of i){const o=this.entities.get(d);if(!h||!o)return;for(const l of h)o.cssStyles.push(l)}}addClass(i,h){i.forEach(d=>{let o=this.classes.get(d);o===void 0&&(o={id:d,styles:[],textStyles:[]},this.classes.set(d,o)),h&&h.forEach(function(l){if(/color/.exec(l)){const f=l.replace("fill","bgFill");o.textStyles.push(f)}o.styles.push(l)})})}setClass(i,h){for(const d of i){const o=this.entities.get(d);if(o)for(const l of h)o.cssClasses+=" "+l}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Pt()}getData(){const i=[],h=[],d=tt();for(const l of this.entities.keys()){const f=this.entities.get(l);f&&(f.cssCompiledStyles=this.getCompiledStyles(f.cssClasses.split(" ")),i.push(f))}let o=0;for(const l of this.relationships){const f={id:zt(l.entityA,l.entityB,{prefix:"id",counter:o++}),type:"normal",curve:"basis",start:l.entityA,end:l.entityB,label:l.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:l.relSpec.cardB.toLowerCase(),arrowTypeEnd:l.relSpec.cardA.toLowerCase(),pattern:l.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:d.look};h.push(f)}return{nodes:i,edges:h,other:{},config:d,direction:"TB"}}},u(w,"ErDB"),w),Nt={};Kt(Nt,{draw:()=>Ht});var Ht=u(async function(s,i,h,d){D.info("REF0:"),D.info("Drawing er diagram (unified)",i);const{securityLevel:o,er:l,layout:f}=tt(),_=d.db.getData(),E=Dt(i,o);_.type=d.type,_.layoutAlgorithm=Zt(f),_.config.flowchart.nodeSpacing=(l==null?void 0:l.nodeSpacing)||140,_.config.flowchart.rankSpacing=(l==null?void 0:l.rankSpacing)||80,_.direction=d.db.getDirection(),_.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],_.diagramId=i,await Ut(_,E),_.layoutAlgorithm==="elk"&&E.select(".edges").lower();const V=E.selectAll('[id*="-background"]');Array.from(V).length>0&&V.each(function(){const S=jt(this),U=S.attr("id").replace("-background",""),T=E.select(`#${CSS.escape(U)}`);if(!T.empty()){const L=T.attr("transform");S.attr("transform",L)}});const Z=8;Wt.insertTitle(E,"erDiagramTitleText",(l==null?void 0:l.titleTopMargin)??25,d.db.getDiagramTitle()),wt(E,Z,"erDiagram",(l==null?void 0:l.useMaxWidth)??!0)},"draw"),Jt=u((s,i)=>{const h=Qt,d=h(s,"r"),o=h(s,"g"),l=h(s,"b");return Gt(d,o,l,i)},"fade"),$t=u(s=>` - .entityBox { - fill: ${s.mainBkg}; - stroke: ${s.nodeBorder}; - } - - .relationshipLabelBox { - fill: ${s.tertiaryColor}; - opacity: 0.7; - background-color: ${s.tertiaryColor}; - rect { - opacity: 0.5; - } - } - - .labelBkg { - background-color: ${Jt(s.tertiaryColor,.5)}; - } - - .edgeLabel .label { - fill: ${s.nodeBorder}; - font-size: 14px; - } - - .label { - font-family: ${s.fontFamily}; - color: ${s.nodeTextColor||s.textColor}; - } - - .edge-pattern-dashed { - stroke-dasharray: 8,8; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon - { - fill: ${s.mainBkg}; - stroke: ${s.nodeBorder}; - stroke-width: 1px; - } - - .relationshipLine { - stroke: ${s.lineColor}; - stroke-width: 1; - fill: none; - } - - .marker { - fill: none !important; - stroke: ${s.lineColor} !important; - stroke-width: 1; - } -`,"getStyles"),te=$t,ne={parser:Xt,get db(){return new qt},renderer:Nt,styles:te};export{ne as diagram}; diff --git a/lightrag/api/webui/assets/flowDiagram-KYDEHFYC-DqicljNB.js b/lightrag/api/webui/assets/flowDiagram-KYDEHFYC-DqicljNB.js deleted file mode 100644 index e47bed66..00000000 --- a/lightrag/api/webui/assets/flowDiagram-KYDEHFYC-DqicljNB.js +++ /dev/null @@ -1,162 +0,0 @@ -import{g as q1}from"./chunk-E2GYISFI-Csg-WUa_.js";import{_ as m,n as O1,l as ee,c as be,d as Se,o as H1,r as X1,u as i1,b as Q1,s as J1,p as Z1,a as $1,g as et,q as tt,k as st,t as it,J as rt,v as nt,x as s1,y as at,z as ut,A as lt}from"./index-bjrbS6e8.js";import{g as ot}from"./chunk-BFAMUDN2-DaWGHPR3.js";import{s as ct}from"./chunk-SKB7J2MH-ty0WEC-6.js";import{c as ht}from"./channel-oXqxytzI.js";var dt="flowchart-",Pe,pt=(Pe=class{constructor(){this.vertexCounter=0,this.config=be(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Q1,this.setAccDescription=J1,this.setDiagramTitle=Z1,this.getAccTitle=$1,this.getAccDescription=et,this.getDiagramTitle=tt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return st.sanitizeText(i,this.config)}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return n.domId;return i}addVertex(i,n,a,u,l,f,c={},A){var V,C;if(!i||i.trim().length===0)return;let r;if(A!==void 0){let p;A.includes(` -`)?p=A+` -`:p=`{ -`+A+` -}`,r=it(p,{schema:rt})}const k=this.edges.find(p=>p.id===i);if(k){const p=r;(p==null?void 0:p.animate)!==void 0&&(k.animate=p.animate),(p==null?void 0:p.animation)!==void 0&&(k.animation=p.animation);return}let E,b=this.vertices.get(i);if(b===void 0&&(b={id:i,labelType:"text",domId:dt+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,b)),this.vertexCounter++,n!==void 0?(this.config=be(),E=this.sanitizeText(n.text.trim()),b.labelType=n.type,E.startsWith('"')&&E.endsWith('"')&&(E=E.substring(1,E.length-1)),b.text=E):b.text===void 0&&(b.text=i),a!==void 0&&(b.type=a),u!=null&&u.forEach(p=>{b.styles.push(p)}),l!=null&&l.forEach(p=>{b.classes.push(p)}),f!==void 0&&(b.dir=f),b.props===void 0?b.props=c:c!==void 0&&Object.assign(b.props,c),r!==void 0){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!nt(r.shape))throw new Error(`No such shape: ${r.shape}.`);b.type=r==null?void 0:r.shape}r!=null&&r.label&&(b.text=r==null?void 0:r.label),r!=null&&r.icon&&(b.icon=r==null?void 0:r.icon,!((V=r.label)!=null&&V.trim())&&b.text===i&&(b.text="")),r!=null&&r.form&&(b.form=r==null?void 0:r.form),r!=null&&r.pos&&(b.pos=r==null?void 0:r.pos),r!=null&&r.img&&(b.img=r==null?void 0:r.img,!((C=r.label)!=null&&C.trim())&&b.text===i&&(b.text="")),r!=null&&r.constraint&&(b.constraint=r.constraint),r.w&&(b.assetWidth=Number(r.w)),r.h&&(b.assetHeight=Number(r.h))}}addSingleLink(i,n,a,u){const c={start:i,end:n,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};ee.info("abc78 Got edge...",c);const A=a.text;if(A!==void 0&&(c.text=this.sanitizeText(A.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"')&&(c.text=c.text.substring(1,c.text.length-1)),c.labelType=A.type),a!==void 0&&(c.type=a.type,c.stroke=a.stroke,c.length=a.length>10?10:a.length),u&&!this.edges.some(r=>r.id===u))c.id=u,c.isUserDefinedId=!0;else{const r=this.edges.filter(k=>k.start===c.start&&k.end===c.end);r.length===0?c.id=s1(c.start,c.end,{counter:0,prefix:"L"}):c.id=s1(c.start,c.end,{counter:r.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))ee.info("Pushing edge..."),this.edges.push(c);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. - -Initialize mermaid with maxEdges set to a higher number to allow more edges. -You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.`)}isLinkData(i){return i!==null&&typeof i=="object"&&"id"in i&&typeof i.id=="string"}addLink(i,n,a){const u=this.isLinkData(a)?a.id.replace("@",""):void 0;ee.info("addLink",i,n,u);for(const l of i)for(const f of n){const c=l===i[i.length-1],A=f===n[0];c&&A?this.addSingleLink(l,f,a,u):this.addSingleLink(l,f,a,void 0)}}updateLinkInterpolate(i,n){i.forEach(a=>{a==="default"?this.edges.defaultInterpolate=n:this.edges[a].interpolate=n})}updateLink(i,n){i.forEach(a=>{var u,l,f,c,A,r;if(typeof a=="number"&&a>=this.edges.length)throw new Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);a==="default"?this.edges.defaultStyle=n:(this.edges[a].style=n,(((l=(u=this.edges[a])==null?void 0:u.style)==null?void 0:l.length)??0)>0&&!((c=(f=this.edges[a])==null?void 0:f.style)!=null&&c.some(k=>k==null?void 0:k.startsWith("fill")))&&((r=(A=this.edges[a])==null?void 0:A.style)==null||r.push("fill:none")))})}addClass(i,n){const a=n.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i.split(",").forEach(u=>{let l=this.classes.get(u);l===void 0&&(l={id:u,styles:[],textStyles:[]},this.classes.set(u,l)),a!=null&&a.forEach(f=>{if(/color/.exec(f)){const c=f.replace("fill","bgFill");l.textStyles.push(c)}l.styles.push(f)})})}setDirection(i){this.direction=i,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(i,n){for(const a of i.split(",")){const u=this.vertices.get(a);u&&u.classes.push(n);const l=this.edges.find(c=>c.id===a);l&&l.classes.push(n);const f=this.subGraphLookup.get(a);f&&f.classes.push(n)}}setTooltip(i,n){if(n!==void 0){n=this.sanitizeText(n);for(const a of i.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,n)}}setClickFun(i,n,a){const u=this.lookUpDomId(i);if(be().securityLevel!=="loose"||n===void 0)return;let l=[];if(typeof a=="string"){l=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let c=0;c{const c=document.querySelector(`[id="${u}"]`);c!==null&&c.addEventListener("click",()=>{i1.runFunc(n,...l)},!1)}))}setLink(i,n,a){i.split(",").forEach(u=>{const l=this.vertices.get(u);l!==void 0&&(l.link=i1.formatUrl(n,this.config),l.linkTarget=a)}),this.setClass(i,"clickable")}getTooltip(i){return this.tooltips.get(i)}setClickEvent(i,n,a){i.split(",").forEach(u=>{this.setClickFun(u,n,a)}),this.setClass(i,"clickable")}bindFunctions(i){this.funs.forEach(n=>{n(i)})}getDirection(){var i;return(i=this.direction)==null?void 0:i.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(i){let n=Se(".mermaidTooltip");(n._groups||n)[0][0]===null&&(n=Se("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Se(i).select("svg").selectAll("g.node").on("mouseover",l=>{var r;const f=Se(l.currentTarget);if(f.attr("title")===null)return;const A=(r=l.currentTarget)==null?void 0:r.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.text(f.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),n.html(n.html().replace(/<br\/>/g,"
")),f.classed("hover",!0)}).on("mouseout",l=>{n.transition().duration(500).style("opacity",0),Se(l.currentTarget).classed("hover",!1)})}clear(i="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=i,this.config=be(),at()}setGen(i){this.version=i||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(i,n,a){let u=i.text.trim(),l=a.text;i===a&&/\s/.exec(a.text)&&(u=void 0);const c=m(b=>{const V={boolean:{},number:{},string:{}},C=[];let p;return{nodeList:b.filter(function(W){const Z=typeof W;return W.stmt&&W.stmt==="dir"?(p=W.value,!1):W.trim()===""?!1:Z in V?V[Z].hasOwnProperty(W)?!1:V[Z][W]=!0:C.includes(W)?!1:C.push(W)}),dir:p}},"uniq")(n.flat()),A=c.nodeList;let r=c.dir;const k=be().flowchart??{};if(r=r??(k.inheritDir?this.getDirection()??be().direction??void 0:void 0),this.version==="gen-1")for(let b=0;b2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=n,this.subGraphs[n].id===i)return{result:!0,count:0};let u=0,l=1;for(;u=0){const c=this.indexNodes2(i,f);if(c.result)return{result:!0,count:l+c.count};l=l+c.count}u=u+1}return{result:!1,count:l}}getDepthFirstPos(i){return this.posCrossRef[i]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(i){let n=i.trim(),a="arrow_open";switch(n[0]){case"<":a="arrow_point",n=n.slice(1);break;case"x":a="arrow_cross",n=n.slice(1);break;case"o":a="arrow_circle",n=n.slice(1);break}let u="normal";return n.includes("=")&&(u="thick"),n.includes(".")&&(u="dotted"),{type:a,stroke:u}}countChar(i,n){const a=n.length;let u=0;for(let l=0;l":u="arrow_point",n.startsWith("<")&&(u="double_"+u,a=a.slice(1));break;case"o":u="arrow_circle",n.startsWith("o")&&(u="double_"+u,a=a.slice(1));break}let l="normal",f=a.length-1;a.startsWith("=")&&(l="thick"),a.startsWith("~")&&(l="invisible");const c=this.countChar(".",a);return c&&(l="dotted",f=c),{type:u,stroke:l,length:f}}destructLink(i,n){const a=this.destructEndLink(i);let u;if(n){if(u=this.destructStartLink(n),u.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(u.type==="arrow_open")u.type=a.type;else{if(u.type!==a.type)return{type:"INVALID",stroke:"INVALID"};u.type="double_"+u.type}return u.type==="double_arrow"&&(u.type="double_arrow_point"),u.length=a.length,u}return a}exists(i,n){for(const a of i)if(a.nodes.includes(n))return!0;return!1}makeUniq(i,n){const a=[];return i.nodes.forEach((u,l)=>{this.exists(n,u)||a.push(i.nodes[l])}),{nodes:a}}getTypeFromVertex(i){if(i.img)return"imageSquare";if(i.icon)return i.form==="circle"?"iconCircle":i.form==="square"?"iconSquare":i.form==="rounded"?"iconRounded":"icon";switch(i.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return i.type}}findNode(i,n){return i.find(a=>a.id===n)}destructEdgeType(i){let n="none",a="arrow_point";switch(i){case"arrow_point":case"arrow_circle":case"arrow_cross":a=i;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":n=i.replace("double_",""),a=n;break}return{arrowTypeStart:n,arrowTypeEnd:a}}addNodeFromVertex(i,n,a,u,l,f){var k;const c=a.get(i.id),A=u.get(i.id)??!1,r=this.findNode(n,i.id);if(r)r.cssStyles=i.styles,r.cssCompiledStyles=this.getCompiledStyles(i.classes),r.cssClasses=i.classes.join(" ");else{const E={id:i.id,label:i.text,labelStyle:"",parentId:c,padding:((k=l.flowchart)==null?void 0:k.padding)||8,cssStyles:i.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...i.classes]),cssClasses:"default "+i.classes.join(" "),dir:i.dir,domId:i.domId,look:f,link:i.link,linkTarget:i.linkTarget,tooltip:this.getTooltip(i.id),icon:i.icon,pos:i.pos,img:i.img,assetWidth:i.assetWidth,assetHeight:i.assetHeight,constraint:i.constraint};A?n.push({...E,isGroup:!0,shape:"rect"}):n.push({...E,isGroup:!1,shape:this.getTypeFromVertex(i)})}}getCompiledStyles(i){let n=[];for(const a of i){const u=this.classes.get(a);u!=null&&u.styles&&(n=[...n,...u.styles??[]].map(l=>l.trim())),u!=null&&u.textStyles&&(n=[...n,...u.textStyles??[]].map(l=>l.trim()))}return n}getData(){const i=be(),n=[],a=[],u=this.getSubGraphs(),l=new Map,f=new Map;for(let r=u.length-1;r>=0;r--){const k=u[r];k.nodes.length>0&&f.set(k.id,!0);for(const E of k.nodes)l.set(E,k.id)}for(let r=u.length-1;r>=0;r--){const k=u[r];n.push({id:k.id,label:k.title,labelStyle:"",parentId:l.get(k.id),padding:8,cssCompiledStyles:this.getCompiledStyles(k.classes),cssClasses:k.classes.join(" "),shape:"rect",dir:k.dir,isGroup:!0,look:i.look})}this.getVertices().forEach(r=>{this.addNodeFromVertex(r,n,l,f,i,i.look||"classic")});const A=this.getEdges();return A.forEach((r,k)=>{var p;const{arrowTypeStart:E,arrowTypeEnd:b}=this.destructEdgeType(r.type),V=[...A.defaultStyle??[]];r.style&&V.push(...r.style);const C={id:s1(r.start,r.end,{counter:k,prefix:"L"},r.id),isUserDefinedId:r.isUserDefinedId,start:r.start,end:r.end,type:r.type??"normal",label:r.text,labelpos:"c",thickness:r.stroke,minlen:r.length,classes:(r==null?void 0:r.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(r==null?void 0:r.stroke)==="invisible"||(r==null?void 0:r.type)==="arrow_open"?"none":E,arrowTypeEnd:(r==null?void 0:r.stroke)==="invisible"||(r==null?void 0:r.type)==="arrow_open"?"none":b,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(r.classes),labelStyle:V,style:V,pattern:r.stroke,look:i.look,animate:r.animate,animation:r.animation,curve:r.interpolate||this.edges.defaultInterpolate||((p=i.flowchart)==null?void 0:p.curve)};a.push(C)}),{nodes:n,edges:a,other:{},config:i}}defaultConfig(){return ut.flowchart}},m(Pe,"FlowDB"),Pe),ft=m(function(s,i){return i.db.getClasses()},"getClasses"),gt=m(async function(s,i,n,a){var V;ee.info("REF0:"),ee.info("Drawing state diagram (v2)",i);const{securityLevel:u,flowchart:l,layout:f}=be();let c;u==="sandbox"&&(c=Se("#i"+i));const A=u==="sandbox"?c.nodes()[0].contentDocument:document;ee.debug("Before getData: ");const r=a.db.getData();ee.debug("Data: ",r);const k=ot(i,u),E=a.db.getDirection();r.type=a.type,r.layoutAlgorithm=H1(f),r.layoutAlgorithm==="dagre"&&f==="elk"&&ee.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),r.direction=E,r.nodeSpacing=(l==null?void 0:l.nodeSpacing)||50,r.rankSpacing=(l==null?void 0:l.rankSpacing)||50,r.markers=["point","circle","cross"],r.diagramId=i,ee.debug("REF1:",r),await X1(r,k);const b=((V=r.config.flowchart)==null?void 0:V.diagramPadding)??8;i1.insertTitle(k,"flowchartTitleText",(l==null?void 0:l.titleTopMargin)||0,a.db.getDiagramTitle()),ct(k,b,"flowchart",(l==null?void 0:l.useMaxWidth)||!1);for(const C of r.nodes){const p=Se(`#${i} [id="${C.id}"]`);if(!p||!C.link)continue;const J=A.createElementNS("http://www.w3.org/2000/svg","a");J.setAttributeNS("http://www.w3.org/2000/svg","class",C.cssClasses),J.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),u==="sandbox"?J.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):C.linkTarget&&J.setAttributeNS("http://www.w3.org/2000/svg","target",C.linkTarget);const W=p.insert(function(){return J},":first-child"),Z=p.select(".label-container");Z&&W.append(function(){return Z.node()});const Ae=p.select(".label");Ae&&W.append(function(){return Ae.node()})}},"draw"),bt={getClasses:ft,draw:gt},r1=function(){var s=m(function(ge,h,d,g){for(d=d||{},g=ge.length;g--;d[ge[g]]=h);return d},"o"),i=[1,4],n=[1,3],a=[1,5],u=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],l=[2,2],f=[1,13],c=[1,14],A=[1,15],r=[1,16],k=[1,23],E=[1,25],b=[1,26],V=[1,27],C=[1,49],p=[1,48],J=[1,29],W=[1,30],Z=[1,31],Ae=[1,32],Me=[1,33],v=[1,44],I=[1,46],w=[1,42],R=[1,47],N=[1,43],G=[1,50],P=[1,45],O=[1,51],M=[1,52],Ue=[1,34],We=[1,35],ze=[1,36],je=[1,37],pe=[1,57],y=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],te=[1,61],se=[1,60],ie=[1,62],De=[8,9,11,75,77,78],n1=[1,78],xe=[1,91],Te=[1,96],Ee=[1,95],ye=[1,92],Fe=[1,88],_e=[1,94],Be=[1,90],Le=[1,97],Ve=[1,93],ve=[1,98],Ie=[1,89],ke=[8,9,10,11,40,75,77,78],z=[8,9,10,11,40,46,75,77,78],q=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],a1=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],we=[44,60,89,102,105,106,109,111,114,115,116],u1=[1,121],l1=[1,122],Ke=[1,124],Ye=[1,123],o1=[44,60,62,74,89,102,105,106,109,111,114,115,116],c1=[1,133],h1=[1,147],d1=[1,148],p1=[1,149],f1=[1,150],g1=[1,135],b1=[1,137],A1=[1,141],k1=[1,142],m1=[1,143],C1=[1,144],S1=[1,145],D1=[1,146],x1=[1,151],T1=[1,152],E1=[1,131],y1=[1,132],F1=[1,139],_1=[1,134],B1=[1,138],L1=[1,136],Qe=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],V1=[1,154],v1=[1,156],B=[8,9,11],H=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],S=[1,176],j=[1,172],K=[1,173],D=[1,177],x=[1,174],T=[1,175],Re=[77,116,119],F=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],I1=[10,106],fe=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],re=[1,247],ne=[1,245],ae=[1,249],ue=[1,243],le=[1,244],oe=[1,246],ce=[1,248],he=[1,250],Ne=[1,268],w1=[8,9,11,106],$=[8,9,10,11,60,84,105,106,109,110,111,112],Je={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:m(function(h,d,g,o,_,e,Oe){var t=e.length-1;switch(_){case 2:this.$=[];break;case 3:(!Array.isArray(e[t])||e[t].length>0)&&e[t-1].push(e[t]),this.$=e[t-1];break;case 4:case 183:this.$=e[t];break;case 11:o.setDirection("TB"),this.$="TB";break;case 12:o.setDirection(e[t-1]),this.$=e[t-1];break;case 27:this.$=e[t-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=o.addSubGraph(e[t-6],e[t-1],e[t-4]);break;case 34:this.$=o.addSubGraph(e[t-3],e[t-1],e[t-3]);break;case 35:this.$=o.addSubGraph(void 0,e[t-1],void 0);break;case 37:this.$=e[t].trim(),o.setAccTitle(this.$);break;case 38:case 39:this.$=e[t].trim(),o.setAccDescription(this.$);break;case 43:this.$=e[t-1]+e[t];break;case 44:this.$=e[t];break;case 45:o.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t]),o.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 46:o.addLink(e[t-2].stmt,e[t],e[t-1]),this.$={stmt:e[t],nodes:e[t].concat(e[t-2].nodes)};break;case 47:o.addLink(e[t-3].stmt,e[t-1],e[t-2]),this.$={stmt:e[t-1],nodes:e[t-1].concat(e[t-3].nodes)};break;case 48:this.$={stmt:e[t-1],nodes:e[t-1]};break;case 49:o.addVertex(e[t-1][e[t-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t]),this.$={stmt:e[t-1],nodes:e[t-1],shapeData:e[t]};break;case 50:this.$={stmt:e[t],nodes:e[t]};break;case 51:this.$=[e[t]];break;case 52:o.addVertex(e[t-5][e[t-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[t-4]),this.$=e[t-5].concat(e[t]);break;case 53:this.$=e[t-4].concat(e[t]);break;case 54:this.$=e[t];break;case 55:this.$=e[t-2],o.setClass(e[t-2],e[t]);break;case 56:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"square");break;case 57:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"doublecircle");break;case 58:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"circle");break;case 59:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"ellipse");break;case 60:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"stadium");break;case 61:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"subroutine");break;case 62:this.$=e[t-7],o.addVertex(e[t-7],e[t-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[t-5],e[t-3]]]));break;case 63:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"cylinder");break;case 64:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"round");break;case 65:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"diamond");break;case 66:this.$=e[t-5],o.addVertex(e[t-5],e[t-2],"hexagon");break;case 67:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"odd");break;case 68:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"trapezoid");break;case 69:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"inv_trapezoid");break;case 70:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_right");break;case 71:this.$=e[t-3],o.addVertex(e[t-3],e[t-1],"lean_left");break;case 72:this.$=e[t],o.addVertex(e[t]);break;case 73:e[t-1].text=e[t],this.$=e[t-1];break;case 74:case 75:e[t-2].text=e[t-1],this.$=e[t-2];break;case 76:this.$=e[t];break;case 77:var L=o.destructLink(e[t],e[t-2]);this.$={type:L.type,stroke:L.stroke,length:L.length,text:e[t-1]};break;case 78:var L=o.destructLink(e[t],e[t-2]);this.$={type:L.type,stroke:L.stroke,length:L.length,text:e[t-1],id:e[t-3]};break;case 79:this.$={text:e[t],type:"text"};break;case 80:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 81:this.$={text:e[t],type:"string"};break;case 82:this.$={text:e[t],type:"markdown"};break;case 83:var L=o.destructLink(e[t]);this.$={type:L.type,stroke:L.stroke,length:L.length};break;case 84:var L=o.destructLink(e[t]);this.$={type:L.type,stroke:L.stroke,length:L.length,id:e[t-1]};break;case 85:this.$=e[t-1];break;case 86:this.$={text:e[t],type:"text"};break;case 87:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 88:this.$={text:e[t],type:"string"};break;case 89:case 104:this.$={text:e[t],type:"markdown"};break;case 101:this.$={text:e[t],type:"text"};break;case 102:this.$={text:e[t-1].text+""+e[t],type:e[t-1].type};break;case 103:this.$={text:e[t],type:"text"};break;case 105:this.$=e[t-4],o.addClass(e[t-2],e[t]);break;case 106:this.$=e[t-4],o.setClass(e[t-2],e[t]);break;case 107:case 115:this.$=e[t-1],o.setClickEvent(e[t-1],e[t]);break;case 108:case 116:this.$=e[t-3],o.setClickEvent(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 109:this.$=e[t-2],o.setClickEvent(e[t-2],e[t-1],e[t]);break;case 110:this.$=e[t-4],o.setClickEvent(e[t-4],e[t-3],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 111:this.$=e[t-2],o.setLink(e[t-2],e[t]);break;case 112:this.$=e[t-4],o.setLink(e[t-4],e[t-2]),o.setTooltip(e[t-4],e[t]);break;case 113:this.$=e[t-4],o.setLink(e[t-4],e[t-2],e[t]);break;case 114:this.$=e[t-6],o.setLink(e[t-6],e[t-4],e[t]),o.setTooltip(e[t-6],e[t-2]);break;case 117:this.$=e[t-1],o.setLink(e[t-1],e[t]);break;case 118:this.$=e[t-3],o.setLink(e[t-3],e[t-2]),o.setTooltip(e[t-3],e[t]);break;case 119:this.$=e[t-3],o.setLink(e[t-3],e[t-2],e[t]);break;case 120:this.$=e[t-5],o.setLink(e[t-5],e[t-4],e[t]),o.setTooltip(e[t-5],e[t-2]);break;case 121:this.$=e[t-4],o.addVertex(e[t-2],void 0,void 0,e[t]);break;case 122:this.$=e[t-4],o.updateLink([e[t-2]],e[t]);break;case 123:this.$=e[t-4],o.updateLink(e[t-2],e[t]);break;case 124:this.$=e[t-8],o.updateLinkInterpolate([e[t-6]],e[t-2]),o.updateLink([e[t-6]],e[t]);break;case 125:this.$=e[t-8],o.updateLinkInterpolate(e[t-6],e[t-2]),o.updateLink(e[t-6],e[t]);break;case 126:this.$=e[t-6],o.updateLinkInterpolate([e[t-4]],e[t]);break;case 127:this.$=e[t-6],o.updateLinkInterpolate(e[t-4],e[t]);break;case 128:case 130:this.$=[e[t]];break;case 129:case 131:e[t-2].push(e[t]),this.$=e[t-2];break;case 133:this.$=e[t-1]+e[t];break;case 181:this.$=e[t];break;case 182:this.$=e[t-1]+""+e[t];break;case 184:this.$=e[t-1]+""+e[t];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:n,12:a},{1:[3]},s(u,l,{5:6}),{4:7,9:i,10:n,12:a},{4:8,9:i,10:n,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:k,33:24,34:E,36:b,38:V,42:28,43:38,44:C,45:39,47:40,60:p,84:J,85:W,86:Z,87:Ae,88:Me,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M,121:Ue,122:We,123:ze,124:je},s(u,[2,9]),s(u,[2,10]),s(u,[2,11]),{8:[1,54],9:[1,55],10:pe,15:53,18:56},s(y,[2,3]),s(y,[2,4]),s(y,[2,5]),s(y,[2,6]),s(y,[2,7]),s(y,[2,8]),{8:te,9:se,11:ie,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:te,9:se,11:ie,21:67},{8:te,9:se,11:ie,21:68},{8:te,9:se,11:ie,21:69},{8:te,9:se,11:ie,21:70},{8:te,9:se,11:ie,21:71},{8:te,9:se,10:[1,72],11:ie,21:73},s(y,[2,36]),{35:[1,74]},{37:[1,75]},s(y,[2,39]),s(De,[2,50],{18:76,39:77,10:pe,40:n1}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:xe,44:Te,60:Ee,80:[1,86],89:ye,95:[1,83],97:[1,84],101:85,105:Fe,106:_e,109:Be,111:Le,114:Ve,115:ve,116:Ie,120:87},s(y,[2,185]),s(y,[2,186]),s(y,[2,187]),s(y,[2,188]),s(ke,[2,51]),s(ke,[2,54],{46:[1,99]}),s(z,[2,72],{113:112,29:[1,100],44:C,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:p,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:v,102:I,105:w,106:R,109:N,111:G,114:P,115:O,116:M}),s(q,[2,181]),s(q,[2,142]),s(q,[2,143]),s(q,[2,144]),s(q,[2,145]),s(q,[2,146]),s(q,[2,147]),s(q,[2,148]),s(q,[2,149]),s(q,[2,150]),s(q,[2,151]),s(q,[2,152]),s(u,[2,12]),s(u,[2,18]),s(u,[2,19]),{9:[1,113]},s(a1,[2,26],{18:114,10:pe}),s(y,[2,27]),{42:115,43:38,44:C,45:39,47:40,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},s(y,[2,40]),s(y,[2,41]),s(y,[2,42]),s(we,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:u1,81:l1,116:Ke,119:Ye},{75:[1,125],77:[1,126]},s(o1,[2,83]),s(y,[2,28]),s(y,[2,29]),s(y,[2,30]),s(y,[2,31]),s(y,[2,32]),{10:c1,12:h1,14:d1,27:p1,28:127,32:f1,44:g1,60:b1,75:A1,80:[1,129],81:[1,130],83:140,84:k1,85:m1,86:C1,87:S1,88:D1,89:x1,90:T1,91:128,105:E1,109:y1,111:F1,114:_1,115:B1,116:L1},s(Qe,l,{5:153}),s(y,[2,37]),s(y,[2,38]),s(De,[2,48],{44:V1}),s(De,[2,49],{18:155,10:pe,40:v1}),s(ke,[2,44]),{44:C,47:157,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},{102:[1,158],103:159,105:[1,160]},{44:C,47:161,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},{44:C,47:162,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},s(B,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},s(B,[2,115],{120:167,10:[1,166],14:xe,44:Te,60:Ee,89:ye,105:Fe,106:_e,109:Be,111:Le,114:Ve,115:ve,116:Ie}),s(B,[2,117],{10:[1,168]}),s(H,[2,183]),s(H,[2,170]),s(H,[2,171]),s(H,[2,172]),s(H,[2,173]),s(H,[2,174]),s(H,[2,175]),s(H,[2,176]),s(H,[2,177]),s(H,[2,178]),s(H,[2,179]),s(H,[2,180]),{44:C,47:169,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},{30:170,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:178,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:180,50:[1,179],67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:181,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:182,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:183,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{109:[1,184]},{30:185,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:186,65:[1,187],67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:188,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:189,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{30:190,67:S,80:j,81:K,82:171,116:D,117:x,118:T},s(q,[2,182]),s(u,[2,20]),s(a1,[2,25]),s(De,[2,46],{39:191,18:192,10:pe,40:n1}),s(we,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{77:[1,196],79:197,116:Ke,119:Ye},s(Re,[2,79]),s(Re,[2,81]),s(Re,[2,82]),s(Re,[2,168]),s(Re,[2,169]),{76:198,79:120,80:u1,81:l1,116:Ke,119:Ye},s(o1,[2,84]),{8:te,9:se,10:c1,11:ie,12:h1,14:d1,21:200,27:p1,29:[1,199],32:f1,44:g1,60:b1,75:A1,83:140,84:k1,85:m1,86:C1,87:S1,88:D1,89:x1,90:T1,91:201,105:E1,109:y1,111:F1,114:_1,115:B1,116:L1},s(F,[2,101]),s(F,[2,103]),s(F,[2,104]),s(F,[2,157]),s(F,[2,158]),s(F,[2,159]),s(F,[2,160]),s(F,[2,161]),s(F,[2,162]),s(F,[2,163]),s(F,[2,164]),s(F,[2,165]),s(F,[2,166]),s(F,[2,167]),s(F,[2,90]),s(F,[2,91]),s(F,[2,92]),s(F,[2,93]),s(F,[2,94]),s(F,[2,95]),s(F,[2,96]),s(F,[2,97]),s(F,[2,98]),s(F,[2,99]),s(F,[2,100]),{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:k,32:[1,202],33:24,34:E,36:b,38:V,42:28,43:38,44:C,45:39,47:40,60:p,84:J,85:W,86:Z,87:Ae,88:Me,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M,121:Ue,122:We,123:ze,124:je},{10:pe,18:203},{44:[1,204]},s(ke,[2,43]),{10:[1,205],44:C,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:112,114:P,115:O,116:M},{10:[1,206]},{10:[1,207],106:[1,208]},s(I1,[2,128]),{10:[1,209],44:C,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:112,114:P,115:O,116:M},{10:[1,210],44:C,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:112,114:P,115:O,116:M},{80:[1,211]},s(B,[2,109],{10:[1,212]}),s(B,[2,111],{10:[1,213]}),{80:[1,214]},s(H,[2,184]),{80:[1,215],98:[1,216]},s(ke,[2,55],{113:112,44:C,60:p,89:v,102:I,105:w,106:R,109:N,111:G,114:P,115:O,116:M}),{31:[1,217],67:S,82:218,116:D,117:x,118:T},s(fe,[2,86]),s(fe,[2,88]),s(fe,[2,89]),s(fe,[2,153]),s(fe,[2,154]),s(fe,[2,155]),s(fe,[2,156]),{49:[1,219],67:S,82:218,116:D,117:x,118:T},{30:220,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{51:[1,221],67:S,82:218,116:D,117:x,118:T},{53:[1,222],67:S,82:218,116:D,117:x,118:T},{55:[1,223],67:S,82:218,116:D,117:x,118:T},{57:[1,224],67:S,82:218,116:D,117:x,118:T},{60:[1,225]},{64:[1,226],67:S,82:218,116:D,117:x,118:T},{66:[1,227],67:S,82:218,116:D,117:x,118:T},{30:228,67:S,80:j,81:K,82:171,116:D,117:x,118:T},{31:[1,229],67:S,82:218,116:D,117:x,118:T},{67:S,69:[1,230],71:[1,231],82:218,116:D,117:x,118:T},{67:S,69:[1,233],71:[1,232],82:218,116:D,117:x,118:T},s(De,[2,45],{18:155,10:pe,40:v1}),s(De,[2,47],{44:V1}),s(we,[2,75]),s(we,[2,74]),{62:[1,234],67:S,82:218,116:D,117:x,118:T},s(we,[2,77]),s(Re,[2,80]),{77:[1,235],79:197,116:Ke,119:Ye},{30:236,67:S,80:j,81:K,82:171,116:D,117:x,118:T},s(Qe,l,{5:237}),s(F,[2,102]),s(y,[2,35]),{43:238,44:C,45:39,47:40,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},{10:pe,18:239},{10:re,60:ne,84:ae,92:240,105:ue,107:241,108:242,109:le,110:oe,111:ce,112:he},{10:re,60:ne,84:ae,92:251,104:[1,252],105:ue,107:241,108:242,109:le,110:oe,111:ce,112:he},{10:re,60:ne,84:ae,92:253,104:[1,254],105:ue,107:241,108:242,109:le,110:oe,111:ce,112:he},{105:[1,255]},{10:re,60:ne,84:ae,92:256,105:ue,107:241,108:242,109:le,110:oe,111:ce,112:he},{44:C,47:257,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},s(B,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},s(B,[2,116]),s(B,[2,118],{10:[1,261]}),s(B,[2,119]),s(z,[2,56]),s(fe,[2,87]),s(z,[2,57]),{51:[1,262],67:S,82:218,116:D,117:x,118:T},s(z,[2,64]),s(z,[2,59]),s(z,[2,60]),s(z,[2,61]),{109:[1,263]},s(z,[2,63]),s(z,[2,65]),{66:[1,264],67:S,82:218,116:D,117:x,118:T},s(z,[2,67]),s(z,[2,68]),s(z,[2,70]),s(z,[2,69]),s(z,[2,71]),s([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),s(we,[2,78]),{31:[1,265],67:S,82:218,116:D,117:x,118:T},{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:k,32:[1,266],33:24,34:E,36:b,38:V,42:28,43:38,44:C,45:39,47:40,60:p,84:J,85:W,86:Z,87:Ae,88:Me,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M,121:Ue,122:We,123:ze,124:je},s(ke,[2,53]),{43:267,44:C,45:39,47:40,60:p,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M},s(B,[2,121],{106:Ne}),s(w1,[2,130],{108:269,10:re,60:ne,84:ae,105:ue,109:le,110:oe,111:ce,112:he}),s($,[2,132]),s($,[2,134]),s($,[2,135]),s($,[2,136]),s($,[2,137]),s($,[2,138]),s($,[2,139]),s($,[2,140]),s($,[2,141]),s(B,[2,122],{106:Ne}),{10:[1,270]},s(B,[2,123],{106:Ne}),{10:[1,271]},s(I1,[2,129]),s(B,[2,105],{106:Ne}),s(B,[2,106],{113:112,44:C,60:p,89:v,102:I,105:w,106:R,109:N,111:G,114:P,115:O,116:M}),s(B,[2,110]),s(B,[2,112],{10:[1,272]}),s(B,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:te,9:se,11:ie,21:277},s(y,[2,34]),s(ke,[2,52]),{10:re,60:ne,84:ae,105:ue,107:278,108:242,109:le,110:oe,111:ce,112:he},s($,[2,133]),{14:xe,44:Te,60:Ee,89:ye,101:279,105:Fe,106:_e,109:Be,111:Le,114:Ve,115:ve,116:Ie,120:87},{14:xe,44:Te,60:Ee,89:ye,101:280,105:Fe,106:_e,109:Be,111:Le,114:Ve,115:ve,116:Ie,120:87},{98:[1,281]},s(B,[2,120]),s(z,[2,58]),{30:282,67:S,80:j,81:K,82:171,116:D,117:x,118:T},s(z,[2,66]),s(Qe,l,{5:283}),s(w1,[2,131],{108:269,10:re,60:ne,84:ae,105:ue,109:le,110:oe,111:ce,112:he}),s(B,[2,126],{120:167,10:[1,284],14:xe,44:Te,60:Ee,89:ye,105:Fe,106:_e,109:Be,111:Le,114:Ve,115:ve,116:Ie}),s(B,[2,127],{120:167,10:[1,285],14:xe,44:Te,60:Ee,89:ye,105:Fe,106:_e,109:Be,111:Le,114:Ve,115:ve,116:Ie}),s(B,[2,114]),{31:[1,286],67:S,82:218,116:D,117:x,118:T},{6:11,7:12,8:f,9:c,10:A,11:r,20:17,22:18,23:19,24:20,25:21,26:22,27:k,32:[1,287],33:24,34:E,36:b,38:V,42:28,43:38,44:C,45:39,47:40,60:p,84:J,85:W,86:Z,87:Ae,88:Me,89:v,102:I,105:w,106:R,109:N,111:G,113:41,114:P,115:O,116:M,121:Ue,122:We,123:ze,124:je},{10:re,60:ne,84:ae,92:288,105:ue,107:241,108:242,109:le,110:oe,111:ce,112:he},{10:re,60:ne,84:ae,92:289,105:ue,107:241,108:242,109:le,110:oe,111:ce,112:he},s(z,[2,62]),s(y,[2,33]),s(B,[2,124],{106:Ne}),s(B,[2,125],{106:Ne})],defaultActions:{},parseError:m(function(h,d){if(d.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=d,g}},"parseError"),parse:m(function(h){var d=this,g=[0],o=[],_=[null],e=[],Oe=this.table,t="",L=0,R1=0,z1=2,N1=1,j1=e.slice.call(arguments,1),U=Object.create(this.lexer),me={yy:{}};for(var Ze in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ze)&&(me.yy[Ze]=this.yy[Ze]);U.setInput(h,me.yy),me.yy.lexer=U,me.yy.parser=this,typeof U.yylloc>"u"&&(U.yylloc={});var $e=U.yylloc;e.push($e);var K1=U.options&&U.options.ranges;typeof me.yy.parseError=="function"?this.parseError=me.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y1(X){g.length=g.length-2*X,_.length=_.length-X,e.length=e.length-X}m(Y1,"popStack");function G1(){var X;return X=o.pop()||U.lex()||N1,typeof X!="number"&&(X instanceof Array&&(o=X,X=o.pop()),X=d.symbols_[X]||X),X}m(G1,"lex");for(var Y,Ce,Q,e1,Ge={},He,de,P1,Xe;;){if(Ce=g[g.length-1],this.defaultActions[Ce]?Q=this.defaultActions[Ce]:((Y===null||typeof Y>"u")&&(Y=G1()),Q=Oe[Ce]&&Oe[Ce][Y]),typeof Q>"u"||!Q.length||!Q[0]){var t1="";Xe=[];for(He in Oe[Ce])this.terminals_[He]&&He>z1&&Xe.push("'"+this.terminals_[He]+"'");U.showPosition?t1="Parse error on line "+(L+1)+`: -`+U.showPosition()+` -Expecting `+Xe.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":t1="Parse error on line "+(L+1)+": Unexpected "+(Y==N1?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(t1,{text:U.match,token:this.terminals_[Y]||Y,line:U.yylineno,loc:$e,expected:Xe})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ce+", token: "+Y);switch(Q[0]){case 1:g.push(Y),_.push(U.yytext),e.push(U.yylloc),g.push(Q[1]),Y=null,R1=U.yyleng,t=U.yytext,L=U.yylineno,$e=U.yylloc;break;case 2:if(de=this.productions_[Q[1]][1],Ge.$=_[_.length-de],Ge._$={first_line:e[e.length-(de||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(de||1)].first_column,last_column:e[e.length-1].last_column},K1&&(Ge._$.range=[e[e.length-(de||1)].range[0],e[e.length-1].range[1]]),e1=this.performAction.apply(Ge,[t,R1,L,me.yy,Q[1],_,e].concat(j1)),typeof e1<"u")return e1;de&&(g=g.slice(0,-1*de*2),_=_.slice(0,-1*de),e=e.slice(0,-1*de)),g.push(this.productions_[Q[1]][0]),_.push(Ge.$),e.push(Ge._$),P1=Oe[g[g.length-2]][g[g.length-1]],g.push(P1);break;case 3:return!0}}return!0},"parse")},W1=function(){var ge={EOF:1,parseError:m(function(d,g){if(this.yy.parser)this.yy.parser.parseError(d,g);else throw new Error(d)},"parseError"),setInput:m(function(h,d){return this.yy=d||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var d=h.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:m(function(h){var d=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===o.length?this.yylloc.first_column:0)+o[o.length-g.length].length-g[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(h){this.unput(this.match.slice(h))},"less"),pastInput:m(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var h=this.pastInput(),d=new Array(h.length+1).join("-");return h+this.upcomingInput()+` -`+d+"^"},"showPosition"),test_match:m(function(h,d){var g,o,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),o=h[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in _)this[e]=_[e];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,d,g,o;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),e=0;e<_.length;e++)if(g=this._input.match(this.rules[_[e]]),g&&(!d||g[0].length>d[0].length)){if(d=g,o=e,this.options.backtrack_lexer){if(h=this.test_match(g,_[e]),h!==!1)return h;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(h=this.test_match(d,_[o]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var d=this.next();return d||this.lex()},"lex"),begin:m(function(d){this.conditionStack.push(d)},"begin"),popState:m(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:m(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:m(function(d){this.begin(d)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:m(function(d,g,o,_){switch(o){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),g.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const e=/\n\s*/g;return g.yytext=g.yytext.replace(e,"
"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return d.lex.firstGraph()&&this.begin("dir"),12;case 36:return d.lex.firstGraph()&&this.begin("dir"),12;case 37:return d.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};return ge}();Je.lexer=W1;function qe(){this.yy={}}return m(qe,"Parser"),qe.prototype=Je,Je.Parser=qe,new qe}();r1.parser=r1;var M1=r1,U1=Object.assign({},M1);U1.parse=s=>{const i=s.replace(/}\s*\n/g,`} -`);return M1.parse(i)};var At=U1,kt=m((s,i)=>{const n=ht,a=n(s,"r"),u=n(s,"g"),l=n(s,"b");return lt(a,u,l,i)},"fade"),mt=m(s=>`.label { - font-family: ${s.fontFamily}; - color: ${s.nodeTextColor||s.textColor}; - } - .cluster-label text { - fill: ${s.titleColor}; - } - .cluster-label span { - color: ${s.titleColor}; - } - .cluster-label span p { - background-color: transparent; - } - - .label text,span { - fill: ${s.nodeTextColor||s.textColor}; - color: ${s.nodeTextColor||s.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${s.mainBkg}; - stroke: ${s.nodeBorder}; - stroke-width: 1px; - } - .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .katex path { - fill: #000; - stroke: #000; - stroke-width: 1px; - } - - .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - - .root .anchor path { - fill: ${s.lineColor} !important; - stroke-width: 0; - stroke: ${s.lineColor}; - } - - .arrowheadPath { - fill: ${s.arrowheadColor}; - } - - .edgePath .path { - stroke: ${s.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${s.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${s.edgeLabelBackground}; - p { - background-color: ${s.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${s.edgeLabelBackground}; - fill: ${s.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${kt(s.edgeLabelBackground,.5)}; - // background-color: - } - - .cluster rect { - fill: ${s.clusterBkg}; - stroke: ${s.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${s.titleColor}; - } - - .cluster span { - color: ${s.titleColor}; - } - /* .cluster div { - color: ${s.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${s.fontFamily}; - font-size: 12px; - background: ${s.tertiaryColor}; - border: 1px solid ${s.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${s.textColor}; - } - - rect.text { - fill: none; - stroke-width: 0; - } - - .icon-shape, .image-shape { - background-color: ${s.edgeLabelBackground}; - p { - background-color: ${s.edgeLabelBackground}; - padding: 2px; - } - rect { - opacity: 0.5; - background-color: ${s.edgeLabelBackground}; - fill: ${s.edgeLabelBackground}; - } - text-align: center; - } - ${q1()} -`,"getStyles"),Ct=mt,yt={parser:At,get db(){return new pt},renderer:bt,styles:Ct,init:m(s=>{s.flowchart||(s.flowchart={}),s.layout&&O1({layout:s.layout}),s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,O1({flowchart:{arrowMarkerAbsolute:s.arrowMarkerAbsolute}})},"init")};export{yt as diagram}; diff --git a/lightrag/api/webui/assets/ganttDiagram-EK5VF46D-DwLPqhwB.js b/lightrag/api/webui/assets/ganttDiagram-EK5VF46D-DwLPqhwB.js deleted file mode 100644 index be78d241..00000000 --- a/lightrag/api/webui/assets/ganttDiagram-EK5VF46D-DwLPqhwB.js +++ /dev/null @@ -1,267 +0,0 @@ -import{b6 as nn,b7 as Ln,b8 as rn,b9 as an,ba as sn,bb as st,bc as An,aH as wt,_ as h,g as In,s as Wn,q as Hn,p as On,a as Nn,b as Vn,c as _e,d as Be,e as Pn,bd as ie,l as Ke,k as zn,j as Rn,y as qn,u as Bn}from"./index-bjrbS6e8.js";import{b as Zn,t as Ht,c as Xn,a as Gn,l as Qn}from"./linear-_bOHiOEq.js";import{i as jn}from"./init-Gi6I4Gst.js";import"./defaultLocale-C4B-KCzX.js";function $n(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function Jn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Kn(e){return e}var Xe=1,ot=2,kt=3,Ze=4,Ot=1e-6;function er(e){return"translate("+e+",0)"}function tr(e){return"translate(0,"+e+")"}function nr(e){return t=>+e(t)}function rr(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function ir(){return!this.__axis}function on(e,t){var n=[],r=null,i=null,a=6,s=6,p=3,M=typeof window<"u"&&window.devicePixelRatio>1?0:.5,T=e===Xe||e===Ze?-1:1,g=e===Ze||e===ot?"x":"y",U=e===Xe||e===kt?er:tr;function C(b){var X=r??(t.ticks?t.ticks.apply(t,n):t.domain()),H=i??(t.tickFormat?t.tickFormat.apply(t,n):Kn),D=Math.max(a,0)+p,I=t.range(),V=+I[0]+M,W=+I[I.length-1]+M,B=(t.bandwidth?rr:nr)(t.copy(),M),j=b.selection?b.selection():b,w=j.selectAll(".domain").data([null]),O=j.selectAll(".tick").data(X,t).order(),x=O.exit(),F=O.enter().append("g").attr("class","tick"),S=O.select("line"),_=O.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),O=O.merge(F),S=S.merge(F.append("line").attr("stroke","currentColor").attr(g+"2",T*a)),_=_.merge(F.append("text").attr("fill","currentColor").attr(g,T*D).attr("dy",e===Xe?"0em":e===kt?"0.71em":"0.32em")),b!==j&&(w=w.transition(b),O=O.transition(b),S=S.transition(b),_=_.transition(b),x=x.transition(b).attr("opacity",Ot).attr("transform",function(k){return isFinite(k=B(k))?U(k+M):this.getAttribute("transform")}),F.attr("opacity",Ot).attr("transform",function(k){var Y=this.parentNode.__axis;return U((Y&&isFinite(Y=Y(k))?Y:B(k))+M)})),x.remove(),w.attr("d",e===Ze||e===ot?s?"M"+T*s+","+V+"H"+M+"V"+W+"H"+T*s:"M"+M+","+V+"V"+W:s?"M"+V+","+T*s+"V"+M+"H"+W+"V"+T*s:"M"+V+","+M+"H"+W),O.attr("opacity",1).attr("transform",function(k){return U(B(k)+M)}),S.attr(g+"2",T*a),_.attr(g,T*D).text(H),j.filter(ir).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===ot?"start":e===Ze?"end":"middle"),j.each(function(){this.__axis=B})}return C.scale=function(b){return arguments.length?(t=b,C):t},C.ticks=function(){return n=Array.from(arguments),C},C.tickArguments=function(b){return arguments.length?(n=b==null?[]:Array.from(b),C):n.slice()},C.tickValues=function(b){return arguments.length?(r=b==null?null:Array.from(b),C):r&&r.slice()},C.tickFormat=function(b){return arguments.length?(i=b,C):i},C.tickSize=function(b){return arguments.length?(a=s=+b,C):a},C.tickSizeInner=function(b){return arguments.length?(a=+b,C):a},C.tickSizeOuter=function(b){return arguments.length?(s=+b,C):s},C.tickPadding=function(b){return arguments.length?(p=+b,C):p},C.offset=function(b){return arguments.length?(M=+b,C):M},C}function ar(e){return on(Xe,e)}function sr(e){return on(kt,e)}const or=Math.PI/180,cr=180/Math.PI,et=18,cn=.96422,un=1,ln=.82521,fn=4/29,Se=6/29,dn=3*Se*Se,ur=Se*Se*Se;function hn(e){if(e instanceof fe)return new fe(e.l,e.a,e.b,e.opacity);if(e instanceof he)return mn(e);e instanceof nn||(e=Ln(e));var t=ft(e.r),n=ft(e.g),r=ft(e.b),i=ct((.2225045*t+.7168786*n+.0606169*r)/un),a,s;return t===n&&n===r?a=s=i:(a=ct((.4360747*t+.3850649*n+.1430804*r)/cn),s=ct((.0139322*t+.0971045*n+.7141733*r)/ln)),new fe(116*i-16,500*(a-i),200*(i-s),e.opacity)}function lr(e,t,n,r){return arguments.length===1?hn(e):new fe(e,t,n,r??1)}function fe(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}rn(fe,lr,an(sn,{brighter(e){return new fe(this.l+et*(e??1),this.a,this.b,this.opacity)},darker(e){return new fe(this.l-et*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=cn*ut(t),e=un*ut(e),n=ln*ut(n),new nn(lt(3.1338561*t-1.6168667*e-.4906146*n),lt(-.9787684*t+1.9161415*e+.033454*n),lt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ct(e){return e>ur?Math.pow(e,1/3):e/dn+fn}function ut(e){return e>Se?e*e*e:dn*(e-fn)}function lt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ft(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fr(e){if(e instanceof he)return new he(e.h,e.c,e.l,e.opacity);if(e instanceof fe||(e=hn(e)),e.a===0&&e.b===0)return new he(NaN,0(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),p=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,p)=>{const M=[];if(a=i.ceil(a),p=p==null?1:Math.floor(p),!(a0))return M;let T;do M.push(T=new Date(+a)),t(a,p),e(a);while(Tte(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,p)=>{if(s>=s)if(p<0)for(;++p<=0;)for(;t(s,-1),!a(s););else for(;--p>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(dt.setTime(+a),ht.setTime(+s),e(dt),e(ht),Math.floor(n(dt,ht))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Ye=te(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ye.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?te(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ye);Ye.range;const me=1e3,ce=me*60,ge=ce*60,ye=ge*24,Ct=ye*7,Nt=ye*30,mt=ye*365,ve=te(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getUTCSeconds());ve.range;const We=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*me)},(e,t)=>{e.setTime(+e+t*ce)},(e,t)=>(t-e)/ce,e=>e.getMinutes());We.range;const gr=te(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ce)},(e,t)=>(t-e)/ce,e=>e.getUTCMinutes());gr.range;const He=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*me-e.getMinutes()*ce)},(e,t)=>{e.setTime(+e+t*ge)},(e,t)=>(t-e)/ge,e=>e.getHours());He.range;const yr=te(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ge)},(e,t)=>(t-e)/ge,e=>e.getUTCHours());yr.range;const Te=te(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ce)/ye,e=>e.getDate()-1);Te.range;const Dt=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ye,e=>e.getUTCDate()-1);Dt.range;const kr=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ye,e=>Math.floor(e/ye));kr.range;function we(e){return te(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ce)/Ct)}const Ve=we(0),Oe=we(1),gn=we(2),yn=we(3),be=we(4),kn=we(5),pn=we(6);Ve.range;Oe.range;gn.range;yn.range;be.range;kn.range;pn.range;function Ce(e){return te(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Ct)}const vn=Ce(0),tt=Ce(1),pr=Ce(2),vr=Ce(3),Ue=Ce(4),Tr=Ce(5),br=Ce(6);vn.range;tt.range;pr.range;vr.range;Ue.range;Tr.range;br.range;const Ne=te(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Ne.range;const xr=te(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xr.range;const ke=te(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ke.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ke.range;const xe=te(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());xe.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});xe.range;function wr(e,t,n,r,i,a){const s=[[ve,1,me],[ve,5,5*me],[ve,15,15*me],[ve,30,30*me],[a,1,ce],[a,5,5*ce],[a,15,15*ce],[a,30,30*ce],[i,1,ge],[i,3,3*ge],[i,6,6*ge],[i,12,12*ge],[r,1,ye],[r,2,2*ye],[n,1,Ct],[t,1,Nt],[t,3,3*Nt],[e,1,mt]];function p(T,g,U){const C=gD).right(s,C);if(b===s.length)return e.every(Ht(T/mt,g/mt,U));if(b===0)return Ye.every(Math.max(Ht(T,g,U),1));const[X,H]=s[C/s[b-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(L=yt(Le(f.y,0,1)),Q=L.getUTCDay(),L=Q>4||Q===0?tt.ceil(L):tt(L),L=Dt.offset(L,(f.V-1)*7),f.y=L.getUTCFullYear(),f.m=L.getUTCMonth(),f.d=L.getUTCDate()+(f.w+6)%7):(L=gt(Le(f.y,0,1)),Q=L.getDay(),L=Q>4||Q===0?Oe.ceil(L):Oe(L),L=Te.offset(L,(f.V-1)*7),f.y=L.getFullYear(),f.m=L.getMonth(),f.d=L.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?yt(Le(f.y,0,1)).getUTCDay():gt(Le(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,yt(f)):gt(f)}}function x(v,A,N,f){for(var J=0,L=A.length,Q=N.length,Z,re;J=Q)return-1;if(Z=A.charCodeAt(J++),Z===37){if(Z=A.charAt(J++),re=j[Z in Vt?A.charAt(J++):Z],!re||(f=re(v,N,f))<0)return-1}else if(Z!=N.charCodeAt(f++))return-1}return f}function F(v,A,N){var f=T.exec(A.slice(N));return f?(v.p=g.get(f[0].toLowerCase()),N+f[0].length):-1}function S(v,A,N){var f=b.exec(A.slice(N));return f?(v.w=X.get(f[0].toLowerCase()),N+f[0].length):-1}function _(v,A,N){var f=U.exec(A.slice(N));return f?(v.w=C.get(f[0].toLowerCase()),N+f[0].length):-1}function k(v,A,N){var f=I.exec(A.slice(N));return f?(v.m=V.get(f[0].toLowerCase()),N+f[0].length):-1}function Y(v,A,N){var f=H.exec(A.slice(N));return f?(v.m=D.get(f[0].toLowerCase()),N+f[0].length):-1}function l(v,A,N){return x(v,t,A,N)}function d(v,A,N){return x(v,n,A,N)}function y(v,A,N){return x(v,r,A,N)}function m(v){return s[v.getDay()]}function E(v){return a[v.getDay()]}function c(v){return M[v.getMonth()]}function u(v){return p[v.getMonth()]}function o(v){return i[+(v.getHours()>=12)]}function R(v){return 1+~~(v.getMonth()/3)}function P(v){return s[v.getUTCDay()]}function z(v){return a[v.getUTCDay()]}function K(v){return M[v.getUTCMonth()]}function G(v){return p[v.getUTCMonth()]}function $(v){return i[+(v.getUTCHours()>=12)]}function ae(v){return 1+~~(v.getUTCMonth()/3)}return{format:function(v){var A=w(v+="",W);return A.toString=function(){return v},A},parse:function(v){var A=O(v+="",!1);return A.toString=function(){return v},A},utcFormat:function(v){var A=w(v+="",B);return A.toString=function(){return v},A},utcParse:function(v){var A=O(v+="",!0);return A.toString=function(){return v},A}}}var Vt={"-":"",_:" ",0:"0"},ne=/^\s*\d+/,_r=/^%/,Sr=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function Yr(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ur(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Er(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Lr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Ar(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Pt(e,t,n){var r=ne.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ir(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Wr(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Hr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Rt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Or(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function qt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Nr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Vr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Pr(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function zr(e,t,n){var r=ne.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Rr(e,t,n){var r=_r.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function qr(e,t,n){var r=ne.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Br(e,t,n){var r=ne.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Bt(e,t){return q(e.getDate(),t,2)}function Zr(e,t){return q(e.getHours(),t,2)}function Xr(e,t){return q(e.getHours()%12||12,t,2)}function Gr(e,t){return q(1+Te.count(ke(e),e),t,3)}function Tn(e,t){return q(e.getMilliseconds(),t,3)}function Qr(e,t){return Tn(e,t)+"000"}function jr(e,t){return q(e.getMonth()+1,t,2)}function $r(e,t){return q(e.getMinutes(),t,2)}function Jr(e,t){return q(e.getSeconds(),t,2)}function Kr(e){var t=e.getDay();return t===0?7:t}function ei(e,t){return q(Ve.count(ke(e)-1,e),t,2)}function bn(e){var t=e.getDay();return t>=4||t===0?be(e):be.ceil(e)}function ti(e,t){return e=bn(e),q(be.count(ke(e),e)+(ke(e).getDay()===4),t,2)}function ni(e){return e.getDay()}function ri(e,t){return q(Oe.count(ke(e)-1,e),t,2)}function ii(e,t){return q(e.getFullYear()%100,t,2)}function ai(e,t){return e=bn(e),q(e.getFullYear()%100,t,2)}function si(e,t){return q(e.getFullYear()%1e4,t,4)}function oi(e,t){var n=e.getDay();return e=n>=4||n===0?be(e):be.ceil(e),q(e.getFullYear()%1e4,t,4)}function ci(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+q(t/60|0,"0",2)+q(t%60,"0",2)}function Zt(e,t){return q(e.getUTCDate(),t,2)}function ui(e,t){return q(e.getUTCHours(),t,2)}function li(e,t){return q(e.getUTCHours()%12||12,t,2)}function fi(e,t){return q(1+Dt.count(xe(e),e),t,3)}function xn(e,t){return q(e.getUTCMilliseconds(),t,3)}function di(e,t){return xn(e,t)+"000"}function hi(e,t){return q(e.getUTCMonth()+1,t,2)}function mi(e,t){return q(e.getUTCMinutes(),t,2)}function gi(e,t){return q(e.getUTCSeconds(),t,2)}function yi(e){var t=e.getUTCDay();return t===0?7:t}function ki(e,t){return q(vn.count(xe(e)-1,e),t,2)}function wn(e){var t=e.getUTCDay();return t>=4||t===0?Ue(e):Ue.ceil(e)}function pi(e,t){return e=wn(e),q(Ue.count(xe(e),e)+(xe(e).getUTCDay()===4),t,2)}function vi(e){return e.getUTCDay()}function Ti(e,t){return q(tt.count(xe(e)-1,e),t,2)}function bi(e,t){return q(e.getUTCFullYear()%100,t,2)}function xi(e,t){return e=wn(e),q(e.getUTCFullYear()%100,t,2)}function wi(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function Ci(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ue(e):Ue.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function Di(){return"+0000"}function Xt(){return"%"}function Gt(e){return+e}function Qt(e){return Math.floor(+e/1e3)}var Me,nt;Mi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Mi(e){return Me=Mr(e),nt=Me.format,Me.parse,Me.utcFormat,Me.utcParse,Me}function _i(e){return new Date(e)}function Si(e){return e instanceof Date?+e:+new Date(+e)}function Cn(e,t,n,r,i,a,s,p,M,T){var g=Xn(),U=g.invert,C=g.domain,b=T(".%L"),X=T(":%S"),H=T("%I:%M"),D=T("%I %p"),I=T("%a %d"),V=T("%b %d"),W=T("%B"),B=T("%Y");function j(w){return(M(w)4&&(b+=7),C.add(b,n));return X.diff(H,"week")+1},p.isoWeekday=function(T){return this.$utils().u(T)?this.day()||7:this.day(this.day()%7?T:T-7)};var M=p.startOf;p.startOf=function(T,g){var U=this.$utils(),C=!!U.u(g)||g;return U.p(T)==="isoweek"?C?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):M.bind(this)(T,g)}}})}(Ge)),Ge.exports}var Ei=Ui();const Li=wt(Ei);var Qe={exports:{}},Ai=Qe.exports,$t;function Ii(){return $t||($t=1,function(e,t){(function(n,r){e.exports=r()})(Ai,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,s=/\d\d?/,p=/\d*[^-_:/,()\s\d]+/,M={},T=function(D){return(D=+D)+(D>68?1900:2e3)},g=function(D){return function(I){this[D]=+I}},U=[/[+-]\d\d:?(\d\d)?|Z/,function(D){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var V=I.match(/([+-]|\d\d)/g),W=60*V[1]+(+V[2]||0);return W===0?0:V[0]==="+"?-W:W}(D)}],C=function(D){var I=M[D];return I&&(I.indexOf?I:I.s.concat(I.f))},b=function(D,I){var V,W=M.meridiem;if(W){for(var B=1;B<=24;B+=1)if(D.indexOf(W(B,0,I))>-1){V=B>12;break}}else V=D===(I?"pm":"PM");return V},X={A:[p,function(D){this.afternoon=b(D,!1)}],a:[p,function(D){this.afternoon=b(D,!0)}],Q:[i,function(D){this.month=3*(D-1)+1}],S:[i,function(D){this.milliseconds=100*+D}],SS:[a,function(D){this.milliseconds=10*+D}],SSS:[/\d{3}/,function(D){this.milliseconds=+D}],s:[s,g("seconds")],ss:[s,g("seconds")],m:[s,g("minutes")],mm:[s,g("minutes")],H:[s,g("hours")],h:[s,g("hours")],HH:[s,g("hours")],hh:[s,g("hours")],D:[s,g("day")],DD:[a,g("day")],Do:[p,function(D){var I=M.ordinal,V=D.match(/\d+/);if(this.day=V[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===D&&(this.day=W)}],w:[s,g("week")],ww:[a,g("week")],M:[s,g("month")],MM:[a,g("month")],MMM:[p,function(D){var I=C("months"),V=(C("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(D)+1;if(V<1)throw new Error;this.month=V%12||V}],MMMM:[p,function(D){var I=C("months").indexOf(D)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,g("year")],YY:[a,function(D){this.year=T(D)}],YYYY:[/\d{4}/,g("year")],Z:U,ZZ:U};function H(D){var I,V;I=D,V=M&&M.formats;for(var W=(D=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S,_,k){var Y=k&&k.toUpperCase();return _||V[k]||n[k]||V[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(l,d,y){return d||y.slice(1)})})).match(r),B=W.length,j=0;j-1)return new Date((E==="X"?1e3:1)*m);var o=H(E)(m),R=o.year,P=o.month,z=o.day,K=o.hours,G=o.minutes,$=o.seconds,ae=o.milliseconds,v=o.zone,A=o.week,N=new Date,f=z||(R||P?1:N.getDate()),J=R||N.getFullYear(),L=0;R&&!P||(L=P>0?P-1:N.getMonth());var Q,Z=K||0,re=G||0,se=$||0,pe=ae||0;return v?new Date(Date.UTC(J,L,f,Z,re,se,pe+60*v.offset*1e3)):c?new Date(Date.UTC(J,L,f,Z,re,se,pe)):(Q=new Date(J,L,f,Z,re,se,pe),A&&(Q=u(Q).week(A).toDate()),Q)}catch{return new Date("")}}(w,F,O,V),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),k&&w!=this.format(F)&&(this.$d=new Date("")),M={}}else if(F instanceof Array)for(var l=F.length,d=1;d<=l;d+=1){x[1]=F[d-1];var y=V.apply(this,x);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}d===l&&(this.$d=new Date(""))}else B.call(this,j)}}})}(Qe)),Qe.exports}var Wi=Ii();const Hi=wt(Wi);var je={exports:{}},Oi=je.exports,Jt;function Ni(){return Jt||(Jt=1,function(e,t){(function(n,r){e.exports=r()})(Oi,function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(s){var p=this,M=this.$locale();if(!this.isValid())return a.bind(this)(s);var T=this.$utils(),g=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(U){switch(U){case"Q":return Math.ceil((p.$M+1)/3);case"Do":return M.ordinal(p.$D);case"gggg":return p.weekYear();case"GGGG":return p.isoWeekYear();case"wo":return M.ordinal(p.week(),"W");case"w":case"ww":return T.s(p.week(),U==="w"?1:2,"0");case"W":case"WW":return T.s(p.isoWeek(),U==="W"?1:2,"0");case"k":case"kk":return T.s(String(p.$H===0?24:p.$H),U==="k"?1:2,"0");case"X":return Math.floor(p.$d.getTime()/1e3);case"x":return p.$d.getTime();case"z":return"["+p.offsetName()+"]";case"zzz":return"["+p.offsetName("long")+"]";default:return U}});return a.bind(this)(g)}}})}(je)),je.exports}var Vi=Ni();const Pi=wt(Vi);var vt=function(){var e=h(function(Y,l,d,y){for(d=d||{},y=Y.length;y--;d[Y[y]]=l);return d},"o"),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],s=[1,30],p=[1,31],M=[1,32],T=[1,33],g=[1,34],U=[1,9],C=[1,10],b=[1,11],X=[1,12],H=[1,13],D=[1,14],I=[1,15],V=[1,16],W=[1,19],B=[1,20],j=[1,21],w=[1,22],O=[1,23],x=[1,25],F=[1,35],S={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:h(function(l,d,y,m,E,c,u){var o=c.length-1;switch(E){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:m.TopAxis(),this.$=c[o].substr(8);break;case 20:m.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:m.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:m.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:m.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:m.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:m.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:m.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],m.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],null),m.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-2],c[o-1]),m.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],m.setClickEvent(c[o-2],c[o],null),m.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-1],c[o]),m.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],m.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:s,17:p,18:M,19:18,20:T,21:g,22:U,23:C,24:b,25:X,26:H,27:D,28:I,29:V,30:W,31:B,33:j,35:w,36:O,37:24,38:x,40:F},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:s,17:p,18:M,19:18,20:T,21:g,22:U,23:C,24:b,25:X,26:H,27:D,28:I,29:V,30:W,31:B,33:j,35:w,36:O,37:24,38:x,40:F},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:h(function(l,d){if(d.recoverable)this.trace(l);else{var y=new Error(l);throw y.hash=d,y}},"parseError"),parse:h(function(l){var d=this,y=[0],m=[],E=[null],c=[],u=this.table,o="",R=0,P=0,z=2,K=1,G=c.slice.call(arguments,1),$=Object.create(this.lexer),ae={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(ae.yy[v]=this.yy[v]);$.setInput(l,ae.yy),ae.yy.lexer=$,ae.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var A=$.yylloc;c.push(A);var N=$.options&&$.options.ranges;typeof ae.yy.parseError=="function"?this.parseError=ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(oe){y.length=y.length-2*oe,E.length=E.length-oe,c.length=c.length-oe}h(f,"popStack");function J(){var oe;return oe=m.pop()||$.lex()||K,typeof oe!="number"&&(oe instanceof Array&&(m=oe,oe=m.pop()),oe=d.symbols_[oe]||oe),oe}h(J,"lex");for(var L,Q,Z,re,se={},pe,ue,Wt,qe;;){if(Q=y[y.length-1],this.defaultActions[Q]?Z=this.defaultActions[Q]:((L===null||typeof L>"u")&&(L=J()),Z=u[Q]&&u[Q][L]),typeof Z>"u"||!Z.length||!Z[0]){var at="";qe=[];for(pe in u[Q])this.terminals_[pe]&&pe>z&&qe.push("'"+this.terminals_[pe]+"'");$.showPosition?at="Parse error on line "+(R+1)+`: -`+$.showPosition()+` -Expecting `+qe.join(", ")+", got '"+(this.terminals_[L]||L)+"'":at="Parse error on line "+(R+1)+": Unexpected "+(L==K?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(at,{text:$.match,token:this.terminals_[L]||L,line:$.yylineno,loc:A,expected:qe})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+L);switch(Z[0]){case 1:y.push(L),E.push($.yytext),c.push($.yylloc),y.push(Z[1]),L=null,P=$.yyleng,o=$.yytext,R=$.yylineno,A=$.yylloc;break;case 2:if(ue=this.productions_[Z[1]][1],se.$=E[E.length-ue],se._$={first_line:c[c.length-(ue||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(ue||1)].first_column,last_column:c[c.length-1].last_column},N&&(se._$.range=[c[c.length-(ue||1)].range[0],c[c.length-1].range[1]]),re=this.performAction.apply(se,[o,P,R,ae.yy,Z[1],E,c].concat(G)),typeof re<"u")return re;ue&&(y=y.slice(0,-1*ue*2),E=E.slice(0,-1*ue),c=c.slice(0,-1*ue)),y.push(this.productions_[Z[1]][0]),E.push(se.$),c.push(se._$),Wt=u[y[y.length-2]][y[y.length-1]],y.push(Wt);break;case 3:return!0}}return!0},"parse")},_=function(){var Y={EOF:1,parseError:h(function(d,y){if(this.yy.parser)this.yy.parser.parseError(d,y);else throw new Error(d)},"parseError"),setInput:h(function(l,d){return this.yy=d||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var d=l.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:h(function(l){var d=l.length,y=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(l){this.unput(this.match.slice(l))},"less"),pastInput:h(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var l=this.pastInput(),d=new Array(l.length+1).join("-");return l+this.upcomingInput()+` -`+d+"^"},"showPosition"),test_match:h(function(l,d){var y,m,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),m=l[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],y=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var c in E)this[c]=E[c];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,d,y,m;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),c=0;cd[0].length)){if(d=y,m=c,this.options.backtrack_lexer){if(l=this.test_match(y,E[c]),l!==!1)return l;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(l=this.test_match(d,E[m]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var d=this.next();return d||this.lex()},"lex"),begin:h(function(d){this.conditionStack.push(d)},"begin"),popState:h(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:h(function(d){this.begin(d)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(d,y,m,E){switch(m){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return Y}();S.lexer=_;function k(){this.yy={}}return h(k,"Parser"),k.prototype=S,S.Parser=k,new k}();vt.parser=vt;var zi=vt;ie.extend(Li);ie.extend(Hi);ie.extend(Pi);var Kt={friday:5,saturday:6},le="",Mt="",_t=void 0,St="",Pe=[],ze=[],Ft=new Map,Yt=[],rt=[],Ee="",Ut="",Dn=["active","done","crit","milestone","vert"],Et=[],Re=!1,Lt=!1,At="sunday",it="saturday",Tt=0,Ri=h(function(){Yt=[],rt=[],Ee="",Et=[],$e=0,xt=void 0,Je=void 0,ee=[],le="",Mt="",Ut="",_t=void 0,St="",Pe=[],ze=[],Re=!1,Lt=!1,Tt=0,Ft=new Map,qn(),At="sunday",it="saturday"},"clear"),qi=h(function(e){Mt=e},"setAxisFormat"),Bi=h(function(){return Mt},"getAxisFormat"),Zi=h(function(e){_t=e},"setTickInterval"),Xi=h(function(){return _t},"getTickInterval"),Gi=h(function(e){St=e},"setTodayMarker"),Qi=h(function(){return St},"getTodayMarker"),ji=h(function(e){le=e},"setDateFormat"),$i=h(function(){Re=!0},"enableInclusiveEndDates"),Ji=h(function(){return Re},"endDatesAreInclusive"),Ki=h(function(){Lt=!0},"enableTopAxis"),ea=h(function(){return Lt},"topAxisEnabled"),ta=h(function(e){Ut=e},"setDisplayMode"),na=h(function(){return Ut},"getDisplayMode"),ra=h(function(){return le},"getDateFormat"),ia=h(function(e){Pe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),aa=h(function(){return Pe},"getIncludes"),sa=h(function(e){ze=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),oa=h(function(){return ze},"getExcludes"),ca=h(function(){return Ft},"getLinks"),ua=h(function(e){Ee=e,Yt.push(e)},"addSection"),la=h(function(){return Yt},"getSections"),fa=h(function(){let e=en();const t=10;let n=0;for(;!e&&n[\d\w- ]+)/.exec(n);if(i!==null){let s=null;for(const M of i.groups.ids.split(" ")){let T=De(M);T!==void 0&&(!s||T.endTime>s.endTime)&&(s=T)}if(s)return s.endTime;const p=new Date;return p.setHours(0,0,0,0),p}let a=ie(n,t.trim(),!0);if(a.isValid())return a.toDate();{Ke.debug("Invalid date:"+n),Ke.debug("With date format:"+t.trim());const s=new Date(n);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+n);return s}},"getStartDate"),Sn=h(function(e){const t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),Fn=h(function(e,t,n,r=!1){n=n.trim();const a=/^until\s+(?[\d\w- ]+)/.exec(n);if(a!==null){let g=null;for(const C of a.groups.ids.split(" ")){let b=De(C);b!==void 0&&(!g||b.startTime{window.open(n,"_self")}),Ft.set(r,n))}),Un(e,"clickable")},"setLink"),Un=h(function(e,t){e.split(",").forEach(function(n){let r=De(n);r!==void 0&&r.classes.push(t)})},"setClass"),ba=h(function(e,t,n){if(_e().securityLevel!=="loose"||t===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{Bn.runFunc(t,...r)})},"setClickFun"),En=h(function(e,t){Et.push(function(){const n=document.querySelector(`[id="${e}"]`);n!==null&&n.addEventListener("click",function(){t()})},function(){const n=document.querySelector(`[id="${e}-text"]`);n!==null&&n.addEventListener("click",function(){t()})})},"pushFun"),xa=h(function(e,t,n){e.split(",").forEach(function(r){ba(r,t,n)}),Un(e,"clickable")},"setClickEvent"),wa=h(function(e){Et.forEach(function(t){t(e)})},"bindFunctions"),Ca={getConfig:h(()=>_e().gantt,"getConfig"),clear:Ri,setDateFormat:ji,getDateFormat:ra,enableInclusiveEndDates:$i,endDatesAreInclusive:Ji,enableTopAxis:Ki,topAxisEnabled:ea,setAxisFormat:qi,getAxisFormat:Bi,setTickInterval:Zi,getTickInterval:Xi,setTodayMarker:Gi,getTodayMarker:Qi,setAccTitle:Vn,getAccTitle:Nn,setDiagramTitle:On,getDiagramTitle:Hn,setDisplayMode:ta,getDisplayMode:na,setAccDescription:Wn,getAccDescription:In,addSection:ua,getSections:la,getTasks:fa,addTask:pa,findTaskById:De,addTaskOrg:va,setIncludes:ia,getIncludes:aa,setExcludes:sa,getExcludes:oa,setClickEvent:xa,setLink:Ta,getLinks:ca,bindFunctions:wa,parseDuration:Sn,isInvalidDate:Mn,setWeekday:da,getWeekday:ha,setWeekend:ma};function It(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const a="^\\s*"+i+"\\s*$",s=new RegExp(a);e[0].match(s)&&(t[i]=!0,e.shift(1),r=!0)})}h(It,"getTaskTags");var Da=h(function(){Ke.debug("Something is calling, setConf, remove the call")},"setConf"),tn={monday:Oe,tuesday:gn,wednesday:yn,thursday:be,friday:kn,saturday:pn,sunday:Ve},Ma=h((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),i=0;for(const a of r)for(let s=0;s=n[s]){n[s]=a.endTime,a.order=s+t,s>i&&(i=s);break}return i},"getMaxIntersections"),de,_a=h(function(e,t,n,r){const i=_e().gantt,a=_e().securityLevel;let s;a==="sandbox"&&(s=Be("#i"+t));const p=a==="sandbox"?Be(s.nodes()[0].contentDocument.body):Be("body"),M=a==="sandbox"?s.nodes()[0].contentDocument:document,T=M.getElementById(t);de=T.parentElement.offsetWidth,de===void 0&&(de=1200),i.useWidth!==void 0&&(de=i.useWidth);const g=r.db.getTasks();let U=[];for(const x of g)U.push(x.type);U=O(U);const C={};let b=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const x={};for(const S of g)x[S.section]===void 0?x[S.section]=[S]:x[S.section].push(S);let F=0;for(const S of Object.keys(x)){const _=Ma(x[S],F)+1;F+=_,b+=_*(i.barHeight+i.barGap),C[S]=_}}else{b+=g.length*(i.barHeight+i.barGap);for(const x of U)C[x]=g.filter(F=>F.type===x).length}T.setAttribute("viewBox","0 0 "+de+" "+b);const X=p.select(`[id="${t}"]`),H=Fi().domain([Jn(g,function(x){return x.startTime}),$n(g,function(x){return x.endTime})]).rangeRound([0,de-i.leftPadding-i.rightPadding]);function D(x,F){const S=x.startTime,_=F.startTime;let k=0;return S>_?k=1:S<_&&(k=-1),k}h(D,"taskCompare"),g.sort(D),I(g,de,b),Pn(X,b,de,i.useMaxWidth),X.append("text").text(r.db.getDiagramTitle()).attr("x",de/2).attr("y",i.titleTopMargin).attr("class","titleText");function I(x,F,S){const _=i.barHeight,k=_+i.barGap,Y=i.topPadding,l=i.leftPadding,d=Qn().domain([0,U.length]).range(["#00B9FA","#F95002"]).interpolate(hr);W(k,Y,l,F,S,x,r.db.getExcludes(),r.db.getIncludes()),B(l,Y,F,S),V(x,k,Y,l,_,d,F),j(k,Y),w(l,Y,F,S)}h(I,"makeGantt");function V(x,F,S,_,k,Y,l){x.sort((u,o)=>u.vert===o.vert?0:u.vert?1:-1);const y=[...new Set(x.map(u=>u.order))].map(u=>x.find(o=>o.order===u));X.append("g").selectAll("rect").data(y).enter().append("rect").attr("x",0).attr("y",function(u,o){return o=u.order,o*F+S-2}).attr("width",function(){return l-i.rightPadding/2}).attr("height",F).attr("class",function(u){for(const[o,R]of U.entries())if(u.type===R)return"section section"+o%i.numberSectionStyles;return"section section0"}).enter();const m=X.append("g").selectAll("rect").data(x).enter(),E=r.db.getLinks();if(m.append("rect").attr("id",function(u){return u.id}).attr("rx",3).attr("ry",3).attr("x",function(u){return u.milestone?H(u.startTime)+_+.5*(H(u.endTime)-H(u.startTime))-.5*k:H(u.startTime)+_}).attr("y",function(u,o){return o=u.order,u.vert?i.gridLineStartPadding:o*F+S}).attr("width",function(u){return u.milestone?k:u.vert?.08*k:H(u.renderEndTime||u.endTime)-H(u.startTime)}).attr("height",function(u){return u.vert?g.length*(i.barHeight+i.barGap)+i.barHeight*2:k}).attr("transform-origin",function(u,o){return o=u.order,(H(u.startTime)+_+.5*(H(u.endTime)-H(u.startTime))).toString()+"px "+(o*F+S+.5*k).toString()+"px"}).attr("class",function(u){const o="task";let R="";u.classes.length>0&&(R=u.classes.join(" "));let P=0;for(const[K,G]of U.entries())u.type===G&&(P=K%i.numberSectionStyles);let z="";return u.active?u.crit?z+=" activeCrit":z=" active":u.done?u.crit?z=" doneCrit":z=" done":u.crit&&(z+=" crit"),z.length===0&&(z=" task"),u.milestone&&(z=" milestone "+z),u.vert&&(z=" vert "+z),z+=P,z+=" "+R,o+z}),m.append("text").attr("id",function(u){return u.id+"-text"}).text(function(u){return u.task}).attr("font-size",i.fontSize).attr("x",function(u){let o=H(u.startTime),R=H(u.renderEndTime||u.endTime);if(u.milestone&&(o+=.5*(H(u.endTime)-H(u.startTime))-.5*k,R=o+k),u.vert)return H(u.startTime)+_;const P=this.getBBox().width;return P>R-o?R+P+1.5*i.leftPadding>l?o+_-5:R+_+5:(R-o)/2+o+_}).attr("y",function(u,o){return u.vert?i.gridLineStartPadding+g.length*(i.barHeight+i.barGap)+60:(o=u.order,o*F+i.barHeight/2+(i.fontSize/2-2)+S)}).attr("text-height",k).attr("class",function(u){const o=H(u.startTime);let R=H(u.endTime);u.milestone&&(R=o+k);const P=this.getBBox().width;let z="";u.classes.length>0&&(z=u.classes.join(" "));let K=0;for(const[$,ae]of U.entries())u.type===ae&&(K=$%i.numberSectionStyles);let G="";return u.active&&(u.crit?G="activeCritText"+K:G="activeText"+K),u.done?u.crit?G=G+" doneCritText"+K:G=G+" doneText"+K:u.crit&&(G=G+" critText"+K),u.milestone&&(G+=" milestoneText"),u.vert&&(G+=" vertText"),P>R-o?R+P+1.5*i.leftPadding>l?z+" taskTextOutsideLeft taskTextOutside"+K+" "+G:z+" taskTextOutsideRight taskTextOutside"+K+" "+G+" width-"+P:z+" taskText taskText"+K+" "+G+" width-"+P}),_e().securityLevel==="sandbox"){let u;u=Be("#i"+t);const o=u.nodes()[0].contentDocument;m.filter(function(R){return E.has(R.id)}).each(function(R){var P=o.querySelector("#"+R.id),z=o.querySelector("#"+R.id+"-text");const K=P.parentNode;var G=o.createElement("a");G.setAttribute("xlink:href",E.get(R.id)),G.setAttribute("target","_top"),K.appendChild(G),G.appendChild(P),G.appendChild(z)})}}h(V,"drawRects");function W(x,F,S,_,k,Y,l,d){if(l.length===0&&d.length===0)return;let y,m;for(const{startTime:P,endTime:z}of Y)(y===void 0||Pm)&&(m=z);if(!y||!m)return;if(ie(m).diff(ie(y),"year")>5){Ke.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const E=r.db.getDateFormat(),c=[];let u=null,o=ie(y);for(;o.valueOf()<=m;)r.db.isInvalidDate(o,E,l,d)?u?u.end=o:u={start:o,end:o}:u&&(c.push(u),u=null),o=o.add(1,"d");X.append("g").selectAll("rect").data(c).enter().append("rect").attr("id",function(P){return"exclude-"+P.start.format("YYYY-MM-DD")}).attr("x",function(P){return H(P.start)+S}).attr("y",i.gridLineStartPadding).attr("width",function(P){const z=P.end.add(1,"day");return H(z)-H(P.start)}).attr("height",k-F-i.gridLineStartPadding).attr("transform-origin",function(P,z){return(H(P.start)+S+.5*(H(P.end)-H(P.start))).toString()+"px "+(z*x+.5*k).toString()+"px"}).attr("class","exclude-range")}h(W,"drawExcludeDays");function B(x,F,S,_){let k=sr(H).tickSize(-_+F+i.gridLineStartPadding).tickFormat(nt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));const l=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(l!==null){const d=l[1],y=l[2],m=r.db.getWeekday()||i.weekday;switch(y){case"millisecond":k.ticks(Ye.every(d));break;case"second":k.ticks(ve.every(d));break;case"minute":k.ticks(We.every(d));break;case"hour":k.ticks(He.every(d));break;case"day":k.ticks(Te.every(d));break;case"week":k.ticks(tn[m].every(d));break;case"month":k.ticks(Ne.every(d));break}}if(X.append("g").attr("class","grid").attr("transform","translate("+x+", "+(_-50)+")").call(k).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let d=ar(H).tickSize(-_+F+i.gridLineStartPadding).tickFormat(nt(r.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(l!==null){const y=l[1],m=l[2],E=r.db.getWeekday()||i.weekday;switch(m){case"millisecond":d.ticks(Ye.every(y));break;case"second":d.ticks(ve.every(y));break;case"minute":d.ticks(We.every(y));break;case"hour":d.ticks(He.every(y));break;case"day":d.ticks(Te.every(y));break;case"week":d.ticks(tn[E].every(y));break;case"month":d.ticks(Ne.every(y));break}}X.append("g").attr("class","grid").attr("transform","translate("+x+", "+F+")").call(d).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}h(B,"makeGrid");function j(x,F){let S=0;const _=Object.keys(C).map(k=>[k,C[k]]);X.append("g").selectAll("text").data(_).enter().append(function(k){const Y=k[0].split(zn.lineBreakRegex),l=-(Y.length-1)/2,d=M.createElementNS("http://www.w3.org/2000/svg","text");d.setAttribute("dy",l+"em");for(const[y,m]of Y.entries()){const E=M.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttribute("alignment-baseline","central"),E.setAttribute("x","10"),y>0&&E.setAttribute("dy","1em"),E.textContent=m,d.appendChild(E)}return d}).attr("x",10).attr("y",function(k,Y){if(Y>0)for(let l=0;l` - .mermaid-main-font { - font-family: ${e.fontFamily}; - } - - .exclude-range { - fill: ${e.excludeBkgColor}; - } - - .section { - stroke: none; - opacity: 0.2; - } - - .section0 { - fill: ${e.sectionBkgColor}; - } - - .section2 { - fill: ${e.sectionBkgColor2}; - } - - .section1, - .section3 { - fill: ${e.altSectionBkgColor}; - opacity: 0.2; - } - - .sectionTitle0 { - fill: ${e.titleColor}; - } - - .sectionTitle1 { - fill: ${e.titleColor}; - } - - .sectionTitle2 { - fill: ${e.titleColor}; - } - - .sectionTitle3 { - fill: ${e.titleColor}; - } - - .sectionTitle { - text-anchor: start; - font-family: ${e.fontFamily}; - } - - - /* Grid and axis */ - - .grid .tick { - stroke: ${e.gridColor}; - opacity: 0.8; - shape-rendering: crispEdges; - } - - .grid .tick text { - font-family: ${e.fontFamily}; - fill: ${e.textColor}; - } - - .grid path { - stroke-width: 0; - } - - - /* Today line */ - - .today { - fill: none; - stroke: ${e.todayLineColor}; - stroke-width: 2px; - } - - - /* Task styling */ - - /* Default task */ - - .task { - stroke-width: 2; - } - - .taskText { - text-anchor: middle; - font-family: ${e.fontFamily}; - } - - .taskTextOutsideRight { - fill: ${e.taskTextDarkColor}; - text-anchor: start; - font-family: ${e.fontFamily}; - } - - .taskTextOutsideLeft { - fill: ${e.taskTextDarkColor}; - text-anchor: end; - } - - - /* Special case clickable */ - - .task.clickable { - cursor: pointer; - } - - .taskText.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideLeft.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideRight.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - - /* Specific task settings for the sections*/ - - .taskText0, - .taskText1, - .taskText2, - .taskText3 { - fill: ${e.taskTextColor}; - } - - .task0, - .task1, - .task2, - .task3 { - fill: ${e.taskBkgColor}; - stroke: ${e.taskBorderColor}; - } - - .taskTextOutside0, - .taskTextOutside2 - { - fill: ${e.taskTextOutsideColor}; - } - - .taskTextOutside1, - .taskTextOutside3 { - fill: ${e.taskTextOutsideColor}; - } - - - /* Active task */ - - .active0, - .active1, - .active2, - .active3 { - fill: ${e.activeTaskBkgColor}; - stroke: ${e.activeTaskBorderColor}; - } - - .activeText0, - .activeText1, - .activeText2, - .activeText3 { - fill: ${e.taskTextDarkColor} !important; - } - - - /* Completed task */ - - .done0, - .done1, - .done2, - .done3 { - stroke: ${e.doneTaskBorderColor}; - fill: ${e.doneTaskBkgColor}; - stroke-width: 2; - } - - .doneText0, - .doneText1, - .doneText2, - .doneText3 { - fill: ${e.taskTextDarkColor} !important; - } - - - /* Tasks on the critical line */ - - .crit0, - .crit1, - .crit2, - .crit3 { - stroke: ${e.critBorderColor}; - fill: ${e.critBkgColor}; - stroke-width: 2; - } - - .activeCrit0, - .activeCrit1, - .activeCrit2, - .activeCrit3 { - stroke: ${e.critBorderColor}; - fill: ${e.activeTaskBkgColor}; - stroke-width: 2; - } - - .doneCrit0, - .doneCrit1, - .doneCrit2, - .doneCrit3 { - stroke: ${e.critBorderColor}; - fill: ${e.doneTaskBkgColor}; - stroke-width: 2; - cursor: pointer; - shape-rendering: crispEdges; - } - - .milestone { - transform: rotate(45deg) scale(0.8,0.8); - } - - .milestoneText { - font-style: italic; - } - .doneCritText0, - .doneCritText1, - .doneCritText2, - .doneCritText3 { - fill: ${e.taskTextDarkColor} !important; - } - - .vert { - stroke: ${e.vertLineColor}; - } - - .vertText { - font-size: 15px; - text-anchor: middle; - fill: ${e.vertLineColor} !important; - } - - .activeCritText0, - .activeCritText1, - .activeCritText2, - .activeCritText3 { - fill: ${e.taskTextDarkColor} !important; - } - - .titleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.titleColor||e.textColor}; - font-family: ${e.fontFamily}; - } -`,"getStyles"),Ya=Fa,Ia={parser:zi,db:Ca,renderer:Sa,styles:Ya};export{Ia as diagram}; diff --git a/lightrag/api/webui/assets/gitGraphDiagram-GW3U2K7C-DZ0ieBSO.js b/lightrag/api/webui/assets/gitGraphDiagram-GW3U2K7C-DZ0ieBSO.js deleted file mode 100644 index f1b57f6d..00000000 --- a/lightrag/api/webui/assets/gitGraphDiagram-GW3U2K7C-DZ0ieBSO.js +++ /dev/null @@ -1,65 +0,0 @@ -import{p as Z}from"./chunk-353BL4L5-BJGenYOY.js";import{I as F}from"./chunk-AACKK3MU-Cz8YDG2R.js";import{_ as h,q as U,p as ee,s as re,g as te,a as ae,b as ne,l as m,c as se,d as ce,u as oe,C as ie,y as de,k as B,D as he,E as le,F as $e,G as fe}from"./index-bjrbS6e8.js";import{p as ge}from"./treemap-75Q7IDZK-DNUGBdnj.js";import"./_baseUniq-DknB5v3H.js";import"./_basePickBy-UdMCOwSh.js";import"./clone-g5iXXiWA.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ye=$e.gitGraph,z=h(()=>he({...ye,...le().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),e=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:a}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function S(){return fe({length:7})}h(S,"getID");function N(t,e){const a=Object.create(null);return t.reduce((s,r)=>{const n=e(r);return a[n]||(a[n]=!0,s.push(r)),s},[])}h(N,"uniqBy");var ue=h(function(t){i.records.direction=t},"setDirection"),xe=h(function(t){m.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(e){m.error("error while parsing gitGraph options",e.message)}},"setOptions"),pe=h(function(){return i.records.options},"getOptions"),be=h(function(t){let e=t.msg,a=t.id;const s=t.type;let r=t.tags;m.info("commit",e,a,s,r),m.debug("Entering commit:",e,a,s,r);const n=z();a=B.sanitizeText(a,n),e=B.sanitizeText(e,n),r=r==null?void 0:r.map(c=>B.sanitizeText(c,n));const o={id:a||i.records.seq+"-"+S(),message:e,seq:i.records.seq++,type:s??x.NORMAL,tags:r??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=o,m.info("main branch",n.mainBranchName),i.records.commits.has(o.id)&&m.warn(`Commit ID ${o.id} already exists`),i.records.commits.set(o.id,o),i.records.branches.set(i.records.currBranch,o.id),m.debug("in pushCommit "+o.id)},"commit"),me=h(function(t){let e=t.name;const a=t.order;if(e=B.sanitizeText(e,z()),i.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);i.records.branches.set(e,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(e,{name:e,order:a}),_(e),m.debug("in createBranch")},"branch"),we=h(t=>{let e=t.branch,a=t.id;const s=t.type,r=t.tags,n=z();e=B.sanitizeText(e,n),a&&(a=B.sanitizeText(a,n));const o=i.records.branches.get(i.records.currBranch),c=i.records.branches.get(e),$=o?i.records.commits.get(o):void 0,l=c?i.records.commits.get(c):void 0;if($&&l&&$.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(i.records.currBranch===e){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!i.records.branches.has(e)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${e} ${a} ${s} ${r==null?void 0:r.join(" ")}`,token:`merge ${e} ${a} ${s} ${r==null?void 0:r.join(" ")}`,expected:[`merge ${e} ${a}_UNIQUE ${s} ${r==null?void 0:r.join(" ")}`]},d}const f=c||"",g={id:a||`${i.records.seq}-${S()}`,message:`merged branch ${e} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:x.MERGE,customType:s,customId:!!a,tags:r??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),m.debug(i.records.branches),m.debug("in mergeBranch")},"merge"),Ce=h(function(t){let e=t.id,a=t.targetId,s=t.tags,r=t.parent;m.debug("Entering cherryPick:",e,a,s);const n=z();if(e=B.sanitizeText(e,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),r=B.sanitizeText(r,n),!e||!i.records.commits.has(e)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},$}const o=i.records.commits.get(e);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&!(Array.isArray(o.parents)&&o.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=o.branch;if(o.type===x.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(c===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+S(),message:`cherry-picked ${o==null?void 0:o.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,o.id],branch:i.records.currBranch,type:x.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${o.id}${o.type===x.MERGE?`|parent:${r}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),m.debug(i.records.branches),m.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const e=i.records.branches.get(i.records.currBranch);e===void 0||!e?i.records.head=null:i.records.head=i.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");function D(t,e,a){const s=t.indexOf(e);s===-1?t.push(a):t.splice(s,1,a)}h(D,"upsert");function A(t){const e=t.reduce((r,n)=>r.seq>n.seq?r:n,t[0]);let a="";t.forEach(function(r){r===e?a+=" *":a+=" |"});const s=[a,e.id,e.seq];for(const r in i.records.branches)i.records.branches.get(r)===e.id&&s.push(r);if(m.debug(s.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const r=i.records.commits.get(e.parents[0]);D(t,e,r),e.parents[1]&&t.push(i.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const r=i.records.commits.get(e.parents[0]);D(t,e,r)}}t=N(t,r=>r.id),A(t)}h(A,"prettyPrintCommitHistory");var ve=h(function(){m.debug(i.records.commits);const t=V()[0];A([t])},"prettyPrint"),Ee=h(function(){i.reset(),de()},"clear"),Be=h(function(){return[...i.records.branchConfig.values()].map((e,a)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${a}`)}).sort((e,a)=>(e.order??0)-(a.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),ke=h(function(){return i.records.branches},"getBranches"),Le=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(e){m.debug(e.id)}),t.sort((e,a)=>e.seq-a.seq),t},"getCommitsArray"),Te=h(function(){return i.records.currBranch},"getCurrentBranch"),Me=h(function(){return i.records.direction},"getDirection"),Re=h(function(){return i.records.head},"getHead"),X={commitType:x,getConfig:z,setDirection:ue,setOptions:xe,getOptions:pe,commit:be,branch:me,merge:we,cherryPick:Ce,checkout:_,prettyPrint:ve,clear:Ee,getBranchesAsObjArray:Be,getBranches:ke,getCommits:Le,getCommitsArray:V,getCurrentBranch:Te,getDirection:Me,getHead:Re,setAccTitle:ne,getAccTitle:ae,getAccDescription:te,setAccDescription:re,setDiagramTitle:ee,getDiagramTitle:U},Ie=h((t,e)=>{Z(t,e),t.dir&&e.setDirection(t.dir);for(const a of t.statements)qe(a,e)},"populate"),qe=h((t,e)=>{const s={Commit:h(r=>e.commit(Oe(r)),"Commit"),Branch:h(r=>e.branch(ze(r)),"Branch"),Merge:h(r=>e.merge(Ge(r)),"Merge"),Checkout:h(r=>e.checkout(He(r)),"Checkout"),CherryPicking:h(r=>e.cherryPick(Pe(r)),"CherryPicking")}[t.$type];s?s(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Oe=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),ze=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Ge=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),He=h(t=>t.branch,"parseCheckout"),Pe=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),We={parse:h(async t=>{const e=await ge("gitGraph",t);m.debug(e),Ie(e,X)},"parse")},j=se(),b=j==null?void 0:j.gitGraph,R=10,I=40,k=4,L=2,O=8,v=new Map,E=new Map,P=30,G=new Map,W=[],M=0,u="LR",Se=h(()=>{v.clear(),E.clear(),G.clear(),M=0,W=[],u="LR"},"clear"),J=h(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=s.trim(),e.appendChild(r)}),e},"drawText"),Q=h(t=>{let e,a,s;return u==="BT"?(a=h((r,n)=>r<=n,"comparisonFunc"),s=1/0):(a=h((r,n)=>r>=n,"comparisonFunc"),s=0),t.forEach(r=>{var o,c;const n=u==="TB"||u=="BT"?(o=E.get(r))==null?void 0:o.y:(c=E.get(r))==null?void 0:c.x;n!==void 0&&a(n,s)&&(e=r,s=n)}),e},"findClosestParent"),je=h(t=>{let e="",a=1/0;return t.forEach(s=>{const r=E.get(s).y;r<=a&&(e=s,a=r)}),e||void 0},"findClosestParentBT"),De=h((t,e,a)=>{let s=a,r=a;const n=[];t.forEach(o=>{const c=e.get(o);if(!c)throw new Error(`Commit not found for key ${o}`);c.parents.length?(s=Ye(c),r=Math.max(s,r)):n.push(c),Ke(c,s)}),s=r,n.forEach(o=>{Ne(o,s,a)}),t.forEach(o=>{const c=e.get(o);if(c!=null&&c.parents.length){const $=je(c.parents);s=E.get($).y-I,s<=r&&(r=s);const l=v.get(c.branch).pos,f=s-R;E.set(c.id,{x:l,y:f})}})},"setParallelBTPos"),Ae=h(t=>{var s;const e=Q(t.parents.filter(r=>r!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(e))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Ye=h(t=>Ae(t)+I,"calculateCommitPosition"),Ke=h((t,e)=>{const a=v.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,r=e+R;return E.set(t.id,{x:s,y:r}),{x:s,y:r}},"setCommitPosition"),Ne=h((t,e,a)=>{const s=v.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const r=e+a,n=s.pos;E.set(t.id,{x:n,y:r})},"setRootPosition"),_e=h((t,e,a,s,r,n)=>{if(n===x.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${r%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${r%O} ${s}-inner`);else if(n===x.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${e.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${s}`);else{const o=t.append("circle");if(o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",e.type===x.MERGE?9:10),o.attr("class",`commit ${e.id} commit${r%O}`),n===x.MERGE){const c=t.append("circle");c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",6),c.attr("class",`commit ${s} ${e.id} commit${r%O}`)}n===x.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${e.id} commit${r%O}`)}},"drawCommitBullet"),Ve=h((t,e,a,s)=>{var r;if(e.type!==x.CHERRY_PICK&&(e.customId&&e.type===x.MERGE||e.type!==x.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),o=n.insert("rect").attr("class","commit-label-bkg"),c=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(e.id),$=(r=c.node())==null?void 0:r.getBBox();if($&&(o.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),u==="TB"||u==="BT"?(o.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),c.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):c.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(u==="TB"||u==="BT")c.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),o.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xe=h((t,e,a,s)=>{var r;if(e.tags.length>0){let n=0,o=0,c=0;const $=[];for(const l of e.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(r=d.node())==null?void 0:r.getBBox();if(!y)throw new Error("Tag bbox not found");o=Math.max(o,y.width),c=Math.max(c,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=c/2,p=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` - ${s-o/2-k/2},${p+L} - ${s-o/2-k/2},${p-L} - ${a.posWithOffset-o/2-k},${p-y-L} - ${a.posWithOffset+o/2+k},${p-y-L} - ${a.posWithOffset+o/2+k},${p+y+L} - ${a.posWithOffset-o/2-k},${p+y+L}`),f.attr("cy",p).attr("cx",s-o/2+k/2).attr("r",1.5).attr("class","tag-hole"),u==="TB"||u==="BT"){const w=s+d;g.attr("class","tag-label-bkg").attr("points",` - ${a.x},${w+2} - ${a.x},${w-2} - ${a.x+R},${w-y-2} - ${a.x+R+o+4},${w-y-2} - ${a.x+R+o+4},${w+y+2} - ${a.x+R},${w+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",w).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",w+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Je=h(t=>{switch(t.customType??t.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qe=h((t,e,a,s)=>{const r={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const o=s.get(n)??r;return e==="TB"?o.y+I:e==="BT"?(s.get(t.id)??r).y-I:o.x+I}}else return e==="TB"?P:e==="BT"?(s.get(t.id)??r).y-I:0;return 0},"calculatePosition"),Ze=h((t,e,a)=>{var o,c;const s=u==="BT"&&a?e:e+R,r=u==="TB"||u==="BT"?s:(o=v.get(t.branch))==null?void 0:o.pos,n=u==="TB"||u==="BT"?(c=v.get(t.branch))==null?void 0:c.pos:s;if(n===void 0||r===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:r,posWithOffset:s}},"getCommitPosition"),K=h((t,e,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),r=t.append("g").attr("class","commit-labels");let n=u==="TB"||u==="BT"?P:0;const o=[...e.keys()],c=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var p,w;const d=(p=e.get(f))==null?void 0:p.seq,y=(w=e.get(g))==null?void 0:w.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=o.sort($);u==="BT"&&(c&&De(l,e,n),l=l.reverse()),l.forEach(f=>{var y;const g=e.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);c&&(n=Qe(g,u,n,E));const d=Ze(g,n,c);if(a){const p=Je(g),w=g.customType??g.type,q=((y=v.get(g.branch))==null?void 0:y.index)??0;_e(s,g,d,p,q,w),Ve(r,g,d,n),Xe(r,g,d,n)}u==="TB"||u==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=u==="BT"&&c?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fe=h((t,e,a,s,r)=>{const o=(u==="TB"||u==="BT"?a.xl.branch===o,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq$(l)&&c(l))},"shouldRerouteArrow"),H=h((t,e,a=0)=>{const s=t+Math.abs(t-e)/2;if(a>5)return s;if(W.every(o=>Math.abs(o-s)>=10))return W.push(s),s;const n=Math.abs(t-e);return H(t,e-n/5,a+1)},"findLane"),Ue=h((t,e,a,s)=>{var y,p,w,q,Y;const r=E.get(e.id),n=E.get(a.id);if(r===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${a.id}`);const o=Fe(e,a,r,n,s);let c="",$="",l=0,f=0,g=(y=v.get(a.branch))==null?void 0:y.index;a.type===x.MERGE&&e.id!==a.parents[0]&&(g=(p=v.get(e.branch))==null?void 0:p.index);let d;if(o){c="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=r.yn.x&&(c="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${n.y-l} ${$} ${r.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${n.x+l} ${r.y} ${c} ${n.x} ${r.y+f} L ${n.x} ${n.y}`),r.x===n.x&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`)):u==="BT"?(r.xn.x&&(c="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${n.y+l} ${c} ${r.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${n.x-l} ${r.y} ${c} ${n.x} ${r.y-f} L ${n.x} ${n.y}`),r.x===n.x&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`)):(r.yn.y&&(a.type===x.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${n.x-l} ${r.y} ${c} ${n.x} ${r.y-f} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${r.x} ${n.y+l} ${$} ${r.x+f} ${n.y} L ${n.x} ${n.y}`),r.y===n.y&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),er=h((t,e)=>{const a=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(s=>{const r=e.get(s);r.parents&&r.parents.length>0&&r.parents.forEach(n=>{Ue(a,e.get(n),r,e)})})},"drawArrows"),rr=h((t,e)=>{const a=t.append("g");e.forEach((s,r)=>{var p;const n=r%O,o=(p=v.get(s.name))==null?void 0:p.pos;if(o===void 0)throw new Error(`Position not found for branch ${s.name}`);const c=a.append("line");c.attr("x1",0),c.attr("y1",o),c.attr("x2",M),c.attr("y2",o),c.attr("class","branch branch"+n),u==="TB"?(c.attr("y1",P),c.attr("x1",o),c.attr("y2",M),c.attr("x2",o)):u==="BT"&&(c.attr("y1",M),c.attr("x1",o),c.attr("y2",P),c.attr("x2",o)),W.push(o);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(o-y.height/2-1)+")"),u==="TB"?(f.attr("x",o-y.width/2-10).attr("y",0),d.attr("transform","translate("+(o-y.width/2-5)+", 0)")):u==="BT"?(f.attr("x",o-y.width/2-10).attr("y",M),d.attr("transform","translate("+(o-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(o-y.height/2)+")")})},"drawBranches"),tr=h(function(t,e,a,s,r){return v.set(t,{pos:e,index:a}),e+=50+(r?40:0)+(u==="TB"||u==="BT"?s.width/2:0),e},"setBranchPosition"),ar=h(function(t,e,a,s){if(Se(),m.debug("in gitgraph renderer",t+` -`,"id:",e,a),!b)throw new Error("GitGraph config not found");const r=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const o=n.getBranchesAsObjArray();u=n.getDirection();const c=ce(`[id="${e}"]`);let $=0;o.forEach((l,f)=>{var q;const g=J(l.name),d=c.append("g"),y=d.insert("g").attr("class","branchLabel"),p=y.insert("g").attr("class","label branch-label");(q=p.node())==null||q.appendChild(g);const w=g.getBBox();$=tr(l.name,$,f,w,r),p.remove(),y.remove(),d.remove()}),K(c,G,!1),b.showBranches&&rr(c,o),er(c,G),K(c,G,!0),oe.insertTitle(c,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),ie(void 0,c,b.diagramPadding,b.useMaxWidth)},"draw"),nr={draw:ar},sr=h(t=>` - .commit-id, - .commit-msg, - .branch-label { - fill: lightgrey; - color: lightgrey; - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - } - ${[0,1,2,3,4,5,6,7].map(e=>` - .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } - .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } - .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } - .label${e} { fill: ${t["git"+e]}; } - .arrow${e} { stroke: ${t["git"+e]}; } - `).join(` -`)} - - .branch { - stroke-width: 1; - stroke: ${t.lineColor}; - stroke-dasharray: 2; - } - .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} - .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } - .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} - .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } - .tag-hole { fill: ${t.textColor}; } - - .commit-merge { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - } - .commit-reverse { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - stroke-width: 3; - } - .commit-highlight-outer { - } - .commit-highlight-inner { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - } - - .arrow { stroke-width: 8; stroke-linecap: round; fill: none} - .gitTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${t.textColor}; - } -`,"getStyles"),cr=sr,gr={parser:We,db:X,renderer:nr,styles:cr};export{gr as diagram}; diff --git a/lightrag/api/webui/assets/graph-OaiGNqgf.js b/lightrag/api/webui/assets/graph-OaiGNqgf.js deleted file mode 100644 index fbc46bf5..00000000 --- a/lightrag/api/webui/assets/graph-OaiGNqgf.js +++ /dev/null @@ -1 +0,0 @@ -import{aA as N,aB as j,aC as f,aD as b,aE as E}from"./index-bjrbS6e8.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./_baseUniq-DknB5v3H.js";var w=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,C(this._preds[t],e),C(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],y(this._preds[t],e),y(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function C(o,e){o[e]?o[e]++:o[e]=1}function y(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G}; diff --git a/lightrag/api/webui/assets/index-BADD45_R.js b/lightrag/api/webui/assets/index-BADD45_R.js deleted file mode 100644 index 0194c5d2..00000000 --- a/lightrag/api/webui/assets/index-BADD45_R.js +++ /dev/null @@ -1,3 +0,0 @@ -import{a$ as U,b0 as z,b1 as L,b2 as fn,b3 as hn,b4 as F,b5 as gn}from"./index-bjrbS6e8.js";class P{constructor(e,l,o){this.normal=l,this.property=e,o&&(this.space=o)}}P.prototype.normal={};P.prototype.property={};P.prototype.space=void 0;function $(n,e){const l={},o={};for(const a of n)Object.assign(l,a.property),Object.assign(o,a.normal);return new P(l,o,e)}function C(n){return n.toLowerCase()}class h{constructor(e,l){this.attribute=l,this.property=e}}h.prototype.attribute="";h.prototype.booleanish=!1;h.prototype.boolean=!1;h.prototype.commaOrSpaceSeparated=!1;h.prototype.commaSeparated=!1;h.prototype.defined=!1;h.prototype.mustUseProperty=!1;h.prototype.number=!1;h.prototype.overloadedBoolean=!1;h.prototype.property="";h.prototype.spaceSeparated=!1;h.prototype.space=void 0;let mn=0;const s=k(),f=k(),D=k(),t=k(),p=k(),x=k(),g=k();function k(){return 2**++mn}const T=Object.freeze(Object.defineProperty({__proto__:null,boolean:s,booleanish:f,commaOrSpaceSeparated:g,commaSeparated:x,number:t,overloadedBoolean:D,spaceSeparated:p},Symbol.toStringTag,{value:"Module"})),A=Object.keys(T);class R extends h{constructor(e,l,o,a){let r=-1;if(super(e,l),j(this,"space",a),typeof o=="number")for(;++r4&&l.slice(0,4)==="data"&&vn.test(e)){if(e.charAt(4)==="-"){const r=e.slice(5).replace(H,Sn);o="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=e.slice(4);if(!H.test(r)){let i=r.replace(kn,wn);i.charAt(0)!=="-"&&(i="-"+i),e="data"+i}}a=R}return new a(o,e)}function wn(n){return"-"+n.toLowerCase()}function Sn(n){return n.charAt(1).toUpperCase()}const Cn=$([Z,yn,nn,en,ln],"html"),Pn=$([Z,bn,nn,en,ln],"svg"),V=/[#.]/g;function Mn(n,e){const l=n||"",o={};let a=0,r,i;for(;ad&&(d=m):m&&(d!==void 0&&d>-1&&u.push(` -`.repeat(d)||" "),d=-1,u.push(m))}return u.join("")}function un(n,e,l){return n.type==="element"?Gn(n,e,l):n.type==="text"?l.whitespace==="normal"?sn(n,l):$n(n):[]}function Gn(n,e,l){const o=cn(n,l),a=n.children||[];let r=-1,i=[];if(_n(n))return i;let c,u;for(E(n)||G(n)&&q(e,n,G)?u=` -`:Xn(n)?(c=2,u=2):an(n)&&(c=1,u=1);++r=40rem){.\!container{max-width:40rem!important}}@media (width>=48rem){.\!container{max-width:48rem!important}}@media (width>=64rem){.\!container{max-width:64rem!important}}@media (width>=80rem){.\!container{max-width:80rem!important}}@media (width>=96rem){.\!container{max-width:96rem!important}}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.\!m-0{margin:calc(var(--spacing)*0)!important}.m-0{margin:calc(var(--spacing)*0)}.\!mx-4{margin-inline:calc(var(--spacing)*4)!important}.-mx-1{margin-inline:calc(var(--spacing)*-1)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-4{margin-block:calc(var(--spacing)*4)}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mr-0{margin-right:calc(var(--spacing)*0)}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-4{margin-right:calc(var(--spacing)*4)}.mr-8{margin-right:calc(var(--spacing)*8)}.mr-10{margin-right:calc(var(--spacing)*10)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\!inline{display:inline!important}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.table{display:table}.aspect-square{aspect-ratio:1}.\!size-full{width:100%!important;height:100%!important}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-6{width:calc(var(--spacing)*6);height:calc(var(--spacing)*6)}.size-7{width:calc(var(--spacing)*7);height:calc(var(--spacing)*7)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.size-full{width:100%;height:100%}.h-1\/2{height:50%}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-24{height:calc(var(--spacing)*24)}.h-52{height:calc(var(--spacing)*52)}.h-\[1px\]{height:1px}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-8{max-height:calc(var(--spacing)*8)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\[40vh\]{max-height:40vh}.max-h-\[50vh\]{max-height:50vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[120px\]{max-height:120px}.max-h-\[300px\]{max-height:300px}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[7\.5em\]{min-height:7.5em}.min-h-\[10em\]{min-height:10em}.min-h-\[40px\]{min-height:40px}.min-h-\[60px\]{min-height:60px}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-56{width:calc(var(--spacing)*56)}.w-\[1px\]{width:1px}.w-\[95\%\]{width:95%}.w-\[200px\]{width:200px}.w-\[280px\]{width:280px}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.max-w-80{max-width:calc(var(--spacing)*80)}.max-w-96{max-width:calc(var(--spacing)*96)}.max-w-\[80\%\]{max-width:80%}.max-w-\[200px\]{max-width:200px}.max-w-\[250px\]{max-width:250px}.max-w-\[480px\]{max-width:480px}.max-w-lg{max-width:var(--container-lg)}.max-w-none{max-width:none}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-45{min-width:calc(var(--spacing)*45)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[200px\]{min-width:200px}.min-w-\[300px\]{min-width:300px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-auto{min-width:auto}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.caption-bottom{caption-side:bottom}.\!-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.\!translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)!important}.-translate-x-13{--tw-translate-x:calc(var(--spacing)*-13);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-15{--tw-translate-x:calc(var(--spacing)*-15);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-125{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.\[appearance\:textfield\]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.grid-cols-\[160px_1fr\]{grid-template-columns:160px 1fr}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\!overflow-hidden{overflow:hidden!important}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.\!rounded-none{border-radius:0!important}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tr-none{border-top-right-radius:0}.rounded-br-none{border-bottom-right-radius:0}.border,.border-1{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-blue-400{border-color:var(--color-blue-400)}.border-border\/40{border-color:color-mix(in oklab,var(--border)40%,transparent)}.border-destructive\/50{border-color:color-mix(in oklab,var(--destructive)50%,transparent)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-green-400{border-color:var(--color-green-400)}.border-input{border-color:var(--input)}.border-muted-foreground\/25{border-color:color-mix(in oklab,var(--muted-foreground)25%,transparent)}.border-muted-foreground\/30{border-color:color-mix(in oklab,var(--muted-foreground)30%,transparent)}.border-muted-foreground\/50{border-color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}.border-primary{border-color:var(--primary)}.border-primary-foreground\/30{border-color:color-mix(in oklab,var(--primary-foreground)30%,transparent)}.border-primary\/20{border-color:color-mix(in oklab,var(--primary)20%,transparent)}.border-red-400{border-color:var(--color-red-400)}.border-slate-300{border-color:var(--color-slate-300)}.border-transparent{border-color:#0000}.border-yellow-400{border-color:var(--color-yellow-400)}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.\!bg-background{background-color:var(--background)!important}.\!bg-emerald-400{background-color:var(--color-emerald-400)!important}.bg-amber-100{background-color:var(--color-amber-100)}.bg-background{background-color:var(--background)}.bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}.bg-background\/80{background-color:color-mix(in oklab,var(--background)80%,transparent)}.bg-background\/95{background-color:color-mix(in oklab,var(--background)95%,transparent)}.bg-black\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-card\/95{background-color:color-mix(in oklab,var(--card)95%,transparent)}.bg-destructive{background-color:var(--destructive)}.bg-destructive\/15{background-color:color-mix(in oklab,var(--destructive)15%,transparent)}.bg-foreground\/10{background-color:color-mix(in oklab,var(--foreground)10%,transparent)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground\/20{background-color:color-mix(in oklab,var(--muted-foreground)20%,transparent)}.bg-muted\/50{background-color:color-mix(in oklab,var(--muted)50%,transparent)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-primary-foreground\/20{background-color:color-mix(in oklab,var(--primary-foreground)20%,transparent)}.bg-primary-foreground\/60{background-color:color-mix(in oklab,var(--primary-foreground)60%,transparent)}.bg-primary\/5{background-color:color-mix(in oklab,var(--primary)5%,transparent)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-secondary{background-color:var(--secondary)}.bg-slate-200{background-color:var(--color-slate-200)}.bg-transparent{background-color:#0000}.bg-white\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-zinc-200{background-color:var(--color-zinc-200)}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-emerald-50{--tw-gradient-from:var(--color-emerald-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-100{--tw-gradient-to:var(--color-teal-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.object-cover{object-fit:cover}.\!p-0{padding:calc(var(--spacing)*0)!important}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.p-16{padding:calc(var(--spacing)*16)}.p-\[1px\]{padding:1px}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.pt-0{padding-top:calc(var(--spacing)*0)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-6{padding-top:calc(var(--spacing)*6)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-5{padding-right:calc(var(--spacing)*5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pb-12{padding-bottom:calc(var(--spacing)*12)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-5{padding-left:calc(var(--spacing)*5)}.pl-8{padding-left:calc(var(--spacing)*8)}.text-center{text-align:center}.text-left{text-align:left}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-zinc-50{color:var(--color-zinc-50)!important}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-destructive-foreground{color:var(--destructive-foreground)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-700{color:var(--color-emerald-700)}.text-foreground{color:var(--foreground)}.text-foreground\/80{color:color-mix(in oklab,var(--foreground)80%,transparent)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-green-600{color:var(--color-green-600)}.text-muted-foreground{color:var(--muted-foreground)}.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted-foreground)70%,transparent)}.text-orange-500{color:var(--color-orange-500)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-primary\/60{color:color-mix(in oklab,var(--primary)60%,transparent)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-slate-800{color:var(--color-slate-800)}.text-violet-700{color:var(--color-violet-700)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-zinc-100{color:var(--color-zinc-100)}.text-zinc-800{color:var(--color-zinc-800)}.lowercase{text-transform:lowercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(34\,197\,94\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#22c55e66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(239\,68\,68\,0\.4\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#ef444466);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_-1px_0_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:inset 0 -1px 0 var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-2000{--tw-duration:2s;transition-duration:2s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[-moz-appearance\:textfield\]{-moz-appearance:textfield}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-2000{animation-duration:2s}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.fade-in-0{--tw-enter-opacity:0}.running{animation-play-state:running}.zoom-in-95{--tw-enter-scale:.95}@media (hover:hover){.group-hover\:visible:is(:where(.group):hover *){visibility:visible}}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:bg-gray-100:focus-within{background-color:var(--color-gray-100)}@media (hover:hover){.hover\:w-fit:hover{width:fit-content}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-background\/60:hover{background-color:color-mix(in oklab,var(--background)60%,transparent)}.hover\:bg-destructive\/80:hover{background-color:color-mix(in oklab,var(--destructive)80%,transparent)}.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive)90%,transparent)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-muted:hover{background-color:var(--muted)}.hover\:bg-muted\/25:hover{background-color:color-mix(in oklab,var(--muted)25%,transparent)}.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted)50%,transparent)}.hover\:bg-primary\/5:hover{background-color:color-mix(in oklab,var(--primary)5%,transparent)}.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,var(--primary)20%,transparent)}.hover\:bg-primary\/80:hover{background-color:color-mix(in oklab,var(--primary)80%,transparent)}.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary)90%,transparent)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary)80%,transparent)}.hover\:bg-zinc-300:hover{background-color:var(--color-zinc-300)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-0:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-0:focus{outline-style:var(--tw-outline-style);outline-width:0}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:relative:focus-visible{position:relative}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentColor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:var(--ring)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:right-0:active{right:calc(var(--spacing)*0)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-.5rem}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:.5rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-.5rem}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:.5rem}.data-\[state\=active\]\:visible[data-state=active]{visibility:visible}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:bg-muted[data-state=checked]{background-color:var(--muted)}.data-\[state\=checked\]\:text-muted-foreground[data-state=checked]{color:var(--muted-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-name:exit;animation-duration:.15s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=inactive\]\:invisible[data-state=inactive]{visibility:hidden}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}@supports ((-webkit-backdrop-filter:var(--tw)) or (backdrop-filter:var(--tw))){.supports-\[backdrop-filter\]\:bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}.supports-\[backdrop-filter\]\:bg-card\/75{background-color:color-mix(in oklab,var(--card)75%,transparent)}}@media (width>=40rem){.sm\:mt-0{margin-top:calc(var(--spacing)*0)}.sm\:max-w-\[700px\]{max-width:700px}.sm\:max-w-\[800px\]{max-width:800px}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-xl{max-width:var(--container-xl)}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-5{padding-inline:calc(var(--spacing)*5)}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:inline-block{display:inline-block}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}.dark\:border-blue-600:is(.dark *){border-color:var(--color-blue-600)}.dark\:border-destructive:is(.dark *){border-color:var(--destructive)}.dark\:border-gray-500:is(.dark *){border-color:var(--color-gray-500)}.dark\:border-gray-600:is(.dark *){border-color:var(--color-gray-600)}.dark\:border-gray-700:is(.dark *){border-color:var(--color-gray-700)}.dark\:border-green-600:is(.dark *){border-color:var(--color-green-600)}.dark\:border-primary\/40:is(.dark *){border-color:color-mix(in oklab,var(--primary)40%,transparent)}.dark\:border-red-600:is(.dark *){border-color:var(--color-red-600)}.dark\:border-yellow-600:is(.dark *){border-color:var(--color-yellow-600)}.dark\:bg-amber-900:is(.dark *){background-color:var(--color-amber-900)}.dark\:bg-blue-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-blue-900)30%,transparent)}.dark\:bg-gray-700:is(.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-800\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-800)30%,transparent)}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-green-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-green-900)30%,transparent)}.dark\:bg-red-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}.dark\:bg-red-950:is(.dark *){background-color:var(--color-red-950)}.dark\:bg-yellow-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900)30%,transparent)}.dark\:bg-zinc-700:is(.dark *){background-color:var(--color-zinc-700)}.dark\:from-gray-900:is(.dark *){--tw-gradient-from:var(--color-gray-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\:to-gray-800:is(.dark *){--tw-gradient-to:var(--color-gray-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.dark\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\:text-gray-300:is(.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-zinc-200:is(.dark *){color:var(--color-zinc-200)}.dark\:focus-within\:bg-gray-700:is(.dark *):focus-within{background-color:var(--color-gray-700)}@media (hover:hover){.dark\:hover\:bg-gray-700:is(.dark *):hover{background-color:var(--color-gray-700)}.dark\:hover\:bg-gray-800:is(.dark *):hover{background-color:var(--color-gray-800)}.dark\:hover\:bg-red-900:is(.dark *):hover{background-color:var(--color-red-900)}.dark\:hover\:bg-zinc-600:is(.dark *):hover{background-color:var(--color-zinc-600)}.dark\:hover\:text-gray-200:is(.dark *):hover{color:var(--color-gray-200)}}.\[\&_\.footnotes\]\:mt-6 .footnotes{margin-top:calc(var(--spacing)*6)}.\[\&_\.footnotes\]\:mt-8 .footnotes{margin-top:calc(var(--spacing)*8)}.\[\&_\.footnotes\]\:border-t .footnotes{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.footnotes\]\:border-border .footnotes{border-color:var(--border)}.\[\&_\.footnotes\]\:border-primary-foreground\/30 .footnotes{border-color:color-mix(in oklab,var(--primary-foreground)30%,transparent)}.\[\&_\.footnotes\]\:pt-3 .footnotes{padding-top:calc(var(--spacing)*3)}.\[\&_\.footnotes\]\:pt-4 .footnotes{padding-top:calc(var(--spacing)*4)}.\[\&_\.footnotes_li\]\:my-0\.5 .footnotes li{margin-block:calc(var(--spacing)*.5)}.\[\&_\.footnotes_li\]\:my-1 .footnotes li{margin-block:calc(var(--spacing)*1)}.\[\&_\.footnotes_ol\]\:text-sm .footnotes ol{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.footnotes_ol\]\:text-xs .footnotes ol{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.katex\]\:text-current .katex{color:currentColor}.\[\&_\.katex-display\]\:my-4 .katex-display{margin-block:calc(var(--spacing)*4)}.\[\&_\.katex-display\]\:max-w-full .katex-display{max-width:100%}.\[\&_\.katex-display_\>\.base\]\:overflow-x-auto .katex-display>.base{overflow-x:auto}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing)*1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing)*0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing)*5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing)*12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing)*2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing)*3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing)*5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing)*5)}.\[\&_a\[href\^\=\"\#fn\"\]\]\:text-primary a[href^="#fn"]{color:var(--primary)}.\[\&_a\[href\^\=\"\#fn\"\]\]\:text-primary-foreground a[href^="#fn"]{color:var(--primary-foreground)}.\[\&_a\[href\^\=\"\#fn\"\]\]\:no-underline a[href^="#fn"]{text-decoration-line:none}@media (hover:hover){.\[\&_a\[href\^\=\"\#fn\"\]\]\:hover\:underline a[href^="#fn"]:hover{text-decoration-line:underline}}.\[\&_a\[href\^\=\"\#fnref\"\]\]\:text-primary a[href^="#fnref"]{color:var(--primary)}.\[\&_a\[href\^\=\"\#fnref\"\]\]\:text-primary-foreground a[href^="#fnref"]{color:var(--primary-foreground)}.\[\&_a\[href\^\=\"\#fnref\"\]\]\:no-underline a[href^="#fnref"]{text-decoration-line:none}@media (hover:hover){.\[\&_a\[href\^\=\"\#fnref\"\]\]\:hover\:underline a[href^="#fnref"]:hover{text-decoration-line:underline}}.\[\&_a\[href\^\=\'\#fn\'\]\]\:text-primary a[href^="#fn"]{color:var(--primary)}.\[\&_a\[href\^\=\'\#fn\'\]\]\:no-underline a[href^="#fn"]{text-decoration-line:none}@media (hover:hover){.\[\&_a\[href\^\=\'\#fn\'\]\]\:hover\:underline a[href^="#fn"]:hover{text-decoration-line:underline}}.\[\&_a\[href\^\=\'\#fnref\'\]\]\:text-primary a[href^="#fnref"]{color:var(--primary)}.\[\&_a\[href\^\=\'\#fnref\'\]\]\:no-underline a[href^="#fnref"]{text-decoration-line:none}@media (hover:hover){.\[\&_a\[href\^\=\'\#fnref\'\]\]\:hover\:underline a[href^="#fnref"]:hover{text-decoration-line:underline}}.\[\&_del\]\:line-through del{text-decoration-line:line-through}.\[\&_ins\]\:underline ins{text-decoration-line:underline}.\[\&_ins\]\:decoration-green-500 ins{-webkit-text-decoration-color:var(--color-green-500);text-decoration-color:var(--color-green-500)}.\[\&_mark\]\:bg-yellow-200 mark{background-color:var(--color-yellow-200)}.\[\&_mark\]\:dark\:bg-yellow-800 mark:is(.dark *){background-color:var(--color-yellow-800)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_sub\]\:align-\[-0\.2em\] sub{vertical-align:-.2em}.\[\&_sub\]\:text-\[0\.75em\] sub{font-size:.75em}.\[\&_sub\]\:leading-\[0\] sub{--tw-leading:0;line-height:0}.\[\&_sup\]\:align-\[0\.1em\] sup{vertical-align:.1em}.\[\&_sup\]\:text-\[0\.75em\] sup{font-size:.75em}.\[\&_sup\]\:leading-\[0\] sup{--tw-leading:0;line-height:0}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&_u\]\:underline u{text-decoration-line:underline}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-inner-spin-button\]\:opacity-50::-webkit-inner-spin-button{opacity:.5}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:opacity-50::-webkit-outer-spin-button{opacity:.5}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing)*0)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>span\]\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&\>span\]\:break-all>span{word-break:break-all}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:top-4>svg{top:calc(var(--spacing)*4)}.\[\&\>svg\]\:left-4>svg{left:calc(var(--spacing)*4)}.\[\&\>svg\]\:text-destructive>svg{color:var(--destructive)}.\[\&\>svg\]\:text-foreground>svg{color:var(--foreground)}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;translate:var(--tw-translate-x)var(--tw-translate-y)}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:calc(var(--spacing)*7)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}}:root{--background:#fff;--foreground:#09090b;--card:#fff;--card-foreground:#09090b;--popover:#fff;--popover-foreground:#09090b;--primary:#18181b;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#18181b;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#18181b;--destructive:#ef4444;--destructive-foreground:#fafafa;--border:#e4e4e7;--input:#e4e4e7;--ring:#09090b;--chart-1:#e76e50;--chart-2:#2a9d90;--chart-3:#274754;--chart-4:#e8c468;--chart-5:#f4a462;--radius:.6rem;--sidebar-background:#fafafa;--sidebar-foreground:#3f3f46;--sidebar-primary:#18181b;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f4f4f5;--sidebar-accent-foreground:#18181b;--sidebar-border:#e5e7eb;--sidebar-ring:#3b82f6}.dark{--background:#09090b;--foreground:#fafafa;--card:#09090b;--card-foreground:#fafafa;--popover:#09090b;--popover-foreground:#fafafa;--primary:#fafafa;--primary-foreground:#18181b;--secondary:#27272a;--secondary-foreground:#fafafa;--muted:#27272a;--muted-foreground:#a1a1aa;--accent:#27272a;--accent-foreground:#fafafa;--destructive:#7f1d1d;--destructive-foreground:#fafafa;--border:#27272a;--input:#27272a;--ring:#d4d4d8;--chart-1:#2662d9;--chart-2:#2eb88a;--chart-3:#e88c30;--chart-4:#af57db;--chart-5:#e23670;--sidebar-background:#18181b;--sidebar-foreground:#f4f4f5;--sidebar-primary:#1d4ed8;--sidebar-primary-foreground:#fff;--sidebar-accent:#27272a;--sidebar-accent-foreground:#f4f4f5;--sidebar-border:#27272a;--sidebar-ring:#3b82f6}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background-color:#ccc;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.dark ::-webkit-scrollbar-thumb{background-color:#e6e6e6}.dark ::-webkit-scrollbar-track{background-color:#000}.katex-display-wrapper{text-align:center;position:relative}.katex-display-wrapper .katex-display{text-align:center;margin:.5em 0}.katex-inline-wrapper .katex{font-size:inherit;line-height:inherit}.katex .base,.katex .mord,.katex .mop,.katex .mbin,.katex .mrel,.katex .mpunct,.katex .mopen,.katex .mclose,.katex .minner{color:inherit}.katex-display{max-width:100%;overflow:auto hidden}.katex-display>.katex{white-space:nowrap}.katex .katex-error{color:#dc2626;background-color:#ff00001a;border:1px solid #ff00004d;border-radius:4px;padding:2px 4px}.dark .katex .katex-error{color:#ef4444;background-color:#f003;border-color:#f006}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0))}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}:root{--sigma-background-color:#fff;--sigma-controls-background-color:#fff;--sigma-controls-background-color-hover:rgba(0,0,0,.2);--sigma-controls-border-color:rgba(0,0,0,.2);--sigma-controls-color:#000;--sigma-controls-zindex:100;--sigma-controls-margin:5px;--sigma-controls-size:30px}div.react-sigma{height:100%;width:100%;position:relative;background:var(--sigma-background-color)}div.sigma-container{height:100%;width:100%}.react-sigma-controls{position:absolute;z-index:var(--sigma-controls-zindex);border:2px solid var(--sigma-controls-border-color);border-radius:4px;color:var(--sigma-controls-color);background-color:var(--sigma-controls-background-color)}.react-sigma-controls.bottom-right{bottom:var(--sigma-controls-margin);right:var(--sigma-controls-margin)}.react-sigma-controls.bottom-left{bottom:var(--sigma-controls-margin);left:var(--sigma-controls-margin)}.react-sigma-controls.top-right{top:var(--sigma-controls-margin);right:var(--sigma-controls-margin)}.react-sigma-controls.top-left{top:var(--sigma-controls-margin);left:var(--sigma-controls-margin)}.react-sigma-controls:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.react-sigma-controls:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.react-sigma-control{width:var(--sigma-controls-size);height:var(--sigma-controls-size);line-height:var(--sigma-controls-size);background-color:var(--sigma-controls-background-color);border-bottom:1px solid var(--sigma-controls-border-color)}.react-sigma-control:last-child{border-bottom:none}.react-sigma-control>*{box-sizing:border-box}.react-sigma-control>button{display:block;border:none;margin:0;padding:0;width:var(--sigma-controls-size);height:var(--sigma-controls-size);line-height:var(--sigma-controls-size);background-position:center;background-size:50%;background-repeat:no-repeat;background-color:var(--sigma-controls-background-color);clip:rect(0,0,0,0)}.react-sigma-control>button:hover{background-color:var(--sigma-controls-background-color-hover)}.react-sigma-search{background-color:var(--sigma-controls-background-color)}.react-sigma-search label{visibility:hidden}.react-sigma-search input{color:var(--sigma-controls-color);background-color:var(--sigma-controls-background-color);font-size:1em;width:100%;margin:0;border:none;padding:var(--sigma-controls-margin);box-sizing:border-box}:root{--sigma-grey-color:#ccc}.react-sigma .option.hoverable{cursor:pointer!important}.react-sigma .text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.react-sigma .react-select__clear-indicator{cursor:pointer!important}.react-sigma .text-muted{color:var(--sigma-grey-color)}.react-sigma .text-italic{font-style:italic}.react-sigma .text-center{text-align:center}.react-sigma .graph-search{min-width:250px}.react-sigma .graph-search .option{padding:2px 8px}.react-sigma .graph-search .dropdown-indicator{font-size:1.25em;padding:4px}.react-sigma .graph-search .option.selected{background-color:var(--sigma-grey-color)}.react-sigma .node .render{position:relative;display:inline-block;width:1em;height:1em;border-radius:1em;background-color:var(--sigma-grey-color);margin-right:8px}.react-sigma .node{display:flex;flex-direction:row;align-items:center}.react-sigma .node .render{flex-grow:0;flex-shrink:0;margin-right:0 .25em}.react-sigma .node .label{flex-grow:1;flex-shrink:1}.react-sigma .edge{display:flex;flex-direction:column;align-items:flex-start;flex-grow:0;flex-shrink:0;flex-wrap:nowrap}.react-sigma .edge .node{font-size:.7em}.react-sigma .edge .body{display:flex;flex-direction:row;flex-grow:1;flex-shrink:1;min-height:.6em}.react-sigma .edge .body .render{display:flex;flex-direction:column;margin:0 2px}.react-sigma .edge .body .render .dash,.react-sigma .edge .body .render .dotted{display:inline-block;width:0;margin:0 2px;border:2px solid #ccc;flex-grow:1;flex-shrink:1}.react-sigma .edge .body .render .dotted{border-style:dotted}.react-sigma .edge .body .render .arrow{width:0;height:0;border-left:.3em solid transparent;border-right:.3em solid transparent;border-top:.6em solid red;flex-shrink:0;flex-grow:0;border-left-width:.3em;border-right-width:.3em}.react-sigma .edge .body .label{flex-grow:1;flex-shrink:1;text-align:center}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(/webui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(/webui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/webui/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(/webui/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(/webui/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(/webui/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(/webui/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/webui/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(/webui/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(/webui/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(/webui/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(/webui/assets/KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/webui/assets/KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(/webui/assets/KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(/webui/assets/KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/webui/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(/webui/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(/webui/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/webui/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(/webui/assets/KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(/webui/assets/KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(/webui/assets/KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(/webui/assets/KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/webui/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(/webui/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(/webui/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/webui/assets/KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(/webui/assets/KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(/webui/assets/KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/webui/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(/webui/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(/webui/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/webui/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(/webui/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(/webui/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(/webui/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(/webui/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(/webui/assets/KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(/webui/assets/KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(/webui/assets/KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(/webui/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(/webui/assets/KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(/webui/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(/webui/assets/KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(/webui/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(/webui/assets/KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(/webui/assets/KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/webui/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(/webui/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(/webui/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font: 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.16.22"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo} diff --git a/lightrag/api/webui/assets/index-bjrbS6e8.js b/lightrag/api/webui/assets/index-bjrbS6e8.js deleted file mode 100644 index c33c21ab..00000000 --- a/lightrag/api/webui/assets/index-bjrbS6e8.js +++ /dev/null @@ -1,1916 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-JOIXM2OF-BOgsd5OI.js","assets/graph-OaiGNqgf.js","assets/_baseUniq-DknB5v3H.js","assets/layout-B_oBip_m.js","assets/_basePickBy-UdMCOwSh.js","assets/clone-g5iXXiWA.js","assets/c4Diagram-6F6E4RAY-D__gcenR.js","assets/chunk-67H74DCK-BDUtSXeJ.js","assets/flowDiagram-KYDEHFYC-DqicljNB.js","assets/chunk-E2GYISFI-Csg-WUa_.js","assets/chunk-BFAMUDN2-DaWGHPR3.js","assets/chunk-SKB7J2MH-ty0WEC-6.js","assets/channel-oXqxytzI.js","assets/erDiagram-3M52JZNH-Df8Y6784.js","assets/gitGraphDiagram-GW3U2K7C-DZ0ieBSO.js","assets/chunk-353BL4L5-BJGenYOY.js","assets/chunk-AACKK3MU-Cz8YDG2R.js","assets/treemap-75Q7IDZK-DNUGBdnj.js","assets/ganttDiagram-EK5VF46D-DwLPqhwB.js","assets/linear-_bOHiOEq.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-C4B-KCzX.js","assets/infoDiagram-LHK5PUON-D6tbt8Cv.js","assets/pieDiagram-NIOCPIFQ-DeTCpBAx.js","assets/arc-D-vjsldI.js","assets/ordinal-BENe2yWM.js","assets/quadrantDiagram-2OG54O6I-BoB9YrlU.js","assets/xychartDiagram-H2YORKM3-_2gNksZO.js","assets/requirementDiagram-QOLK2EJ7-DNTM2S8P.js","assets/sequenceDiagram-SKLFT4DO-D8kz91Ev.js","assets/classDiagram-M3E45YP4-CtKtKEN8.js","assets/chunk-SZ463SBG-3gzxcxJa.js","assets/classDiagram-v2-YAWTLIQI-CtKtKEN8.js","assets/stateDiagram-MI5ZYTHO-B_q7wnbg.js","assets/chunk-OW32GOEJ-BuH8nVF7.js","assets/stateDiagram-v2-5AN5P6BG-CLuyQWVD.js","assets/journeyDiagram-EWQZEKCU-BvwHSbzl.js","assets/timeline-definition-MYPXXCX6-DKrn60Fe.js","assets/mindmap-definition-6CBA2TL7-BAMs8lsW.js","assets/cytoscape.esm-CfBqOv7Q.js","assets/kanban-definition-ZSS6B67P-CkDtg-z1.js","assets/sankeyDiagram-4UZDY2LN-BdzX2574.js","assets/diagram-5UYTHUR4-drHgj1y7.js","assets/diagram-ZTM2IBQH-Fm-2H3OV.js","assets/blockDiagram-6J76NXCF-uKai_NGQ.js","assets/architectureDiagram-SUXI7LT5-CykL5gar.js","assets/diagram-VMROVX33-C95hc9hP.js"])))=>i.map(i=>d[i]); -var ehe=Object.defineProperty;var the=(e,t,r)=>t in e?ehe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var gt=(e,t,r)=>the(e,typeof t!="symbol"?t+"":t,r);function rhe(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var Pb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function On(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function nhe(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var YE={exports:{}},gf={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var _8;function ahe(){if(_8)return gf;_8=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,i){var o=null;if(i!==void 0&&(o=""+i),a.key!==void 0&&(o=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:e,type:n,key:o,ref:a!==void 0?a:null,props:i}}return gf.Fragment=t,gf.jsx=r,gf.jsxs=r,gf}var D8;function ihe(){return D8||(D8=1,YE.exports=ahe()),YE.exports}var S=ihe(),XE={exports:{}},dr={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var R8;function ohe(){if(R8)return dr;R8=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;function f(P){return P===null||typeof P!="object"?null:(P=h&&P[h]||P["@@iterator"],typeof P=="function"?P:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function F(P,Z,K){this.props=P,this.context=Z,this.refs=y,this.updater=K||m}F.prototype.isReactComponent={},F.prototype.setState=function(P,Z){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,Z,"setState")},F.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function x(){}x.prototype=F.prototype;function E(P,Z,K){this.props=P,this.context=Z,this.refs=y,this.updater=K||m}var C=E.prototype=new x;C.constructor=E,b(C,F.prototype),C.isPureReactComponent=!0;var _=Array.isArray,D={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function A(P,Z,K,G,ne,oe){return K=oe.ref,{$$typeof:e,type:P,key:Z,ref:K!==void 0?K:null,props:oe}}function I(P,Z){return A(P.type,Z,void 0,void 0,void 0,P.props)}function M(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function L(P){var Z={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(K){return Z[K]})}var U=/\/+/g;function j(P,Z){return typeof P=="object"&&P!==null&&P.key!=null?L(""+P.key):Z.toString(36)}function z(){}function V(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(z,z):(P.status="pending",P.then(function(Z){P.status==="pending"&&(P.status="fulfilled",P.value=Z)},function(Z){P.status==="pending"&&(P.status="rejected",P.reason=Z)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function X(P,Z,K,G,ne){var oe=typeof P;(oe==="undefined"||oe==="boolean")&&(P=null);var de=!1;if(P===null)de=!0;else switch(oe){case"bigint":case"string":case"number":de=!0;break;case"object":switch(P.$$typeof){case e:case t:de=!0;break;case d:return de=P._init,X(de(P._payload),Z,K,G,ne)}}if(de)return ne=ne(P),de=G===""?"."+j(P,0):G,_(ne)?(K="",de!=null&&(K=de.replace(U,"$&/")+"/"),X(ne,Z,K,"",function(Ne){return Ne})):ne!=null&&(M(ne)&&(ne=I(ne,K+(ne.key==null||P&&P.key===ne.key?"":(""+ne.key).replace(U,"$&/")+"/")+de)),Z.push(ne)),1;de=0;var ie=G===""?".":G+":";if(_(P))for(var ue=0;ue>>1,P=q[te];if(0>>1;tea(G,B))nea(oe,G)?(q[te]=oe,q[ne]=B,te=ne):(q[te]=G,q[K]=B,te=K);else if(nea(oe,B))q[te]=oe,q[ne]=B,te=ne;else break e}}return W}function a(q,W){var B=q.sortIndex-W.sortIndex;return B!==0?B:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],d=1,h=null,f=3,m=!1,b=!1,y=!1,F=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function C(q){for(var W=r(u);W!==null;){if(W.callback===null)n(u);else if(W.startTime<=q)n(u),W.sortIndex=W.expirationTime,t(l,W);else break;W=r(u)}}function _(q){if(y=!1,C(q),!b)if(r(l)!==null)b=!0,V();else{var W=r(u);W!==null&&X(_,W.startTime-q)}}var D=!1,w=-1,A=5,I=-1;function M(){return!(e.unstable_now()-Iq&&M());){var te=h.callback;if(typeof te=="function"){h.callback=null,f=h.priorityLevel;var P=te(h.expirationTime<=q);if(q=e.unstable_now(),typeof P=="function"){h.callback=P,C(q),W=!0;break t}h===r(l)&&n(l),C(q)}else n(l);h=r(l)}if(h!==null)W=!0;else{var Z=r(u);Z!==null&&X(_,Z.startTime-q),W=!1}}break e}finally{h=null,f=B,m=!1}W=void 0}}finally{W?U():D=!1}}}var U;if(typeof E=="function")U=function(){E(L)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,z=j.port2;j.port1.onmessage=L,U=function(){z.postMessage(null)}}else U=function(){F(L,0)};function V(){D||(D=!0,U())}function X(q,W){w=F(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){b||m||(b=!0,V())},e.unstable_forceFrameRate=function(q){0>q||125te?(q.sortIndex=B,t(u,q),r(l)===null&&q===r(u)&&(y?(x(w),w=-1):y=!0,X(_,B-te))):(q.sortIndex=P,t(l,q),b||m||(b=!0,V())),q},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(q){var W=f;return function(){var B=f;f=W;try{return q.apply(this,arguments)}finally{f=B}}}}(QE)),QE}var M8;function uhe(){return M8||(M8=1,ZE.exports=lhe()),ZE.exports}var eS={exports:{}},Fa={};/** - * @license React - * react-dom.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var I8;function che(){if(I8)return Fa;I8=1;var e=ov();function t(l){var u="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),eS.exports=che(),eS.exports}/** - * @license React - * react-dom-client.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var B8;function dhe(){if(B8)return bf;B8=1;var e=uhe(),t=ov(),r=AV();function n(c){var p="https://react.dev/errors/"+c;if(1)":-1k||se[v]!==ve[k]){var ze=` -`+se[v].replace(" at new "," at ");return c.displayName&&ze.includes("")&&(ze=ze.replace("",c.displayName)),ze}while(1<=v&&0<=k);break}}}finally{V=!1,Error.prepareStackTrace=g}return(g=c?c.displayName||c.name:"")?z(g):""}function q(c){switch(c.tag){case 26:case 27:case 5:return z(c.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 15:return c=X(c.type,!1),c;case 11:return c=X(c.type.render,!1),c;case 1:return c=X(c.type,!0),c;default:return""}}function W(c){try{var p="";do p+=q(c),c=c.return;while(c);return p}catch(g){return` -Error generating stack: `+g.message+` -`+g.stack}}function B(c){var p=c,g=c;if(c.alternate)for(;p.return;)p=p.return;else{c=p;do p=c,p.flags&4098&&(g=p.return),c=p.return;while(c)}return p.tag===3?g:null}function te(c){if(c.tag===13){var p=c.memoizedState;if(p===null&&(c=c.alternate,c!==null&&(p=c.memoizedState)),p!==null)return p.dehydrated}return null}function P(c){if(B(c)!==c)throw Error(n(188))}function Z(c){var p=c.alternate;if(!p){if(p=B(c),p===null)throw Error(n(188));return p!==c?null:c}for(var g=c,v=p;;){var k=g.return;if(k===null)break;var R=k.alternate;if(R===null){if(v=k.return,v!==null){g=v;continue}break}if(k.child===R.child){for(R=k.child;R;){if(R===g)return P(k),c;if(R===v)return P(k),p;R=R.sibling}throw Error(n(188))}if(g.return!==v.return)g=k,v=R;else{for(var Y=!1,ee=k.child;ee;){if(ee===g){Y=!0,g=k,v=R;break}if(ee===v){Y=!0,v=k,g=R;break}ee=ee.sibling}if(!Y){for(ee=R.child;ee;){if(ee===g){Y=!0,g=R,v=k;break}if(ee===v){Y=!0,v=R,g=k;break}ee=ee.sibling}if(!Y)throw Error(n(189))}}if(g.alternate!==v)throw Error(n(190))}if(g.tag!==3)throw Error(n(188));return g.stateNode.current===g?c:p}function K(c){var p=c.tag;if(p===5||p===26||p===27||p===6)return c;for(c=c.child;c!==null;){if(p=K(c),p!==null)return p;c=c.sibling}return null}var G=Array.isArray,ne=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},de=[],ie=-1;function ue(c){return{current:c}}function Ne(c){0>ie||(c.current=de[ie],de[ie]=null,ie--)}function pe(c,p){ie++,de[ie]=c.current,c.current=p}var Le=ue(null),Me=ue(null),Ee=ue(null),Te=ue(null);function Re(c,p){switch(pe(Ee,p),pe(Me,c),pe(Le,null),c=p.nodeType,c){case 9:case 11:p=(p=p.documentElement)&&(p=p.namespaceURI)?a8(p):0;break;default:if(c=c===8?p.parentNode:p,p=c.tagName,c=c.namespaceURI)c=a8(c),p=i8(c,p);else switch(p){case"svg":p=1;break;case"math":p=2;break;default:p=0}}Ne(Le),pe(Le,p)}function fe(){Ne(Le),Ne(Me),Ne(Ee)}function Ze(c){c.memoizedState!==null&&pe(Te,c);var p=Le.current,g=i8(p,c.type);p!==g&&(pe(Me,c),pe(Le,g))}function yt(c){Me.current===c&&(Ne(Le),Ne(Me)),Te.current===c&&(Ne(Te),df._currentValue=oe)}var qe=Object.prototype.hasOwnProperty,Ke=e.unstable_scheduleCallback,xe=e.unstable_cancelCallback,Yt=e.unstable_shouldYield,nr=e.unstable_requestPaint,Pe=e.unstable_now,Qe=e.unstable_getCurrentPriorityLevel,me=e.unstable_ImmediatePriority,ke=e.unstable_UserBlockingPriority,Ye=e.unstable_NormalPriority,pt=e.unstable_LowPriority,St=e.unstable_IdlePriority,gr=e.log,Sr=e.unstable_setDisableYieldValue,ar=null,Nt=null;function br(c){if(Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(ar,c,void 0,(c.current.flags&128)===128)}catch{}}function Fe(c){if(typeof gr=="function"&&Sr(c),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(ar,c)}catch{}}var $e=Math.clz32?Math.clz32:Lt,ct=Math.log,vt=Math.LN2;function Lt(c){return c>>>=0,c===0?32:31-(ct(c)/vt|0)|0}var fr=128,Pr=4194304;function Jr(c){var p=c&42;if(p!==0)return p;switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return c&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return c}}function ba(c,p){var g=c.pendingLanes;if(g===0)return 0;var v=0,k=c.suspendedLanes,R=c.pingedLanes,Y=c.warmLanes;c=c.finishedLanes!==0;var ee=g&134217727;return ee!==0?(g=ee&~k,g!==0?v=Jr(g):(R&=ee,R!==0?v=Jr(R):c||(Y=ee&~Y,Y!==0&&(v=Jr(Y))))):(ee=g&~k,ee!==0?v=Jr(ee):R!==0?v=Jr(R):c||(Y=g&~Y,Y!==0&&(v=Jr(Y)))),v===0?0:p!==0&&p!==v&&!(p&k)&&(k=v&-v,Y=p&-p,k>=Y||k===32&&(Y&4194176)!==0)?p:v}function ft(c,p){return(c.pendingLanes&~(c.suspendedLanes&~c.pingedLanes)&p)===0}function or(c,p){switch(c){case 1:case 2:case 4:case 8:return p+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gr(){var c=fr;return fr<<=1,!(fr&4194176)&&(fr=128),c}function aa(){var c=Pr;return Pr<<=1,!(Pr&62914560)&&(Pr=4194304),c}function zn(c){for(var p=[],g=0;31>g;g++)p.push(c);return p}function ia(c,p){c.pendingLanes|=p,p!==268435456&&(c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0)}function Mi(c,p,g,v,k,R){var Y=c.pendingLanes;c.pendingLanes=g,c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0,c.expiredLanes&=g,c.entangledLanes&=g,c.errorRecoveryDisabledLanes&=g,c.shellSuspendCounter=0;var ee=c.entanglements,se=c.expirationTimes,ve=c.hiddenUpdates;for(g=Y&~g;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),j0=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),iL={},oL={};function Kue(c){return qe.call(oL,c)?!0:qe.call(iL,c)?!1:j0.test(c)?oL[c]=!0:(iL[c]=!0,!1)}function q0(c,p,g){if(Kue(p))if(g===null)c.removeAttribute(p);else{switch(typeof g){case"undefined":case"function":case"symbol":c.removeAttribute(p);return;case"boolean":var v=p.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){c.removeAttribute(p);return}}c.setAttribute(p,""+g)}}function W0(c,p,g){if(g===null)c.removeAttribute(p);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":c.removeAttribute(p);return}c.setAttribute(p,""+g)}}function Fs(c,p,g,v){if(v===null)c.removeAttribute(g);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":c.removeAttribute(g);return}c.setAttributeNS(p,g,""+v)}}function Bi(c){switch(typeof c){case"bigint":case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function sL(c){var p=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(p==="checkbox"||p==="radio")}function Yue(c){var p=sL(c)?"checked":"value",g=Object.getOwnPropertyDescriptor(c.constructor.prototype,p),v=""+c[p];if(!c.hasOwnProperty(p)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var k=g.get,R=g.set;return Object.defineProperty(c,p,{configurable:!0,get:function(){return k.call(this)},set:function(Y){v=""+Y,R.call(this,Y)}}),Object.defineProperty(c,p,{enumerable:g.enumerable}),{getValue:function(){return v},setValue:function(Y){v=""+Y},stopTracking:function(){c._valueTracker=null,delete c[p]}}}}function V0(c){c._valueTracker||(c._valueTracker=Yue(c))}function lL(c){if(!c)return!1;var p=c._valueTracker;if(!p)return!0;var g=p.getValue(),v="";return c&&(v=sL(c)?c.checked?"true":"false":c.value),c=v,c!==g?(p.setValue(c),!0):!1}function K0(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}var Xue=/[\n"\\]/g;function Pi(c){return c.replace(Xue,function(p){return"\\"+p.charCodeAt(0).toString(16)+" "})}function V2(c,p,g,v,k,R,Y,ee){c.name="",Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?c.type=Y:c.removeAttribute("type"),p!=null?Y==="number"?(p===0&&c.value===""||c.value!=p)&&(c.value=""+Bi(p)):c.value!==""+Bi(p)&&(c.value=""+Bi(p)):Y!=="submit"&&Y!=="reset"||c.removeAttribute("value"),p!=null?K2(c,Y,Bi(p)):g!=null?K2(c,Y,Bi(g)):v!=null&&c.removeAttribute("value"),k==null&&R!=null&&(c.defaultChecked=!!R),k!=null&&(c.checked=k&&typeof k!="function"&&typeof k!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?c.name=""+Bi(ee):c.removeAttribute("name")}function uL(c,p,g,v,k,R,Y,ee){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(c.type=R),p!=null||g!=null){if(!(R!=="submit"&&R!=="reset"||p!=null))return;g=g!=null?""+Bi(g):"",p=p!=null?""+Bi(p):g,ee||p===c.value||(c.value=p),c.defaultValue=p}v=v??k,v=typeof v!="function"&&typeof v!="symbol"&&!!v,c.checked=ee?c.checked:!!v,c.defaultChecked=!!v,Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"&&(c.name=Y)}function K2(c,p,g){p==="number"&&K0(c.ownerDocument)===c||c.defaultValue===""+g||(c.defaultValue=""+g)}function id(c,p,g,v){if(c=c.options,p){p={};for(var k=0;k=Ap),SL=" ",xL=!1;function wL(c,p){switch(c){case"keyup":return wce.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kL(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var ud=!1;function Cce(c,p){switch(c){case"compositionend":return kL(p);case"keypress":return p.which!==32?null:(xL=!0,SL);case"textInput":return c=p.data,c===SL&&xL?null:c;default:return null}}function Tce(c,p){if(ud)return c==="compositionend"||!iF&&wL(c,p)?(c=gL(),X0=eF=xl=null,ud=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1=p)return{node:g,offset:p-c};c=v}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=LL(g)}}function IL(c,p){return c&&p?c===p?!0:c&&c.nodeType===3?!1:p&&p.nodeType===3?IL(c,p.parentNode):"contains"in c?c.contains(p):c.compareDocumentPosition?!!(c.compareDocumentPosition(p)&16):!1:!1}function OL(c){c=c!=null&&c.ownerDocument!=null&&c.ownerDocument.defaultView!=null?c.ownerDocument.defaultView:window;for(var p=K0(c.document);p instanceof c.HTMLIFrameElement;){try{var g=typeof p.contentWindow.location.href=="string"}catch{g=!1}if(g)c=p.contentWindow;else break;p=K0(c.document)}return p}function lF(c){var p=c&&c.nodeName&&c.nodeName.toLowerCase();return p&&(p==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||p==="textarea"||c.contentEditable==="true")}function Ice(c,p){var g=OL(p);p=c.focusedElem;var v=c.selectionRange;if(g!==p&&p&&p.ownerDocument&&IL(p.ownerDocument.documentElement,p)){if(v!==null&&lF(p)){if(c=v.start,g=v.end,g===void 0&&(g=c),"selectionStart"in p)p.selectionStart=c,p.selectionEnd=Math.min(g,p.value.length);else if(g=(c=p.ownerDocument||document)&&c.defaultView||window,g.getSelection){g=g.getSelection();var k=p.textContent.length,R=Math.min(v.start,k);v=v.end===void 0?R:Math.min(v.end,k),!g.extend&&R>v&&(k=v,v=R,R=k),k=ML(p,R);var Y=ML(p,v);k&&Y&&(g.rangeCount!==1||g.anchorNode!==k.node||g.anchorOffset!==k.offset||g.focusNode!==Y.node||g.focusOffset!==Y.offset)&&(c=c.createRange(),c.setStart(k.node,k.offset),g.removeAllRanges(),R>v?(g.addRange(c),g.extend(Y.node,Y.offset)):(c.setEnd(Y.node,Y.offset),g.addRange(c)))}}for(c=[],g=p;g=g.parentNode;)g.nodeType===1&&c.push({element:g,left:g.scrollLeft,top:g.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p=document.documentMode,cd=null,uF=null,Np=null,cF=!1;function BL(c,p,g){var v=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;cF||cd==null||cd!==K0(v)||(v=cd,"selectionStart"in v&&lF(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Np&&Rp(Np,v)||(Np=v,v=Bg(uF,"onSelect"),0>=Y,k-=Y,Es=1<<32-$e(p)+k|g<Vt?(Jn=Ht,Ht=null):Jn=Ht.sibling;var Ir=De(Se,Ht,Ae[Vt],He);if(Ir===null){Ht===null&&(Ht=Jn);break}c&&Ht&&Ir.alternate===null&&p(Se,Ht),ye=R(Ir,ye,Vt),yr===null?wt=Ir:yr.sibling=Ir,yr=Ir,Ht=Jn}if(Vt===Ae.length)return g(Se,Ht),Mr&&Iu(Se,Vt),wt;if(Ht===null){for(;VtVt?(Jn=Ht,Ht=null):Jn=Ht.sibling;var $l=De(Se,Ht,Ir.value,He);if($l===null){Ht===null&&(Ht=Jn);break}c&&Ht&&$l.alternate===null&&p(Se,Ht),ye=R($l,ye,Vt),yr===null?wt=$l:yr.sibling=$l,yr=$l,Ht=Jn}if(Ir.done)return g(Se,Ht),Mr&&Iu(Se,Vt),wt;if(Ht===null){for(;!Ir.done;Vt++,Ir=Ae.next())Ir=We(Se,Ir.value,He),Ir!==null&&(ye=R(Ir,ye,Vt),yr===null?wt=Ir:yr.sibling=Ir,yr=Ir);return Mr&&Iu(Se,Vt),wt}for(Ht=v(Ht);!Ir.done;Vt++,Ir=Ae.next())Ir=Be(Ht,Se,Vt,Ir.value,He),Ir!==null&&(c&&Ir.alternate!==null&&Ht.delete(Ir.key===null?Vt:Ir.key),ye=R(Ir,ye,Vt),yr===null?wt=Ir:yr.sibling=Ir,yr=Ir);return c&&Ht.forEach(function(Qde){return p(Se,Qde)}),Mr&&Iu(Se,Vt),wt}function Fn(Se,ye,Ae,He){if(typeof Ae=="object"&&Ae!==null&&Ae.type===l&&Ae.key===null&&(Ae=Ae.props.children),typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case o:e:{for(var wt=Ae.key;ye!==null;){if(ye.key===wt){if(wt=Ae.type,wt===l){if(ye.tag===7){g(Se,ye.sibling),He=k(ye,Ae.props.children),He.return=Se,Se=He;break e}}else if(ye.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===E&&e9(wt)===ye.type){g(Se,ye.sibling),He=k(ye,Ae.props),zp(He,Ae),He.return=Se,Se=He;break e}g(Se,ye);break}else p(Se,ye);ye=ye.sibling}Ae.type===l?(He=Wu(Ae.props.children,Se.mode,He,Ae.key),He.return=Se,Se=He):(He=Tg(Ae.type,Ae.key,Ae.props,null,Se.mode,He),zp(He,Ae),He.return=Se,Se=He)}return Y(Se);case s:e:{for(wt=Ae.key;ye!==null;){if(ye.key===wt)if(ye.tag===4&&ye.stateNode.containerInfo===Ae.containerInfo&&ye.stateNode.implementation===Ae.implementation){g(Se,ye.sibling),He=k(ye,Ae.children||[]),He.return=Se,Se=He;break e}else{g(Se,ye);break}else p(Se,ye);ye=ye.sibling}He=hE(Ae,Se.mode,He),He.return=Se,Se=He}return Y(Se);case E:return wt=Ae._init,Ae=wt(Ae._payload),Fn(Se,ye,Ae,He)}if(G(Ae))return Mt(Se,ye,Ae,He);if(w(Ae)){if(wt=w(Ae),typeof wt!="function")throw Error(n(150));return Ae=wt.call(Ae),sr(Se,ye,Ae,He)}if(typeof Ae.then=="function")return Fn(Se,ye,lg(Ae),He);if(Ae.$$typeof===m)return Fn(Se,ye,wg(Se,Ae),He);ug(Se,Ae)}return typeof Ae=="string"&&Ae!==""||typeof Ae=="number"||typeof Ae=="bigint"?(Ae=""+Ae,ye!==null&&ye.tag===6?(g(Se,ye.sibling),He=k(ye,Ae),He.return=Se,Se=He):(g(Se,ye),He=dE(Ae,Se.mode,He),He.return=Se,Se=He),Y(Se)):g(Se,ye)}return function(Se,ye,Ae,He){try{Pp=0;var wt=Fn(Se,ye,Ae,He);return gd=null,wt}catch(Ht){if(Ht===Op)throw Ht;var yr=Wi(29,Ht,null,Se.mode);return yr.lanes=He,yr.return=Se,yr}finally{}}}var Bu=t9(!0),r9=t9(!1),bd=ue(null),cg=ue(0);function n9(c,p){c=Ls,pe(cg,c),pe(bd,p),Ls=c|p.baseLanes}function yF(){pe(cg,Ls),pe(bd,bd.current)}function vF(){Ls=cg.current,Ne(bd),Ne(cg)}var $i=ue(null),Bo=null;function kl(c){var p=c.alternate;pe(Un,Un.current&1),pe($i,c),Bo===null&&(p===null||bd.current!==null||p.memoizedState!==null)&&(Bo=c)}function a9(c){if(c.tag===22){if(pe(Un,Un.current),pe($i,c),Bo===null){var p=c.alternate;p!==null&&p.memoizedState!==null&&(Bo=c)}}else Cl()}function Cl(){pe(Un,Un.current),pe($i,$i.current)}function xs(c){Ne($i),Bo===c&&(Bo=null),Ne(Un)}var Un=ue(0);function dg(c){for(var p=c;p!==null;){if(p.tag===13){var g=p.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||g.data==="$?"||g.data==="$!"))return p}else if(p.tag===19&&p.memoizedProps.revealOrder!==void 0){if(p.flags&128)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===c)break;for(;p.sibling===null;){if(p.return===null||p.return===c)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var Hce=typeof AbortController<"u"?AbortController:function(){var c=[],p=this.signal={aborted:!1,addEventListener:function(g,v){c.push(v)}};this.abort=function(){p.aborted=!0,c.forEach(function(g){return g()})}},Uce=e.unstable_scheduleCallback,Gce=e.unstable_NormalPriority,Gn={$$typeof:m,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function FF(){return{controller:new Hce,data:new Map,refCount:0}}function Hp(c){c.refCount--,c.refCount===0&&Uce(Gce,function(){c.controller.abort()})}var Up=null,EF=0,yd=0,vd=null;function $ce(c,p){if(Up===null){var g=Up=[];EF=0,yd=TE(),vd={status:"pending",value:void 0,then:function(v){g.push(v)}}}return EF++,p.then(i9,i9),p}function i9(){if(--EF===0&&Up!==null){vd!==null&&(vd.status="fulfilled");var c=Up;Up=null,yd=0,vd=null;for(var p=0;pR?R:8;var Y=M.T,ee={};M.T=ee,PF(c,!1,p,g);try{var se=k(),ve=M.S;if(ve!==null&&ve(ee,se),se!==null&&typeof se=="object"&&typeof se.then=="function"){var ze=jce(se,v);jp(c,p,ze,bi(c))}else jp(c,p,v,bi(c))}catch(We){jp(c,p,{then:function(){},status:"rejected",reason:We},bi())}finally{ne.p=R,M.T=Y}}function Yce(){}function OF(c,p,g,v){if(c.tag!==5)throw Error(n(476));var k=O9(c).queue;I9(c,k,p,oe,g===null?Yce:function(){return B9(c),g(v)})}function O9(c){var p=c.memoizedState;if(p!==null)return p;p={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:oe},next:null};var g={};return p.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:g},next:null},c.memoizedState=p,c=c.alternate,c!==null&&(c.memoizedState=p),p}function B9(c){var p=O9(c).next.queue;jp(c,p,{},bi())}function BF(){return va(df)}function P9(){return _n().memoizedState}function z9(){return _n().memoizedState}function Xce(c){for(var p=c.return;p!==null;){switch(p.tag){case 24:case 3:var g=bi();c=Rl(g);var v=Nl(p,c,g);v!==null&&(Ia(v,p,g),Vp(v,p,g)),p={cache:FF()},c.payload=p;return}p=p.return}}function Jce(c,p,g){var v=bi();g={lane:v,revertLane:0,action:g,hasEagerState:!1,eagerState:null,next:null},Fg(c)?U9(p,g):(g=pF(c,p,g,v),g!==null&&(Ia(g,c,v),G9(g,p,v)))}function H9(c,p,g){var v=bi();jp(c,p,g,v)}function jp(c,p,g,v){var k={lane:v,revertLane:0,action:g,hasEagerState:!1,eagerState:null,next:null};if(Fg(c))U9(p,k);else{var R=c.alternate;if(c.lanes===0&&(R===null||R.lanes===0)&&(R=p.lastRenderedReducer,R!==null))try{var Y=p.lastRenderedState,ee=R(Y,g);if(k.hasEagerState=!0,k.eagerState=ee,pi(ee,Y))return ng(c,p,k,0),Zr===null&&rg(),!1}catch{}finally{}if(g=pF(c,p,k,v),g!==null)return Ia(g,c,v),G9(g,p,v),!0}return!1}function PF(c,p,g,v){if(v={lane:2,revertLane:TE(),action:v,hasEagerState:!1,eagerState:null,next:null},Fg(c)){if(p)throw Error(n(479))}else p=pF(c,g,v,2),p!==null&&Ia(p,c,2)}function Fg(c){var p=c.alternate;return c===mr||p!==null&&p===mr}function U9(c,p){Fd=pg=!0;var g=c.pending;g===null?p.next=p:(p.next=g.next,g.next=p),c.pending=p}function G9(c,p,g){if(g&4194176){var v=p.lanes;v&=c.pendingLanes,g|=v,p.lanes=g,gn(c,g)}}var Po={readContext:va,use:gg,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useLayoutEffect:xn,useInsertionEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useDeferredValue:xn,useTransition:xn,useSyncExternalStore:xn,useId:xn};Po.useCacheRefresh=xn,Po.useMemoCache=xn,Po.useHostTransitionStatus=xn,Po.useFormState=xn,Po.useActionState=xn,Po.useOptimistic=xn;var Hu={readContext:va,use:gg,useCallback:function(c,p){return Ka().memoizedState=[c,p===void 0?null:p],c},useContext:va,useEffect:T9,useImperativeHandle:function(c,p,g){g=g!=null?g.concat([c]):null,yg(4194308,4,D9.bind(null,p,c),g)},useLayoutEffect:function(c,p){return yg(4194308,4,c,p)},useInsertionEffect:function(c,p){yg(4,2,c,p)},useMemo:function(c,p){var g=Ka();p=p===void 0?null:p;var v=c();if(zu){Fe(!0);try{c()}finally{Fe(!1)}}return g.memoizedState=[v,p],v},useReducer:function(c,p,g){var v=Ka();if(g!==void 0){var k=g(p);if(zu){Fe(!0);try{g(p)}finally{Fe(!1)}}}else k=p;return v.memoizedState=v.baseState=k,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:k},v.queue=c,c=c.dispatch=Jce.bind(null,mr,c),[v.memoizedState,c]},useRef:function(c){var p=Ka();return c={current:c},p.memoizedState=c},useState:function(c){c=RF(c);var p=c.queue,g=H9.bind(null,mr,p);return p.dispatch=g,[c.memoizedState,g]},useDebugValue:MF,useDeferredValue:function(c,p){var g=Ka();return IF(g,c,p)},useTransition:function(){var c=RF(!1);return c=I9.bind(null,mr,c.queue,!0,!1),Ka().memoizedState=c,[!1,c]},useSyncExternalStore:function(c,p,g){var v=mr,k=Ka();if(Mr){if(g===void 0)throw Error(n(407));g=g()}else{if(g=p(),Zr===null)throw Error(n(349));Dr&60||d9(v,p,g)}k.memoizedState=g;var R={value:g,getSnapshot:p};return k.queue=R,T9(p9.bind(null,v,R,c),[c]),v.flags|=2048,Sd(9,h9.bind(null,v,R,g,p),{destroy:void 0},null),g},useId:function(){var c=Ka(),p=Zr.identifierPrefix;if(Mr){var g=Ss,v=Es;g=(v&~(1<<32-$e(v)-1)).toString(32)+g,p=":"+p+"R"+g,g=fg++,0 title"))),ua(R,v,g),R[Hn]=c,Cr(R),v=R;break e;case"link":var Y=m8("link","href",k).get(v+(g.href||""));if(Y){for(var ee=0;ee<\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof v.is=="string"?k.createElement("select",{is:v.is}):k.createElement("select"),v.multiple?c.multiple=!0:v.size&&(c.size=v.size);break;default:c=typeof v.is=="string"?k.createElement(g,{is:v.is}):k.createElement(g)}}c[Hn]=p,c[an]=v;e:for(k=p.child;k!==null;){if(k.tag===5||k.tag===6)c.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===p)break e;for(;k.sibling===null;){if(k.return===null||k.return===p)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}p.stateNode=c;e:switch(ua(c,g,v),g){case"button":case"input":case"select":case"textarea":c=!!v.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Rs(p)}}return cn(p),p.flags&=-16777217,null;case 6:if(c&&p.stateNode!=null)c.memoizedProps!==v&&Rs(p);else{if(typeof v!="string"&&p.stateNode===null)throw Error(n(166));if(c=Ee.current,Lp(p)){if(c=p.stateNode,g=p.memoizedProps,v=null,k=Ma,k!==null)switch(k.tag){case 27:case 5:v=k.memoizedProps}c[Hn]=p,c=!!(c.nodeValue===g||v!==null&&v.suppressHydrationWarning===!0||n8(c.nodeValue,g)),c||Ou(p)}else c=zg(c).createTextNode(v),c[Hn]=p,p.stateNode=c}return cn(p),null;case 13:if(v=p.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(k=Lp(p),v!==null&&v.dehydrated!==null){if(c===null){if(!k)throw Error(n(318));if(k=p.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(n(317));k[Hn]=p}else Mp(),!(p.flags&128)&&(p.memoizedState=null),p.flags|=4;cn(p),k=!1}else po!==null&&(FE(po),po=null),k=!0;if(!k)return p.flags&256?(xs(p),p):(xs(p),null)}if(xs(p),p.flags&128)return p.lanes=g,p;if(g=v!==null,c=c!==null&&c.memoizedState!==null,g){v=p.child,k=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(k=v.alternate.memoizedState.cachePool.pool);var R=null;v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(R=v.memoizedState.cachePool.pool),R!==k&&(v.flags|=2048)}return g!==c&&g&&(p.child.flags|=8192),Ag(p,p.updateQueue),cn(p),null;case 4:return fe(),c===null&&RE(p.stateNode.containerInfo),cn(p),null;case 10:return Ts(p.type),cn(p),null;case 19:if(Ne(Un),k=p.memoizedState,k===null)return cn(p),null;if(v=(p.flags&128)!==0,R=k.rendering,R===null)if(v)ef(k,!1);else{if(vn!==0||c!==null&&c.flags&128)for(c=p.child;c!==null;){if(R=dg(c),R!==null){for(p.flags|=128,ef(k,!1),c=R.updateQueue,p.updateQueue=c,Ag(p,c),p.subtreeFlags=0,c=g,g=p.child;g!==null;)RM(g,c),g=g.sibling;return pe(Un,Un.current&1|2),p.child}c=c.sibling}k.tail!==null&&Pe()>_g&&(p.flags|=128,v=!0,ef(k,!1),p.lanes=4194304)}else{if(!v)if(c=dg(R),c!==null){if(p.flags|=128,v=!0,c=c.updateQueue,p.updateQueue=c,Ag(p,c),ef(k,!0),k.tail===null&&k.tailMode==="hidden"&&!R.alternate&&!Mr)return cn(p),null}else 2*Pe()-k.renderingStartTime>_g&&g!==536870912&&(p.flags|=128,v=!0,ef(k,!1),p.lanes=4194304);k.isBackwards?(R.sibling=p.child,p.child=R):(c=k.last,c!==null?c.sibling=R:p.child=R,k.last=R)}return k.tail!==null?(p=k.tail,k.rendering=p,k.tail=p.sibling,k.renderingStartTime=Pe(),p.sibling=null,c=Un.current,pe(Un,v?c&1|2:c&1),p):(cn(p),null);case 22:case 23:return xs(p),vF(),v=p.memoizedState!==null,c!==null?c.memoizedState!==null!==v&&(p.flags|=8192):v&&(p.flags|=8192),v?g&536870912&&!(p.flags&128)&&(cn(p),p.subtreeFlags&6&&(p.flags|=8192)):cn(p),g=p.updateQueue,g!==null&&Ag(p,g.retryQueue),g=null,c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),v=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(v=p.memoizedState.cachePool.pool),v!==g&&(p.flags|=2048),c!==null&&Ne(Pu),null;case 24:return g=null,c!==null&&(g=c.memoizedState.cache),p.memoizedState.cache!==g&&(p.flags|=2048),Ts(Gn),cn(p),null;case 25:return null}throw Error(n(156,p.tag))}function ade(c,p){switch(mF(p),p.tag){case 1:return c=p.flags,c&65536?(p.flags=c&-65537|128,p):null;case 3:return Ts(Gn),fe(),c=p.flags,c&65536&&!(c&128)?(p.flags=c&-65537|128,p):null;case 26:case 27:case 5:return yt(p),null;case 13:if(xs(p),c=p.memoizedState,c!==null&&c.dehydrated!==null){if(p.alternate===null)throw Error(n(340));Mp()}return c=p.flags,c&65536?(p.flags=c&-65537|128,p):null;case 19:return Ne(Un),null;case 4:return fe(),null;case 10:return Ts(p.type),null;case 22:case 23:return xs(p),vF(),c!==null&&Ne(Pu),c=p.flags,c&65536?(p.flags=c&-65537|128,p):null;case 24:return Ts(Gn),null;case 25:return null;default:return null}}function MM(c,p){switch(mF(p),p.tag){case 3:Ts(Gn),fe();break;case 26:case 27:case 5:yt(p);break;case 4:fe();break;case 13:xs(p);break;case 19:Ne(Un);break;case 10:Ts(p.type);break;case 22:case 23:xs(p),vF(),c!==null&&Ne(Pu);break;case 24:Ts(Gn)}}var ide={getCacheForType:function(c){var p=va(Gn),g=p.data.get(c);return g===void 0&&(g=c(),p.data.set(c,g)),g}},ode=typeof WeakMap=="function"?WeakMap:Map,dn=0,Zr=null,xr=null,Dr=0,Qr=0,gi=null,Ns=!1,Cd=!1,pE=!1,Ls=0,vn=0,Bl=0,Vu=0,fE=0,Vi=0,Td=0,tf=null,zo=null,mE=!1,gE=0,_g=1/0,Dg=null,Pl=null,Rg=!1,Ku=null,rf=0,bE=0,yE=null,nf=0,vE=null;function bi(){if(dn&2&&Dr!==0)return Dr&-Dr;if(M.T!==null){var c=yd;return c!==0?c:TE()}return xp()}function IM(){Vi===0&&(Vi=!(Dr&536870912)||Mr?Gr():536870912);var c=$i.current;return c!==null&&(c.flags|=32),Vi}function Ia(c,p,g){(c===Zr&&Qr===2||c.cancelPendingCommit!==null)&&(Ad(c,0),Ms(c,Dr,Vi,!1)),ia(c,g),(!(dn&2)||c!==Zr)&&(c===Zr&&(!(dn&2)&&(Vu|=g),vn===4&&Ms(c,Dr,Vi,!1)),Ho(c))}function OM(c,p,g){if(dn&6)throw Error(n(327));var v=!g&&(p&60)===0&&(p&c.expiredLanes)===0||ft(c,p),k=v?ude(c,p):xE(c,p,!0),R=v;do{if(k===0){Cd&&!v&&Ms(c,p,0,!1);break}else if(k===6)Ms(c,p,0,!Ns);else{if(g=c.current.alternate,R&&!sde(g)){k=xE(c,p,!1),R=!1;continue}if(k===2){if(R=p,c.errorRecoveryDisabledLanes&R)var Y=0;else Y=c.pendingLanes&-536870913,Y=Y!==0?Y:Y&536870912?536870912:0;if(Y!==0){p=Y;e:{var ee=c;k=tf;var se=ee.current.memoizedState.isDehydrated;if(se&&(Ad(ee,Y).flags|=256),Y=xE(ee,Y,!1),Y!==2){if(pE&&!se){ee.errorRecoveryDisabledLanes|=R,Vu|=R,k=4;break e}R=zo,zo=k,R!==null&&FE(R)}k=Y}if(R=!1,k!==2)continue}}if(k===1){Ad(c,0),Ms(c,p,0,!0);break}e:{switch(v=c,k){case 0:case 1:throw Error(n(345));case 4:if((p&4194176)===p){Ms(v,p,Vi,!Ns);break e}break;case 2:zo=null;break;case 3:case 5:break;default:throw Error(n(329))}if(v.finishedWork=g,v.finishedLanes=p,(p&62914560)===p&&(R=gE+300-Pe(),10g?32:g,M.T=null,Ku===null)var R=!1;else{g=yE,yE=null;var Y=Ku,ee=rf;if(Ku=null,rf=0,dn&6)throw Error(n(331));var se=dn;if(dn|=4,_M(Y.current),CM(Y,Y.current,ee,g),dn=se,af(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(ar,Y)}catch{}R=!0}return R}finally{ne.p=k,M.T=v,qM(c,p)}}return!1}function WM(c,p,g){p=Hi(g,p),p=UF(c.stateNode,p,2),c=Nl(c,p,2),c!==null&&(ia(c,2),Ho(c))}function Wr(c,p,g){if(c.tag===3)WM(c,c,g);else for(;p!==null;){if(p.tag===3){WM(p,c,g);break}else if(p.tag===1){var v=p.stateNode;if(typeof p.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Pl===null||!Pl.has(v))){c=Hi(g,c),g=Y9(2),v=Nl(p,g,2),v!==null&&(X9(g,v,p,c),ia(v,2),Ho(v));break}}p=p.return}}function wE(c,p,g){var v=c.pingCache;if(v===null){v=c.pingCache=new ode;var k=new Set;v.set(p,k)}else k=v.get(p),k===void 0&&(k=new Set,v.set(p,k));k.has(g)||(pE=!0,k.add(g),c=hde.bind(null,c,p,g),p.then(c,c))}function hde(c,p,g){var v=c.pingCache;v!==null&&v.delete(p),c.pingedLanes|=c.suspendedLanes&g,c.warmLanes&=~g,Zr===c&&(Dr&g)===g&&(vn===4||vn===3&&(Dr&62914560)===Dr&&300>Pe()-gE?!(dn&2)&&Ad(c,0):fE|=g,Td===Dr&&(Td=0)),Ho(c)}function VM(c,p){p===0&&(p=aa()),c=wl(c,p),c!==null&&(ia(c,p),Ho(c))}function pde(c){var p=c.memoizedState,g=0;p!==null&&(g=p.retryLane),VM(c,g)}function fde(c,p){var g=0;switch(c.tag){case 13:var v=c.stateNode,k=c.memoizedState;k!==null&&(g=k.retryLane);break;case 19:v=c.stateNode;break;case 22:v=c.stateNode._retryCache;break;default:throw Error(n(314))}v!==null&&v.delete(p),VM(c,g)}function mde(c,p){return Ke(c,p)}var Mg=null,Rd=null,kE=!1,Ig=!1,CE=!1,Yu=0;function Ho(c){c!==Rd&&c.next===null&&(Rd===null?Mg=Rd=c:Rd=Rd.next=c),Ig=!0,kE||(kE=!0,bde(gde))}function af(c,p){if(!CE&&Ig){CE=!0;do for(var g=!1,v=Mg;v!==null;){if(c!==0){var k=v.pendingLanes;if(k===0)var R=0;else{var Y=v.suspendedLanes,ee=v.pingedLanes;R=(1<<31-$e(42|c)+1)-1,R&=k&~(Y&~ee),R=R&201326677?R&201326677|1:R?R|2:0}R!==0&&(g=!0,XM(v,R))}else R=Dr,R=ba(v,v===Zr?R:0),!(R&3)||ft(v,R)||(g=!0,XM(v,R));v=v.next}while(g);CE=!1}}function gde(){Ig=kE=!1;var c=0;Yu!==0&&(kde()&&(c=Yu),Yu=0);for(var p=Pe(),g=null,v=Mg;v!==null;){var k=v.next,R=KM(v,p);R===0?(v.next=null,g===null?Mg=k:g.next=k,k===null&&(Rd=g)):(g=v,(c!==0||R&3)&&(Ig=!0)),v=k}af(c)}function KM(c,p){for(var g=c.suspendedLanes,v=c.pingedLanes,k=c.expirationTimes,R=c.pendingLanes&-62914561;0"u"?null:document;function d8(c,p,g){var v=Ld;if(v&&typeof p=="string"&&p){var k=Pi(p);k='link[rel="'+c+'"][href="'+k+'"]',typeof g=="string"&&(k+='[crossorigin="'+g+'"]'),c8.has(k)||(c8.add(k),c={rel:c,crossOrigin:g,href:p},v.querySelector(k)===null&&(p=v.createElement("link"),ua(p,"link",c),Cr(p),v.head.appendChild(p)))}}function Lde(c){Is.D(c),d8("dns-prefetch",c,null)}function Mde(c,p){Is.C(c,p),d8("preconnect",c,p)}function Ide(c,p,g){Is.L(c,p,g);var v=Ld;if(v&&c&&p){var k='link[rel="preload"][as="'+Pi(p)+'"]';p==="image"&&g&&g.imageSrcSet?(k+='[imagesrcset="'+Pi(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(k+='[imagesizes="'+Pi(g.imageSizes)+'"]')):k+='[href="'+Pi(c)+'"]';var R=k;switch(p){case"style":R=Md(c);break;case"script":R=Id(c)}Ki.has(R)||(c=L({rel:"preload",href:p==="image"&&g&&g.imageSrcSet?void 0:c,as:p},g),Ki.set(R,c),v.querySelector(k)!==null||p==="style"&&v.querySelector(lf(R))||p==="script"&&v.querySelector(uf(R))||(p=v.createElement("link"),ua(p,"link",c),Cr(p),v.head.appendChild(p)))}}function Ode(c,p){Is.m(c,p);var g=Ld;if(g&&c){var v=p&&typeof p.as=="string"?p.as:"script",k='link[rel="modulepreload"][as="'+Pi(v)+'"][href="'+Pi(c)+'"]',R=k;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=Id(c)}if(!Ki.has(R)&&(c=L({rel:"modulepreload",href:c},p),Ki.set(R,c),g.querySelector(k)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(uf(R)))return}v=g.createElement("link"),ua(v,"link",c),Cr(v),g.head.appendChild(v)}}}function Bde(c,p,g){Is.S(c,p,g);var v=Ld;if(v&&c){var k=un(v).hoistableStyles,R=Md(c);p=p||"default";var Y=k.get(R);if(!Y){var ee={loading:0,preload:null};if(Y=v.querySelector(lf(R)))ee.loading=5;else{c=L({rel:"stylesheet",href:c,"data-precedence":p},g),(g=Ki.get(R))&&HE(c,g);var se=Y=v.createElement("link");Cr(se),ua(se,"link",c),se._p=new Promise(function(ve,ze){se.onload=ve,se.onerror=ze}),se.addEventListener("load",function(){ee.loading|=1}),se.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,Ug(Y,p,v)}Y={type:"stylesheet",instance:Y,count:1,state:ee},k.set(R,Y)}}}function Pde(c,p){Is.X(c,p);var g=Ld;if(g&&c){var v=un(g).hoistableScripts,k=Id(c),R=v.get(k);R||(R=g.querySelector(uf(k)),R||(c=L({src:c,async:!0},p),(p=Ki.get(k))&&UE(c,p),R=g.createElement("script"),Cr(R),ua(R,"link",c),g.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},v.set(k,R))}}function zde(c,p){Is.M(c,p);var g=Ld;if(g&&c){var v=un(g).hoistableScripts,k=Id(c),R=v.get(k);R||(R=g.querySelector(uf(k)),R||(c=L({src:c,async:!0,type:"module"},p),(p=Ki.get(k))&&UE(c,p),R=g.createElement("script"),Cr(R),ua(R,"link",c),g.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},v.set(k,R))}}function h8(c,p,g,v){var k=(k=Ee.current)?Hg(k):null;if(!k)throw Error(n(446));switch(c){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(p=Md(g.href),g=un(k).hoistableStyles,v=g.get(p),v||(v={type:"style",instance:null,count:0,state:null},g.set(p,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){c=Md(g.href);var R=un(k).hoistableStyles,Y=R.get(c);if(Y||(k=k.ownerDocument||k,Y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(c,Y),(R=k.querySelector(lf(c)))&&!R._p&&(Y.instance=R,Y.state.loading=5),Ki.has(c)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},Ki.set(c,g),R||Hde(k,c,g,Y.state))),p&&v===null)throw Error(n(528,""));return Y}if(p&&v!==null)throw Error(n(529,""));return null;case"script":return p=g.async,g=g.src,typeof g=="string"&&p&&typeof p!="function"&&typeof p!="symbol"?(p=Id(g),g=un(k).hoistableScripts,v=g.get(p),v||(v={type:"script",instance:null,count:0,state:null},g.set(p,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,c))}}function Md(c){return'href="'+Pi(c)+'"'}function lf(c){return'link[rel="stylesheet"]['+c+"]"}function p8(c){return L({},c,{"data-precedence":c.precedence,precedence:null})}function Hde(c,p,g,v){c.querySelector('link[rel="preload"][as="style"]['+p+"]")?v.loading=1:(p=c.createElement("link"),v.preload=p,p.addEventListener("load",function(){return v.loading|=1}),p.addEventListener("error",function(){return v.loading|=2}),ua(p,"link",g),Cr(p),c.head.appendChild(p))}function Id(c){return'[src="'+Pi(c)+'"]'}function uf(c){return"script[async]"+c}function f8(c,p,g){if(p.count++,p.instance===null)switch(p.type){case"style":var v=c.querySelector('style[data-href~="'+Pi(g.href)+'"]');if(v)return p.instance=v,Cr(v),v;var k=L({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return v=(c.ownerDocument||c).createElement("style"),Cr(v),ua(v,"style",k),Ug(v,g.precedence,c),p.instance=v;case"stylesheet":k=Md(g.href);var R=c.querySelector(lf(k));if(R)return p.state.loading|=4,p.instance=R,Cr(R),R;v=p8(g),(k=Ki.get(k))&&HE(v,k),R=(c.ownerDocument||c).createElement("link"),Cr(R);var Y=R;return Y._p=new Promise(function(ee,se){Y.onload=ee,Y.onerror=se}),ua(R,"link",v),p.state.loading|=4,Ug(R,g.precedence,c),p.instance=R;case"script":return R=Id(g.src),(k=c.querySelector(uf(R)))?(p.instance=k,Cr(k),k):(v=g,(k=Ki.get(R))&&(v=L({},g),UE(v,k)),c=c.ownerDocument||c,k=c.createElement("script"),Cr(k),ua(k,"link",v),c.head.appendChild(k),p.instance=k);case"void":return null;default:throw Error(n(443,p.type))}else p.type==="stylesheet"&&!(p.state.loading&4)&&(v=p.instance,p.state.loading|=4,Ug(v,g.precedence,c));return p.instance}function Ug(c,p,g){for(var v=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=v.length?v[v.length-1]:null,R=k,Y=0;Y title"):null)}function Ude(c,p,g){if(g===1||p.itemProp!=null)return!1;switch(c){case"meta":case"title":return!0;case"style":if(typeof p.precedence!="string"||typeof p.href!="string"||p.href==="")break;return!0;case"link":if(typeof p.rel!="string"||typeof p.href!="string"||p.href===""||p.onLoad||p.onError)break;switch(p.rel){case"stylesheet":return c=p.disabled,typeof p.precedence=="string"&&c==null;default:return!0}case"script":if(p.async&&typeof p.async!="function"&&typeof p.async!="symbol"&&!p.onLoad&&!p.onError&&p.src&&typeof p.src=="string")return!0}return!1}function b8(c){return!(c.type==="stylesheet"&&!(c.state.loading&3))}var cf=null;function Gde(){}function $de(c,p,g){if(cf===null)throw Error(n(475));var v=cf;if(p.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&!(p.state.loading&4)){if(p.instance===null){var k=Md(g.href),R=c.querySelector(lf(k));if(R){c=R._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(v.count++,v=$g.bind(v),c.then(v,v)),p.state.loading|=4,p.instance=R,Cr(R);return}R=c.ownerDocument||c,g=p8(g),(k=Ki.get(k))&&HE(g,k),R=R.createElement("link"),Cr(R);var Y=R;Y._p=new Promise(function(ee,se){Y.onload=ee,Y.onerror=se}),ua(R,"link",g),p.instance=R}v.stylesheets===null&&(v.stylesheets=new Map),v.stylesheets.set(p,c),(c=p.state.preload)&&!(p.state.loading&3)&&(v.count++,p=$g.bind(v),c.addEventListener("load",p),c.addEventListener("error",p))}}function jde(){if(cf===null)throw Error(n(475));var c=cf;return c.stylesheets&&c.count===0&&GE(c,c.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),JE.exports=dhe(),JE.exports}var phe=hhe();class xi{constructor(t,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new xi(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}class ro{constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new ro(r,xi.range(this,t))}}class at{constructor(t,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+t,a,i,o=r&&r.loc;if(o&&o.start<=o.end){var s=o.lexer.input;a=o.start,i=o.end,a===s.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var l=s.slice(a,i).replace(/[^]/g,"$&̲"),u;a>15?u="…"+s.slice(a-15,a):u=s.slice(0,a);var d;i+15":">","<":"<",'"':""","'":"'"},vhe=/[&><"']/g;function Fhe(e){return String(e).replace(vhe,t=>yhe[t])}var _V=function e(t){return t.type==="ordgroup"||t.type==="color"?t.body.length===1?e(t.body[0]):t:t.type==="font"?e(t.body):t},Ehe=function(t){var r=_V(t);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},She=function(t){if(!t)throw new Error("Expected non-null, but got "+String(t));return t},xhe=function(t){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},$t={contains:fhe,deflt:mhe,escape:Fhe,hyphenate:bhe,getBaseElem:_V,isCharacterBox:Ehe,protocolFromUrl:xhe},sm={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function whe(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}let z6=class{constructor(t){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{};for(var r in sm)if(sm.hasOwnProperty(r)){var n=sm[r];this[r]=t[r]!==void 0?n.processor?n.processor(t[r]):t[r]:whe(n)}}reportNonstrict(t,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(t,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new at("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);a==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var a=this.strict;if(typeof a=="function")try{a=a(t,r,n)}catch{a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if(t.url&&!t.protocol){var r=$t.protocolFromUrl(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}},jl=class{constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return Yo[khe[this.id]]}sub(){return Yo[Che[this.id]]}fracNum(){return Yo[The[this.id]]}fracDen(){return Yo[Ahe[this.id]]}cramp(){return Yo[_he[this.id]]}text(){return Yo[Dhe[this.id]]}isTight(){return this.size>=2}};var H6=0,zb=1,nh=2,el=3,km=4,to=5,Eh=6,za=7,Yo=[new jl(H6,0,!1),new jl(zb,0,!0),new jl(nh,1,!1),new jl(el,1,!0),new jl(km,2,!1),new jl(to,2,!0),new jl(Eh,3,!1),new jl(za,3,!0)],khe=[km,to,km,to,Eh,za,Eh,za],Che=[to,to,to,to,za,za,za,za],The=[nh,el,km,to,Eh,za,Eh,za],Ahe=[el,el,to,to,za,za,za,za],_he=[zb,zb,el,el,to,to,za,za],Dhe=[H6,zb,nh,el,nh,el,nh,el],qt={DISPLAY:Yo[H6],TEXT:Yo[nh],SCRIPT:Yo[km],SCRIPTSCRIPT:Yo[Eh]},r_=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Rhe(e){for(var t=0;t=a[0]&&e<=a[1])return r.name}return null}var eb=[];r_.forEach(e=>e.blocks.forEach(t=>eb.push(...t)));function DV(e){for(var t=0;t=eb[t]&&e<=eb[t+1])return!0;return!1}var Od=80,Nhe=function(t,r){return"M95,"+(622+t+r)+` -c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 -c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 -c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 -s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 -c69,-144,104.5,-217.7,106.5,-221 -l`+t/2.075+" -"+t+` -c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+t)+`H845.2724 -s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 -c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Lhe=function(t,r){return"M263,"+(601+t+r)+`c0.7,0,18,39.7,52,119 -c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 -c340,-704.7,510.7,-1060.3,512,-1067 -l`+t/2.084+" -"+t+` -c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+t)+`H1012.3 -s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 -c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 -s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 -c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Mhe=function(t,r){return"M983 "+(10+t+r)+` -l`+t/3.13+" -"+t+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` -H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 -s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 -c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 -c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 -c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 -c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},Ihe=function(t,r){return"M424,"+(2398+t+r)+` -c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 -c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 -s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 -s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 -l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+t)+`H1014.6 -s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 -c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+r+` -h400000v`+(40+t)+"h-400000z"},Ohe=function(t,r){return"M473,"+(2713+t+r)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 -s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 -c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 -s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},Bhe=function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},Phe=function(t,r,n){var a=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+` -H742v`+a+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 -h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 -c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+r+"H400000v"+(40+t)+"H742z"},zhe=function(t,r,n){r=1e3*r;var a="";switch(t){case"sqrtMain":a=Nhe(r,Od);break;case"sqrtSize1":a=Lhe(r,Od);break;case"sqrtSize2":a=Mhe(r,Od);break;case"sqrtSize3":a=Ihe(r,Od);break;case"sqrtSize4":a=Ohe(r,Od);break;case"sqrtTall":a=Phe(r,Od,n)}return a},Hhe=function(t,r){switch(t){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},z8={doubleleftarrow:`M262 157 -l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 - 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 - 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 -c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 - 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 --86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 --2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z -m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l --10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 - 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 --33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 --17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 --13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 -c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 --107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 - 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 --5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 -c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 - 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 - 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 - l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 --45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 - 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 - 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 - 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 --331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 -H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 - 435 0h399565z`,leftgroupunder:`M400000 262 -H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 - 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 --3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 --18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 --196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 - 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 --4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 --10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z -m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 - 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 - 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 --152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 - 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 --2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 -v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 --83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 --68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z -M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z -M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 --.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 -c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z -M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 -c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 --53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 - 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 - 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 -c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 - 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 - 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 --5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 --320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z -m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 -60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 --451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z -m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 -c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 --480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z -m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 -85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 --707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z -m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 -c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 --16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 - 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 - 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 --40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 - 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l --6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 -s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 -c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 - 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 --174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 - 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 - 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 --3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 --10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 - 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 --18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 - 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z -m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 - 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 --7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 --27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 - 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 - 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 --64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z -m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 - 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 --13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z -M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 - 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 --52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 --167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 - 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 --70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 --40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 --37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 - 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 -c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 - 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 - 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 --19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 - 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 --2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 - 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 - 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 --68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 --8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 - 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 -c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 - 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 --11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 - 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 - 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 - -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 --11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 - 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 - 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 - -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 -3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 -10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 --1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 --7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 -H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 -c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 -c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, --5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 -c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 -c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 -s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 -121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 -s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 -c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z -M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 --27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 -13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 --84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 --119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 -151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 -c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 -c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 -c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z -M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, -1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, --152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z -M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Uhe=function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z -M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z -M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z -M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 -c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, --36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, -949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 -c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, --544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 -l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, --210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, -63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 -c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+` -c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 -c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 -c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 -c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 -l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};let e0=class{constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return $t.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),r=0;rr.toText();return this.children.map(t).join("")}};var es={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Zg={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},H8={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function RV(e,t){es[e]=t}function U6(e,t,r){if(!es[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=es[t][n];if(!a&&e[0]in H8&&(n=H8[e[0]].charCodeAt(0),a=es[t][n]),!a&&r==="text"&&DV(n)&&(a=es[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var tS={};function Ghe(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!tS[t]){var r=tS[t]={cssEmPerMu:Zg.quad[t]/18};for(var n in Zg)Zg.hasOwnProperty(n)&&(r[n]=Zg[n][t])}return tS[t]}var $he=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],U8=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],G8=function(t,r){return r.size<2?t:$he[t-1][r.size-1]};class Ys{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||Ys.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=U8[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return new Ys(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:G8(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:U8[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=G8(Ys.BASESIZE,t);return this.size===r&&this.textSize===Ys.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Ys.BASESIZE?["sizing","reset-size"+this.size,"size"+Ys.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ghe(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Ys.BASESIZE=6;var n_={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},jhe={ex:!0,em:!0,mu:!0},NV=function(t){return typeof t!="string"&&(t=t.unit),t in n_||t in jhe||t==="ex"},fn=function(t,r){var n;if(t.unit in n_)n=n_[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var a;if(r.style.isTight()?a=r.havingStyle(r.style.text()):a=r,t.unit==="ex")n=a.fontMetrics().xHeight;else if(t.unit==="em")n=a.fontMetrics().quad;else throw new at("Invalid unit: '"+t.unit+"'");a!==r&&(n*=a.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},lt=function(t){return+t.toFixed(4)+"em"},hu=function(t){return t.filter(r=>r).join(" ")},LV=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var a=r.getColor();a&&(this.style.color=a)}},MV=function(t){var r=document.createElement(t);r.className=hu(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&r.setAttribute(a,this.attributes[a]);for(var i=0;i/=\x00-\x1f]/,IV=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+$t.escape(hu(this.classes))+'"');var n="";for(var a in this.style)this.style.hasOwnProperty(a)&&(n+=$t.hyphenate(a)+":"+this.style[a]+";");n&&(r+=' style="'+$t.escape(n)+'"');for(var i in this.attributes)if(this.attributes.hasOwnProperty(i)){if(qhe.test(i))throw new at("Invalid attribute name '"+i+"'");r+=" "+i+'="'+$t.escape(this.attributes[i])+'"'}r+=">";for(var o=0;o",r};class t0{constructor(t,r,n,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,LV.call(this,t,n,a),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return $t.contains(this.classes,t)}toNode(){return MV.call(this,"span")}toMarkup(){return IV.call(this,"span")}}let G6=class{constructor(t,r,n,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,LV.call(this,r,a),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return $t.contains(this.classes,t)}toNode(){return MV.call(this,"a")}toMarkup(){return IV.call(this,"a")}};class Whe{constructor(t,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=t,this.classes=["mord"],this.style=n}hasClass(t){return $t.contains(this.classes,t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);return t}toMarkup(){var t=''+$t.escape(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=lt(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=hu(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="0&&(n+="margin-right:"+this.italic+"em;");for(var a in this.style)this.style.hasOwnProperty(a)&&(n+=$t.hyphenate(a)+":"+this.style[a]+";");n&&(t=!0,r+=' style="'+$t.escape(n)+'"');var i=$t.escape(this.text);return t?(r+=">",r+=i,r+="",r):i}}class ol{constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var a=0;a':''}}class a_{constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t=" but got "+String(e)+".")}var Yhe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Xhe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},rn={math:{},text:{}};function O(e,t,r,n,a,i){rn[e][a]={font:t,group:r,replace:n},i&&n&&(rn[e][n]=rn[e][a])}var $="math",Ve="text",J="main",le="ams",ln="accent-token",Ft="bin",Wa="close",Wh="inner",jt="mathord",Bn="op-token",Ni="open",sv="punct",ce="rel",ml="spacing",ge="textord";O($,J,ce,"≡","\\equiv",!0);O($,J,ce,"≺","\\prec",!0);O($,J,ce,"≻","\\succ",!0);O($,J,ce,"∼","\\sim",!0);O($,J,ce,"⊥","\\perp");O($,J,ce,"⪯","\\preceq",!0);O($,J,ce,"⪰","\\succeq",!0);O($,J,ce,"≃","\\simeq",!0);O($,J,ce,"∣","\\mid",!0);O($,J,ce,"≪","\\ll",!0);O($,J,ce,"≫","\\gg",!0);O($,J,ce,"≍","\\asymp",!0);O($,J,ce,"∥","\\parallel");O($,J,ce,"⋈","\\bowtie",!0);O($,J,ce,"⌣","\\smile",!0);O($,J,ce,"⊑","\\sqsubseteq",!0);O($,J,ce,"⊒","\\sqsupseteq",!0);O($,J,ce,"≐","\\doteq",!0);O($,J,ce,"⌢","\\frown",!0);O($,J,ce,"∋","\\ni",!0);O($,J,ce,"∝","\\propto",!0);O($,J,ce,"⊢","\\vdash",!0);O($,J,ce,"⊣","\\dashv",!0);O($,J,ce,"∋","\\owns");O($,J,sv,".","\\ldotp");O($,J,sv,"⋅","\\cdotp");O($,J,ge,"#","\\#");O(Ve,J,ge,"#","\\#");O($,J,ge,"&","\\&");O(Ve,J,ge,"&","\\&");O($,J,ge,"ℵ","\\aleph",!0);O($,J,ge,"∀","\\forall",!0);O($,J,ge,"ℏ","\\hbar",!0);O($,J,ge,"∃","\\exists",!0);O($,J,ge,"∇","\\nabla",!0);O($,J,ge,"♭","\\flat",!0);O($,J,ge,"ℓ","\\ell",!0);O($,J,ge,"♮","\\natural",!0);O($,J,ge,"♣","\\clubsuit",!0);O($,J,ge,"℘","\\wp",!0);O($,J,ge,"♯","\\sharp",!0);O($,J,ge,"♢","\\diamondsuit",!0);O($,J,ge,"ℜ","\\Re",!0);O($,J,ge,"♡","\\heartsuit",!0);O($,J,ge,"ℑ","\\Im",!0);O($,J,ge,"♠","\\spadesuit",!0);O($,J,ge,"§","\\S",!0);O(Ve,J,ge,"§","\\S");O($,J,ge,"¶","\\P",!0);O(Ve,J,ge,"¶","\\P");O($,J,ge,"†","\\dag");O(Ve,J,ge,"†","\\dag");O(Ve,J,ge,"†","\\textdagger");O($,J,ge,"‡","\\ddag");O(Ve,J,ge,"‡","\\ddag");O(Ve,J,ge,"‡","\\textdaggerdbl");O($,J,Wa,"⎱","\\rmoustache",!0);O($,J,Ni,"⎰","\\lmoustache",!0);O($,J,Wa,"⟯","\\rgroup",!0);O($,J,Ni,"⟮","\\lgroup",!0);O($,J,Ft,"∓","\\mp",!0);O($,J,Ft,"⊖","\\ominus",!0);O($,J,Ft,"⊎","\\uplus",!0);O($,J,Ft,"⊓","\\sqcap",!0);O($,J,Ft,"∗","\\ast");O($,J,Ft,"⊔","\\sqcup",!0);O($,J,Ft,"◯","\\bigcirc",!0);O($,J,Ft,"∙","\\bullet",!0);O($,J,Ft,"‡","\\ddagger");O($,J,Ft,"≀","\\wr",!0);O($,J,Ft,"⨿","\\amalg");O($,J,Ft,"&","\\And");O($,J,ce,"⟵","\\longleftarrow",!0);O($,J,ce,"⇐","\\Leftarrow",!0);O($,J,ce,"⟸","\\Longleftarrow",!0);O($,J,ce,"⟶","\\longrightarrow",!0);O($,J,ce,"⇒","\\Rightarrow",!0);O($,J,ce,"⟹","\\Longrightarrow",!0);O($,J,ce,"↔","\\leftrightarrow",!0);O($,J,ce,"⟷","\\longleftrightarrow",!0);O($,J,ce,"⇔","\\Leftrightarrow",!0);O($,J,ce,"⟺","\\Longleftrightarrow",!0);O($,J,ce,"↦","\\mapsto",!0);O($,J,ce,"⟼","\\longmapsto",!0);O($,J,ce,"↗","\\nearrow",!0);O($,J,ce,"↩","\\hookleftarrow",!0);O($,J,ce,"↪","\\hookrightarrow",!0);O($,J,ce,"↘","\\searrow",!0);O($,J,ce,"↼","\\leftharpoonup",!0);O($,J,ce,"⇀","\\rightharpoonup",!0);O($,J,ce,"↙","\\swarrow",!0);O($,J,ce,"↽","\\leftharpoondown",!0);O($,J,ce,"⇁","\\rightharpoondown",!0);O($,J,ce,"↖","\\nwarrow",!0);O($,J,ce,"⇌","\\rightleftharpoons",!0);O($,le,ce,"≮","\\nless",!0);O($,le,ce,"","\\@nleqslant");O($,le,ce,"","\\@nleqq");O($,le,ce,"⪇","\\lneq",!0);O($,le,ce,"≨","\\lneqq",!0);O($,le,ce,"","\\@lvertneqq");O($,le,ce,"⋦","\\lnsim",!0);O($,le,ce,"⪉","\\lnapprox",!0);O($,le,ce,"⊀","\\nprec",!0);O($,le,ce,"⋠","\\npreceq",!0);O($,le,ce,"⋨","\\precnsim",!0);O($,le,ce,"⪹","\\precnapprox",!0);O($,le,ce,"≁","\\nsim",!0);O($,le,ce,"","\\@nshortmid");O($,le,ce,"∤","\\nmid",!0);O($,le,ce,"⊬","\\nvdash",!0);O($,le,ce,"⊭","\\nvDash",!0);O($,le,ce,"⋪","\\ntriangleleft");O($,le,ce,"⋬","\\ntrianglelefteq",!0);O($,le,ce,"⊊","\\subsetneq",!0);O($,le,ce,"","\\@varsubsetneq");O($,le,ce,"⫋","\\subsetneqq",!0);O($,le,ce,"","\\@varsubsetneqq");O($,le,ce,"≯","\\ngtr",!0);O($,le,ce,"","\\@ngeqslant");O($,le,ce,"","\\@ngeqq");O($,le,ce,"⪈","\\gneq",!0);O($,le,ce,"≩","\\gneqq",!0);O($,le,ce,"","\\@gvertneqq");O($,le,ce,"⋧","\\gnsim",!0);O($,le,ce,"⪊","\\gnapprox",!0);O($,le,ce,"⊁","\\nsucc",!0);O($,le,ce,"⋡","\\nsucceq",!0);O($,le,ce,"⋩","\\succnsim",!0);O($,le,ce,"⪺","\\succnapprox",!0);O($,le,ce,"≆","\\ncong",!0);O($,le,ce,"","\\@nshortparallel");O($,le,ce,"∦","\\nparallel",!0);O($,le,ce,"⊯","\\nVDash",!0);O($,le,ce,"⋫","\\ntriangleright");O($,le,ce,"⋭","\\ntrianglerighteq",!0);O($,le,ce,"","\\@nsupseteqq");O($,le,ce,"⊋","\\supsetneq",!0);O($,le,ce,"","\\@varsupsetneq");O($,le,ce,"⫌","\\supsetneqq",!0);O($,le,ce,"","\\@varsupsetneqq");O($,le,ce,"⊮","\\nVdash",!0);O($,le,ce,"⪵","\\precneqq",!0);O($,le,ce,"⪶","\\succneqq",!0);O($,le,ce,"","\\@nsubseteqq");O($,le,Ft,"⊴","\\unlhd");O($,le,Ft,"⊵","\\unrhd");O($,le,ce,"↚","\\nleftarrow",!0);O($,le,ce,"↛","\\nrightarrow",!0);O($,le,ce,"⇍","\\nLeftarrow",!0);O($,le,ce,"⇏","\\nRightarrow",!0);O($,le,ce,"↮","\\nleftrightarrow",!0);O($,le,ce,"⇎","\\nLeftrightarrow",!0);O($,le,ce,"△","\\vartriangle");O($,le,ge,"ℏ","\\hslash");O($,le,ge,"▽","\\triangledown");O($,le,ge,"◊","\\lozenge");O($,le,ge,"Ⓢ","\\circledS");O($,le,ge,"®","\\circledR");O(Ve,le,ge,"®","\\circledR");O($,le,ge,"∡","\\measuredangle",!0);O($,le,ge,"∄","\\nexists");O($,le,ge,"℧","\\mho");O($,le,ge,"Ⅎ","\\Finv",!0);O($,le,ge,"⅁","\\Game",!0);O($,le,ge,"‵","\\backprime");O($,le,ge,"▲","\\blacktriangle");O($,le,ge,"▼","\\blacktriangledown");O($,le,ge,"■","\\blacksquare");O($,le,ge,"⧫","\\blacklozenge");O($,le,ge,"★","\\bigstar");O($,le,ge,"∢","\\sphericalangle",!0);O($,le,ge,"∁","\\complement",!0);O($,le,ge,"ð","\\eth",!0);O(Ve,J,ge,"ð","ð");O($,le,ge,"╱","\\diagup");O($,le,ge,"╲","\\diagdown");O($,le,ge,"□","\\square");O($,le,ge,"□","\\Box");O($,le,ge,"◊","\\Diamond");O($,le,ge,"¥","\\yen",!0);O(Ve,le,ge,"¥","\\yen",!0);O($,le,ge,"✓","\\checkmark",!0);O(Ve,le,ge,"✓","\\checkmark");O($,le,ge,"ℶ","\\beth",!0);O($,le,ge,"ℸ","\\daleth",!0);O($,le,ge,"ℷ","\\gimel",!0);O($,le,ge,"ϝ","\\digamma",!0);O($,le,ge,"ϰ","\\varkappa");O($,le,Ni,"┌","\\@ulcorner",!0);O($,le,Wa,"┐","\\@urcorner",!0);O($,le,Ni,"└","\\@llcorner",!0);O($,le,Wa,"┘","\\@lrcorner",!0);O($,le,ce,"≦","\\leqq",!0);O($,le,ce,"⩽","\\leqslant",!0);O($,le,ce,"⪕","\\eqslantless",!0);O($,le,ce,"≲","\\lesssim",!0);O($,le,ce,"⪅","\\lessapprox",!0);O($,le,ce,"≊","\\approxeq",!0);O($,le,Ft,"⋖","\\lessdot");O($,le,ce,"⋘","\\lll",!0);O($,le,ce,"≶","\\lessgtr",!0);O($,le,ce,"⋚","\\lesseqgtr",!0);O($,le,ce,"⪋","\\lesseqqgtr",!0);O($,le,ce,"≑","\\doteqdot");O($,le,ce,"≓","\\risingdotseq",!0);O($,le,ce,"≒","\\fallingdotseq",!0);O($,le,ce,"∽","\\backsim",!0);O($,le,ce,"⋍","\\backsimeq",!0);O($,le,ce,"⫅","\\subseteqq",!0);O($,le,ce,"⋐","\\Subset",!0);O($,le,ce,"⊏","\\sqsubset",!0);O($,le,ce,"≼","\\preccurlyeq",!0);O($,le,ce,"⋞","\\curlyeqprec",!0);O($,le,ce,"≾","\\precsim",!0);O($,le,ce,"⪷","\\precapprox",!0);O($,le,ce,"⊲","\\vartriangleleft");O($,le,ce,"⊴","\\trianglelefteq");O($,le,ce,"⊨","\\vDash",!0);O($,le,ce,"⊪","\\Vvdash",!0);O($,le,ce,"⌣","\\smallsmile");O($,le,ce,"⌢","\\smallfrown");O($,le,ce,"≏","\\bumpeq",!0);O($,le,ce,"≎","\\Bumpeq",!0);O($,le,ce,"≧","\\geqq",!0);O($,le,ce,"⩾","\\geqslant",!0);O($,le,ce,"⪖","\\eqslantgtr",!0);O($,le,ce,"≳","\\gtrsim",!0);O($,le,ce,"⪆","\\gtrapprox",!0);O($,le,Ft,"⋗","\\gtrdot");O($,le,ce,"⋙","\\ggg",!0);O($,le,ce,"≷","\\gtrless",!0);O($,le,ce,"⋛","\\gtreqless",!0);O($,le,ce,"⪌","\\gtreqqless",!0);O($,le,ce,"≖","\\eqcirc",!0);O($,le,ce,"≗","\\circeq",!0);O($,le,ce,"≜","\\triangleq",!0);O($,le,ce,"∼","\\thicksim");O($,le,ce,"≈","\\thickapprox");O($,le,ce,"⫆","\\supseteqq",!0);O($,le,ce,"⋑","\\Supset",!0);O($,le,ce,"⊐","\\sqsupset",!0);O($,le,ce,"≽","\\succcurlyeq",!0);O($,le,ce,"⋟","\\curlyeqsucc",!0);O($,le,ce,"≿","\\succsim",!0);O($,le,ce,"⪸","\\succapprox",!0);O($,le,ce,"⊳","\\vartriangleright");O($,le,ce,"⊵","\\trianglerighteq");O($,le,ce,"⊩","\\Vdash",!0);O($,le,ce,"∣","\\shortmid");O($,le,ce,"∥","\\shortparallel");O($,le,ce,"≬","\\between",!0);O($,le,ce,"⋔","\\pitchfork",!0);O($,le,ce,"∝","\\varpropto");O($,le,ce,"◀","\\blacktriangleleft");O($,le,ce,"∴","\\therefore",!0);O($,le,ce,"∍","\\backepsilon");O($,le,ce,"▶","\\blacktriangleright");O($,le,ce,"∵","\\because",!0);O($,le,ce,"⋘","\\llless");O($,le,ce,"⋙","\\gggtr");O($,le,Ft,"⊲","\\lhd");O($,le,Ft,"⊳","\\rhd");O($,le,ce,"≂","\\eqsim",!0);O($,J,ce,"⋈","\\Join");O($,le,ce,"≑","\\Doteq",!0);O($,le,Ft,"∔","\\dotplus",!0);O($,le,Ft,"∖","\\smallsetminus");O($,le,Ft,"⋒","\\Cap",!0);O($,le,Ft,"⋓","\\Cup",!0);O($,le,Ft,"⩞","\\doublebarwedge",!0);O($,le,Ft,"⊟","\\boxminus",!0);O($,le,Ft,"⊞","\\boxplus",!0);O($,le,Ft,"⋇","\\divideontimes",!0);O($,le,Ft,"⋉","\\ltimes",!0);O($,le,Ft,"⋊","\\rtimes",!0);O($,le,Ft,"⋋","\\leftthreetimes",!0);O($,le,Ft,"⋌","\\rightthreetimes",!0);O($,le,Ft,"⋏","\\curlywedge",!0);O($,le,Ft,"⋎","\\curlyvee",!0);O($,le,Ft,"⊝","\\circleddash",!0);O($,le,Ft,"⊛","\\circledast",!0);O($,le,Ft,"⋅","\\centerdot");O($,le,Ft,"⊺","\\intercal",!0);O($,le,Ft,"⋒","\\doublecap");O($,le,Ft,"⋓","\\doublecup");O($,le,Ft,"⊠","\\boxtimes",!0);O($,le,ce,"⇢","\\dashrightarrow",!0);O($,le,ce,"⇠","\\dashleftarrow",!0);O($,le,ce,"⇇","\\leftleftarrows",!0);O($,le,ce,"⇆","\\leftrightarrows",!0);O($,le,ce,"⇚","\\Lleftarrow",!0);O($,le,ce,"↞","\\twoheadleftarrow",!0);O($,le,ce,"↢","\\leftarrowtail",!0);O($,le,ce,"↫","\\looparrowleft",!0);O($,le,ce,"⇋","\\leftrightharpoons",!0);O($,le,ce,"↶","\\curvearrowleft",!0);O($,le,ce,"↺","\\circlearrowleft",!0);O($,le,ce,"↰","\\Lsh",!0);O($,le,ce,"⇈","\\upuparrows",!0);O($,le,ce,"↿","\\upharpoonleft",!0);O($,le,ce,"⇃","\\downharpoonleft",!0);O($,J,ce,"⊶","\\origof",!0);O($,J,ce,"⊷","\\imageof",!0);O($,le,ce,"⊸","\\multimap",!0);O($,le,ce,"↭","\\leftrightsquigarrow",!0);O($,le,ce,"⇉","\\rightrightarrows",!0);O($,le,ce,"⇄","\\rightleftarrows",!0);O($,le,ce,"↠","\\twoheadrightarrow",!0);O($,le,ce,"↣","\\rightarrowtail",!0);O($,le,ce,"↬","\\looparrowright",!0);O($,le,ce,"↷","\\curvearrowright",!0);O($,le,ce,"↻","\\circlearrowright",!0);O($,le,ce,"↱","\\Rsh",!0);O($,le,ce,"⇊","\\downdownarrows",!0);O($,le,ce,"↾","\\upharpoonright",!0);O($,le,ce,"⇂","\\downharpoonright",!0);O($,le,ce,"⇝","\\rightsquigarrow",!0);O($,le,ce,"⇝","\\leadsto");O($,le,ce,"⇛","\\Rrightarrow",!0);O($,le,ce,"↾","\\restriction");O($,J,ge,"‘","`");O($,J,ge,"$","\\$");O(Ve,J,ge,"$","\\$");O(Ve,J,ge,"$","\\textdollar");O($,J,ge,"%","\\%");O(Ve,J,ge,"%","\\%");O($,J,ge,"_","\\_");O(Ve,J,ge,"_","\\_");O(Ve,J,ge,"_","\\textunderscore");O($,J,ge,"∠","\\angle",!0);O($,J,ge,"∞","\\infty",!0);O($,J,ge,"′","\\prime");O($,J,ge,"△","\\triangle");O($,J,ge,"Γ","\\Gamma",!0);O($,J,ge,"Δ","\\Delta",!0);O($,J,ge,"Θ","\\Theta",!0);O($,J,ge,"Λ","\\Lambda",!0);O($,J,ge,"Ξ","\\Xi",!0);O($,J,ge,"Π","\\Pi",!0);O($,J,ge,"Σ","\\Sigma",!0);O($,J,ge,"Υ","\\Upsilon",!0);O($,J,ge,"Φ","\\Phi",!0);O($,J,ge,"Ψ","\\Psi",!0);O($,J,ge,"Ω","\\Omega",!0);O($,J,ge,"A","Α");O($,J,ge,"B","Β");O($,J,ge,"E","Ε");O($,J,ge,"Z","Ζ");O($,J,ge,"H","Η");O($,J,ge,"I","Ι");O($,J,ge,"K","Κ");O($,J,ge,"M","Μ");O($,J,ge,"N","Ν");O($,J,ge,"O","Ο");O($,J,ge,"P","Ρ");O($,J,ge,"T","Τ");O($,J,ge,"X","Χ");O($,J,ge,"¬","\\neg",!0);O($,J,ge,"¬","\\lnot");O($,J,ge,"⊤","\\top");O($,J,ge,"⊥","\\bot");O($,J,ge,"∅","\\emptyset");O($,le,ge,"∅","\\varnothing");O($,J,jt,"α","\\alpha",!0);O($,J,jt,"β","\\beta",!0);O($,J,jt,"γ","\\gamma",!0);O($,J,jt,"δ","\\delta",!0);O($,J,jt,"ϵ","\\epsilon",!0);O($,J,jt,"ζ","\\zeta",!0);O($,J,jt,"η","\\eta",!0);O($,J,jt,"θ","\\theta",!0);O($,J,jt,"ι","\\iota",!0);O($,J,jt,"κ","\\kappa",!0);O($,J,jt,"λ","\\lambda",!0);O($,J,jt,"μ","\\mu",!0);O($,J,jt,"ν","\\nu",!0);O($,J,jt,"ξ","\\xi",!0);O($,J,jt,"ο","\\omicron",!0);O($,J,jt,"π","\\pi",!0);O($,J,jt,"ρ","\\rho",!0);O($,J,jt,"σ","\\sigma",!0);O($,J,jt,"τ","\\tau",!0);O($,J,jt,"υ","\\upsilon",!0);O($,J,jt,"ϕ","\\phi",!0);O($,J,jt,"χ","\\chi",!0);O($,J,jt,"ψ","\\psi",!0);O($,J,jt,"ω","\\omega",!0);O($,J,jt,"ε","\\varepsilon",!0);O($,J,jt,"ϑ","\\vartheta",!0);O($,J,jt,"ϖ","\\varpi",!0);O($,J,jt,"ϱ","\\varrho",!0);O($,J,jt,"ς","\\varsigma",!0);O($,J,jt,"φ","\\varphi",!0);O($,J,Ft,"∗","*",!0);O($,J,Ft,"+","+");O($,J,Ft,"−","-",!0);O($,J,Ft,"⋅","\\cdot",!0);O($,J,Ft,"∘","\\circ",!0);O($,J,Ft,"÷","\\div",!0);O($,J,Ft,"±","\\pm",!0);O($,J,Ft,"×","\\times",!0);O($,J,Ft,"∩","\\cap",!0);O($,J,Ft,"∪","\\cup",!0);O($,J,Ft,"∖","\\setminus",!0);O($,J,Ft,"∧","\\land");O($,J,Ft,"∨","\\lor");O($,J,Ft,"∧","\\wedge",!0);O($,J,Ft,"∨","\\vee",!0);O($,J,ge,"√","\\surd");O($,J,Ni,"⟨","\\langle",!0);O($,J,Ni,"∣","\\lvert");O($,J,Ni,"∥","\\lVert");O($,J,Wa,"?","?");O($,J,Wa,"!","!");O($,J,Wa,"⟩","\\rangle",!0);O($,J,Wa,"∣","\\rvert");O($,J,Wa,"∥","\\rVert");O($,J,ce,"=","=");O($,J,ce,":",":");O($,J,ce,"≈","\\approx",!0);O($,J,ce,"≅","\\cong",!0);O($,J,ce,"≥","\\ge");O($,J,ce,"≥","\\geq",!0);O($,J,ce,"←","\\gets");O($,J,ce,">","\\gt",!0);O($,J,ce,"∈","\\in",!0);O($,J,ce,"","\\@not");O($,J,ce,"⊂","\\subset",!0);O($,J,ce,"⊃","\\supset",!0);O($,J,ce,"⊆","\\subseteq",!0);O($,J,ce,"⊇","\\supseteq",!0);O($,le,ce,"⊈","\\nsubseteq",!0);O($,le,ce,"⊉","\\nsupseteq",!0);O($,J,ce,"⊨","\\models");O($,J,ce,"←","\\leftarrow",!0);O($,J,ce,"≤","\\le");O($,J,ce,"≤","\\leq",!0);O($,J,ce,"<","\\lt",!0);O($,J,ce,"→","\\rightarrow",!0);O($,J,ce,"→","\\to");O($,le,ce,"≱","\\ngeq",!0);O($,le,ce,"≰","\\nleq",!0);O($,J,ml," ","\\ ");O($,J,ml," ","\\space");O($,J,ml," ","\\nobreakspace");O(Ve,J,ml," ","\\ ");O(Ve,J,ml," "," ");O(Ve,J,ml," ","\\space");O(Ve,J,ml," ","\\nobreakspace");O($,J,ml,null,"\\nobreak");O($,J,ml,null,"\\allowbreak");O($,J,sv,",",",");O($,J,sv,";",";");O($,le,Ft,"⊼","\\barwedge",!0);O($,le,Ft,"⊻","\\veebar",!0);O($,J,Ft,"⊙","\\odot",!0);O($,J,Ft,"⊕","\\oplus",!0);O($,J,Ft,"⊗","\\otimes",!0);O($,J,ge,"∂","\\partial",!0);O($,J,Ft,"⊘","\\oslash",!0);O($,le,Ft,"⊚","\\circledcirc",!0);O($,le,Ft,"⊡","\\boxdot",!0);O($,J,Ft,"△","\\bigtriangleup");O($,J,Ft,"▽","\\bigtriangledown");O($,J,Ft,"†","\\dagger");O($,J,Ft,"⋄","\\diamond");O($,J,Ft,"⋆","\\star");O($,J,Ft,"◃","\\triangleleft");O($,J,Ft,"▹","\\triangleright");O($,J,Ni,"{","\\{");O(Ve,J,ge,"{","\\{");O(Ve,J,ge,"{","\\textbraceleft");O($,J,Wa,"}","\\}");O(Ve,J,ge,"}","\\}");O(Ve,J,ge,"}","\\textbraceright");O($,J,Ni,"{","\\lbrace");O($,J,Wa,"}","\\rbrace");O($,J,Ni,"[","\\lbrack",!0);O(Ve,J,ge,"[","\\lbrack",!0);O($,J,Wa,"]","\\rbrack",!0);O(Ve,J,ge,"]","\\rbrack",!0);O($,J,Ni,"(","\\lparen",!0);O($,J,Wa,")","\\rparen",!0);O(Ve,J,ge,"<","\\textless",!0);O(Ve,J,ge,">","\\textgreater",!0);O($,J,Ni,"⌊","\\lfloor",!0);O($,J,Wa,"⌋","\\rfloor",!0);O($,J,Ni,"⌈","\\lceil",!0);O($,J,Wa,"⌉","\\rceil",!0);O($,J,ge,"\\","\\backslash");O($,J,ge,"∣","|");O($,J,ge,"∣","\\vert");O(Ve,J,ge,"|","\\textbar",!0);O($,J,ge,"∥","\\|");O($,J,ge,"∥","\\Vert");O(Ve,J,ge,"∥","\\textbardbl");O(Ve,J,ge,"~","\\textasciitilde");O(Ve,J,ge,"\\","\\textbackslash");O(Ve,J,ge,"^","\\textasciicircum");O($,J,ce,"↑","\\uparrow",!0);O($,J,ce,"⇑","\\Uparrow",!0);O($,J,ce,"↓","\\downarrow",!0);O($,J,ce,"⇓","\\Downarrow",!0);O($,J,ce,"↕","\\updownarrow",!0);O($,J,ce,"⇕","\\Updownarrow",!0);O($,J,Bn,"∐","\\coprod");O($,J,Bn,"⋁","\\bigvee");O($,J,Bn,"⋀","\\bigwedge");O($,J,Bn,"⨄","\\biguplus");O($,J,Bn,"⋂","\\bigcap");O($,J,Bn,"⋃","\\bigcup");O($,J,Bn,"∫","\\int");O($,J,Bn,"∫","\\intop");O($,J,Bn,"∬","\\iint");O($,J,Bn,"∭","\\iiint");O($,J,Bn,"∏","\\prod");O($,J,Bn,"∑","\\sum");O($,J,Bn,"⨂","\\bigotimes");O($,J,Bn,"⨁","\\bigoplus");O($,J,Bn,"⨀","\\bigodot");O($,J,Bn,"∮","\\oint");O($,J,Bn,"∯","\\oiint");O($,J,Bn,"∰","\\oiiint");O($,J,Bn,"⨆","\\bigsqcup");O($,J,Bn,"∫","\\smallint");O(Ve,J,Wh,"…","\\textellipsis");O($,J,Wh,"…","\\mathellipsis");O(Ve,J,Wh,"…","\\ldots",!0);O($,J,Wh,"…","\\ldots",!0);O($,J,Wh,"⋯","\\@cdots",!0);O($,J,Wh,"⋱","\\ddots",!0);O($,J,ge,"⋮","\\varvdots");O(Ve,J,ge,"⋮","\\varvdots");O($,J,ln,"ˊ","\\acute");O($,J,ln,"ˋ","\\grave");O($,J,ln,"¨","\\ddot");O($,J,ln,"~","\\tilde");O($,J,ln,"ˉ","\\bar");O($,J,ln,"˘","\\breve");O($,J,ln,"ˇ","\\check");O($,J,ln,"^","\\hat");O($,J,ln,"⃗","\\vec");O($,J,ln,"˙","\\dot");O($,J,ln,"˚","\\mathring");O($,J,jt,"","\\@imath");O($,J,jt,"","\\@jmath");O($,J,ge,"ı","ı");O($,J,ge,"ȷ","ȷ");O(Ve,J,ge,"ı","\\i",!0);O(Ve,J,ge,"ȷ","\\j",!0);O(Ve,J,ge,"ß","\\ss",!0);O(Ve,J,ge,"æ","\\ae",!0);O(Ve,J,ge,"œ","\\oe",!0);O(Ve,J,ge,"ø","\\o",!0);O(Ve,J,ge,"Æ","\\AE",!0);O(Ve,J,ge,"Œ","\\OE",!0);O(Ve,J,ge,"Ø","\\O",!0);O(Ve,J,ln,"ˊ","\\'");O(Ve,J,ln,"ˋ","\\`");O(Ve,J,ln,"ˆ","\\^");O(Ve,J,ln,"˜","\\~");O(Ve,J,ln,"ˉ","\\=");O(Ve,J,ln,"˘","\\u");O(Ve,J,ln,"˙","\\.");O(Ve,J,ln,"¸","\\c");O(Ve,J,ln,"˚","\\r");O(Ve,J,ln,"ˇ","\\v");O(Ve,J,ln,"¨",'\\"');O(Ve,J,ln,"˝","\\H");O(Ve,J,ln,"◯","\\textcircled");var OV={"--":!0,"---":!0,"``":!0,"''":!0};O(Ve,J,ge,"–","--",!0);O(Ve,J,ge,"–","\\textendash");O(Ve,J,ge,"—","---",!0);O(Ve,J,ge,"—","\\textemdash");O(Ve,J,ge,"‘","`",!0);O(Ve,J,ge,"‘","\\textquoteleft");O(Ve,J,ge,"’","'",!0);O(Ve,J,ge,"’","\\textquoteright");O(Ve,J,ge,"“","``",!0);O(Ve,J,ge,"“","\\textquotedblleft");O(Ve,J,ge,"”","''",!0);O(Ve,J,ge,"”","\\textquotedblright");O($,J,ge,"°","\\degree",!0);O(Ve,J,ge,"°","\\degree");O(Ve,J,ge,"°","\\textdegree",!0);O($,J,ge,"£","\\pounds");O($,J,ge,"£","\\mathsterling",!0);O(Ve,J,ge,"£","\\pounds");O(Ve,J,ge,"£","\\textsterling",!0);O($,le,ge,"✠","\\maltese");O(Ve,le,ge,"✠","\\maltese");var j8='0123456789/@."';for(var rS=0;rS0)return Eo(i,u,a,r,o.concat(d));if(l){var h,f;if(l==="boldsymbol"){var m=Qhe(i,a,r,o,n);h=m.fontName,f=[m.fontClass]}else s?(h=zV[l].fontName,f=[l]):(h=r1(l,r.fontWeight,r.fontShape),f=[l,r.fontWeight,r.fontShape]);if(lv(i,h,a).metrics)return Eo(i,h,a,r,o.concat(f));if(OV.hasOwnProperty(i)&&h.slice(0,10)==="Typewriter"){for(var b=[],y=0;y{if(hu(e.classes)!==hu(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},rpe=e=>{for(var t=0;tr&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>a&&(a=o.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=a},Za=function(t,r,n,a){var i=new t0(t,r,n,a);return $6(i),i},BV=(e,t,r,n)=>new t0(e,t,r,n),npe=function(t,r,n){var a=Za([t],[],r);return a.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),a.style.borderBottomWidth=lt(a.height),a.maxFontSize=1,a},ape=function(t,r,n,a){var i=new G6(t,r,n,a);return $6(i),i},PV=function(t){var r=new e0(t);return $6(r),r},ipe=function(t,r){return t instanceof e0?Za([],[t],r):t},ope=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],a=-r[0].shift-r[0].elem.depth,i=a,o=1;o{var r=Za(["mspace"],[],t),n=fn(e,t);return r.style.marginRight=lt(n),r},r1=function(t,r,n){var a="";switch(t){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=t}var i;return r==="textbf"&&n==="textit"?i="BoldItalic":r==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",a+"-"+i},zV={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},HV={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},upe=function(t,r){var[n,a,i]=HV[t],o=new pu(n),s=new ol([o],{width:lt(a),height:lt(i),style:"width:"+lt(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),l=BV(["overlay"],[s],r);return l.height=i,l.style.height=lt(i),l.style.width=lt(a),l},_e={fontMap:zV,makeSymbol:Eo,mathsym:Zhe,makeSpan:Za,makeSvgSpan:BV,makeLineSpan:npe,makeAnchor:ape,makeFragment:PV,wrapFragment:ipe,makeVList:spe,makeOrd:epe,makeGlue:lpe,staticSvg:upe,svgData:HV,tryCombineChars:rpe},hn={number:3,unit:"mu"},Ju={number:4,unit:"mu"},Os={number:5,unit:"mu"},cpe={mord:{mop:hn,mbin:Ju,mrel:Os,minner:hn},mop:{mord:hn,mop:hn,mrel:Os,minner:hn},mbin:{mord:Ju,mop:Ju,mopen:Ju,minner:Ju},mrel:{mord:Os,mop:Os,mopen:Os,minner:Os},mopen:{},mclose:{mop:hn,mbin:Ju,mrel:Os,minner:hn},mpunct:{mord:hn,mop:hn,mrel:Os,mopen:hn,mclose:hn,mpunct:hn,minner:hn},minner:{mord:hn,mop:hn,mbin:Ju,mrel:Os,mopen:hn,mpunct:hn,minner:hn}},dpe={mord:{mop:hn},mop:{mord:hn,mop:hn},mbin:{},mrel:{},mopen:{},mclose:{mop:hn},mpunct:{},minner:{mop:hn}},UV={},Ub={},Gb={};function mt(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},l=0;l{var F=y.classes[0],x=b.classes[0];F==="mbin"&&$t.contains(ppe,x)?y.classes[0]="mord":x==="mbin"&&$t.contains(hpe,F)&&(b.classes[0]="mord")},{node:h},f,m),Y8(i,(b,y)=>{var F=o_(y),x=o_(b),E=F&&x?b.hasClass("mtight")?dpe[F][x]:cpe[F][x]:null;if(E)return _e.makeGlue(E,u)},{node:h},f,m),i},Y8=function e(t,r,n,a,i){a&&t.push(a);for(var o=0;of=>{t.splice(h+1,0,f),o++})(o)}a&&t.pop()},GV=function(t){return t instanceof e0||t instanceof G6||t instanceof t0&&t.hasClass("enclosing")?t:null},gpe=function e(t,r){var n=GV(t);if(n){var a=n.children;if(a.length){if(r==="right")return e(a[a.length-1],"right");if(r==="left")return e(a[0],"left")}}return t},o_=function(t,r){return t?(r&&(t=gpe(t,r)),mpe[t.classes[0]]||null):null},Cm=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return sl(r.concat(n))},Lr=function(t,r,n){if(!t)return sl();if(Ub[t.type]){var a=Ub[t.type](t,r);if(n&&r.size!==n.size){a=sl(r.sizingClasses(n),[a],r);var i=r.sizeMultiplier/n.sizeMultiplier;a.height*=i,a.depth*=i}return a}else throw new at("Got group of unknown type: '"+t.type+"'")};function n1(e,t){var r=sl(["base"],e,t),n=sl(["strut"]);return n.style.height=lt(r.height+r.depth),r.depth&&(n.style.verticalAlign=lt(-r.depth)),r.children.unshift(n),r}function s_(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=Wn(e,t,"root"),a;n.length===2&&n[1].hasClass("tag")&&(a=n.pop());for(var i=[],o=[],s=0;s0&&(i.push(n1(o,t)),o=[]),i.push(n[s]));o.length>0&&i.push(n1(o,t));var u;r?(u=n1(Wn(r,t,!0)),u.classes=["tag"],i.push(u)):a&&i.push(a);var d=sl(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),u){var h=u.children[0];h.style.height=lt(d.height+d.depth),d.depth&&(h.style.verticalAlign=lt(-d.depth))}return d}function $V(e){return new e0(e)}class ki{constructor(t,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=hu(this.classes));for(var n=0;n0&&(t+=' class ="'+$t.escape(hu(this.classes))+'"'),t+=">";for(var n=0;n",t}toText(){return this.children.map(t=>t.toText()).join("")}}class ts{constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return $t.escape(this.toText())}toText(){return this.text}}class bpe{constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character="  ":t>=-.05556&&t<=-.05555?this.character=" ⁣":t>=-.1667&&t<=-.1666?this.character=" ⁣":t>=-.2223&&t<=-.2222?this.character=" ⁣":t>=-.2778&&t<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",lt(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var nt={MathNode:ki,TextNode:ts,SpaceNode:bpe,newDocumentFragment:$V},io=function(t,r,n){return rn[r][t]&&rn[r][t].replace&&t.charCodeAt(0)!==55349&&!(OV.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=rn[r][t].replace),new nt.TextNode(t)},j6=function(t){return t.length===1?t[0]:new nt.MathNode("mrow",t)},q6=function(t,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var a=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var i=t.text;if($t.contains(["\\imath","\\jmath"],i))return null;rn[a][i]&&rn[a][i].replace&&(i=rn[a][i].replace);var o=_e.fontMap[n].fontName;return U6(i,o,a)?_e.fontMap[n].variant:null};function oS(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof ts&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof ts&&r.text===","}else return!1}var ii=function(t,r,n){if(t.length===1){var a=Yr(t[0],r);return n&&a instanceof ki&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var i=[],o,s=0;s=1&&(o.type==="mn"||oS(o))){var u=l.children[0];u instanceof ki&&u.type==="mn"&&(u.children=[...o.children,...u.children],i.pop())}else if(o.type==="mi"&&o.children.length===1){var d=o.children[0];if(d instanceof ts&&d.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];h instanceof ts&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),i.pop())}}}i.push(l),o=l}return i},fu=function(t,r,n){return j6(ii(t,r,n))},Yr=function(t,r){if(!t)return new nt.MathNode("mrow");if(Gb[t.type]){var n=Gb[t.type](t,r);return n}else throw new at("Got group of unknown type: '"+t.type+"'")};function X8(e,t,r,n,a){var i=ii(e,r),o;i.length===1&&i[0]instanceof ki&&$t.contains(["mrow","mtable"],i[0].type)?o=i[0]:o=new nt.MathNode("mrow",i);var s=new nt.MathNode("annotation",[new nt.TextNode(t)]);s.setAttribute("encoding","application/x-tex");var l=new nt.MathNode("semantics",[o,s]),u=new nt.MathNode("math",[l]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block");var d=a?"katex":"katex-mathml";return _e.makeSpan([d],[u])}var jV=function(t){return new Ys({style:t.displayMode?qt.DISPLAY:qt.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},qV=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=_e.makeSpan(n,[t])}return t},ype=function(t,r,n){var a=jV(n),i;if(n.output==="mathml")return X8(t,r,a,n.displayMode,!0);if(n.output==="html"){var o=s_(t,a);i=_e.makeSpan(["katex"],[o])}else{var s=X8(t,r,a,n.displayMode,!1),l=s_(t,a);i=_e.makeSpan(["katex"],[s,l])}return qV(i,n)},vpe=function(t,r,n){var a=jV(n),i=s_(t,a),o=_e.makeSpan(["katex"],[i]);return qV(o,n)},Fpe={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Epe=function(t){var r=new nt.MathNode("mo",[new nt.TextNode(Fpe[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},Spe={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},xpe=function(t){return t.type==="ordgroup"?t.body.length:1},wpe=function(t,r){function n(){var s=4e5,l=t.label.slice(1);if($t.contains(["widehat","widecheck","widetilde","utilde"],l)){var u=t,d=xpe(u.base),h,f,m;if(d>5)l==="widehat"||l==="widecheck"?(h=420,s=2364,m=.42,f=l+"4"):(h=312,s=2340,m=.34,f="tilde4");else{var b=[1,1,2,2,3,3][d];l==="widehat"||l==="widecheck"?(s=[0,1062,2364,2364,2364][b],h=[0,239,300,360,420][b],m=[0,.24,.3,.3,.36,.42][b],f=l+b):(s=[0,600,1033,2339,2340][b],h=[0,260,286,306,312][b],m=[0,.26,.286,.3,.306,.34][b],f="tilde"+b)}var y=new pu(f),F=new ol([y],{width:"100%",height:lt(m),viewBox:"0 0 "+s+" "+h,preserveAspectRatio:"none"});return{span:_e.makeSvgSpan([],[F],r),minWidth:0,height:m}}else{var x=[],E=Spe[l],[C,_,D]=E,w=D/1e3,A=C.length,I,M;if(A===1){var L=E[3];I=["hide-tail"],M=[L]}else if(A===2)I=["halfarrow-left","halfarrow-right"],M=["xMinYMin","xMaxYMin"];else if(A===3)I=["brace-left","brace-center","brace-right"],M=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+A+" children.");for(var U=0;U0&&(a.style.minWidth=lt(i)),a},kpe=function(t,r,n,a,i){var o,s=t.height+t.depth+n+a;if(/fbox|color|angl/.test(r)){if(o=_e.makeSpan(["stretchy",r],[],i),r==="fbox"){var l=i.color&&i.getColor();l&&(o.style.borderColor=l)}}else{var u=[];/^[bx]cancel$/.test(r)&&u.push(new a_({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&u.push(new a_({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new ol(u,{width:"100%",height:lt(s)});o=_e.makeSvgSpan([],[d],i)}return o.height=s,o.style.height=lt(s),o},ll={encloseSpan:kpe,mathMLnode:Epe,svgSpan:wpe};function pr(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function W6(e){var t=uv(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function uv(e){return e&&(e.type==="atom"||Xhe.hasOwnProperty(e.type))?e:null}var V6=(e,t)=>{var r,n,a;e&&e.type==="supsub"?(n=pr(e.base,"accent"),r=n.base,e.base=r,a=Khe(Lr(e,t)),e.base=n):(n=pr(e,"accent"),r=n.base);var i=Lr(r,t.havingCrampedStyle()),o=n.isShifty&&$t.isCharacterBox(r),s=0;if(o){var l=$t.getBaseElem(r),u=Lr(l,t.havingCrampedStyle());s=$8(u).skew}var d=n.label==="\\c",h=d?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight),f;if(n.isStretchy)f=ll.svgSpan(n,t),f=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+lt(2*s)+")",marginLeft:lt(2*s)}:void 0}]},t);else{var m,b;n.label==="\\vec"?(m=_e.staticSvg("vec",t),b=_e.svgData.vec[1]):(m=_e.makeOrd({mode:n.mode,text:n.label},t,"textord"),m=$8(m),m.italic=0,b=m.width,d&&(h+=m.depth)),f=_e.makeSpan(["accent-body"],[m]);var y=n.label==="\\textcircled";y&&(f.classes.push("accent-full"),h=i.height);var F=s;y||(F-=b/2),f.style.left=lt(F),n.label==="\\textcircled"&&(f.style.top=".2em"),f=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-h},{type:"elem",elem:f}]},t)}var x=_e.makeSpan(["mord","accent"],[f],t);return a?(a.children[0]=x,a.height=Math.max(x.height,a.height),a.classes[0]="mord",a):x},WV=(e,t)=>{var r=e.isStretchy?ll.mathMLnode(e.label):new nt.MathNode("mo",[io(e.label,e.mode)]),n=new nt.MathNode("mover",[Yr(e.base,t),r]);return n.setAttribute("accent","true"),n},Cpe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));mt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=$b(t[0]),n=!Cpe.test(e.funcName),a=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:V6,mathmlBuilder:WV});mt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:V6,mathmlBuilder:WV});mt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:(e,t)=>{var r=Lr(e.base,t),n=ll.svgSpan(e,t),a=e.label==="\\utilde"?.12:0,i=_e.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return _e.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=ll.mathMLnode(e.label),n=new nt.MathNode("munder",[Yr(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var a1=e=>{var t=new nt.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};mt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:a}=e;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),a=_e.wrapFragment(Lr(e.body,n,t),t),i=e.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(i+"-arrow-pad");var o;e.below&&(n=t.havingStyle(r.sub()),o=_e.wrapFragment(Lr(e.below,n,t),t),o.classes.push(i+"-arrow-pad"));var s=ll.svgSpan(e,t),l=-t.fontMetrics().axisHeight+.5*s.height,u=-t.fontMetrics().axisHeight-.5*s.height-.111;(a.depth>.25||e.label==="\\xleftequilibrium")&&(u-=a.depth);var d;if(o){var h=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;d=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:s,shift:l},{type:"elem",elem:o,shift:h}]},t)}else d=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:u},{type:"elem",elem:s,shift:l}]},t);return d.children[0].children[0].children[1].classes.push("svg-align"),_e.makeSpan(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var r=ll.mathMLnode(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var a=a1(Yr(e.body,t));if(e.below){var i=a1(Yr(e.below,t));n=new nt.MathNode("munderover",[r,i,a])}else n=new nt.MathNode("mover",[r,a])}else if(e.below){var o=a1(Yr(e.below,t));n=new nt.MathNode("munder",[r,o])}else n=a1(),n=new nt.MathNode("mover",[r,n]);return n}});var Tpe=_e.makeSpan;function VV(e,t){var r=Wn(e.body,t,!0);return Tpe([e.mclass],r,t)}function KV(e,t){var r,n=ii(e.body,t);return e.mclass==="minner"?r=new nt.MathNode("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new nt.MathNode("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new nt.MathNode("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}mt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Cn(a),isCharacterBox:$t.isCharacterBox(a)}},htmlBuilder:VV,mathmlBuilder:KV});var cv=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};mt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:cv(t[0]),body:Cn(t[1]),isCharacterBox:$t.isCharacterBox(t[1])}}});mt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,a=t[1],i=t[0],o;n!=="\\stackrel"?o=cv(a):o="mrel";var s={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Cn(a)},l={type:"supsub",mode:i.mode,base:s,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:o,body:[l],isCharacterBox:$t.isCharacterBox(l)}},htmlBuilder:VV,mathmlBuilder:KV});mt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:cv(t[0]),body:Cn(t[0])}},htmlBuilder(e,t){var r=Wn(e.body,t,!0),n=_e.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=ii(e.body,t),n=new nt.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Ape={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},J8=()=>({type:"styling",body:[],mode:"math",style:"display"}),Z8=e=>e.type==="textord"&&e.text==="@",_pe=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function Dpe(e,t,r){var n=Ape[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var a=r.callFunction("\\\\cdleft",[t[0]],[]),i={type:"atom",text:n,mode:"math",family:"rel"},o=r.callFunction("\\Big",[i],[]),s=r.callFunction("\\\\cdright",[t[1]],[]),l={type:"ordgroup",mode:"math",body:[a,o,s]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Rpe(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new at("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],a=[n],i=0;i-1))if("<>AV".indexOf(u)>-1)for(var h=0;h<2;h++){for(var f=!0,m=l+1;mAV=|." after @',o[l]);var b=Dpe(u,d,e),y={type:"styling",body:[b],mode:"math",style:"display"};n.push(y),s=J8()}i%2===0?n.push(s):n.shift(),n=[],a.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var F=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:F,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}mt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=_e.wrapFragment(Lr(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=lt(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new nt.MathNode("mrow",[Yr(e.label,t)]);return r=new nt.MathNode("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new nt.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});mt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=_e.wrapFragment(Lr(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new nt.MathNode("mrow",[Yr(e.fragment,t)])}});mt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=pr(t[0],"ordgroup"),a=n.body,i="",o=0;o=1114111)throw new at("\\@char with invalid code point "+i);return l<=65535?u=String.fromCharCode(l):(l-=65536,u=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});var YV=(e,t)=>{var r=Wn(e.body,t.withColor(e.color),!1);return _e.makeFragment(r)},XV=(e,t)=>{var r=ii(e.body,t.withColor(e.color)),n=new nt.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};mt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=pr(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:Cn(a)}},htmlBuilder:YV,mathmlBuilder:XV});mt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,a=pr(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:YV,mathmlBuilder:XV});mt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,a=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&pr(a,"size").value}},htmlBuilder(e,t){var r=_e.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=lt(fn(e.size,t)))),r},mathmlBuilder(e,t){var r=new nt.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",lt(fn(e.size,t)))),r}});var l_={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},JV=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new at("Expected a control sequence",e);return t},Npe=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},ZV=(e,t,r,n)=>{var a=e.gullet.macros.get(r.text);a==null&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};mt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(l_[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=l_[n.text]),pr(t.parseFunction(),"internal");throw new at("Invalid token after macro prefix",n)}});mt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new at("Expected a control sequence",n);for(var i=0,o,s=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),s[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new at('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new at('Argument number "'+n.text+'" out of order');i++,s.push([])}else{if(n.text==="EOF")throw new at("Expected a macro definition");s[i].push(n.text)}var{tokens:l}=t.gullet.consumeArg();return o&&l.unshift(o),(r==="\\edef"||r==="\\xdef")&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(a,{tokens:l,numArgs:i,delimiters:s},r===l_[r]),{type:"internal",mode:t.mode}}});mt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=JV(t.gullet.popToken());t.gullet.consumeSpaces();var a=Npe(t);return ZV(t,n,a,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});mt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=JV(t.gullet.popToken()),a=t.gullet.popToken(),i=t.gullet.popToken();return ZV(t,n,i,r==="\\\\globalfuture"),t.gullet.pushToken(i),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var Yf=function(t,r,n){var a=rn.math[t]&&rn.math[t].replace,i=U6(a||t,r,n);if(!i)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return i},K6=function(t,r,n,a){var i=n.havingBaseStyle(r),o=_e.makeSpan(a.concat(i.sizingClasses(n)),[t],n),s=i.sizeMultiplier/n.sizeMultiplier;return o.height*=s,o.depth*=s,o.maxFontSize=i.sizeMultiplier,o},QV=function(t,r,n){var a=r.havingBaseStyle(n),i=(1-r.sizeMultiplier/a.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=lt(i),t.height-=i,t.depth+=i},Lpe=function(t,r,n,a,i,o){var s=_e.makeSymbol(t,"Main-Regular",i,a),l=K6(s,r,a,o);return n&&QV(l,a,r),l},Mpe=function(t,r,n,a){return _e.makeSymbol(t,"Size"+r+"-Regular",n,a)},eK=function(t,r,n,a,i,o){var s=Mpe(t,r,i,a),l=K6(_e.makeSpan(["delimsizing","size"+r],[s],a),qt.TEXT,a,o);return n&&QV(l,a,qt.TEXT),l},sS=function(t,r,n){var a;r==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=_e.makeSpan(["delimsizinginner",a],[_e.makeSpan([],[_e.makeSymbol(t,r,n)])]);return{type:"elem",elem:i}},lS=function(t,r,n){var a=es["Size4-Regular"][t.charCodeAt(0)]?es["Size4-Regular"][t.charCodeAt(0)][4]:es["Size1-Regular"][t.charCodeAt(0)][4],i=new pu("inner",Hhe(t,Math.round(1e3*r))),o=new ol([i],{width:lt(a),height:lt(r),style:"width:"+lt(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),s=_e.makeSvgSpan([],[o],n);return s.height=r,s.style.height=lt(r),s.style.width=lt(a),{type:"elem",elem:s}},u_=.008,i1={type:"kern",size:-1*u_},Ipe=["|","\\lvert","\\rvert","\\vert"],Ope=["\\|","\\lVert","\\rVert","\\Vert"],tK=function(t,r,n,a,i,o){var s,l,u,d,h="",f=0;s=u=d=t,l=null;var m="Size1-Regular";t==="\\uparrow"?u=d="⏐":t==="\\Uparrow"?u=d="‖":t==="\\downarrow"?s=u="⏐":t==="\\Downarrow"?s=u="‖":t==="\\updownarrow"?(s="\\uparrow",u="⏐",d="\\downarrow"):t==="\\Updownarrow"?(s="\\Uparrow",u="‖",d="\\Downarrow"):$t.contains(Ipe,t)?(u="∣",h="vert",f=333):$t.contains(Ope,t)?(u="∥",h="doublevert",f=556):t==="["||t==="\\lbrack"?(s="⎡",u="⎢",d="⎣",m="Size4-Regular",h="lbrack",f=667):t==="]"||t==="\\rbrack"?(s="⎤",u="⎥",d="⎦",m="Size4-Regular",h="rbrack",f=667):t==="\\lfloor"||t==="⌊"?(u=s="⎢",d="⎣",m="Size4-Regular",h="lfloor",f=667):t==="\\lceil"||t==="⌈"?(s="⎡",u=d="⎢",m="Size4-Regular",h="lceil",f=667):t==="\\rfloor"||t==="⌋"?(u=s="⎥",d="⎦",m="Size4-Regular",h="rfloor",f=667):t==="\\rceil"||t==="⌉"?(s="⎤",u=d="⎥",m="Size4-Regular",h="rceil",f=667):t==="("||t==="\\lparen"?(s="⎛",u="⎜",d="⎝",m="Size4-Regular",h="lparen",f=875):t===")"||t==="\\rparen"?(s="⎞",u="⎟",d="⎠",m="Size4-Regular",h="rparen",f=875):t==="\\{"||t==="\\lbrace"?(s="⎧",l="⎨",d="⎩",u="⎪",m="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(s="⎫",l="⎬",d="⎭",u="⎪",m="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(s="⎧",d="⎩",u="⎪",m="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(s="⎫",d="⎭",u="⎪",m="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(s="⎧",d="⎭",u="⎪",m="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(s="⎫",d="⎩",u="⎪",m="Size4-Regular");var b=Yf(s,m,i),y=b.height+b.depth,F=Yf(u,m,i),x=F.height+F.depth,E=Yf(d,m,i),C=E.height+E.depth,_=0,D=1;if(l!==null){var w=Yf(l,m,i);_=w.height+w.depth,D=2}var A=y+C+_,I=Math.max(0,Math.ceil((r-A)/(D*x))),M=A+I*D*x,L=a.fontMetrics().axisHeight;n&&(L*=a.sizeMultiplier);var U=M/2-L,j=[];if(h.length>0){var z=M-y-C,V=Math.round(M*1e3),X=Uhe(h,Math.round(z*1e3)),q=new pu(h,X),W=(f/1e3).toFixed(3)+"em",B=(V/1e3).toFixed(3)+"em",te=new ol([q],{width:W,height:B,viewBox:"0 0 "+f+" "+V}),P=_e.makeSvgSpan([],[te],a);P.height=V/1e3,P.style.width=W,P.style.height=B,j.push({type:"elem",elem:P})}else{if(j.push(sS(d,m,i)),j.push(i1),l===null){var Z=M-y-C+2*u_;j.push(lS(u,Z,a))}else{var K=(M-y-C-_)/2+2*u_;j.push(lS(u,K,a)),j.push(i1),j.push(sS(l,m,i)),j.push(i1),j.push(lS(u,K,a))}j.push(i1),j.push(sS(s,m,i))}var G=a.havingBaseStyle(qt.TEXT),ne=_e.makeVList({positionType:"bottom",positionData:U,children:j},G);return K6(_e.makeSpan(["delimsizing","mult"],[ne],G),qt.TEXT,a,o)},uS=80,cS=.08,dS=function(t,r,n,a,i){var o=zhe(t,a,n),s=new pu(t,o),l=new ol([s],{width:"400em",height:lt(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return _e.makeSvgSpan(["hide-tail"],[l],i)},Bpe=function(t,r){var n=r.havingBaseSizing(),a=iK("\\surd",t*n.sizeMultiplier,aK,n),i=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),s,l=0,u=0,d=0,h;return a.type==="small"?(d=1e3+1e3*o+uS,t<1?i=1:t<1.4&&(i=.7),l=(1+o+cS)/i,u=(1+o)/i,s=dS("sqrtMain",l,d,o,r),s.style.minWidth="0.853em",h=.833/i):a.type==="large"?(d=(1e3+uS)*lm[a.size],u=(lm[a.size]+o)/i,l=(lm[a.size]+o+cS)/i,s=dS("sqrtSize"+a.size,l,d,o,r),s.style.minWidth="1.02em",h=1/i):(l=t+o+cS,u=t+o,d=Math.floor(1e3*t+o)+uS,s=dS("sqrtTall",l,d,o,r),s.style.minWidth="0.742em",h=1.056),s.height=u,s.style.height=lt(l),{span:s,advanceWidth:h,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*i}},rK=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Ppe=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],nK=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],lm=[0,1.2,1.8,2.4,3],zpe=function(t,r,n,a,i){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),$t.contains(rK,t)||$t.contains(nK,t))return eK(t,r,!1,n,a,i);if($t.contains(Ppe,t))return tK(t,lm[r],!1,n,a,i);throw new at("Illegal delimiter: '"+t+"'")},Hpe=[{type:"small",style:qt.SCRIPTSCRIPT},{type:"small",style:qt.SCRIPT},{type:"small",style:qt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Upe=[{type:"small",style:qt.SCRIPTSCRIPT},{type:"small",style:qt.SCRIPT},{type:"small",style:qt.TEXT},{type:"stack"}],aK=[{type:"small",style:qt.SCRIPTSCRIPT},{type:"small",style:qt.SCRIPT},{type:"small",style:qt.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Gpe=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},iK=function(t,r,n,a){for(var i=Math.min(2,3-a.style.size),o=i;or)return n[o]}return n[n.length-1]},oK=function(t,r,n,a,i,o){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var s;$t.contains(nK,t)?s=Hpe:$t.contains(rK,t)?s=aK:s=Upe;var l=iK(t,r,s,a);return l.type==="small"?Lpe(t,l.style,n,a,i,o):l.type==="large"?eK(t,l.size,n,a,i,o):tK(t,r,n,a,i,o)},$pe=function(t,r,n,a,i,o){var s=a.fontMetrics().axisHeight*a.sizeMultiplier,l=901,u=5/a.fontMetrics().ptPerEm,d=Math.max(r-s,n+s),h=Math.max(d/500*l,2*d-u);return oK(t,h,!0,a,i,o)},tl={sqrtImage:Bpe,sizedDelim:zpe,sizeToMaxHeight:lm,customSizedDelim:oK,leftRightDelim:$pe},Q8={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},jpe=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function dv(e,t){var r=uv(e);if(r&&$t.contains(jpe,r.text))return r;throw r?new at("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new at("Invalid delimiter type '"+e.type+"'",e)}mt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=dv(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Q8[e.funcName].size,mclass:Q8[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?_e.makeSpan([e.mclass]):tl.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(io(e.delim,e.mode));var r=new nt.MathNode("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=lt(tl.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function eI(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}mt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new at("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:dv(t[0],e).text,color:r}}});mt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=dv(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=pr(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{eI(e);for(var r=Wn(e.body,t,!0,["mopen","mclose"]),n=0,a=0,i=!1,o=0;o{eI(e);var r=ii(e.body,t);if(e.left!=="."){var n=new nt.MathNode("mo",[io(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var a=new nt.MathNode("mo",[io(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return j6(r)}});mt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=dv(t[0],e);if(!e.parser.leftrightDepth)throw new at("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=Cm(t,[]);else{r=tl.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?io("|","text"):io(e.delim,e.mode),n=new nt.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Y6=(e,t)=>{var r=_e.wrapFragment(Lr(e.body,t),t),n=e.label.slice(1),a=t.sizeMultiplier,i,o=0,s=$t.isCharacterBox(e.body);if(n==="sout")i=_e.makeSpan(["stretchy","sout"]),i.height=t.fontMetrics().defaultRuleThickness/a,o=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var l=fn({number:.6,unit:"pt"},t),u=fn({number:.35,unit:"ex"},t),d=t.havingBaseSizing();a=a/d.sizeMultiplier;var h=r.height+r.depth+l+u;r.style.paddingLeft=lt(h/2+l);var f=Math.floor(1e3*h*a),m=Bhe(f),b=new ol([new pu("phase",m)],{width:"400em",height:lt(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});i=_e.makeSvgSpan(["hide-tail"],[b],t),i.style.height=lt(h),o=r.depth+l+u}else{/cancel/.test(n)?s||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y=0,F=0,x=0;/box/.test(n)?(x=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),y=t.fontMetrics().fboxsep+(n==="colorbox"?0:x),F=y):n==="angl"?(x=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),y=4*x,F=Math.max(0,.25-r.depth)):(y=s?.2:0,F=y),i=ll.encloseSpan(r,n,y,F,t),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=lt(x)):n==="angl"&&x!==.049&&(i.style.borderTopWidth=lt(x),i.style.borderRightWidth=lt(x)),o=r.depth+F,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var E;if(e.backgroundColor)E=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:o},{type:"elem",elem:r,shift:0}]},t);else{var C=/cancel|phase/.test(n)?["svg-align"]:[];E=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:o,wrapperClasses:C}]},t)}return/cancel/.test(n)&&(E.height=r.height,E.depth=r.depth),/cancel/.test(n)&&!s?_e.makeSpan(["mord","cancel-lap"],[E],t):_e.makeSpan(["mord"],[E],t)},X6=(e,t)=>{var r=0,n=new nt.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Yr(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};mt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=pr(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:o}},htmlBuilder:Y6,mathmlBuilder:X6});mt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,i=pr(t[0],"color-token").color,o=pr(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:Y6,mathmlBuilder:X6});mt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});mt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:Y6,mathmlBuilder:X6});mt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var sK={};function ls(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},l=0;l{var t=e.parser.settings;if(!t.displayMode)throw new at("{"+e.envName+"} can be used only in display mode.")};function J6(e){if(e.indexOf("ed")===-1)return e.indexOf("*")===-1}function xu(e,t,r){var{hskipBeforeAndAfter:n,addJot:a,cols:i,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:u,emptySingleRow:d,maxNumCols:h,leqno:f}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var m=e.gullet.expandMacroAsText("\\arraystretch");if(m==null)o=1;else if(o=parseFloat(m),!o||o<0)throw new at("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var b=[],y=[b],F=[],x=[],E=l!=null?[]:void 0;function C(){l&&e.gullet.macros.set("\\@eqnsw","1",!0)}function _(){E&&(e.gullet.macros.get("\\df@tag")?(E.push(e.subparse([new ro("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):E.push(!!l&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(C(),x.push(tI(e));;){var D=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),D={type:"ordgroup",mode:e.mode,body:D},r&&(D={type:"styling",mode:e.mode,style:r,body:[D]}),b.push(D);var w=e.fetch().text;if(w==="&"){if(h&&b.length===h){if(u||s)throw new at("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(w==="\\end"){_(),b.length===1&&D.type==="styling"&&D.body[0].body.length===0&&(y.length>1||!d)&&y.pop(),x.length0&&(C+=.25),u.push({pos:C,isDashed:yt[qe]})}for(_(o[0]),n=0;n0&&(U+=E,Ayt))for(n=0;n=s)){var ie=void 0;(a>0||t.hskipBeforeAndAfter)&&(ie=$t.deflt(K.pregap,f),ie!==0&&(X=_e.makeSpan(["arraycolsep"],[]),X.style.width=lt(ie),V.push(X)));var ue=[];for(n=0;n0){for(var Me=_e.makeLineSpan("hline",r,d),Ee=_e.makeLineSpan("hdashline",r,d),Te=[{type:"elem",elem:l,shift:0}];u.length>0;){var Re=u.pop(),fe=Re.pos-j;Re.isDashed?Te.push({type:"elem",elem:Ee,shift:fe}):Te.push({type:"elem",elem:Me,shift:fe})}l=_e.makeVList({positionType:"individualShift",children:Te},r)}if(W.length===0)return _e.makeSpan(["mord"],[l],r);var Ze=_e.makeVList({positionType:"individualShift",children:W},r);return Ze=_e.makeSpan(["tag"],[Ze],r),_e.makeFragment([l,Ze])},qpe={c:"center ",l:"left ",r:"right "},cs=function(t,r){for(var n=[],a=new nt.MathNode("mtd",[],["mtr-glue"]),i=new nt.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var b=t.cols,y="",F=!1,x=0,E=b.length;b[0].type==="separator"&&(f+="top ",x=1),b[b.length-1].type==="separator"&&(f+="bottom ",E-=1);for(var C=x;C0?"left ":"",f+=I[I.length-1].length>0?"right ":"";for(var M=1;M-1?"alignat":"align",i=t.envName==="split",o=xu(t.parser,{cols:n,addJot:!0,autoTag:i?void 0:J6(t.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:i?2:void 0,leqno:t.parser.settings.leqno},"display"),s,l=0,u={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var d="",h=0;h0&&m&&(F=1),n[b]={type:"align",align:y,pregap:F,postgap:0}}return o.colSeparationType=m?"align":"alignat",o};ls({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=uv(t[0]),n=r?[t[0]]:pr(t[0],"ordgroup").body,a=n.map(function(o){var s=W6(o),l=s.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new at("Unknown column alignment: "+l,o)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return xu(e.parser,i,Z6(e.envName))},htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var a=e.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,"lcr".indexOf(r)===-1)throw new at("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var i=xu(e.parser,n,Z6(e.envName)),o=Math.max(0,...i.body.map(s=>s.length));return i.cols=new Array(o).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=xu(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=uv(t[0]),n=r?[t[0]]:pr(t[0],"ordgroup").body,a=n.map(function(o){var s=W6(o),l=s.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new at("Unknown column alignment: "+l,o)});if(a.length>1)throw new at("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5};if(i=xu(e.parser,i,"script"),i.body.length>0&&i.body[0].length>1)throw new at("{subarray} can contain only one column");return i},htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=xu(e.parser,t,Z6(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:uK,htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){$t.contains(["gather","gather*"],e.envName)&&hv(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:J6(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return xu(e.parser,t,"display")},htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:uK,htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){hv(e);var t={autoTag:J6(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return xu(e.parser,t,"display")},htmlBuilder:us,mathmlBuilder:cs});ls({type:"array",names:["CD"],props:{numArgs:0},handler(e){return hv(e),Rpe(e.parser)},htmlBuilder:us,mathmlBuilder:cs});Q("\\nonumber","\\gdef\\@eqnsw{0}");Q("\\notag","\\nonumber");mt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new at(e.funcName+" valid only within array environment")}});var rI=sK;mt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];if(a.type!=="ordgroup")throw new at("Invalid environment name",a);for(var i="",o=0;o{var r=e.font,n=t.withFont(r);return Lr(e.body,n)},dK=(e,t)=>{var r=e.font,n=t.withFont(r);return Yr(e.body,n)},nI={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};mt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=$b(t[0]),i=n;return i in nI&&(i=nI[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},htmlBuilder:cK,mathmlBuilder:dK});mt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0],a=$t.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:cv(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:a}}});mt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:a}=e,{mode:i}=r,o=r.parseExpression(!0,a),s="math"+n.slice(1);return{type:"font",mode:i,font:s,body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:cK,mathmlBuilder:dK});var hK=(e,t)=>{var r=t;return e==="display"?r=r.id>=qt.SCRIPT.id?r.text():qt.DISPLAY:e==="text"&&r.size===qt.DISPLAY.size?r=qt.TEXT:e==="script"?r=qt.SCRIPT:e==="scriptscript"&&(r=qt.SCRIPTSCRIPT),r},Q6=(e,t)=>{var r=hK(e.size,t.style),n=r.fracNum(),a=r.fracDen(),i;i=t.havingStyle(n);var o=Lr(e.numer,i,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?b=3*f:b=7*f,y=t.fontMetrics().denom1):(h>0?(m=t.fontMetrics().num2,b=f):(m=t.fontMetrics().num3,b=3*f),y=t.fontMetrics().denom2);var F;if(d){var E=t.fontMetrics().axisHeight;m-o.depth-(E+.5*h){var r=new nt.MathNode("mfrac",[Yr(e.numer,t),Yr(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=fn(e.barSize,t);r.setAttribute("linethickness",lt(n))}var a=hK(e.size,t.style);if(a.size!==t.style.size){r=new nt.MathNode("mstyle",[r]);var i=a.size===qt.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",i),r.setAttribute("scriptlevel","0")}if(e.leftDelim!=null||e.rightDelim!=null){var o=[];if(e.leftDelim!=null){var s=new nt.MathNode("mo",[new nt.TextNode(e.leftDelim.replace("\\",""))]);s.setAttribute("fence","true"),o.push(s)}if(o.push(r),e.rightDelim!=null){var l=new nt.MathNode("mo",[new nt.TextNode(e.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),o.push(l)}return j6(o)}return r};mt({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=t[1],o,s=null,l=null,u="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,s="(",l=")";break;case"\\\\bracefrac":o=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":o=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":u="display";break;case"\\tfrac":case"\\tbinom":u="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:a,denom:i,hasBarLine:o,leftDelim:s,rightDelim:l,size:u,barSize:null}},htmlBuilder:Q6,mathmlBuilder:eR});mt({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:a,denom:i,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});mt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,a;switch(r){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:a,token:n}}});var aI=["display","text","script","scriptscript"],iI=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};mt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],a=t[5],i=$b(t[0]),o=i.type==="atom"&&i.family==="open"?iI(i.text):null,s=$b(t[1]),l=s.type==="atom"&&s.family==="close"?iI(s.text):null,u=pr(t[2],"size"),d,h=null;u.isBlank?d=!0:(h=u.value,d=h.number>0);var f="auto",m=t[3];if(m.type==="ordgroup"){if(m.body.length>0){var b=pr(m.body[0],"textord");f=aI[Number(b.text)]}}else m=pr(m,"textord"),f=aI[Number(m.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:d,barSize:h,leftDelim:o,rightDelim:l,size:f}},htmlBuilder:Q6,mathmlBuilder:eR});mt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:a}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:pr(t[0],"size").value,token:a}}});mt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],i=She(pr(t[1],"infix").size),o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Q6,mathmlBuilder:eR});var pK=(e,t)=>{var r=t.style,n,a;e.type==="supsub"?(n=e.sup?Lr(e.sup,t.havingStyle(r.sup()),t):Lr(e.sub,t.havingStyle(r.sub()),t),a=pr(e.base,"horizBrace")):a=pr(e,"horizBrace");var i=Lr(a.base,t.havingBaseStyle(qt.DISPLAY)),o=ll.svgSpan(a,t),s;if(a.isOver?(s=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:o}]},t),s.children[0].children[0].children[1].classes.push("svg-align")):(s=_e.makeVList({positionType:"bottom",positionData:i.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:i}]},t),s.children[0].children[0].children[0].classes.push("svg-align")),n){var l=_e.makeSpan(["mord",a.isOver?"mover":"munder"],[s],t);a.isOver?s=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},t):s=_e.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return _e.makeSpan(["mord",a.isOver?"mover":"munder"],[s],t)},Wpe=(e,t)=>{var r=ll.mathMLnode(e.label);return new nt.MathNode(e.isOver?"mover":"munder",[Yr(e.base,t),r])};mt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:pK,mathmlBuilder:Wpe});mt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],a=pr(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:Cn(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Wn(e.body,t,!1);return _e.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=fu(e.body,t);return r instanceof ki||(r=new ki("mrow",[r])),r.setAttribute("href",e.href),r}});mt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=pr(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i{var{parser:r,funcName:n,token:a}=e,i=pr(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s,l={};switch(n){case"\\htmlClass":l.class=i,s={command:"\\htmlClass",class:i};break;case"\\htmlId":l.id=i,s={command:"\\htmlId",id:i};break;case"\\htmlStyle":l.style=i,s={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var u=i.split(","),d=0;d{var r=Wn(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var a=_e.makeSpan(n,r,t);for(var i in e.attributes)i!=="class"&&e.attributes.hasOwnProperty(i)&&a.setAttribute(i,e.attributes[i]);return a},mathmlBuilder:(e,t)=>fu(e.body,t)});mt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Cn(t[0]),mathml:Cn(t[1])}},htmlBuilder:(e,t)=>{var r=Wn(e.html,t,!1);return _e.makeFragment(r)},mathmlBuilder:(e,t)=>fu(e.mathml,t)});var hS=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new at("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!NV(n))throw new at("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};mt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,a={number:0,unit:"em"},i={number:.9,unit:"em"},o={number:0,unit:"em"},s="";if(r[0])for(var l=pr(r[0],"raw").string,u=l.split(","),d=0;d{var r=fn(e.height,t),n=0;e.totalheight.number>0&&(n=fn(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=fn(e.width,t));var i={height:lt(r+n)};a>0&&(i.width=lt(a)),n>0&&(i.verticalAlign=lt(-n));var o=new Whe(e.src,e.alt,i);return o.height=r,o.depth=n,o},mathmlBuilder:(e,t)=>{var r=new nt.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=fn(e.height,t),a=0;if(e.totalheight.number>0&&(a=fn(e.totalheight,t)-n,r.setAttribute("valign",lt(-a))),r.setAttribute("height",lt(n+a)),e.width.number>0){var i=fn(e.width,t);r.setAttribute("width",lt(i))}return r.setAttribute("src",e.src),r}});mt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=pr(t[0],"size");if(r.settings.strict){var i=n[1]==="m",o=a.value.unit==="mu";i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+a.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder(e,t){return _e.makeGlue(e.dimension,t)},mathmlBuilder(e,t){var r=fn(e.dimension,t);return new nt.SpaceNode(r)}});mt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=_e.makeSpan([],[Lr(e.body,t)]),r=_e.makeSpan(["inner"],[r],t)):r=_e.makeSpan(["inner"],[Lr(e.body,t)]);var n=_e.makeSpan(["fix"],[]),a=_e.makeSpan([e.alignment],[r,n],t),i=_e.makeSpan(["strut"]);return i.style.height=lt(a.height+a.depth),a.depth&&(i.style.verticalAlign=lt(-a.depth)),a.children.unshift(i),a=_e.makeSpan(["thinbox"],[a],t),_e.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var r=new nt.MathNode("mpadded",[Yr(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});mt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,a=n.mode;n.switchMode("math");var i=r==="\\("?"\\)":"$",o=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:o}}});mt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new at("Mismatched "+e.funcName)}});var oI=(e,t)=>{switch(t.style.size){case qt.DISPLAY.size:return e.display;case qt.TEXT.size:return e.text;case qt.SCRIPT.size:return e.script;case qt.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};mt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Cn(t[0]),text:Cn(t[1]),script:Cn(t[2]),scriptscript:Cn(t[3])}},htmlBuilder:(e,t)=>{var r=oI(e,t),n=Wn(r,t,!1);return _e.makeFragment(n)},mathmlBuilder:(e,t)=>{var r=oI(e,t);return fu(r,t)}});var fK=(e,t,r,n,a,i,o)=>{e=_e.makeSpan([],[e]);var s=r&&$t.isCharacterBox(r),l,u;if(t){var d=Lr(t,n.havingStyle(a.sup()),n);u={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(r){var h=Lr(r,n.havingStyle(a.sub()),n);l={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var f;if(u&&l){var m=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;f=_e.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:lt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:lt(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var b=e.height-o;f=_e.makeVList({positionType:"top",positionData:b,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:lt(-i)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n)}else if(u){var y=e.depth+o;f=_e.makeVList({positionType:"bottom",positionData:y,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:lt(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return e;var F=[f];if(l&&i!==0&&!s){var x=_e.makeSpan(["mspace"],[],n);x.style.marginRight=lt(i),F.unshift(x)}return _e.makeSpan(["mop","op-limits"],F,n)},mK=["\\smallint"],Vh=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=pr(e.base,"op"),a=!0):i=pr(e,"op");var o=t.style,s=!1;o.size===qt.DISPLAY.size&&i.symbol&&!$t.contains(mK,i.name)&&(s=!0);var l;if(i.symbol){var u=s?"Size2-Regular":"Size1-Regular",d="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(d=i.name.slice(1),i.name=d==="oiint"?"\\iint":"\\iiint"),l=_e.makeSymbol(i.name,u,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),d.length>0){var h=l.italic,f=_e.staticSvg(d+"Size"+(s?"2":"1"),t);l=_e.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:f,shift:s?.08:0}]},t),i.name="\\"+d,l.classes.unshift("mop"),l.italic=h}}else if(i.body){var m=Wn(i.body,t,!0);m.length===1&&m[0]instanceof ao?(l=m[0],l.classes[0]="mop"):l=_e.makeSpan(["mop"],m,t)}else{for(var b=[],y=1;y{var r;if(e.symbol)r=new ki("mo",[io(e.name,e.mode)]),$t.contains(mK,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new ki("mo",ii(e.body,t));else{r=new ki("mi",[new ts(e.name.slice(1))]);var n=new ki("mo",[io("⁡","text")]);e.parentIsSupSub?r=new ki("mrow",[r,n]):r=$V([r,n])}return r},Vpe={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};mt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=n;return a.length===1&&(a=Vpe[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Vh,mathmlBuilder:r0});mt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Cn(n)}},htmlBuilder:Vh,mathmlBuilder:r0});var Kpe={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};mt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Vh,mathmlBuilder:r0});mt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Vh,mathmlBuilder:r0});mt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=Kpe[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Vh,mathmlBuilder:r0});var gK=(e,t)=>{var r,n,a=!1,i;e.type==="supsub"?(r=e.sup,n=e.sub,i=pr(e.base,"operatorname"),a=!0):i=pr(e,"operatorname");var o;if(i.body.length>0){for(var s=i.body.map(h=>{var f=h.text;return typeof f=="string"?{type:"textord",mode:h.mode,text:f}:h}),l=Wn(s,t.withFont("mathrm"),!0),u=0;u{for(var r=ii(e.body,t.withFont("mathrm")),n=!0,a=0;ad.toText()).join("");r=[new nt.TextNode(s)]}var l=new nt.MathNode("mi",r);l.setAttribute("mathvariant","normal");var u=new nt.MathNode("mo",[io("⁡","text")]);return e.parentIsSupSub?new nt.MathNode("mrow",[l,u]):nt.newDocumentFragment([l,u])};mt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"operatorname",mode:r.mode,body:Cn(a),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:gK,mathmlBuilder:Ype});Q("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Uc({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?_e.makeFragment(Wn(e.body,t,!1)):_e.makeSpan(["mord"],Wn(e.body,t,!0),t)},mathmlBuilder(e,t){return fu(e.body,t,!0)}});mt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=Lr(e.body,t.havingCrampedStyle()),n=_e.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,i=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]},t);return _e.makeSpan(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new nt.MathNode("mo",[new nt.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new nt.MathNode("mover",[Yr(e.body,t),r]);return n.setAttribute("accent","true"),n}});mt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:Cn(n)}},htmlBuilder:(e,t)=>{var r=Wn(e.body,t.withPhantom(),!1);return _e.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=ii(e.body,t);return new nt.MathNode("mphantom",r)}});mt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=_e.makeSpan([],[Lr(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n{var r=ii(Cn(e.body),t),n=new nt.MathNode("mphantom",r),a=new nt.MathNode("mpadded",[n]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}});mt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=_e.makeSpan(["inner"],[Lr(e.body,t.withPhantom())]),n=_e.makeSpan(["fix"],[]);return _e.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=ii(Cn(e.body),t),n=new nt.MathNode("mphantom",r),a=new nt.MathNode("mpadded",[n]);return a.setAttribute("width","0px"),a}});mt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=pr(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(e,t){var r=Lr(e.body,t),n=fn(e.dy,t);return _e.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new nt.MathNode("mpadded",[Yr(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});mt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});mt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,a=r[0],i=pr(t[0],"size"),o=pr(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&pr(a,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=_e.makeSpan(["mord","rule"],[],t),n=fn(e.width,t),a=fn(e.height,t),i=e.shift?fn(e.shift,t):0;return r.style.borderRightWidth=lt(n),r.style.borderTopWidth=lt(a),r.style.bottom=lt(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=a*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=fn(e.width,t),n=fn(e.height,t),a=e.shift?fn(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new nt.MathNode("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",lt(r)),o.setAttribute("height",lt(n));var s=new nt.MathNode("mpadded",[o]);return a>=0?s.setAttribute("height",lt(a)):(s.setAttribute("height",lt(a)),s.setAttribute("depth",lt(-a))),s.setAttribute("voffset",lt(a)),s}});function bK(e,t,r){for(var n=Wn(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,i=0;i{var r=t.havingSize(e.size);return bK(e.body,r,t)};mt({type:"sizing",names:sI,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:a}=e,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:sI.indexOf(n)+1,body:i}},htmlBuilder:Xpe,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=ii(e.body,r),a=new nt.MathNode("mstyle",n);return a.setAttribute("mathsize",lt(r.sizeMultiplier)),a}});mt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,a=!1,i=!1,o=r[0]&&pr(r[0],"ordgroup");if(o)for(var s="",l=0;l{var r=_e.makeSpan([],[Lr(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n{var r=new nt.MathNode("mpadded",[Yr(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}});mt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,a=r[0],i=t[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder(e,t){var r=Lr(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=_e.wrapFragment(r,t);var n=t.fontMetrics(),a=n.defaultRuleThickness,i=a;t.style.idr.height+r.depth+o&&(o=(o+h-r.height-r.depth)/2);var f=l.height-r.height-o-u;r.style.paddingLeft=lt(d);var m=_e.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+f)},{type:"elem",elem:l},{type:"kern",size:u}]},t);if(e.index){var b=t.havingStyle(qt.SCRIPTSCRIPT),y=Lr(e.index,b,t),F=.6*(m.height-m.depth),x=_e.makeVList({positionType:"shift",positionData:-F,children:[{type:"elem",elem:y}]},t),E=_e.makeSpan(["root"],[x]);return _e.makeSpan(["mord","sqrt"],[E,m],t)}else return _e.makeSpan(["mord","sqrt"],[m],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new nt.MathNode("mroot",[Yr(r,t),Yr(n,t)]):new nt.MathNode("msqrt",[Yr(r,t)])}});var lI={display:qt.DISPLAY,text:qt.TEXT,script:qt.SCRIPT,scriptscript:qt.SCRIPTSCRIPT};mt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:a}=e,i=a.parseExpression(!0,r),o=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:o,body:i}},htmlBuilder(e,t){var r=lI[e.style],n=t.havingStyle(r).withFont("");return bK(e.body,n,t)},mathmlBuilder(e,t){var r=lI[e.style],n=t.havingStyle(r),a=ii(e.body,n),i=new nt.MathNode("mstyle",a),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},s=o[e.style];return i.setAttribute("scriptlevel",s[0]),i.setAttribute("displaystyle",s[1]),i}});var Jpe=function(t,r){var n=t.base;if(n)if(n.type==="op"){var a=n.limits&&(r.style.size===qt.DISPLAY.size||n.alwaysHandleSupSub);return a?Vh:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===qt.DISPLAY.size||n.limits);return i?gK:null}else{if(n.type==="accent")return $t.isCharacterBox(n.base)?V6:null;if(n.type==="horizBrace"){var o=!t.sub;return o===n.isOver?pK:null}else return null}else return null};Uc({type:"supsub",htmlBuilder(e,t){var r=Jpe(e,t);if(r)return r(e,t);var{base:n,sup:a,sub:i}=e,o=Lr(n,t),s,l,u=t.fontMetrics(),d=0,h=0,f=n&&$t.isCharacterBox(n);if(a){var m=t.havingStyle(t.style.sup());s=Lr(a,m,t),f||(d=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(i){var b=t.havingStyle(t.style.sub());l=Lr(i,b,t),f||(h=o.depth+b.fontMetrics().subDrop*b.sizeMultiplier/t.sizeMultiplier)}var y;t.style===qt.DISPLAY?y=u.sup1:t.style.cramped?y=u.sup3:y=u.sup2;var F=t.sizeMultiplier,x=lt(.5/u.ptPerEm/F),E=null;if(l){var C=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(o instanceof ao||C)&&(E=lt(-o.italic))}var _;if(s&&l){d=Math.max(d,y,s.depth+.25*u.xHeight),h=Math.max(h,u.sub2);var D=u.defaultRuleThickness,w=4*D;if(d-s.depth-(l.height-h)0&&(d+=A,h-=A)}var I=[{type:"elem",elem:l,shift:h,marginRight:x,marginLeft:E},{type:"elem",elem:s,shift:-d,marginRight:x}];_=_e.makeVList({positionType:"individualShift",children:I},t)}else if(l){h=Math.max(h,u.sub1,l.height-.8*u.xHeight);var M=[{type:"elem",elem:l,marginLeft:E,marginRight:x}];_=_e.makeVList({positionType:"shift",positionData:h,children:M},t)}else if(s)d=Math.max(d,y,s.depth+.25*u.xHeight),_=_e.makeVList({positionType:"shift",positionData:-d,children:[{type:"elem",elem:s,marginRight:x}]},t);else throw new Error("supsub must have either sup or sub.");var L=o_(o,"right")||"mord";return _e.makeSpan([L],[o,_e.makeSpan(["msupsub"],[_])],t)},mathmlBuilder(e,t){var r=!1,n,a;e.base&&e.base.type==="horizBrace"&&(a=!!e.sup,a===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var i=[Yr(e.base,t)];e.sub&&i.push(Yr(e.sub,t)),e.sup&&i.push(Yr(e.sup,t));var o;if(r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var u=e.base;u&&u.type==="op"&&u.limits&&t.style===qt.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(t.style===qt.DISPLAY||u.limits)?o="munderover":o="msubsup"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===qt.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===qt.DISPLAY)?o="munder":o="msub"}else{var s=e.base;s&&s.type==="op"&&s.limits&&(t.style===qt.DISPLAY||s.alwaysHandleSupSub)||s&&s.type==="operatorname"&&s.alwaysHandleSupSub&&(s.limits||t.style===qt.DISPLAY)?o="mover":o="msup"}return new nt.MathNode(o,i)}});Uc({type:"atom",htmlBuilder(e,t){return _e.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new nt.MathNode("mo",[io(e.text,e.mode)]);if(e.family==="bin"){var n=q6(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var yK={mi:"italic",mn:"normal",mtext:"normal"};Uc({type:"mathord",htmlBuilder(e,t){return _e.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var r=new nt.MathNode("mi",[io(e.text,e.mode,t)]),n=q6(e,t)||"italic";return n!==yK[r.type]&&r.setAttribute("mathvariant",n),r}});Uc({type:"textord",htmlBuilder(e,t){return _e.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var r=io(e.text,e.mode,t),n=q6(e,t)||"normal",a;return e.mode==="text"?a=new nt.MathNode("mtext",[r]):/[0-9]/.test(e.text)?a=new nt.MathNode("mn",[r]):e.text==="\\prime"?a=new nt.MathNode("mo",[r]):a=new nt.MathNode("mi",[r]),n!==yK[a.type]&&a.setAttribute("mathvariant",n),a}});var pS={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},fS={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Uc({type:"spacing",htmlBuilder(e,t){if(fS.hasOwnProperty(e.text)){var r=fS[e.text].className||"";if(e.mode==="text"){var n=_e.makeOrd(e,t,"textord");return n.classes.push(r),n}else return _e.makeSpan(["mspace",r],[_e.mathsym(e.text,e.mode,t)],t)}else{if(pS.hasOwnProperty(e.text))return _e.makeSpan(["mspace",pS[e.text]],[],t);throw new at('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(fS.hasOwnProperty(e.text))r=new nt.MathNode("mtext",[new nt.TextNode(" ")]);else{if(pS.hasOwnProperty(e.text))return new nt.MathNode("mspace");throw new at('Unknown type of space "'+e.text+'"')}return r}});var uI=()=>{var e=new nt.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Uc({type:"tag",mathmlBuilder(e,t){var r=new nt.MathNode("mtable",[new nt.MathNode("mtr",[uI(),new nt.MathNode("mtd",[fu(e.body,t)]),uI(),new nt.MathNode("mtd",[fu(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var cI={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},dI={"\\textbf":"textbf","\\textmd":"textmd"},Zpe={"\\textit":"textit","\\textup":"textup"},hI=(e,t)=>{var r=e.font;if(r){if(cI[r])return t.withTextFontFamily(cI[r]);if(dI[r])return t.withTextFontWeight(dI[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(Zpe[r])};mt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"text",mode:r.mode,body:Cn(a),font:n}},htmlBuilder(e,t){var r=hI(e,t),n=Wn(e.body,r,!0);return _e.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){var r=hI(e,t);return fu(e.body,r)}});mt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Lr(e.body,t),n=_e.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,i=_e.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return _e.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new nt.MathNode("mo",[new nt.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new nt.MathNode("munder",[Yr(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});mt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Lr(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return _e.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return new nt.MathNode("mpadded",[Yr(e.body,t)],["vcenter"])}});mt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new at("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=pI(e),n=[],a=t.havingStyle(t.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),au=UV,vK=`[ \r - ]`,Qpe="\\\\[a-zA-Z@]+",efe="\\\\[^\uD800-\uDFFF]",tfe="("+Qpe+")"+vK+"*",rfe=`\\\\( -|[ \r ]+ -?)[ \r ]*`,c_="[̀-ͯ]",nfe=new RegExp(c_+"+$"),afe="("+vK+"+)|"+(rfe+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(c_+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(c_+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+tfe)+("|"+efe+")");class fI{constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp(afe,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new ro("EOF",new xi(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new at("Unexpected character: '"+t[r]+"'",new ro(t[r],new xi(this,r,r+1)));var a=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=t.indexOf(` -`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new ro(a,new xi(this,r,this.tokenRegex.lastIndex))}}class ife{constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new at("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var a=0;a0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(t)&&(i[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}}var ofe=lK;Q("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});Q("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});Q("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});Q("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});Q("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});Q("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");Q("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var mI={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Q("\\char",function(e){var t=e.popToken(),r,n="";if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new at("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=mI[t.text],n==null||n>=r)throw new at("Invalid base-"+r+" digit "+t.text);for(var a;(a=mI[e.future().text])!=null&&a{var a=e.consumeArg().tokens;if(a.length!==1)throw new at("\\newcommand's first argument must be a macro name");var i=a[0].text,o=e.isDefined(i);if(o&&!t)throw new at("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!o&&!r)throw new at("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var s=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var l="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new at("Invalid number of arguments: "+l);s=parseInt(l),a=e.consumeArg().tokens}return o&&n||e.macros.set(i,{tokens:a,numArgs:s}),""};Q("\\newcommand",e=>tR(e,!1,!0,!1));Q("\\renewcommand",e=>tR(e,!0,!1,!1));Q("\\providecommand",e=>tR(e,!0,!0,!0));Q("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});Q("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});Q("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),au[r],rn.math[r],rn.text[r]),""});Q("\\bgroup","{");Q("\\egroup","}");Q("~","\\nobreakspace");Q("\\lq","`");Q("\\rq","'");Q("\\aa","\\r a");Q("\\AA","\\r A");Q("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");Q("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");Q("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");Q("ℬ","\\mathscr{B}");Q("ℰ","\\mathscr{E}");Q("ℱ","\\mathscr{F}");Q("ℋ","\\mathscr{H}");Q("ℐ","\\mathscr{I}");Q("ℒ","\\mathscr{L}");Q("ℳ","\\mathscr{M}");Q("ℛ","\\mathscr{R}");Q("ℭ","\\mathfrak{C}");Q("ℌ","\\mathfrak{H}");Q("ℨ","\\mathfrak{Z}");Q("\\Bbbk","\\Bbb{k}");Q("·","\\cdotp");Q("\\llap","\\mathllap{\\textrm{#1}}");Q("\\rlap","\\mathrlap{\\textrm{#1}}");Q("\\clap","\\mathclap{\\textrm{#1}}");Q("\\mathstrut","\\vphantom{(}");Q("\\underbar","\\underline{\\text{#1}}");Q("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');Q("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");Q("\\ne","\\neq");Q("≠","\\neq");Q("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");Q("∉","\\notin");Q("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");Q("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");Q("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");Q("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");Q("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");Q("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");Q("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");Q("⟂","\\perp");Q("‼","\\mathclose{!\\mkern-0.8mu!}");Q("∌","\\notni");Q("⌜","\\ulcorner");Q("⌝","\\urcorner");Q("⌞","\\llcorner");Q("⌟","\\lrcorner");Q("©","\\copyright");Q("®","\\textregistered");Q("️","\\textregistered");Q("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');Q("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');Q("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');Q("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');Q("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");Q("⋮","\\vdots");Q("\\varGamma","\\mathit{\\Gamma}");Q("\\varDelta","\\mathit{\\Delta}");Q("\\varTheta","\\mathit{\\Theta}");Q("\\varLambda","\\mathit{\\Lambda}");Q("\\varXi","\\mathit{\\Xi}");Q("\\varPi","\\mathit{\\Pi}");Q("\\varSigma","\\mathit{\\Sigma}");Q("\\varUpsilon","\\mathit{\\Upsilon}");Q("\\varPhi","\\mathit{\\Phi}");Q("\\varPsi","\\mathit{\\Psi}");Q("\\varOmega","\\mathit{\\Omega}");Q("\\substack","\\begin{subarray}{c}#1\\end{subarray}");Q("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");Q("\\boxed","\\fbox{$\\displaystyle{#1}$}");Q("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");Q("\\implies","\\DOTSB\\;\\Longrightarrow\\;");Q("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");Q("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");Q("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var gI={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Q("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in gI?t=gI[r]:(r.slice(0,4)==="\\not"||r in rn.math&&$t.contains(["bin","rel"],rn.math[r].group))&&(t="\\dotsb"),t});var rR={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Q("\\dotso",function(e){var t=e.future().text;return t in rR?"\\ldots\\,":"\\ldots"});Q("\\dotsc",function(e){var t=e.future().text;return t in rR&&t!==","?"\\ldots\\,":"\\ldots"});Q("\\cdots",function(e){var t=e.future().text;return t in rR?"\\@cdots\\,":"\\@cdots"});Q("\\dotsb","\\cdots");Q("\\dotsm","\\cdots");Q("\\dotsi","\\!\\cdots");Q("\\dotsx","\\ldots\\,");Q("\\DOTSI","\\relax");Q("\\DOTSB","\\relax");Q("\\DOTSX","\\relax");Q("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");Q("\\,","\\tmspace+{3mu}{.1667em}");Q("\\thinspace","\\,");Q("\\>","\\mskip{4mu}");Q("\\:","\\tmspace+{4mu}{.2222em}");Q("\\medspace","\\:");Q("\\;","\\tmspace+{5mu}{.2777em}");Q("\\thickspace","\\;");Q("\\!","\\tmspace-{3mu}{.1667em}");Q("\\negthinspace","\\!");Q("\\negmedspace","\\tmspace-{4mu}{.2222em}");Q("\\negthickspace","\\tmspace-{5mu}{.277em}");Q("\\enspace","\\kern.5em ");Q("\\enskip","\\hskip.5em\\relax");Q("\\quad","\\hskip1em\\relax");Q("\\qquad","\\hskip2em\\relax");Q("\\tag","\\@ifstar\\tag@literal\\tag@paren");Q("\\tag@paren","\\tag@literal{({#1})}");Q("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new at("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});Q("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");Q("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");Q("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");Q("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");Q("\\newline","\\\\\\relax");Q("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var FK=lt(es["Main-Regular"][84][1]-.7*es["Main-Regular"][65][1]);Q("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+FK+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");Q("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+FK+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");Q("\\hspace","\\@ifstar\\@hspacer\\@hspace");Q("\\@hspace","\\hskip #1\\relax");Q("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");Q("\\ordinarycolon",":");Q("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");Q("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');Q("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');Q("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');Q("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');Q("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');Q("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');Q("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');Q("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');Q("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');Q("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');Q("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');Q("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');Q("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');Q("∷","\\dblcolon");Q("∹","\\eqcolon");Q("≔","\\coloneqq");Q("≕","\\eqqcolon");Q("⩴","\\Coloneqq");Q("\\ratio","\\vcentcolon");Q("\\coloncolon","\\dblcolon");Q("\\colonequals","\\coloneqq");Q("\\coloncolonequals","\\Coloneqq");Q("\\equalscolon","\\eqqcolon");Q("\\equalscoloncolon","\\Eqqcolon");Q("\\colonminus","\\coloneq");Q("\\coloncolonminus","\\Coloneq");Q("\\minuscolon","\\eqcolon");Q("\\minuscoloncolon","\\Eqcolon");Q("\\coloncolonapprox","\\Colonapprox");Q("\\coloncolonsim","\\Colonsim");Q("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Q("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");Q("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Q("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");Q("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");Q("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");Q("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");Q("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");Q("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");Q("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");Q("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");Q("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");Q("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");Q("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");Q("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");Q("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");Q("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");Q("\\nleqq","\\html@mathml{\\@nleqq}{≰}");Q("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");Q("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");Q("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");Q("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");Q("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");Q("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");Q("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");Q("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");Q("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");Q("\\imath","\\html@mathml{\\@imath}{ı}");Q("\\jmath","\\html@mathml{\\@jmath}{ȷ}");Q("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");Q("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");Q("⟦","\\llbracket");Q("⟧","\\rrbracket");Q("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");Q("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");Q("⦃","\\lBrace");Q("⦄","\\rBrace");Q("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");Q("⦵","\\minuso");Q("\\darr","\\downarrow");Q("\\dArr","\\Downarrow");Q("\\Darr","\\Downarrow");Q("\\lang","\\langle");Q("\\rang","\\rangle");Q("\\uarr","\\uparrow");Q("\\uArr","\\Uparrow");Q("\\Uarr","\\Uparrow");Q("\\N","\\mathbb{N}");Q("\\R","\\mathbb{R}");Q("\\Z","\\mathbb{Z}");Q("\\alef","\\aleph");Q("\\alefsym","\\aleph");Q("\\Alpha","\\mathrm{A}");Q("\\Beta","\\mathrm{B}");Q("\\bull","\\bullet");Q("\\Chi","\\mathrm{X}");Q("\\clubs","\\clubsuit");Q("\\cnums","\\mathbb{C}");Q("\\Complex","\\mathbb{C}");Q("\\Dagger","\\ddagger");Q("\\diamonds","\\diamondsuit");Q("\\empty","\\emptyset");Q("\\Epsilon","\\mathrm{E}");Q("\\Eta","\\mathrm{H}");Q("\\exist","\\exists");Q("\\harr","\\leftrightarrow");Q("\\hArr","\\Leftrightarrow");Q("\\Harr","\\Leftrightarrow");Q("\\hearts","\\heartsuit");Q("\\image","\\Im");Q("\\infin","\\infty");Q("\\Iota","\\mathrm{I}");Q("\\isin","\\in");Q("\\Kappa","\\mathrm{K}");Q("\\larr","\\leftarrow");Q("\\lArr","\\Leftarrow");Q("\\Larr","\\Leftarrow");Q("\\lrarr","\\leftrightarrow");Q("\\lrArr","\\Leftrightarrow");Q("\\Lrarr","\\Leftrightarrow");Q("\\Mu","\\mathrm{M}");Q("\\natnums","\\mathbb{N}");Q("\\Nu","\\mathrm{N}");Q("\\Omicron","\\mathrm{O}");Q("\\plusmn","\\pm");Q("\\rarr","\\rightarrow");Q("\\rArr","\\Rightarrow");Q("\\Rarr","\\Rightarrow");Q("\\real","\\Re");Q("\\reals","\\mathbb{R}");Q("\\Reals","\\mathbb{R}");Q("\\Rho","\\mathrm{P}");Q("\\sdot","\\cdot");Q("\\sect","\\S");Q("\\spades","\\spadesuit");Q("\\sub","\\subset");Q("\\sube","\\subseteq");Q("\\supe","\\supseteq");Q("\\Tau","\\mathrm{T}");Q("\\thetasym","\\vartheta");Q("\\weierp","\\wp");Q("\\Zeta","\\mathrm{Z}");Q("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");Q("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");Q("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");Q("\\bra","\\mathinner{\\langle{#1}|}");Q("\\ket","\\mathinner{|{#1}\\rangle}");Q("\\braket","\\mathinner{\\langle{#1}\\rangle}");Q("\\Bra","\\left\\langle#1\\right|");Q("\\Ket","\\left|#1\\right\\rangle");var EK=e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=h=>f=>{e&&(f.macros.set("|",o),a.length&&f.macros.set("\\|",s));var m=h;if(!h&&a.length){var b=f.future();b.text==="|"&&(f.popToken(),m=!0)}return{tokens:m?a:n,numArgs:0}};t.macros.set("|",l(!1)),a.length&&t.macros.set("\\|",l(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...i,...u,...r]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};Q("\\bra@ket",EK(!1));Q("\\bra@set",EK(!0));Q("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");Q("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");Q("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");Q("\\angln","{\\angl n}");Q("\\blue","\\textcolor{##6495ed}{#1}");Q("\\orange","\\textcolor{##ffa500}{#1}");Q("\\pink","\\textcolor{##ff00af}{#1}");Q("\\red","\\textcolor{##df0030}{#1}");Q("\\green","\\textcolor{##28ae7b}{#1}");Q("\\gray","\\textcolor{gray}{#1}");Q("\\purple","\\textcolor{##9d38bd}{#1}");Q("\\blueA","\\textcolor{##ccfaff}{#1}");Q("\\blueB","\\textcolor{##80f6ff}{#1}");Q("\\blueC","\\textcolor{##63d9ea}{#1}");Q("\\blueD","\\textcolor{##11accd}{#1}");Q("\\blueE","\\textcolor{##0c7f99}{#1}");Q("\\tealA","\\textcolor{##94fff5}{#1}");Q("\\tealB","\\textcolor{##26edd5}{#1}");Q("\\tealC","\\textcolor{##01d1c1}{#1}");Q("\\tealD","\\textcolor{##01a995}{#1}");Q("\\tealE","\\textcolor{##208170}{#1}");Q("\\greenA","\\textcolor{##b6ffb0}{#1}");Q("\\greenB","\\textcolor{##8af281}{#1}");Q("\\greenC","\\textcolor{##74cf70}{#1}");Q("\\greenD","\\textcolor{##1fab54}{#1}");Q("\\greenE","\\textcolor{##0d923f}{#1}");Q("\\goldA","\\textcolor{##ffd0a9}{#1}");Q("\\goldB","\\textcolor{##ffbb71}{#1}");Q("\\goldC","\\textcolor{##ff9c39}{#1}");Q("\\goldD","\\textcolor{##e07d10}{#1}");Q("\\goldE","\\textcolor{##a75a05}{#1}");Q("\\redA","\\textcolor{##fca9a9}{#1}");Q("\\redB","\\textcolor{##ff8482}{#1}");Q("\\redC","\\textcolor{##f9685d}{#1}");Q("\\redD","\\textcolor{##e84d39}{#1}");Q("\\redE","\\textcolor{##bc2612}{#1}");Q("\\maroonA","\\textcolor{##ffbde0}{#1}");Q("\\maroonB","\\textcolor{##ff92c6}{#1}");Q("\\maroonC","\\textcolor{##ed5fa6}{#1}");Q("\\maroonD","\\textcolor{##ca337c}{#1}");Q("\\maroonE","\\textcolor{##9e034e}{#1}");Q("\\purpleA","\\textcolor{##ddd7ff}{#1}");Q("\\purpleB","\\textcolor{##c6b9fc}{#1}");Q("\\purpleC","\\textcolor{##aa87ff}{#1}");Q("\\purpleD","\\textcolor{##7854ab}{#1}");Q("\\purpleE","\\textcolor{##543b78}{#1}");Q("\\mintA","\\textcolor{##f5f9e8}{#1}");Q("\\mintB","\\textcolor{##edf2df}{#1}");Q("\\mintC","\\textcolor{##e0e5cc}{#1}");Q("\\grayA","\\textcolor{##f6f7f7}{#1}");Q("\\grayB","\\textcolor{##f0f1f2}{#1}");Q("\\grayC","\\textcolor{##e3e5e6}{#1}");Q("\\grayD","\\textcolor{##d6d8da}{#1}");Q("\\grayE","\\textcolor{##babec2}{#1}");Q("\\grayF","\\textcolor{##888d93}{#1}");Q("\\grayG","\\textcolor{##626569}{#1}");Q("\\grayH","\\textcolor{##3b3e40}{#1}");Q("\\grayI","\\textcolor{##21242c}{#1}");Q("\\kaBlue","\\textcolor{##314453}{#1}");Q("\\kaGreen","\\textcolor{##71B307}{#1}");var SK={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class sfe{constructor(t,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(t),this.macros=new ife(ofe,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new fI(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,a;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:a,end:n}=this.consumeArg(["]"])}else({tokens:a,start:r,end:n}=this.consumeArg());return this.pushToken(new ro("EOF",n.loc)),this.pushTokens(a),r.range(n,"")}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var a=this.future(),i,o=0,s=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++o;else if(i.text==="}"){if(--o,o===-1)throw new at("Extra }",i)}else if(i.text==="EOF")throw new at("Unexpected end of input in a macro argument, expected '"+(t&&n?t[s]:"}")+"'",i);if(t&&n)if((o===0||o===1&&t[s]==="{")&&i.text===t[s]){if(++s,s===t.length){r.splice(-s,s);break}}else s=0}while(o!==0||n);return a.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:a,end:i}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new at("The length of delimiters doesn't match the number of args!");for(var n=r[0],a=0;athis.settings.maxExpand)throw new at("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,a=r.noexpand?null:this._getExpansion(n);if(a==null||t&&a.unexpandable){if(t&&a==null&&n[0]==="\\"&&!this.isDefined(n))throw new at("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var i=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){i=i.slice();for(var s=i.length-1;s>=0;--s){var l=i[s];if(l.text==="#"){if(s===0)throw new at("Incomplete placeholder at end of macro body",l);if(l=i[--s],l.text==="#")i.splice(s+1,1);else if(/^[1-9]$/.test(l.text))i.splice(s,2,...o[+l.text-1]);else throw new at("Not a valid argument number",l)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new ro(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),r.push(a)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var a=typeof r=="function"?r(this):r;if(typeof a=="string"){var i=0;if(a.indexOf("#")!==-1)for(var o=a.replace(/##/g,"");o.indexOf("#"+(i+1))!==-1;)++i;for(var s=new fI(a,this.settings),l=[],u=s.lex();u.text!=="EOF";)l.push(u),u=s.lex();l.reverse();var d={tokens:l,numArgs:i};return d}return a}isDefined(t){return this.macros.has(t)||au.hasOwnProperty(t)||rn.math.hasOwnProperty(t)||rn.text.hasOwnProperty(t)||SK.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:au.hasOwnProperty(t)&&!au[t].primitive}}var bI=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,o1=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),mS={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},yI={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};let xK=class wK{constructor(t,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new sfe(t,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new at("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new ro("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var a=this.fetch();if(wK.endOfExpression.indexOf(a.text)!==-1||r&&a.text===r||t&&au[a.text]&&au[a.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;n.push(i)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,a=0;a=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',t);var s=rn[this.mode][r].group,l=xi.range(t),u;if(Yhe.hasOwnProperty(s)){var d=s;u={type:"atom",mode:this.mode,family:d,loc:l,text:r}}else u={type:s,mode:this.mode,loc:l,text:r};o=u}else if(r.charCodeAt(0)>=128)this.settings.strict&&(DV(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:xi.range(t),text:r};else return null;if(this.consume(),i)for(var h=0;h=0;i--)t[i].loc.start>a&&(n+=" ",a=t[i].loc.start),n+=t[i].text,a+=t[i].text.length;var o=Kr.go(Ue.go(n,r));return o},Ue={go:function(t,r){if(!t)return[];r===void 0&&(r="ce");var n="0",a={};a.parenthesisLevel=0,t=t.replace(/\n/g," "),t=t.replace(/[\u2212\u2013\u2014\u2010]/g,"-"),t=t.replace(/[\u2026]/g,"...");for(var i,o=10,s=[];;){i!==t?(o=10,i=t):o--;var l=Ue.stateMachines[r],u=l.transitions[n]||l.transitions["*"];e:for(var d=0;d0){if(f.revisit||(t=h.remainder),!f.toContinue)break e}else return s}}if(o<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,r){if(r)if(Array.isArray(r))for(var n=0;n":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(t){return Ue.patterns.findObserveGroups(t,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(t){return Ue.patterns.findObserveGroups(t,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(t){return Ue.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(t){return Ue.patterns.findObserveGroups(t,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(t){return Ue.patterns.findObserveGroups(t,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(t){return Ue.patterns.findObserveGroups(t,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(t){return Ue.patterns.findObserveGroups(t,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(t){return Ue.patterns.findObserveGroups(t,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(t){return Ue.patterns.findObserveGroups(t,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(t){return Ue.patterns.findObserveGroups(t,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(t){return Ue.patterns.findObserveGroups(t,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(t){return Ue.patterns.findObserveGroups(t,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(t){var r;if(r=t.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/),r)return{match_:r[0],remainder:t.substr(r[0].length)};var n=Ue.patterns.findObserveGroups(t,"","$","$","");return n&&(r=n.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/),r)?{match_:r[0],remainder:t.substr(r[0].length)}:null},amount2:function(t){return this.amount(t)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(t){if(t.match(/^\([a-z]+\)$/))return null;var r=t.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return r?{match_:r[0],remainder:t.substr(r[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(t,r,n,a,i,o,s,l,u,d){var h=function(C,_){if(typeof _=="string")return C.indexOf(_)!==0?null:_;var D=C.match(_);return D?D[0]:null},f=function(C,_,D){for(var w=0;_0,null},m=h(t,r);if(m===null||(t=t.substr(m.length),m=h(t,n),m===null))return null;var b=f(t,m.length,a||i);if(b===null)return null;var y=t.substring(0,a?b.endMatchEnd:b.endMatchBegin);if(o||s){var F=this.findObserveGroups(t.substr(b.endMatchEnd),o,s,l,u);if(F===null)return null;var x=[y,F.match_];return{match_:d?x.join(""):x,remainder:F.remainder}}else return{match_:y,remainder:t.substr(b.endMatchEnd)}},match_:function(t,r){var n=Ue.patterns.patterns[t];if(n===void 0)throw["MhchemBugP","mhchem bug P. Please report. ("+t+")"];if(typeof n=="function")return Ue.patterns.patterns[t](r);var a=r.match(n);if(a){var i;return a[2]?i=[a[1],a[2]]:a[1]?i=a[1]:i=a[0],{match_:i,remainder:r.substr(a[0].length)}}return null}},actions:{"a=":function(t,r){t.a=(t.a||"")+r},"b=":function(t,r){t.b=(t.b||"")+r},"p=":function(t,r){t.p=(t.p||"")+r},"o=":function(t,r){t.o=(t.o||"")+r},"q=":function(t,r){t.q=(t.q||"")+r},"d=":function(t,r){t.d=(t.d||"")+r},"rm=":function(t,r){t.rm=(t.rm||"")+r},"text=":function(t,r){t.text_=(t.text_||"")+r},insert:function(t,r,n){return{type_:n}},"insert+p1":function(t,r,n){return{type_:n,p1:r}},"insert+p1+p2":function(t,r,n){return{type_:n,p1:r[0],p2:r[1]}},copy:function(t,r){return r},rm:function(t,r){return{type_:"rm",p1:r||""}},text:function(t,r){return Ue.go(r,"text")},"{text}":function(t,r){var n=["{"];return Ue.concatArray(n,Ue.go(r,"text")),n.push("}"),n},"tex-math":function(t,r){return Ue.go(r,"tex-math")},"tex-math tight":function(t,r){return Ue.go(r,"tex-math tight")},bond:function(t,r,n){return{type_:"bond",kind_:n||r}},"color0-output":function(t,r){return{type_:"color0",color:r[0]}},ce:function(t,r){return Ue.go(r)},"1/2":function(t,r){var n=[];r.match(/^[+\-]/)&&(n.push(r.substr(0,1)),r=r.substr(1));var a=r.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);return a[1]=a[1].replace(/\$/g,""),n.push({type_:"frac",p1:a[1],p2:a[2]}),a[3]&&(a[3]=a[3].replace(/\$/g,""),n.push({type_:"tex-math",p1:a[3]})),n},"9,9":function(t,r){return Ue.go(r,"9,9")}},createTransitions:function(t){var r,n,a,i,o={};for(r in t)for(n in t[r])for(a=n.split("|"),t[r][n].stateArray=a,i=0;i":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(t,r){var n;if((t.d||"").match(/^[0-9]+$/)){var a=t.d;t.d=void 0,n=this.output(t),t.b=a}else n=this.output(t);return Ue.actions["o="](t,r),n},"d= kv":function(t,r){t.d=r,t.dType="kv"},"charge or bond":function(t,r){if(t.beginsWithBond){var n=[];return Ue.concatArray(n,this.output(t)),Ue.concatArray(n,Ue.actions.bond(t,r,"-")),n}else t.d=r},"- after o/d":function(t,r,n){var a=Ue.patterns.match_("orbital",t.o||""),i=Ue.patterns.match_("one lowercase greek letter $",t.o||""),o=Ue.patterns.match_("one lowercase latin letter $",t.o||""),s=Ue.patterns.match_("$one lowercase latin letter$ $",t.o||""),l=r==="-"&&(a&&a.remainder===""||i||o||s);l&&!t.a&&!t.b&&!t.p&&!t.d&&!t.q&&!a&&o&&(t.o="$"+t.o+"$");var u=[];return l?(Ue.concatArray(u,this.output(t)),u.push({type_:"hyphen"})):(a=Ue.patterns.match_("digits",t.d||""),n&&a&&a.remainder===""?(Ue.concatArray(u,Ue.actions["d="](t,r)),Ue.concatArray(u,this.output(t))):(Ue.concatArray(u,this.output(t)),Ue.concatArray(u,Ue.actions.bond(t,r,"-")))),u},"a to o":function(t){t.o=t.a,t.a=void 0},"sb=true":function(t){t.sb=!0},"sb=false":function(t){t.sb=!1},"beginsWithBond=true":function(t){t.beginsWithBond=!0},"beginsWithBond=false":function(t){t.beginsWithBond=!1},"parenthesisLevel++":function(t){t.parenthesisLevel++},"parenthesisLevel--":function(t){t.parenthesisLevel--},"state of aggregation":function(t,r){return{type_:"state of aggregation",p1:Ue.go(r,"o")}},comma:function(t,r){var n=r.replace(/\s*$/,""),a=n!==r;return a&&t.parenthesisLevel===0?{type_:"comma enumeration L",p1:n}:{type_:"comma enumeration M",p1:n}},output:function(t,r,n){var a;if(!t.r)a=[],!t.a&&!t.b&&!t.p&&!t.o&&!t.q&&!t.d&&!n||(t.sb&&a.push({type_:"entitySkip"}),!t.o&&!t.q&&!t.d&&!t.b&&!t.p&&n!==2?(t.o=t.a,t.a=void 0):!t.o&&!t.q&&!t.d&&(t.b||t.p)?(t.o=t.a,t.d=t.b,t.q=t.p,t.a=t.b=t.p=void 0):t.o&&t.dType==="kv"&&Ue.patterns.match_("d-oxidation$",t.d||"")?t.dType="oxidation":t.o&&t.dType==="kv"&&!t.q&&(t.dType=void 0),a.push({type_:"chemfive",a:Ue.go(t.a,"a"),b:Ue.go(t.b,"bd"),p:Ue.go(t.p,"pq"),o:Ue.go(t.o,"o"),q:Ue.go(t.q,"pq"),d:Ue.go(t.d,t.dType==="oxidation"?"oxidation":"bd"),dType:t.dType}));else{var i;t.rdt==="M"?i=Ue.go(t.rd,"tex-math"):t.rdt==="T"?i=[{type_:"text",p1:t.rd||""}]:i=Ue.go(t.rd);var o;t.rqt==="M"?o=Ue.go(t.rq,"tex-math"):t.rqt==="T"?o=[{type_:"text",p1:t.rq||""}]:o=Ue.go(t.rq),a={type_:"arrow",r:t.r,rd:i,rq:o}}for(var s in t)s!=="parenthesisLevel"&&s!=="beginsWithBond"&&delete t[s];return a},"oxidation-output":function(t,r){var n=["{"];return Ue.concatArray(n,Ue.go(r,"oxidation")),n.push("}"),n},"frac-output":function(t,r){return{type_:"frac-ce",p1:Ue.go(r[0]),p2:Ue.go(r[1])}},"overset-output":function(t,r){return{type_:"overset",p1:Ue.go(r[0]),p2:Ue.go(r[1])}},"underset-output":function(t,r){return{type_:"underset",p1:Ue.go(r[0]),p2:Ue.go(r[1])}},"underbrace-output":function(t,r){return{type_:"underbrace",p1:Ue.go(r[0]),p2:Ue.go(r[1])}},"color-output":function(t,r){return{type_:"color",color1:r[0],color2:Ue.go(r[1])}},"r=":function(t,r){t.r=r},"rdt=":function(t,r){t.rdt=r},"rd=":function(t,r){t.rd=r},"rqt=":function(t,r){t.rqt=r},"rq=":function(t,r){t.rq=r},operator:function(t,r,n){return{type_:"operator",kind_:n||r}}}},a:{transitions:Ue.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:Ue.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:Ue.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(t){if(t.text_){var r={type_:"text",p1:t.text_};for(var n in t)delete t[n];return r}}}},pq:{transitions:Ue.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(t,r){return{type_:"state of aggregation subscript",p1:Ue.go(r,"o")}},"color-output":function(t,r){return{type_:"color",color1:r[0],color2:Ue.go(r[1],"pq")}}}},bd:{transitions:Ue.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(t,r){return{type_:"color",color1:r[0],color2:Ue.go(r[1],"bd")}}}},oxidation:{transitions:Ue.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(t,r){return{type_:"roman numeral",p1:r||""}}}},"tex-math":{transitions:Ue.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(t){if(t.o){var r={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return r}}}},"tex-math tight":{transitions:Ue.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(t,r){t.o=(t.o||"")+"{"+r+"}"},output:function(t){if(t.o){var r={type_:"tex-math",p1:t.o};for(var n in t)delete t[n];return r}}}},"9,9":{transitions:Ue.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Ue.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(t,r){var n=[];return r[0]==="+-"||r[0]==="+/-"?n.push("\\pm "):r[0]&&n.push(r[0]),r[1]&&(Ue.concatArray(n,Ue.go(r[1],"pu-9,9")),r[2]&&(r[2].match(/[,.]/)?Ue.concatArray(n,Ue.go(r[2],"pu-9,9")):n.push(r[2])),r[3]=r[4]||r[3],r[3]&&(r[3]=r[3].trim(),r[3]==="e"||r[3].substr(0,1)==="*"?n.push({type_:"cdot"}):n.push({type_:"times"}))),r[3]&&n.push("10^{"+r[5]+"}"),n},"number^":function(t,r){var n=[];return r[0]==="+-"||r[0]==="+/-"?n.push("\\pm "):r[0]&&n.push(r[0]),Ue.concatArray(n,Ue.go(r[1],"pu-9,9")),n.push("^{"+r[2]+"}"),n},operator:function(t,r,n){return{type_:"operator",kind_:n||r}},space:function(){return{type_:"pu-space-1"}},output:function(t){var r,n=Ue.patterns.match_("{(...)}",t.d||"");n&&n.remainder===""&&(t.d=n.match_);var a=Ue.patterns.match_("{(...)}",t.q||"");if(a&&a.remainder===""&&(t.q=a.match_),t.d&&(t.d=t.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.d=t.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),t.q){t.q=t.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),t.q=t.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var i={d:Ue.go(t.d,"pu"),q:Ue.go(t.q,"pu")};t.o==="//"?r={type_:"pu-frac",p1:i.d,p2:i.q}:(r=i.d,i.d.length>1||i.q.length>1?r.push({type_:" / "}):r.push({type_:"/"}),Ue.concatArray(r,i.q))}else r=Ue.go(t.d,"pu-2");for(var o in t)delete t[o];return r}}},"pu-2":{transitions:Ue.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(t,r){t.rm+="^{"+r+"}"},space:function(){return{type_:"pu-space-2"}},output:function(t){var r=[];if(t.rm){var n=Ue.patterns.match_("{(...)}",t.rm||"");n&&n.remainder===""?r=Ue.go(n.match_,"pu"):r={type_:"rm",p1:t.rm}}for(var a in t)delete t[a];return r}}},"pu-9,9":{transitions:Ue.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(t){var r=[];if(t.text_=t.text_||"",t.text_.length>4){var n=t.text_.length%3;n===0&&(n=3);for(var a=t.text_.length-3;a>0;a-=3)r.push(t.text_.substr(a,3)),r.push({type_:"1000 separator"});r.push(t.text_.substr(0,n)),r.reverse()}else r.push(t.text_);for(var i in t)delete t[i];return r},"output-o":function(t){var r=[];if(t.text_=t.text_||"",t.text_.length>4){for(var n=t.text_.length-3,a=0;a":return"rightarrow";case"→":return"rightarrow";case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<-->":return"rightleftarrows";case"<=>":return"rightleftharpoons";case"⇌":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(t){switch(t){case"-":return"{-}";case"1":return"{-}";case"=":return"{=}";case"2":return"{=}";case"#":return"{\\equiv}";case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(t){switch(t){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":return" {}\\approx{} ";case"$\\approx$":return" {}\\approx{} ";case"v":return" \\downarrow{} ";case"(v)":return" \\downarrow{} ";case"^":return" \\uparrow{} ";case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}},yf={},vI;function ufe(){if(vI)return yf;vI=1,Object.defineProperty(yf,"__esModule",{value:!0}),yf.parse=o,yf.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,n=/^[\u0020-\u003A\u003D-\u007E]*$/,a=Object.prototype.toString,i=(()=>{const f=function(){};return f.prototype=Object.create(null),f})();function o(f,m){const b=new i,y=f.length;if(y<2)return b;const F=(m==null?void 0:m.decode)||d;let x=0;do{const E=f.indexOf("=",x);if(E===-1)break;const C=f.indexOf(";",x),_=C===-1?y:C;if(E>_){x=f.lastIndexOf(";",E-1)+1;continue}const D=s(f,x,E),w=l(f,E,D),A=f.slice(D,w);if(b[A]===void 0){let I=s(f,E+1,_),M=l(f,_,I);const L=F(f.slice(I,M));b[A]=L}x=_+1}while(xb;){const y=f.charCodeAt(--m);if(y!==32&&y!==9)return m+1}return b}function u(f,m,b){const y=(b==null?void 0:b.encode)||encodeURIComponent;if(!e.test(f))throw new TypeError(`argument name is invalid: ${f}`);const F=y(m);if(!t.test(F))throw new TypeError(`argument val is invalid: ${m}`);let x=f+"="+F;if(!b)return x;if(b.maxAge!==void 0){if(!Number.isInteger(b.maxAge))throw new TypeError(`option maxAge is invalid: ${b.maxAge}`);x+="; Max-Age="+b.maxAge}if(b.domain){if(!r.test(b.domain))throw new TypeError(`option domain is invalid: ${b.domain}`);x+="; Domain="+b.domain}if(b.path){if(!n.test(b.path))throw new TypeError(`option path is invalid: ${b.path}`);x+="; Path="+b.path}if(b.expires){if(!h(b.expires)||!Number.isFinite(b.expires.valueOf()))throw new TypeError(`option expires is invalid: ${b.expires}`);x+="; Expires="+b.expires.toUTCString()}if(b.httpOnly&&(x+="; HttpOnly"),b.secure&&(x+="; Secure"),b.partitioned&&(x+="; Partitioned"),b.priority)switch(typeof b.priority=="string"?b.priority.toLowerCase():void 0){case"low":x+="; Priority=Low";break;case"medium":x+="; Priority=Medium";break;case"high":x+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${b.priority}`)}if(b.sameSite)switch(typeof b.sameSite=="string"?b.sameSite.toLowerCase():b.sameSite){case!0:case"strict":x+="; SameSite=Strict";break;case"lax":x+="; SameSite=Lax";break;case"none":x+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${b.sameSite}`)}return x}function d(f){if(f.indexOf("%")===-1)return f;try{return decodeURIComponent(f)}catch{return f}}function h(f){return a.call(f)==="[object Date]"}return yf}ufe();/** - * react-router v7.3.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */var FI="popstate";function cfe(e={}){function t(a,i){let{pathname:o="/",search:s="",hash:l=""}=Gc(a.location.hash.substring(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),d_("",{pathname:o,search:s,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(a,i){let o=a.document.querySelector("base"),s="";if(o&&o.getAttribute("href")){let l=a.location.href,u=l.indexOf("#");s=u===-1?l:l.slice(0,u)}return s+"#"+(typeof i=="string"?i:Tm(i))}function n(a,i){To(a.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(i)})`)}return hfe(t,r,n,e)}function mn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function To(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function dfe(){return Math.random().toString(36).substring(2,10)}function EI(e,t){return{usr:e.state,key:e.key,idx:t}}function d_(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Gc(t):t,state:r,key:t&&t.key||n||dfe()}}function Tm({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Gc(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function hfe(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,s="POP",l=null,u=d();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function d(){return(o.state||{idx:null}).idx}function h(){s="POP";let F=d(),x=F==null?null:F-u;u=F,l&&l({action:s,location:y.location,delta:x})}function f(F,x){s="PUSH";let E=d_(y.location,F,x);r&&r(E,F),u=d()+1;let C=EI(E,u),_=y.createHref(E);try{o.pushState(C,"",_)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;a.location.assign(_)}i&&l&&l({action:s,location:y.location,delta:1})}function m(F,x){s="REPLACE";let E=d_(y.location,F,x);r&&r(E,F),u=d();let C=EI(E,u),_=y.createHref(E);o.replaceState(C,"",_),i&&l&&l({action:s,location:y.location,delta:0})}function b(F){let x=a.location.origin!=="null"?a.location.origin:a.location.href,E=typeof F=="string"?F:Tm(F);return E=E.replace(/ $/,"%20"),mn(x,`No window.location.(origin|href) available to create URL for href: ${E}`),new URL(E,x)}let y={get action(){return s},get location(){return e(a,o)},listen(F){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(FI,h),l=F,()=>{a.removeEventListener(FI,h),l=null}},createHref(F){return t(a,F)},createURL:b,encodeLocation(F){let x=b(F);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:m,go(F){return o.go(F)}};return y}function NK(e,t,r="/"){return pfe(e,t,r,!1)}function pfe(e,t,r,n){let a=typeof t=="string"?Gc(t):t,i=ul(a.pathname||"/",r);if(i==null)return null;let o=LK(e);ffe(o);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(mn(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length));let u=rl([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(mn(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),LK(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Efe(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let l of MK(i.path))a(i,o,l)}),t}function MK(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=MK(n.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function ffe(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Sfe(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var mfe=/^:[\w-]+$/,gfe=3,bfe=2,yfe=1,vfe=10,Ffe=-2,SI=e=>e==="*";function Efe(e,t){let r=e.split("/"),n=r.length;return r.some(SI)&&(n+=Ffe),t&&(n+=bfe),r.filter(a=>!SI(a)).reduce((a,i)=>a+(mfe.test(i)?gfe:i===""?yfe:vfe),n)}function Sfe(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function xfe(e,t,r=!1){let{routesMeta:n}=e,a={},i="/",o=[];for(let s=0;s{if(d==="*"){let b=s[f]||"";o=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const m=s[f];return h&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function wfe(e,t=!1,r=!0){To(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function kfe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return To(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ul(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Cfe(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Gc(e):e;return{pathname:r?r.startsWith("/")?r:Tfe(r,t):t,search:Dfe(n),hash:Rfe(a)}}function Tfe(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function gS(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Afe(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function IK(e){let t=Afe(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function OK(e,t,r,n=!1){let a;typeof e=="string"?a=Gc(e):(a={...e},mn(!a.pathname||!a.pathname.includes("?"),gS("?","pathname","search",a)),mn(!a.pathname||!a.pathname.includes("#"),gS("#","pathname","hash",a)),mn(!a.search||!a.search.includes("#"),gS("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(o==null)s=r;else{let h=t.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;a.pathname=f.join("/")}s=h>=0?t[h]:"/"}let l=Cfe(a,s),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}var rl=e=>e.join("/").replace(/\/\/+/g,"/"),_fe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Dfe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Rfe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Nfe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var BK=["POST","PUT","PATCH","DELETE"];new Set(BK);var Lfe=["GET",...BK];new Set(Lfe);var Kh=T.createContext(null);Kh.displayName="DataRouter";var mv=T.createContext(null);mv.displayName="DataRouterState";var PK=T.createContext({isTransitioning:!1});PK.displayName="ViewTransition";var Mfe=T.createContext(new Map);Mfe.displayName="Fetchers";var Ife=T.createContext(null);Ife.displayName="Await";var ds=T.createContext(null);ds.displayName="Navigation";var n0=T.createContext(null);n0.displayName="Location";var gl=T.createContext({outlet:null,matches:[],isDataRoute:!1});gl.displayName="Route";var iR=T.createContext(null);iR.displayName="RouteError";function Ofe(e,{relative:t}={}){mn(a0(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:n}=T.useContext(ds),{hash:a,pathname:i,search:o}=i0(e,{relative:t}),s=i;return r!=="/"&&(s=i==="/"?r:rl([r,i])),n.createHref({pathname:s,search:o,hash:a})}function a0(){return T.useContext(n0)!=null}function $c(){return mn(a0(),"useLocation() may be used only in the context of a component."),T.useContext(n0).location}var zK="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function HK(e){T.useContext(ds).static||T.useLayoutEffect(e)}function oR(){let{isDataRoute:e}=T.useContext(gl);return e?Yfe():Bfe()}function Bfe(){mn(a0(),"useNavigate() may be used only in the context of a component.");let e=T.useContext(Kh),{basename:t,navigator:r}=T.useContext(ds),{matches:n}=T.useContext(gl),{pathname:a}=$c(),i=JSON.stringify(IK(n)),o=T.useRef(!1);return HK(()=>{o.current=!0}),T.useCallback((l,u={})=>{if(To(o.current,zK),!o.current)return;if(typeof l=="number"){r.go(l);return}let d=OK(l,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:rl([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,i,a,e])}T.createContext(null);function i0(e,{relative:t}={}){let{matches:r}=T.useContext(gl),{pathname:n}=$c(),a=JSON.stringify(IK(r));return T.useMemo(()=>OK(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Pfe(e,t){return UK(e,t)}function UK(e,t,r,n){var E;mn(a0(),"useRoutes() may be used only in the context of a component.");let{navigator:a,static:i}=T.useContext(ds),{matches:o}=T.useContext(gl),s=o[o.length-1],l=s?s.params:{},u=s?s.pathname:"/",d=s?s.pathnameBase:"/",h=s&&s.route;{let C=h&&h.path||"";GK(u,!h||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${u}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. - -Please change the parent to .`)}let f=$c(),m;if(t){let C=typeof t=="string"?Gc(t):t;mn(d==="/"||((E=C.pathname)==null?void 0:E.startsWith(d)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${C.pathname}" was given in the \`location\` prop.`),m=C}else m=f;let b=m.pathname||"/",y=b;if(d!=="/"){let C=d.replace(/^\//,"").split("/");y="/"+b.replace(/^\//,"").split("/").slice(C.length).join("/")}let F=!i&&r&&r.matches&&r.matches.length>0?r.matches:NK(e,{pathname:y});To(h||F!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),To(F==null||F[F.length-1].route.element!==void 0||F[F.length-1].route.Component!==void 0||F[F.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let x=$fe(F&&F.map(C=>Object.assign({},C,{params:Object.assign({},l,C.params),pathname:rl([d,a.encodeLocation?a.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?d:rl([d,a.encodeLocation?a.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),o,r,n);return t&&x?T.createElement(n0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},x):x}function zfe(){let e=Kfe(),t=Nfe(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:i},"ErrorBoundary")," or"," ",T.createElement("code",{style:i},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),r?T.createElement("pre",{style:a},r):null,o)}var Hfe=T.createElement(zfe,null),Ufe=class extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?T.createElement(gl.Provider,{value:this.props.routeContext},T.createElement(iR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Gfe({routeContext:e,match:t,children:r}){let n=T.useContext(Kh);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),T.createElement(gl.Provider,{value:e},r)}function $fe(e,t=[],r=null,n=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let l=a.findIndex(u=>u.route.id&&(i==null?void 0:i[u.route.id])!==void 0);mn(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,l+1))}let o=!1,s=-1;if(r)for(let l=0;l=0?a=a.slice(0,s+1):a=[a[0]];break}}}return a.reduceRight((l,u,d)=>{let h,f=!1,m=null,b=null;r&&(h=i&&u.route.id?i[u.route.id]:void 0,m=u.route.errorElement||Hfe,o&&(s<0&&d===0?(GK("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,b=null):s===d&&(f=!0,b=u.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,d+1)),F=()=>{let x;return h?x=m:f?x=b:u.route.Component?x=T.createElement(u.route.Component,null):u.route.element?x=u.route.element:x=l,T.createElement(Gfe,{match:u,routeContext:{outlet:l,matches:y,isDataRoute:r!=null},children:x})};return r&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?T.createElement(Ufe,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:F(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):F()},null)}function sR(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jfe(e){let t=T.useContext(Kh);return mn(t,sR(e)),t}function qfe(e){let t=T.useContext(mv);return mn(t,sR(e)),t}function Wfe(e){let t=T.useContext(gl);return mn(t,sR(e)),t}function lR(e){let t=Wfe(e),r=t.matches[t.matches.length-1];return mn(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Vfe(){return lR("useRouteId")}function Kfe(){var n;let e=T.useContext(iR),t=qfe("useRouteError"),r=lR("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Yfe(){let{router:e}=jfe("useNavigate"),t=lR("useNavigate"),r=T.useRef(!1);return HK(()=>{r.current=!0}),T.useCallback(async(a,i={})=>{To(r.current,zK),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var xI={};function GK(e,t,r){!t&&!xI[e]&&(xI[e]=!0,To(!1,r))}T.memo(Xfe);function Xfe({routes:e,future:t,state:r}){return UK(e,void 0,r,t)}function h_(e){mn(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Jfe({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:i=!1}){mn(!a0(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),s=T.useMemo(()=>({basename:o,navigator:a,static:i,future:{}}),[o,a,i]);typeof r=="string"&&(r=Gc(r));let{pathname:l="/",search:u="",hash:d="",state:h=null,key:f="default"}=r,m=T.useMemo(()=>{let b=ul(l,o);return b==null?null:{location:{pathname:b,search:u,hash:d,state:h,key:f},navigationType:n}},[o,l,u,d,h,f,n]);return To(m!=null,` is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the won't render anything.`),m==null?null:T.createElement(ds.Provider,{value:s},T.createElement(n0.Provider,{children:t,value:m}))}function Zfe({children:e,location:t}){return Pfe(p_(e),t)}function p_(e,t=[]){let r=[];return T.Children.forEach(e,(n,a)=>{if(!T.isValidElement(n))return;let i=[...t,a];if(n.type===T.Fragment){r.push.apply(r,p_(n.props.children,i));return}mn(n.type===h_,`[${typeof n.type=="string"?n.type:n.type.name}] is not a component. All component children of must be a or `),mn(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=p_(n.props.children,i)),r.push(o)}),r}var tb="get",rb="application/x-www-form-urlencoded";function gv(e){return e!=null&&typeof e.tagName=="string"}function Qfe(e){return gv(e)&&e.tagName.toLowerCase()==="button"}function eme(e){return gv(e)&&e.tagName.toLowerCase()==="form"}function tme(e){return gv(e)&&e.tagName.toLowerCase()==="input"}function rme(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nme(e,t){return e.button===0&&(!t||t==="_self")&&!rme(e)}var s1=null;function ame(){if(s1===null)try{new FormData(document.createElement("form"),0),s1=!1}catch{s1=!0}return s1}var ime=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bS(e){return e!=null&&!ime.has(e)?(To(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${rb}"`),null):e}function ome(e,t){let r,n,a,i,o;if(eme(e)){let s=e.getAttribute("action");n=s?ul(s,t):null,r=e.getAttribute("method")||tb,a=bS(e.getAttribute("enctype"))||rb,i=new FormData(e)}else if(Qfe(e)||tme(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a